diff options
Diffstat (limited to 'src/emu')
38 files changed, 156 insertions, 156 deletions
diff --git a/src/emu/config.c b/src/emu/config.c index 277426186eb..7da3baf3115 100644 --- a/src/emu/config.c +++ b/src/emu/config.c @@ -35,8 +35,8 @@ struct _config_type { struct _config_type * next; /* next in line */ const char * name; /* node name */ - config_callback load; /* load callback */ - config_callback save; /* save callback */ + config_callback_func load; /* load callback */ + config_callback_func save; /* save callback */ }; @@ -86,7 +86,7 @@ void config_init(running_machine *machine) * *************************************/ -void config_register(const char *nodename, config_callback load, config_callback save) +void config_register(const char *nodename, config_callback_func load, config_callback_func save) { config_type *newtype; config_type **ptype; diff --git a/src/emu/config.h b/src/emu/config.h index 11d4f15d8d7..364c0460257 100644 --- a/src/emu/config.h +++ b/src/emu/config.h @@ -43,7 +43,7 @@ enum * *************************************/ -typedef void (*config_callback)(int config_type, xml_data_node *parentnode); +typedef void (*config_callback_func)(int config_type, xml_data_node *parentnode); @@ -54,7 +54,7 @@ typedef void (*config_callback)(int config_type, xml_data_node *parentnode); *************************************/ void config_init(running_machine *machine); -void config_register(const char *nodename, config_callback load, config_callback save); +void config_register(const char *nodename, config_callback_func load, config_callback_func save); int config_load_settings(running_machine *machine); void config_save_settings(running_machine *machine); diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c index 403b69bd77d..c088103bbe5 100644 --- a/src/emu/cpu/adsp2100/2100ops.c +++ b/src/emu/cpu/adsp2100/2100ops.c @@ -90,8 +90,8 @@ INLINE void set_mstat(int new_value) adsp2100.alt = temp; } if ((new_value ^ adsp2100.mstat) & MSTAT_TIMER) - if (adsp2100.timer_callback) - (*adsp2100.timer_callback)((new_value & MSTAT_TIMER) != 0); + if (adsp2100.timer_fired_func) + (*adsp2100.timer_fired_func)((new_value & MSTAT_TIMER) != 0); if (new_value & MSTAT_STICKYV) adsp2100.astat_clear = ~(CFLAG | NFLAG | ZFLAG); else diff --git a/src/emu/cpu/adsp2100/adsp2100.c b/src/emu/cpu/adsp2100/adsp2100.c index b597a981d5a..3917c2b453a 100644 --- a/src/emu/cpu/adsp2100/adsp2100.c +++ b/src/emu/cpu/adsp2100/adsp2100.c @@ -246,7 +246,7 @@ typedef struct /* other callbacks */ RX_CALLBACK sport_rx_callback; TX_CALLBACK sport_tx_callback; - ADSP2100_TIMER_CALLBACK timer_callback; + ADSP2100_TIMER_CALLBACK timer_fired_func; } adsp2100_Regs; @@ -2174,7 +2174,7 @@ static void adsp2101_set_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are set as pointers to data or functions --- */ case CPUINFO_PTR_ADSP2100_RX_HANDLER: adsp2100.sport_rx_callback = (RX_CALLBACK)info->f; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: adsp2100.sport_tx_callback = (TX_CALLBACK)info->f; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_callback = (ADSP2100_TIMER_CALLBACK)info->f; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_fired_func = (ADSP2100_TIMER_CALLBACK)info->f; break; default: adsp21xx_set_info(state, info); @@ -2202,7 +2202,7 @@ void adsp2101_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_ADSP2100_RX_HANDLER: info->f = (genf *)adsp2100.sport_rx_callback; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: info->f = (genf *)adsp2100.sport_tx_callback; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_callback; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_fired_func; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "ADSP2101"); break; @@ -2262,7 +2262,7 @@ static void adsp2104_set_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are set as pointers to data or functions --- */ case CPUINFO_PTR_ADSP2100_RX_HANDLER: adsp2100.sport_rx_callback = (RX_CALLBACK)info->f; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: adsp2100.sport_tx_callback = (TX_CALLBACK)info->f; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_callback = (ADSP2100_TIMER_CALLBACK)info->f; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_fired_func = (ADSP2100_TIMER_CALLBACK)info->f; break; default: adsp21xx_set_info(state, info); @@ -2290,7 +2290,7 @@ void adsp2104_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_ADSP2100_RX_HANDLER: info->f = (genf *)adsp2100.sport_rx_callback; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: info->f = (genf *)adsp2100.sport_tx_callback; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_callback; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_fired_func; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "ADSP2104"); break; @@ -2347,7 +2347,7 @@ static void adsp2105_set_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are set as pointers to data or functions --- */ case CPUINFO_PTR_ADSP2100_RX_HANDLER: adsp2100.sport_rx_callback = (RX_CALLBACK)info->f; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: adsp2100.sport_tx_callback = (TX_CALLBACK)info->f; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_callback = (ADSP2100_TIMER_CALLBACK)info->f; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_fired_func = (ADSP2100_TIMER_CALLBACK)info->f; break; default: adsp21xx_set_info(state, info); @@ -2372,7 +2372,7 @@ void adsp2105_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_ADSP2100_RX_HANDLER: info->f = (genf *)adsp2100.sport_rx_callback; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: info->f = (genf *)adsp2100.sport_tx_callback; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_callback; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_fired_func; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "ADSP2105"); break; @@ -2432,7 +2432,7 @@ static void adsp2115_set_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are set as pointers to data or functions --- */ case CPUINFO_PTR_ADSP2100_RX_HANDLER: adsp2100.sport_rx_callback = (RX_CALLBACK)info->f; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: adsp2100.sport_tx_callback = (TX_CALLBACK)info->f; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_callback = (ADSP2100_TIMER_CALLBACK)info->f; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_fired_func = (ADSP2100_TIMER_CALLBACK)info->f; break; default: adsp21xx_set_info(state, info); @@ -2460,7 +2460,7 @@ void adsp2115_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_ADSP2100_RX_HANDLER: info->f = (genf *)adsp2100.sport_rx_callback; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: info->f = (genf *)adsp2100.sport_tx_callback; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_callback; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_fired_func; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "ADSP2115"); break; @@ -2523,7 +2523,7 @@ static void adsp2181_set_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are set as pointers to data or functions --- */ case CPUINFO_PTR_ADSP2100_RX_HANDLER: adsp2100.sport_rx_callback = (RX_CALLBACK)info->f; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: adsp2100.sport_tx_callback = (TX_CALLBACK)info->f; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_callback = (ADSP2100_TIMER_CALLBACK)info->f; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: adsp2100.timer_fired_func = (ADSP2100_TIMER_CALLBACK)info->f; break; default: adsp21xx_set_info(state, info); @@ -2558,7 +2558,7 @@ void adsp2181_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_ADSP2100_RX_HANDLER: info->f = (genf *)adsp2100.sport_rx_callback; break; case CPUINFO_PTR_ADSP2100_TX_HANDLER: info->f = (genf *)adsp2100.sport_tx_callback; break; - case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_callback; break; + case CPUINFO_PTR_ADSP2100_TIMER_HANDLER: info->f = (genf *)adsp2100.timer_fired_func; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "ADSP2181"); break; diff --git a/src/emu/cpu/drcfe.c b/src/emu/cpu/drcfe.c index e0a4a966199..05dbe43b5c4 100644 --- a/src/emu/cpu/drcfe.c +++ b/src/emu/cpu/drcfe.c @@ -44,12 +44,12 @@ struct _drcfe_state UINT32 window_end; /* code window end offset = startpc + window_end */ UINT32 max_sequence; /* maximum instructions to include in a sequence */ - drcfe_describe describe; /* callback to describe a single instruction */ + drcfe_describe_func describe; /* callback to describe a single instruction */ void * param; /* parameter for the callback */ /* CPU parameters */ offs_t pageshift; /* shift to convert address to a page index */ - cpufunc_translate translate; /* pointer to translation function */ + cpu_translate_func translate; /* pointer to translation function */ /* opcode descriptor arrays */ opcode_desc * desc_live_list; /* head of list of live descriptions */ @@ -135,7 +135,7 @@ drcfe_state *drcfe_init(const drcfe_config *config, void *param) /* initialize the state */ drcfe->pageshift = activecpu_page_shift(ADDRESS_SPACE_PROGRAM); - drcfe->translate = (cpufunc_translate)activecpu_get_info_fct(CPUINFO_PTR_TRANSLATE); + drcfe->translate = (cpu_translate_func)activecpu_get_info_fct(CPUINFO_PTR_TRANSLATE); return drcfe; } diff --git a/src/emu/cpu/drcfe.h b/src/emu/cpu/drcfe.h index c944bcd2621..a2fefe04834 100644 --- a/src/emu/cpu/drcfe.h +++ b/src/emu/cpu/drcfe.h @@ -146,7 +146,7 @@ struct _opcode_desc /* callback function that is used to describe a single opcode */ -typedef int (*drcfe_describe)(void *param, opcode_desc *desc); +typedef int (*drcfe_describe_func)(void *param, opcode_desc *desc); /* description of a given opcode */ @@ -156,7 +156,7 @@ struct _drcfe_config UINT32 window_start; /* code window start offset = startpc - window_start */ UINT32 window_end; /* code window end offset = startpc + window_end */ UINT32 max_sequence; /* maximum instructions to include in a sequence */ - drcfe_describe describe; /* callback to describe a single instruction */ + drcfe_describe_func describe; /* callback to describe a single instruction */ }; /* diff --git a/src/emu/cpu/mips/mdrc64.c b/src/emu/cpu/mips/mdrc64.c index c1fa7b9a7e7..4ce9f6b97d4 100644 --- a/src/emu/cpu/mips/mdrc64.c +++ b/src/emu/cpu/mips/mdrc64.c @@ -210,11 +210,11 @@ struct _compiler_state typedef struct _oob_handler oob_handler; -typedef void (*oob_callback)(drc_core *drc, oob_handler *oob, void *param); +typedef void (*oob_callback_func)(drc_core *drc, oob_handler *oob, void *param); struct _oob_handler { - oob_callback callback; /* pointer to callback function */ + oob_callback_func callback; /* pointer to callback function */ void * param; /* callback parameter */ const opcode_desc * desc; /* pointer to description of relevant instruction */ emit_link link; /* link to source of the branch */ @@ -365,7 +365,7 @@ static const char *const x86regname[] = {"rax", "rcx", "rdx", "rbx", "rsp", "rbp bounds callback for later -------------------------------------------------*/ -INLINE void oob_request_callback(drc_core *drc, UINT8 condition, oob_callback callback, const compiler_state *compiler, const opcode_desc *desc, void *param) +INLINE void oob_request_callback(drc_core *drc, UINT8 condition, oob_callback_funcs callback, const compiler_state *compiler, const opcode_desc *desc, void *param) { oob_handler *oob = &mips3.drcdata->ooblist[mips3.drcdata->oobcount++]; diff --git a/src/emu/cpu/z80gb/z80gb.c b/src/emu/cpu/z80gb/z80gb.c index c362c8613fe..003bc2e6794 100644 --- a/src/emu/cpu/z80gb/z80gb.c +++ b/src/emu/cpu/z80gb/z80gb.c @@ -46,8 +46,8 @@ #define FLAG_C 0x10 #define CYCLES_PASSED(X) z80gb_ICount -= ((X) / (Regs.w.gb_speed)); \ - if ( Regs.w.timer_callback ) { \ - Regs.w.timer_callback( X ); \ + if ( Regs.w.timer_fired_func ) { \ + Regs.w.timer_fired_func( X ); \ } typedef struct { @@ -65,7 +65,7 @@ typedef struct { int ei_delay; int (*irq_callback)(int irqline); /* Timer stuff */ - void (*timer_callback)(int cycles); + void (*timer_fired_func)(int cycles); /* Fetch & execute related */ int execution_state; UINT8 op; @@ -197,7 +197,7 @@ static void z80gb_reset(void) Regs.w.HL = 0x0000; Regs.w.SP = 0x0000; Regs.w.PC = 0x0000; - Regs.w.timer_callback = NULL; + Regs.w.timer_fired_func = NULL; Regs.w.features = Z80GB_FEATURE_HALT_BUG; if (Regs.w.config) { @@ -209,7 +209,7 @@ static void z80gb_reset(void) Regs.w.SP = Regs.w.config->regs[4]; Regs.w.PC = Regs.w.config->regs[5]; } - Regs.w.timer_callback = Regs.w.config->timer_callback; + Regs.w.timer_fired_func = Regs.w.config->timer_fired_func; Regs.w.features = Regs.w.config->features; } Regs.w.enable = 0; diff --git a/src/emu/cpu/z80gb/z80gb.h b/src/emu/cpu/z80gb/z80gb.h index 0e1d7e6cd39..fa4ee22353f 100644 --- a/src/emu/cpu/z80gb/z80gb.h +++ b/src/emu/cpu/z80gb/z80gb.h @@ -6,7 +6,7 @@ typedef struct { const UINT16 *regs; UINT8 features; - void (*timer_callback)(int cycles); + void (*timer_fired_func)(int cycles); } Z80GB_CONFIG; enum { diff --git a/src/emu/cpuintrf.h b/src/emu/cpuintrf.h index 0a27dfe0532..d3d91c1acce 100644 --- a/src/emu/cpuintrf.h +++ b/src/emu/cpuintrf.h @@ -198,21 +198,21 @@ typedef union _cpuinfo cpuinfo; /* define the various callback functions */ -typedef void (*cpufunc_get_info)(UINT32 state, cpuinfo *info); -typedef void (*cpufunc_set_info)(UINT32 state, cpuinfo *info); -typedef void (*cpufunc_get_context)(void *buffer); -typedef void (*cpufunc_set_context)(void *buffer); -typedef void (*cpufunc_init)(int index, int clock, const void *config, int (*irqcallback)(int)); -typedef void (*cpufunc_reset)(void); -typedef void (*cpufunc_exit)(void); -typedef int (*cpufunc_execute)(int cycles); -typedef void (*cpufunc_burn)(int cycles); -typedef offs_t (*cpufunc_disassemble)(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -typedef int (*cpufunc_translate)(int space, offs_t *address); -typedef int (*cpufunc_read)(int space, UINT32 offset, int size, UINT64 *value); -typedef int (*cpufunc_write)(int space, UINT32 offset, int size, UINT64 value); -typedef int (*cpufunc_readop)(UINT32 offset, int size, UINT64 *value); -typedef void (*cpufunc_setup_commands)(void); +typedef void (*cpu_get_info_func)(UINT32 state, cpuinfo *info); +typedef void (*cpu_set_info_func)(UINT32 state, cpuinfo *info); +typedef void (*cpu_get_context_func)(void *buffer); +typedef void (*cpu_set_context_func)(void *buffer); +typedef void (*cpu_init_func)(int index, int clock, const void *config, int (*irqcallback)(int)); +typedef void (*cpu_reset_func)(void); +typedef void (*cpu_exit_func)(void); +typedef int (*cpu_execute_func)(int cycles); +typedef void (*cpu_burn_func)(int cycles); +typedef offs_t (*cpu_disassemble_func)(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); +typedef int (*cpu_translate_func)(int space, offs_t *address); +typedef int (*cpu_read_func)(int space, UINT32 offset, int size, UINT64 *value); +typedef int (*cpu_write_func)(int space, UINT32 offset, int size, UINT64 value); +typedef int (*cpu_readop_func)(UINT32 offset, int size, UINT64 *value); +typedef void (*cpu_setup_commands_func)(void); /* cpuinfo union used to pass data to/from the get_info/set_info functions */ @@ -223,20 +223,20 @@ union _cpuinfo genf * f; /* generic function pointers */ char * s; /* generic strings */ - cpufunc_set_info setinfo; /* CPUINFO_PTR_SET_INFO */ - cpufunc_get_context getcontext; /* CPUINFO_PTR_GET_CONTEXT */ - cpufunc_set_context setcontext; /* CPUINFO_PTR_SET_CONTEXT */ - cpufunc_init init; /* CPUINFO_PTR_INIT */ - cpufunc_reset reset; /* CPUINFO_PTR_RESET */ - cpufunc_exit exit; /* CPUINFO_PTR_EXIT */ - cpufunc_execute execute; /* CPUINFO_PTR_EXECUTE */ - cpufunc_burn burn; /* CPUINFO_PTR_BURN */ - cpufunc_disassemble disassemble; /* CPUINFO_PTR_DISASSEMBLE */ - cpufunc_translate translate; /* CPUINFO_PTR_TRANSLATE */ - cpufunc_read read; /* CPUINFO_PTR_READ */ - cpufunc_write write; /* CPUINFO_PTR_WRITE */ - cpufunc_readop readop; /* CPUINFO_PTR_READOP */ - cpufunc_setup_commands setup_commands; /* CPUINFO_PTR_DEBUG_SETUP_COMMANDS */ + cpu_set_info_func setinfo; /* CPUINFO_PTR_SET_INFO */ + cpu_get_context_func getcontext; /* CPUINFO_PTR_GET_CONTEXT */ + cpu_set_context_func setcontext; /* CPUINFO_PTR_SET_CONTEXT */ + cpu_init_func init; /* CPUINFO_PTR_INIT */ + cpu_reset_func reset; /* CPUINFO_PTR_RESET */ + cpu_exit_func exit; /* CPUINFO_PTR_EXIT */ + cpu_execute_func execute; /* CPUINFO_PTR_EXECUTE */ + cpu_burn_func burn; /* CPUINFO_PTR_BURN */ + cpu_disassemble_func disassemble; /* CPUINFO_PTR_DISASSEMBLE */ + cpu_translate_func translate; /* CPUINFO_PTR_TRANSLATE */ + cpu_read_func read; /* CPUINFO_PTR_READ */ + cpu_write_func write; /* CPUINFO_PTR_WRITE */ + cpu_readop_func readop; /* CPUINFO_PTR_READOP */ + cpu_setup_commands_func setup_commands; /* CPUINFO_PTR_DEBUG_SETUP_COMMANDS */ int * icount; /* CPUINFO_PTR_INSTRUCTION_COUNTER */ construct_map_t internal_map; /* CPUINFO_PTR_INTERNAL_MEMORY_MAP */ }; @@ -246,17 +246,17 @@ typedef struct _cpu_interface cpu_interface; struct _cpu_interface { /* table of core functions */ - cpufunc_get_info get_info; - cpufunc_set_info set_info; - cpufunc_get_context get_context; - cpufunc_set_context set_context; - cpufunc_init init; - cpufunc_reset reset; - cpufunc_exit exit; - cpufunc_execute execute; - cpufunc_burn burn; - cpufunc_disassemble disassemble; - cpufunc_translate translate; + cpu_get_info_func get_info; + cpu_set_info_func set_info; + cpu_get_context_func get_context; + cpu_set_context_func set_context; + cpu_init_func init; + cpu_reset_func reset; + cpu_exit_func exit; + cpu_execute_func execute; + cpu_burn_func burn; + cpu_disassemble_func disassemble; + cpu_translate_func translate; /* other info */ size_t context_size; diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 8a35e880952..0ba3ebd02d2 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -1100,7 +1100,7 @@ static void standard_debug_hook_write(int spacenum, int size, offs_t address, UI for the specified CPU -------------------------------------------------*/ -void debug_get_memory_hooks(int cpunum, debug_hook_read_ptr *read, debug_hook_write_ptr *write) +void debug_get_memory_hooks(int cpunum, debug_hook_read_func *read, debug_hook_write_func *write) { memory_hook_cpunum = cpunum; diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index 8cbffe22cfa..7eaeaf383e5 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -54,8 +54,8 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef void (*debug_hook_read_ptr)(int spacenum, int size, offs_t address); -typedef void (*debug_hook_write_ptr)(int spacenum, int size, offs_t address, UINT64 data); +typedef void (*debug_hook_read_func)(int spacenum, int size, offs_t address); +typedef void (*debug_hook_write_func)(int spacenum, int size, offs_t address, UINT64 data); typedef struct _debug_trace_info debug_trace_info; @@ -183,7 +183,7 @@ void debug_flush_traces(void); /* debugging hooks */ void debug_interrupt_hook(int cpunum, int irqline); -void debug_get_memory_hooks(int cpunum, debug_hook_read_ptr *read, debug_hook_write_ptr *write); +void debug_get_memory_hooks(int cpunum, debug_hook_read_func *read, debug_hook_write_func *write); void debug_set_instruction_hook(int cpunum, int (*hook)(offs_t pc)); /* execution control */ diff --git a/src/emu/input.c b/src/emu/input.c index 266b9f3517c..526434b9667 100644 --- a/src/emu/input.c +++ b/src/emu/input.c @@ -61,7 +61,7 @@ struct _input_device_item void * internal; /* internal callback pointer */ input_item_class itemclass; /* class of the item */ input_item_id itemid; /* originally specified item id */ - item_get_state_cb getstate; /* get state callback */ + item_get_state_func getstate; /* get state callback */ INT32 current; /* current raw value */ INT32 memory; /* "memory" value, to remember where we started during polling */ INT32 oncelatch; /* latched "once" value, cleared after each read */ @@ -689,7 +689,7 @@ input_device *input_device_add(input_device_class devclass, const char *name, vo input device -------------------------------------------------*/ -void input_device_item_add(input_device *device, const char *name, void *internal, input_item_id itemid, item_get_state_cb getstate) +void input_device_item_add(input_device *device, const char *name, void *internal, input_item_id itemid, item_get_state_func getstate) { input_device_item *item; diff --git a/src/emu/input.h b/src/emu/input.h index ff64545f73a..88eb6fbe8da 100644 --- a/src/emu/input.h +++ b/src/emu/input.h @@ -473,7 +473,7 @@ enum typedef UINT32 input_code; /* callback for getting the value of an item on a device */ -typedef INT32 (*item_get_state_cb)(void *device_internal, void *item_internal); +typedef INT32 (*item_get_state_func)(void *device_internal, void *item_internal); /* (opaque) input device object */ typedef struct _input_device input_device; @@ -517,7 +517,7 @@ int input_device_set_joystick_map(int devindex, const char *mapstring); input_device *input_device_add(input_device_class devclass, const char *name, void *internal); /* add a new item to an input device */ -void input_device_item_add(input_device *device, const char *name, void *internal, input_item_id itemid, item_get_state_cb getstate); +void input_device_item_add(input_device *device, const char *name, void *internal, input_item_id itemid, item_get_state_func getstate); diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c index 88eb208320e..817071294ff 100644 --- a/src/emu/machine/pit8253.c +++ b/src/emu/machine/pit8253.c @@ -45,7 +45,7 @@ struct pit8253_timer { double clockin; /* input clock frequency in Hz */ - void (*output_callback)(int); /* callback function for when output changes */ + void (*output_callback_func)(int); /* callback function for when output changes */ void (*freq_callback)(double); /* callback function for when output frequency changes */ attotime last_updated; /* time when last updated */ @@ -272,9 +272,9 @@ static void set_output(struct pit8253_timer *timer,int output) if (output != timer->output) { timer->output = output; - if (timer->output_callback != NULL) + if (timer->output_callback_func != NULL) { - timer->output_callback(output); + timer->output_callback_func(output); } } } @@ -602,7 +602,7 @@ static void simulate2(struct pit8253_timer *timer,UINT64 elapsed_cycles) break; } - if (timer->output_callback != NULL) + if (timer->output_callback_func != NULL) { timer->cycles_to_output = cycles_to_output; if (cycles_to_output == CYCLES_NEVER || timer->clockin == 0) @@ -766,10 +766,10 @@ int pit8253_init(int count, const struct pit8253_config *config) timer = get_timer(pit,timerno); timer->clockin = pit->config->timer[timerno].clockin; - timer->output_callback = pit->config->timer[timerno].output_callback; + timer->output_callback_func = pit->config->timer[timerno].output_callback_func; timer->freq_callback = pit->config->timer[timerno].clock_callback; - if (timer->output_callback == NULL) + if (timer->output_callback_func == NULL) timer->outputtimer = NULL; else { diff --git a/src/emu/machine/pit8253.h b/src/emu/machine/pit8253.h index a99024b071f..34d0dbcb6b0 100644 --- a/src/emu/machine/pit8253.h +++ b/src/emu/machine/pit8253.h @@ -15,7 +15,7 @@ struct pit8253_config struct { double clockin; - void (*output_callback)(int state); + void (*output_callback_func)(int state); void (*clock_callback)(double clockout); } timer[3]; }; diff --git a/src/emu/mame.c b/src/emu/mame.c index 2f8e56bf166..c00bdf5aabe 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -189,7 +189,7 @@ static core_options *mame_opts; static UINT8 started_empty; /* output channels */ -static output_callback output_cb[OUTPUT_CHANNEL_COUNT]; +static output_callback_func output_cb[OUTPUT_CHANNEL_COUNT]; static void *output_cb_param[OUTPUT_CHANNEL_COUNT]; /* the "disclaimer" that should be printed when run with no parameters */ @@ -931,7 +931,7 @@ UINT32 memory_region_flags(running_machine *machine, int num) channel -------------------------------------------------*/ -void mame_set_output_channel(output_channel channel, output_callback callback, void *param, output_callback *prevcb, void **prevparam) +void mame_set_output_channel(output_channel channel, output_callback_func callback, void *param, output_callback_func *prevcb, void **prevparam) { assert(channel < OUTPUT_CHANNEL_COUNT); assert(callback != NULL); diff --git a/src/emu/mame.h b/src/emu/mame.h index 37c007875fc..cd36a88487d 100644 --- a/src/emu/mame.h +++ b/src/emu/mame.h @@ -157,7 +157,7 @@ extern const char *const memory_region_names[REGION_MAX]; ***************************************************************************/ /* output channel callback */ -typedef void (*output_callback)(void *param, const char *format, va_list argptr); +typedef void (*output_callback_func)(void *param, const char *format, va_list argptr); /* forward type declarations */ @@ -340,7 +340,7 @@ UINT32 memory_region_flags(running_machine *machine, int num); /* ----- output management ----- */ /* set the output handler for a channel, returns the current one */ -void mame_set_output_channel(output_channel channel, output_callback callback, void *param, output_callback *prevcb, void **prevparam); +void mame_set_output_channel(output_channel channel, output_callback_func callback, void *param, output_callback_func *prevcb, void **prevparam); /* built-in default callbacks */ void mame_file_output_callback(void *param, const char *format, va_list argptr); diff --git a/src/emu/memory.c b/src/emu/memory.c index 74f206422ef..90391af3b5d 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -292,8 +292,8 @@ static cpu_data cpudata[MAX_CPU]; /* data gathered for each CPU */ static bank_data bankdata[STATIC_COUNT]; /* data gathered for each bank */ #ifdef ENABLE_DEBUGGER -static debug_hook_read_ptr debug_hook_read; /* pointer to debugger callback for memory reads */ -static debug_hook_write_ptr debug_hook_write; /* pointer to debugger callback for memory writes */ +static debug_hook_read_func debug_hook_read; /* pointer to debugger callback for memory reads */ +static debug_hook_write_func debug_hook_write; /* pointer to debugger callback for memory writes */ #endif static const data_accessors memory_accessors[ADDRESS_SPACES][4][2] = diff --git a/src/emu/output.c b/src/emu/output.c index 2baf0401965..795288441e7 100644 --- a/src/emu/output.c +++ b/src/emu/output.c @@ -31,7 +31,7 @@ typedef struct _output_notify output_notify; struct _output_notify { output_notify * next; /* link to next item */ - output_notifier notifier; /* callback to call */ + output_notifier_func notifier; /* callback to call */ void * param; /* parameter to pass the callback */ }; @@ -321,7 +321,7 @@ INT32 output_get_indexed_value(const char *basename, int index) if NULL is specified -------------------------------------------------*/ -void output_set_notifier(const char *outname, output_notifier callback, void *param) +void output_set_notifier(const char *outname, output_notifier_func callback, void *param) { output_notify **headptr; @@ -357,7 +357,7 @@ void output_set_notifier(const char *outname, output_notifier callback, void *pa notifier for all outputs -------------------------------------------------*/ -void output_notify_all(output_notifier callback, void *param) +void output_notify_all(output_notifier_func callback, void *param) { output_item *item; int hash; diff --git a/src/emu/output.h b/src/emu/output.h index e5bf0630885..cb71a4f53a6 100644 --- a/src/emu/output.h +++ b/src/emu/output.h @@ -21,7 +21,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef void (*output_notifier)(const char *outname, INT32 value, void *param); +typedef void (*output_notifier_func)(const char *outname, INT32 value, void *param); @@ -45,10 +45,10 @@ INT32 output_get_value(const char *outname); INT32 output_get_indexed_value(const char *outname, int index); /* set a notifier on a particular output, or globally if NULL */ -void output_set_notifier(const char *outname, output_notifier callback, void *param); +void output_set_notifier(const char *outname, output_notifier_func callback, void *param); /* set a notifier on a particular output, or globally if NULL */ -void output_notify_all(output_notifier callback, void *param); +void output_notify_all(output_notifier_func callback, void *param); /* map a name to a unique ID */ UINT32 output_name_to_id(const char *outname); diff --git a/src/emu/render.c b/src/emu/render.c index f7ffd6e4ab4..d2ff3e85717 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -135,7 +135,7 @@ struct _render_texture rectangle sbounds; /* source bounds within the bitmap */ UINT32 palettebase; /* palette base within the system palette */ int format; /* format of the texture data */ - texture_scaler scaler; /* scaling callback */ + texture_scaler_func scaler; /* scaling callback */ void * param; /* scaling callback parameter */ UINT32 curseq; /* current sequence number */ scaled_texture scaled[MAX_TEXTURE_SCALES]; /* array of scaled variants of this texture */ @@ -1940,10 +1940,10 @@ static int remove_clear_extent(const render_bounds *bounds) INT32 *max = &clear_extents[MAX_CLEAR_EXTENTS]; INT32 *last = &clear_extents[clear_extent_count]; INT32 *ext = &clear_extents[0]; - INT32 boundsx0 = (INT32) ceil(bounds->x0); - INT32 boundsx1 = (INT32) floor(bounds->x1); - INT32 boundsy0 = (INT32) ceil(bounds->y0); - INT32 boundsy1 = (INT32) floor(bounds->y1); + INT32 boundsx0 = ceil(bounds->x0); + INT32 boundsx1 = floor(bounds->x1); + INT32 boundsy0 = ceil(bounds->y0); + INT32 boundsy1 = floor(bounds->y1); INT32 y0, y1 = 0; /* loop over Y extents */ @@ -2221,7 +2221,7 @@ static void invalidate_all_render_ref(void *refptr) render_texture_alloc - allocate a new texture -------------------------------------------------*/ -render_texture *render_texture_alloc(texture_scaler scaler, void *param) +render_texture *render_texture_alloc(texture_scaler_func scaler, void *param) { render_texture *texture; diff --git a/src/emu/render.h b/src/emu/render.h index 6d522566c91..85723b65d87 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -170,7 +170,7 @@ enum -------------------------------------------------*/ /* texture scaling callback */ -typedef void (*texture_scaler)(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param); +typedef void (*texture_scaler_func)(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param); @@ -390,7 +390,7 @@ const render_primitive_list *render_target_get_primitives(render_target *target) /* ----- render texture management ----- */ /* allocate a new texture */ -render_texture *render_texture_alloc(texture_scaler scaler, void *param); +render_texture *render_texture_alloc(texture_scaler_func scaler, void *param); /* free an allocated texture */ void render_texture_free(render_texture *texture); diff --git a/src/emu/sound/k053260.h b/src/emu/sound/k053260.h index 1240f0729d8..69be6b2a16d 100644 --- a/src/emu/sound/k053260.h +++ b/src/emu/sound/k053260.h @@ -8,7 +8,7 @@ struct K053260_interface { int region; /* memory region of sample ROM(s) */ - timer_callback irq; /* called on SH1 complete cycle ( clock / 32 ) */ + timer_fired_func irq; /* called on SH1 complete cycle ( clock / 32 ) */ }; diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c index a218036fa88..9b16725d7ad 100644 --- a/src/emu/sound/ymz280b.c +++ b/src/emu/sound/ymz280b.c @@ -117,7 +117,7 @@ static TIMER_CALLBACK( update_irq_state_timer_5 ); static TIMER_CALLBACK( update_irq_state_timer_6 ); static TIMER_CALLBACK( update_irq_state_timer_7 ); -static const timer_callback update_irq_state_cb[] = +static const timer_fired_func update_irq_state_cb[] = { update_irq_state_timer_0, update_irq_state_timer_1, diff --git a/src/emu/streams.c b/src/emu/streams.c index 76e1e144bc2..d33278ccc12 100644 --- a/src/emu/streams.c +++ b/src/emu/streams.c @@ -145,7 +145,7 @@ struct _sound_stream INT32 output_base_sampindex; /* sample at base of buffer, relative to the current emulated second */ /* callback information */ - stream_callback callback; /* callback function */ + stream_update_func callback; /* callback function */ void * param; /* callback function parameter */ }; @@ -348,7 +348,7 @@ void streams_update(running_machine *machine) stream_create - create a new stream -------------------------------------------------*/ -sound_stream *stream_create(int inputs, int outputs, int sample_rate, void *param, stream_callback callback) +sound_stream *stream_create(int inputs, int outputs, int sample_rate, void *param, stream_update_func callback) { streams_private *strdata = Machine->streams_data; int inputnum, outputnum; diff --git a/src/emu/streams.h b/src/emu/streams.h index 2bdb80ad20c..8f72bddd886 100644 --- a/src/emu/streams.h +++ b/src/emu/streams.h @@ -21,7 +21,7 @@ typedef struct _sound_stream sound_stream; -typedef void (*stream_callback)(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples); +typedef void (*stream_update_func)(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples); @@ -46,7 +46,7 @@ void streams_update(running_machine *machine); /* ----- stream configuration and setup ----- */ /* create a new stream */ -sound_stream *stream_create(int inputs, int outputs, int sample_rate, void *param, stream_callback callback); +sound_stream *stream_create(int inputs, int outputs, int sample_rate, void *param, stream_update_func callback); /* configure a stream's input */ void stream_set_input(sound_stream *stream, int index, sound_stream *input_stream, int output_index, float gain); diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c index c0b86b15c9b..67d33907f0e 100644 --- a/src/emu/tilemap.c +++ b/src/emu/tilemap.c @@ -47,8 +47,8 @@ typedef enum /* internal blitting callbacks */ -typedef void (*blitmask_t)(void *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, UINT8 *pri, UINT32 pcode); -typedef void (*blitopaque_t)(void *dest, const UINT16 *source, int count, UINT8 *pri, UINT32 pcode); +typedef void (*blitmask_func)(void *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, UINT8 *pri, UINT32 pcode); +typedef void (*blitopaque_func)(void *dest, const UINT16 *source, int count, UINT8 *pri, UINT32 pcode); /* blitting parameters for rendering */ @@ -57,8 +57,8 @@ struct _blit_parameters { bitmap_t * bitmap; rectangle cliprect; - blitmask_t draw_masked; - blitopaque_t draw_opaque; + blitmask_func draw_masked; + blitopaque_func draw_opaque; UINT32 tilemap_priority_code; UINT8 mask; UINT8 value; @@ -79,14 +79,14 @@ struct _tilemap UINT32 height; /* height of the full tilemap in pixels */ /* logical <-> memory mappings */ - tilemap_mapper_callback mapper; /* callback to map a row/column to a memory index */ + tilemap_mapper_func mapper; /* callback to map a row/column to a memory index */ tilemap_logical_index * memory_to_logical; /* map from memory index to logical index */ tilemap_logical_index max_logical_index; /* maximum valid logical index */ tilemap_memory_index * logical_to_memory; /* map from logical index to memory index */ tilemap_memory_index max_memory_index; /* maximum valid memory index */ /* callback to interpret video RAM for the tilemap */ - tile_get_info_callback tile_get_info; /* callback to get information about a tile */ + tile_get_info_func tile_get_info; /* callback to get information about a tile */ tile_data tileinfo; /* structure to hold the data for a tile */ void * user_data; /* user data value passed to the callback */ @@ -287,7 +287,7 @@ void tilemap_init(running_machine *machine) tilemap_create - allocate a new tilemap -------------------------------------------------*/ -tilemap *tilemap_create(tile_get_info_callback tile_get_info, tilemap_mapper_callback mapper, int tilewidth, int tileheight, int cols, int rows) +tilemap *tilemap_create(tile_get_info_func tile_get_info, tilemap_mapper_func mapper, int tilewidth, int tileheight, int cols, int rows) { tilemap *tmap; int group; diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index 0f14edfd461..e71ef224bd2 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -396,10 +396,10 @@ struct _tile_data /* callback function to get info about a tile */ -typedef void (*tile_get_info_callback)(running_machine *machine, tile_data *tileinfo, tilemap_memory_index tile_index, void *param); +typedef void (*tile_get_info_func)(running_machine *machine, tile_data *tileinfo, tilemap_memory_index tile_index, void *param); /* callback function to map a column,row pair to a memory index */ -typedef tilemap_memory_index (*tilemap_mapper_callback)(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); +typedef tilemap_memory_index (*tilemap_mapper_func)(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); @@ -426,7 +426,7 @@ void tilemap_init(running_machine *machine); /* ----- tilemap creation and configuration ----- */ /* create a new tilemap; note that tilemaps are tracked by the core so there is no dispose */ -tilemap *tilemap_create(tile_get_info_callback tile_get_info, tilemap_mapper_callback mapper, int tilewidth, int tileheight, int cols, int rows); +tilemap *tilemap_create(tile_get_info_func tile_get_info, tilemap_mapper_func mapper, int tilewidth, int tileheight, int cols, int rows); /* specify a parameter to be passed into the tile_get_info callback */ void tilemap_set_user_data(tilemap *tmap, void *user_data); diff --git a/src/emu/timer.c b/src/emu/timer.c index 1f04b121e5e..2ae5f91d0f3 100644 --- a/src/emu/timer.c +++ b/src/emu/timer.c @@ -43,7 +43,7 @@ struct _emu_timer { emu_timer * next; emu_timer * prev; - timer_callback callback; + timer_fired_func callback; INT32 param; void * ptr; const char * file; @@ -458,7 +458,7 @@ int timer_count_anonymous(void) isn't primed yet -------------------------------------------------*/ -INLINE emu_timer *_timer_alloc_common(timer_callback callback, void *ptr, const char *file, int line, const char *func, int temp) +INLINE emu_timer *_timer_alloc_common(timer_fired_func callback, void *ptr, const char *file, int line, const char *func, int temp) { attotime time = get_current_time(); emu_timer *timer = timer_new(); @@ -490,7 +490,7 @@ INLINE emu_timer *_timer_alloc_common(timer_callback callback, void *ptr, const return timer; } -emu_timer *_timer_alloc_internal(timer_callback callback, void *ptr, const char *file, int line, const char *func) +emu_timer *_timer_alloc_internal(timer_fired_func callback, void *ptr, const char *file, int line, const char *func) { return _timer_alloc_common(callback, ptr, file, line, func, FALSE); } @@ -585,7 +585,7 @@ void timer_adjust_periodic(emu_timer *which, attotime duration, INT32 param, att period -------------------------------------------------*/ -void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func) +void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_fired_func callback, const char *file, int line, const char *func) { emu_timer *timer = _timer_alloc_common(callback, ptr, file, line, func, FALSE); timer_adjust_periodic(timer, period, param, period); @@ -597,7 +597,7 @@ void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_callba calls the callback after the given duration -------------------------------------------------*/ -void _timer_set_internal(attotime duration, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func) +void _timer_set_internal(attotime duration, void *ptr, INT32 param, timer_fired_func callback, const char *file, int line, const char *func) { emu_timer *timer = _timer_alloc_common(callback, ptr, file, line, func, TRUE); timer_adjust_oneshot(timer, duration, param); diff --git a/src/emu/timer.h b/src/emu/timer.h index 30ef72291cc..6bb18d954d7 100644 --- a/src/emu/timer.h +++ b/src/emu/timer.h @@ -54,7 +54,7 @@ ***************************************************************************/ /* a timer callback looks like this */ -typedef void (*timer_callback)(running_machine *machine, void *ptr, INT32 param); +typedef void (*timer_fired_func)(running_machine *machine, void *ptr, INT32 param); /* opaque type for representing a timer */ typedef struct _emu_timer emu_timer; @@ -106,7 +106,7 @@ int timer_count_anonymous(void); /* ----- core timer management ----- */ /* allocate a permament timer that isn't primed yet */ -emu_timer *_timer_alloc_internal(timer_callback callback, void *param, const char *file, int line, const char *func); +emu_timer *_timer_alloc_internal(timer_fired_func callback, void *param, const char *file, int line, const char *func); /* adjust the time when this timer will fire and disable any periodic firings */ void timer_adjust_oneshot(emu_timer *which, attotime duration, INT32 param); @@ -119,10 +119,10 @@ void timer_adjust_periodic(emu_timer *which, attotime duration, INT32 param, att /* ----- anonymous timer management ----- */ /* allocate a one-shot timer, which calls the callback after the given duration */ -void _timer_set_internal(attotime druation, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func); +void _timer_set_internal(attotime druation, void *ptr, INT32 param, timer_fired_func callback, const char *file, int line, const char *func); /* allocate a pulse timer, which repeatedly calls the callback using the given period */ -void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func); +void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_fired_func callback, const char *file, int line, const char *func); diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c index 7d4602f7504..34dcd003c36 100644 --- a/src/emu/uimenu.c +++ b/src/emu/uimenu.c @@ -76,7 +76,7 @@ enum typedef struct _menu_state menu_state; struct _menu_state { - ui_menu_handler handler; /* handler callback */ + ui_menu_handler_func handler; /* handler callback */ UINT32 state; /* state value */ }; @@ -658,7 +658,7 @@ void ui_menu_stack_reset(void) stack -------------------------------------------------*/ -UINT32 ui_menu_stack_push(ui_menu_handler new_handler, UINT32 new_state) +UINT32 ui_menu_stack_push(ui_menu_handler_func new_handler, UINT32 new_state) { menu_state *state = &menu_stack[++menu_stack_index]; assert(menu_stack_index < MENU_STACK_DEPTH); diff --git a/src/emu/uimenu.h b/src/emu/uimenu.h index 3bc42964eae..45f41720cdb 100644 --- a/src/emu/uimenu.h +++ b/src/emu/uimenu.h @@ -32,7 +32,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef UINT32 (*ui_menu_handler)(UINT32 state); +typedef UINT32 (*ui_menu_handler_func)(UINT32 state); typedef struct _ui_menu_item ui_menu_item; struct _ui_menu_item @@ -73,7 +73,7 @@ int ui_menu_generic_keys(UINT32 *selected, int num_items, int visible_items); /* menu stack management */ void ui_menu_stack_reset(void); -UINT32 ui_menu_stack_push(ui_menu_handler new_handler, UINT32 new_state); +UINT32 ui_menu_stack_push(ui_menu_handler_func new_handler, UINT32 new_state); UINT32 ui_menu_stack_pop(void); /* force game select menu */ diff --git a/src/emu/video.c b/src/emu/video.c index bf96f0ad322..dd1694e5def 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -75,7 +75,7 @@ struct _internal_screen_info /* VBLANK callbacks */ int vbl_cb_count; /* # of callbacks installed */ - video_screen_on_vbl vbl_cbs[MAX_VBL_CB]; /* the array of callbacks */ + vblank_state_changed_func vbl_cbs[MAX_VBL_CB]; /* the array of callbacks */ /* movie recording */ mame_file * movie_file; /* handle to the open movie file */ @@ -1093,7 +1093,7 @@ UINT64 video_screen_get_frame_number(int scrnum) VBLANK callback -------------------------------------------------*/ -void video_screen_register_vbl_cb(running_machine *machine, void *screen, video_screen_on_vbl vbl_cb) +void video_screen_register_vbl_cb(running_machine *machine, void *screen, vblank_state_changed_func vbl_cb) { int i, found; internal_screen_info *scrinfo = NULL; diff --git a/src/emu/video.h b/src/emu/video.h index 01adb8c2a1f..3e3c1da9a48 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -89,12 +89,12 @@ struct _screen_config /*------------------------------------------------- - video_screen_on_vblank - callback that a + vblank_state_changed_func - callback that a screen calls to notify of a change of the VBLANK state -------------------------------------------------*/ -typedef void (*video_screen_on_vbl)(running_machine *machine, screen_state *screen, int vblank_state); +typedef void (*vblank_state_changed_func)(running_machine *machine, screen_state *screen, int vblank_state); @@ -155,7 +155,7 @@ UINT64 video_screen_get_frame_number(int scrnum); int video_screen_exists(int scrnum); /* registers a VBLANK callback for the given screen*/ -void video_screen_register_vbl_cb(running_machine *machine, void *screen, video_screen_on_vbl vbl_cb); +void video_screen_register_vbl_cb(running_machine *machine, void *screen, vblank_state_changed_func vbl_cb); /* ----- video screen device interface ----- */ diff --git a/src/emu/video/poly.c b/src/emu/video/poly.c index e455bab4949..ce642d6350e 100644 --- a/src/emu/video/poly.c +++ b/src/emu/video/poly.c @@ -139,7 +139,7 @@ struct _polygon_info void * extra; /* extra data pointer */ UINT8 numparams; /* number of parameters for this polygon */ UINT8 numverts; /* number of vertices in this polygon */ - poly_draw_scanline callback; /* callback to handle a scanline's worth of work */ + poly_draw_scanline_func callback; /* callback to handle a scanline's worth of work */ INT32 xorigin; /* X origin for all parameters */ INT32 yorigin; /* Y origin for all parameters */ poly_param param[MAX_VERTEX_PARAMS];/* array of parameter data */ @@ -489,7 +489,7 @@ void *poly_get_extra_data(poly_manager *poly) triangle given 3 vertexes -------------------------------------------------*/ -UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3) +UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3) { float dxdy_v1v2, dxdy_v1v3, dxdy_v2v3; const poly_vertex *tv; @@ -672,7 +672,7 @@ UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle *cli triangles in a fan -------------------------------------------------*/ -UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, int numverts, const poly_vertex *v) +UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v) { UINT32 pixels = 0; int vertnum; @@ -689,7 +689,7 @@ UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle render of an object, given specific extents -------------------------------------------------*/ -UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int startscanline, int numscanlines, const poly_extent *extents) +UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents) { INT32 curscan, scaninc; polygon_info *polygon; @@ -796,7 +796,7 @@ UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectang given 4 vertexes -------------------------------------------------*/ -UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4) +UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4) { poly_edge fedgelist[3], bedgelist[3]; const poly_edge *ledge, *redge; @@ -1022,7 +1022,7 @@ UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle *cliprec quads in a fan -------------------------------------------------*/ -UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, int numverts, const poly_vertex *v) +UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v) { UINT32 pixels = 0; int vertnum; @@ -1044,7 +1044,7 @@ UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle *cli to 32 vertices -------------------------------------------------*/ -UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, int numverts, const poly_vertex *v) +UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v) { poly_edge fedgelist[MAX_POLYGON_VERTS - 1], bedgelist[MAX_POLYGON_VERTS - 1]; const poly_edge *ledge, *redge; diff --git a/src/emu/video/poly.h b/src/emu/video/poly.h index 2cfee063900..90858314c54 100644 --- a/src/emu/video/poly.h +++ b/src/emu/video/poly.h @@ -90,7 +90,7 @@ struct _poly_extent /* callback routine to process a batch of scanlines in a triangle */ -typedef void (*poly_draw_scanline)(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); +typedef void (*poly_draw_scanline_func)(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); @@ -122,30 +122,30 @@ void *poly_get_extra_data(poly_manager *poly); /* ----- core triangle rendering ----- */ /* render a single triangle given 3 vertexes */ -UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3); +UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3); /* render a set of triangles in a fan */ -UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, int numverts, const poly_vertex *v); +UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v); /* perform a custom render of an object, given specific extents */ -UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int startscanline, int numscanlines, const poly_extent *extents); +UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents); /* ----- core quad rendering ----- */ /* render a single quad given 4 vertexes */ -UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4); +UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4); /* render a set of quads in a fan */ -UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, int numverts, const poly_vertex *v); +UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v); /* ----- core polygon rendering ----- */ /* render a single polygon up to 32 vertices */ -UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline callback, int paramcount, int numverts, const poly_vertex *v); +UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle *cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v); diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h index c9b43d2bb0b..fa22b51c98a 100644 --- a/src/emu/video/vooddefs.h +++ b/src/emu/video/vooddefs.h @@ -1603,7 +1603,7 @@ typedef struct _raster_info raster_info; struct _raster_info { struct _raster_info *next; /* pointer to next entry with the same hash */ - poly_draw_scanline callback; /* callback pointer */ + poly_draw_scanline_func callback; /* callback pointer */ UINT8 is_generic; /* TRUE if this is one of the generic rasterizers */ UINT8 display; /* display index */ UINT32 hits; /* how many hits (pixels) we've used this for */ |