|
Xemu [doxygen]
hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
|
Go to the documentation of this file.
25 #ifndef __XEMU_MEGA65_CPU_CUSTOM_FUNCTIONS_H_INCLUDED
26 #define __XEMU_MEGA65_CPU_CUSTOM_FUNCTIONS_H_INCLUDED
28 #ifdef CPU_CUSTOM_MEMORY_FUNCTIONS_H
29 #define CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR static XEMU_INLINE
31 #ifndef ALLOW_CPU_CUSTOM_FUNCTIONS_INCLUDE
32 #error "cpu_custom_functions.h must not be included by anything other than the CPU emulator and memory_mapper.c"
34 #define CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR
38 #define CALL_MEMORY_READER(slot,addr) mem_page_rd_f[slot](mem_page_rd_o[slot] + ((addr) & 0xFF))
39 #define CALL_MEMORY_WRITER(slot,addr,data) mem_page_wr_f[slot](mem_page_wr_o[slot] + ((addr) & 0xFF), data)
40 #define CALL_MEMORY_READER_PAGED(slot,addr) mem_page_rd_f[slot](mem_page_rd_o[slot] + addr)
41 #define CALL_MEMORY_WRITER_PAGED(slot,addr,data) mem_page_wr_f[slot](mem_page_wr_o[slot] + addr, data)
42 #define SAVE_USED_SLOT(slot) last_slot_ref = slot
43 #define MEMORY_HANDLERS_ADDR_TYPE int area_offset
44 #define GET_READER_OFFSET() area_offset
45 #define GET_WRITER_OFFSET() area_offset
46 #define GET_OFFSET_BYTE_ONLY() area_offset
47 #define GET_USED_SLOT() last_slot_ref
51 #define CALL_MEMORY_READER(slot,addr) mem_page_rd_f[slot](slot, addr)
52 #define CALL_MEMORY_WRITER(slot,addr,data) mem_page_wr_f[slot](slot, addr, data)
53 #define CALL_MEMORY_READER_PAGED(slot,addr) mem_page_rd_f[slot](slot, addr)
54 #define CALL_MEMORY_WRITER_PAGED(slot,addr,data) mem_page_wr_f[slot](slot, addr, data)
55 #define SAVE_USED_SLOT(slot)
56 #define MEMORY_HANDLERS_ADDR_TYPE int slot, Uint8 lo_addr
57 #define GET_READER_OFFSET() (mem_page_rd_o[slot] + lo_addr)
58 #define GET_WRITER_OFFSET() (mem_page_wr_o[slot] + lo_addr)
59 #define GET_OFFSET_BYTE_ONLY() lo_addr
60 #define GET_USED_SLOT() slot
114 #undef CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR
CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR void cpu65_write_rmw_callback(Uint16 addr, Uint8 old_data, Uint8 new_data)
void(* mem_page_wr_f_type)(MEMORY_HANDLERS_ADDR_TYPE, Uint8 data)
Uint8 cpu65_read_linear_opcode_callback(void)
#define CALL_MEMORY_WRITER_PAGED(slot, addr, data)
#define CALL_MEMORY_READER_PAGED(slot, addr)
void cpu65_illegal_opcode_callback(void)
Uint8(* mem_page_rd_f_type)(MEMORY_HANDLERS_ADDR_TYPE)
#define CALL_MEMORY_READER(slot, addr)
int memory_cpurd2linear_xlat(Uint16 cpu_addr)
void cpu65_write_linear_opcode_callback(Uint8 data)
#define CALL_MEMORY_WRITER(slot, addr, data)
mem_page_wr_f_type mem_page_wr_f[]
CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR void cpu65_write_callback(Uint16 addr, Uint8 data)
CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR Uint8 cpu65_read_callback(Uint16 addr)
mem_page_rd_f_type mem_page_rd_f[]
#define CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR
CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR void cpu65_write_paged_callback(Uint8 page, Uint8 addr8, Uint8 data)
Uint32 cpu65_read_linear_long_opcode_callback(const Uint8 index)
#define MEMORY_HANDLERS_ADDR_TYPE
CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR void cpu65_write_rmw_paged_callback(Uint8 page, Uint8 addr8, Uint8 old_data, Uint8 new_data)
CPU_CUSTOM_FUNCTIONS_INLINE_DECORATOR Uint8 cpu65_read_paged_callback(Uint8 page, Uint8 addr8)
void cpu65_write_linear_long_opcode_callback(const Uint8 index, Uint32 data)