Hey there, just I came across MartyPC is because I was hoping to re-discover and introduce my kids to a lot of classic PC games I played way, way back in the day. I've never actually created an account on this forum until recently, but I go by "Nemesis" in other circles. I'm behind the (rather neglected) Exodus emulator (https://www.exodusemulator.com) for the Mega Drive. I've just learned about MartyPC, and I wanted to reach out to say you've done an absolutely amazing job on it. My emulator had a very similar philosophy - aiming for cycle-accurate emulation, with a focus on extensive debugging features, and like you I did a LOT of testing on the hardware back in the day. The demands of life (work, emarriage, raising four kids, life stuff) has left me with little time to work on projects for the last... decade or so. Things are getting easier as my kids get older though, and I'm starting to ease back into things.
I'm at a crossroads of sorts. I'm trying to decide whether I resurrect Exodus, make it fully properly cycle accurate like it was always intended to be, but never achieved, and carry it forward to its logical conclusion (MegaCD, 32x, maybe onto the Saturn, Arcade hardware, etc), or whether I leave it for longer and tackle new challenges, possibly smaller ones as I ease back into things.
One thing I'm currently working on is a 128+ channel "logic analyzer"/"data capture" device, based on the Cypress FX3 paired with an FPGA, to do streaming capture of large parallel buses to PC, to serve as "reference traces" from the original hardware. My plan was similar to what I see you've already done - take hardware verification to the next level by comparing emulated bus activity against physical bus traces, to flush out timing errors and prove perfect timing accuracy, and ultimately regression test to keep it there. As you've encountered, you can either get small snippets of large parallel bus activity (I have an old 128 channel logic analyzer on my bench for this purpose), or endless streams of a smaller number of channels through devices like Saleae clones, but nothing today seems to be out there to capture a large number of channels in an endless stream to a multi-GB file sift through on a computer later. I do intend to complete that work, so that might be of interest to you when it's done.
I was wondering though, want to collaborate a bit? I notice you don't seem to have savestate support in MartyPC. I built Exodus to support this, and I'm well aware of the challenges in making it happen in complex systems that aim for perfect timing accuracy. I've had a bit of a poke through the code, and I notice you seem to have reads and writes on your bus as complete indivisible steps. Everyone does that, and I did the same in Exodus originally. I had a major redesign of the bus system for Exodus planned around separating reads and writes into lower level component steps (IE, don't perform a "read", just assert your various lines/strobes, execute the requisite number of wait states based on internal state/external signals, then latch the current contents of the data bus at the appropriate time), so that you can insert unpredictable wait states in there for example, handle perfect timing for faults/exceptions during bus operations, or step through a processor bus operation a cycle at a time, and even savestate the entire system at that point, without having threads being blocked or anything like that. Is this a problem in the 8088 architecture, such that it makes savestates hard right now? This is something Byuu/Near had a lot of problems with back in the day. I vaguely recall we had some big discussions around this kind of stuff over 15 years ago now, probably still around on SpritesMind somewhere. Happy to talk shop about this kind of stuff anytime. Might even tinker and send a pull request your way for an enhancement or two if I find myself wanting a feature, it'll give me an excuse to cut some more code in Rust. I would have written Exodus in Rust if I was starting it today.
Anyway, wanted to say again, well done on this amazing achievement! I hope to see this project continue to advance. A 486DX2 with VGA graphics, a Gravis Ultrasound paired with a Sound Blaster Pro, and a couple of IDE HDDs and an ATAPI CDROM will be supported any day now, right? 😉