class GBA::CPU
- GBA::CPU
- Reference
- Object
Included Modules
Defined in:
crab/gba/cpu.crConstant Summary
-
CLOCK_SPEED =
2 ** 24
Constructors
Instance Method Summary
-
#adc(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
Add two values with carry
-
#add(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
Add two values
-
#asr(word : UInt32, bits : Int::Unsigned, immediate : Bool, carry_out : Pointer(Bool)) : UInt32
Arithmetic shift right
- #check_cond(cond : UInt32) : Bool
- #clear_pipeline : Nil
- #count_cycles : Int32
- #count_cycles=(count_cycles : Int32)
- #cpsr : PSR
- #fill_pipeline : Nil
- #halted : Bool
- #halted=(halted : Bool)
- #irq : Nil
-
#lsl(word : UInt32, bits : Int::Unsigned, carry_out : Pointer(Bool)) : UInt32
Logical shift left
-
#lsr(word : UInt32, bits : Int::Unsigned, immediate : Bool, carry_out : Pointer(Bool)) : UInt32
Logical shift right
- #lut : Slice(Proc(UInt32, Nil))
- #pipeline : GBA::Pipeline
- #print_state(instr : UInt32 | Nil = nil) : Nil
- #r : Slice(UInt32)
- #read_instr : UInt32
-
#ror(word : UInt32, bits : Int::Unsigned, immediate : Bool, carry_out : Pointer(Bool)) : UInt32
Rotate right
-
#sbc(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
Subtract two values with carry
- #set_neg_and_zero_flags(value : UInt32) : Nil
- #set_reg(reg : Int, value : UInt32) : UInt32
- #skip_bios : Nil
- #step_arm : Nil
- #step_thumb : Nil
-
#sub(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
Subtract two values
- #switch_mode(new_mode : Mode) : Nil
- #thumb_lut : Slice(Proc(UInt32, Nil))
- #tick : Nil
Instance methods inherited from module GBA::Waitloop
analyze_loop(start_addr : UInt32, end_addr : UInt32) : Nil
analyze_loop,
attempt_waitloop_detection : Bool
attempt_waitloop_detection,
attempt_waitloop_detection=(attempt_waitloop_detection : Bool)
attempt_waitloop_detection=,
build_lut : Slice(Instruction.class)
build_lut,
cache_waitloop_results : Bool
cache_waitloop_results,
cache_waitloop_results=(cache_waitloop_results : Bool)
cache_waitloop_results=,
waitloop_instr_lut : Slice(Instruction.class)
waitloop_instr_lut
Instance methods inherited from module GBA::THUMB
fill_thumb_lut
fill_thumb_lut,
thumb_add_offset_to_stack_pointer(instr : UInt32) : Nil
thumb_add_offset_to_stack_pointer,
thumb_add_subtract(instr : UInt32) : Nil
thumb_add_subtract,
thumb_alu_operations(instr : UInt32) : Nil
thumb_alu_operations,
thumb_conditional_branch(instr : UInt32) : Nil
thumb_conditional_branch,
thumb_execute(instr : UInt32) : Nil
thumb_execute,
thumb_high_reg_branch_exchange(instr : UInt32) : Nil
thumb_high_reg_branch_exchange,
thumb_load_address(instr : UInt32) : Nil
thumb_load_address,
thumb_load_store_halfword(instr : UInt32) : Nil
thumb_load_store_halfword,
thumb_load_store_immediate_offset(instr : UInt32) : Nil
thumb_load_store_immediate_offset,
thumb_load_store_register_offset(instr : UInt32) : Nil
thumb_load_store_register_offset,
thumb_load_store_sign_extended(instr : UInt32) : Nil
thumb_load_store_sign_extended,
thumb_long_branch_link(instr : UInt32) : Nil
thumb_long_branch_link,
thumb_move_compare_add_subtract(instr : UInt32) : Nil
thumb_move_compare_add_subtract,
thumb_move_shifted_register(instr : UInt32) : Nil
thumb_move_shifted_register,
thumb_multiple_load_store(instr : UInt32) : Nil
thumb_multiple_load_store,
thumb_pc_relative_load(instr : UInt32) : Nil
thumb_pc_relative_load,
thumb_push_pop_registers(instr : UInt32) : Nil
thumb_push_pop_registers,
thumb_software_interrupt(instr : UInt32) : Nil
thumb_software_interrupt,
thumb_sp_relative_load_store(instr : UInt32) : Nil
thumb_sp_relative_load_store,
thumb_unconditional_branch(instr : UInt32) : Nil
thumb_unconditional_branch,
thumb_unimplemented(instr : UInt32) : Nil
thumb_unimplemented
Instance methods inherited from module GBA::ARM
arm_block_data_transfer(instr : UInt32) : Nil
arm_block_data_transfer,
arm_branch(instr : UInt32) : Nil
arm_branch,
arm_branch_exchange(instr : UInt32) : Nil
arm_branch_exchange,
arm_data_processing(instr : UInt32) : Nil
arm_data_processing,
arm_execute(instr : UInt32) : Nil
arm_execute,
arm_halfword_data_transfer_immediate(instr : UInt32) : Nil
arm_halfword_data_transfer_immediate,
arm_halfword_data_transfer_register(instr : UInt32) : Nil
arm_halfword_data_transfer_register,
arm_multiply(instr : UInt32) : Nil
arm_multiply,
arm_multiply_long(instr : UInt32) : Nil
arm_multiply_long,
arm_psr_transfer(instr : UInt32) : Nil
arm_psr_transfer,
arm_single_data_swap(instr : UInt32) : Nil
arm_single_data_swap,
arm_single_data_transfer(instr : UInt32) : Nil
arm_single_data_transfer,
arm_software_interrupt(instr : UInt32) : Nil
arm_software_interrupt,
arm_unimplemented(instr : UInt32) : Nil
arm_unimplemented,
arm_unused(instr : UInt32) : Nil
arm_unused,
fill_lut : Slice(Proc(UInt32, Nil))
fill_lut,
immediate_offset(instr : UInt32, carry_out : Pointer(Bool)) : UInt32
immediate_offset,
rotate_register(instr : UInt32, carry_out : Pointer(Bool), allow_register_shifts : Bool) : UInt32
rotate_register
Constructor Detail
Instance Method Detail
def adc(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
#
Add two values with carry
def asr(word : UInt32, bits : Int::Unsigned, immediate : Bool, carry_out : Pointer(Bool)) : UInt32
#
Arithmetic shift right
def lsl(word : UInt32, bits : Int::Unsigned, carry_out : Pointer(Bool)) : UInt32
#
Logical shift left
def lsr(word : UInt32, bits : Int::Unsigned, immediate : Bool, carry_out : Pointer(Bool)) : UInt32
#
Logical shift right
def ror(word : UInt32, bits : Int::Unsigned, immediate : Bool, carry_out : Pointer(Bool)) : UInt32
#
Rotate right
def sbc(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
#
Subtract two values with carry
def sub(operand_1 : UInt32, operand_2 : UInt32, set_conditions : Bool) : UInt32
#
Subtract two values