diff options
author | 2012-10-03 12:12:48 +0000 | |
---|---|---|
committer | 2012-10-03 12:12:48 +0000 | |
commit | ee491e3f30eabb6017ac035e13a08d347530cd15 (patch) | |
tree | 38f67470c4bcd0a63bbbdc89af678f3eb00b4ad1 /src/mess/drivers | |
parent | e52d60b7f8ce03e5c1f8c801fd5caa234b3aa3cf (diff) |
Rename driver state classes to have _state in their names (no whatsnew)
Diffstat (limited to 'src/mess/drivers')
-rw-r--r-- | src/mess/drivers/geneve.c | 88 | ||||
-rw-r--r-- | src/mess/drivers/ti99_4p.c | 106 | ||||
-rw-r--r-- | src/mess/drivers/ti99_4x.c | 178 | ||||
-rw-r--r-- | src/mess/drivers/ti99_8.c | 126 | ||||
-rw-r--r-- | src/mess/drivers/tm990189.c | 170 |
5 files changed, 334 insertions, 334 deletions
diff --git a/src/mess/drivers/geneve.c b/src/mess/drivers/geneve.c index 7e6fda11021..e2ce715510c 100644 --- a/src/mess/drivers/geneve.c +++ b/src/mess/drivers/geneve.c @@ -219,10 +219,10 @@ #define SRAM_SIZE 384*1024 // maximum SRAM expansion on-board #define DRAM_SIZE 512*1024 -class geneve : public driver_device +class geneve_state : public driver_device { public: - geneve(const machine_config &mconfig, device_type type, const char *tag) + geneve_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) { } // CRU (Communication Register Unit) handling @@ -281,7 +281,7 @@ private: Memory map */ -static ADDRESS_MAP_START(memmap, AS_PROGRAM, 8, geneve) +static ADDRESS_MAP_START(memmap, AS_PROGRAM, 8, geneve_state) AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE(GMAPPER_TAG, geneve_mapper_device, readm, writem) ADDRESS_MAP_END @@ -293,7 +293,7 @@ ADDRESS_MAP_END TODO: Check whether A0-A2 are available for CRU addressing since those bits are usually routed through the mapper first. */ -static ADDRESS_MAP_START(crumap, AS_IO, 8, geneve) +static ADDRESS_MAP_START(crumap, AS_IO, 8, geneve_state) AM_RANGE(0x0000, 0x0003) AM_DEVREAD(TMS9901_TAG, tms9901_device, read) AM_RANGE(0x0000, 0x0fff) AM_READ( cruread ) @@ -337,7 +337,7 @@ INPUT_PORTS_END #define CRU_CONTROL_BASE 0x1ee0 #define CRU_SSTEP_BASE 0x13c0 -WRITE8_MEMBER ( geneve::cruwrite ) +WRITE8_MEMBER ( geneve_state::cruwrite ) { int addroff = offset << 1; @@ -407,7 +407,7 @@ WRITE8_MEMBER ( geneve::cruwrite ) } } -READ8_MEMBER( geneve::cruread ) +READ8_MEMBER( geneve_state::cruread ) { UINT8 value = 0; int addroff = offset << 4; @@ -433,7 +433,7 @@ READ8_MEMBER( geneve::cruread ) CRU callbacks ***********************************************************************/ -READ8_MEMBER( geneve::read_by_9901 ) +READ8_MEMBER( geneve_state::read_by_9901 ) { int answer = 0; @@ -495,7 +495,7 @@ READ8_MEMBER( geneve::read_by_9901 ) /* Write PE bus reset line */ -WRITE_LINE_MEMBER( geneve::peripheral_bus_reset ) +WRITE_LINE_MEMBER( geneve_state::peripheral_bus_reset ) { if (VERBOSE>0) LOG("geneve: peripheral bus reset request; not implemented yet.\n"); } @@ -503,7 +503,7 @@ WRITE_LINE_MEMBER( geneve::peripheral_bus_reset ) /* Write VDP reset line */ -WRITE_LINE_MEMBER( geneve::VDP_reset ) +WRITE_LINE_MEMBER( geneve_state::VDP_reset ) { if (VERBOSE>0) LOG("geneve: Video reset request; not implemented yet.\n"); } @@ -511,7 +511,7 @@ WRITE_LINE_MEMBER( geneve::VDP_reset ) /* Write joystick select line. 1 selects joystick 1 (pin 7), 0 selects joystick 2 (pin 2) */ -WRITE_LINE_MEMBER( geneve::joystick_select ) +WRITE_LINE_MEMBER( geneve_state::joystick_select ) { m_joyport->write_port((state==ASSERT_LINE)? 1:2); } @@ -519,7 +519,7 @@ WRITE_LINE_MEMBER( geneve::joystick_select ) /* Write external mem cycles (0=long, 1=short) */ -WRITE_LINE_MEMBER( geneve::extbus_wait_states ) +WRITE_LINE_MEMBER( geneve_state::extbus_wait_states ) { if (VERBOSE>0) LOG("geneve: external bus wait states set to %d, not implemented yet.\n", state); } @@ -528,7 +528,7 @@ WRITE_LINE_MEMBER( geneve::extbus_wait_states ) Write vdp wait cycles (1=add 14 cycles, 0=add none) see above for waitstate handling */ -WRITE_LINE_MEMBER( geneve::video_wait_states ) +WRITE_LINE_MEMBER( geneve_state::video_wait_states ) { if (VERBOSE>1) LOG("geneve: video wait states set to %d\n", state); m_mapper->set_video_waitstates(state==ASSERT_LINE); @@ -541,7 +541,7 @@ WRITE_LINE_MEMBER( geneve::video_wait_states ) but again it is ignored. Anyway, the TMS9995 has only two external inputs (INT1 and INT4). */ -WRITE8_MEMBER( geneve::tms9901_interrupt ) +WRITE8_MEMBER( geneve_state::tms9901_interrupt ) { /* INTREQ is connected to INT1. */ m_cpu->set_input_line(INPUT_LINE_99XX_INT1, data); @@ -553,19 +553,19 @@ const tms9901_interface tms9901_wiring_geneve = TMS9901_INT1 | TMS9901_INT2 | TMS9901_INT8 | TMS9901_INTB | TMS9901_INTC, /* only input pins whose state is always known */ // read handler - DEVCB_DRIVER_MEMBER(geneve, read_by_9901), + DEVCB_DRIVER_MEMBER(geneve_state, read_by_9901), { /* write handlers */ - DEVCB_DRIVER_LINE_MEMBER(geneve, peripheral_bus_reset), - DEVCB_DRIVER_LINE_MEMBER(geneve, VDP_reset), - DEVCB_DRIVER_LINE_MEMBER(geneve, joystick_select), + DEVCB_DRIVER_LINE_MEMBER(geneve_state, peripheral_bus_reset), + DEVCB_DRIVER_LINE_MEMBER(geneve_state, VDP_reset), + DEVCB_DRIVER_LINE_MEMBER(geneve_state, joystick_select), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_LINE_MEMBER(GKEYBOARD_TAG, geneve_keyboard_device, reset_line), - DEVCB_DRIVER_LINE_MEMBER(geneve, extbus_wait_states), + DEVCB_DRIVER_LINE_MEMBER(geneve_state, extbus_wait_states), DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(geneve, video_wait_states), + DEVCB_DRIVER_LINE_MEMBER(geneve_state, video_wait_states), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, @@ -575,7 +575,7 @@ const tms9901_interface tms9901_wiring_geneve = }, /* interrupt handler */ - DEVCB_DRIVER_MEMBER(geneve, tms9901_interrupt) + DEVCB_DRIVER_MEMBER(geneve_state, tms9901_interrupt) }; /******************************************************************* @@ -584,7 +584,7 @@ const tms9901_interface tms9901_wiring_geneve = /* inta is connected to both tms9901 IRQ1 line and to tms9995 INT4/EC line. */ -WRITE_LINE_MEMBER( geneve::inta ) +WRITE_LINE_MEMBER( geneve_state::inta ) { m_inta = (state!=0)? ASSERT_LINE : CLEAR_LINE; m_tms9901->set_single_int(1, state); @@ -594,20 +594,20 @@ WRITE_LINE_MEMBER( geneve::inta ) /* intb is connected to tms9901 IRQ12 line. */ -WRITE_LINE_MEMBER( geneve::intb ) +WRITE_LINE_MEMBER( geneve_state::intb ) { m_intb = (state!=0)? ASSERT_LINE : CLEAR_LINE; m_tms9901->set_single_int(12, state); } -WRITE_LINE_MEMBER( geneve::ext_ready ) +WRITE_LINE_MEMBER( geneve_state::ext_ready ) { if (VERBOSE>6) LOG("ti99_8: READY level (ext) =%02x\n", state); m_ready_line = state; m_cpu->set_ready((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); } -WRITE_LINE_MEMBER( geneve::mapper_ready ) +WRITE_LINE_MEMBER( geneve_state::mapper_ready ) { if (VERBOSE>6) LOG("geneve: READY level (mapper) = %02x\n", state); m_ready_line1 = state; @@ -617,7 +617,7 @@ WRITE_LINE_MEMBER( geneve::mapper_ready ) /* set the state of int2 (called by the v9938 core) */ -void geneve::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) +void geneve_state::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) { m_int2 = (state!=0)? ASSERT_LINE : CLEAR_LINE; m_tms9901->set_single_int(2, state); @@ -626,7 +626,7 @@ void geneve::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) /* Interrupt from the keyboard. */ -WRITE_LINE_MEMBER( geneve::keyboard_interrupt ) +WRITE_LINE_MEMBER( geneve_state::keyboard_interrupt ) { m_keyint = (state!=0)? ASSERT_LINE : CLEAR_LINE; m_tms9901->set_single_int(8, state); @@ -635,7 +635,7 @@ WRITE_LINE_MEMBER( geneve::keyboard_interrupt ) /* scanline interrupt */ -TIMER_DEVICE_CALLBACK_MEMBER(geneve::geneve_hblank_interrupt) +TIMER_DEVICE_CALLBACK_MEMBER(geneve_state::geneve_hblank_interrupt) { int scanline = param; @@ -653,7 +653,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(geneve::geneve_hblank_interrupt) } } -WRITE8_MEMBER( geneve::external_operation ) +WRITE8_MEMBER( geneve_state::external_operation ) { static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (VERBOSE>1) @@ -663,16 +663,16 @@ WRITE8_MEMBER( geneve::external_operation ) /* Clock line from the CPU. Used to control wait state generation. */ -WRITE_LINE_MEMBER( geneve::clock_out ) +WRITE_LINE_MEMBER( geneve_state::clock_out ) { m_mapper->clock_in(state); } static TMS9995_CONFIG( geneve_processor_config ) { - DEVCB_DRIVER_MEMBER(geneve, external_operation), + DEVCB_DRIVER_MEMBER(geneve_state, external_operation), DEVCB_NULL, // Instruction acquisition - DEVCB_DRIVER_LINE_MEMBER(geneve, clock_out), + DEVCB_DRIVER_LINE_MEMBER(geneve_state, clock_out), DEVCB_NULL, // wait DEVCB_NULL, // HOLDA INTERNAL_RAM, // use internal RAM @@ -681,7 +681,7 @@ static TMS9995_CONFIG( geneve_processor_config ) static TI_SOUND_CONFIG( sound_conf ) { - DEVCB_DRIVER_LINE_MEMBER(geneve, ext_ready) // READY + DEVCB_DRIVER_LINE_MEMBER(geneve_state, ext_ready) // READY }; static const mm58274c_interface geneve_mm58274c_interface = @@ -692,20 +692,20 @@ static const mm58274c_interface geneve_mm58274c_interface = static GENEVE_KEYBOARD_CONFIG( geneve_keyb_conf ) { - DEVCB_DRIVER_LINE_MEMBER(geneve, keyboard_interrupt) + DEVCB_DRIVER_LINE_MEMBER(geneve_state, keyboard_interrupt) }; static PERIBOX_CONFIG( peribox_conf ) { - DEVCB_DRIVER_LINE_MEMBER(geneve, inta), // INTA - DEVCB_DRIVER_LINE_MEMBER(geneve, intb), // INTB - DEVCB_DRIVER_LINE_MEMBER(geneve, ext_ready), // READY + DEVCB_DRIVER_LINE_MEMBER(geneve_state, inta), // INTA + DEVCB_DRIVER_LINE_MEMBER(geneve_state, intb), // INTB + DEVCB_DRIVER_LINE_MEMBER(geneve_state, ext_ready), // READY 0x00000 // Address bus prefix (Mapper will produce prefixes) }; static GENEVE_MAPPER_CONFIG( mapper_conf ) { - DEVCB_DRIVER_LINE_MEMBER(geneve, mapper_ready) // READY + DEVCB_DRIVER_LINE_MEMBER(geneve_state, mapper_ready) // READY }; static JOYPORT_CONFIG( joyport_60 ) @@ -714,11 +714,11 @@ static JOYPORT_CONFIG( joyport_60 ) 60 }; -DRIVER_INIT_MEMBER(geneve,geneve) +DRIVER_INIT_MEMBER(geneve_state,geneve) { } -void geneve::machine_start() +void geneve_state::machine_start() { m_tms9901 = static_cast<tms9901_device*>(machine().device(TMS9901_TAG)); m_mapper = static_cast<geneve_mapper_device*>(machine().device(GMAPPER_TAG)); @@ -732,7 +732,7 @@ void geneve::machine_start() /* Reset the machine. */ -void geneve::machine_reset() +void geneve_state::machine_reset() { m_inta = CLEAR_LINE; // flag reflecting the INTA line m_intb = CLEAR_LINE; // flag reflecting the INTB line @@ -750,7 +750,7 @@ void geneve::machine_reset() m_joyport->write_port(0x01); // select Joystick 1 } -static MACHINE_CONFIG_START( geneve_60hz, geneve ) +static MACHINE_CONFIG_START( geneve_60hz, geneve_state ) // basic machine hardware // TMS9995 CPU @ 12.0 MHz MCFG_TMS9995_ADD("maincpu", TMS9995, 12000000, memmap, crumap, geneve_processor_config) @@ -762,8 +762,8 @@ static MACHINE_CONFIG_START( geneve_60hz, geneve ) // interlace mode, but in non-interlace modes only half of the lines are // painted. Accordingly, the full set of lines is refreshed at 30 Hz, // not 60 Hz. This should be fixed in the v9938 emulation. - MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, geneve, set_tms9901_INT2_from_v9938) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", geneve, geneve_hblank_interrupt, SCREEN_TAG, 0, 1) /* 262.5 in 60Hz, 312.5 in 50Hz */ + MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, geneve_state, set_tms9901_INT2_from_v9938) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", geneve_state, geneve_hblank_interrupt, SCREEN_TAG, 0, 1) /* 262.5 in 60Hz, 312.5 in 50Hz */ // Main board components MCFG_TMS9901_ADD(TMS9901_TAG, tms9901_wiring_geneve, 3000000) @@ -802,4 +802,4 @@ ROM_START(geneve) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1987,geneve, 0, 0, geneve_60hz, geneve, geneve, geneve, "Myarc", "Geneve 9640" , 0) +COMP( 1987,geneve, 0, 0, geneve_60hz, geneve, geneve_state, geneve, "Myarc", "Geneve 9640" , 0) diff --git a/src/mess/drivers/ti99_4p.c b/src/mess/drivers/ti99_4p.c index 2c885a926bd..697532bba92 100644 --- a/src/mess/drivers/ti99_4p.c +++ b/src/mess/drivers/ti99_4p.c @@ -57,10 +57,10 @@ #define VERBOSE 1 #define LOG logerror -class ti99_4p : public driver_device +class ti99_4p_state : public driver_device { public: - ti99_4p(const machine_config &mconfig, device_type type, const char *tag) + ti99_4p_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) { } DECLARE_WRITE_LINE_MEMBER( console_ready ); @@ -168,11 +168,11 @@ private: }; -static ADDRESS_MAP_START(memmap, AS_PROGRAM, 16, ti99_4p) +static ADDRESS_MAP_START(memmap, AS_PROGRAM, 16, ti99_4p_state) AM_RANGE(0x0000, 0xffff) AM_READWRITE( memread, memwrite ) ADDRESS_MAP_END -static ADDRESS_MAP_START(cru_map, AS_IO, 8, ti99_4p) +static ADDRESS_MAP_START(cru_map, AS_IO, 8, ti99_4p_state) AM_RANGE(0x0000, 0x003f) AM_DEVREAD(TMS9901_TAG, tms9901_device, read) AM_RANGE(0x0000, 0x01ff) AM_READ( cruread ) @@ -260,7 +260,7 @@ INPUT_PORTS_END /* Memory access */ -READ16_MEMBER( ti99_4p::memread ) +READ16_MEMBER( ti99_4p_state::memread ) { int addroff = offset << 1; if (m_rom0 == NULL) return 0; // premature access @@ -336,7 +336,7 @@ READ16_MEMBER( ti99_4p::memread ) return value; } -WRITE16_MEMBER( ti99_4p::memwrite ) +WRITE16_MEMBER( ti99_4p_state::memwrite ) { // m_cpu->execute().adjust_icount(-4); @@ -416,7 +416,7 @@ WRITE16_MEMBER( ti99_4p::memwrite ) The datamux is connected to the clock line in order to operate the wait state counter. */ -void ti99_4p::clock_in(int clock) +void ti99_4p_state::clock_in(int clock) { if (clock==ASSERT_LINE && m_waitcount!=0) { @@ -426,7 +426,7 @@ void ti99_4p::clock_in(int clock) } -READ16_MEMBER( ti99_4p::datamux_read ) +READ16_MEMBER( ti99_4p_state::datamux_read ) { UINT8 hbyte = 0; UINT16 addroff = (offset << 1); @@ -451,7 +451,7 @@ READ16_MEMBER( ti99_4p::datamux_read ) Write access. TODO: use the 16-bit expansion in the box for suitable cards */ -WRITE16_MEMBER( ti99_4p::datamux_write ) +WRITE16_MEMBER( ti99_4p_state::datamux_write ) { UINT16 addroff = (offset << 1); // printf("write address = %04x, value = %04x, memmask = %4x\n", addroff, data, mem_mask); @@ -479,7 +479,7 @@ WRITE16_MEMBER( ti99_4p::datamux_write ) /* CRU write */ -WRITE8_MEMBER( ti99_4p::cruwrite ) +WRITE8_MEMBER( ti99_4p_state::cruwrite ) { int addroff = offset<<1; @@ -503,7 +503,7 @@ WRITE8_MEMBER( ti99_4p::cruwrite ) m_peribox->cruwrite(addroff, data); } -READ8_MEMBER( ti99_4p::cruread ) +READ8_MEMBER( ti99_4p_state::cruread ) { UINT8 value = 0; m_peribox->crureadz(offset<<4, &value); @@ -519,7 +519,7 @@ READ8_MEMBER( ti99_4p::cruread ) 0x2000-0x3fff and 0xa000-0xffff, and the mapper area is at 0x4000-0x401e (only even addresses). */ -READ16_MEMBER( ti99_4p::samsmem_read ) +READ16_MEMBER( ti99_4p_state::samsmem_read ) { UINT32 address = 0; int addroff = offset << 1; @@ -536,7 +536,7 @@ READ16_MEMBER( ti99_4p::samsmem_read ) /* Memory write */ -WRITE16_MEMBER( ti99_4p::samsmem_write ) +WRITE16_MEMBER( ti99_4p_state::samsmem_write ) { UINT32 address = 0; int addroff = offset << 1; @@ -555,7 +555,7 @@ WRITE16_MEMBER( ti99_4p::samsmem_write ) ****************************************************************************/ static const char *const column[] = { "COL0", "COL1", "COL2", "COL3", "COL4", "COL5" }; -READ8_MEMBER( ti99_4p::read_by_9901 ) +READ8_MEMBER( ti99_4p_state::read_by_9901 ) { int answer=0; @@ -613,7 +613,7 @@ READ8_MEMBER( ti99_4p::read_by_9901 ) /* WRITE key column select (P2-P4) */ -void ti99_4p::set_keyboard_column(int number, int data) +void ti99_4p_state::set_keyboard_column(int number, int data) { if (data!=0) m_keyboard_column |= 1 << number; else m_keyboard_column &= ~(1 << number); @@ -624,17 +624,17 @@ void ti99_4p::set_keyboard_column(int number, int data) } } -WRITE_LINE_MEMBER( ti99_4p::keyC0 ) +WRITE_LINE_MEMBER( ti99_4p_state::keyC0 ) { set_keyboard_column(0, state); } -WRITE_LINE_MEMBER( ti99_4p::keyC1 ) +WRITE_LINE_MEMBER( ti99_4p_state::keyC1 ) { set_keyboard_column(1, state); } -WRITE_LINE_MEMBER( ti99_4p::keyC2 ) +WRITE_LINE_MEMBER( ti99_4p_state::keyC2 ) { set_keyboard_column(2, state); } @@ -642,7 +642,7 @@ WRITE_LINE_MEMBER( ti99_4p::keyC2 ) /* WRITE alpha lock line (P5) */ -WRITE_LINE_MEMBER( ti99_4p::alphaW ) +WRITE_LINE_MEMBER( ti99_4p_state::alphaW ) { m_check_alphalock = (state==0); } @@ -650,7 +650,7 @@ WRITE_LINE_MEMBER( ti99_4p::alphaW ) /* command CS1 (only) tape unit motor (P6) */ -WRITE_LINE_MEMBER( ti99_4p::cs_motor ) +WRITE_LINE_MEMBER( ti99_4p_state::cs_motor ) { m_cassette->change_state((state!=0)? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); } @@ -664,14 +664,14 @@ WRITE_LINE_MEMBER( ti99_4p::cs_motor ) We do not really need to emulate this as the tape recorder generates sound on its own. */ -WRITE_LINE_MEMBER( ti99_4p::audio_gate ) +WRITE_LINE_MEMBER( ti99_4p_state::audio_gate ) { } /* tape output (P9) */ -WRITE_LINE_MEMBER( ti99_4p::cassette_output ) +WRITE_LINE_MEMBER( ti99_4p_state::cassette_output ) { m_cassette->output((state!=0)? +1 : -1); } @@ -682,19 +682,19 @@ const tms9901_interface tms9901_wiring_sgcpu = TMS9901_INT1 | TMS9901_INT2 | TMS9901_INTC, /* only input pins whose state is always known */ // read handler - DEVCB_DRIVER_MEMBER(ti99_4p, read_by_9901), + DEVCB_DRIVER_MEMBER(ti99_4p_state, read_by_9901), { // write handlers DEVCB_NULL, DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, keyC0), - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, keyC1), - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, keyC2), - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, alphaW), - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, cs_motor), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, keyC0), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, keyC1), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, keyC2), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, alphaW), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, cs_motor), DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, audio_gate), - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, cassette_output), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, audio_gate), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, cassette_output), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, @@ -704,7 +704,7 @@ const tms9901_interface tms9901_wiring_sgcpu = }, /* interrupt handler */ - DEVCB_DRIVER_MEMBER(ti99_4p, tms9901_interrupt) + DEVCB_DRIVER_MEMBER(ti99_4p_state, tms9901_interrupt) }; /*************************************************************************** @@ -717,7 +717,7 @@ const tms9901_interface tms9901_wiring_sgcpu = no chance to make another device pull down the same line; the CPU just won't access any other device in this time. */ -WRITE_LINE_MEMBER( ti99_4p::console_ready ) +WRITE_LINE_MEMBER( ti99_4p_state::console_ready ) { m_ready_line = state; int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE; @@ -735,7 +735,7 @@ WRITE_LINE_MEMBER( ti99_4p::console_ready ) the READY line, and the datamux raises READY depending on the clock pulse. So we must make sure this does not interfere. */ -WRITE_LINE_MEMBER( ti99_4p::console_ready_dmux ) +WRITE_LINE_MEMBER( ti99_4p_state::console_ready_dmux ) { m_ready_line_dmux = state; int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE; @@ -749,14 +749,14 @@ WRITE_LINE_MEMBER( ti99_4p::console_ready_dmux ) } -WRITE_LINE_MEMBER( ti99_4p::extint ) +WRITE_LINE_MEMBER( ti99_4p_state::extint ) { if (VERBOSE>6) LOG("ti99_4p: EXTINT level = %02x\n", state); if (m_tms9901 != NULL) m_tms9901->set_single_int(1, state); } -WRITE_LINE_MEMBER( ti99_4p::notconnected ) +WRITE_LINE_MEMBER( ti99_4p_state::notconnected ) { if (VERBOSE>6) LOG("ti99_4p: Setting a not connected line ... ignored\n"); } @@ -764,12 +764,12 @@ WRITE_LINE_MEMBER( ti99_4p::notconnected ) /* Clock line from the CPU. Used to control wait state generation. */ -WRITE_LINE_MEMBER( ti99_4p::clock_out ) +WRITE_LINE_MEMBER( ti99_4p_state::clock_out ) { clock_in(state); } -WRITE8_MEMBER( ti99_4p::tms9901_interrupt ) +WRITE8_MEMBER( ti99_4p_state::tms9901_interrupt ) { // offset contains the interrupt level (0-15) // However, the TI board just ignores that level and hardwires it to 1 @@ -777,14 +777,14 @@ WRITE8_MEMBER( ti99_4p::tms9901_interrupt ) m_cpu->set_input_line(INPUT_LINE_99XX_INTREQ, data); } -READ8_MEMBER( ti99_4p::interrupt_level ) +READ8_MEMBER( ti99_4p_state::interrupt_level ) { // On the TI-99 systems these IC lines are not used; the input lines // at the CPU are hardwired to level 1. return 1; } -WRITE8_MEMBER( ti99_4p::external_operation ) +WRITE8_MEMBER( ti99_4p_state::external_operation ) { static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (VERBOSE>1) LOG("External operation %s not implemented on the SGCPU board\n", extop[offset]); @@ -794,23 +794,23 @@ WRITE8_MEMBER( ti99_4p::external_operation ) static PERIBOX_CONFIG( peribox_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, extint), // INTA - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, notconnected), // INTB - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, console_ready), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, extint), // INTA + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, notconnected), // INTB + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, console_ready), // READY 0x70000 // Address bus prefix (AMA/AMB/AMC) }; static TMS99xx_CONFIG( sgcpu_cpuconf ) { - DEVCB_DRIVER_MEMBER(ti99_4p, external_operation), - DEVCB_DRIVER_MEMBER(ti99_4p, interrupt_level), + DEVCB_DRIVER_MEMBER(ti99_4p_state, external_operation), + DEVCB_DRIVER_MEMBER(ti99_4p_state, interrupt_level), DEVCB_NULL, // Instruction acquisition - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, clock_out), + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, clock_out), DEVCB_NULL, // wait DEVCB_NULL // Hold acknowledge }; -void ti99_4p::machine_start() +void ti99_4p_state::machine_start() { m_cpu = static_cast<tms9900_device*>(machine().device("maincpu")); @@ -841,14 +841,14 @@ void ti99_4p::machine_start() /* set the state of int2 (called by the v9938) */ -void ti99_4p::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) +void ti99_4p_state::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) { m_tms9901->set_single_int(2, state); } static TI_SOUND_CONFIG( sound_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4p, console_ready) // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_4p_state, console_ready) // READY }; static JOYPORT_CONFIG( joyport4a_60 ) @@ -860,7 +860,7 @@ static JOYPORT_CONFIG( joyport4a_60 ) /* Reset the machine. */ -MACHINE_RESET_MEMBER(ti99_4p,ti99_4p) +MACHINE_RESET_MEMBER(ti99_4p_state,ti99_4p) { m_tms9901->set_single_int(12, 0); @@ -868,7 +868,7 @@ MACHINE_RESET_MEMBER(ti99_4p,ti99_4p) m_cpu->set_hold(CLEAR_LINE); } -TIMER_DEVICE_CALLBACK_MEMBER(ti99_4p::sgcpu_hblank_interrupt) +TIMER_DEVICE_CALLBACK_MEMBER(ti99_4p_state::sgcpu_hblank_interrupt) { machine().device<v9938_device>(VDP_TAG)->interrupt(); } @@ -876,7 +876,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ti99_4p::sgcpu_hblank_interrupt) /* Machine description. */ -static MACHINE_CONFIG_START( ti99_4p_60hz, ti99_4p ) +static MACHINE_CONFIG_START( ti99_4p_60hz, ti99_4p_state ) /* basic machine hardware */ /* TMS9900 CPU @ 3.0 MHz */ MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map, sgcpu_cpuconf) @@ -887,8 +887,8 @@ static MACHINE_CONFIG_START( ti99_4p_60hz, ti99_4p ) // interlace mode, but in non-interlace modes only half of the lines are // painted. Accordingly, the full set of lines is refreshed at 30 Hz, // not 60 Hz. This should be fixed in the v9938 emulation. - MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, ti99_4p, set_tms9901_INT2_from_v9938) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ti99_4p, sgcpu_hblank_interrupt, SCREEN_TAG, 0, 1) + MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, ti99_4p_state, set_tms9901_INT2_from_v9938) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ti99_4p_state, sgcpu_hblank_interrupt, SCREEN_TAG, 0, 1) // tms9901 MCFG_TMS9901_ADD(TMS9901_TAG, tms9901_wiring_sgcpu, 3000000) diff --git a/src/mess/drivers/ti99_4x.c b/src/mess/drivers/ti99_4x.c index af0f607e43f..6e954ce9ae7 100644 --- a/src/mess/drivers/ti99_4x.c +++ b/src/mess/drivers/ti99_4x.c @@ -60,10 +60,10 @@ /* The console. */ -class ti99_4x : public driver_device +class ti99_4x_state : public driver_device { public: - ti99_4x(const machine_config &mconfig, device_type type, const char *tag) + ti99_4x_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) { } // CRU (Communication Register Unit) handling @@ -132,7 +132,7 @@ private: to the 16bit bus, and the wait state logic is not active during their accesses. */ -static ADDRESS_MAP_START(memmap, AS_PROGRAM, 16, ti99_4x) +static ADDRESS_MAP_START(memmap, AS_PROGRAM, 16, ti99_4x_state) ADDRESS_MAP_GLOBAL_MASK(0xffff) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAM @@ -159,7 +159,7 @@ ADDRESS_MAP_END Write:0000 - 01ff corresponds to bit 0 of base address 0000 - 03fe */ -static ADDRESS_MAP_START(cru_map, AS_IO, 8, ti99_4x) +static ADDRESS_MAP_START(cru_map, AS_IO, 8, ti99_4x_state) AM_RANGE(0x0000, 0x003f) AM_DEVREAD(TMS9901_TAG, tms9901_device, read) AM_RANGE(0x0000, 0x01ff) AM_READ(cruread) @@ -234,7 +234,7 @@ static INPUT_PORTS_START(ti99_4a) PORT_CONFSETTING( 0x01, DEF_STR( On ) ) PORT_START( "LOADINT ") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load interrupt") PORT_CODE(KEYCODE_PRTSCR) PORT_CHANGED_MEMBER(DEVICE_SELF, ti99_4x, load_interrupt, 1) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load interrupt") PORT_CODE(KEYCODE_PRTSCR) PORT_CHANGED_MEMBER(DEVICE_SELF, ti99_4x_state, load_interrupt, 1) PORT_START("COL0") // col 0 PORT_BIT(0x88, IP_ACTIVE_LOW, IPT_UNUSED) @@ -310,39 +310,39 @@ INPUT_PORTS_END static GROM_CONFIG(grom0_config) { - false, 0, region_grom, 0x0000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready), GROMFREQ + false, 0, region_grom, 0x0000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready), GROMFREQ }; static GROM_CONFIG(grom1_config) { - false, 1, region_grom, 0x2000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready), GROMFREQ + false, 1, region_grom, 0x2000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready), GROMFREQ }; static GROM_CONFIG(grom2_config) { - false, 2, region_grom, 0x4000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready), GROMFREQ + false, 2, region_grom, 0x4000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready), GROMFREQ }; static GROMPORT_CONFIG(console_cartslot) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_reset) + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_reset) }; static PERIBOX_CONFIG( peribox_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, extint), // INTA - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, notconnected), // INTB - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, extint), // INTA + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, notconnected), // INTB + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready), // READY 0x70000 // Address bus prefix (AMA/AMB/AMC) }; static TI_SOUND_CONFIG( sound_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready) // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready) // READY }; -READ8_MEMBER( ti99_4x::cruread ) +READ8_MEMBER( ti99_4x_state::cruread ) { // if (VERBOSE>6) LOG("read access to CRU address %04x\n", offset << 4); UINT8 value = 0; @@ -356,14 +356,14 @@ READ8_MEMBER( ti99_4x::cruread ) return value; } -WRITE8_MEMBER( ti99_4x::cruwrite ) +WRITE8_MEMBER( ti99_4x_state::cruwrite ) { if (VERBOSE>6) LOG("ti99_4x: write access to CRU address %04x\n", offset << 1); m_gromport->cruwrite(offset<<1, data); m_peribox->cruwrite(offset<<1, data); } -WRITE8_MEMBER( ti99_4x::external_operation ) +WRITE8_MEMBER( ti99_4x_state::external_operation ) { static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; // Some games (e.g. Slymoids) actually use IDLE for synchronization @@ -402,7 +402,7 @@ WRITE8_MEMBER( ti99_4x::external_operation ) static const char *const column[] = { "COL0", "COL1", "COL2", "COL3", "COL4", "COL5" }; -READ8_MEMBER( ti99_4x::read_by_9901 ) +READ8_MEMBER( ti99_4x_state::read_by_9901 ) { int answer=0; @@ -475,7 +475,7 @@ READ8_MEMBER( ti99_4x::read_by_9901 ) /* Handler for tms9901 P0 pin (handset data acknowledge) */ -WRITE_LINE_MEMBER( ti99_4x::handset_ack ) +WRITE_LINE_MEMBER( ti99_4x_state::handset_ack ) { // Write a value to the joyport. If there is a handset this will set its // ACK line. @@ -485,7 +485,7 @@ WRITE_LINE_MEMBER( ti99_4x::handset_ack ) /* WRITE key column select (P2-P4), TI-99/4 */ -void ti99_4x::set_keyboard_column(int number, int data) +void ti99_4x_state::set_keyboard_column(int number, int data) { if (data != 0) m_keyboard_column |= 1 << number; @@ -506,17 +506,17 @@ void ti99_4x::set_keyboard_column(int number, int data) // joystick 2 = column 7 } -WRITE_LINE_MEMBER( ti99_4x::keyC0 ) +WRITE_LINE_MEMBER( ti99_4x_state::keyC0 ) { set_keyboard_column(0, state); } -WRITE_LINE_MEMBER( ti99_4x::keyC1 ) +WRITE_LINE_MEMBER( ti99_4x_state::keyC1 ) { set_keyboard_column(1, state); } -WRITE_LINE_MEMBER( ti99_4x::keyC2 ) +WRITE_LINE_MEMBER( ti99_4x_state::keyC2 ) { set_keyboard_column(2, state); } @@ -524,7 +524,7 @@ WRITE_LINE_MEMBER( ti99_4x::keyC2 ) /* Select alpha lock line - TI99/4a only (P5) */ -WRITE_LINE_MEMBER( ti99_4x::alphaW ) +WRITE_LINE_MEMBER( ti99_4x_state::alphaW ) { m_check_alphalock = (state==0); } @@ -532,7 +532,7 @@ WRITE_LINE_MEMBER( ti99_4x::alphaW ) /* Control CS1 tape unit motor (P6) */ -WRITE_LINE_MEMBER( ti99_4x::cs1_motor ) +WRITE_LINE_MEMBER( ti99_4x_state::cs1_motor ) { cassette_image_device *img = machine().device<cassette_image_device>(CASSETTE_TAG); img->change_state(state==ASSERT_LINE? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); @@ -541,7 +541,7 @@ WRITE_LINE_MEMBER( ti99_4x::cs1_motor ) /* Control CS2 tape unit motor (P7) */ -WRITE_LINE_MEMBER( ti99_4x::cs2_motor ) +WRITE_LINE_MEMBER( ti99_4x_state::cs2_motor ) { cassette_image_device *img = machine().device<cassette_image_device>(CASSETTE2_TAG); img->change_state(state==ASSERT_LINE? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); @@ -554,7 +554,7 @@ WRITE_LINE_MEMBER( ti99_4x::cs2_motor ) We do not really need to emulate this as the tape recorder generates sound on its own. */ -WRITE_LINE_MEMBER( ti99_4x::audio_gate ) +WRITE_LINE_MEMBER( ti99_4x_state::audio_gate ) { } @@ -562,13 +562,13 @@ WRITE_LINE_MEMBER( ti99_4x::audio_gate ) Tape output (P9) I think polarity is correct, but don't take my word for it. */ -WRITE_LINE_MEMBER( ti99_4x::cassette_output ) +WRITE_LINE_MEMBER( ti99_4x_state::cassette_output ) { machine().device<cassette_image_device>(CASSETTE_TAG)->output(state==ASSERT_LINE? +1 : -1); machine().device<cassette_image_device>(CASSETTE2_TAG)->output(state==ASSERT_LINE? +1 : -1); } -WRITE8_MEMBER( ti99_4x::tms9901_interrupt ) +WRITE8_MEMBER( ti99_4x_state::tms9901_interrupt ) { // offset contains the interrupt level (0-15) // However, the TI board just ignores that level and hardwires it to 1 @@ -576,7 +576,7 @@ WRITE8_MEMBER( ti99_4x::tms9901_interrupt ) m_cpu->set_input_line(INPUT_LINE_99XX_INTREQ, data); } -READ8_MEMBER( ti99_4x::interrupt_level ) +READ8_MEMBER( ti99_4x_state::interrupt_level ) { // On the TI-99 systems these IC lines are not used; the input lines // at the CPU are hardwired to level 1. @@ -586,7 +586,7 @@ READ8_MEMBER( ti99_4x::interrupt_level ) /* Clock line from the CPU. Used to control wait state generation. */ -WRITE_LINE_MEMBER( ti99_4x::clock_out ) +WRITE_LINE_MEMBER( ti99_4x_state::clock_out ) { m_datamux->clock_in(state); } @@ -596,13 +596,13 @@ WRITE_LINE_MEMBER( ti99_4x::clock_out ) /* set the state of TMS9901's INT2 (called by the tms9928 core) */ -WRITE_LINE_MEMBER( ti99_4x::set_tms9901_INT2 ) +WRITE_LINE_MEMBER( ti99_4x_state::set_tms9901_INT2 ) { if (VERBOSE>6) LOG("ti99_4x: VDP int 2 on tms9901, level=%d\n", state); m_tms9901->set_single_int(2, state); } -void ti99_4x::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) +void ti99_4x_state::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) { m_tms9901->set_single_int(2, state); } @@ -610,7 +610,7 @@ void ti99_4x::set_tms9901_INT2_from_v9938(v99x8_device &vdp, int state) /* set the state of TMS9901's INT12 (called by the handset prototype of TI-99/4) */ -WRITE_LINE_MEMBER( ti99_4x::set_tms9901_INT12) +WRITE_LINE_MEMBER( ti99_4x_state::set_tms9901_INT12) { m_tms9901->set_single_int(12, state); } @@ -619,7 +619,7 @@ WRITE_LINE_MEMBER( ti99_4x::set_tms9901_INT12) One of the common hardware mods was to add a switch to trigger a LOAD interrupt (NMI) */ -INPUT_CHANGED_MEMBER( ti99_4x::load_interrupt ) +INPUT_CHANGED_MEMBER( ti99_4x_state::load_interrupt ) { m_cpu->set_input_line(INPUT_LINE_NMI, (newval==0)? ASSERT_LINE : CLEAR_LINE); } @@ -634,7 +634,7 @@ INPUT_CHANGED_MEMBER( ti99_4x::load_interrupt ) no chance to make another device pull down the same line; the CPU just won't access any other device in this time. */ -WRITE_LINE_MEMBER( ti99_4x::console_ready ) +WRITE_LINE_MEMBER( ti99_4x_state::console_ready ) { m_ready_line = state; int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE; @@ -650,7 +650,7 @@ WRITE_LINE_MEMBER( ti99_4x::console_ready ) /* The RESET line leading to a reset of the CPU. */ -WRITE_LINE_MEMBER( ti99_4x::console_reset ) +WRITE_LINE_MEMBER( ti99_4x_state::console_reset ) { if (machine().phase() != MACHINE_PHASE_INIT) { @@ -664,7 +664,7 @@ WRITE_LINE_MEMBER( ti99_4x::console_reset ) the READY line, and the datamux raises READY depending on the clock pulse. So we must make sure this does not interfere. */ -WRITE_LINE_MEMBER( ti99_4x::console_ready_dmux ) +WRITE_LINE_MEMBER( ti99_4x_state::console_ready_dmux ) { m_ready_line_dmux = state; int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE; @@ -677,14 +677,14 @@ WRITE_LINE_MEMBER( ti99_4x::console_ready_dmux ) m_cpu->set_ready(combined); } -WRITE_LINE_MEMBER( ti99_4x::extint ) +WRITE_LINE_MEMBER( ti99_4x_state::extint ) { if (VERBOSE>6) LOG("ti99_4x: EXTINT level = %02x\n", state); if (m_tms9901 != NULL) m_tms9901->set_single_int(1, state); } -WRITE_LINE_MEMBER( ti99_4x::notconnected ) +WRITE_LINE_MEMBER( ti99_4x_state::notconnected ) { if (VERBOSE>6) LOG("ti99_4x: Setting a not connected line ... ignored\n"); } @@ -695,7 +695,7 @@ static TMS9928A_INTERFACE(ti99_4_tms9928a_interface) { SCREEN_TAG, 0x4000, - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, set_tms9901_INT2) + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, set_tms9901_INT2) }; /* TMS9901 setup. */ @@ -704,20 +704,20 @@ const tms9901_interface tms9901_wiring_ti99_4 = TMS9901_INT1 | TMS9901_INT2 | TMS9901_INTC, /* only input pins whose state is always known */ // read handler - DEVCB_DRIVER_MEMBER(ti99_4x, read_by_9901), + DEVCB_DRIVER_MEMBER(ti99_4x_state, read_by_9901), // write handlers { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, handset_ack), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, handset_ack), DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, keyC0), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, keyC1), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, keyC2), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, keyC0), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, keyC1), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, keyC2), DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, cs1_motor), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, cs2_motor), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, audio_gate), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, cassette_output), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, cs1_motor), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, cs2_motor), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, audio_gate), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, cassette_output), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, @@ -727,7 +727,7 @@ const tms9901_interface tms9901_wiring_ti99_4 = }, // interrupt handler - DEVCB_DRIVER_MEMBER(ti99_4x, tms9901_interrupt) + DEVCB_DRIVER_MEMBER(ti99_4x_state, tms9901_interrupt) }; const tms9901_interface tms9901_wiring_ti99_4a = @@ -735,20 +735,20 @@ const tms9901_interface tms9901_wiring_ti99_4a = TMS9901_INT1 | TMS9901_INT2 | TMS9901_INTC, // read handler - DEVCB_DRIVER_MEMBER(ti99_4x, read_by_9901), + DEVCB_DRIVER_MEMBER(ti99_4x_state, read_by_9901), // write handlers { DEVCB_NULL, DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, keyC0), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, keyC1), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, keyC2), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, alphaW), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, cs1_motor), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, cs2_motor), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, audio_gate), - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, cassette_output), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, keyC0), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, keyC1), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, keyC2), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, alphaW), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, cs1_motor), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, cs2_motor), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, audio_gate), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, cassette_output), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, @@ -757,7 +757,7 @@ const tms9901_interface tms9901_wiring_ti99_4a = DEVCB_NULL }, - DEVCB_DRIVER_MEMBER(ti99_4x, tms9901_interrupt) + DEVCB_DRIVER_MEMBER(ti99_4x_state, tms9901_interrupt) }; /* @@ -796,35 +796,35 @@ static const dmux_device_list_entry dmux_devices_ev[] = static DMUX_CONFIG( datamux_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready_dmux), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready_dmux), // READY dmux_devices }; static DMUX_CONFIG( datamux_conf_ev ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready_dmux), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, console_ready_dmux), // READY dmux_devices_ev }; static TMS99xx_CONFIG( ti99_cpuconf ) { - DEVCB_DRIVER_MEMBER(ti99_4x, external_operation), - DEVCB_DRIVER_MEMBER(ti99_4x, interrupt_level), + DEVCB_DRIVER_MEMBER(ti99_4x_state, external_operation), + DEVCB_DRIVER_MEMBER(ti99_4x_state, interrupt_level), DEVCB_NULL, // Instruction acquisition - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, clock_out), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, clock_out), DEVCB_NULL, // wait DEVCB_NULL // Hold acknowledge }; static JOYPORT_CONFIG( joyport4_60 ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, set_tms9901_INT12), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, set_tms9901_INT12), 60 }; static JOYPORT_CONFIG( joyport4_50 ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_4x, set_tms9901_INT12), + DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, set_tms9901_INT12), 50 }; @@ -845,7 +845,7 @@ static JOYPORT_CONFIG( joyport4a_50 ) Machine definitions ******************************************************************************/ -MACHINE_START_MEMBER(ti99_4x,ti99_4) +MACHINE_START_MEMBER(ti99_4x_state,ti99_4) { m_cpu = static_cast<tms9900_device*>(machine().device("maincpu")); @@ -867,7 +867,7 @@ MACHINE_START_MEMBER(ti99_4x,ti99_4) m_ready_line = m_ready_line_dmux = ASSERT_LINE; } -MACHINE_RESET_MEMBER(ti99_4x,ti99_4) +MACHINE_RESET_MEMBER(ti99_4x_state,ti99_4) { m_cpu->set_ready(ASSERT_LINE); m_cpu->set_hold(CLEAR_LINE); @@ -876,12 +876,12 @@ MACHINE_RESET_MEMBER(ti99_4x,ti99_4) /* TI-99/4 - the predecessor of the more popular TI-99/4A */ -static MACHINE_CONFIG_START( ti99_4_60hz, ti99_4x ) +static MACHINE_CONFIG_START( ti99_4_60hz, ti99_4x_state ) /* CPU */ MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map, ti99_cpuconf) - MCFG_MACHINE_START_OVERRIDE(ti99_4x, ti99_4 ) - MCFG_MACHINE_RESET_OVERRIDE(ti99_4x, ti99_4 ) + MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4 ) + MCFG_MACHINE_RESET_OVERRIDE(ti99_4x_state, ti99_4 ) MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918, ti99_4_tms9928a_interface) @@ -917,12 +917,12 @@ static MACHINE_CONFIG_START( ti99_4_60hz, ti99_4x ) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( ti99_4_50hz, ti99_4x ) +static MACHINE_CONFIG_START( ti99_4_50hz, ti99_4x_state ) /* CPU */ MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map, ti99_cpuconf) - MCFG_MACHINE_START_OVERRIDE(ti99_4x, ti99_4 ) - MCFG_MACHINE_RESET_OVERRIDE(ti99_4x, ti99_4 ) + MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4 ) + MCFG_MACHINE_RESET_OVERRIDE(ti99_4x_state, ti99_4 ) /* video hardware */ MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929, ti99_4_tms9928a_interface) @@ -963,7 +963,7 @@ MACHINE_CONFIG_END TI-99/4A - replaced the 99/4 */ -MACHINE_START_MEMBER(ti99_4x,ti99_4a) +MACHINE_START_MEMBER(ti99_4x_state,ti99_4a) { m_cpu = static_cast<tms9900_device*>(machine().device("maincpu")); @@ -982,18 +982,18 @@ MACHINE_START_MEMBER(ti99_4x,ti99_4a) m_ready_line = m_ready_line_dmux = ASSERT_LINE; } -MACHINE_RESET_MEMBER(ti99_4x,ti99_4a) +MACHINE_RESET_MEMBER(ti99_4x_state,ti99_4a) { m_cpu->set_ready(ASSERT_LINE); m_cpu->set_hold(CLEAR_LINE); } -static MACHINE_CONFIG_START( ti99_4a_60hz, ti99_4x ) +static MACHINE_CONFIG_START( ti99_4a_60hz, ti99_4x_state ) /* CPU */ MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map, ti99_cpuconf) - MCFG_MACHINE_START_OVERRIDE(ti99_4x, ti99_4a ) - MCFG_MACHINE_RESET_OVERRIDE(ti99_4x, ti99_4a ) + MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4a ) + MCFG_MACHINE_RESET_OVERRIDE(ti99_4x_state, ti99_4a ) /* Video hardware */ MCFG_TI_TMS991x_ADD_NTSC(VIDEO_SYSTEM_TAG, TMS9918A, ti99_4_tms9928a_interface) @@ -1030,12 +1030,12 @@ static MACHINE_CONFIG_START( ti99_4a_60hz, ti99_4x ) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( ti99_4a_50hz, ti99_4x ) +static MACHINE_CONFIG_START( ti99_4a_50hz, ti99_4x_state ) /* CPU */ MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map, ti99_cpuconf) - MCFG_MACHINE_START_OVERRIDE(ti99_4x, ti99_4a ) - MCFG_MACHINE_RESET_OVERRIDE(ti99_4x, ti99_4a ) + MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4a ) + MCFG_MACHINE_RESET_OVERRIDE(ti99_4x_state, ti99_4a ) /* Video hardware */ MCFG_TI_TMS991x_ADD_PAL(VIDEO_SYSTEM_TAG, TMS9929A, ti99_4_tms9928a_interface) @@ -1073,7 +1073,7 @@ static MACHINE_CONFIG_START( ti99_4a_50hz, ti99_4x ) MACHINE_CONFIG_END -TIMER_DEVICE_CALLBACK_MEMBER(ti99_4x::ti99_4ev_hblank_interrupt) +TIMER_DEVICE_CALLBACK_MEMBER(ti99_4x_state::ti99_4ev_hblank_interrupt) { machine().device<v9938_device>(VDP_TAG)->interrupt(); } @@ -1082,11 +1082,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(ti99_4x::ti99_4ev_hblank_interrupt) TI-99/4A with 80-column support. Actually a separate expansion card (EVPC), replacing the console video processor. */ -static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x ) +static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state ) /* CPU */ MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map, ti99_cpuconf) - MCFG_MACHINE_START_OVERRIDE(ti99_4x, ti99_4a ) + MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4a ) /* video hardware */ // Although we should have a 60 Hz screen rate, we have to set it to 30 here. @@ -1094,8 +1094,8 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x ) // interlace mode, but in non-interlace modes only half of the lines are // painted. Accordingly, the full set of lines is refreshed at 30 Hz, // not 60 Hz. This should be fixed in the v9938 emulation. - MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, ti99_4x, set_tms9901_INT2_from_v9938) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ti99_4x, ti99_4ev_hblank_interrupt, SCREEN_TAG, 0, 1) + MCFG_TI_V9938_ADD(VIDEO_SYSTEM_TAG, 30, SCREEN_TAG, 2500, 512+32, (212+28)*2, DEVICE_SELF, ti99_4x_state, set_tms9901_INT2_from_v9938) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ti99_4x_state, ti99_4ev_hblank_interrupt, SCREEN_TAG, 0, 1) /* Main board */ MCFG_TMS9901_ADD(TMS9901_TAG, tms9901_wiring_ti99_4a, 3000000) diff --git a/src/mess/drivers/ti99_8.c b/src/mess/drivers/ti99_8.c index 3d622a91f87..8c03aaa89f4 100644 --- a/src/mess/drivers/ti99_8.c +++ b/src/mess/drivers/ti99_8.c @@ -217,10 +217,10 @@ Known Issues (MZ, 2010-11-07) #define VERBOSE 0 #define LOG logerror -class ti99_8 : public driver_device +class ti99_8_state : public driver_device { public: - ti99_8(const machine_config &mconfig, device_type type, const char *tag) + ti99_8_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) { } // CRU (Communication Register Unit) handling @@ -279,7 +279,7 @@ private: Memory map. We have a configurable mapper, so we need to delegate the job to the mapper completely. */ -static ADDRESS_MAP_START(memmap, AS_PROGRAM, 8, ti99_8) +static ADDRESS_MAP_START(memmap, AS_PROGRAM, 8, ti99_8_state) AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE(MAPPER_TAG, ti998_mapper_device, readm, writem ) ADDRESS_MAP_END @@ -290,7 +290,7 @@ ADDRESS_MAP_END (decoded by the "Vaquerro" chip, signal NNOICS*) */ -static ADDRESS_MAP_START(crumap, AS_IO, 8, ti99_8) +static ADDRESS_MAP_START(crumap, AS_IO, 8, ti99_8_state) AM_RANGE(0x0000, 0x0003) AM_DEVREAD(TMS9901_TAG, tms9901_device, read) AM_RANGE(0x0000, 0x02ff) AM_READ(cruread) @@ -406,17 +406,17 @@ INPUT_PORTS_END static GROM_CONFIG(grom0_config) { - false, 0, region_grom, 0x0000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ + false, 0, region_grom, 0x0000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; static GROM_CONFIG(grom1_config) { - false, 1, region_grom, 0x2000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ + false, 1, region_grom, 0x2000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; static GROM_CONFIG(grom2_config) { - false, 2, region_grom, 0x4000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ + false, 2, region_grom, 0x4000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; /**************************************************** @@ -447,21 +447,21 @@ static GROM_CONFIG(grom2_config) #define GROM_LIBRARY_CONFIG(_conf, _region) \ static GROM_CONFIG(_conf##0) \ -{ false, 0, _region, 0x0000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 0, _region, 0x0000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##1) \ -{ false, 1, _region, 0x2000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 1, _region, 0x2000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##2) \ -{ false, 2, _region, 0x4000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 2, _region, 0x4000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##3) \ -{ false, 3, _region, 0x6000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 3, _region, 0x6000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##4) \ -{ false, 4, _region, 0x8000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 4, _region, 0x8000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##5) \ -{ false, 5, _region, 0xa000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 5, _region, 0xa000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##6) \ -{ false, 6, _region, 0xc000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; \ +{ false, 6, _region, 0xc000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; \ static GROM_CONFIG(_conf##7) \ -{ false, 7, _region, 0xe000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), GROMFREQ }; +{ false, 7, _region, 0xe000, 0x1800, DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), GROMFREQ }; GROM_LIBRARY_CONFIG(pascal0, pascal0_region) GROM_LIBRARY_CONFIG(pascal1, pascal12_region) @@ -469,19 +469,19 @@ GROM_LIBRARY_CONFIG(pascal2, pascal12_region) static GROMPORT_CONFIG(console_cartslot) { - DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_reset) + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_reset) }; static PERIBOX_CONFIG( peribox_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_8, extint), // INTA - DEVCB_DRIVER_LINE_MEMBER(ti99_8, notconnected), // INTB - DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, extint), // INTA + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, notconnected), // INTB + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), // READY 0x70000 // Address bus prefix (AMA/AMB/AMC) }; -READ8_MEMBER( ti99_8::cruread ) +READ8_MEMBER( ti99_8_state::cruread ) { // if (VERBOSE>6) LOG("read access to CRU address %04x\n", offset << 4); UINT8 value = 0; @@ -497,7 +497,7 @@ READ8_MEMBER( ti99_8::cruread ) return value; } -WRITE8_MEMBER( ti99_8::cruwrite ) +WRITE8_MEMBER( ti99_8_state::cruwrite ) { if (VERBOSE>8) LOG("ti99_8: CRU %04x <- %x\n", offset<<1, data); m_mapper->cruwrite(offset<<1, data); @@ -518,7 +518,7 @@ static const char *const column[] = { "COL8", "COL9", "COL10", "COL11", "COL12", "COL13" }; -READ8_MEMBER( ti99_8::read_by_9901 ) +READ8_MEMBER( ti99_8_state::read_by_9901 ) { int answer=0; UINT8 joyst; @@ -590,7 +590,7 @@ READ8_MEMBER( ti99_8::read_by_9901 ) /* WRITE key column select (P2-P4), TI-99/8 */ -void ti99_8::set_keyboard_column(int number, int data) +void ti99_8_state::set_keyboard_column(int number, int data) { if (data != 0) m_keyboard_column |= 1 << number; else m_keyboard_column &= ~(1 << number); @@ -601,22 +601,22 @@ void ti99_8::set_keyboard_column(int number, int data) } } -WRITE_LINE_MEMBER( ti99_8::keyC0 ) +WRITE_LINE_MEMBER( ti99_8_state::keyC0 ) { set_keyboard_column(0, state); } -WRITE_LINE_MEMBER( ti99_8::keyC1 ) +WRITE_LINE_MEMBER( ti99_8_state::keyC1 ) { set_keyboard_column(1, state); } -WRITE_LINE_MEMBER( ti99_8::keyC2 ) +WRITE_LINE_MEMBER( ti99_8_state::keyC2 ) { set_keyboard_column(2, state); } -WRITE_LINE_MEMBER( ti99_8::keyC3 ) +WRITE_LINE_MEMBER( ti99_8_state::keyC3 ) { set_keyboard_column(3, state); } @@ -624,7 +624,7 @@ WRITE_LINE_MEMBER( ti99_8::keyC3 ) /* Set 99/4A compatibility mode (CRUS=1) */ -WRITE_LINE_MEMBER( ti99_8::CRUS ) +WRITE_LINE_MEMBER( ti99_8_state::CRUS ) { m_mapper->CRUS_set(state==ASSERT_LINE); } @@ -632,7 +632,7 @@ WRITE_LINE_MEMBER( ti99_8::CRUS ) /* Set mapper /PTGEN. This is negative logic; we use PTGE as the positive logic signal. */ -WRITE_LINE_MEMBER( ti99_8::PTGEN ) +WRITE_LINE_MEMBER( ti99_8_state::PTGEN ) { m_mapper->PTGE_set(state==CLEAR_LINE); } @@ -640,7 +640,7 @@ WRITE_LINE_MEMBER( ti99_8::PTGEN ) /* Control cassette tape unit motor (P6) */ -WRITE_LINE_MEMBER( ti99_8::cassette_motor ) +WRITE_LINE_MEMBER( ti99_8_state::cassette_motor ) { cassette_image_device *img = machine().device<cassette_image_device>(CASSETTE_TAG); img->change_state(state==ASSERT_LINE? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); @@ -653,7 +653,7 @@ WRITE_LINE_MEMBER( ti99_8::cassette_motor ) We do not really need to emulate this as the tape recorder generates sound on its own. */ -WRITE_LINE_MEMBER( ti99_8::audio_gate ) +WRITE_LINE_MEMBER( ti99_8_state::audio_gate ) { } @@ -661,12 +661,12 @@ WRITE_LINE_MEMBER( ti99_8::audio_gate ) Tape output (P9) I think polarity is correct, but don't take my word for it. */ -WRITE_LINE_MEMBER( ti99_8::cassette_output ) +WRITE_LINE_MEMBER( ti99_8_state::cassette_output ) { machine().device<cassette_image_device>(CASSETTE_TAG)->output(state==ASSERT_LINE? +1 : -1); } -WRITE8_MEMBER( ti99_8::tms9901_interrupt ) +WRITE8_MEMBER( ti99_8_state::tms9901_interrupt ) { m_cpu->set_input_line(INPUT_LINE_99XX_INT1, data); } @@ -676,20 +676,20 @@ const tms9901_interface tms9901_wiring_ti99_8 = TMS9901_INT1 | TMS9901_INT2 | TMS9901_INTC, // read handler - DEVCB_DRIVER_MEMBER(ti99_8, read_by_9901), + DEVCB_DRIVER_MEMBER(ti99_8_state, read_by_9901), // write handlers { - DEVCB_DRIVER_LINE_MEMBER(ti99_8, keyC0), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, keyC1), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, keyC2), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, keyC3), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, CRUS), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, PTGEN), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, cassette_motor), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, keyC0), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, keyC1), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, keyC2), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, keyC3), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, CRUS), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, PTGEN), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, cassette_motor), DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(ti99_8, audio_gate), - DEVCB_DRIVER_LINE_MEMBER(ti99_8, cassette_output), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, audio_gate), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, cassette_output), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, @@ -698,7 +698,7 @@ const tms9901_interface tms9901_wiring_ti99_8 = DEVCB_NULL }, - DEVCB_DRIVER_MEMBER(ti99_8, tms9901_interrupt) + DEVCB_DRIVER_MEMBER(ti99_8_state, tms9901_interrupt) }; /*****************************************************************************/ @@ -706,7 +706,7 @@ const tms9901_interface tms9901_wiring_ti99_8 = /* set the state of TMS9901's INT2 (called by the tms9928 core) */ -WRITE_LINE_MEMBER( ti99_8::set_tms9901_INT2 ) +WRITE_LINE_MEMBER( ti99_8_state::set_tms9901_INT2 ) { if (VERBOSE>6) LOG("ti99_8: VDP int 2 on tms9901, level=%02x\n", state); m_tms9901->set_single_int(2, state); @@ -717,7 +717,7 @@ WRITE_LINE_MEMBER( ti99_8::set_tms9901_INT2 ) ***********************************************************/ -WRITE_LINE_MEMBER( ti99_8::console_ready ) +WRITE_LINE_MEMBER( ti99_8_state::console_ready ) { if (VERBOSE>6) LOG("ti99_8: READY level=%02x\n", state); m_ready_line = state; @@ -728,7 +728,7 @@ WRITE_LINE_MEMBER( ti99_8::console_ready ) /* The RESET line leading to a reset of the CPU. */ -WRITE_LINE_MEMBER( ti99_8::console_reset ) +WRITE_LINE_MEMBER( ti99_8_state::console_reset ) { if (machine().phase() != MACHINE_PHASE_INIT) { @@ -742,21 +742,21 @@ WRITE_LINE_MEMBER( ti99_8::console_reset ) the READY line, and the mapper raises READY depending on the clock pulse. So we must make sure this does not interfere. */ -WRITE_LINE_MEMBER( ti99_8::console_ready_mapper ) +WRITE_LINE_MEMBER( ti99_8_state::console_ready_mapper ) { if (VERBOSE>6) LOG("ti99_8: READY level (mapper) = %02x\n", state); m_ready_line1 = state; m_cpu->set_ready((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); } -WRITE_LINE_MEMBER( ti99_8::extint ) +WRITE_LINE_MEMBER( ti99_8_state::extint ) { if (VERBOSE>6) LOG("ti99_8: EXTINT level = %02x\n", state); if (m_tms9901 != NULL) m_tms9901->set_single_int(1, state); } -WRITE_LINE_MEMBER( ti99_8::notconnected ) +WRITE_LINE_MEMBER( ti99_8_state::notconnected ) { if (VERBOSE>6) LOG("ti99_8: Setting a not connected line ... ignored\n"); } @@ -765,10 +765,10 @@ static TMS9928A_INTERFACE(ti99_8_tms9118a_interface) { SCREEN_TAG, 0x4000, - DEVCB_DRIVER_LINE_MEMBER(ti99_8, set_tms9901_INT2) + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, set_tms9901_INT2) }; -WRITE8_MEMBER( ti99_8::external_operation ) +WRITE8_MEMBER( ti99_8_state::external_operation ) { static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (VERBOSE>1) LOG("External operation %s not implemented on TI-99 board\n", extop[offset]); @@ -777,7 +777,7 @@ WRITE8_MEMBER( ti99_8::external_operation ) /* Clock line from the CPU. Used to control wait state generation. */ -WRITE_LINE_MEMBER( ti99_8::clock_out ) +WRITE_LINE_MEMBER( ti99_8_state::clock_out ) { m_mapper->clock_in(state); } @@ -791,9 +791,9 @@ WRITE_LINE_MEMBER( ti99_8::clock_out ) */ static TMS9995_CONFIG( ti99_8_processor_config ) { - DEVCB_DRIVER_MEMBER(ti99_8, external_operation), + DEVCB_DRIVER_MEMBER(ti99_8_state, external_operation), DEVCB_NULL, // Instruction acquisition - DEVCB_DRIVER_LINE_MEMBER(ti99_8, clock_out), + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, clock_out), DEVCB_NULL, // wait DEVCB_NULL, // HOLDA NO_INTERNAL_RAM, @@ -802,7 +802,7 @@ static TMS9995_CONFIG( ti99_8_processor_config ) static TI_SOUND_CONFIG( sound_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready) // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready) // READY }; /* @@ -902,13 +902,13 @@ static const mapper8_list_entry mapper_devices[] = static MAPPER8_CONFIG( mapper_conf ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready_mapper), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready_mapper), // READY mapper_devices }; static SPEECH8_CONFIG( speech_config ) { - DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready), // READY + DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, console_ready), // READY }; static JOYPORT_CONFIG( joyport8_60 ) @@ -923,7 +923,7 @@ static JOYPORT_CONFIG( joyport8_50 ) 50 }; -void ti99_8::machine_start() +void ti99_8_state::machine_start() { m_cpu = static_cast<tms9995_device*>(machine().device("maincpu")); m_tms9901 = static_cast<tms9901_device*>(machine().device(TMS9901_TAG)); @@ -938,7 +938,7 @@ void ti99_8::machine_start() m_firstjoy = 14; } -void ti99_8::machine_reset() +void ti99_8_state::machine_reset() { m_cpu->set_hold(CLEAR_LINE); @@ -957,7 +957,7 @@ void ti99_8::machine_reset() m_ready_line = m_ready_line1 = ASSERT_LINE; } -static MACHINE_CONFIG_START( ti99_8_60hz, ti99_8 ) +static MACHINE_CONFIG_START( ti99_8_60hz, ti99_8_state ) /* basic machine hardware */ /* TMS9995-MP9537 CPU @ 10.7 MHz */ MCFG_TMS9995_ADD("maincpu", TMS9995, 10738635, memmap, crumap, ti99_8_processor_config) @@ -1001,7 +1001,7 @@ static MACHINE_CONFIG_START( ti99_8_60hz, ti99_8 ) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( ti99_8_50hz, ti99_8 ) +static MACHINE_CONFIG_START( ti99_8_50hz, ti99_8_state ) /* basic machine hardware */ /* TMS9995-MP9537 CPU @ 10.7 MHz */ MCFG_TMS9995_ADD("maincpu", TMS9995, 10738635, memmap, crumap, ti99_8_processor_config) diff --git a/src/mess/drivers/tm990189.c b/src/mess/drivers/tm990189.c index bc1251ce14c..1a39b5d8c5a 100644 --- a/src/mess/drivers/tm990189.c +++ b/src/mess/drivers/tm990189.c @@ -69,10 +69,10 @@ #include "tm990189v.lh" -class tm990189 : public driver_device +class tm990189_state : public driver_device { public: - tm990189(const machine_config &mconfig, device_type type, const char *tag) + tm990189_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_tms9980a(*this, "maincpu"), m_speaker(*this, SPEAKER_TAG), @@ -161,14 +161,14 @@ static void hold_load(running_machine &machine); -MACHINE_RESET_MEMBER(tm990189,tm990_189) +MACHINE_RESET_MEMBER(tm990189_state,tm990_189) { m_tms9980a->set_ready(ASSERT_LINE); m_tms9980a->set_hold(CLEAR_LINE); hold_load(machine()); } -MACHINE_START_MEMBER(tm990189,tm990_189) +MACHINE_START_MEMBER(tm990189_state,tm990_189) { m_displayena_timer = machine().scheduler().timer_alloc(FUNC_NULL); } @@ -180,7 +180,7 @@ static TMS9928A_INTERFACE(tms9918_interface) DEVCB_NULL }; -MACHINE_START_MEMBER(tm990189,tm990_189_v) +MACHINE_START_MEMBER(tm990189_state,tm990_189_v) { m_displayena_timer = machine().scheduler().timer_alloc(FUNC_NULL); @@ -191,7 +191,7 @@ MACHINE_START_MEMBER(tm990189,tm990_189_v) m_joy2y_timer = machine().scheduler().timer_alloc(FUNC_NULL); } -MACHINE_RESET_MEMBER(tm990189,tm990_189_v) +MACHINE_RESET_MEMBER(tm990189_state,tm990_189_v) { m_tms9980a->set_ready(ASSERT_LINE); m_tms9980a->set_hold(CLEAR_LINE); @@ -201,7 +201,7 @@ MACHINE_RESET_MEMBER(tm990189,tm990_189_v) /* Will be called back from the CPU when triggering an interrupt. */ -READ8_MEMBER( tm990189::interrupt_level ) +READ8_MEMBER( tm990189_state::interrupt_level ) { return m_ic_state; } @@ -212,14 +212,14 @@ READ8_MEMBER( tm990189::interrupt_level ) static TIMER_CALLBACK(clear_load) { - tm990189 *state = machine.driver_data<tm990189>(); + tm990189_state *state = machine.driver_data<tm990189_state>(); state->m_load_state = FALSE; state->m_tms9980a->set_input_line(0, CLEAR_LINE); } static void hold_load(running_machine &machine) { - tm990189 *state = machine.driver_data<tm990189>(); + tm990189_state *state = machine.driver_data<tm990189_state>(); state->m_load_state = TRUE; state->m_ic_state = 2; // LOAD interrupt state->m_tms9980a->set_input_line(0, ASSERT_LINE); @@ -229,7 +229,7 @@ static void hold_load(running_machine &machine) /* LOAD interrupt switch */ -INPUT_CHANGED_MEMBER( tm990189::load_interrupt ) +INPUT_CHANGED_MEMBER( tm990189_state::load_interrupt ) { // When depressed, fire LOAD (neg logic) if (newval==CLEAR_LINE) hold_load(machine()); @@ -243,13 +243,13 @@ INPUT_CHANGED_MEMBER( tm990189::load_interrupt ) Supports EIA and TTY terminals, and an optional 9918 controller. */ -void tm990189::draw_digit() +void tm990189_state::draw_digit() { m_segment_state[m_digitsel] |= ~m_segment; } -TIMER_DEVICE_CALLBACK_MEMBER(tm990189::display_callback) +TIMER_DEVICE_CALLBACK_MEMBER(tm990189_state::display_callback) { UINT8 i; char ledname[8]; @@ -275,7 +275,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tm990189::display_callback) tms9901 code */ -WRITE8_MEMBER( tm990189::usr9901_interrupt_callback ) +WRITE8_MEMBER( tm990189_state::usr9901_interrupt_callback ) { // Triggered by internal timer (set by ROM to 1.6 ms cycle) on level 3 // or by keyboard interrupt (level 6) @@ -286,7 +286,7 @@ WRITE8_MEMBER( tm990189::usr9901_interrupt_callback ) } } -void tm990189::led_set(int offset, bool state) +void tm990189_state::led_set(int offset, bool state) { if (state) m_LED_state |= (1 << offset); @@ -294,32 +294,32 @@ void tm990189::led_set(int offset, bool state) m_LED_state &= ~(1 << offset); } -WRITE_LINE_MEMBER( tm990189::usr9901_led0_w ) +WRITE_LINE_MEMBER( tm990189_state::usr9901_led0_w ) { led_set(0, state); } -WRITE_LINE_MEMBER( tm990189::usr9901_led1_w ) +WRITE_LINE_MEMBER( tm990189_state::usr9901_led1_w ) { led_set(1, state); } -WRITE_LINE_MEMBER( tm990189::usr9901_led2_w ) +WRITE_LINE_MEMBER( tm990189_state::usr9901_led2_w ) { led_set(2, state); } -WRITE_LINE_MEMBER( tm990189::usr9901_led3_w ) +WRITE_LINE_MEMBER( tm990189_state::usr9901_led3_w ) { led_set(3, state); } -WRITE8_MEMBER( tm990189::sys9901_interrupt_callback ) +WRITE8_MEMBER( tm990189_state::sys9901_interrupt_callback ) { machine().device<tms9901_device>("tms9901_0")->set_single_int(5, (data!=0)? ASSERT_LINE:CLEAR_LINE); } -READ8_MEMBER( tm990189::sys9901_r ) +READ8_MEMBER( tm990189_state::sys9901_r ) { UINT8 data = 0; if (offset == TMS9901_CB_INT7) @@ -338,7 +338,7 @@ READ8_MEMBER( tm990189::sys9901_r ) return data; } -void tm990189::digitsel(int offset, bool state) +void tm990189_state::digitsel(int offset, bool state) { if (state) m_digitsel |= 1 << offset; @@ -346,25 +346,25 @@ void tm990189::digitsel(int offset, bool state) m_digitsel &= ~ (1 << offset); } -WRITE_LINE_MEMBER( tm990189::sys9901_digitsel0_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_digitsel0_w ) { digitsel(0, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_digitsel1_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_digitsel1_w ) { digitsel(1, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_digitsel2_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_digitsel2_w ) { digitsel(2, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_digitsel3_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_digitsel3_w ) { digitsel(3, state); } -void tm990189::segment_set(int offset, bool state) +void tm990189_state::segment_set(int offset, bool state) { if (state) m_segment |= 1 << offset; @@ -376,40 +376,40 @@ void tm990189::segment_set(int offset, bool state) } } -WRITE_LINE_MEMBER( tm990189::sys9901_segment0_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment0_w ) { segment_set(0, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment1_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment1_w ) { segment_set(1, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment2_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment2_w ) { segment_set(2, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment3_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment3_w ) { segment_set(3, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment4_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment4_w ) { segment_set(4, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment5_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment5_w ) { segment_set(5, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment6_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment6_w ) { segment_set(6, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_segment7_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_segment7_w ) { segment_set(7, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_dsplytrgr_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_dsplytrgr_w ) { if ((!state) && (m_digitsel < 10)) { @@ -418,7 +418,7 @@ WRITE_LINE_MEMBER( tm990189::sys9901_dsplytrgr_w ) } } -WRITE_LINE_MEMBER( tm990189::sys9901_shiftlight_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_shiftlight_w ) { if (state) m_LED_state |= 0x10; @@ -426,13 +426,13 @@ WRITE_LINE_MEMBER( tm990189::sys9901_shiftlight_w ) m_LED_state &= ~0x10; } -WRITE_LINE_MEMBER( tm990189::sys9901_spkrdrive_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_spkrdrive_w ) { device_t *speaker = machine().device(SPEAKER_TAG); speaker_level_w(speaker, state); } -WRITE_LINE_MEMBER( tm990189::sys9901_tapewdata_w ) +WRITE_LINE_MEMBER( tm990189_state::sys9901_tapewdata_w ) { machine().device<cassette_image_device>(CASSETTE_TAG)->output(state ? +1.0 : -1.0); } @@ -486,7 +486,7 @@ void tm990_189_rs232_image_device::device_start() void tm990_189_rs232_image_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - //tm990189 *state = machine.driver_data<tm990189>(); + //tm990189_state *state = machine.driver_data<tm990189_state>(); UINT8 buf; if (/*state->m_rs232_rts &&*/ /*(mame_ftell(state->m_rs232_fp) < mame_fsize(state->m_rs232_fp))*/1) { @@ -498,7 +498,7 @@ void tm990_189_rs232_image_device::device_timer(emu_timer &timer, device_timer_i bool tm990_189_rs232_image_device::call_load() { - tm990189 *state = machine().driver_data<tm990189>(); + tm990189_state *state = machine().driver_data<tm990189_state>(); tms9902_device* tms9902 = static_cast<tms9902_device*>(machine().device("tms9902")); tms9902->rcv_dsr(ASSERT_LINE); state->m_rs232_input_timer = timer_alloc(); @@ -509,7 +509,7 @@ bool tm990_189_rs232_image_device::call_load() void tm990_189_rs232_image_device::call_unload() { - tm990189 *state = machine().driver_data<tm990189>(); + tm990189_state *state = machine().driver_data<tm990189_state>(); tms9902_device* tms9902 = static_cast<tms9902_device*>(machine().device("tms9902")); tms9902->rcv_dsr(CLEAR_LINE); @@ -527,7 +527,7 @@ void tm990_189_rs232_image_device::call_unload() tms9902->set_cts(RTS); } */ -WRITE8_MEMBER( tm990189::xmit_callback ) +WRITE8_MEMBER( tm990189_state::xmit_callback ) { UINT8 buf = data; if (m_rs232_fp) m_rs232_fp->fwrite(&buf, 1); @@ -536,7 +536,7 @@ WRITE8_MEMBER( tm990189::xmit_callback ) /* External instruction decoding */ -WRITE8_MEMBER( tm990189::external_operation ) +WRITE8_MEMBER( tm990189_state::external_operation ) { switch (offset) { @@ -569,7 +569,7 @@ WRITE8_MEMBER( tm990189::external_operation ) Video Board handling */ -READ8_MEMBER( tm990189::video_vdp_r ) +READ8_MEMBER( tm990189_state::video_vdp_r ) { int reply = 0; @@ -600,7 +600,7 @@ READ8_MEMBER( tm990189::video_vdp_r ) return reply; } -WRITE8_MEMBER( tm990189::video_vdp_w ) +WRITE8_MEMBER( tm990189_state::video_vdp_w ) { if (offset & 1) { @@ -611,7 +611,7 @@ WRITE8_MEMBER( tm990189::video_vdp_w ) } } -READ8_MEMBER( tm990189::video_joy_r ) +READ8_MEMBER( tm990189_state::video_joy_r ) { UINT8 data = ioport("BUTTONS")->read(); @@ -630,7 +630,7 @@ READ8_MEMBER( tm990189::video_joy_r ) return data; } -WRITE8_MEMBER( tm990189::video_joy_w ) +WRITE8_MEMBER( tm990189_state::video_joy_w ) { m_joy1x_timer->reset(attotime::from_usec(ioport("JOY1_X")->read()*28+28)); m_joy1y_timer->reset(attotime::from_usec(ioport("JOY1_Y")->read()*28+28)); @@ -648,10 +648,10 @@ static const tms9901_interface usr9901reset_param = /* write handlers */ { - DEVCB_DRIVER_LINE_MEMBER(tm990189, usr9901_led0_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, usr9901_led1_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, usr9901_led2_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, usr9901_led3_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led0_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led1_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led2_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led3_w), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, @@ -667,7 +667,7 @@ static const tms9901_interface usr9901reset_param = }, /* interrupt handler */ - DEVCB_DRIVER_MEMBER(tm990189, usr9901_interrupt_callback) + DEVCB_DRIVER_MEMBER(tm990189_state, usr9901_interrupt_callback) }; /* system tms9901 setup */ @@ -676,30 +676,30 @@ static const tms9901_interface sys9901reset_param = 0, /* only input pins whose state is always known */ /* Read handler. Covers all input lines (see tms9901.h) */ - DEVCB_DRIVER_MEMBER(tm990189, sys9901_r), + DEVCB_DRIVER_MEMBER(tm990189_state, sys9901_r), /* write handlers */ { - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_digitsel0_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_digitsel1_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_digitsel2_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_digitsel3_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment0_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment1_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment2_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment3_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment4_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment5_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment6_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_segment7_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_dsplytrgr_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_shiftlight_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_spkrdrive_w), - DEVCB_DRIVER_LINE_MEMBER(tm990189, sys9901_tapewdata_w) + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_digitsel0_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_digitsel1_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_digitsel2_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_digitsel3_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment0_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment1_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment2_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment3_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment4_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment5_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment6_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_segment7_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_dsplytrgr_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_shiftlight_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_spkrdrive_w), + DEVCB_DRIVER_LINE_MEMBER(tm990189_state, sys9901_tapewdata_w) }, /* interrupt handler */ - DEVCB_DRIVER_MEMBER(tm990189, sys9901_interrupt_callback) + DEVCB_DRIVER_MEMBER(tm990189_state, sys9901_interrupt_callback) }; /* @@ -734,18 +734,18 @@ static const tms9902_interface tms9902_params = { DEVCB_NULL, /*int_callback,*/ /* called when interrupt pin state changes */ DEVCB_NULL, /*rcv_callback,*/ /* called when a character shall be received */ - DEVCB_DRIVER_MEMBER(tm990189, xmit_callback), /* called when a character is transmitted */ + DEVCB_DRIVER_MEMBER(tm990189_state, xmit_callback), /* called when a character is transmitted */ DEVCB_NULL /* called for setting interface parameters and line states */ }; -static ADDRESS_MAP_START( tm990_189_memmap, AS_PROGRAM, 8, tm990189 ) +static ADDRESS_MAP_START( tm990_189_memmap, AS_PROGRAM, 8, tm990189_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM /* RAM */ AM_RANGE(0x0800, 0x0fff) AM_ROM /* extra ROM - application programs with unibug, remaining 2kb of program for university basic */ AM_RANGE(0x1000, 0x2fff) AM_NOP /* reserved for expansion (RAM and/or tms9918 video controller) */ AM_RANGE(0x3000, 0x3fff) AM_ROM /* main ROM - unibug or university basic */ ADDRESS_MAP_END -static ADDRESS_MAP_START( tm990_189_v_memmap, AS_PROGRAM, 8, tm990189 ) +static ADDRESS_MAP_START( tm990_189_v_memmap, AS_PROGRAM, 8, tm990189_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM /* RAM */ AM_RANGE(0x0800, 0x0fff) AM_ROM /* extra ROM - application programs with unibug, remaining 2kb of program for university basic */ @@ -813,7 +813,7 @@ ADDRESS_MAP_END d */ -static ADDRESS_MAP_START( tm990_189_cru_map, AS_IO, 8, tm990189 ) +static ADDRESS_MAP_START( tm990_189_cru_map, AS_IO, 8, tm990189_state ) AM_RANGE(0x0000, 0x003f) AM_DEVREAD("tms9901_0", tms9901_device, read) /* user I/O tms9901 */ AM_RANGE(0x0040, 0x006f) AM_DEVREAD("tms9901_1", tms9901_device, read) /* system I/O tms9901 */ AM_RANGE(0x0080, 0x00cf) AM_DEVREAD("tms9902", tms9902_device, cruread) /* optional tms9902 */ @@ -825,20 +825,20 @@ ADDRESS_MAP_END static TMS99xx_CONFIG( cpuconf ) { - DEVCB_DRIVER_MEMBER(tm990189, external_operation), - DEVCB_DRIVER_MEMBER(tm990189, interrupt_level), + DEVCB_DRIVER_MEMBER(tm990189_state, external_operation), + DEVCB_DRIVER_MEMBER(tm990189_state, interrupt_level), DEVCB_NULL, // Instruction acquisition DEVCB_NULL, // Clock out DEVCB_NULL, // wait DEVCB_NULL // Hold acknowledge }; -static MACHINE_CONFIG_START( tm990_189, tm990189 ) +static MACHINE_CONFIG_START( tm990_189, tm990189_state ) /* basic machine hardware */ MCFG_TMS99xx_ADD("maincpu", TMS9980A, 2000000, tm990_189_memmap, tm990_189_cru_map, cpuconf) - MCFG_MACHINE_START_OVERRIDE(tm990189, tm990_189 ) - MCFG_MACHINE_RESET_OVERRIDE(tm990189, tm990_189 ) + MCFG_MACHINE_START_OVERRIDE(tm990189_state, tm990_189 ) + MCFG_MACHINE_RESET_OVERRIDE(tm990189_state, tm990_189 ) /* Video hardware */ MCFG_DEFAULT_LAYOUT(layout_tm990189) @@ -856,18 +856,18 @@ static MACHINE_CONFIG_START( tm990_189, tm990189 ) MCFG_TMS9901_ADD("tms9901_1", sys9901reset_param, 2000000) MCFG_TMS9902_ADD("tms9902", tms9902_params, 2000000) MCFG_TM990_189_RS232_ADD("rs232") - MCFG_TIMER_DRIVER_ADD_PERIODIC("display_timer", tm990189, display_callback, attotime::from_hz(30)) + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_timer", tm990189_state, display_callback, attotime::from_hz(30)) // Need to delay the timer, or it will spoil the initial LOAD // TODO: Fix this, probably inside CPU MCFG_TIMER_START_DELAY(attotime::from_msec(150)) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( tm990_189_v, tm990189 ) +static MACHINE_CONFIG_START( tm990_189_v, tm990189_state ) /* basic machine hardware */ MCFG_TMS99xx_ADD("maincpu", TMS9980A, 2000000, tm990_189_v_memmap, tm990_189_cru_map, cpuconf) - MCFG_MACHINE_START_OVERRIDE(tm990189, tm990_189_v ) - MCFG_MACHINE_RESET_OVERRIDE(tm990189, tm990_189_v ) + MCFG_MACHINE_START_OVERRIDE(tm990189_state, tm990_189_v ) + MCFG_MACHINE_RESET_OVERRIDE(tm990189_state, tm990_189_v ) /* video hardware */ MCFG_TMS9928A_ADD( "tms9918", TMS9918, tms9918_interface ) @@ -888,7 +888,7 @@ static MACHINE_CONFIG_START( tm990_189_v, tm990189 ) MCFG_TMS9901_ADD("tms9901_1", sys9901reset_param, 2000000) MCFG_TMS9902_ADD("tms9902", tms9902_params, 2000000) MCFG_TM990_189_RS232_ADD("rs232") - MCFG_TIMER_DRIVER_ADD_PERIODIC("display_timer", tm990189, display_callback, attotime::from_hz(30)) + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_timer", tm990189_state, display_callback, attotime::from_hz(30)) MCFG_TIMER_START_DELAY(attotime::from_msec(150)) MACHINE_CONFIG_END @@ -931,7 +931,7 @@ ROM_END static INPUT_PORTS_START(tm990_189) PORT_START( "LOADINT ") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load interrupt") PORT_CODE(KEYCODE_PRTSCR) PORT_CHANGED_MEMBER(DEVICE_SELF, tm990189, load_interrupt, 1) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load interrupt") PORT_CODE(KEYCODE_PRTSCR) PORT_CHANGED_MEMBER(DEVICE_SELF, tm990189_state, load_interrupt, 1) /* 45-key calculator-like alphanumeric keyboard... */ PORT_START("LINE0") /* row 0 */ |