Triggered by messages on the MESS CD-i WIP topic, I fixed a few CD-i Emulator bugs today.
I implemented the CDIC "seek" command which for some reason I never got around to; it allows International Tennis Open and Flashback to progress past their intros (they would hang otherwise). The SS_Seek API which is what triggers this command is just a (possible) performance optimization and very few CD-i titles use it (every read operation has an implied disc seek anyway).
Also fixed the CDIC sector dispatching logic so that it only handles audio sectors specially during a mode2 read (it could otherwise cause bugs with mode1 reads and seeks).
Fixed a region control bug (the region flags values were set from the lowest coordinate bit instead of the proper operation bit); this surfaced when trying to fix Zenith (it had no visual effect there but did show up in the video traces).
And finally todays biggie: fixed a transparancy control bug that caused planes to never go transparent, even when they should, as soon as any region flag got set. This was caused by a very subtle macro definition bug that caused the transparency control masks to get bad values for transparency cases i > 4, which are the cases where one or both region flags are set.
I'm frankly amazed the last one slipped through for so long; it even had a visible effect in the intro sequence of The Apprentice (when the little horse riding knight rides accross the screen, you could briefly see it in black in the left and right margins, whereas it should have been transparent, and now is). And I actually knew this was wrong but never got around to figuring it out...
But with the above changes, Zenith finally renders fully correct, Flashback and International Tennis Open boot okay (they have sound and gameplay issues, though), and The Apprentice also renders fully correct (as far as I know).
I have to figure out a way to get all these fixes out there...
No comments:
Post a Comment