Skip to content

v0.4.2

Compare
Choose a tag to compare
@jsgroth jsgroth released this 16 Oct 22:57
· 834 commits to master since this release

tl;dr: SVP support and lots of Sega CD bugfixes

Features

  • (Genesis) Added support for the Sega Virtua Processor (SVP), an auxiliary processor used in the Genesis port of Virtua Racing to render 3D graphics in real time
  • (Master System) Made it possible to toggle between NTSC and PAL while a game is running
  • (Genesis) Re-added .bin files to the GUI's game list, implemented with a filter to exclude any files that are referenced in Sega CD .cue files
  • (All) Improved CLI help output by grouping related options under custom headings
  • (All) Added a hotkey to step the emulator for a single frame while paused (mainly useful for debugging)

Fixes/Improvements

  • (Sega CD) Fixed an off-by-one error that caused the VDP to read garbage if it did a DMA that read through the very end of word RAM; this fixes Snatcher having glitchy background graphics on some screens
  • (Sega CD) Fixed a CD drive bug where a "no-op" Seek command (seek time == current time) would cause the drive to start playing instead of remaining paused; this fixes Lunar: The Silver Star having extremely long post-battle load times
  • (Sega CD) Adjusted timing of image rotation/scaling operations to be hopefully closer to actual hardware; this fixes the Batman Returns intro cutscene running way too fast
  • (Sega CD) Changed main CPU writes to apply after running the sub CPU instead of applying them immediately; this fixes Silpheed freezing during gameplay if the VBlank interrupt fires while the main CPU is in the middle of handing word RAM to the sub CPU
    • The timing is very tight here; the main CPU needs to return from its VINT handler and then read a 0 from the RET bit in $A12003 twice before the sub CPU hands word RAM back to the main CPU. Otherwise, the two CPUs will deadlock and the game will freeze
  • (Sega CD) While not accurate to actual hardware, changed the word RAM code to allow the sub CPU and the graphics ASIC to access word RAM in 2M mode while it's owned by the main CPU; this fixes flickering and missing graphics in Batman Returns
    • It's somewhat unclear whether or not the graphics ASIC is allowed to access word RAM in this state, but the sub CPU definitely is not according to both official documentation and community hardware tests; there may be unrelated timing bugs creating the situation that made this hacky fix necessary
  • (Genesis / Sega CD) Implemented VRAM fill/copy DMA timing and the previously-unimplemented DMA busy bit in the VDP status register; this fixes the Mega CD JP Model 1 BIOS from freezing on the music player menu
    • The freeze occurred because if the main CPU doesn't pause during a long VRAM fill DMA, it will start blindly writing to word RAM before the sub CPU has switched it to 1M/1M mode, which causes a desync between the two CPUs. The other BIOS versions did not have this issue because the main CPU will not start writing to word RAM until it sees the mode bit set in $A12003
  • (Genesis / Sega CD) Added code to simulate the CPU delay that occurs when the CPU accesses the VDP data port while the VDP FIFO is full, which can happen if the CPU accesses VRAM/CRAM/VSRAM too rapidly during active display; this fixes graphical glitches in The Chaos Engine / Soldiers of Fortune, Double Clutch, and Sol-Deace
  • (Genesis / Sega CD) Implemented accurate cycle counting for the 68000 DIVS and DIVU instructions, which previously had hardcoded optimistic cycle counts; the previous counts were too low most of the time, but also way too high if the quotient overflowed a 16-bit result
  • (Genesis / Sega CD) Slightly improved performance by replacing the 68000 opcode decoding algorithm with a lookup table that is generated on first access