Memory Interface

From Archaic Pixels
Jump to: navigation, search

Memory Map Interface

The HuC6280 can address 21 bits (2 MB) of physical memory. However, the instruction set does not provide a direct 21 bit interface. Instead the HuC6280 splits the memory map into 256 pages (memory segments), 8 KB (0x2000 bytes) each. To select which page to access, there are eight MPRs (Mapped Page Registers) within the HuC6280 and each one holds an 8 bit value (0 to 255). Each is an index into the 256 page memory map. Therefore, when an address is given to a HuC6280 instruction, the highest three bits are an index to select a MPR while the lower 13 bits specify the address within that page.

Instructions TAM0 though TAM7 (Transfer Accumulator to MPRs) are used to copy the value stored in the Accumulator into selected MPRs.
Instructions TMA0 though TMA7 (Transfer MPR to Accumulator) are used to copy the value stored in a MPR into the Accumulator.