SNES Development
Programming with FastROM

So far all of our programs have been using a SlowROM model. However, ROM access can be increased from 2.56Mhz to 3.58Mhz. There is more to it than just telling the SNES to run faster though.

There are several steps involved in getting your rom to work correctly with FastROM enabled. I’ve only done this in a LoROM model so this is what I’m going to teach for now. We’ll cover HiROM some other time.

  1. Set bit 0 of $420d
  2. Set Programming and Data banks to $80

It’s pretty simple. In the SNES, rom bank $80 onwards is a mirror of $00 onwards (w/ some exceptions). You just have to set the bank to $80 on Reset and on every interrupt since they automatically use bank $00. There are 2 steps to this:

  1. Do a long jump to the next instruction with the bank = $80
  2. Push the program bank onto the stack and pull it into the data bank

In WLA DX, the .BASE directive is used to set the value that used as the bank when doing Long Jumps to Labels. We’ll set it to $80 and do a long jump. Here’s an example for doing it in the NMI routine:

; Somewhere in the source
    .base $80

; NMI routine
    jml FastVBlank
    rep #$30	
    lda $4210       ; Clear NMI flag

That’s it! Do it for all of the vectors/interrupts and you’ll be running faster!

Tutorial by bazz