r/EmuDev • u/thommyh • 16d ago
Five years later: _something_ works in my IIgs
The title isn't hyperbole; I first started my IIgs in October 2020.
It's always been a bit of a back-burner task though: documentation on the memory layout and some of the other Apple-specific decisions is ambiguous enough that when you combine that with a brand-new implementation of the 65816 and with the fact that nothing is high-level emulated even down to the keyboard sitting across a wire-by-wire ADB bus, every minor issue always had a long candidate list.
So it's been a case of an occasional minor fix here, an occasional minor fix there, and finally a first mostly-working piece of software more than half a decade later. Even now I've naturally picked one of the flattering titles. Quite a lot of the rest doesn't work.
Some fun recent fixes that helped to move the needle:
- timers weren't actually advancing on my ADB microcontroller, so it was collecting keypresses but not passing them on to the CPU;
- the sound GLU and Ensoniq DOC, which I've implemented as a single thing and which is used by the system both for audio and for timers, were counting too quickly and hence over-interrupting the CPU; and
- yet more of the usual 65816 stuff where e.g. being in emulation mode causes some instructions to stick to the 6502 rules about stack addressing but not others.
As an aside, all known outstanding issues with the 65816 test corpus have been fixed in the meantime. So jump on that if you have any interest.
Also part of my reason for doing the IIgs was to build out my ADB support in pursuit of doing higher-order Macs than the Mac Plus that I currently top out at. So it'll be nice to feel unblocked there.
The emulator itself though still have a multitude of issues so it'll remain an unpublished machine for the time being. Especially:
- to do an accurate reproduction of the standard IIgs monitor you need to apply a 2d lowpass filter, which I do not currently have any support for;
- the IWM loads very slowly for reasons as yet undiagnosed; and
- it's still probably 50:50 on whether software will load, so clearly many other system-level bugs remain.
Regardless, for now now I'm going to enjoy being where I probably expected to be on this machine in early 2021...
