Skip to main content

Module eeprom

Module eeprom 

Source
Available on gb_pak_tilt and crate feature pak only.
Expand description

MBC7’s save storage: 128 words on a serial EEPROM.

MBC7 carries no SRAM. In its place is a 93LC56 chip reached one bit at a time through a single port, so this is a driver rather than a window: there is nothing to map and no sram scope to open.

Words are 16 bits and addressed 0 to 127, giving 256 bytes. A write is slow: the command goes out one bit at a time and the chip then takes time of its own, so write a save in one pass rather than a field at a time.

The chip starts locked. unlock allows writes and lock refuses them again.

Constants§

WORDS
Words the chip holds.

Functions§

lock
Refuse writes again.
read
Read one word.
unlock
Allow writes.
write
Write one word. Does nothing until unlock.