Documentation ¶
Index ¶
- Constants
- Variables
- type GbcMMU
- func (mmu *GbcMMU) ConnectPeripheral(p components.Peripheral, startAddr, endAddr types.Word)
- func (mmu *GbcMMU) ConnectPeripheralOn(p components.Peripheral, addrs ...types.Word)
- func (mmu *GbcMMU) IsCartridgeColor() bool
- func (mmu *GbcMMU) LoadBIOS(data []byte) (bool, error)
- func (mmu *GbcMMU) LoadCartridge(cart *cartridge.Cartridge)
- func (mmu *GbcMMU) LoadCartridgeRam(savesDir string)
- func (mmu *GbcMMU) PrintPeripheralMap()
- func (mmu *GbcMMU) ReadByte(addr types.Word) byte
- func (mmu *GbcMMU) ReadByteFromRegister(addr types.Word) byte
- func (mmu *GbcMMU) ReadFromWorkingRAM(addr types.Word) byte
- func (mmu *GbcMMU) ReadWord(addr types.Word) types.Word
- func (mmu *GbcMMU) RequestInterrupt(interrupt byte)
- func (mmu *GbcMMU) Reset()
- func (mmu *GbcMMU) SaveCartridgeRam(savesDir string)
- func (mmu *GbcMMU) SetInBootMode(mode bool)
- func (mmu *GbcMMU) WriteByte(addr types.Word, value byte)
- func (mmu *GbcMMU) WriteByteToRegister(addr types.Word, value byte)
- func (mmu *GbcMMU) WriteToWorkingRAM(addr types.Word, value byte)
- func (mmu *GbcMMU) WriteWord(addr types.Word, value types.Word)
- type HDMATransfer
- type MemoryMappedUnit
Constants ¶
View Source
const ( DMG_STATUS_REG types.Word = 0xFF50 CGB_INFRARED_PORT_REG types.Word = 0xFF56 CGB_WRAM_BANK_SELECT types.Word = 0xFF70 CGB_DOUBLE_SPEED_PREP_REG types.Word = 0xFF4D CGB_HDMA_SOURCE_HIGH_REG types.Word = 0xFF51 CGB_HDMA_SOURCE_LOW_REG types.Word = 0xFF52 CGB_HDMA_DEST_HIGH_REG types.Word = 0xFF53 CGB_HDMA_DEST_LOW_REG types.Word = 0xFF54 CGB_HDMA_REG types.Word = 0xFF55 )
View Source
const PREFIX = "MMU"
View Source
const ZERO byte = 0
Variables ¶
View Source
var ROMIsBiggerThanRegion error = errors.New("ROM is bigger than addressable region")
Functions ¶
This section is empty.
Types ¶
type GbcMMU ¶
type GbcMMU struct { DMARegister byte RunningColorGBHardware bool // contains filtered or unexported fields }
func (*GbcMMU) ConnectPeripheral ¶
func (mmu *GbcMMU) ConnectPeripheral(p components.Peripheral, startAddr, endAddr types.Word)
func (*GbcMMU) ConnectPeripheralOn ¶
func (mmu *GbcMMU) ConnectPeripheralOn(p components.Peripheral, addrs ...types.Word)
Helper method for connecting peripherals that don't look at contiguous chunks of memory
func (*GbcMMU) IsCartridgeColor ¶
func (*GbcMMU) LoadCartridge ¶
func (*GbcMMU) LoadCartridgeRam ¶
func (*GbcMMU) PrintPeripheralMap ¶
func (mmu *GbcMMU) PrintPeripheralMap()
func (*GbcMMU) ReadByteFromRegister ¶
This area deals with registers (some only applicable to CGB hardware)
func (*GbcMMU) RequestInterrupt ¶
USE SHARED CONSTANTS FOR FLAGS AND STUFF TOO - for reuse in the CPU
func (*GbcMMU) SaveCartridgeRam ¶
func (*GbcMMU) SetInBootMode ¶
When the MMU is in boot mode, the area below 0x0100 is reserved for the BIOS
func (*GbcMMU) WriteByteToRegister ¶
This area deals with registers (some only applicable to CGB hardware)
func (*GbcMMU) WriteToWorkingRAM ¶
type HDMATransfer ¶
type MemoryMappedUnit ¶
type MemoryMappedUnit interface { WriteByte(address types.Word, value byte) WriteWord(address types.Word, value types.Word) ReadByte(address types.Word) byte ReadWord(address types.Word) types.Word SetInBootMode(mode bool) LoadBIOS(data []byte) (bool, error) LoadCartridge(cart *cartridge.Cartridge) Reset() }
Click to show internal directories.
Click to hide internal directories.