A while back, I added (what is believed to be) fully correct VRC6 support to Bizhawk, including the special PPU mapping modes. I also created a test ROM to verify that my behavior was correct, and asked for people to run the test rom. I had someone run the test rom on an everdrive, which showed that an everdrive makes no attempt to implement the special mapping modes, and so was inconclusive overall. However, no one ran the test on a real VRC6 chip. I still want to get results, so I'd like to adapt the VRC6 test ROM that I made to be able to run as hotswap: it would be loaded on a programmable cart, and then booted, and then the cart would be swapped for a real VRC6 cart, which would then run the test.
I know that in order to be hotswappable, I need to put all code in internal RAM, and then consequently execute the test program without using any interrupts (since none of those vectors are under my control). Is there anything else I need to watch out for?
VRC6 Test Rom and hot swapping carts
Moderator: Moderators
- rainwarrior
- Posts: 8759
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC6 Test Rom and hot swapping carts
Here's a VRC6 audio test hotswap program and source, if it helps. I wrote it a while back to test some of the audio features.
- Attachments
-
- vrc6_swap_test.zip
- (4.35 KiB) Downloaded 317 times
Re: VRC6 Test Rom and hot swapping carts
While waiting for hotswap you can run OAM DMA to minimize the chance of crashes (you should be able to find a post or two on the forums by blargg suggesting this). It's also a good idea to somehow indicate that the code is still running, for example by switching the monochrome bit of PPU in a loop.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
- rainwarrior
- Posts: 8759
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC6 Test Rom and hot swapping carts
I tried the OAM DMA as a wait later on when Blargg suggested it to me. If you want to try it, replace the "swap_loop" segment of the program I posted with this:
In my own experience, I didn't find it helped. I didn't notice an increased or decreased frequency of crash during the swap. Doesn't really matter though; just try again a few times and it should work sooner or later.
My indicator that stuff was still running was a short audio buzz via $4011 at the beginning and then again after the delay where I was supposed to swap the cartridge (and again as the process loops after completion).
Code: Select all
swap_loop:
@wait_nmi:
LDA #$02
STA $4014
STA $4014
BIT $2002
BPL @wait_nmi
JSR swap_play
JMP swap_loop
My indicator that stuff was still running was a short audio buzz via $4011 at the beginning and then again after the delay where I was supposed to swap the cartridge (and again as the process loops after completion).