Documentation ¶
Index ¶
- Constants
- Variables
- type BufferIO
- type Bus
- func (b *Bus) AddIO(name string, device DeviceInterface)
- func (b *Bus) AddMemory(name string, device DeviceInterface)
- func (b *Bus) GetIO(name string) DeviceInterface
- func (b *Bus) GetMemory(name string) DeviceInterface
- func (b *Bus) ReadIO(address uint16) byte
- func (b *Bus) ReadMemory(address uint16) byte
- func (b *Bus) WriteIO(address uint16, value byte)
- func (b *Bus) WriteMemory(address uint16, value byte)
- type Console
- type CpuPort
- type DeviceInterface
- type DeviceLatch
- type DeviceMemory
- type Register16
- func (r16 *Register16) Add(value byte)
- func (r16 *Register16) Dec()
- func (r16 Register16) Get() uint16
- func (r16 *Register16) Hi() byte
- func (r16 Register16) Inc()
- func (r16 *Register16) Lo() byte
- func (r16 Register16) Set(value uint16)
- func (r16 *Register16) SetHi(h byte)
- func (r16 *Register16) SetLo(l byte)
- type Z80
- func (z80 *Z80) Adc(value byte)
- func (z80 *Z80) Adc16(value uint16)
- func (z80 *Z80) Add(value byte)
- func (z80 *Z80) Add16(value1 Register16, value2 uint16)
- func (z80 *Z80) And(value byte)
- func (z80 *Z80) Call()
- func (z80 *Z80) Cp(value byte)
- func (z80 *Z80) Dec(ptrValue *byte)
- func (z80 *Z80) DoOpcode()
- func (z80 *Z80) GetPrtRegisterValByte(opcode byte) *byte
- func (z80 *Z80) GetRegisterValByte(opcode byte) byte
- func (z80 *Z80) Inc(ptrValue *byte)
- func (z80 *Z80) Interrupt()
- func (z80 *Z80) Jr()
- func (z80 *Z80) Load16() uint16
- func (z80 *Z80) Load8() byte
- func (z80 *Z80) LoadIndex8(reg *byte)
- func (z80 *Z80) LoadIndexR(register16 *Register16)
- func (z80 *Z80) LoadR(register16 *Register16)
- func (z80 *Z80) NonMaskableInterrupt()
- func (z80 *Z80) Or(value byte)
- func (z80 *Z80) Pop() uint16
- func (z80 *Z80) PopR(register16 *Register16)
- func (z80 *Z80) Push(value uint16)
- func (z80 *Z80) PushR(register16 Register16)
- func (z80 *Z80) Reset()
- func (z80 *Z80) Rst(value byte)
- func (z80 *Z80) Sbc(value byte)
- func (z80 *Z80) Sbc16(value uint16)
- func (z80 *Z80) StoreIndex8(reg byte)
- func (z80 *Z80) StoreIndexR(register16 Register16)
- func (z80 *Z80) Sub(value byte)
- func (z80 *Z80) Xor(value byte)
Constants ¶
View Source
const FLAG_3 = 0x08
View Source
const FLAG_5 = 0x20
View Source
const FLAG_C = 0x01
The flags
View Source
const FLAG_H = 0x10
View Source
const FLAG_N = 0x02
View Source
const FLAG_P = 0x04
View Source
const FLAG_S = 0x80
View Source
const FLAG_V = FLAG_P
View Source
const FLAG_Z = 0x40
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BufferIO ¶
type BufferIO struct {
// contains filtered or unexported fields
}
func NewBufferIO ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
func (*Bus) AddIO ¶
func (b *Bus) AddIO(name string, device DeviceInterface)
func (*Bus) AddMemory ¶
func (b *Bus) AddMemory(name string, device DeviceInterface)
func (*Bus) GetIO ¶
func (b *Bus) GetIO(name string) DeviceInterface
func (*Bus) GetMemory ¶
func (b *Bus) GetMemory(name string) DeviceInterface
func (*Bus) ReadMemory ¶
func (*Bus) WriteMemory ¶
type Console ¶
func NewConsole ¶
func NewConsole() Console
type DeviceInterface ¶
type DeviceLatch ¶
type DeviceLatch struct {
// contains filtered or unexported fields
}
func NewDeviceLatch ¶
func NewDeviceLatch(address uint16) *DeviceLatch
func (*DeviceLatch) Valid ¶
func (d *DeviceLatch) Valid(address uint16) bool
type DeviceMemory ¶
type DeviceMemory struct {
// contains filtered or unexported fields
}
func NewDeviceMemory ¶
func NewDeviceMemory(start, size uint16) *DeviceMemory
func (*DeviceMemory) Valid ¶
func (m *DeviceMemory) Valid(address uint16) bool
type Register16 ¶
type Register16 struct {
// contains filtered or unexported fields
}
func (*Register16) Add ¶
func (r16 *Register16) Add(value byte)
func (*Register16) Dec ¶
func (r16 *Register16) Dec()
func (Register16) Get ¶
func (r16 Register16) Get() uint16
func (*Register16) Hi ¶
func (r16 *Register16) Hi() byte
func (Register16) Inc ¶
func (r16 Register16) Inc()
func (*Register16) Lo ¶
func (r16 *Register16) Lo() byte
func (Register16) Set ¶
func (r16 Register16) Set(value uint16)
func (*Register16) SetHi ¶
func (r16 *Register16) SetHi(h byte)
func (*Register16) SetLo ¶
func (r16 *Register16) SetLo(l byte)
type Z80 ¶
type Z80 struct {
A, F, B, C, D, E, H, L byte
A_, F_, B_, C_, D_, E_, H_, L_ byte
IXH, IXL, IYH, IYL byte
I, IFF1, IFF2, IM byte
R7 byte // The highest bit (bit 7) of the R register
R uint16
AF, BC, DE, HL Register16
IX, IY Register16
AF_, BC_, DE_, HL_ Register16
Tstates uint16
Halted bool
// contains filtered or unexported fields
}
func (*Z80) Add16 ¶
func (z80 *Z80) Add16(value1 Register16, value2 uint16)
func (*Z80) DoOpcode ¶
func (z80 *Z80) DoOpcode()
Execute a single instruction at the program counter.
func (*Z80) GetPrtRegisterValByte ¶
func (*Z80) GetRegisterValByte ¶
func (*Z80) LoadIndex8 ¶
Carrega ponteiro de byte na posicao indexada pelo PC, PC+1
func (*Z80) LoadIndexR ¶
func (z80 *Z80) LoadIndexR(register16 *Register16)
Carrega conteudo apontado pelo PC, PC+1 no ponteido do Register16
func (*Z80) LoadR ¶
func (z80 *Z80) LoadR(register16 *Register16)
func (*Z80) NonMaskableInterrupt ¶
func (z80 *Z80) NonMaskableInterrupt()
Process a Z80 non-maskable interrupt.
func (*Z80) StoreIndex8 ¶
Armazena bute na posicao indexada pelo PC, PC+1
func (*Z80) StoreIndexR ¶
func (z80 *Z80) StoreIndexR(register16 Register16)
Armazena o conteudo do Register16 no endereco apontado por PC, PC+1
Click to show internal directories.
Click to hide internal directories.