goapple2/cards/cards.go
2013-04-07 18:31:14 -07:00

20 lines
852 B
Go

package cards
type Card interface {
String() string // The name of the card, for debug/display purposes
Read16(address byte) byte // Read from the $C0(8+slot)X addresses
Write16(address byte, value byte) // Write to the $C0(8+slot)X addresses
Slot() byte // Get the card's slot 0-7
ROMDisabled() // Tell the card that its handling of $C(8-F)xx was disabled
Read256(address byte) byte // Read from the $C(slot)XX addresses
Write256(address byte, value byte) // Write to the $C(slot)XX addresses
Read(address uint16) byte // Read from any address ($C800-$FFFF)
Write(address uint16, value byte) // Write to any address ($C800-$FFFF)
}
type CardManager interface {
HandleROM(onOff bool, slot byte)
Handle12k(onOff bool, slot byte)
EmptyRead() byte
}