libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
Internal EEPROM

Functions

void ws_ieep_read_owner_name (uint8_t *data)
 Read the owner name, as raw data.
void ws_ieep_read_owner_name_ascii (char *str)
 Read the owner name, as an ASCII string.
uint16_t ws_ieep_name_color_to_rgb (uint8_t value)
 Convert a given name color to its RGB value.
static void ws_ieep_set_protect (void)
 Protect the non-cartridge area of the internal EEPROM.
static bool ws_ieep_is_protected (void)
 Check if the non-cartridge area of the internal EEPROM is currently protected.

Detailed Description

Function Documentation

◆ ws_ieep_is_protected()

bool ws_ieep_is_protected ( void )
inlinestatic

Check if the non-cartridge area of the internal EEPROM is currently protected.

Definition at line 264 of file eeprom.h.

◆ ws_ieep_name_color_to_rgb()

uint16_t ws_ieep_name_color_to_rgb ( uint8_t value)

Convert a given name color to its RGB value.

Parameters
valueThe given name color.
Returns
uint16_t A 12-bit RGB value.

◆ ws_ieep_read_owner_name()

void ws_ieep_read_owner_name ( uint8_t * data)

Read the owner name, as raw data.

Parameters
dataTarget data area - must be at least 16 bytes.

◆ ws_ieep_read_owner_name_ascii()

void ws_ieep_read_owner_name_ascii ( char * str)

Read the owner name, as an ASCII string.

Parameters
strTarget string area - must be at least 17 bytes.

◆ ws_ieep_set_protect()

void ws_ieep_set_protect ( void )
inlinestatic

Protect the non-cartridge area of the internal EEPROM.

By default, the WonderSwan boot ROM protects the non-cartridge area of the internal EEPROM - addresses 0x60 and above - on boot. By setting a bit in the cartridge's header (–unlock-ieep in swanlink), the non-cartridge area remains writable. In this case, this function can be used to make the area read-only again.

Definition at line 257 of file eeprom.h.