News:

2026.08.23 The "Files" area is now visible to guests/spiders

Main Menu

ESFloppy - An Floppy Emulator for Sony 400K/800K and Twiggy Drives

Started by AlexTheCat123, August 03, 2026, 02:48:12 PM

Previous topic - Next topic

AlexTheCat123

As promised when I released the LisaFPGA boards, I've gotten to work on ESFloppy after my break from the project, and I have some really good progress to report.

Sony 400K/800K emulation is fully-working at this point, with reads, writes, and formats tested in every Lisa OS/environment that I could get my hands on. And it appears to be faster than the Floppy Emu too, which has noticably-longer seek times.

Twiggy emulation is also pretty much done. As far as I know, this is the first emulator capable of emulating a Twiggy, so I'm pretty excited about this! Reads, writes, and formats are fully tested and working on Twiggy, and while it can only emulate the lower Twiggy drive right now, the full framework is in place to add upper drive capability so that both can be emulated simultaneously. This should honestly be quite easy to add; it'll likely be done by today or tomorrow.

Twiggy emulation was significantly harder than I expected for a variety of reasons. Even though Twiggy uses the same sector encoding as Sony, just with a different track count and different numbers of sectors per track, it's got some seriously-annoying quirks:

- This one's probably pretty obvious to anyone who's worked with Twiggies before: Given the odd positioning of the heads, when one head is on track T of the disk, the other one is on track 45-T, so you have to read in two separate tracks from the disk image for each seek. And to make matters worse, in the vast majority of cases, each side will have a different number of sectors too...
- Twiggy has a set of "speed sync" bytes that have to be sent out before sector 0 on each track that the controller uses to fine-tune the spindle speed before a format op. This isn't present on Sony at all.
- Twiggy has a weird "track -1" that's used as a timing track during a format. Before the format begins, the controller seeks to track -1 and writes a pattern of 14 sectors, then 15, and then 21, measuring and adjusting the disk speed each time. This requires making a "dynamic track" that allows storage of different numbers of sectors instead of hard-coding it to the expected number of sectors per track like you can for all the others.
- During a format, the Twiggy controller expects each track to take a very specific amount of time between consecutive starts of sector 0. If the track is too long or too short, the format will fail. On an emulator, you generally want to send data out as quickly as possible with minimal padding in between sectors (which works fine on Sony), but on Twiggy you're forced to use very specific (and different) amounts of padding on each track to ensure that the track time is exactly what the controller expects.
- And that just scratches the surface!

Here's a video showing the Twiggy emulation in action; I didn't bother making a video about Sony emulation since that's boring by comparison: https://www.youtube.com/watch?v=8sN7Cv-MONM

The big thing left to do (after I emulate the upper Twiggy) is to make the UI that runs on the OLED. This won't really be hard (the hard part was all of the optimization necessary to get the actual disk routines to run fast enough), but it will certainly be tedious, and will probably take a little while.

bmwcyclist

Using my LISA for writing blogs and other work projects, and for fun and games at home.
Visit my shares on GlobalTalk! LISAGamingZone
Check out the NEW Lisa Software! https://github.com/GyroPilot
telnet theapplelisabbs.duckdns.org 1983

ried


bmwcyclist

Using my LISA for writing blogs and other work projects, and for fun and games at home.
Visit my shares on GlobalTalk! LISAGamingZone
Check out the NEW Lisa Software! https://github.com/GyroPilot
telnet theapplelisabbs.duckdns.org 1983

AlexTheCat123

Quote from: bmwcyclist on September 13, 2026, 08:31:10 PMIs this released in an update?

Yeah, if you clone the latest version of the repo and run the program_board.sh script, you'll get all of this functionality on your board!

wottle

Awesome.  I'll have to pull your latest into my fork and make sure my changes don't conflict with yours.  For my all in one case, I added a long-press to the center ESFloppy button to open an on screen menu that allows me to shift the video output left or right (so I could center it on my widescreen LCD in the cutout of my case).  If it does conflict, I'll have to come up with another way to set the offset (ideally not at build time, but now that my case design is basically final, it probably would be OK. 

Let me know if you would be interested in a case.  I could print you one if you wanted to build your own: https://github.com/wottle/lisa-mini


AlexTheCat123

Quote from: wottle on September 14, 2026, 11:05:39 PMAwesome.  I'll have to pull your latest into my fork and make sure my changes don't conflict with yours.  For my all in one case, I added a long-press to the center ESFloppy button to open an on screen menu that allows me to shift the video output left or right (so I could center it on my widescreen LCD in the cutout of my case).  If it does conflict, I'll have to come up with another way to set the offset (ideally not at build time, but now that my case design is basically final, it probably would be OK. 

Long-press is how you force-eject a disk and how you exit the file picker if you change your mind and decide not to insert a disk, so unfortunately I think we might have a conflict!

wottle

Quote from: AlexTheCat123 on Yesterday at 01:30:33 AM
Quote from: wottle on September 14, 2026, 11:05:39 PMAwesome.  I'll have to pull your latest into my fork and make sure my changes don't conflict with yours.  For my all in one case, I added a long-press to the center ESFloppy button to open an on screen menu that allows me to shift the video output left or right (so I could center it on my widescreen LCD in the cutout of my case).  If it does conflict, I'll have to come up with another way to set the offset (ideally not at build time, but now that my case design is basically final, it probably would be OK. 

Long-press is how you force-eject a disk and how you exit the file picker if you change your mind and decide not to insert a disk, so unfortunately I think we might have a conflict!


Ah, not a problem.  I may try long press both the arrow buttons.  This should be something they have to do once during setup.  I think I fried something in my USB-C port trying to power the lisaFPGA and an LCD with a single 5v trigger board, and now my board doesn't show up when I plug it into my computer.  It still boots fine and still has my fork with the menu and video adjustments, but I cannot push changes to it.  I did pick up a dedicated JTAG programmer that I'm hoping to use to flash the device again.  I was hoping to dig into the USB handling for glint devices to improve support for usb keyboards with a port built in, and maybe wireless usb mice.

Love the work you've done and excited to be able to throw some floppy images on mine and play around more. 

bmwcyclist

Got the update done this is fantastic functionality! Thank you so much for everything!

Here's a walk-through, especially for people that are not used to Linux.

The text can also be found on the lisa BBS.

Now, if I can only get someone to help me with my real 400 K hardware! ;)
Using my LISA for writing blogs and other work projects, and for fun and games at home.
Visit my shares on GlobalTalk! LISAGamingZone
Check out the NEW Lisa Software! https://github.com/GyroPilot
telnet theapplelisabbs.duckdns.org 1983

Lisa1

Quote from: bmwcyclist on Yesterday at 02:14:59 PMNow, if I can only get someone to help me with my real 400 K hardware!

I was able to run a physical 400K drive off of the LisaFPG (and a 4:3 LCD monitor) at the VCF Midwest last weekend. What kind of help do you need with your 400k drive?


bmwcyclist

Quote from: Lisa1 on Yesterday at 08:51:16 PM
Quote from: bmwcyclist on Yesterday at 02:14:59 PMNow, if I can only get someone to help me with my real 400 K hardware!

I was able to run a physical 400K drive off of the LisaFPG (and a 4:3 LCD monitor) at the VCF Midwest last weekend. What kind of help do you need with your 400k drive?

You cannot view this attachment.

NICE!!!!

Here is the thread thanks!

https://lisalist2.com/index.php/topic,848.0.html

Using my LISA for writing blogs and other work projects, and for fun and games at home.
Visit my shares on GlobalTalk! LISAGamingZone
Check out the NEW Lisa Software! https://github.com/GyroPilot
telnet theapplelisabbs.duckdns.org 1983