Contants¶
Various functions in bare68k
require a constant value. All the
constants are found in the bare68k.consts
module.
CPU Types¶
-
bare68k.consts.
M68K_CPU_TYPE_INVALID
= 0¶ invalid CPU type.
-
bare68k.consts.
M68K_CPU_TYPE_68000
= 1¶ Motorola 68000 CPU
-
bare68k.consts.
M68K_CPU_TYPE_68010
= 2¶ Motorola 68010 CPU
-
bare68k.consts.
M68K_CPU_TYPE_68EC020
= 3¶ Motorola 68EC20 CPU
-
bare68k.consts.
M68K_CPU_TYPE_68020
= 4¶ Motorola 68020 CPU
-
bare68k.consts.
M68K_CPU_TYPE_68030
= 5¶ Motorola 68030 CPU
Note
Supported by disassembler ONLY
-
bare68k.consts.
M68K_CPU_TYPE_68040
= 6¶ Motorola 68040 CPU
Note
Supported by disassembler ONLY
CPU Registers¶
Data Registers¶
-
bare68k.consts.
M68K_REG_D0
= 0¶ Data Register D0
-
bare68k.consts.
M68K_REG_D1
= 1¶ Data Register D1
-
bare68k.consts.
M68K_REG_D2
= 2¶ Data Register D2
-
bare68k.consts.
M68K_REG_D3
= 3¶ Data Register D3
-
bare68k.consts.
M68K_REG_D4
= 4¶ Data Register D4
-
bare68k.consts.
M68K_REG_D5
= 5¶ Data Register D5
-
bare68k.consts.
M68K_REG_D6
= 6¶ Data Register D6
-
bare68k.consts.
M68K_REG_D7
= 7¶ Data Register D7
Address Registers¶
-
bare68k.consts.
M68K_REG_A0
= 8¶ Address Register A0
-
bare68k.consts.
M68K_REG_A1
= 9¶ Address Register A1
-
bare68k.consts.
M68K_REG_A2
= 10¶ Address Register A2
-
bare68k.consts.
M68K_REG_A3
= 11¶ Address Register A3
-
bare68k.consts.
M68K_REG_A4
= 12¶ Address Register A4
-
bare68k.consts.
M68K_REG_A5
= 13¶ Address Register A5
-
bare68k.consts.
M68K_REG_A6
= 14¶ Address Register A6
-
bare68k.consts.
M68K_REG_A7
= 15¶ Address Register A7
Special Registers¶
-
bare68k.consts.
M68K_REG_PC
= 16¶ Program Counter PC
-
bare68k.consts.
M68K_REG_SR
= 17¶ Status Register SR
-
bare68k.consts.
M68K_REG_SP
= 18¶ The current Stack Pointer (located in A7)
-
bare68k.consts.
M68K_REG_USP
= 19¶ User Stack Pointer USP
-
bare68k.consts.
M68K_REG_ISP
= 20¶ Interrupt Stack Pointer ISP
-
bare68k.consts.
M68K_REG_MSP
= 21¶ Master Stack Pointer MSP
-
bare68k.consts.
M68K_REG_SFC
= 22¶ Source Function Code SFC
-
bare68k.consts.
M68K_REG_DFC
= 23¶ Destination Function Code DFC
-
bare68k.consts.
M68K_REG_VBR
= 24¶ Vector Base Register VBR
-
bare68k.consts.
M68K_REG_CACR
= 25¶ Cache Control Register CACR
-
bare68k.consts.
M68K_REG_CAAR
= 26¶ Cache Address Register CAAR
Virtual Registers¶
-
bare68k.consts.
M68K_REG_PREF_ADDR
= 27¶ Virtual Reg – Last prefetch address
-
bare68k.consts.
M68K_REG_PREF_DATA
= 28¶ Virtual Reg – Last prefetch data
-
bare68k.consts.
M68K_REG_PPC
= 29¶ Virtual Reg – Previous value in the program counter
-
bare68k.consts.
M68K_REG_IR
= 30¶ Instruction register IR
-
bare68k.consts.
M68K_REG_CPU_TYPE
= 31¶ Virtual Reg – Type of CPU being run
Interrupt Ack Special Values¶
-
bare68k.consts.
M68K_INT_ACK_AUTOVECTOR
= 4294967295¶ interrupt acknowledge to perform autovectoring
-
bare68k.consts.
M68K_INT_ACK_SPURIOUS
= 4294967294¶ interrupt acknowledge to cause spurios irq
Memory Flags¶
Memory Range Create Flags¶
-
bare68k.consts.
MEM_FLAGS_READ
= 1¶ a readable region
-
bare68k.consts.
MEM_FLAGS_WRITE
= 2¶ a writeable region
-
bare68k.consts.
MEM_FLAGS_RW
= 3¶ a read/write region
-
bare68k.consts.
MEM_FLAGS_TRAPS
= 4¶ bit flag to allow a-line traps in this region
Note
Or this flag with the read/write flags
Memory Access Type¶
-
bare68k.consts.
MEM_ACCESS_R8
= 17¶ byte read access
-
bare68k.consts.
MEM_ACCESS_R16
= 18¶ word read access
-
bare68k.consts.
MEM_ACCESS_R32
= 20¶ long read access
-
bare68k.consts.
MEM_ACCESS_W8
= 33¶ byte write access
-
bare68k.consts.
MEM_ACCESS_W16
= 34¶ word write access
-
bare68k.consts.
MEM_ACCESS_W32
= 36¶ long write access
-
bare68k.consts.
MEM_ACCESS_MASK
= 255¶ constant mask to filter out memory access values
Access Function Code¶
-
bare68k.consts.
MEM_FC_MASK
= 65280¶ constant mask to filter out memory access function code
-
bare68k.consts.
MEM_FC_USER_DATA
= 4352¶ access of user data
-
bare68k.consts.
MEM_FC_USER_PROG
= 4608¶ access of user program
-
bare68k.consts.
MEM_FC_SUPER_DATA
= 8448¶ access of supervisor data
-
bare68k.consts.
MEM_FC_SUPER_PROG
= 8704¶ access of supervisor program
-
bare68k.consts.
MEM_FC_INT_ACK
= 16384¶ access during interrupt acknowledge
Function Code Masks¶
-
bare68k.consts.
MEM_FC_DATA_MASK
= 256¶ constant mask for user or supervisor data access
-
bare68k.consts.
MEM_FC_PROG_MASK
= 512¶ constant mask for user or supervisor program access
-
bare68k.consts.
MEM_FC_USER_MASK
= 4096¶ constant mask for user data or program access
-
bare68k.consts.
MEM_FC_SUPER_MASK
= 8192¶ constant mask for supervisor data or program access
-
bare68k.consts.
MEM_FC_INT_MASK
= 16384¶ constant mask for interrupt acknowledge
API Special Memory Operations¶
-
bare68k.consts.
MEM_ACCESS_R_BLOCK
= 4352¶ read memory block
-
bare68k.consts.
MEM_ACCESS_W_BLOCK
= 4608¶ write memory block
-
bare68k.consts.
MEM_ACCESS_R_CSTR
= 8448¶ read C-string
-
bare68k.consts.
MEM_ACCESS_W_CSTR
= 8704¶ write C-string
-
bare68k.consts.
MEM_ACCESS_R_BSTR
= 12544¶ read BCPL-string
-
bare68k.consts.
MEM_ACCESS_W_BSTR
= 12800¶ write BCPL-string
-
bare68k.consts.
MEM_ACCESS_R_B32
= 16640¶ read BPCL long (shifted to left one bit)
-
bare68k.consts.
MEM_ACCESS_W_B32
= 16896¶ write BCPL long (shifted to right one bit)
-
bare68k.consts.
MEM_ACCESS_BSET
= 21504¶ set a memory block to a value
-
bare68k.consts.
MEM_ACCESS_BCOPY
= 25600¶ copy a memory block
Trap Create Flags¶
-
bare68k.consts.
TRAP_DEFAULT
= 0¶ a default A-Line trap, multi shot, no rts
-
bare68k.consts.
TRAP_ONE_SHOT
= 1¶ flag, a one shot trap, is auto-removed after invocation
-
bare68k.consts.
TRAP_AUTO_RTS
= 2¶ flag, automatically perform a RTS after trap processing
CPU Events¶
-
bare68k.consts.
CPU_EVENT_CALLBACK_ERROR
= 0¶ a Python callback triggered by the CPU emulator caused an Error or Exception
-
bare68k.consts.
CPU_EVENT_RESET
= 1¶ a RESET opcode was encountered
-
bare68k.consts.
CPU_EVENT_ALINE_TRAP
= 2¶ an A-Line Trap opcode was executed
-
bare68k.consts.
CPU_EVENT_MEM_ACCESS
= 3¶ a memory region was accessed with invalid op.
E.g. a read-only region was written to
-
bare68k.consts.
CPU_EVENT_MEM_BOUNDS
= 4¶ a memory access beyond the allocated page range occurred
-
bare68k.consts.
CPU_EVENT_MEM_TRACE
= 5¶ a memory trace callback in Python returned some value
-
bare68k.consts.
CPU_EVENT_MEM_SPECIAL
= 6¶ a special range memory region was triggered and the handler returned a value
-
bare68k.consts.
CPU_EVENT_INSTR_HOOK
= 7¶ the instruction trace handler was triggered and returned a value
-
bare68k.consts.
CPU_EVENT_INT_ACK
= 8¶ interrupt acknowledge handler was triggered and returned a value
-
bare68k.consts.
CPU_EVENT_WATCHPOINT
= 10¶ a watchpoint was hit
-
bare68k.consts.
CPU_EVENT_TIMER
= 11¶ a timer fired
-
bare68k.consts.
CPU_NUM_EVENTS
= 12¶ total number of machine CPU events
-
bare68k.consts.
CPU_EVENT_USER_ABORT
= 12¶ runtime flag, user aborted run with a
KeyboardInterrupt
-
bare68k.consts.
CPU_EVENT_DONE
= 13¶ runtime flag, reached end of processing.
E.g. a RESET opcode was encountered.