Does the VDP implement Fill Mode DMA targetting VSRAM?
Regen implements it (I can write garbage bytes to it, and a DMA Fill clears it properly) but I believe this may be in error.
My game works on real hardware but every 50th boot or so the vertical scroll data is messed up. I ignored the bug and put it on the backlist until recently I tried the 'mega' emulator (https://github.com/SavourySnaX/mega) which errors if DMA Fill is used on VSRAM, and reminded me to chase this up. I work with the emulator's author and he can't remember.
Is it a real thing or not?
VSRAM Fill Mode DMA
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
VSRAM Fill Mode DMA
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk
Re: VSRAM Fill Mode DMA
Huuuuuh honestly I never tested it (and I don't think it ever was), but if it does work, then I think it should be working on words, not bytes (this may mess up the parameters you're using).
Sik is pronounced as "seek", not as "sick".
Re: VSRAM Fill Mode DMA
Yes, you can do a DMA fill to VSRAM, but it doesn't behave the way you might expect. There's a lot of information in the following post, including enough info to understand how to reliably do a DMA fill operation to CRAM or VSRAM:
viewtopic.php?p=21016#p21016
If you need more info, trace back from here a few posts to follow the conversation. You'll see I posted my "VDP FIFO" test ROM in this thread, which contains working examples of DMA fill to VSRAM. You can also check the sourcecode of Exodus, which implements DMA fills based on all these findings, and passes the test cases in the VDP FIFO test ROM. Note that most emulators get areas of DMA behaviour like this wrong, which you can test by running that ROM and comparing with the results from Exodus or the real hardware.
viewtopic.php?p=21016#p21016
If you need more info, trace back from here a few posts to follow the conversation. You'll see I posted my "VDP FIFO" test ROM in this thread, which contains working examples of DMA fill to VSRAM. You can also check the sourcecode of Exodus, which implements DMA fills based on all these findings, and passes the test cases in the VDP FIFO test ROM. Note that most emulators get areas of DMA behaviour like this wrong, which you can test by running that ROM and comparing with the results from Exodus or the real hardware.
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
Re: VSRAM Fill Mode DMA
Excellent stuff, thank you! I'll follow that thread and see if there's a subtlety I'm missing that might make it mess up after a few resets. It *mostly* works - I can verify by making a deliberate mess of VSRAM and using DMA fill to clear it - so this is definitely something I need to implement in the Mega emulator.
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk