Terminology cleanup. "Machine" handlers are now "space" handlers.

This commit is contained in:
Aaron Giles 2008-11-15 21:36:21 +00:00
parent 41b8e37e3d
commit 1794cfa5a1
56 changed files with 281 additions and 281 deletions

View File

@ -392,7 +392,7 @@ static CPU_SET_INFO( g65816 )
case CPUINFO_INT_REGISTER + G65816_IRQ_STATE: g65816_set_reg(G65816_IRQ_STATE, info->i); break; case CPUINFO_INT_REGISTER + G65816_IRQ_STATE: g65816_set_reg(G65816_IRQ_STATE, info->i); break;
/* --- the following bits of info are set as pointers to data or functions --- */ /* --- the following bits of info are set as pointers to data or functions --- */
case CPUINFO_PTR_G65816_READVECTOR_CALLBACK: READ_VECTOR = (read8_machine_func) info->f; break; case CPUINFO_PTR_G65816_READVECTOR_CALLBACK: READ_VECTOR = (read8_space_func) info->f; break;
} }
} }

View File

@ -90,7 +90,7 @@ struct _g65816i_cpu_struct
uint irq_delay; /* delay 1 instruction before checking irq */ uint irq_delay; /* delay 1 instruction before checking irq */
cpu_irq_callback int_ack; /* Interrupt Acknowledge */ cpu_irq_callback int_ack; /* Interrupt Acknowledge */
const device_config *device; const device_config *device;
read8_machine_func read_vector; /* Read vector override */ read8_space_func read_vector; /* Read vector override */
uint stopped; /* Sets how the CPU is stopped */ uint stopped; /* Sets how the CPU is stopped */
void (*const *opcodes)(void); void (*const *opcodes)(void);
uint (*get_reg)(int regnum); uint (*get_reg)(int regnum);

View File

@ -146,8 +146,8 @@ struct _m4510_Regs {
const device_config *device; const device_config *device;
int icount; int icount;
read8_machine_func rdmem_id; /* readmem callback for indexed instructions */ read8_space_func rdmem_id; /* readmem callback for indexed instructions */
write8_machine_func wrmem_id; /* writemem callback for indexed instructions */ write8_space_func wrmem_id; /* writemem callback for indexed instructions */
UINT8 ddr; UINT8 ddr;
UINT8 port; UINT8 port;
@ -444,8 +444,8 @@ static CPU_SET_INFO( m4510 )
case CPUINFO_INT_REGISTER + M4510_MEM7: m4510->mem[7] = info->i; break; case CPUINFO_INT_REGISTER + M4510_MEM7: m4510->mem[7] = info->i; break;
/* --- the following bits of info are set as pointers to data or functions --- */ /* --- the following bits of info are set as pointers to data or functions --- */
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m4510->rdmem_id = (read8_machine_func) info->f; break; case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m4510->rdmem_id = (read8_space_func) info->f; break;
case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m4510->wrmem_id = (write8_machine_func) info->f; break; case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m4510->wrmem_id = (write8_space_func) info->f; break;
case CPUINFO_PTR_M6510_PORTREAD: m4510->port_read = (UINT8 (*)(void)) info->f; break; case CPUINFO_PTR_M6510_PORTREAD: m4510->port_read = (UINT8 (*)(void)) info->f; break;
case CPUINFO_PTR_M6510_PORTWRITE: m4510->port_write = (void (*)(UINT8)) info->f; break; case CPUINFO_PTR_M6510_PORTWRITE: m4510->port_write = (void (*)(UINT8)) info->f; break;
} }

View File

@ -79,8 +79,8 @@ struct _m6502_Regs
int int_occured; int int_occured;
int icount; int icount;
read8_machine_func rdmem_id; /* readmem callback for indexed instructions */ read8_space_func rdmem_id; /* readmem callback for indexed instructions */
write8_machine_func wrmem_id; /* writemem callback for indexed instructions */ write8_space_func wrmem_id; /* writemem callback for indexed instructions */
#if (HAS_M6510) || (HAS_M6510T) || (HAS_M8502) || (HAS_M7501) #if (HAS_M6510) || (HAS_M6510T) || (HAS_M8502) || (HAS_M7501)
UINT8 ddr; UINT8 ddr;
@ -715,8 +715,8 @@ static CPU_SET_INFO( m6502 )
case CPUINFO_INT_REGISTER + M6502_ZP: m6502->zp.w.l = info->i; break; case CPUINFO_INT_REGISTER + M6502_ZP: m6502->zp.w.l = info->i; break;
/* --- the following bits of info are set as pointers to data or functions --- */ /* --- the following bits of info are set as pointers to data or functions --- */
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m6502->rdmem_id = (read8_machine_func) info->f; break; case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m6502->rdmem_id = (read8_space_func) info->f; break;
case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m6502->wrmem_id = (write8_machine_func) info->f; break; case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m6502->wrmem_id = (write8_space_func) info->f; break;
} }
} }

View File

@ -83,8 +83,8 @@ struct _m6509_Regs {
int icount; int icount;
read8_machine_func rdmem_id; /* readmem callback for indexed instructions */ read8_space_func rdmem_id; /* readmem callback for indexed instructions */
write8_machine_func wrmem_id; /* readmem callback for indexed instructions */ write8_space_func wrmem_id; /* readmem callback for indexed instructions */
}; };
static void *token; static void *token;
@ -339,8 +339,8 @@ static CPU_SET_INFO( m6509 )
case CPUINFO_INT_REGISTER + M6509_ZP: m6509->zp.w.l = info->i; break; case CPUINFO_INT_REGISTER + M6509_ZP: m6509->zp.w.l = info->i; break;
/* --- the following bits of info are set as pointers to data or functions --- */ /* --- the following bits of info are set as pointers to data or functions --- */
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m6509->rdmem_id = (read8_machine_func) info->f; break; case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m6509->rdmem_id = (read8_space_func) info->f; break;
case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m6509->wrmem_id = (write8_machine_func) info->f; break; case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m6509->wrmem_id = (write8_space_func) info->f; break;
} }
} }

View File

@ -75,8 +75,8 @@ struct _m65ce02_Regs {
UINT8 irq_state; UINT8 irq_state;
cpu_irq_callback irq_callback; cpu_irq_callback irq_callback;
const device_config *device; const device_config *device;
read8_machine_func rdmem_id; /* readmem callback for indexed instructions */ read8_space_func rdmem_id; /* readmem callback for indexed instructions */
write8_machine_func wrmem_id; /* writemem callback for indexed instructions */ write8_space_func wrmem_id; /* writemem callback for indexed instructions */
}; };
static void *token; static void *token;
@ -261,8 +261,8 @@ static CPU_SET_INFO( m65ce02 )
case CPUINFO_INT_REGISTER + M65CE02_ZP: m65ce02.zp.b.l = info->i; break; case CPUINFO_INT_REGISTER + M65CE02_ZP: m65ce02.zp.b.l = info->i; break;
/* --- the following bits of info are set as pointers to data or functions --- */ /* --- the following bits of info are set as pointers to data or functions --- */
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m65ce02.rdmem_id = (read8_machine_func) info->f; break; case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m65ce02.rdmem_id = (read8_space_func) info->f; break;
case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m65ce02.wrmem_id = (write8_machine_func) info->f; break; case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m65ce02.wrmem_id = (write8_space_func) info->f; break;
} }
} }

View File

@ -6,10 +6,10 @@
typedef struct _rsp_config rsp_config; typedef struct _rsp_config rsp_config;
struct _rsp_config struct _rsp_config
{ {
read32_machine_func dp_reg_r; read32_space_func dp_reg_r;
write32_machine_func dp_reg_w; write32_space_func dp_reg_w;
read32_machine_func sp_reg_r; read32_space_func sp_reg_r;
write32_machine_func sp_reg_w; write32_space_func sp_reg_w;
void (*sp_set_status)(UINT32 status); void (*sp_set_status)(UINT32 status);
}; };

View File

@ -289,7 +289,7 @@ static const char *const seqtypestrings[] = { "standard", "decrement", "incremen
PORT HANDLER TABLES PORT HANDLER TABLES
***************************************************************************/ ***************************************************************************/
static const read8_machine_func port_handler8[] = static const read8_space_func port_handler8[] =
{ {
input_port_0_r, input_port_1_r, input_port_2_r, input_port_3_r, input_port_0_r, input_port_1_r, input_port_2_r, input_port_3_r,
input_port_4_r, input_port_5_r, input_port_6_r, input_port_7_r, input_port_4_r, input_port_5_r, input_port_6_r, input_port_7_r,
@ -302,7 +302,7 @@ static const read8_machine_func port_handler8[] =
}; };
static const read16_machine_func port_handler16[] = static const read16_space_func port_handler16[] =
{ {
input_port_0_word_r, input_port_1_word_r, input_port_2_word_r, input_port_3_word_r, input_port_0_word_r, input_port_1_word_r, input_port_2_word_r, input_port_3_word_r,
input_port_4_word_r, input_port_5_word_r, input_port_6_word_r, input_port_7_word_r, input_port_4_word_r, input_port_5_word_r, input_port_6_word_r, input_port_7_word_r,
@ -315,7 +315,7 @@ static const read16_machine_func port_handler16[] =
}; };
static const read32_machine_func port_handler32[] = static const read32_space_func port_handler32[] =
{ {
input_port_0_dword_r, input_port_1_dword_r, input_port_2_dword_r, input_port_3_dword_r, input_port_0_dword_r, input_port_1_dword_r, input_port_2_dword_r, input_port_3_dword_r,
input_port_4_dword_r, input_port_5_dword_r, input_port_6_dword_r, input_port_7_dword_r, input_port_4_dword_r, input_port_5_dword_r, input_port_6_dword_r, input_port_7_dword_r,
@ -1530,28 +1530,28 @@ const char *input_port_string_from_token(const input_port_token token)
tag tag
-------------------------------------------------*/ -------------------------------------------------*/
read8_machine_func input_port_read_handler8(const input_port_config *portlist, const char *tag) read8_space_func input_port_read_handler8(const input_port_config *portlist, const char *tag)
{ {
int portnum = get_port_index(portlist, tag); int portnum = get_port_index(portlist, tag);
return (portnum == -1) ? SMH_NOP : port_handler8[portnum]; return (portnum == -1) ? SMH_NOP : port_handler8[portnum];
} }
read16_machine_func input_port_read_handler16(const input_port_config *portlist, const char *tag) read16_space_func input_port_read_handler16(const input_port_config *portlist, const char *tag)
{ {
int portnum = get_port_index(portlist, tag); int portnum = get_port_index(portlist, tag);
return (portnum == -1) ? SMH_NOP : port_handler16[portnum]; return (portnum == -1) ? SMH_NOP : port_handler16[portnum];
} }
read32_machine_func input_port_read_handler32(const input_port_config *portlist, const char *tag) read32_space_func input_port_read_handler32(const input_port_config *portlist, const char *tag)
{ {
int portnum = get_port_index(portlist, tag); int portnum = get_port_index(portlist, tag);
return (portnum == -1) ? SMH_NOP : port_handler32[portnum]; return (portnum == -1) ? SMH_NOP : port_handler32[portnum];
} }
read64_machine_func input_port_read_handler64(const input_port_config *portlist, const char *tag) read64_space_func input_port_read_handler64(const input_port_config *portlist, const char *tag)
{ {
return SMH_NOP; return SMH_NOP;
} }

View File

@ -680,7 +680,7 @@ struct _inp_header
/* macros for referencing input ports in place of read handlers */ /* macros for referencing input ports in place of read handlers */
#define HANDLER_PORT(name, type) ((type)("\0\0\0\0" name)) #define HANDLER_PORT(name, type) ((type)("\0\0\0\0" name))
#define DEVICE8_PORT(name) HANDLER_PORT(name, read8_device_func) #define DEVICE8_PORT(name) HANDLER_PORT(name, read8_device_func)
#define MACHINE8_PORT(name) HANDLER_PORT(name, read8_machine_func) #define MACHINE8_PORT(name) HANDLER_PORT(name, read8_space_func)
#define IS_HANDLER_PORT(ptr) (((const char *)(ptr))[0] == 0 && ((const char *)(ptr))[1] == 0 && ((const char *)(ptr))[2] == 0 && ((const char *)(ptr))[3] == 0) #define IS_HANDLER_PORT(ptr) (((const char *)(ptr))[0] == 0 && ((const char *)(ptr))[1] == 0 && ((const char *)(ptr))[2] == 0 && ((const char *)(ptr))[3] == 0)
#define CALL_DEVICE8_READ(ptr,d,offs) (IS_HANDLER_PORT(ptr) ? input_port_read((d)->machine, ((const char *)(ptr)) + 4) : (*ptr)(d, offs)) #define CALL_DEVICE8_READ(ptr,d,offs) (IS_HANDLER_PORT(ptr) ? input_port_read((d)->machine, ((const char *)(ptr)) + 4) : (*ptr)(d, offs))
#define CALL_MACHINE8_READ(ptr,m,offs) (IS_HANDLER_PORT(ptr) ? input_port_read((m), ((const char *)(ptr)) + 4) : (*ptr)(m, offs)) #define CALL_MACHINE8_READ(ptr,m,offs) (IS_HANDLER_PORT(ptr) ? input_port_read((m), ((const char *)(ptr)) + 4) : (*ptr)(m, offs))
@ -1038,10 +1038,10 @@ int input_condition_true(running_machine *machine, const input_condition *condit
const char *input_port_string_from_token(const input_port_token token); const char *input_port_string_from_token(const input_port_token token);
/* return a memory handler corresponding to a given input port tag */ /* return a memory handler corresponding to a given input port tag */
read8_machine_func input_port_read_handler8(const input_port_config *portlist, const char *tag); read8_space_func input_port_read_handler8(const input_port_config *portlist, const char *tag);
read16_machine_func input_port_read_handler16(const input_port_config *portlist, const char *tag); read16_space_func input_port_read_handler16(const input_port_config *portlist, const char *tag);
read32_machine_func input_port_read_handler32(const input_port_config *portlist, const char *tag); read32_space_func input_port_read_handler32(const input_port_config *portlist, const char *tag);
read64_machine_func input_port_read_handler64(const input_port_config *portlist, const char *tag); read64_space_func input_port_read_handler64(const input_port_config *portlist, const char *tag);
#endif /* __INPTPORT_H__ */ #endif /* __INPTPORT_H__ */

View File

@ -36,18 +36,18 @@
struct via6522_interface struct via6522_interface
{ {
read8_machine_func in_a_func; read8_space_func in_a_func;
read8_machine_func in_b_func; read8_space_func in_b_func;
read8_machine_func in_ca1_func; read8_space_func in_ca1_func;
read8_machine_func in_cb1_func; read8_space_func in_cb1_func;
read8_machine_func in_ca2_func; read8_space_func in_ca2_func;
read8_machine_func in_cb2_func; read8_space_func in_cb2_func;
write8_machine_func out_a_func; write8_space_func out_a_func;
write8_machine_func out_b_func; write8_space_func out_b_func;
write8_machine_func out_ca1_func; write8_space_func out_ca1_func;
write8_machine_func out_cb1_func; write8_space_func out_cb1_func;
write8_machine_func out_ca2_func; write8_space_func out_ca2_func;
write8_machine_func out_cb2_func; write8_space_func out_cb2_func;
void (*irq_func)(running_machine *machine, int state); void (*irq_func)(running_machine *machine, int state);
}; };

View File

@ -30,16 +30,16 @@
typedef struct _pia6821_interface pia6821_interface; typedef struct _pia6821_interface pia6821_interface;
struct _pia6821_interface struct _pia6821_interface
{ {
read8_machine_func in_a_func; read8_space_func in_a_func;
read8_machine_func in_b_func; read8_space_func in_b_func;
read8_machine_func in_ca1_func; read8_space_func in_ca1_func;
read8_machine_func in_cb1_func; read8_space_func in_cb1_func;
read8_machine_func in_ca2_func; read8_space_func in_ca2_func;
read8_machine_func in_cb2_func; read8_space_func in_cb2_func;
write8_machine_func out_a_func; write8_space_func out_a_func;
write8_machine_func out_b_func; write8_space_func out_b_func;
write8_machine_func out_ca2_func; write8_space_func out_ca2_func;
write8_machine_func out_cb2_func; write8_space_func out_cb2_func;
void (*irq_a_func)(running_machine *machine, int state); void (*irq_a_func)(running_machine *machine, int state);
void (*irq_b_func)(running_machine *machine, int state); void (*irq_b_func)(running_machine *machine, int state);
}; };

View File

@ -18,7 +18,7 @@ struct _ptm6840_interface
int internal_clock; int internal_clock;
int external_clock[3]; int external_clock[3];
write8_machine_func out_func[3]; // function to call when output[idx] changes write8_space_func out_func[3]; // function to call when output[idx] changes
void (*irq_func)(running_machine *machine, int state); // function called if IRQ line changes void (*irq_func)(running_machine *machine, int state); // function called if IRQ line changes
}; };

View File

@ -29,7 +29,7 @@ struct _latch8_devread
device_type type; device_type type;
const char *tag; const char *tag;
read8_device_func devread_handler; read8_device_func devread_handler;
read8_machine_func read_handler; read8_space_func read_handler;
}; };
typedef struct _latch8_config latch8_config; typedef struct _latch8_config latch8_config;

View File

@ -85,7 +85,7 @@
* *
*************************************/ *************************************/
INLINE UINT16 read16be_with_read8_handler(read8_machine_func handler, const address_space *space, offs_t offset, UINT16 mem_mask) INLINE UINT16 read16be_with_read8_handler(read8_space_func handler, const address_space *space, offs_t offset, UINT16 mem_mask)
{ {
UINT16 result = 0; UINT16 result = 0;
if (ACCESSING_BITS_8_15) if (ACCESSING_BITS_8_15)
@ -96,7 +96,7 @@ INLINE UINT16 read16be_with_read8_handler(read8_machine_func handler, const addr
} }
INLINE void write16be_with_write8_handler(write8_machine_func handler, const address_space *space, offs_t offset, UINT16 data, UINT16 mem_mask) INLINE void write16be_with_write8_handler(write8_space_func handler, const address_space *space, offs_t offset, UINT16 data, UINT16 mem_mask)
{ {
if (ACCESSING_BITS_8_15) if (ACCESSING_BITS_8_15)
(*handler)(space, offset * 2 + 0, data >> 8); (*handler)(space, offset * 2 + 0, data >> 8);
@ -111,7 +111,7 @@ INLINE void write16be_with_write8_handler(write8_machine_func handler, const add
* *
*************************************/ *************************************/
INLINE UINT16 read16le_with_read8_handler(read8_machine_func handler, const address_space *space, offs_t offset, UINT16 mem_mask) INLINE UINT16 read16le_with_read8_handler(read8_space_func handler, const address_space *space, offs_t offset, UINT16 mem_mask)
{ {
UINT16 result = 0; UINT16 result = 0;
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
@ -122,7 +122,7 @@ INLINE UINT16 read16le_with_read8_handler(read8_machine_func handler, const addr
} }
INLINE void write16le_with_write8_handler(write8_machine_func handler, const address_space *space, offs_t offset, UINT16 data, UINT16 mem_mask) INLINE void write16le_with_write8_handler(write8_space_func handler, const address_space *space, offs_t offset, UINT16 data, UINT16 mem_mask)
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
(*handler)(space, offset * 2 + 0, data >> 0); (*handler)(space, offset * 2 + 0, data >> 0);
@ -137,7 +137,7 @@ INLINE void write16le_with_write8_handler(write8_machine_func handler, const add
* *
*************************************/ *************************************/
INLINE UINT32 read32be_with_read8_handler(read8_machine_func handler, const address_space *space, offs_t offset, UINT32 mem_mask) INLINE UINT32 read32be_with_read8_handler(read8_space_func handler, const address_space *space, offs_t offset, UINT32 mem_mask)
{ {
UINT32 result = 0; UINT32 result = 0;
if (ACCESSING_BITS_16_31) if (ACCESSING_BITS_16_31)
@ -148,7 +148,7 @@ INLINE UINT32 read32be_with_read8_handler(read8_machine_func handler, const addr
} }
INLINE void write32be_with_write8_handler(write8_machine_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask) INLINE void write32be_with_write8_handler(write8_space_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask)
{ {
if (ACCESSING_BITS_16_31) if (ACCESSING_BITS_16_31)
write16be_with_write8_handler(handler, space, offset * 2 + 0, data >> 16, mem_mask >> 16); write16be_with_write8_handler(handler, space, offset * 2 + 0, data >> 16, mem_mask >> 16);
@ -163,7 +163,7 @@ INLINE void write32be_with_write8_handler(write8_machine_func handler, const add
* *
*************************************/ *************************************/
INLINE UINT32 read32le_with_read8_handler(read8_machine_func handler, const address_space *space, offs_t offset, UINT32 mem_mask) INLINE UINT32 read32le_with_read8_handler(read8_space_func handler, const address_space *space, offs_t offset, UINT32 mem_mask)
{ {
UINT32 result = 0; UINT32 result = 0;
if (ACCESSING_BITS_0_15) if (ACCESSING_BITS_0_15)
@ -174,7 +174,7 @@ INLINE UINT32 read32le_with_read8_handler(read8_machine_func handler, const addr
} }
INLINE void write32le_with_write8_handler(write8_machine_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask) INLINE void write32le_with_write8_handler(write8_space_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask)
{ {
if (ACCESSING_BITS_0_15) if (ACCESSING_BITS_0_15)
write16le_with_write8_handler(handler, space, offset * 2 + 0, data, mem_mask); write16le_with_write8_handler(handler, space, offset * 2 + 0, data, mem_mask);
@ -189,7 +189,7 @@ INLINE void write32le_with_write8_handler(write8_machine_func handler, const add
* *
*************************************/ *************************************/
INLINE UINT32 read32be_with_16be_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT32 mem_mask) INLINE UINT32 read32be_with_16be_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT32 mem_mask)
{ {
UINT32 result = 0; UINT32 result = 0;
if (ACCESSING_BITS_16_31) if (ACCESSING_BITS_16_31)
@ -200,7 +200,7 @@ INLINE UINT32 read32be_with_16be_handler(read16_machine_func handler, const addr
} }
INLINE void write32be_with_16be_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask) INLINE void write32be_with_16be_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask)
{ {
if (ACCESSING_BITS_16_31) if (ACCESSING_BITS_16_31)
(*handler)(space, offset * 2 + 0, data >> 16, mem_mask >> 16); (*handler)(space, offset * 2 + 0, data >> 16, mem_mask >> 16);
@ -215,7 +215,7 @@ INLINE void write32be_with_16be_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT32 read32le_with_16le_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT32 mem_mask) INLINE UINT32 read32le_with_16le_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT32 mem_mask)
{ {
UINT32 result = 0; UINT32 result = 0;
if (ACCESSING_BITS_0_15) if (ACCESSING_BITS_0_15)
@ -226,7 +226,7 @@ INLINE UINT32 read32le_with_16le_handler(read16_machine_func handler, const addr
} }
INLINE void write32le_with_16le_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask) INLINE void write32le_with_16le_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask)
{ {
if (ACCESSING_BITS_0_15) if (ACCESSING_BITS_0_15)
(*handler)(space, offset * 2 + 0, data, mem_mask); (*handler)(space, offset * 2 + 0, data, mem_mask);
@ -241,7 +241,7 @@ INLINE void write32le_with_16le_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT32 read32be_with_16le_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT32 mem_mask) INLINE UINT32 read32be_with_16le_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT32 mem_mask)
{ {
UINT32 result = 0; UINT32 result = 0;
mem_mask = FLIPENDIAN_INT32(mem_mask); mem_mask = FLIPENDIAN_INT32(mem_mask);
@ -250,7 +250,7 @@ INLINE UINT32 read32be_with_16le_handler(read16_machine_func handler, const addr
} }
INLINE void write32be_with_16le_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask) INLINE void write32be_with_16le_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask)
{ {
data = FLIPENDIAN_INT32(data); data = FLIPENDIAN_INT32(data);
mem_mask = FLIPENDIAN_INT32(mem_mask); mem_mask = FLIPENDIAN_INT32(mem_mask);
@ -264,7 +264,7 @@ INLINE void write32be_with_16le_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT32 read32le_with_16be_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT32 mem_mask) INLINE UINT32 read32le_with_16be_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT32 mem_mask)
{ {
UINT32 result = 0; UINT32 result = 0;
mem_mask = FLIPENDIAN_INT32(mem_mask); mem_mask = FLIPENDIAN_INT32(mem_mask);
@ -273,7 +273,7 @@ INLINE UINT32 read32le_with_16be_handler(read16_machine_func handler, const addr
} }
INLINE void write32le_with_16be_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask) INLINE void write32le_with_16be_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT32 data, UINT32 mem_mask)
{ {
data = FLIPENDIAN_INT32(data); data = FLIPENDIAN_INT32(data);
mem_mask = FLIPENDIAN_INT32(mem_mask); mem_mask = FLIPENDIAN_INT32(mem_mask);
@ -287,7 +287,7 @@ INLINE void write32le_with_16be_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT64 read64be_with_read8_handler(read8_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT64 read64be_with_read8_handler(read8_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
@ -298,7 +298,7 @@ INLINE UINT64 read64be_with_read8_handler(read8_machine_func handler, const addr
} }
INLINE void write64be_with_write8_handler(write8_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64be_with_write8_handler(write8_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
write32be_with_write8_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32); write32be_with_write8_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32);
@ -313,7 +313,7 @@ INLINE void write64be_with_write8_handler(write8_machine_func handler, const add
* *
*************************************/ *************************************/
INLINE UINT64 read64le_with_read8_handler(read8_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT64 read64le_with_read8_handler(read8_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
@ -324,7 +324,7 @@ INLINE UINT64 read64le_with_read8_handler(read8_machine_func handler, const addr
} }
INLINE void write64le_with_write8_handler(write8_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64le_with_write8_handler(write8_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
write32le_with_write8_handler(handler, space, offset * 2 + 0, data >> 0, mem_mask >> 0); write32le_with_write8_handler(handler, space, offset * 2 + 0, data >> 0, mem_mask >> 0);
@ -339,7 +339,7 @@ INLINE void write64le_with_write8_handler(write8_machine_func handler, const add
* *
*************************************/ *************************************/
INLINE UINT32 read64be_with_16be_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT32 read64be_with_16be_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
@ -350,7 +350,7 @@ INLINE UINT32 read64be_with_16be_handler(read16_machine_func handler, const addr
} }
INLINE void write64be_with_16be_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64be_with_16be_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
write32be_with_16be_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32); write32be_with_16be_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32);
@ -365,7 +365,7 @@ INLINE void write64be_with_16be_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT32 read64le_with_16le_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT32 read64le_with_16le_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
@ -376,7 +376,7 @@ INLINE UINT32 read64le_with_16le_handler(read16_machine_func handler, const addr
} }
INLINE void write64le_with_16le_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64le_with_16le_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
write32le_with_16le_handler(handler, space, offset * 2 + 0, data >> 0, mem_mask >> 0); write32le_with_16le_handler(handler, space, offset * 2 + 0, data >> 0, mem_mask >> 0);
@ -391,7 +391,7 @@ INLINE void write64le_with_16le_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT32 read64be_with_16le_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT32 read64be_with_16le_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
@ -402,7 +402,7 @@ INLINE UINT32 read64be_with_16le_handler(read16_machine_func handler, const addr
} }
INLINE void write64be_with_16le_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64be_with_16le_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
write32be_with_16le_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32); write32be_with_16le_handler(handler, space, offset * 2 + 0, data >> 32, mem_mask >> 32);
@ -417,7 +417,7 @@ INLINE void write64be_with_16le_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT32 read64le_with_16be_handler(read16_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT32 read64le_with_16be_handler(read16_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
@ -428,7 +428,7 @@ INLINE UINT32 read64le_with_16be_handler(read16_machine_func handler, const addr
} }
INLINE void write64le_with_16be_handler(write16_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64le_with_16be_handler(write16_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
write32le_with_16be_handler(handler, space, offset * 2 + 0, data >> 0, mem_mask >> 0); write32le_with_16be_handler(handler, space, offset * 2 + 0, data >> 0, mem_mask >> 0);
@ -443,7 +443,7 @@ INLINE void write64le_with_16be_handler(write16_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT64 read64be_with_32be_handler(read32_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT64 read64be_with_32be_handler(read32_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
@ -454,7 +454,7 @@ INLINE UINT64 read64be_with_32be_handler(read32_machine_func handler, const addr
} }
INLINE void write64be_with_32be_handler(write32_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64be_with_32be_handler(write32_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
(*handler)(space, offset * 2 + 0, data >> 32, mem_mask >> 32); (*handler)(space, offset * 2 + 0, data >> 32, mem_mask >> 32);
@ -469,7 +469,7 @@ INLINE void write64be_with_32be_handler(write32_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT64 read64le_with_32le_handler(read32_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT64 read64le_with_32le_handler(read32_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result = 0; UINT64 result = 0;
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
@ -480,7 +480,7 @@ INLINE UINT64 read64le_with_32le_handler(read32_machine_func handler, const addr
} }
INLINE void write64le_with_32le_handler(write32_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64le_with_32le_handler(write32_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
(*handler)(space, offset * 2 + 0, data >> 0, mem_mask >> 0); (*handler)(space, offset * 2 + 0, data >> 0, mem_mask >> 0);
@ -495,7 +495,7 @@ INLINE void write64le_with_32le_handler(write32_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT64 read64be_with_32le_handler(read32_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT64 read64be_with_32le_handler(read32_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result; UINT64 result;
mem_mask = FLIPENDIAN_INT64(mem_mask); mem_mask = FLIPENDIAN_INT64(mem_mask);
@ -504,7 +504,7 @@ INLINE UINT64 read64be_with_32le_handler(read32_machine_func handler, const addr
} }
INLINE void write64be_with_32le_handler(write32_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64be_with_32le_handler(write32_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
data = FLIPENDIAN_INT64(data); data = FLIPENDIAN_INT64(data);
mem_mask = FLIPENDIAN_INT64(mem_mask); mem_mask = FLIPENDIAN_INT64(mem_mask);
@ -518,7 +518,7 @@ INLINE void write64be_with_32le_handler(write32_machine_func handler, const addr
* *
*************************************/ *************************************/
INLINE UINT64 read64le_with_32be_handler(read32_machine_func handler, const address_space *space, offs_t offset, UINT64 mem_mask) INLINE UINT64 read64le_with_32be_handler(read32_space_func handler, const address_space *space, offs_t offset, UINT64 mem_mask)
{ {
UINT64 result; UINT64 result;
mem_mask = FLIPENDIAN_INT64(mem_mask); mem_mask = FLIPENDIAN_INT64(mem_mask);
@ -527,7 +527,7 @@ INLINE UINT64 read64le_with_32be_handler(read32_machine_func handler, const addr
} }
INLINE void write64le_with_32be_handler(write32_machine_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask) INLINE void write64le_with_32be_handler(write32_space_func handler, const address_space *space, offs_t offset, UINT64 data, UINT64 mem_mask)
{ {
data = FLIPENDIAN_INT64(data); data = FLIPENDIAN_INT64(data);
mem_mask = FLIPENDIAN_INT64(mem_mask); mem_mask = FLIPENDIAN_INT64(mem_mask);

View File

@ -435,7 +435,7 @@ INLINE UINT8 read_byte_generic(const address_space *space, offs_t address)
if (entry < STATIC_RAM) if (entry < STATIC_RAM)
result = bank_ptr[entry][offset]; result = bank_ptr[entry][offset];
else else
result = (*handler->handler.read.mhandler8)(handler->object, offset); result = (*handler->handler.read.shandler8)(handler->object, offset);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
return result; return result;
@ -465,7 +465,7 @@ INLINE void write_byte_generic(const address_space *space, offs_t address, UINT8
if (entry < STATIC_RAM) if (entry < STATIC_RAM)
bank_ptr[entry][offset] = data; bank_ptr[entry][offset] = data;
else else
(*handler->handler.write.mhandler8)(handler->object, offset, data); (*handler->handler.write.shandler8)(handler->object, offset, data);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
} }
@ -495,7 +495,7 @@ INLINE UINT16 read_word_generic(const address_space *space, offs_t address, UINT
if (entry < STATIC_RAM) if (entry < STATIC_RAM)
result = *(UINT16 *)&bank_ptr[entry][offset & ~1]; result = *(UINT16 *)&bank_ptr[entry][offset & ~1];
else else
result = (*handler->handler.read.mhandler16)(handler->object, offset >> 1, mem_mask); result = (*handler->handler.read.shandler16)(handler->object, offset >> 1, mem_mask);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
return result; return result;
@ -528,7 +528,7 @@ INLINE void write_word_generic(const address_space *space, offs_t address, UINT1
*dest = (*dest & ~mem_mask) | (data & mem_mask); *dest = (*dest & ~mem_mask) | (data & mem_mask);
} }
else else
(*handler->handler.write.mhandler16)(handler->object, offset >> 1, data, mem_mask); (*handler->handler.write.shandler16)(handler->object, offset >> 1, data, mem_mask);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
} }
@ -558,7 +558,7 @@ INLINE UINT32 read_dword_generic(const address_space *space, offs_t address, UIN
if (entry < STATIC_RAM) if (entry < STATIC_RAM)
result = *(UINT32 *)&bank_ptr[entry][offset & ~3]; result = *(UINT32 *)&bank_ptr[entry][offset & ~3];
else else
result = (*handler->handler.read.mhandler32)(handler->object, offset >> 2, mem_mask); result = (*handler->handler.read.shandler32)(handler->object, offset >> 2, mem_mask);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
return result; return result;
@ -591,7 +591,7 @@ INLINE void write_dword_generic(const address_space *space, offs_t address, UINT
*dest = (*dest & ~mem_mask) | (data & mem_mask); *dest = (*dest & ~mem_mask) | (data & mem_mask);
} }
else else
(*handler->handler.write.mhandler32)(handler->object, offset >> 2, data, mem_mask); (*handler->handler.write.shandler32)(handler->object, offset >> 2, data, mem_mask);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
} }
@ -621,7 +621,7 @@ INLINE UINT64 read_qword_generic(const address_space *space, offs_t address, UIN
if (entry < STATIC_RAM) if (entry < STATIC_RAM)
result = *(UINT64 *)&bank_ptr[entry][offset & ~7]; result = *(UINT64 *)&bank_ptr[entry][offset & ~7];
else else
result = (*handler->handler.read.mhandler64)(handler->object, offset >> 3, mem_mask); result = (*handler->handler.read.shandler64)(handler->object, offset >> 3, mem_mask);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
return result; return result;
@ -654,7 +654,7 @@ INLINE void write_qword_generic(const address_space *space, offs_t address, UINT
*dest = (*dest & ~mem_mask) | (data & mem_mask); *dest = (*dest & ~mem_mask) | (data & mem_mask);
} }
else else
(*handler->handler.write.mhandler64)(handler->object, offset >> 3, data, mem_mask); (*handler->handler.write.shandler64)(handler->object, offset >> 3, data, mem_mask);
profiler_mark(PROFILER_END); profiler_mark(PROFILER_END);
} }
@ -1471,7 +1471,7 @@ void *_memory_install_handler(running_machine *machine, int cpunum, int spacenum
return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart)); return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart));
} }
UINT8 *_memory_install_handler8(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_machine_func rhandler, write8_machine_func whandler, const char *rhandler_name, const char *whandler_name) UINT8 *_memory_install_handler8(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_space_func rhandler, write8_space_func whandler, const char *rhandler_name, const char *whandler_name)
{ {
address_space *space = &cpudata[cpunum].space[spacenum]; address_space *space = &cpudata[cpunum].space[spacenum];
if (rhandler != NULL) if (rhandler != NULL)
@ -1482,7 +1482,7 @@ UINT8 *_memory_install_handler8(running_machine *machine, int cpunum, int spacen
return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart)); return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart));
} }
UINT16 *_memory_install_handler16(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_machine_func rhandler, write16_machine_func whandler, const char *rhandler_name, const char *whandler_name) UINT16 *_memory_install_handler16(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_space_func rhandler, write16_space_func whandler, const char *rhandler_name, const char *whandler_name)
{ {
address_space *space = &cpudata[cpunum].space[spacenum]; address_space *space = &cpudata[cpunum].space[spacenum];
if (rhandler != NULL) if (rhandler != NULL)
@ -1493,7 +1493,7 @@ UINT16 *_memory_install_handler16(running_machine *machine, int cpunum, int spac
return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart)); return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart));
} }
UINT32 *_memory_install_handler32(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_machine_func rhandler, write32_machine_func whandler, const char *rhandler_name, const char *whandler_name) UINT32 *_memory_install_handler32(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_space_func rhandler, write32_space_func whandler, const char *rhandler_name, const char *whandler_name)
{ {
address_space *space = &cpudata[cpunum].space[spacenum]; address_space *space = &cpudata[cpunum].space[spacenum];
if (rhandler != NULL) if (rhandler != NULL)
@ -1504,7 +1504,7 @@ UINT32 *_memory_install_handler32(running_machine *machine, int cpunum, int spac
return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart)); return memory_find_base(cpunum, spacenum, ADDR2BYTE(space, addrstart));
} }
UINT64 *_memory_install_handler64(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_machine_func rhandler, write64_machine_func whandler, const char *rhandler_name, const char *whandler_name) UINT64 *_memory_install_handler64(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_space_func rhandler, write64_space_func whandler, const char *rhandler_name, const char *whandler_name)
{ {
address_space *space = &cpudata[cpunum].space[spacenum]; address_space *space = &cpudata[cpunum].space[spacenum];
if (rhandler != NULL) if (rhandler != NULL)
@ -1821,10 +1821,10 @@ static void memory_init_populate(running_machine *machine)
{ {
switch (space->dbits) switch (space->dbits)
{ {
case 8: rhandler.mhandler8 = input_port_read_handler8(machine->portconfig, entry->read_porttag); break; case 8: rhandler.shandler8 = input_port_read_handler8(machine->portconfig, entry->read_porttag); break;
case 16: rhandler.mhandler16 = input_port_read_handler16(machine->portconfig, entry->read_porttag); break; case 16: rhandler.shandler16 = input_port_read_handler16(machine->portconfig, entry->read_porttag); break;
case 32: rhandler.mhandler32 = input_port_read_handler32(machine->portconfig, entry->read_porttag); break; case 32: rhandler.shandler32 = input_port_read_handler32(machine->portconfig, entry->read_porttag); break;
case 64: rhandler.mhandler64 = input_port_read_handler64(machine->portconfig, entry->read_porttag); break; case 64: rhandler.shandler64 = input_port_read_handler64(machine->portconfig, entry->read_porttag); break;
} }
if (rhandler.generic == NULL) if (rhandler.generic == NULL)
fatalerror("Non-existent port referenced: '%s'\n", entry->read_porttag); fatalerror("Non-existent port referenced: '%s'\n", entry->read_porttag);
@ -3250,7 +3250,7 @@ static READ16_HANDLER( stub_read8_from_16 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT8)(mem_mask >> shift) != 0) if ((UINT8)(mem_mask >> shift) != 0)
result |= (*handler->subhandler.read.mhandler8)(handler->subobject, offset) << shift; result |= (*handler->subhandler.read.shandler8)(handler->subobject, offset) << shift;
offset++; offset++;
} }
return result; return result;
@ -3274,7 +3274,7 @@ static READ32_HANDLER( stub_read8_from_32 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT8)(mem_mask >> shift) != 0) if ((UINT8)(mem_mask >> shift) != 0)
result |= (*handler->subhandler.read.mhandler8)(handler->subobject, offset) << shift; result |= (*handler->subhandler.read.shandler8)(handler->subobject, offset) << shift;
offset++; offset++;
} }
return result; return result;
@ -3298,7 +3298,7 @@ static READ64_HANDLER( stub_read8_from_64 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT8)(mem_mask >> shift) != 0) if ((UINT8)(mem_mask >> shift) != 0)
result |= (UINT64)(*handler->subhandler.read.mhandler8)(handler->subobject, offset) << shift; result |= (UINT64)(*handler->subhandler.read.shandler8)(handler->subobject, offset) << shift;
offset++; offset++;
} }
return result; return result;
@ -3322,7 +3322,7 @@ static READ32_HANDLER( stub_read16_from_32 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT16)(mem_mask >> shift) != 0) if ((UINT16)(mem_mask >> shift) != 0)
result |= (*handler->subhandler.read.mhandler16)(handler->subobject, offset, mem_mask >> shift) << shift; result |= (*handler->subhandler.read.shandler16)(handler->subobject, offset, mem_mask >> shift) << shift;
offset++; offset++;
} }
return result; return result;
@ -3346,7 +3346,7 @@ static READ64_HANDLER( stub_read16_from_64 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT16)(mem_mask >> shift) != 0) if ((UINT16)(mem_mask >> shift) != 0)
result |= (UINT64)(*handler->subhandler.read.mhandler16)(handler->subobject, offset, mem_mask >> shift) << shift; result |= (UINT64)(*handler->subhandler.read.shandler16)(handler->subobject, offset, mem_mask >> shift) << shift;
offset++; offset++;
} }
return result; return result;
@ -3370,7 +3370,7 @@ static READ64_HANDLER( stub_read32_from_64 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT32)(mem_mask >> shift) != 0) if ((UINT32)(mem_mask >> shift) != 0)
result |= (UINT64)(*handler->subhandler.read.mhandler32)(handler->subobject, offset, mem_mask >> shift) << shift; result |= (UINT64)(*handler->subhandler.read.shandler32)(handler->subobject, offset, mem_mask >> shift) << shift;
offset++; offset++;
} }
return result; return result;
@ -3398,7 +3398,7 @@ static WRITE16_HANDLER( stub_write8_from_16 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT8)(mem_mask >> shift) != 0) if ((UINT8)(mem_mask >> shift) != 0)
(*handler->subhandler.write.mhandler8)(handler->subobject, offset, data >> shift); (*handler->subhandler.write.shandler8)(handler->subobject, offset, data >> shift);
offset++; offset++;
} }
} }
@ -3420,7 +3420,7 @@ static WRITE32_HANDLER( stub_write8_from_32 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT8)(mem_mask >> shift) != 0) if ((UINT8)(mem_mask >> shift) != 0)
(*handler->subhandler.write.mhandler8)(handler->subobject, offset, data >> shift); (*handler->subhandler.write.shandler8)(handler->subobject, offset, data >> shift);
offset++; offset++;
} }
} }
@ -3442,7 +3442,7 @@ static WRITE64_HANDLER( stub_write8_from_64 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT8)(mem_mask >> shift) != 0) if ((UINT8)(mem_mask >> shift) != 0)
(*handler->subhandler.write.mhandler8)(handler->subobject, offset, data >> shift); (*handler->subhandler.write.shandler8)(handler->subobject, offset, data >> shift);
offset++; offset++;
} }
} }
@ -3464,7 +3464,7 @@ static WRITE32_HANDLER( stub_write16_from_32 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT16)(mem_mask >> shift) != 0) if ((UINT16)(mem_mask >> shift) != 0)
(*handler->subhandler.write.mhandler16)(handler->subobject, offset, data >> shift, mem_mask >> shift); (*handler->subhandler.write.shandler16)(handler->subobject, offset, data >> shift, mem_mask >> shift);
offset++; offset++;
} }
} }
@ -3486,7 +3486,7 @@ static WRITE64_HANDLER( stub_write16_from_64 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT16)(mem_mask >> shift) != 0) if ((UINT16)(mem_mask >> shift) != 0)
(*handler->subhandler.write.mhandler16)(handler->subobject, offset, data >> shift, mem_mask >> shift); (*handler->subhandler.write.shandler16)(handler->subobject, offset, data >> shift, mem_mask >> shift);
offset++; offset++;
} }
} }
@ -3508,7 +3508,7 @@ static WRITE64_HANDLER( stub_write32_from_64 )
{ {
int shift = *subshift++; int shift = *subshift++;
if ((UINT32)(mem_mask >> shift) != 0) if ((UINT32)(mem_mask >> shift) != 0)
(*handler->subhandler.write.mhandler32)(handler->subobject, offset, data >> shift, mem_mask >> shift); (*handler->subhandler.write.shandler32)(handler->subobject, offset, data >> shift, mem_mask >> shift);
offset++; offset++;
} }
} }
@ -3535,27 +3535,27 @@ static memory_handler get_stub_handler(read_or_write readorwrite, int spacedbits
if (spacedbits == 16) if (spacedbits == 16)
{ {
if (handlerdbits == 8) if (handlerdbits == 8)
result.read.mhandler16 = stub_read8_from_16; result.read.shandler16 = stub_read8_from_16;
} }
/* 32-bit read stubs */ /* 32-bit read stubs */
else if (spacedbits == 32) else if (spacedbits == 32)
{ {
if (handlerdbits == 8) if (handlerdbits == 8)
result.read.mhandler32 = stub_read8_from_32; result.read.shandler32 = stub_read8_from_32;
else if (handlerdbits == 16) else if (handlerdbits == 16)
result.read.mhandler32 = stub_read16_from_32; result.read.shandler32 = stub_read16_from_32;
} }
/* 64-bit read stubs */ /* 64-bit read stubs */
else if (spacedbits == 64) else if (spacedbits == 64)
{ {
if (handlerdbits == 8) if (handlerdbits == 8)
result.read.mhandler64 = stub_read8_from_64; result.read.shandler64 = stub_read8_from_64;
else if (handlerdbits == 16) else if (handlerdbits == 16)
result.read.mhandler64 = stub_read16_from_64; result.read.shandler64 = stub_read16_from_64;
else if (handlerdbits == 32) else if (handlerdbits == 32)
result.read.mhandler64 = stub_read32_from_64; result.read.shandler64 = stub_read32_from_64;
} }
} }
@ -3566,27 +3566,27 @@ static memory_handler get_stub_handler(read_or_write readorwrite, int spacedbits
if (spacedbits == 16) if (spacedbits == 16)
{ {
if (handlerdbits == 8) if (handlerdbits == 8)
result.write.mhandler16 = stub_write8_from_16; result.write.shandler16 = stub_write8_from_16;
} }
/* 32-bit write stubs */ /* 32-bit write stubs */
else if (spacedbits == 32) else if (spacedbits == 32)
{ {
if (handlerdbits == 8) if (handlerdbits == 8)
result.write.mhandler32 = stub_write8_from_32; result.write.shandler32 = stub_write8_from_32;
else if (handlerdbits == 16) else if (handlerdbits == 16)
result.write.mhandler32 = stub_write16_from_32; result.write.shandler32 = stub_write16_from_32;
} }
/* 64-bit write stubs */ /* 64-bit write stubs */
else if (spacedbits == 64) else if (spacedbits == 64)
{ {
if (handlerdbits == 8) if (handlerdbits == 8)
result.write.mhandler64 = stub_write8_from_64; result.write.shandler64 = stub_write8_from_64;
else if (handlerdbits == 16) else if (handlerdbits == 16)
result.write.mhandler64 = stub_write16_from_64; result.write.shandler64 = stub_write16_from_64;
else if (handlerdbits == 32) else if (handlerdbits == 32)
result.write.mhandler64 = stub_write32_from_64; result.write.shandler64 = stub_write32_from_64;
} }
} }

View File

@ -114,15 +114,15 @@ struct _opbase_data
typedef offs_t (*opbase_handler_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t address, ATTR_UNUSED opbase_data *opbase); typedef offs_t (*opbase_handler_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t address, ATTR_UNUSED opbase_data *opbase);
/* machine read/write handlers */ /* space read/write handlers */
typedef UINT8 (*read8_machine_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset); typedef UINT8 (*read8_space_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset);
typedef void (*write8_machine_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data); typedef void (*write8_space_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data);
typedef UINT16 (*read16_machine_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask); typedef UINT16 (*read16_space_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask);
typedef void (*write16_machine_func)(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask); typedef void (*write16_space_func)(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask);
typedef UINT32 (*read32_machine_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask); typedef UINT32 (*read32_space_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask);
typedef void (*write32_machine_func)(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask); typedef void (*write32_space_func)(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask);
typedef UINT64 (*read64_machine_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask); typedef UINT64 (*read64_space_func) (ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask);
typedef void (*write64_machine_func)(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask); typedef void (*write64_space_func)(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask);
/* device read/write handlers */ /* device read/write handlers */
@ -165,10 +165,10 @@ typedef union _read_handler read_handler;
union _read_handler union _read_handler
{ {
genf * generic; /* generic function pointer */ genf * generic; /* generic function pointer */
read8_machine_func mhandler8; /* 8-bit machine read handler */ read8_space_func shandler8; /* 8-bit space read handler */
read16_machine_func mhandler16; /* 16-bit machine read handler */ read16_space_func shandler16; /* 16-bit space read handler */
read32_machine_func mhandler32; /* 32-bit machine read handler */ read32_space_func shandler32; /* 32-bit space read handler */
read64_machine_func mhandler64; /* 64-bit machine read handler */ read64_space_func shandler64; /* 64-bit space read handler */
read8_device_func dhandler8; /* 8-bit device read handler */ read8_device_func dhandler8; /* 8-bit device read handler */
read16_device_func dhandler16; /* 16-bit device read handler */ read16_device_func dhandler16; /* 16-bit device read handler */
read32_device_func dhandler32; /* 32-bit device read handler */ read32_device_func dhandler32; /* 32-bit device read handler */
@ -181,10 +181,10 @@ typedef union _write_handler write_handler;
union _write_handler union _write_handler
{ {
genf * generic; /* generic function pointer */ genf * generic; /* generic function pointer */
write8_machine_func mhandler8; /* 8-bit machine write handler */ write8_space_func shandler8; /* 8-bit space write handler */
write16_machine_func mhandler16; /* 16-bit machine write handler */ write16_space_func shandler16; /* 16-bit space write handler */
write32_machine_func mhandler32; /* 32-bit machine write handler */ write32_space_func shandler32; /* 32-bit space write handler */
write64_machine_func mhandler64; /* 64-bit machine write handler */ write64_space_func shandler64; /* 64-bit space write handler */
write8_device_func dhandler8; /* 8-bit device write handler */ write8_device_func dhandler8; /* 8-bit device write handler */
write16_device_func dhandler16; /* 16-bit device write handler */ write16_device_func dhandler16; /* 16-bit device write handler */
write32_device_func dhandler32; /* 32-bit device write handler */ write32_device_func dhandler32; /* 32-bit device write handler */
@ -310,8 +310,8 @@ union _addrmap8_token
{ {
TOKEN_COMMON_FIELDS TOKEN_COMMON_FIELDS
const addrmap_token * tokenptr; const addrmap_token * tokenptr;
read8_machine_func mread; /* pointer to native machine read handler */ read8_space_func sread; /* pointer to native space read handler */
write8_machine_func mwrite; /* pointer to native machine write handler */ write8_space_func swrite; /* pointer to native space write handler */
read8_device_func dread; /* pointer to native device read handler */ read8_device_func dread; /* pointer to native device read handler */
write8_device_func dwrite; /* pointer to native device write handler */ write8_device_func dwrite; /* pointer to native device write handler */
read_handler read; /* generic read handlers */ read_handler read; /* generic read handlers */
@ -328,12 +328,12 @@ union _addrmap16_token
{ {
TOKEN_COMMON_FIELDS TOKEN_COMMON_FIELDS
const addrmap_token * tokenptr; const addrmap_token * tokenptr;
read16_machine_func mread; /* pointer to native read handler */ read16_space_func sread; /* pointer to native read handler */
write16_machine_func mwrite; /* pointer to native write handler */ write16_space_func swrite; /* pointer to native write handler */
read16_device_func dread; /* pointer to native device read handler */ read16_device_func dread; /* pointer to native device read handler */
write16_device_func dwrite; /* pointer to native device write handler */ write16_device_func dwrite; /* pointer to native device write handler */
read8_machine_func mread8; /* pointer to 8-bit machine read handler */ read8_space_func sread8; /* pointer to 8-bit space read handler */
write8_machine_func mwrite8; /* pointer to 8-bit machine write handler */ write8_space_func swrite8; /* pointer to 8-bit space write handler */
read8_device_func dread8; /* pointer to 8-bit device read handler */ read8_device_func dread8; /* pointer to 8-bit device read handler */
write8_device_func dwrite8; /* pointer to 8-bit device write handler */ write8_device_func dwrite8; /* pointer to 8-bit device write handler */
read_handler read; /* generic read handlers */ read_handler read; /* generic read handlers */
@ -350,16 +350,16 @@ union _addrmap32_token
{ {
TOKEN_COMMON_FIELDS TOKEN_COMMON_FIELDS
const addrmap_token * tokenptr; const addrmap_token * tokenptr;
read32_machine_func mread; /* pointer to native read handler */ read32_space_func sread; /* pointer to native read handler */
write32_machine_func mwrite; /* pointer to native write handler */ write32_space_func swrite; /* pointer to native write handler */
read32_device_func dread; /* pointer to native device read handler */ read32_device_func dread; /* pointer to native device read handler */
write32_device_func dwrite; /* pointer to native device write handler */ write32_device_func dwrite; /* pointer to native device write handler */
read8_machine_func mread8; /* pointer to 8-bit machine read handler */ read8_space_func sread8; /* pointer to 8-bit space read handler */
write8_machine_func mwrite8; /* pointer to 8-bit machine write handler */ write8_space_func swrite8; /* pointer to 8-bit space write handler */
read8_device_func dread8; /* pointer to 8-bit device read handler */ read8_device_func dread8; /* pointer to 8-bit device read handler */
write8_device_func dwrite8; /* pointer to 8-bit device write handler */ write8_device_func dwrite8; /* pointer to 8-bit device write handler */
read16_machine_func mread16; /* pointer to 16-bit machine read handler */ read16_space_func sread16; /* pointer to 16-bit space read handler */
write16_machine_func mwrite16; /* pointer to 16-bit machine write handler */ write16_space_func swrite16; /* pointer to 16-bit space write handler */
read16_device_func dread16; /* pointer to 16-bit device read handler */ read16_device_func dread16; /* pointer to 16-bit device read handler */
write16_device_func dwrite16; /* pointer to 16-bit device write handler */ write16_device_func dwrite16; /* pointer to 16-bit device write handler */
read_handler read; /* generic read handlers */ read_handler read; /* generic read handlers */
@ -376,20 +376,20 @@ union _addrmap64_token
{ {
TOKEN_COMMON_FIELDS TOKEN_COMMON_FIELDS
const addrmap_token * tokenptr; const addrmap_token * tokenptr;
read64_machine_func mread; /* pointer to native read handler */ read64_space_func sread; /* pointer to native read handler */
write64_machine_func mwrite; /* pointer to native write handler */ write64_space_func swrite; /* pointer to native write handler */
read64_device_func dread; /* pointer to native device read handler */ read64_device_func dread; /* pointer to native device read handler */
write64_device_func dwrite; /* pointer to native device write handler */ write64_device_func dwrite; /* pointer to native device write handler */
read8_machine_func mread8; /* pointer to 8-bit machine read handler */ read8_space_func sread8; /* pointer to 8-bit space read handler */
write8_machine_func mwrite8; /* pointer to 8-bit machine write handler */ write8_space_func swrite8; /* pointer to 8-bit space write handler */
read8_device_func dread8; /* pointer to 8-bit device read handler */ read8_device_func dread8; /* pointer to 8-bit device read handler */
write8_device_func dwrite8; /* pointer to 8-bit device write handler */ write8_device_func dwrite8; /* pointer to 8-bit device write handler */
read16_machine_func mread16; /* pointer to 16-bit machine read handler */ read16_space_func sread16; /* pointer to 16-bit space read handler */
write16_machine_func mwrite16; /* pointer to 16-bit machine write handler */ write16_space_func swrite16; /* pointer to 16-bit space write handler */
read16_device_func dread16; /* pointer to 16-bit device read handler */ read16_device_func dread16; /* pointer to 16-bit device read handler */
write16_device_func dwrite16; /* pointer to 16-bit device write handler */ write16_device_func dwrite16; /* pointer to 16-bit device write handler */
read32_machine_func mread32; /* pointer to 32-bit machine read handler */ read32_space_func sread32; /* pointer to 32-bit space read handler */
write32_machine_func mwrite32; /* pointer to 32-bit machine write handler */ write32_space_func swrite32; /* pointer to 32-bit space write handler */
read32_device_func dread32; /* pointer to 32-bit device read handler */ read32_device_func dread32; /* pointer to 32-bit device read handler */
write32_device_func dwrite32; /* pointer to 32-bit device write handler */ write32_device_func dwrite32; /* pointer to 32-bit device write handler */
read_handler read; /* generic read handlers */ read_handler read; /* generic read handlers */
@ -409,7 +409,7 @@ union _addrmap64_token
#define OPBASE_HANDLER(name) offs_t name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t address, opbase_data *opbase) #define OPBASE_HANDLER(name) offs_t name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t address, opbase_data *opbase)
/* machine read/write handler function macros */ /* space read/write handler function macros */
#define READ8_HANDLER(name) UINT8 name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset) #define READ8_HANDLER(name) UINT8 name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset)
#define WRITE8_HANDLER(name) void name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data) #define WRITE8_HANDLER(name) void name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data)
#define READ16_HANDLER(name) UINT16 name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask) #define READ16_HANDLER(name) UINT16 name(ATTR_UNUSED const address_space *space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask)
@ -696,42 +696,42 @@ union _addrmap64_token
#define AM_READ(_handler) \ #define AM_READ(_handler) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 0, 8, 0, 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 0, 8, 0, 8), \
TOKEN_PTR(mread, _handler), \ TOKEN_PTR(sread, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_READ8(_handler, _unitmask) \ #define AM_READ8(_handler, _unitmask) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 8, 8, UNITMASK8(_unitmask), 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 8, 8, UNITMASK8(_unitmask), 8), \
TOKEN_PTR(mread8, _handler), \ TOKEN_PTR(sread8, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_READ16(_handler, _unitmask) \ #define AM_READ16(_handler, _unitmask) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 16, 8, UNITMASK16(_unitmask), 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 16, 8, UNITMASK16(_unitmask), 8), \
TOKEN_PTR(mread16, _handler), \ TOKEN_PTR(sread16, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_READ32(_handler, _unitmask) \ #define AM_READ32(_handler, _unitmask) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 32, 8, UNITMASK32(_unitmask), 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_READ, 8, 32, 8, UNITMASK32(_unitmask), 8), \
TOKEN_PTR(mread32, _handler), \ TOKEN_PTR(sread32, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_WRITE(_handler) \ #define AM_WRITE(_handler) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 0, 8, 0, 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 0, 8, 0, 8), \
TOKEN_PTR(mwrite, _handler), \ TOKEN_PTR(swrite, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_WRITE8(_handler, _unitmask) \ #define AM_WRITE8(_handler, _unitmask) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 8, 8, UNITMASK8(_unitmask), 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 8, 8, UNITMASK8(_unitmask), 8), \
TOKEN_PTR(mwrite8, _handler), \ TOKEN_PTR(swrite8, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_WRITE16(_handler, _unitmask) \ #define AM_WRITE16(_handler, _unitmask) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 16, 8, UNITMASK16(_unitmask), 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 16, 8, UNITMASK16(_unitmask), 8), \
TOKEN_PTR(mwrite16, _handler), \ TOKEN_PTR(swrite16, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_WRITE32(_handler, _unitmask) \ #define AM_WRITE32(_handler, _unitmask) \
TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 32, 8, UNITMASK32(_unitmask), 8), \ TOKEN_UINT32_PACK3(ADDRMAP_TOKEN_WRITE, 8, 32, 8, UNITMASK32(_unitmask), 8), \
TOKEN_PTR(mwrite32, _handler), \ TOKEN_PTR(swrite32, _handler), \
TOKEN_STRING(#_handler), TOKEN_STRING(#_handler),
#define AM_DEVREAD(_type, _tag, _handler) \ #define AM_DEVREAD(_type, _tag, _handler) \
@ -917,10 +917,10 @@ int memory_get_log_unmap(int spacenum);
/* dynamic address space mapping */ /* dynamic address space mapping */
void * _memory_install_handler (running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, FPTR rhandler, FPTR whandler, const char *rhandler_name, const char *whandler_name); void * _memory_install_handler (running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, FPTR rhandler, FPTR whandler, const char *rhandler_name, const char *whandler_name);
UINT8 * _memory_install_handler8 (running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_machine_func rhandler, write8_machine_func whandler, const char *rhandler_name, const char *whandler_name); UINT8 * _memory_install_handler8 (running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_space_func rhandler, write8_space_func whandler, const char *rhandler_name, const char *whandler_name);
UINT16 * _memory_install_handler16(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_machine_func rhandler, write16_machine_func whandler, const char *rhandler_name, const char *whandler_name); UINT16 * _memory_install_handler16(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_space_func rhandler, write16_space_func whandler, const char *rhandler_name, const char *whandler_name);
UINT32 * _memory_install_handler32(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_machine_func rhandler, write32_machine_func whandler, const char *rhandler_name, const char *whandler_name); UINT32 * _memory_install_handler32(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_space_func rhandler, write32_space_func whandler, const char *rhandler_name, const char *whandler_name);
UINT64 * _memory_install_handler64(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_machine_func rhandler, write64_machine_func whandler, const char *rhandler_name, const char *whandler_name); UINT64 * _memory_install_handler64(running_machine *machine, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_space_func rhandler, write64_space_func whandler, const char *rhandler_name, const char *whandler_name);
/* dynamic device address space mapping */ /* dynamic device address space mapping */
void * _memory_install_device_handler (const device_config *device, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, FPTR rhandler, FPTR whandler, const char *rhandler_name, const char *whandler_name); void * _memory_install_device_handler (const device_config *device, int cpunum, int spacenum, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, FPTR rhandler, FPTR whandler, const char *rhandler_name, const char *whandler_name);

View File

@ -7,7 +7,7 @@ typedef struct _ym2151_interface ym2151_interface;
struct _ym2151_interface struct _ym2151_interface
{ {
void (*irqhandler)(running_machine *machine, int irq); void (*irqhandler)(running_machine *machine, int irq);
write8_machine_func portwritehandler; write8_space_func portwritehandler;
}; };
READ8_HANDLER( ym2151_status_port_0_r ); READ8_HANDLER( ym2151_status_port_0_r );

View File

@ -17,10 +17,10 @@ struct _y8950_interface
{ {
void (*handler)(running_machine *machine, int linestate); void (*handler)(running_machine *machine, int linestate);
read8_machine_func keyboardread; read8_space_func keyboardread;
write8_machine_func keyboardwrite; write8_space_func keyboardwrite;
read8_machine_func portread; read8_space_func portread;
write8_machine_func portwrite; write8_space_func portwrite;
}; };

View File

@ -66,10 +66,10 @@ struct _ay8910_interface
{ {
int flags; /* Flags */ int flags; /* Flags */
int res_load[3]; /* Load on channel in ohms */ int res_load[3]; /* Load on channel in ohms */
read8_machine_func portAread; read8_space_func portAread;
read8_machine_func portBread; read8_space_func portBread;
write8_machine_func portAwrite; write8_space_func portAwrite;
write8_machine_func portBwrite; write8_space_func portBwrite;
}; };

View File

@ -70,7 +70,7 @@ typedef struct
void (*irq_callback)(running_machine *machine, int); // IRQ callback void (*irq_callback)(running_machine *machine, int); // IRQ callback
read8_machine_func adc_read; // callback for the 5503's built-in analog to digital converter read8_space_func adc_read; // callback for the 5503's built-in analog to digital converter
INT8 oscsenabled; // # of oscillators enabled INT8 oscsenabled; // # of oscillators enabled

View File

@ -7,7 +7,7 @@ typedef struct _es5503_interface es5503_interface;
struct _es5503_interface struct _es5503_interface
{ {
void (*irq_callback)(running_machine *machine, int state); void (*irq_callback)(running_machine *machine, int state);
read8_machine_func adc_read; read8_space_func adc_read;
UINT8 *wave_memory; UINT8 *wave_memory;
}; };

View File

@ -181,10 +181,10 @@ struct POKEYregisters
int timer_param[3]; /* computed parameters for these timers */ int timer_param[3]; /* computed parameters for these timers */
emu_timer *rtimer; /* timer for calculating the random offset */ emu_timer *rtimer; /* timer for calculating the random offset */
emu_timer *ptimer[8]; /* pot timers */ emu_timer *ptimer[8]; /* pot timers */
read8_machine_func pot_r[8]; read8_space_func pot_r[8];
read8_machine_func allpot_r; read8_space_func allpot_r;
read8_machine_func serin_r; read8_space_func serin_r;
write8_machine_func serout_w; write8_space_func serout_w;
void (*interrupt_cb)(running_machine *machine, int mask); void (*interrupt_cb)(running_machine *machine, int mask);
UINT8 AUDF[4]; /* AUDFx (D200, D202, D204, D206) */ UINT8 AUDF[4]; /* AUDFx (D200, D202, D204, D206) */
UINT8 AUDC[4]; /* AUDCx (D201, D203, D205, D207) */ UINT8 AUDC[4]; /* AUDCx (D201, D203, D205, D207) */

View File

@ -71,10 +71,10 @@
typedef struct _pokey_interface pokey_interface; typedef struct _pokey_interface pokey_interface;
struct _pokey_interface struct _pokey_interface
{ {
read8_machine_func pot_r[8]; read8_space_func pot_r[8];
read8_machine_func allpot_r; read8_space_func allpot_r;
read8_machine_func serin_r; read8_space_func serin_r;
write8_machine_func serout_w; write8_space_func serout_w;
void (*interrupt_cb)(running_machine *machine, int mask); void (*interrupt_cb)(running_machine *machine, int mask);
}; };

View File

@ -163,7 +163,7 @@ typedef struct
UINT32 noise_tab[32]; /* 17bit Noise Generator periods */ UINT32 noise_tab[32]; /* 17bit Noise Generator periods */
void (*irqhandler)(running_machine *machine, int irq); /* IRQ function handler */ void (*irqhandler)(running_machine *machine, int irq); /* IRQ function handler */
write8_machine_func porthandler; /* port write function handler */ write8_space_func porthandler; /* port write function handler */
unsigned int clock; /* chip clock in Hz (passed from 2151intf.c) */ unsigned int clock; /* chip clock in Hz (passed from 2151intf.c) */
unsigned int sampfreq; /* sampling frequency in Hz (passed from 2151intf.c) */ unsigned int sampfreq; /* sampling frequency in Hz (passed from 2151intf.c) */
@ -2493,7 +2493,7 @@ void ym2151_set_irq_handler(void *chip, void(*handler)(running_machine *machine,
PSG->irqhandler = handler; PSG->irqhandler = handler;
} }
void ym2151_set_port_write_handler(void *chip, write8_machine_func handler) void ym2151_set_port_write_handler(void *chip, write8_space_func handler)
{ {
YM2151 *PSG = chip; YM2151 *PSG = chip;
PSG->porthandler = handler; PSG->porthandler = handler;

View File

@ -81,7 +81,7 @@ int ym2151_read_status(void *chip);
void ym2151_set_irq_handler(void *chip, void (*handler)(running_machine *machine, int irq)); void ym2151_set_irq_handler(void *chip, void (*handler)(running_machine *machine, int irq));
/* set port write handler on YM2151 chip number 'n'*/ /* set port write handler on YM2151 chip number 'n'*/
void ym2151_set_port_write_handler(void *chip, write8_machine_func handler); void ym2151_set_port_write_handler(void *chip, write8_space_func handler);
/* refresh chip when load state */ /* refresh chip when load state */
STATE_POSTLOAD( ym2151_postload ); STATE_POSTLOAD( ym2151_postload );

View File

@ -108,8 +108,8 @@ typedef struct
UINT8 ext_read; UINT8 ext_read;
const UINT8 *rom; const UINT8 *rom;
read8_machine_func ext_mem_read; read8_space_func ext_mem_read;
write8_machine_func ext_mem_write; write8_space_func ext_mem_write;
void (*irq_callback)(running_machine *, int); void (*irq_callback)(running_machine *, int);
int index; int index;
@ -1731,7 +1731,7 @@ static void init_state(YMF271Chip *chip)
state_save_register_item("ymf271", chip->index, chip->ext_read); state_save_register_item("ymf271", chip->index, chip->ext_read);
} }
static void ymf271_init(YMF271Chip *chip, UINT8 *rom, void (*cb)(running_machine *,int), read8_machine_func ext_read, write8_machine_func ext_write) static void ymf271_init(YMF271Chip *chip, UINT8 *rom, void (*cb)(running_machine *,int), read8_space_func ext_read, write8_space_func ext_write)
{ {
chip->timA = timer_alloc(ymf271_timer_a_tick, chip); chip->timA = timer_alloc(ymf271_timer_a_tick, chip);
chip->timB = timer_alloc(ymf271_timer_b_tick, chip); chip->timB = timer_alloc(ymf271_timer_b_tick, chip);

View File

@ -6,8 +6,8 @@
typedef struct _ymf271_interface ymf271_interface; typedef struct _ymf271_interface ymf271_interface;
struct _ymf271_interface struct _ymf271_interface
{ {
read8_machine_func ext_read; /* external memory read */ read8_space_func ext_read; /* external memory read */
write8_machine_func ext_write; /* external memory write */ write8_space_func ext_write; /* external memory write */
void (*irq_callback)(running_machine *machine, int state); /* irq callback */ void (*irq_callback)(running_machine *machine, int state); /* irq callback */
}; };

View File

@ -92,8 +92,8 @@ struct YMZ280BChip
void (*irq_callback)(running_machine *, int); /* IRQ callback */ void (*irq_callback)(running_machine *, int); /* IRQ callback */
struct YMZ280BVoice voice[8]; /* the 8 voices */ struct YMZ280BVoice voice[8]; /* the 8 voices */
UINT32 rom_readback_addr; /* where the CPU can read the ROM */ UINT32 rom_readback_addr; /* where the CPU can read the ROM */
read8_machine_func ext_ram_read; /* external RAM read handler */ read8_space_func ext_ram_read; /* external RAM read handler */
write8_machine_func ext_ram_write; /* external RAM write handler */ write8_space_func ext_ram_write; /* external RAM write handler */
#if MAKE_WAVS #if MAKE_WAVS
void * wavresample; /* resampled waveform */ void * wavresample; /* resampled waveform */

View File

@ -15,8 +15,8 @@ typedef struct _ymz280b_interface ymz280b_interface;
struct _ymz280b_interface struct _ymz280b_interface
{ {
void (*irq_callback)(running_machine *machine, int state); /* irq callback */ void (*irq_callback)(running_machine *machine, int state); /* irq callback */
read8_machine_func ext_read; /* external RAM read */ read8_space_func ext_read; /* external RAM read */
write8_machine_func ext_write; /* external RAM write */ write8_space_func ext_write; /* external RAM write */
}; };
READ8_HANDLER ( ymz280b_status_0_r ); READ8_HANDLER ( ymz280b_status_0_r );

View File

@ -63,8 +63,8 @@ static UINT8 ssio_duty_cycle[2][3];
static UINT8 ssio_ayvolume_lookup[16]; static UINT8 ssio_ayvolume_lookup[16];
static UINT8 ssio_custom_input_mask[5]; static UINT8 ssio_custom_input_mask[5];
static UINT8 ssio_custom_output_mask[2]; static UINT8 ssio_custom_output_mask[2];
static read8_machine_func ssio_custom_input[5]; static read8_space_func ssio_custom_input[5];
static write8_machine_func ssio_custom_output[2]; static write8_space_func ssio_custom_output[2];
/* Chip Squeak Deluxe-specific globals */ /* Chip Squeak Deluxe-specific globals */
static UINT8 csdeluxe_sound_cpu; static UINT8 csdeluxe_sound_cpu;
@ -430,13 +430,13 @@ WRITE8_HANDLER( ssio_output_port_w )
(*ssio_custom_output[which])(space, offset, data & ssio_custom_output_mask[which]); (*ssio_custom_output[which])(space, offset, data & ssio_custom_output_mask[which]);
} }
void ssio_set_custom_input(int which, int mask, read8_machine_func handler) void ssio_set_custom_input(int which, int mask, read8_space_func handler)
{ {
ssio_custom_input[which] = handler; ssio_custom_input[which] = handler;
ssio_custom_input_mask[which] = mask; ssio_custom_input_mask[which] = mask;
} }
void ssio_set_custom_output(int which, int mask, write8_machine_func handler) void ssio_set_custom_output(int which, int mask, write8_space_func handler)
{ {
ssio_custom_output[which/4] = handler; ssio_custom_output[which/4] = handler;
ssio_custom_output_mask[which/4] = mask; ssio_custom_output_mask[which/4] = mask;

View File

@ -20,8 +20,8 @@ READ8_HANDLER( ssio_status_r );
READ8_HANDLER( ssio_input_port_r ); READ8_HANDLER( ssio_input_port_r );
WRITE8_HANDLER( ssio_output_port_w ); WRITE8_HANDLER( ssio_output_port_w );
void ssio_reset_w(int state); void ssio_reset_w(int state);
void ssio_set_custom_input(int which, int mask, read8_machine_func handler); void ssio_set_custom_input(int which, int mask, read8_space_func handler);
void ssio_set_custom_output(int which, int mask, write8_machine_func handler); void ssio_set_custom_output(int which, int mask, write8_space_func handler);
WRITE8_HANDLER( csdeluxe_data_w ); WRITE8_HANDLER( csdeluxe_data_w );
READ8_HANDLER( csdeluxe_status_r ); READ8_HANDLER( csdeluxe_status_r );

View File

@ -2261,7 +2261,7 @@ static void security_w(UINT8 data)
/*****************************************************************************/ /*****************************************************************************/
static void init_lights(running_machine *machine, write32_machine_func out1, write32_machine_func out2, write32_machine_func out3) static void init_lights(running_machine *machine, write32_space_func out1, write32_space_func out2, write32_space_func out3)
{ {
if(!out1) out1 = lamp_output_w; if(!out1) out1 = lamp_output_w;
if(!out2) out1 = lamp_output2_w; if(!out2) out1 = lamp_output2_w;

View File

@ -1163,7 +1163,7 @@ static READ32_HANDLER( speedup9_r ) { return generic_speedup(space->machine, &sp
static READ32_HANDLER( speedup10_r ) { return generic_speedup(space->machine, &speedup_table[10]); } static READ32_HANDLER( speedup10_r ) { return generic_speedup(space->machine, &speedup_table[10]); }
static READ32_HANDLER( speedup11_r ) { return generic_speedup(space->machine, &speedup_table[11]); } static READ32_HANDLER( speedup11_r ) { return generic_speedup(space->machine, &speedup_table[11]); }
static const read32_machine_func speedup_handlers[] = static const read32_space_func speedup_handlers[] =
{ {
speedup0_r, speedup1_r, speedup2_r, speedup3_r, speedup0_r, speedup1_r, speedup2_r, speedup3_r,
speedup4_r, speedup5_r, speedup6_r, speedup7_r, speedup4_r, speedup5_r, speedup6_r, speedup7_r,

View File

@ -764,7 +764,7 @@ ADDRESS_MAP_END
static const struct static const struct
{ {
const char *s_name; const char *s_name;
read32_machine_func keycus_r; read32_space_func keycus_r;
int n_daughterboard; int n_daughterboard;
} namcos11_config_table[] = } namcos11_config_table[] =
{ {

View File

@ -44,8 +44,8 @@ static UINT8 adc_select;
static UINT8 irq2_state; static UINT8 irq2_state;
static UINT8 vblank_irq_state; static UINT8 vblank_irq_state;
static read16_machine_func custom_io_r; static read16_space_func custom_io_r;
static write16_machine_func custom_io_w; static write16_space_func custom_io_w;
static const UINT8 *custom_map; static const UINT8 *custom_map;

View File

@ -163,8 +163,8 @@ static UINT16 *workram;
static UINT8 video_control; static UINT8 video_control;
static UINT8 mj_input_num; static UINT8 mj_input_num;
static read16_machine_func custom_io_r; static read16_space_func custom_io_r;
static write16_machine_func custom_io_w; static write16_space_func custom_io_w;
static void (*lamp_changed_w)(UINT8 changed, UINT8 newval); static void (*lamp_changed_w)(UINT8 changed, UINT8 newval);
static void (*i8751_vblank_hook)(running_machine *machine); static void (*i8751_vblank_hook)(running_machine *machine);

View File

@ -911,8 +911,8 @@ static int atomicp_sound_rate;
static UINT8 has_sound_cpu; static UINT8 has_sound_cpu;
static read16_machine_func custom_io_r; static read16_space_func custom_io_r;
static write16_machine_func custom_io_w; static write16_space_func custom_io_w;
static UINT8 disable_screen_blanking; static UINT8 disable_screen_blanking;
static UINT8 mj_input_num; static UINT8 mj_input_num;

View File

@ -61,8 +61,8 @@ static UINT8 rom_board;
static UINT8 misc_io_data[0x10]; static UINT8 misc_io_data[0x10];
static UINT8 mcu_data; static UINT8 mcu_data;
static read16_machine_func custom_io_r; static read16_space_func custom_io_r;
static write16_machine_func custom_io_w; static write16_space_func custom_io_w;
static UINT8 wwally_last_x[3], wwally_last_y[3]; static UINT8 wwally_last_x[3], wwally_last_y[3];
static UINT8 lghost_value, lghost_select; static UINT8 lghost_value, lghost_select;

View File

@ -358,8 +358,8 @@ static UINT16 sound_bank;
/* I/O chips and custom I/O */ /* I/O chips and custom I/O */
static UINT8 misc_io_data[2][0x10]; static UINT8 misc_io_data[2][0x10];
static read16_machine_func custom_io_r[2]; static read16_space_func custom_io_r[2];
static write16_machine_func custom_io_w[2]; static write16_space_func custom_io_w[2];
static UINT8 analog_bank; static UINT8 analog_bank;
static UINT8 analog_value[4]; static UINT8 analog_value[4];
static UINT8 sonic_last[6]; static UINT8 sonic_last[6];
@ -3738,7 +3738,7 @@ ROM_END
* *
*************************************/ *************************************/
static void segas32_common_init(read16_machine_func custom_r, write16_machine_func custom_w, const UINT8 *default_eeprom) static void segas32_common_init(read16_space_func custom_r, write16_space_func custom_w, const UINT8 *default_eeprom)
{ {
/* reset the custom handlers and other pointers */ /* reset the custom handlers and other pointers */
custom_io_r[0] = custom_r; custom_io_r[0] = custom_r;

View File

@ -50,7 +50,7 @@ starfira has one less rom in total than starfire but everything passes as
static UINT8 fireone_select; static UINT8 fireone_select;
static read8_machine_func input_read; static read8_space_func input_read;

View File

@ -114,10 +114,10 @@ static UINT8 *palette_ram;
static UINT8 *empty_ram; static UINT8 *empty_ram;
static UINT8 *shared_ram; static UINT8 *shared_ram;
static read8_machine_func porte0_r; static read8_space_func porte0_r;
static read8_machine_func porte1_r; static read8_space_func porte1_r;
static read8_machine_func portf0_r; static read8_space_func portf0_r;
static read8_machine_func portf1_r; static read8_space_func portf1_r;
static int adpcm_pos; static int adpcm_pos;
static int adpcm_data; static int adpcm_data;

View File

@ -483,8 +483,8 @@ static struct dynamic_address
{ {
offs_t start; offs_t start;
offs_t end; offs_t end;
read32_machine_func mread; read32_space_func mread;
write32_machine_func mwrite; write32_space_func mwrite;
read32_device_func dread; read32_device_func dread;
write32_device_func dwrite; write32_device_func dwrite;
const device_config *device; const device_config *device;
@ -1529,7 +1529,7 @@ static WRITE32_HANDLER( dcs3_fifo_full_w )
#define add_dynamic_address(s,e,r,w) _add_dynamic_address(s,e,r,w,#r,#w) #define add_dynamic_address(s,e,r,w) _add_dynamic_address(s,e,r,w,#r,#w)
#define add_dynamic_device_address(d,s,e,r,w) _add_dynamic_device_address(d,s,e,r,w,#r,#w) #define add_dynamic_device_address(d,s,e,r,w) _add_dynamic_device_address(d,s,e,r,w,#r,#w)
INLINE void _add_dynamic_address(offs_t start, offs_t end, read32_machine_func read, write32_machine_func write, const char *rdname, const char *wrname) INLINE void _add_dynamic_address(offs_t start, offs_t end, read32_space_func read, write32_space_func write, const char *rdname, const char *wrname)
{ {
dynamic[dynamic_count].start = start; dynamic[dynamic_count].start = start;
dynamic[dynamic_count].end = end; dynamic[dynamic_count].end = end;

View File

@ -129,8 +129,8 @@ static const pia6821_interface a800xl_pia_interface =
void a600xl_mmu(running_machine *machine, UINT8 new_mmu) void a600xl_mmu(running_machine *machine, UINT8 new_mmu)
{ {
read8_machine_func rbank2; read8_space_func rbank2;
write8_machine_func wbank2; write8_space_func wbank2;
/* check if self-test ROM changed */ /* check if self-test ROM changed */
if ( new_mmu & 0x80 ) if ( new_mmu & 0x80 )
@ -152,8 +152,8 @@ void a600xl_mmu(running_machine *machine, UINT8 new_mmu)
void a800xl_mmu(running_machine *machine, UINT8 new_mmu) void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
{ {
read8_machine_func rbank1, rbank2, rbank3, rbank4; read8_space_func rbank1, rbank2, rbank3, rbank4;
write8_machine_func wbank1, wbank2, wbank3, wbank4; write8_space_func wbank1, wbank2, wbank3, wbank4;
UINT8 *base1, *base2, *base3, *base4; UINT8 *base1, *base2, *base3, *base4;
/* check if memory C000-FFFF changed */ /* check if memory C000-FFFF changed */

View File

@ -28,8 +28,8 @@ static UINT8 latch1;
static UINT8 tape_crc16_lsb[256]; static UINT8 tape_crc16_lsb[256];
static UINT8 tape_crc16_msb[256]; static UINT8 tape_crc16_msb[256];
static read8_machine_func decocass_dongle_r; static read8_space_func decocass_dongle_r;
static write8_machine_func decocass_dongle_w; static write8_space_func decocass_dongle_w;
static UINT8 decocass_reset; static UINT8 decocass_reset;
static UINT8 i8041_p1; static UINT8 i8041_p1;

View File

@ -466,7 +466,7 @@ DRIVER_INIT( mkyawdim )
/********************** Terminator 2 **********************/ /********************** Terminator 2 **********************/
static void term2_init_common(running_machine *machine, write16_machine_func hack_w) static void term2_init_common(running_machine *machine, write16_space_func hack_w)
{ {
/* protection */ /* protection */
static const struct protection_data term2_protection_data = static const struct protection_data term2_protection_data =

View File

@ -145,8 +145,8 @@ TODO:
struct namcoio struct namcoio
{ {
INT32 type; INT32 type;
read8_machine_func in[4]; read8_space_func in[4];
write8_machine_func out[2]; write8_space_func out[2];
INT32 reset; INT32 reset;
INT32 lastcoins,lastbuttons; INT32 lastcoins,lastbuttons;
INT32 credits; INT32 credits;

View File

@ -23,8 +23,8 @@ enum
struct namcoio_interface struct namcoio_interface
{ {
read8_machine_func in[4]; /* read handlers for ports A-D */ read8_space_func in[4]; /* read handlers for ports A-D */
write8_machine_func out[2]; /* write handlers for ports A-B */ write8_space_func out[2]; /* write handlers for ports A-B */
}; };

View File

@ -20,8 +20,8 @@ static UINT8 *s1ram;
/* Bank handler definitions */ /* Bank handler definitions */
typedef struct typedef struct
{ {
read8_machine_func bank_handler_r; read8_space_func bank_handler_r;
write8_machine_func bank_handler_w; write8_space_func bank_handler_w;
int bank_offset; int bank_offset;
UINT8 *bank_pointer; UINT8 *bank_pointer;
} bankhandler; } bankhandler;
@ -64,7 +64,7 @@ static WRITE8_HANDLER( bank14_w ) { (*namcos1_active_bank[13].bank_handler_w)(sp
static WRITE8_HANDLER( bank15_w ) { (*namcos1_active_bank[14].bank_handler_w)(space, offset + namcos1_active_bank[14].bank_offset, data); } static WRITE8_HANDLER( bank15_w ) { (*namcos1_active_bank[14].bank_handler_w)(space, offset + namcos1_active_bank[14].bank_offset, data); }
static WRITE8_HANDLER( bank16_w ) { (*namcos1_active_bank[15].bank_handler_w)(space, offset + namcos1_active_bank[15].bank_offset, data); } static WRITE8_HANDLER( bank16_w ) { (*namcos1_active_bank[15].bank_handler_w)(space, offset + namcos1_active_bank[15].bank_offset, data); }
static const read8_machine_func ram_bank_handler_r[16] = static const read8_space_func ram_bank_handler_r[16] =
{ {
SMH_BANK1 ,SMH_BANK2 ,SMH_BANK3 ,SMH_BANK4 , SMH_BANK1 ,SMH_BANK2 ,SMH_BANK3 ,SMH_BANK4 ,
SMH_BANK5 ,SMH_BANK6 ,SMH_BANK7 ,SMH_BANK8 , SMH_BANK5 ,SMH_BANK6 ,SMH_BANK7 ,SMH_BANK8 ,
@ -72,7 +72,7 @@ static const read8_machine_func ram_bank_handler_r[16] =
SMH_BANK13,SMH_BANK14,SMH_BANK15,SMH_BANK16 SMH_BANK13,SMH_BANK14,SMH_BANK15,SMH_BANK16
}; };
static const write8_machine_func ram_bank_handler_w[16] = static const write8_space_func ram_bank_handler_w[16] =
{ {
SMH_BANK1 ,SMH_BANK2 ,SMH_BANK3 ,SMH_BANK4 , SMH_BANK1 ,SMH_BANK2 ,SMH_BANK3 ,SMH_BANK4 ,
SMH_BANK5 ,SMH_BANK6 ,SMH_BANK7 ,SMH_BANK8 , SMH_BANK5 ,SMH_BANK6 ,SMH_BANK7 ,SMH_BANK8 ,
@ -80,7 +80,7 @@ static const write8_machine_func ram_bank_handler_w[16] =
SMH_BANK13,SMH_BANK14,SMH_BANK15,SMH_BANK16 SMH_BANK13,SMH_BANK14,SMH_BANK15,SMH_BANK16
}; };
static const read8_machine_func io_bank_handler_r[16] = static const read8_space_func io_bank_handler_r[16] =
{ {
bank1_r, bank2_r, bank3_r, bank4_r, bank1_r, bank2_r, bank3_r, bank4_r,
bank5_r, bank6_r, bank7_r, bank8_r, bank5_r, bank6_r, bank7_r, bank8_r,
@ -88,7 +88,7 @@ static const read8_machine_func io_bank_handler_r[16] =
bank13_r, bank14_r, bank15_r, bank16_r bank13_r, bank14_r, bank15_r, bank16_r
}; };
static const write8_machine_func io_bank_handler_w[16] = static const write8_space_func io_bank_handler_w[16] =
{ {
bank1_w, bank2_w, bank3_w, bank4_w, bank1_w, bank2_w, bank3_w, bank4_w,
bank5_w, bank6_w, bank7_w, bank8_w, bank5_w, bank6_w, bank7_w, bank8_w,
@ -770,7 +770,7 @@ WRITE8_HANDLER( namcos1_subcpu_bank_w )
* * * *
*******************************************************************************/ *******************************************************************************/
static void namcos1_install_bank(int start,int end,read8_machine_func hr,write8_machine_func hw, static void namcos1_install_bank(int start,int end,read8_space_func hr,write8_space_func hw,
int offset,UINT8 *pointer) int offset,UINT8 *pointer)
{ {
int i; int i;
@ -787,7 +787,7 @@ static void namcos1_install_bank(int start,int end,read8_machine_func hr,write8_
static void namcos1_build_banks(running_machine *machine,read8_machine_func key_r,write8_machine_func key_w) static void namcos1_build_banks(running_machine *machine,read8_space_func key_r,write8_space_func key_w)
{ {
int i; int i;
@ -959,8 +959,8 @@ WRITE8_HANDLER( namcos1_mcu_patch_w )
struct namcos1_specific struct namcos1_specific
{ {
/* keychip */ /* keychip */
read8_machine_func key_r; read8_space_func key_r;
write8_machine_func key_w; write8_space_func key_w;
int key_id; int key_id;
int key_reg1; int key_reg1;
int key_reg2; int key_reg2;

View File

@ -174,7 +174,7 @@ void segaic16_memory_mapper_set_decrypted(running_machine *machine, UINT8 *decry
offs_t region_size = region_size_map[chip->regs[rgn->regbase] & 3]; offs_t region_size = region_size_map[chip->regs[rgn->regbase] & 3];
offs_t region_base = (chip->regs[rgn->regbase + 1] << 16) & ~region_size; offs_t region_base = (chip->regs[rgn->regbase + 1] << 16) & ~region_size;
offs_t region_start = region_base + (rgn->regoffs & region_size); offs_t region_start = region_base + (rgn->regoffs & region_size);
read16_machine_func read = rgn->read; read16_space_func read = rgn->read;
int banknum = 0; int banknum = 0;
/* skip non-ROM regions */ /* skip non-ROM regions */
@ -339,8 +339,8 @@ static void update_memory_mapping(running_machine *machine, struct memory_mapper
offs_t region_mirror = rgn->mirror & region_size; offs_t region_mirror = rgn->mirror & region_size;
offs_t region_start = region_base + (rgn->regoffs & region_size); offs_t region_start = region_base + (rgn->regoffs & region_size);
offs_t region_end = region_start + ((rgn->length - 1 < region_size) ? rgn->length - 1 : region_size); offs_t region_end = region_start + ((rgn->length - 1 < region_size) ? rgn->length - 1 : region_size);
write16_machine_func write = rgn->write; write16_space_func write = rgn->write;
read16_machine_func read = rgn->read; read16_space_func read = rgn->read;
int banknum = 0; int banknum = 0;
/* check for mapping to banks */ /* check for mapping to banks */

View File

@ -16,8 +16,8 @@ struct _segaic16_memory_map_entry
offs_t length; /* length in bytes of this entry */ offs_t length; /* length in bytes of this entry */
offs_t mirror; /* maximal mirror values (will be truncated) */ offs_t mirror; /* maximal mirror values (will be truncated) */
offs_t romoffset; /* offset within REGION_CPU0, or ~0 for independent entries */ offs_t romoffset; /* offset within REGION_CPU0, or ~0 for independent entries */
read16_machine_func read; /* read handler */ read16_space_func read; /* read handler */
write16_machine_func write; /* write handler */ write16_space_func write; /* write handler */
UINT16 ** base; /* pointer to memory base */ UINT16 ** base; /* pointer to memory base */
const char * name; /* friendly name for debugging */ const char * name; /* friendly name for debugging */
}; };

View File

@ -46,7 +46,7 @@ typedef struct TAITO8741_status{
UINT8 pending4a; UINT8 pending4a;
int serial_out; int serial_out;
int coins; int coins;
read8_machine_func portHandler; read8_space_func portHandler;
}I8741; }I8741;
static const struct TAITO8741interface *intf; static const struct TAITO8741interface *intf;
@ -388,7 +388,7 @@ typedef struct josvolly_8741_struct {
UINT8 rst; UINT8 rst;
read8_machine_func initReadPort; read8_space_func initReadPort;
}JV8741; }JV8741;
static JV8741 i8741[4]; static JV8741 i8741[4];

View File

@ -17,7 +17,7 @@ struct TAITO8741interface
int num; int num;
int mode[MAX_TAITO8741]; /* program select */ int mode[MAX_TAITO8741]; /* program select */
int serial_connect[MAX_TAITO8741]; /* serial port connection */ int serial_connect[MAX_TAITO8741]; /* serial port connection */
read8_machine_func portHandler_r[MAX_TAITO8741]; /* parallel port handler */ read8_space_func portHandler_r[MAX_TAITO8741]; /* parallel port handler */
}; };
int TAITO8741_start(const struct TAITO8741interface *taito8741intf); int TAITO8741_start(const struct TAITO8741interface *taito8741intf);

View File

@ -577,12 +577,12 @@ INLINE void taitoic_drawscanline(
/* Note: various assumptions are made in these routines, typically that /* Note: various assumptions are made in these routines, typically that
only CPU#0 is of interest. If in doubt, check the routine. */ only CPU#0 is of interest. If in doubt, check the routine. */
static int has_write_handler(int cpunum, write16_machine_func handler) static int has_write_handler(int cpunum, write16_space_func handler)
{ {
const address_map *map = memory_get_address_map(cpunum, ADDRESS_SPACE_PROGRAM); const address_map *map = memory_get_address_map(cpunum, ADDRESS_SPACE_PROGRAM);
const address_map_entry *entry; const address_map_entry *entry;
for (entry = map->entrylist; entry != NULL; entry = entry->next) for (entry = map->entrylist; entry != NULL; entry = entry->next)
if (entry->write.mhandler16 == handler) if (entry->write.shandler16 == handler)
return 1; return 1;
return 0; return 0;

View File

@ -122,9 +122,9 @@ static const int nusiz[8][3] =
{ 1, 4, 0 } { 1, 4, 0 }
}; };
static read16_machine_func tia_read_input_port; static read16_space_func tia_read_input_port;
static read8_machine_func tia_get_databus; static read8_space_func tia_get_databus;
static write16_machine_func tia_vsync_callback; static write16_space_func tia_vsync_callback;
static void extend_palette(running_machine *machine) { static void extend_palette(running_machine *machine) {
int i,j; int i,j;

View File

@ -7,9 +7,9 @@
#define TIA_MAX_SCREEN_HEIGHT 342 #define TIA_MAX_SCREEN_HEIGHT 342
struct tia_interface { struct tia_interface {
read16_machine_func read_input_port; read16_space_func read_input_port;
read8_machine_func databus_contents; read8_space_func databus_contents;
write16_machine_func vsync_callback; write16_space_func vsync_callback;
}; };
PALETTE_INIT( tia_NTSC ); PALETTE_INIT( tia_NTSC );