|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
MIE board identification, EEPROM, and firmware init More...
Functions | |
| char * | mie_get_id (char *dst) |
| Read the MIE board identifier string. | |
| bool | mie_get_eeprom (void *dst) |
| Read the MIE on-board EEPROM. | |
| bool | mie_set_eeprom (uint8_t *eeprom) |
| Write the MIE on-board EEPROM. | |
| uint16_t | mie_eeprom_crc16 (const uint8_t *buf, size_t size) |
| Compute Sega NAOMI EEPROM CRC-16. | |
| void | mie_eeprom_fix_crc (uint8_t *eeprom) |
| Recompute NAOMI EEPROM CRC fields in a 128-byte buffer. | |
| bool | mie_init_fw (const char *fw_path) |
| Initialize MIE/JVS, uploading Z80 firmware when needed. | |
MIE board identification, EEPROM, and firmware init
| uint16_t mie_eeprom_crc16 | ( | const uint8_t * | buf, |
| size_t | size ) |
Compute Sega NAOMI EEPROM CRC-16.
CRC-16-CCITT variant with seed 0xDEBDEB00 and an extra round over a trailing 0x00 byte. Used by MIE EEPROM and NAOMI backup SRAM bookkeeping blocks.
| buf | Data to checksum. |
| size | Length in bytes. |
| void mie_eeprom_fix_crc | ( | uint8_t * | eeprom | ) |
Recompute NAOMI EEPROM CRC fields in a 128-byte buffer.
Updates the duplicated CRC16 headers for the system-settings block (bytes 0– and the game-settings block (bytes 17)36–.43)
| eeprom | Buffer to update (MIE_EEPROM_SIZE bytes). |
| bool mie_get_eeprom | ( | void * | dst | ) |
Read the MIE on-board EEPROM.
Performs a synchronous EEPROM fetch over the MIE IO protocol.
| dst | Destination buffer (MIE_EEPROM_SIZE bytes). |
| true | Read succeeded. |
| false | Invalid buffer or I/O failed. |
| char * mie_get_id | ( | char * | dst | ) |
Read the MIE board identifier string.
Sends the MIE GET ID command and copies the response into dst.
| dst | Destination buffer (MIE_ID_SIZE bytes). |
dst on success, NULL on failure.| bool mie_init_fw | ( | const char * | fw_path | ) |
Initialize MIE/JVS, uploading Z80 firmware when needed.
Registers the driver if needed, probes whether the Z80 bridge is already active (for example after the original NAOMI BIOS or DreamShell), and uploads fw_path when JVS communication is not yet available.
Intended for early boot on NAOMI hardware before the normal Maple scan completes JVS setup. Returns false on retail Dreamcast.
| fw_path | Path to mie_z80.bin firmware image. |
| true | Z80/JVS initialization succeeded. |
| false | Invalid path, not NAOMI hardware, or init failed. |
| bool mie_set_eeprom | ( | uint8_t * | eeprom | ) |
Write the MIE on-board EEPROM.
Performs a synchronous EEPROM write over the MIE IO protocol. Data is written in 16-byte chunks with pacing between transfers.
| eeprom | Source buffer (MIE_EEPROM_SIZE bytes). |
| true | Write succeeded. |
| false | Invalid buffer or I/O failed. |