Since about the first week or so I started working on FBA, I've been trying to get savestates working on the IREM M62 system. nomatter what I tried, the sound system would keep messing up on savestate load. A few weeks ago, me and iq_132 tried fixing it together on irc, and we thought we had it.. but, false alarm, it only worked by coincidence. Back to square one.
Today I dug really deep into the cpu core, and found a few variables that weren't getting saved in the savestate mechanism, I thought - hey! this should fix it.. Turns out I was wrong again...
Went out to eat, thought about it a bit... Seems like I'm turning into a code-zombie again...
Did a little more tracing, and relized, that none of the CPU registers were getting saved at all! Deep in the cpu core(HD63701), there lies a static local structure/variable that contains the cpu registers, and this is never copied over to the interface-side of things. Well derrrr!!
Fixed that up, and now things are working properly. Something that had been a total mystery to me over the past 6 months, finally fixed. wooohoo!!
p.s. on top of the irem m62 states getting fixed, it should also fix states for Pac-Land and any other game that uses this cpu core.
Thats it for now!
best regards & happy gaming,
- dink