nesdev.com
https://forums.nesdev.com/

VRC6 Test Rom and hot swapping carts
https://forums.nesdev.com/viewtopic.php?f=2&t=11412
Page 1 of 1

Author:  natt [ Wed Jul 09, 2014 10:59 am ]
Post subject:  VRC6 Test Rom and hot swapping carts

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?

Author:  rainwarrior [ Wed Jul 09, 2014 11:06 am ]
Post subject:  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 85 times

Author:  thefox [ Wed Jul 09, 2014 11:06 am ]
Post subject:  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.

Author:  rainwarrior [ Wed Jul 09, 2014 11:15 am ]
Post subject:  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:
Code:
swap_loop:
@wait_nmi:
   LDA #$02
   STA $4014
   STA $4014
   BIT $2002
   BPL @wait_nmi
   JSR swap_play
   JMP swap_loop

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).

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/