don't click here

Need testers for Gens and Gens/GS ROM compatibility

Discussion in 'Technical Discussion' started by GerbilSoft, Apr 16, 2015.

  1. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    I haven't posted here in a few weeks, so here's a short update.

    Major blockers for Tech Preview 1:
    • Fix DMA regression in "The Adventures of Batman and Robin".
    • Implement Pico tablet emulation.
    • Implement onscreen FPS counter.
    • Add unit tests for shadow/highlight implementation.
    Planned features for Tech Preview 2: (SMS/GG only build)
    • Switch to libarchive for compressed file handling.
    • Switch to CZ80, a much better Z80 emulator (and it's written in C so it's portable).
    • Start implementing support for Sega Master System and Game Gear. (VDP Mode 4, Z80 memory and I/O map.)
    • Rewrite the PSG to be cycle-accurate, and use Blip_Buffer for anti-aliasing.
    • Rewrite the VDP to be more accurate. (Fetch tile data based on the current cycle number using VRAM timing diagrams available on SMS Power.) SMS mode doesn't have DMA, so this is why I'm going to rewrite it for SMS instead of starting the rewrite for MD. It'll eventually be extended to MD, at which point the old MD code will be removed.
    Other planned features for later:
    • New MDP host services library, libmdphost. This will handle a bunch of the repetitive MDP host services, e.g. 8-bit/16-bit/32-bit block read/write, so I can write them once and anyone can use them in any emulator.
    • Port the new emulation loop to the Qt UI.
    • Reimplement MDP, and add some features necessary for a few plugins in MDP 1.1. (Among other things, HBlank and VBlank handlers in addition to "frame finished".)
    • Switch the 68000 emulator to Musashi. Musashi is used by Regen and Genesis Plus GX, among others. Some features supported by Musashi not supported by the current emulator include Address Error and proper prefetch emulation.
    EDIT: I can't seem to find the Mode 4 timing diagram on SMS Power. I'm pretty sure there was one somewhere. Does anyone know where it is? SMS Power does have a TMS9918 diagram, though some parts seem inconsistent (compare the individual sprite accesses to the combined sprite accesses): http://www.smspower.org/Development/TMS9918MasterTimingDiagram
     
  2. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    So I was reading through the old genvdp.txt document, and found a note that "The Adventures of Batman & Robin" writes past CRAM address 0x80 (using DMA), and the emulator needs to ignore this in order for the game to work. This contradicts VDPFIFOTesting, but interestingly enough, ignoring those writes fixes the game. I suspect the real problem is DMA timing in general, so the whole thing needs to be reworked in order to really fix it. For now, I simply applied a hack to ignore CRAM writes over 0x80.

    Now, wouldn't it be nice if I finished up the rest of the stuff and had Tech Preview 1 out for Sonic 2sday? :)/>