From NeoGeo Development Wiki
Jump to navigation
Jump to search
MVS boot process
- Interrupts are disabled and acknowledged, watchdog is kicked, $4000 in REG_LSPCMODE (Autoanim speed = 64 frames)
- Puts $FF on all 3 LED latches (uses NOP waits)
- Use BIOS vector table and onboard FIX/M1 ROM, write byte to $380065 and $380067 (?)
- Checks the 64KiB of work RAM by filling with $5555 and reading back, filling with $AAAA and reading back, filling with increment and reading back.
- If all dipswitches are down, check backup RAM like before
- If not, check if "BACKUP RAM OK !",$80 is at $D00010
- If string isn't there:
- Go for full check
- Init backup RAM by filling the 64KiB with zeroes backwards ($D0FFFF to $D00000)
- Copy "BACKUP RAM OK !",$80 string
- Write 01 01 01 02 01 01 01 03 00 00 30 3B 00 (13 bytes) to $D0003A
- Write $23(35) to $D00122
- Write 8 times $0000FFFF from $D00124
- Write $F0F0F0F0 to $D001AC
- Write $FFFF to $D001B0
- Reprotect backup RAM
- Checks the 2*8KiB of palette RAM, bank 0 and 1
- Checks the low VRAM ($0000~$7FFF) and high VRAM ($8000~$85FF) with the same $5555/$AAAA/inc method
- Does continuous RAM and backup RAM check if all dipswitches are down ?
- Tells the RTC to output a 1s period pulse, time is measured in frames using the Vblank interrupt between two falling edges, if less than 57 or more than 64 frames: Calendar error. Warning: code can get stuck in a loop if RTC pulse line is cut ?
- Weird check on the Vblank handler pointer in the bios itself, never changes ?
- Computes 16bit bios checksum by adding together 128 bytes from $000000 (vector table) and all the ones from $C00082 to $C1FFFF. The value is then compared against the one at $C00080, if it's different: "SYSTEM ROM ERROR"