easier68k.simulator package¶
Submodules¶
easier68k.simulator.clock module¶
Used by m68k to handle stepping through actions
easier68k.simulator.m68k module¶
Motorola 68k chip definition
-
class
easier68k.simulator.m68k.
M68K
[source]¶ Constructor
-
get_condition_status_code
(code: easier68k.core.enum.condition_status_code.ConditionStatusCode) → bool[source]¶ Gets the status of a code from the Condition Code Register :param code: :return:
-
get_program_counter_value
() → int[source]¶ Gets the 32-bit unsigned integer value for the program counter value :return:
-
get_register
(register: easier68k.core.enum.register.Register) → easier68k.core.models.memory_value.MemoryValue[source]¶ Gets the entire value of a register :param register: :return:
-
increment_program_counter
(inc: int)[source]¶ Increments the program counter by the given value :param inc: :return:
-
load_list_file
(list_file: easier68k.core.models.list_file.ListFile)[source]¶ Load List File
load the contents of a list file into memory using the locations specified inside of the list file :param list_file: :return:
-
load_memory
(file: BinaryIO)[source]¶ saves the raw memory into the designated file NOTE: file must be opened as binary or this won’t work
-
reload_execution
()[source]¶ restarts execution of the program up to the current program counter location :return:
-
save_memory
(file: BinaryIO)[source]¶ Loads the raw memory from the designated file This includes programs NOTE: file must be opened as binary or this won’t work
-
set_address_register_value
(reg: easier68k.core.enum.register.Register, new_value: easier68k.core.models.memory_value.MemoryValue)[source]¶ Sets the value of an address register, so the PC or A0-A7 :param reg: :param new_value: :return:
-
set_ccr_reg
(extend, negative, zero, overflow, carry)[source]¶ Accepts Boolean values for X,N,Z,V, and C, respectively and sets the CCR accordingly. Passing None in for any argument will cause it to ignore that bit. Returns nothing. :param extend: :param negative: :param zero: :param overflow: :param carry: :return:
-
set_condition_status_code
(code: easier68k.core.enum.condition_status_code.ConditionStatusCode, value: bool)[source]¶ Sets the status of a code from the Condition Code Register to value :param code: :return:
-
set_program_counter_value
(new_value: int)[source]¶ Sets the value of the program counter Must be a non negative integer that is less than the maximum location size :param new_value: :return:
-
easier68k.simulator.memory module¶
Represents all of the memory for the 68k This should be able to be serialized/deserialized and accessed completely
-
class
easier68k.simulator.memory.
Memory
[source]¶ Constructor
-
get
(size: easier68k.core.enum.op_size.OpSize, location: int) → easier68k.core.models.memory_value.MemoryValue[source]¶ gets the memory at the given location index of size
-
load_list_file
(list_file: easier68k.core.models.list_file.ListFile)[source]¶ Load List File
load the contents of a list file into memory using the locations specified inside of the list file starting location, registers, etc… (anything which is not data) is ignored :param list_file: :return:
-
load_memory
(file: BinaryIO)[source]¶ Loads the raw memory from the designated file This includes programs NOTE: file must be opened as binary or this won’t work
-