# SPDX-License-Identifier: MIT """The backup RAM cartridge's place in the slot, without its memory. A RAM cartridge leaves /CART high, so the console boots the CD and the cartridge sits at $400000-$7FFFFF (hardware manual p.5, "Back-up cartridge", in mode 2; DOC). Its register layout and its memory's place in that range are in no document this repository holds (sockets.md 1: "to be sourced"), so this board does not model them: the cartridge is present to the decode and reads $FF everywhere, which mcd-verificator's RAM CART row reports as "not present OK". Writes are dropped. HYPOTHESIS, provisional: a source for the layout (a manual page or a hardware log) is owed before the memory is built. """ from __future__ import annotations class RAMCartridge: grounds_cart = False #: No ROM: megadrive-python's save-state header names the slot's cartridge by its #: image's SHA-1 (``state.rom_sha1``), and this one has none. image = b"" def read_word(self, address: int) -> int: return 0xFFFF def read_byte(self, address: int) -> int: return 0xFF def write_word(self, address: int, value: int) -> None: pass def write_byte(self, address: int, value: int) -> None: pass def read_time(self, address: int) -> int | None: return None def write_time(self, address: int, value: int) -> None: pass __all__ = ["RAMCartridge"]