class

GB::CPU

Inherits Reference < Object

Constants

CLOCK_SPEED = 4194304

Constructors

new(gb : GB)
Source

Instance methods

a=(value : UInt8) : UInt8
Source
af=(value : UInt16) : UInt16
Source
af=(value : UInt8) : UInt16
Source
b=(value : UInt8) : UInt8
Source
bc=(value : UInt16) : UInt16
Source
bc=(value : UInt8) : UInt16
Source
c=(value : UInt8) : UInt8
Source
d=(value : UInt8) : UInt8
Source
de=(value : UInt16) : UInt16
Source
de=(value : UInt8) : UInt16
Source
e=(value : UInt8) : UInt8
Source
f=(value : UInt8) : UInt8
Source
f_c=(on : Int | Bool)
Source
f_h=(on : Int | Bool)
Source
f_n=(on : Int | Bool)
Source
f_nc
Source
f_nh
Source
f_nn
Source
f_nz
Source
f_z=(on : Int | Bool)
Source
h=(value : UInt8) : UInt8
Source
halt

Handle regular and obscure halting behavior

Source
handle_interrupts

service all interrupts

Source
hl=(value : UInt16) : UInt16
Source
hl=(value : UInt8) : UInt16
Source
ime=(ime : Bool)
Source
inc_pc

Increment PC unless the halt bug should cause it to fail to increment

Source
l=(value : UInt8) : UInt8
Source
memory
Source
memory=(memory : Memory)
Source
memory_at_hl
Source
memory_at_hl=(val : UInt8) : Nil
Source
pc=(pc : UInt16)
Source
scheduler
Source
scheduler=(scheduler : Scheduler)
Source
skip_boot
Source
sp=(sp : UInt16)
Source
tick

Runs for the specified number of machine cycles. If no argument provided, runs only one instruction. Handles interrupts after the instruction is executed.

Source

Macros

flag(name, mask)
Source
register(upper, lower, mask = nil)
Source