KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Device Access

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.
 

Detailed Description

MIE board identification, EEPROM, and firmware init

Function Documentation

◆ mie_eeprom_crc16()

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.

Parameters
bufData to checksum.
sizeLength in bytes.
Returns
CRC-16 value.
See also
mie_eeprom_fix_crc

◆ mie_eeprom_fix_crc()

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–17) and the game-settings block (bytes 36–43).

Parameters
eepromBuffer to update (MIE_EEPROM_SIZE bytes).
See also
mie_eeprom_crc16, mie_get_eeprom, mie_set_eeprom

◆ mie_get_eeprom()

bool mie_get_eeprom ( void * dst)

Read the MIE on-board EEPROM.

Performs a synchronous EEPROM fetch over the MIE IO protocol.

Parameters
dstDestination buffer (MIE_EEPROM_SIZE bytes).
Return values
trueRead succeeded.
falseInvalid buffer or I/O failed.
See also
MIE_EEPROM_SIZE, mie_set_eeprom

◆ mie_get_id()

char * mie_get_id ( char * dst)

Read the MIE board identifier string.

Sends the MIE GET ID command and copies the response into dst.

Parameters
dstDestination buffer (MIE_ID_SIZE bytes).
Returns
dst on success, NULL on failure.
See also
MIE_ID_SIZE

◆ mie_init_fw()

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.

Parameters
fw_pathPath to mie_z80.bin firmware image.
Return values
trueZ80/JVS initialization succeeded.
falseInvalid path, not NAOMI hardware, or init failed.
See also
mie_init_scan

◆ mie_set_eeprom()

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.

Parameters
eepromSource buffer (MIE_EEPROM_SIZE bytes).
Return values
trueWrite succeeded.
falseInvalid buffer or I/O failed.
See also
MIE_EEPROM_SIZE, mie_get_eeprom