It is currently Wed Oct 18, 2017 4:27 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Jul 09, 2014 10:59 am 
Offline

Joined: Fri Oct 26, 2012 5:27 pm
Posts: 76
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?


Top
 Profile  
 
PostPosted: Wed Jul 09, 2014 11:06 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5712
Location: Canada
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 66 times
Top
 Profile  
 
PostPosted: Wed Jul 09, 2014 11:06 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2961
Location: Tampere, Finland
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: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Wed Jul 09, 2014 11:15 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5712
Location: Canada
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).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: FrankenGraphics, Google Adsense [Bot], Sour and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group