Configuration cartridge

(Pointed out by ElBarto)

MVS boards are able to auto-configure theirselves by detecting and communicating with a special cartridge holding its own uPD4990 RTC chip, which may have been used during production to avoid tedious manual configuration through the regular MVS settings menu. Some Neo Print cartridges are also known to have an embedded RTC.

The MVS System ROM (SP-E at least), checks for the "NEO-CLN" string in the 68k program header in place of the usual "NEO-GEO" and makes various read/writes to the cartridge in the $200000~$2FFFFF range.

$280051 is used for writes:

Writes are 4 bits and sent serialy LSB first. STB is strobed when the 4 bits are written.

Bit 7 of $220001 is used for reads. Each new bit is clocked in using CLK.

Reading sequence

 * Send 3, wait (uPD4990 "Time Read")
 * Send 1 (uPD4990 "Register Shift")
 * Read and set BIOS_SECOND
 * Read and set BIOS_MINUTE
 * Read and set BIOS_HOUR
 * Read and set BIOS_DAY
 * Read and set BIOS_WEEKDAY, convert to BCD and set BIOS_MONTH
 * Read and set BIOS_YEAR
 * Read 4 bits
 * Copy RAM data to the board's uPD4990.

This sequence also matches the uPD4990's 52bit shift register format.

(What is that N,$00,O,$00,G,$00,O,$00 check after "NEO-CLN" ? 8bit bus ?)