From NeoGeo Development Wiki
Jump to navigation
Jump to search
MVS boot process (SP-E)
- 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"
- Memory card name is requested with CARD function, if error code $81 (inserted but not formatted), do full check with $55, $AA then 16bit inc.
- $D0005E=$FFFF,$D00060,$D00048,$D00020=$0000, 16 bytes are cleared from $D00024 upwards
- Reads the time from RTC and sets $D0005A.b to the hour
- Reads date from RTC and compares year/month/day with $D00104.b, if difference:
- $10F300 = $D00105, $D00104.l = $10FDD2, $D00122.b inc'd up to $24 in a loop with other stuff
- ...