diff options
66 files changed, 130 insertions, 626 deletions
diff --git a/src/emu/cpu/cop400/cop400.c b/src/emu/cpu/cop400/cop400.c index 808d1f30482..7400bfb2f59 100644 --- a/src/emu/cpu/cop400/cop400.c +++ b/src/emu/cpu/cop400/cop400.c @@ -897,10 +897,6 @@ static void cop400_init(const device_config *device, UINT8 g_mask, UINT8 d_mask, cpustate->d_mask = d_mask; cpustate->in_mask = in_mask; - /* set clock divider */ - - device_set_info_int(device, CPUINFO_INT_CLOCK_DIVIDER, cpustate->intf->cki); - /* allocate serial timer */ cpustate->serial_timer = timer_alloc(device->machine, serial_tick, cpustate); @@ -1360,6 +1356,7 @@ static CPU_SET_INFO( cop400 ) static CPU_GET_INFO( cop400 ) { cop400_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; + cop400_interface *intf = (device != NULL && device->static_config != NULL) ? (cop400_interface *)device->static_config : NULL; switch (state) { @@ -1369,7 +1366,7 @@ static CPU_GET_INFO( cop400 ) case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; case CPUINFO_INT_ENDIANNESS: info->i = ENDIANNESS_LITTLE; break; case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; - case CPUINFO_INT_CLOCK_DIVIDER: info->i = 16; break; + case CPUINFO_INT_CLOCK_DIVIDER: info->i = (intf != NULL) ? intf->cki : 16; break; case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index 52ec1101eb3..411636cbb80 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -504,6 +504,13 @@ static CPU_EXECUTE( konami ) } +void konami_configure_set_lines(const device_config *device, konami_set_lines_func func) +{ + konami_state *cpustate = get_safe_token(device); + cpustate->setlines_callback = func; +} + + /************************************************************************** * Generic set_info **************************************************************************/ @@ -529,9 +536,6 @@ static CPU_SET_INFO( konami ) case CPUINFO_INT_REGISTER + KONAMI_X: X = info->i; break; case CPUINFO_INT_REGISTER + KONAMI_Y: Y = info->i; break; case CPUINFO_INT_REGISTER + KONAMI_DP: DP = info->i; break; - - /* --- the following bits of info are set as pointers to data or functions --- */ - case CPUINFO_FCT_KONAMI_SETLINES_CALLBACK: cpustate->setlines_callback = (konami_set_lines_func)info->f; break; } } @@ -595,7 +599,6 @@ CPU_GET_INFO( konami ) case CPUINFO_FCT_BURN: info->burn = NULL; break; case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(konami);break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break; - case CPUINFO_FCT_KONAMI_SETLINES_CALLBACK: info->f = (genf *)cpustate->setlines_callback; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "KONAMI"); break; diff --git a/src/emu/cpu/konami/konami.h b/src/emu/cpu/konami/konami.h index 4a6ca3c4be4..0b792566397 100644 --- a/src/emu/cpu/konami/konami.h +++ b/src/emu/cpu/konami/konami.h @@ -15,11 +15,6 @@ enum KONAMI_DP }; -enum -{ - CPUINFO_FCT_KONAMI_SETLINES_CALLBACK = CPUINFO_FCT_CPU_SPECIFIC -}; - #define KONAMI_SETLINES_CALLBACK(name) void name(const device_config *device, int lines) #define KONAMI_IRQ_LINE 0 /* IRQ line number */ @@ -31,10 +26,7 @@ CPU_GET_INFO( konami ); CPU_DISASSEMBLE( konami ); +void konami_configure_set_lines(const device_config *device, konami_set_lines_func func); -INLINE void konami_configure_set_lines(const device_config *device, konami_set_lines_func func) -{ - device_set_info_fct(device, CPUINFO_FCT_KONAMI_SETLINES_CALLBACK, (genf *)func); -} #endif /* __KONAMI_H__ */ diff --git a/src/emu/cpu/m68000/m68000.h b/src/emu/cpu/m68000/m68000.h index b4add1b1030..9eeb83ae8a3 100644 --- a/src/emu/cpu/m68000/m68000.h +++ b/src/emu/cpu/m68000/m68000.h @@ -61,14 +61,6 @@ enum M68K_GENPCBASE = REG_GENPCBASE }; -enum -{ - CPUINFO_FCT_M68K_RESET_CALLBACK = CPUINFO_FCT_CPU_SPECIFIC, - CPUINFO_FCT_M68K_CMPILD_CALLBACK, - CPUINFO_FCT_M68K_RTE_CALLBACK, - CPUINFO_FCT_M68K_TAS_CALLBACK -}; - typedef void (*m68k_bkpt_ack_func)(const device_config *device, UINT32 data); typedef void (*m68k_reset_func)(const device_config *device); typedef void (*m68k_cmpild_func)(const device_config *device, UINT32 data, UINT8 reg); @@ -94,4 +86,9 @@ void m68k_set_encrypted_opcode_range(const device_config *device, offs_t start, unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, const unsigned char* opdata, const unsigned char* argdata, unsigned int cpu_type); +void m68k_set_reset_callback(const device_config *device, m68k_reset_func callback); +void m68k_set_cmpild_callback(const device_config *device, m68k_cmpild_func callback); +void m68k_set_rte_callback(const device_config *device, m68k_rte_func callback); +void m68k_set_tas_callback(const device_config *device, m68k_tas_func callback); + #endif /* __M68000_H__ */ diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index ca093fc16ee..b8e1d01f2a5 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -757,12 +757,6 @@ static CPU_SET_INFO( m68k ) case CPUINFO_INT_INPUT_STATE + INPUT_LINE_NMI: set_irq_line(m68k, state - CPUINFO_INT_INPUT_STATE, info->i); break; - - /* --- the following bits of info are set as pointers to data or functions --- */ - case CPUINFO_FCT_M68K_RESET_CALLBACK: m68k->reset_instr_callback = (m68k_reset_func)info->f; break; - case CPUINFO_FCT_M68K_CMPILD_CALLBACK: m68k->cmpild_instr_callback = (m68k_cmpild_func)info->f; break; - case CPUINFO_FCT_M68K_RTE_CALLBACK: m68k->rte_instr_callback = (m68k_rte_func)info->f; break; - case CPUINFO_FCT_M68K_TAS_CALLBACK: m68k->tas_instr_callback = (m68k_tas_func)info->f; break; } } @@ -980,6 +974,32 @@ static const m68k_memory_interface interface_d32 = + +void m68k_set_reset_callback(const device_config *device, m68k_reset_func callback) +{ + m68ki_cpu_core *m68k = get_safe_token(device); + m68k->reset_instr_callback = callback; +} + +void m68k_set_cmpild_callback(const device_config *device, m68k_cmpild_func callback) +{ + m68ki_cpu_core *m68k = get_safe_token(device); + m68k->cmpild_instr_callback = callback; +} + +void m68k_set_rte_callback(const device_config *device, m68k_rte_func callback) +{ + m68ki_cpu_core *m68k = get_safe_token(device); + m68k->rte_instr_callback = callback; +} + +void m68k_set_tas_callback(const device_config *device, m68k_tas_func callback) +{ + m68ki_cpu_core *m68k = get_safe_token(device); + m68k->tas_instr_callback = callback; +} + + /**************************************************************************** * 68000 section ****************************************************************************/ diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c index 4283acffc04..6e1fd66d043 100644 --- a/src/emu/cpu/sh4/sh4.c +++ b/src/emu/cpu/sh4/sh4.c @@ -3646,16 +3646,16 @@ static CPU_SET_INFO( sh4 ) case CPUINFO_STR_REGISTER + SH4_XF14: sh4->xf[14] = info->i; break; case CPUINFO_STR_REGISTER + SH4_XF15: sh4->xf[15] = info->i; break; #endif - - case CPUINFO_INT_SH4_IRLn_INPUT: sh4_set_irln_input(device, info->i); break; - case CPUINFO_INT_SH4_FRT_INPUT: sh4_set_frt_input(device, info->i); break; - - /* --- the following bits of info are set as pointers to data or functions --- */ - case CPUINFO_FCT_SH4_FTCSR_READ_CALLBACK: sh4->ftcsr_read_callback = (void (*) (UINT32 ))info->f; break; - case CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA: sh4_dma_ddt(sh4, (struct sh4_ddt_dma *)info->f); break; } } +void sh4_set_ftcsr_callback(const device_config *device, sh4_ftcsr_callback callback) +{ + SH4 *sh4 = get_safe_token(device); + sh4->ftcsr_read_callback = callback; +} + + #if 0 /*When OC index mode is off (CCR.OIX = 0)*/ static ADDRESS_MAP_START( sh4_internal_map, ADDRESS_SPACE_PROGRAM, 64 ) @@ -3923,7 +3923,5 @@ CPU_GET_INFO( sh4 ) case CPUINFO_STR_REGISTER + SH4_XF14: sprintf(info->s, "XF14 :%08X %f", FP_XS(14),(double)FP_XFS(14)); break; case CPUINFO_STR_REGISTER + SH4_XF15: sprintf(info->s, "XF15 :%08X %f", FP_XS(15),(double)FP_XFS(15)); break; //%01.2e #endif - case CPUINFO_FCT_SH4_FTCSR_READ_CALLBACK: info->f = (genf*)sh4->ftcsr_read_callback; break; - } } diff --git a/src/emu/cpu/sh4/sh4.h b/src/emu/cpu/sh4/sh4.h index 3cc9aef2d91..fe7c6b1fff7 100644 --- a/src/emu/cpu/sh4/sh4.h +++ b/src/emu/cpu/sh4/sh4.h @@ -56,18 +56,6 @@ enum enum { - CPUINFO_INT_SH4_IRLn_INPUT = CPUINFO_INT_CPU_SPECIFIC, - CPUINFO_INT_SH4_FRT_INPUT -}; - -enum -{ - CPUINFO_FCT_SH4_FTCSR_READ_CALLBACK = CPUINFO_FCT_CPU_SPECIFIC, - CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA = CPUINFO_PTR_CPU_SPECIFIC, -}; - -enum -{ SH4_IOPORT_16=8*0, SH4_IOPORT_4=8*1, // future use @@ -101,6 +89,8 @@ struct sh4_ddt_dma int mode; }; +typedef void (*sh4_ftcsr_callback)(UINT32); + extern CPU_GET_INFO( sh4 ); #define CPU_SH4 CPU_GET_INFO_NAME( sh4 ) @@ -109,5 +99,10 @@ READ32_HANDLER( sh4_internal_r ); extern unsigned DasmSH4( char *dst, unsigned pc, UINT16 opcode ); +void sh4_set_frt_input(const device_config *device, int state); +void sh4_set_irln_input(const device_config *device, int value); +void sh4_set_ftcsr_callback(const device_config *device, sh4_ftcsr_callback callback); +void sh4_dma_ddt(const device_config *device, struct sh4_ddt_dma *s); + #endif /* __SH4_H__ */ diff --git a/src/emu/cpu/sh4/sh4comn.c b/src/emu/cpu/sh4/sh4comn.c index f10d5cd4f1e..0f06c7fe8f0 100644 --- a/src/emu/cpu/sh4/sh4comn.c +++ b/src/emu/cpu/sh4/sh4comn.c @@ -1185,12 +1185,13 @@ void sh4_common_init(const device_config *device) sh4->m = (UINT32 *)auto_malloc(16384*4); } -void sh4_dma_ddt(SH4 *sh4, struct sh4_ddt_dma *s) +void sh4_dma_ddt(const device_config *device, struct sh4_ddt_dma *s) { -UINT32 chcr; -UINT32 *p32bits; -UINT64 *p32bytes; -UINT32 pos,len,siz; + SH4 *sh4 = get_safe_token(device); + UINT32 chcr; + UINT32 *p32bits; + UINT64 *p32bytes; + UINT32 pos,len,siz; if (sh4->dma_timer_active[s->channel]) return; diff --git a/src/emu/cpu/sh4/sh4comn.h b/src/emu/cpu/sh4/sh4comn.h index e448f54cd5d..ccb726f66a4 100644 --- a/src/emu/cpu/sh4/sh4comn.h +++ b/src/emu/cpu/sh4/sh4comn.h @@ -144,10 +144,7 @@ void sh4_syncronize_register_bank(SH4 *sh4, int to); void sh4_swap_fp_registers(SH4 *sh4); void sh4_default_exception_priorities(SH4 *sh4); // setup default priorities for exceptions void sh4_parse_configuration(SH4 *sh4, const struct sh4_config *conf); -void sh4_dma_ddt(SH4 *sh4, struct sh4_ddt_dma *s); void sh4_set_irq_line(SH4 *sh4, int irqline, int state); // set state of external interrupt line -void sh4_set_frt_input(const device_config *device, int state); -void sh4_set_irln_input(const device_config *device, int value); #ifdef LSB_FIRST void sh4_swap_fp_couples(SH4 *sh4); #endif diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c index 7ea7be33775..255cddab94a 100644 --- a/src/emu/cpuexec.c +++ b/src/emu/cpuexec.c @@ -627,7 +627,7 @@ static DEVICE_STOP( cpu ) cpu_set_info - device set info callback -------------------------------------------------*/ -static DEVICE_SET_INFO( cpu ) +void cpu_set_info(const device_config *device, UINT32 state, UINT64 value) { cpu_class_header *header = cpu_get_class_header(device); cpu_set_info_func set_info; @@ -652,25 +652,17 @@ static DEVICE_SET_INFO( cpu ) { if (state >= CPUINFO_INT_REGISTER && state <= CPUINFO_INT_REGISTER_LAST) { - set_register_value(device, classdata->state->baseptr, classdata->regstate[state - CPUINFO_INT_REGISTER], info->i); + set_register_value(device, classdata->state->baseptr, classdata->regstate[state - CPUINFO_INT_REGISTER], value); return; } } } /* integer data */ + assert(state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST); if (state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST) { - cinfo.i = info->i; - (*set_info)(device, state, &cinfo); - } - - /* pointer data */ - else if ((state >= DEVINFO_PTR_FIRST && state <= DEVINFO_PTR_LAST) || - (state >= DEVINFO_FCT_FIRST && state <= DEVINFO_FCT_LAST) || - (state >= DEVINFO_STR_FIRST && state <= DEVINFO_STR_LAST)) - { - cinfo.p = info->p; + cinfo.i = value; (*set_info)(device, state, &cinfo); } break; @@ -701,7 +693,6 @@ DEVICE_GET_INFO( cpu ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_CPU_CHIP; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(cpu); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cpu); break; case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(cpu); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cpu); break; @@ -1515,17 +1506,17 @@ static TIMER_CALLBACK( empty_event_queue ) switch (state) { case PULSE_LINE: - device_set_info_int(device, CPUINFO_INT_INPUT_STATE + param, ASSERT_LINE); - device_set_info_int(device, CPUINFO_INT_INPUT_STATE + param, CLEAR_LINE); + cpu_set_info(device, CPUINFO_INT_INPUT_STATE + param, ASSERT_LINE); + cpu_set_info(device, CPUINFO_INT_INPUT_STATE + param, CLEAR_LINE); break; case HOLD_LINE: case ASSERT_LINE: - device_set_info_int(device, CPUINFO_INT_INPUT_STATE + param, ASSERT_LINE); + cpu_set_info(device, CPUINFO_INT_INPUT_STATE + param, ASSERT_LINE); break; case CLEAR_LINE: - device_set_info_int(device, CPUINFO_INT_INPUT_STATE + param, CLEAR_LINE); + cpu_set_info(device, CPUINFO_INT_INPUT_STATE + param, CLEAR_LINE); break; default: @@ -1562,7 +1553,7 @@ static IRQ_CALLBACK( standard_irq_callback ) if (inputline->curstate == HOLD_LINE) { LOG(("->set_irq_line('%s',%d,%d)\n", device->tag, irqline, CLEAR_LINE)); - device_set_info_int(device, CPUINFO_INT_INPUT_STATE + irqline, CLEAR_LINE); + cpu_set_info(device, CPUINFO_INT_INPUT_STATE + irqline, CLEAR_LINE); inputline->curstate = CLEAR_LINE; } diff --git a/src/emu/cpuintrf.h b/src/emu/cpuintrf.h index ce9979fa033..8ed7112e3b4 100644 --- a/src/emu/cpuintrf.h +++ b/src/emu/cpuintrf.h @@ -349,7 +349,8 @@ enum #define cpu_get_flags_string(cpu) device_get_info_string(cpu, CPUINFO_STR_FLAGS) #define cpu_get_irq_string(cpu, irq) device_get_info_string(cpu, CPUINFO_STR_IRQ_STATE + (irq)) #define cpu_get_reg_string(cpu, reg) device_get_info_string(cpu, CPUINFO_STR_REGISTER + (reg)) -#define cpu_set_reg(cpu, reg, val) device_set_info_int(cpu, CPUINFO_INT_REGISTER + (reg), (val)) + +#define cpu_set_reg(cpu, reg, val) cpu_set_info(cpu, CPUINFO_INT_REGISTER + (reg), (val)) @@ -448,5 +449,6 @@ union _cpuinfo }; +void cpu_set_info(const device_config *device, UINT32 state, UINT64 value); #endif /* __CPUINTRF_H__ */ diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c index 7f115a913eb..f9daef51023 100644 --- a/src/emu/devintrf.c +++ b/src/emu/devintrf.c @@ -122,7 +122,6 @@ device_config *device_list_add(device_config **listheadptr, const device_config /* populate device properties */ device->type = type; device->devclass = (device_class)(INT32)devtype_get_info_int(type, DEVINFO_INT_CLASS); - device->set_info = (device_set_info_func)devtype_get_info_fct(type, DEVINFO_FCT_SET_INFO); device->execute = NULL; /* populate device configuration */ @@ -856,72 +855,7 @@ const char *devtype_get_info_string(device_type type, UINT32 state) /*************************************************************************** - DEVICE INFORMATION SETTERS -***************************************************************************/ - -/*------------------------------------------------- - device_set_info_int - set an integer state - value for an allocated device --------------------------------------------------*/ - -void device_set_info_int(const device_config *device, UINT32 state, INT64 data) -{ - deviceinfo info; - - assert(device != NULL); - assert(device->token != NULL); - assert(device->type != NULL); - assert(state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST); - - /* set the value */ - info.i = data; - (*device->set_info)(device, state, &info); -} - - -/*------------------------------------------------- - device_set_info_ptr - set a pointer state - value for an allocated device --------------------------------------------------*/ - -void device_set_info_ptr(const device_config *device, UINT32 state, void *data) -{ - deviceinfo info; - - assert(device != NULL); - assert(device->token != NULL); - assert(device->type != NULL); - assert(state >= DEVINFO_PTR_FIRST && state <= DEVINFO_PTR_LAST); - - /* set the value */ - info.p = data; - (*device->set_info)(device, state, &info); -} - - -/*------------------------------------------------- - device_set_info_fct - set a function pointer - state value for an allocated device --------------------------------------------------*/ - -void device_set_info_fct(const device_config *device, UINT32 state, genf *data) -{ - deviceinfo info; - - assert(device != NULL); - assert(device->token != NULL); - assert(device->type != NULL); - assert(state >= DEVINFO_FCT_FIRST && state <= DEVINFO_FCT_LAST); - - /* set the value */ - info.f = data; - (*device->set_info)(device, state, &info); -} - - - -/*************************************************************************** - DEVICE INFORMATION SETTERS + DEFAULT HANDLERS ***************************************************************************/ /*------------------------------------------------- diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h index 6c756958ee0..b8bf94fcd15 100644 --- a/src/emu/devintrf.h +++ b/src/emu/devintrf.h @@ -68,8 +68,7 @@ enum /* --- the following bits of info are returned as pointers to functions --- */ DEVINFO_FCT_FIRST = 0x20000, - DEVINFO_FCT_SET_INFO = DEVINFO_FCT_FIRST, /* R/O: device_set_info_func */ - DEVINFO_FCT_START, /* R/O: device_start_func */ + DEVINFO_FCT_START = DEVINFO_FCT_FIRST, /* R/O: device_start_func */ DEVINFO_FCT_STOP, /* R/O: device_stop_func */ DEVINFO_FCT_RESET, /* R/O: device_reset_func */ DEVINFO_FCT_EXECUTE, /* R/O: device_execute_func */ @@ -105,10 +104,6 @@ enum #define DEVICE_GET_INFO(name) void DEVICE_GET_INFO_NAME(name)(const device_config *device, UINT32 state, deviceinfo *info) #define DEVICE_GET_INFO_CALL(name) DEVICE_GET_INFO_NAME(name)(device, state, info) -#define DEVICE_SET_INFO_NAME(name) device_set_info_##name -#define DEVICE_SET_INFO(name) void DEVICE_SET_INFO_NAME(name)(const device_config *device, UINT32 state, const deviceinfo *info) -#define DEVICE_SET_INFO_CALL(name) DEVICE_SET_INFO_NAME(name)(device, state, info) - #define DEVICE_START_NAME(name) device_start_##name #define DEVICE_START(name) void DEVICE_START_NAME(name)(const device_config *device) #define DEVICE_START_CALL(name) DEVICE_START_NAME(name)(device) @@ -148,10 +143,6 @@ enum #define devtag_get_info_fct(mach,tag,state) device_get_info_fct(devtag_get_device(mach, tag), state) #define devtag_get_info_string(mach,tag,state) device_get_info_string(devtag_get_device(mach, tag), state) -#define devtag_set_info_int(mach,tag,state,data) device_set_info_int(devtag_get_device(mach, tag), state, data) -#define devtag_set_info_ptr(mach,tag,state,data) device_set_info_ptr(devtag_get_device(mach, tag), state, data) -#define devtag_set_info_fct(mach,tag,state,data) device_set_info_fct(devtag_get_device(mach, tag), state, data) - /* shorthand for getting standard data about device types */ #define devtype_get_name(type) devtype_get_info_string(type, DEVINFO_STR_NAME) @@ -189,7 +180,6 @@ typedef struct _device_config device_config; /* device interface function types */ typedef void (*device_get_info_func)(const device_config *device, UINT32 state, deviceinfo *info); -typedef void (*device_set_info_func)(const device_config *device, UINT32 state, const deviceinfo *info); typedef void (*device_start_func)(const device_config *device); typedef void (*device_stop_func)(const device_config *device); typedef INT32 (*device_execute_func)(const device_config *device, INT32 clocks); @@ -211,7 +201,6 @@ union _deviceinfo genf * f; /* generic function pointers */ char * s; /* generic strings */ - device_set_info_func set_info; /* DEVINFO_FCT_SET_INFO */ device_start_func start; /* DEVINFO_FCT_START */ device_stop_func stop; /* DEVINFO_FCT_STOP */ device_reset_func reset; /* DEVINFO_FCT_RESET */ @@ -236,7 +225,6 @@ struct _device_config /* device properties (always valid) */ device_type type; /* device type */ device_class devclass; /* device class */ - device_set_info_func set_info; /* quick pointer to set_info callback */ /* device configuration (always valid) */ UINT32 clock; /* device clock */ @@ -369,17 +357,4 @@ genf *devtype_get_info_fct(device_type type, UINT32 state); const char *devtype_get_info_string(device_type type, UINT32 state); - -/* ----- device information setters ----- */ - -/* set an integer state value for an allocated device */ -void device_set_info_int(const device_config *device, UINT32 state, INT64 data); - -/* set a pointer state value for an allocated device */ -void device_set_info_ptr(const device_config *device, UINT32 state, void *data); - -/* set a function pointer state value for an allocated device */ -void device_set_info_fct(const device_config *device, UINT32 state, genf *data); - - #endif /* __DEVINTRF_H__ */ diff --git a/src/emu/machine/6522via.c b/src/emu/machine/6522via.c index 0c49a44d6e1..fe72a790d55 100644 --- a/src/emu/machine/6522via.c +++ b/src/emu/machine/6522via.c @@ -1133,19 +1133,6 @@ WRITE8_DEVICE_HANDLER(via_cb2_w) /*------------------------------------------------- - DEVICE_SET_INFO( via6522 ) --------------------------------------------------*/ - -static DEVICE_SET_INFO( via6522 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- DEVICE_GET_INFO( via6522 ) -------------------------------------------------*/ @@ -1159,7 +1146,6 @@ DEVICE_GET_INFO(via6522) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(via6522); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(via6522); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(via6522); break; diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c index fa29e33d11c..4e67dcd5396 100644 --- a/src/emu/machine/6526cia.c +++ b/src/emu/machine/6526cia.c @@ -861,19 +861,6 @@ int cia_get_irq(const device_config *device) { return get_token(device)->irq; } /*------------------------------------------------- - DEVICE_SET_INFO( cia6526 ) --------------------------------------------------*/ - -static DEVICE_SET_INFO( cia6526 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- DEVICE_GET_INFO( cia6526r1 ) -------------------------------------------------*/ @@ -887,7 +874,6 @@ DEVICE_GET_INFO(cia6526r1) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(cia6526); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cia); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cia); break; diff --git a/src/emu/machine/6532riot.c b/src/emu/machine/6532riot.c index f9fdccadf98..e5a34ef8264 100644 --- a/src/emu/machine/6532riot.c +++ b/src/emu/machine/6532riot.c @@ -491,15 +491,6 @@ static DEVICE_RESET( riot6532 ) } -static DEVICE_SET_INFO( riot6532 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( riot6532 ) { switch (state) @@ -510,7 +501,6 @@ DEVICE_GET_INFO( riot6532 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(riot6532); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(riot6532);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(riot6532);break; diff --git a/src/emu/machine/6821pia.c b/src/emu/machine/6821pia.c index 8d0ece042a4..a684906d40d 100644 --- a/src/emu/machine/6821pia.c +++ b/src/emu/machine/6821pia.c @@ -1319,18 +1319,6 @@ int pia6821_get_irq_b(const device_config *device) /*------------------------------------------------- - DEVICE_SET_INFO( pia ) --------------------------------------------------*/ - -static DEVICE_SET_INFO( pia ) -{ - switch(state) - { - } -} - - -/*------------------------------------------------- DEVICE_GET_INFO( pia6821 ) -------------------------------------------------*/ @@ -1344,7 +1332,6 @@ DEVICE_GET_INFO(pia6821) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(pia); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(pia); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pia); break; diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c index efc1927eb53..7b96301ffb6 100644 --- a/src/emu/machine/6850acia.c +++ b/src/emu/machine/6850acia.c @@ -819,19 +819,6 @@ void acia6850_set_tx_clock(const device_config *device, int clock) /*------------------------------------------------- - DEVICE_SET_INFO( acia6850 ) --------------------------------------------------*/ - -static DEVICE_SET_INFO( acia6850 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- DEVICE_GET_INFO( acia6850 ) -------------------------------------------------*/ @@ -845,7 +832,6 @@ DEVICE_GET_INFO( acia6850 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(acia6850); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(acia6850); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(acia6850); break; diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c index de614a0753f..5dc18e2ea27 100644 --- a/src/emu/machine/68681.c +++ b/src/emu/machine/68681.c @@ -607,18 +607,6 @@ static DEVICE_RESET(duart68681) } /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO(duart68681) -{ - switch (state) - { - /* no parameters to set */ - } -} - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -632,7 +620,6 @@ DEVICE_GET_INFO(duart68681) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(duart68681); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(duart68681); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(duart68681);break; diff --git a/src/emu/machine/74123.c b/src/emu/machine/74123.c index fbffdede487..4cf3484e2e0 100644 --- a/src/emu/machine/74123.c +++ b/src/emu/machine/74123.c @@ -217,15 +217,6 @@ static DEVICE_RESET( ttl74123 ) } -static DEVICE_SET_INFO( ttl74123 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( ttl74123 ) { switch (state) @@ -236,7 +227,6 @@ DEVICE_GET_INFO( ttl74123 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(ttl74123); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ttl74123); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ttl74123); break; diff --git a/src/emu/machine/8237dma.c b/src/emu/machine/8237dma.c index c2574abe67d..6683a52915f 100644 --- a/src/emu/machine/8237dma.c +++ b/src/emu/machine/8237dma.c @@ -417,13 +417,6 @@ static DEVICE_RESET( dma8237 ) { } -static DEVICE_SET_INFO( dma8237 ) { - switch ( state ) { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( dma8237 ) { switch ( state ) { /* --- the following bits of info are returned as 64-bit signed integers --- */ @@ -432,7 +425,6 @@ DEVICE_GET_INFO( dma8237 ) { case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(dma8237); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(dma8237); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(dma8237); break; diff --git a/src/emu/machine/8255ppi.c b/src/emu/machine/8255ppi.c index 4cb6e80401c..a9c0651c14b 100644 --- a/src/emu/machine/8255ppi.c +++ b/src/emu/machine/8255ppi.c @@ -552,13 +552,6 @@ static DEVICE_RESET( ppi8255 ) { } -static DEVICE_SET_INFO( ppi8255 ) { - switch ( state ) { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO(ppi8255) { switch ( state ) { /* --- the following bits of info are returned as 64-bit signed integers --- */ @@ -567,7 +560,6 @@ DEVICE_GET_INFO(ppi8255) { case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(ppi8255); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ppi8255); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ppi8255); break; diff --git a/src/emu/machine/8257dma.c b/src/emu/machine/8257dma.c index e8b73a8dde9..129a94e2bab 100644 --- a/src/emu/machine/8257dma.c +++ b/src/emu/machine/8257dma.c @@ -397,15 +397,6 @@ static DEVICE_RESET( dma8257 ) } -static DEVICE_SET_INFO( dma8257 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( dma8257 ) { switch (state) @@ -416,7 +407,6 @@ DEVICE_GET_INFO( dma8257 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(dma8257); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(dma8257);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(dma8257);break; diff --git a/src/emu/machine/at28c16.c b/src/emu/machine/at28c16.c index 7d5197b6503..9c22e5a8f24 100644 --- a/src/emu/machine/at28c16.c +++ b/src/emu/machine/at28c16.c @@ -205,18 +205,6 @@ static DEVICE_NVRAM(at28c16) } /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO(at28c16) -{ - switch (state) - { - /* no parameters to set */ - } -} - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -230,7 +218,6 @@ DEVICE_GET_INFO(at28c16) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(at28c16); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(at28c16); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(at28c16); break; diff --git a/src/emu/machine/cdp1852.c b/src/emu/machine/cdp1852.c index 0b599b8b19e..45ebb4ffdf6 100644 --- a/src/emu/machine/cdp1852.c +++ b/src/emu/machine/cdp1852.c @@ -218,7 +218,6 @@ DEVICE_GET_INFO( cdp1852 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: /* Nothing */ break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cdp1852); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cdp1852); break; diff --git a/src/emu/machine/eepromdev.c b/src/emu/machine/eepromdev.c index 81d6c95659d..40f0d2460e8 100644 --- a/src/emu/machine/eepromdev.c +++ b/src/emu/machine/eepromdev.c @@ -422,14 +422,6 @@ static DEVICE_RESET(eeprom) { } -static DEVICE_SET_INFO(eeprom) -{ - switch (state) - { - /* no parameters to set */ - } -} - DEVICE_GET_INFO(eeprom) { switch (state) @@ -440,7 +432,6 @@ DEVICE_GET_INFO(eeprom) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(eeprom); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(eeprom); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(eeprom); break; diff --git a/src/emu/machine/f3853.c b/src/emu/machine/f3853.c index ca63905951d..825583d39de 100644 --- a/src/emu/machine/f3853.c +++ b/src/emu/machine/f3853.c @@ -208,14 +208,6 @@ static DEVICE_RESET( f3853 ) } -static DEVICE_SET_INFO( f3853 ) -{ - switch ( state ) - { - } -} - - DEVICE_GET_INFO( f3853 ) { switch ( state ) @@ -226,7 +218,6 @@ DEVICE_GET_INFO( f3853 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(f3853); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(f3853); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(f3853); break; diff --git a/src/emu/machine/i2cmemdev.c b/src/emu/machine/i2cmemdev.c index cc0f98d3654..be0ae9bb6bb 100644 --- a/src/emu/machine/i2cmemdev.c +++ b/src/emu/machine/i2cmemdev.c @@ -451,18 +451,6 @@ static DEVICE_NVRAM( i2cmem ) } /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( i2cmem ) -{ - switch ( state ) - { - /* no parameters to set */ - } -} - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -476,7 +464,6 @@ DEVICE_GET_INFO( i2cmem ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME( i2cmem ); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( i2cmem ); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME( i2cmem ); break; diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index ba5f962c197..a0ff587b447 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -1880,19 +1880,6 @@ static DEVICE_RESET( ide_controller ) /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( ide_controller ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -1906,7 +1893,6 @@ DEVICE_GET_INFO( ide_controller ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(ide_controller); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ide_controller); break; case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(ide_controller); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ide_controller);break; diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h index b23b91f3451..b464580b91a 100644 --- a/src/emu/machine/laserdsc.h +++ b/src/emu/machine/laserdsc.h @@ -25,6 +25,7 @@ /* types of players supported */ enum { + LASERDISC_TYPE_UNKNOWN, LASERDISC_TYPE_PIONEER_PR7820, /* Pioneer PR-7820 */ LASERDISC_TYPE_PIONEER_PR8210, /* Pioneer PR-8210 / LD-V1100 */ LASERDISC_TYPE_SIMUTREK_SPECIAL, /* Pioneer PR-8210 with mods */ @@ -54,12 +55,6 @@ enum #define LASERDISC_CODE_LINE18 18 /* 24-bit line 18 code */ #define LASERDISC_CODE_LINE1718 1718 /* 24-bit best of line 17/18 code */ -/* device configuration */ -enum -{ - LDINFO_INT_TYPE = DEVINFO_INT_DEVICE_SPECIFIC -}; - /*************************************************************************** @@ -228,5 +223,9 @@ DEVICE_GET_INFO( laserdisc ); #define SOUND_LASERDISC DEVICE_GET_INFO_NAME(laserdisc_sound) DEVICE_GET_INFO( laserdisc_sound ); +/* type setter */ +int laserdisc_get_type(const device_config *device); +void laserdisc_set_type(const device_config *device, int type); + #endif /* __LASERDSC_H__ */ diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index f842f445ee4..5244e9caa6d 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -235,15 +235,6 @@ static DEVICE_RESET( latch8 ) } -static DEVICE_SET_INFO( latch8 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( latch8 ) { switch (state) @@ -254,7 +245,6 @@ DEVICE_GET_INFO( latch8 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(latch8); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(latch8);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(latch8);break; diff --git a/src/emu/machine/ldcore.c b/src/emu/machine/ldcore.c index 89656291dd3..43540d24062 100644 --- a/src/emu/machine/ldcore.c +++ b/src/emu/machine/ldcore.c @@ -1578,19 +1578,21 @@ static DEVICE_RESET( laserdisc ) device set info callback -------------------------------------------------*/ -static DEVICE_SET_INFO( laserdisc ) +int laserdisc_get_type(const device_config *device) { laserdisc_state *ld = get_safe_token(device); - switch (state) + if (ld->core != NULL) + return ld->core->config.type; + return LASERDISC_TYPE_UNKNOWN; +} + +void laserdisc_set_type(const device_config *device, int type) +{ + laserdisc_state *ld = get_safe_token(device); + if (ld->core != NULL && ld->core->config.type != type) { - /* --- the following bits of info are set as 64-bit signed integers --- */ - case LDINFO_INT_TYPE: - if (ld != NULL && ld->core != NULL && ld->core->config.type != info->i) - { - ld->core->config.type = info->i; - device_reset(device); - } - break; + ld->core->config.type = type; + device_reset(device); } } @@ -1632,14 +1634,12 @@ DEVICE_GET_INFO( laserdisc ) case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(laserdisc_state); break; case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(laserdisc_config); break; case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; - case LDINFO_INT_TYPE: info->i = config->type; break; /* --- the following bits of info are returned as pointers --- */ case DEVINFO_PTR_ROM_REGION: info->romregion = (intf != NULL) ? intf->romregion : NULL; break; case DEVINFO_PTR_MACHINE_CONFIG: info->machine_config = (intf != NULL) ? intf->machine_config : NULL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(laserdisc); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(laserdisc); break; case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(laserdisc); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(laserdisc); break; diff --git a/src/emu/machine/msm6242.c b/src/emu/machine/msm6242.c index 6bd6774457b..8327d6c4a1e 100644 --- a/src/emu/machine/msm6242.c +++ b/src/emu/machine/msm6242.c @@ -162,15 +162,6 @@ static DEVICE_START( msm6242 ) } -static DEVICE_SET_INFO( msm6242 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( msm6242 ) { switch (state) @@ -181,7 +172,6 @@ DEVICE_GET_INFO( msm6242 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_TIMER; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(msm6242); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(msm6242); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: /* Nothing */ break; diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c index b8eab32d3be..cce00129ce7 100644 --- a/src/emu/machine/pci.c +++ b/src/emu/machine/pci.c @@ -241,19 +241,6 @@ static DEVICE_RESET( pci_bus ) /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( pci_bus ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -267,7 +254,6 @@ DEVICE_GET_INFO( pci_bus ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(pci_bus); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(pci_bus); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pci_bus);break; diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c index 211349ae512..b72eb897a9f 100644 --- a/src/emu/machine/pic8259.c +++ b/src/emu/machine/pic8259.c @@ -427,13 +427,6 @@ static DEVICE_RESET( pic8259 ) { } -static DEVICE_SET_INFO( pic8259 ) { - switch ( state ) { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( pic8259 ) { switch ( state ) { /* --- the following bits of info are returned as 64-bit signed integers --- */ @@ -442,7 +435,6 @@ DEVICE_GET_INFO( pic8259 ) { case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(pic8259); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(pic8259); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pic8259); break; diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c index 2f7b10b9348..30d22cc36fa 100644 --- a/src/emu/machine/pit8253.c +++ b/src/emu/machine/pit8253.c @@ -1119,13 +1119,6 @@ static DEVICE_RESET( pit8253 ) { } -static DEVICE_SET_INFO( pit8253 ) { - switch ( state ) { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( pit8253 ) { switch ( state ) { /* --- the following bits of info are returned as 64-bit signed integers --- */ @@ -1134,7 +1127,6 @@ DEVICE_GET_INFO( pit8253 ) { case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(pit8253); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(pit8253); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pit8253); break; diff --git a/src/emu/machine/smc91c9x.c b/src/emu/machine/smc91c9x.c index bd79c994897..dfaa13fcce6 100644 --- a/src/emu/machine/smc91c9x.c +++ b/src/emu/machine/smc91c9x.c @@ -590,19 +590,6 @@ static DEVICE_RESET( smc91c9x ) /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( smc91c9x ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -616,7 +603,6 @@ static DEVICE_GET_INFO( smc91c9x ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(smc91c9x); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(smc91c9x); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(smc91c9x);break; diff --git a/src/emu/machine/timekpr.c b/src/emu/machine/timekpr.c index 40c5b975a0f..f90b578fd74 100644 --- a/src/emu/machine/timekpr.c +++ b/src/emu/machine/timekpr.c @@ -447,18 +447,6 @@ static DEVICE_NVRAM(timekeeper) } /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO(timekeeper) -{ - switch (state) - { - /* no parameters to set */ - } -} - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -472,7 +460,6 @@ static DEVICE_GET_INFO(timekeeper) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(timekeeper); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(timekeeper); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(timekeeper); break; diff --git a/src/emu/machine/x2212.c b/src/emu/machine/x2212.c index d1949acbaac..0a1526f07b7 100644 --- a/src/emu/machine/x2212.c +++ b/src/emu/machine/x2212.c @@ -144,18 +144,6 @@ static DEVICE_NVRAM(x2212) } /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO(x2212) -{ - switch (state) - { - /* no parameters to set */ - } -} - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -169,7 +157,6 @@ DEVICE_GET_INFO(x2212) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(x2212); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(x2212); break; case DEVINFO_FCT_STOP: /* nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(x2212); break; diff --git a/src/emu/machine/z80ctc.c b/src/emu/machine/z80ctc.c index 2c5f964292a..fb61232ee21 100644 --- a/src/emu/machine/z80ctc.c +++ b/src/emu/machine/z80ctc.c @@ -516,15 +516,6 @@ static DEVICE_RESET( z80ctc ) } -static DEVICE_SET_INFO( z80ctc ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( z80ctc ) { switch (state) @@ -535,7 +526,6 @@ DEVICE_GET_INFO( z80ctc ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(z80ctc); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(z80ctc);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(z80ctc);break; diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c index 535a1852abd..0742ebb2f2f 100644 --- a/src/emu/machine/z80dma.c +++ b/src/emu/machine/z80dma.c @@ -481,15 +481,6 @@ static DEVICE_RESET( z80dma ) } -static DEVICE_SET_INFO( z80dma ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( z80dma ) { switch (state) @@ -500,7 +491,6 @@ DEVICE_GET_INFO( z80dma ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(z80dma); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(z80dma);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(z80dma);break; diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c index 667ed0d90ee..1070450a3f4 100644 --- a/src/emu/machine/z80pio.c +++ b/src/emu/machine/z80pio.c @@ -580,15 +580,6 @@ static DEVICE_RESET( z80pio ) } -static DEVICE_SET_INFO( z80pio ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( z80pio ) { switch (state) @@ -599,7 +590,6 @@ DEVICE_GET_INFO( z80pio ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(z80pio); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(z80pio);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(z80pio);break; diff --git a/src/emu/machine/z80sio.c b/src/emu/machine/z80sio.c index 2ff705c36ae..278f8026ae1 100644 --- a/src/emu/machine/z80sio.c +++ b/src/emu/machine/z80sio.c @@ -811,15 +811,6 @@ static DEVICE_RESET( z80sio ) } -static DEVICE_SET_INFO( z80sio ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( z80sio ) { switch (state) @@ -830,7 +821,6 @@ DEVICE_GET_INFO( z80sio ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(z80sio); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(z80sio);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(z80sio);break; diff --git a/src/emu/sound.c b/src/emu/sound.c index be75b8f75b0..03ed3fc27f1 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -387,7 +387,6 @@ DEVICE_GET_INFO( sound ) /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(sound); break; - case DEVINFO_FCT_SET_INFO: info->set_info = NULL; break; case DEVINFO_FCT_CUSTOM_CONFIG: info->custom_config = DEVICE_CUSTOM_CONFIG_NAME(sound); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/timer.c b/src/emu/timer.c index 0c5ddcb951b..f2422276a3a 100644 --- a/src/emu/timer.c +++ b/src/emu/timer.c @@ -1273,19 +1273,6 @@ static DEVICE_START( timer ) /*------------------------------------------------- - timer_set_info - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( timer ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- timer_get_info - device get info callback -------------------------------------------------*/ @@ -1299,7 +1286,6 @@ DEVICE_GET_INFO( timer ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_TIMER; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(timer); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(timer); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: /* Nothing */ break; diff --git a/src/emu/video.c b/src/emu/video.c index 954f0ba4f01..9b890fe995e 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -1302,20 +1302,6 @@ static DEVICE_STOP( video_screen ) /*------------------------------------------------- - video_screen_set_info - device set info - callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( video_screen ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- video_screen_get_info - device get info callback -------------------------------------------------*/ @@ -1330,7 +1316,6 @@ DEVICE_GET_INFO( video_screen ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(video_screen); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(video_screen); break; case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(video_screen); break; case DEVINFO_FCT_RESET: /* Nothing */ break; diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c index 44c3ed70757..513c3a69d95 100644 --- a/src/emu/video/mc6845.c +++ b/src/emu/video/mc6845.c @@ -885,15 +885,6 @@ static DEVICE_VALIDITY_CHECK( mc6845 ) } -static DEVICE_SET_INFO( mc6845 ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( mc6845 ) { switch (state) @@ -904,7 +895,6 @@ DEVICE_GET_INFO( mc6845 ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(mc6845); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mc6845); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(mc6845); break; diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index 3854c5e3d78..7644c5dc6fd 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -4643,19 +4643,6 @@ static DEVICE_RESET( voodoo ) /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( voodoo ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -4670,7 +4657,6 @@ DEVICE_GET_INFO( voodoo ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_VIDEO; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(voodoo); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(voodoo); break; case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(voodoo); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(voodoo);break; diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c index 6da37a9188f..6c5f0105f91 100644 --- a/src/mame/audio/leland.c +++ b/src/mame/audio/leland.c @@ -651,7 +651,7 @@ static IRQ_CALLBACK( int_callback ) if (LOG_INTERRUPTS) logerror("(%f) **** Acknowledged interrupt vector %02X\n", attotime_to_double(timer_get_time(device->machine)), i80186.intr.poll_status & 0x1f); /* clear the interrupt */ - device_set_info_int(device, CPUINFO_INT_INPUT_STATE + 0, CLEAR_LINE); + cpu_set_info(device, CPUINFO_INT_INPUT_STATE + 0, CLEAR_LINE); i80186.intr.pending = 0; /* clear the request and set the in-service bit */ diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index 7f2810e5478..c4df401aa9c 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -194,7 +194,7 @@ static MACHINE_RESET( dlair ) if (laserdisc_type == LASERDISC_TYPE_VARIABLE) { int newtype = (input_port_read(machine, "DSW2") & 0x08) ? LASERDISC_TYPE_PIONEER_LDV1000 : LASERDISC_TYPE_PIONEER_PR7820; - device_set_info_int(laserdisc, LDINFO_INT_TYPE, newtype); + laserdisc_set_type(laserdisc, newtype); } } @@ -297,7 +297,7 @@ static WRITE8_HANDLER( led_den2_w ) static CUSTOM_INPUT( laserdisc_status_r ) { - switch (device_get_info_int(laserdisc, LDINFO_INT_TYPE)) + switch (laserdisc_get_type(laserdisc)) { case LASERDISC_TYPE_PIONEER_PR7820: return 0; @@ -314,7 +314,7 @@ static CUSTOM_INPUT( laserdisc_status_r ) static CUSTOM_INPUT( laserdisc_command_r ) { - switch (device_get_info_int(laserdisc, LDINFO_INT_TYPE)) + switch (laserdisc_get_type(laserdisc)) { case LASERDISC_TYPE_PIONEER_PR7820: return (laserdisc_line_r(laserdisc, LASERDISC_LINE_READY) == ASSERT_LINE) ? 0 : 1; diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c index 4bce75c39e4..e75589321ba 100644 --- a/src/mame/drivers/megadriv.c +++ b/src/mame/drivers/megadriv.c @@ -6446,7 +6446,7 @@ static void megadriv_init_common(running_machine *machine) vdp_get_word_from_68k_mem = vdp_get_word_from_68k_mem_default; - device_set_info_fct(machine->cpu[0], CPUINFO_FCT_M68K_TAS_CALLBACK, (void *)megadriv_tas_callback); + m68k_set_tas_callback(machine->cpu[0], megadriv_tas_callback); if ((machine->gamedrv->ipt==ipt_megadri6) || (machine->gamedrv->ipt==ipt_ssf2ghw)) { diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c index 6057c2466f3..15cbf412983 100644 --- a/src/mame/drivers/nwk-tr.c +++ b/src/mame/drivers/nwk-tr.c @@ -1093,9 +1093,6 @@ static DRIVER_INIT(nwktr) K056800_init(machine, sound_irq_callback); K033906_init(machine); -// device_set_info_fct(machine->cpu[0], CPUINFO_FCT_SPU_TX_HANDLER, (genf *)jamma_jvs_w); -// device_set_info_fct(machine->cpu[0], CPUINFO_FCT_SPU_RX_HANDLER, (genf *)jamma_jvs_r); - adc1213x_init(0, adc12138_input_callback); lanc2_init(); } diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c index 0b77b9c1993..ff61defbdbd 100644 --- a/src/mame/drivers/segaorun.c +++ b/src/mame/drivers/segaorun.c @@ -260,7 +260,7 @@ static MACHINE_RESET( outrun ) segaic16_tilemap_reset(machine, 0); /* hook the RESET line, which resets CPU #1 */ - device_set_info_fct(machine->cpu[0], CPUINFO_FCT_M68K_RESET_CALLBACK, (genf *)outrun_reset); + m68k_set_reset_callback(machine->cpu[0], outrun_reset); /* start timers to track interrupts */ timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, 223, 0), NULL, 223, scanline_callback); diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c index c4cba276e6c..941fc37c1db 100644 --- a/src/mame/drivers/segaxbd.c +++ b/src/mame/drivers/segaxbd.c @@ -423,7 +423,7 @@ static MACHINE_RESET( xboard ) segaic16_tilemap_reset(machine, 0); /* hook the RESET line, which resets CPU #1 */ - device_set_info_fct(machine->cpu[0], CPUINFO_FCT_M68K_RESET_CALLBACK, (genf *)xboard_reset); + m68k_set_reset_callback(machine->cpu[0], xboard_reset); /* set up the compare/timer chip */ segaic16_compare_timer_init(0, sound_data_w, timer_ack_callback); diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c index 97317e75a1f..6e70743260b 100644 --- a/src/mame/drivers/tatsumi.c +++ b/src/mame/drivers/tatsumi.c @@ -852,7 +852,7 @@ static MACHINE_RESET( apache3 ) cpu_set_input_line(machine->cpu[3], INPUT_LINE_RESET, ASSERT_LINE); // TODO /* Hook the RESET line, which resets the Z80 */ - device_set_info_fct(machine->cpu[1], CPUINFO_FCT_M68K_RESET_CALLBACK, (genf *)apache3_68000_reset); + m68k_set_reset_callback(machine->cpu[1], apache3_68000_reset); } diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c index 60fde932860..eb7666c483d 100644 --- a/src/mame/drivers/thayers.c +++ b/src/mame/drivers/thayers.c @@ -345,19 +345,19 @@ static WRITE8_HANDLER( laserdsc_control_w ) laserdisc_data_w(laserdisc, laserdisc_data); } - switch (device_get_info_int(laserdisc, LDINFO_INT_TYPE)) + switch (laserdisc_get_type(laserdisc)) { - case LASERDISC_TYPE_PIONEER_PR7820: - pr7820_enter = BIT(data, 6) ? CLEAR_LINE : ASSERT_LINE; + case LASERDISC_TYPE_PIONEER_PR7820: + pr7820_enter = BIT(data, 6) ? CLEAR_LINE : ASSERT_LINE; - laserdisc_line_w(laserdisc, LASERDISC_LINE_ENTER, pr7820_enter); + laserdisc_line_w(laserdisc, LASERDISC_LINE_ENTER, pr7820_enter); - // BIT(data, 7) is INT/_EXT, but there is no such input line in laserdsc.h - break; + // BIT(data, 7) is INT/_EXT, but there is no such input line in laserdsc.h + break; - case LASERDISC_TYPE_PIONEER_LDV1000: - laserdisc_line_w(laserdisc, LASERDISC_LINE_ENTER, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE); - break; + case LASERDISC_TYPE_PIONEER_LDV1000: + laserdisc_line_w(laserdisc, LASERDISC_LINE_ENTER, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE); + break; } } @@ -584,7 +584,7 @@ ADDRESS_MAP_END static CUSTOM_INPUT( laserdisc_enter_r ) { - switch (device_get_info_int(laserdisc, LDINFO_INT_TYPE)) + switch (laserdisc_get_type(laserdisc)) { case LASERDISC_TYPE_PIONEER_PR7820: return pr7820_enter; @@ -598,7 +598,7 @@ static CUSTOM_INPUT( laserdisc_enter_r ) static CUSTOM_INPUT( laserdisc_ready_r ) { - switch (device_get_info_int(laserdisc, LDINFO_INT_TYPE)) + switch (laserdisc_get_type(laserdisc)) { case LASERDISC_TYPE_PIONEER_PR7820: return (laserdisc_line_r(laserdisc, LASERDISC_LINE_READY) == ASSERT_LINE) ? 0 : 1; @@ -741,7 +741,7 @@ static MACHINE_RESET( thayers ) pr7820_enter = 0; newtype = (input_port_read(machine, "DSWB") & 0x18) ? LASERDISC_TYPE_PIONEER_LDV1000 : LASERDISC_TYPE_PIONEER_PR7820; - device_set_info_int(laserdisc, LDINFO_INT_TYPE, newtype); + laserdisc_set_type(laserdisc, newtype); } /* COP400 Interface */ diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 14fd1bfd715..6d7310e0b7c 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -317,7 +317,7 @@ static MACHINE_RESET( toaplan2 ) This is important for games with common RAM; the RAM test will fail when leaving service mode if the sound CPU is not reset. */ - device_set_info_fct(machine->cpu[0], CPUINFO_FCT_M68K_RESET_CALLBACK, (genf *)toaplan2_reset); + m68k_set_reset_callback(machine->cpu[0], toaplan2_reset); } static MACHINE_RESET( ghox ) diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index a2afbcbbcdd..2c82969f523 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -300,10 +300,8 @@ static void amiga_m68k_reset(const device_config *device) MACHINE_RESET( amiga ) { -// const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); - /* set m68k reset function */ - device_set_info_fct(machine->cpu[0], CPUINFO_FCT_M68K_RESET_CALLBACK, (genf *)amiga_m68k_reset); + m68k_set_reset_callback(machine->cpu[0], amiga_m68k_reset); amiga_m68k_reset(machine->cpu[0]); diff --git a/src/mame/machine/atari_vg.c b/src/mame/machine/atari_vg.c index 7525b77d982..7cc4d5fb77d 100644 --- a/src/mame/machine/atari_vg.c +++ b/src/mame/machine/atari_vg.c @@ -129,15 +129,6 @@ static DEVICE_RESET( atari_vg_earom ) } -static DEVICE_SET_INFO( atari_vg_earom ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( atari_vg_earom ) { switch (state) @@ -148,7 +139,6 @@ DEVICE_GET_INFO( atari_vg_earom ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(atari_vg_earom); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(atari_vg_earom);break; case DEVINFO_FCT_NVRAM: info->nvram = DEVICE_NVRAM_NAME(atari_vg_earom); break; case DEVINFO_FCT_STOP: /* Nothing */ break; diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c index f93016bd972..e9f09f30c7b 100644 --- a/src/mame/machine/dc.c +++ b/src/mame/machine/dc.c @@ -242,7 +242,7 @@ int level; } level=dc_compute_interrupt_level(machine); - device_set_info_int(machine->cpu[0], CPUINFO_INT_SH4_IRLn_INPUT, 15-level); + sh4_set_irln_input(machine->cpu[0], 15-level); } static int jvsboard_init(int pos) @@ -369,7 +369,7 @@ WRITE64_HANDLER( dc_sysctrl_w ) ddtdata.direction=0; ddtdata.channel=2; ddtdata.mode=25; //011001 - device_set_info_ptr(space->machine->cpu[0],CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); + sh4_dma_ddt(space->machine->cpu[0],&ddtdata); #if DEBUG_SYSCTRL if ((address >= 0x11000000) && (address <= 0x11FFFFFF)) if (dc_sysctrl_regs[SB_LMMODE0]) @@ -478,7 +478,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.direction=0; // 0 source to buffer, 1 buffer to source ddtdata.channel= -1; // not used ddtdata.mode= -1; // copy from/to buffer - device_set_info_ptr(space->machine->cpu[0], CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA, &ddtdata); + sh4_dma_ddt(space->machine->cpu[0], &ddtdata); maple_regs[reg] = 0; endflag=buff[0] & 0x80000000; @@ -510,7 +510,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.direction=0; ddtdata.channel= -1; ddtdata.mode=-1; - device_set_info_ptr(space->machine->cpu[0],CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); + sh4_dma_ddt(space->machine->cpu[0],&ddtdata); chk=0; for (a=1;a < length;a++) { @@ -538,7 +538,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.direction=0; ddtdata.channel= -1; ddtdata.mode=-1; - device_set_info_ptr(space->machine->cpu[0],CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); + sh4_dma_ddt(space->machine->cpu[0],&ddtdata); subcommand = buff[0] & 0xff; #if DEBUG_MAPLE @@ -739,7 +739,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.destination=destination; ddtdata.buffer=buff; ddtdata.direction=1; - device_set_info_ptr(space->machine->cpu[0],CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); + sh4_dma_ddt(space->machine->cpu[0],&ddtdata); if (endflag) { @@ -861,7 +861,7 @@ WRITE64_HANDLER( dc_g1_ctrl_w ) ddtdata.channel= -1; // not used ddtdata.mode= -1; // copy from/to buffer mame_printf_verbose("G1CTRL: transfer %x from ROM %08x to sdram %08x\n", g1bus_regs[SB_GDLEN], dmaoffset, g1bus_regs[SB_GDSTAR]); - device_set_info_ptr(space->machine->cpu[0], CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA, &ddtdata); + sh4_dma_ddt(space->machine->cpu[0], &ddtdata); g1bus_regs[SB_GDST]=0; dc_sysctrl_regs[SB_ISTNRM] |= IST_DMA_GDROM; dc_update_interrupt_status(space->machine); diff --git a/src/mame/machine/mathbox.c b/src/mame/machine/mathbox.c index 82785ac30b6..13c564ad1b2 100644 --- a/src/mame/machine/mathbox.c +++ b/src/mame/machine/mathbox.c @@ -341,15 +341,6 @@ static DEVICE_RESET( mathbox ) } -static DEVICE_SET_INFO( mathbox ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - DEVICE_GET_INFO( mathbox ) { switch (state) @@ -360,7 +351,6 @@ DEVICE_GET_INFO( mathbox ) case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(mathbox); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mathbox);break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(mathbox);break; diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index 4bda1d90cf3..2e5186bc586 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -458,13 +458,13 @@ WRITE32_HANDLER( n64_sp_reg_w ) { case 0x00/4: // SP_PC_REG //printf( "Setting PC to: %08x\n", 0x04001000 | (data & 0xfff ) ); - if( device_get_info_int(space->machine->cpu[1], CPUINFO_INT_REGISTER + RSP_NEXTPC) != 0xffffffff ) + if( cpu_get_reg(space->machine->cpu[1], RSP_NEXTPC) != 0xffffffff ) { - device_set_info_int(space->machine->cpu[1], CPUINFO_INT_REGISTER + RSP_NEXTPC, 0x04001000 | (data & 0xfff)); + cpu_set_reg(space->machine->cpu[1], RSP_NEXTPC, 0x04001000 | (data & 0xfff)); } else { - device_set_info_int(space->machine->cpu[1], CPUINFO_INT_REGISTER + RSP_PC, 0x04001000 | (data & 0xfff)); + cpu_set_reg(space->machine->cpu[1], RSP_PC, 0x04001000 | (data & 0xfff)); } break; diff --git a/src/mame/machine/naomibd.c b/src/mame/machine/naomibd.c index ae19321dd29..edd9301ee88 100644 --- a/src/mame/machine/naomibd.c +++ b/src/mame/machine/naomibd.c @@ -618,19 +618,6 @@ static DEVICE_NVRAM( naomibd ) } /*------------------------------------------------- - device set info callback --------------------------------------------------*/ - -static DEVICE_SET_INFO( naomibd ) -{ - switch (state) - { - /* no parameters to set yet */ - } -} - - -/*------------------------------------------------- device get info callback -------------------------------------------------*/ @@ -651,7 +638,6 @@ DEVICE_GET_INFO( naomibd ) case DEVINFO_PTR_MEMORY: info->p = get_safe_token(device)->memory; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: info->set_info = DEVICE_SET_INFO_NAME(naomibd); break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(naomibd); break; case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(naomibd); break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(naomibd); break; diff --git a/src/mame/machine/s16fd.c b/src/mame/machine/s16fd.c index 809f853ad44..16d16451d80 100644 --- a/src/mame/machine/s16fd.c +++ b/src/mame/machine/s16fd.c @@ -109,7 +109,7 @@ static void fd1094_setstate_and_decrypt(running_machine *machine, int state) } /* Callback for CMP.L instructions (state change) */ -static void fd1094_cmp_callback(const device_config *device, UINT32 val, int reg) +static void fd1094_cmp_callback(const device_config *device, UINT32 val, UINT8 reg) { if (reg == 0 && (val & 0x0000ffff) == 0x0000ffff) // ? { @@ -150,8 +150,8 @@ void fd1094_machine_init(const device_config *device) fd1094_setstate_and_decrypt(device->machine, FD1094_STATE_RESET); fd1094_kludge_reset_values(); - device_set_info_fct(device, CPUINFO_FCT_M68K_CMPILD_CALLBACK, (genf *)fd1094_cmp_callback); - device_set_info_fct(device, CPUINFO_FCT_M68K_RTE_CALLBACK, (genf *)fd1094_rte_callback); + m68k_set_cmpild_callback(device, fd1094_cmp_callback); + m68k_set_rte_callback(device, fd1094_rte_callback); cpu_set_irq_callback(device, fd1094_int_callback); device_reset(device); diff --git a/src/mame/machine/s24fd.c b/src/mame/machine/s24fd.c index f62ce549f1c..22904bbb465 100644 --- a/src/mame/machine/s24fd.c +++ b/src/mame/machine/s24fd.c @@ -90,7 +90,7 @@ static void s24_fd1094_setstate_and_decrypt(running_machine *machine, int state) } /* Callback for CMP.L instructions (state change) */ -static void s24_fd1094_cmp_callback(const device_config *device, UINT32 val, int reg) +static void s24_fd1094_cmp_callback(const device_config *device, UINT32 val, UINT8 reg) { if (reg == 0 && (val & 0x0000ffff) == 0x0000ffff) // ? { @@ -131,8 +131,8 @@ void s24_fd1094_machine_init(running_machine *machine) s24_fd1094_setstate_and_decrypt(machine, FD1094_STATE_RESET); s24_fd1094_kludge_reset_values(); - device_set_info_fct(machine->cpu[1], CPUINFO_FCT_M68K_CMPILD_CALLBACK, (genf *)s24_fd1094_cmp_callback); - device_set_info_fct(machine->cpu[1], CPUINFO_FCT_M68K_RTE_CALLBACK, (genf *)s24_fd1094_rte_callback); + m68k_set_cmpild_callback(machine->cpu[1], s24_fd1094_cmp_callback); + m68k_set_rte_callback(machine->cpu[1], s24_fd1094_rte_callback); cpu_set_irq_callback(machine->cpu[1], s24_fd1094_int_callback); device_reset(machine->cpu[1]); diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c index ea6af26d500..7856295c466 100644 --- a/src/mame/video/ppu2c0x.c +++ b/src/mame/video/ppu2c0x.c @@ -1535,7 +1535,6 @@ DEVICE_GET_INFO(ppu2c02) case PPU2C0XINFO_INT_SCANLINES_PER_FRAME: info->i = PPU_NTSC_SCANLINES_PER_FRAME; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case DEVINFO_FCT_SET_INFO: /* Nothing */ break; case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ppu2c0x); break; case DEVINFO_FCT_STOP: /* Nothing */ break; case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ppu2c0x); break; |