Initializing the SNES takes LOTS OF CODE. Now, resources for Snes are hard to
come by, so I forced myself to dive into Neviksti and Marc's initialization
files. Now, believe me, it's a lot to deal with, so what I'll do is try to
provide you with some important things that Neviksti's InitSNES file does.
You could also take your own peak into his file, but if your the lazy coder,
don't think it will be a quick & easy glimpse.
-----------------------------
Notes on Macro InitSNES
-----------------------------
- The macro disables interrupts and switches to native mode right when it
is called.
- It turns off decimal mode.
- It loads #$1FFF (from bank 0) into the stack pointer register, which
is the top of the SNES' scratchpad RAM.
- It sets the data bank = program bank before and after initialization
- Sets Direct Page to $0000 (bank 0)
- Sets Snes to Normal Access time. (writes a 0 to $420D)
Notes: You can use fast mode without worry on an emulator.
Using fast mode on a real snes requires your flash to be
120 ns or faster.
- Enables interrupts before finishing.