Please sign in to comment.
Attempted to fix minor FP inaccuracies
I'm still somewhat convinced that the bugs in space invaders, vertical force, and virtual bowling all might be related to the FP implementation, as those games all started working when FP was introduced, and exhibit kinds of bugs that don't seem to appear in other games. I went through the CPU manual a bit to try and find some more details and noticed that when the results of addf.s and subf.s would be -0, the result would be rounded to 0. I also assumed this would apply to cmpf.s, but I could be wrong about that. This fix is implemented here, however, it didn't seem to affect the behavior of any of these games, so I'm not sure I want to merge to master, but I'd like to document this in a commit at least. I've also dug through the code a bit for the v810 emulation in both mame and mednafen. Mame appears to be even more sloppy about FP than we are; I have yet to actually test these games in that emulator, but I should to so to try and eliminate this as the possible cause for those bugs. Mednafen even goes so far as to emulate the FP operations in software. This seems a bit extreme, especially since the floats in the v810 are IEEE single conformant, but might not be the worst choice as far as generating exceptions is concerned (which we don't handle currently). Need to investigate further.
- Loading branch information...