small cleanup (nw)

This commit is contained in:
Miodrag Milanovic 2013-04-15 15:25:24 +00:00
parent acf99c60b5
commit 9d22ddf716
11 changed files with 94 additions and 95 deletions

View File

@ -57,7 +57,7 @@ void meadows_sh_update(running_machine &machine)
/* amplitude is a combination of the upper 4 bits of 0c01 */ /* amplitude is a combination of the upper 4 bits of 0c01 */
/* and bit 4 merged from S2650's flag output */ /* and bit 4 merged from S2650's flag output */
amp = ((state->m_0c03 & ENABLE_CTR1) == 0) ? 0 : (state->m_0c01 & 0xf0) >> 1; amp = ((state->m_0c03 & ENABLE_CTR1) == 0) ? 0 : (state->m_0c01 & 0xf0) >> 1;
if( machine.device("maincpu")->state().state_int(S2650_FO) ) if( state->m_maincpu->state_int(S2650_FO) )
amp += 0x80; amp += 0x80;
/* calculate frequency for counter #1 */ /* calculate frequency for counter #1 */
/* bit 0..3 of 0c01 are ctr preset */ /* bit 0..3 of 0c01 are ctr preset */

View File

@ -248,7 +248,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
#if 0 #if 0
if ((state->m_mxtc_config_reg[0x63] & 0x50) | ( state->m_mxtc_config_reg[0x63] & 0xA0)) // Only DO if comes a change to disable ROM. if ((state->m_mxtc_config_reg[0x63] & 0x50) | ( state->m_mxtc_config_reg[0x63] & 0xA0)) // Only DO if comes a change to disable ROM.
{ {
if ( busdevice->machine(->safe_pc().device("maincpu"))==0xff74e) busdevice->machine().device("maincpu")->state().set_pc(0xff74d); if ( busdevice->machine(->safe_pc().device("maincpu"))==0xff74e) state->m_maincpu->set_pc(0xff74d);
} }
#endif #endif

View File

@ -138,7 +138,6 @@ ROM_END
static QUICKLOAD_LOAD( lynx ) static QUICKLOAD_LOAD( lynx )
{ {
lynx_state *state = image.device().machine().driver_data<lynx_state>(); lynx_state *state = image.device().machine().driver_data<lynx_state>();
device_t *cpu = state->m_maincpu;
address_space &space = state->m_maincpu->space(AS_PROGRAM); address_space &space = state->m_maincpu->space(AS_PROGRAM);
UINT8 *data = NULL; UINT8 *data = NULL;
UINT8 *rom = state->memregion("maincpu")->base(); UINT8 *rom = state->memregion("maincpu")->base();
@ -175,7 +174,7 @@ static QUICKLOAD_LOAD( lynx )
space.write_byte(0x1fc, start & 0xff); space.write_byte(0x1fc, start & 0xff);
space.write_byte(0x1fd, start >> 8); space.write_byte(0x1fd, start >> 8);
cpu->state().set_pc(start); state->m_maincpu->set_pc(start);
return IMAGE_INIT_PASS; return IMAGE_INIT_PASS;
} }

View File

@ -1874,7 +1874,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */ pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */
m_maincpu->set_state_int(PDP1_PC, ( m_maincpu->state_int(PDP1_TA) & 0170000) m_maincpu->set_state_int(PDP1_PC, ( m_maincpu->state_int(PDP1_TA) & 0170000)
| (m_maincpu->state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */ | (m_maincpu->state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */
/*machine.device("maincpu")->state().set_state_int(PDP1_MA, machine.device("maincpu")->state().state_int(PDP1_PC));*/ /*m_maincpu->set_state_int(PDP1_MA, m_maincpu->state_int(PDP1_PC));*/
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW)); m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
m_maincpu->set_state_int(PDP1_OV, (UINT64)0); /* right??? */ m_maincpu->set_state_int(PDP1_OV, (UINT64)0); /* right??? */
m_maincpu->set_state_int(PDP1_RUN, (UINT64)0); m_maincpu->set_state_int(PDP1_RUN, (UINT64)0);

View File

@ -94,7 +94,6 @@ INPUT_CHANGED_MEMBER(ssem_state::panel_check)
UINT8 edit2_state = ioport("EDIT2")->read(); UINT8 edit2_state = ioport("EDIT2")->read();
UINT8 edit3_state = ioport("EDIT3")->read(); UINT8 edit3_state = ioport("EDIT3")->read();
UINT8 misc_state = ioport("MISC")->read(); UINT8 misc_state = ioport("MISC")->read();
device_t *ssem_cpu = m_maincpu;
switch( (int)(FPTR)param ) switch( (int)(FPTR)param )
{ {
@ -209,7 +208,7 @@ INPUT_CHANGED_MEMBER(ssem_state::panel_check)
case PANEL_HALT: case PANEL_HALT:
if(misc_state & 0x04) if(misc_state & 0x04)
{ {
ssem_cpu->state().set_state_int(SSEM_HALT, 1 - ssem_cpu->state().state_int(SSEM_HALT)); m_maincpu->set_state_int(SSEM_HALT, 1 - m_maincpu->state_int(SSEM_HALT));
} }
break; break;
} }
@ -451,8 +450,7 @@ void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, const char
UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
UINT32 line = 0; UINT32 line = 0;
device_t *ssem_cpu = m_maincpu; UINT32 accum = m_maincpu->state_int(SSEM_A);
UINT32 accum = ssem_cpu->state().state_int(SSEM_A);
UINT32 bit = 0; UINT32 bit = 0;
UINT32 word = 0; UINT32 word = 0;
@ -491,7 +489,7 @@ UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitma
(m_store[(m_store_line << 2) | 1] << 16) | (m_store[(m_store_line << 2) | 1] << 16) |
(m_store[(m_store_line << 2) | 2] << 8) | (m_store[(m_store_line << 2) | 2] << 8) |
(m_store[(m_store_line << 2) | 3] << 0)); (m_store[(m_store_line << 2) | 3] << 0));
glyph_print(bitmap, 0, 272, "LINE:%02d VALUE:%08x HALT:%d", m_store_line, word, ssem_cpu->state().state_int(SSEM_HALT)); glyph_print(bitmap, 0, 272, "LINE:%02d VALUE:%08x HALT:%d", m_store_line, word, m_maincpu->state_int(SSEM_HALT));
return 0; return 0;
} }

View File

@ -271,22 +271,22 @@ static void lviv_setup_snapshot (running_machine &machine,UINT8 * data)
/* Set registers */ /* Set registers */
lo = data[0x14112] & 0x0ff; lo = data[0x14112] & 0x0ff;
hi = data[0x14111] & 0x0ff; hi = data[0x14111] & 0x0ff;
machine.device("maincpu")->state().set_state_int(I8085_BC, (hi << 8) | lo); state->m_maincpu->set_state_int(I8085_BC, (hi << 8) | lo);
lo = data[0x14114] & 0x0ff; lo = data[0x14114] & 0x0ff;
hi = data[0x14113] & 0x0ff; hi = data[0x14113] & 0x0ff;
machine.device("maincpu")->state().set_state_int(I8085_DE, (hi << 8) | lo); state->m_maincpu->set_state_int(I8085_DE, (hi << 8) | lo);
lo = data[0x14116] & 0x0ff; lo = data[0x14116] & 0x0ff;
hi = data[0x14115] & 0x0ff; hi = data[0x14115] & 0x0ff;
machine.device("maincpu")->state().set_state_int(I8085_HL, (hi << 8) | lo); state->m_maincpu->set_state_int(I8085_HL, (hi << 8) | lo);
lo = data[0x14118] & 0x0ff; lo = data[0x14118] & 0x0ff;
hi = data[0x14117] & 0x0ff; hi = data[0x14117] & 0x0ff;
machine.device("maincpu")->state().set_state_int(I8085_AF, (hi << 8) | lo); state->m_maincpu->set_state_int(I8085_AF, (hi << 8) | lo);
lo = data[0x14119] & 0x0ff; lo = data[0x14119] & 0x0ff;
hi = data[0x1411a] & 0x0ff; hi = data[0x1411a] & 0x0ff;
machine.device("maincpu")->state().set_state_int(I8085_SP, (hi << 8) | lo); state->m_maincpu->set_state_int(I8085_SP, (hi << 8) | lo);
lo = data[0x1411b] & 0x0ff; lo = data[0x1411b] & 0x0ff;
hi = data[0x1411c] & 0x0ff; hi = data[0x1411c] & 0x0ff;
machine.device("maincpu")->state().set_state_int(I8085_PC, (hi << 8) | lo); state->m_maincpu->set_state_int(I8085_PC, (hi << 8) | lo);
/* Memory dump */ /* Memory dump */
memcpy (machine.device<ram_device>(RAM_TAG)->pointer(), data+0x0011, 0xc000); memcpy (machine.device<ram_device>(RAM_TAG)->pointer(), data+0x0011, 0xc000);
@ -302,12 +302,13 @@ static void lviv_setup_snapshot (running_machine &machine,UINT8 * data)
static void dump_registers(running_machine &machine) static void dump_registers(running_machine &machine)
{ {
logerror("PC = %04x\n", (unsigned) machine.device("maincpu")->state().state_int(I8085_PC)); lviv_state *state = machine.driver_data<lviv_state>();
logerror("SP = %04x\n", (unsigned) machine.device("maincpu")->state().state_int(I8085_SP)); logerror("PC = %04x\n", (unsigned) state->m_maincpu->state_int(I8085_PC));
logerror("AF = %04x\n", (unsigned) machine.device("maincpu")->state().state_int(I8085_AF)); logerror("SP = %04x\n", (unsigned) state->m_maincpu->state_int(I8085_SP));
logerror("BC = %04x\n", (unsigned) machine.device("maincpu")->state().state_int(I8085_BC)); logerror("AF = %04x\n", (unsigned) state->m_maincpu->state_int(I8085_AF));
logerror("DE = %04x\n", (unsigned) machine.device("maincpu")->state().state_int(I8085_DE)); logerror("BC = %04x\n", (unsigned) state->m_maincpu->state_int(I8085_BC));
logerror("HL = %04x\n", (unsigned) machine.device("maincpu")->state().state_int(I8085_HL)); logerror("DE = %04x\n", (unsigned) state->m_maincpu->state_int(I8085_DE));
logerror("HL = %04x\n", (unsigned) state->m_maincpu->state_int(I8085_HL));
} }
static int lviv_verify_snapshot (UINT8 * data, UINT32 size) static int lviv_verify_snapshot (UINT8 * data, UINT32 size)

View File

@ -451,20 +451,20 @@ static int instruction_hook(device_t &device, offs_t curpc)
static void decode_dos21(device_t *device,offs_t pc) static void decode_dos21(device_t *device,offs_t pc)
{ {
device_t *cpu = device->machine().device(MAINCPU_TAG); mbc55x_state *state = device->machine().driver_data<mbc55x_state>();
UINT16 ax = cpu->state().state_int(I8086_AX); UINT16 ax = state->m_maincpu->state_int(I8086_AX);
UINT16 bx = cpu->state().state_int(I8086_BX); UINT16 bx = state->m_maincpu->state_int(I8086_BX);
UINT16 cx = cpu->state().state_int(I8086_CX); UINT16 cx = state->m_maincpu->state_int(I8086_CX);
UINT16 dx = cpu->state().state_int(I8086_DX); UINT16 dx = state->m_maincpu->state_int(I8086_DX);
UINT16 cs = cpu->state().state_int(I8086_CS); UINT16 cs = state->m_maincpu->state_int(I8086_CS);
UINT16 ds = cpu->state().state_int(I8086_DS); UINT16 ds = state->m_maincpu->state_int(I8086_DS);
UINT16 es = cpu->state().state_int(I8086_ES); UINT16 es = state->m_maincpu->state_int(I8086_ES);
UINT16 ss = cpu->state().state_int(I8086_SS); UINT16 ss = state->m_maincpu->state_int(I8086_SS);
UINT16 si = cpu->state().state_int(I8086_SI); UINT16 si = state->m_maincpu->state_int(I8086_SI);
UINT16 di = cpu->state().state_int(I8086_DI); UINT16 di = state->m_maincpu->state_int(I8086_DI);
UINT16 bp = cpu->state().state_int(I8086_BP); UINT16 bp = state->m_maincpu->state_int(I8086_BP);
logerror("=======================================================================\n"); logerror("=======================================================================\n");
logerror("DOS Int 0x21 call at %05X\n",pc); logerror("DOS Int 0x21 call at %05X\n",pc);

View File

@ -753,7 +753,6 @@ DRIVER_INIT_MEMBER(mbee_state,mbeett)
QUICKLOAD_LOAD( mbee ) QUICKLOAD_LOAD( mbee )
{ {
mbee_state *state = image.device().machine().driver_data<mbee_state>(); mbee_state *state = image.device().machine().driver_data<mbee_state>();
device_t *cpu = state->m_maincpu;
address_space &space = state->m_maincpu->space(AS_PROGRAM); address_space &space = state->m_maincpu->space(AS_PROGRAM);
UINT16 i, j; UINT16 i, j;
UINT8 data, sw = state->ioport("CONFIG")->read() & 1; /* reading the dipswitch: 1 = autorun */ UINT8 data, sw = state->ioport("CONFIG")->read() & 1; /* reading the dipswitch: 1 = autorun */
@ -783,7 +782,7 @@ QUICKLOAD_LOAD( mbee )
if (sw) if (sw)
{ {
space.write_word(0xa2,0x801e); /* fix warm-start vector to get around some copy-protections */ space.write_word(0xa2,0x801e); /* fix warm-start vector to get around some copy-protections */
cpu->state().set_pc(0x801e); state->m_maincpu->set_pc(0x801e);
} }
else else
space.write_word(0xa2,0x8517); space.write_word(0xa2,0x8517);
@ -810,7 +809,7 @@ QUICKLOAD_LOAD( mbee )
} }
} }
if (sw) cpu->state().set_pc(0x100); if (sw) state->m_maincpu->set_pc(0x100);
} }
return IMAGE_INIT_PASS; return IMAGE_INIT_PASS;
@ -837,7 +836,6 @@ QUICKLOAD_LOAD( mbee_z80bin )
/* check to see if autorun is on (I hate how this works) */ /* check to see if autorun is on (I hate how this works) */
autorun = state->ioport("CONFIG")->read_safe(0xFF) & 1; autorun = state->ioport("CONFIG")->read_safe(0xFF) & 1;
device_t *cpu = state->m_maincpu;
address_space &space = state->m_maincpu->space(AS_PROGRAM); address_space &space = state->m_maincpu->space(AS_PROGRAM);
space.write_word(0xa6, execute_address); /* fix the EXEC command */ space.write_word(0xa6, execute_address); /* fix the EXEC command */
@ -845,7 +843,7 @@ QUICKLOAD_LOAD( mbee_z80bin )
if (autorun) if (autorun)
{ {
space.write_word(0xa2, execute_address); /* fix warm-start vector to get around some copy-protections */ space.write_word(0xa2, execute_address); /* fix warm-start vector to get around some copy-protections */
cpu->state().set_pc(execute_address); state->m_maincpu->set_pc(execute_address);
} }
else else
{ {

View File

@ -764,15 +764,16 @@ static int parse_zillion_hex(UINT8 *snapshot_buff, char *src)
static void microtan_set_cpu_regs(running_machine &machine,const UINT8 *snapshot_buff, int base) static void microtan_set_cpu_regs(running_machine &machine,const UINT8 *snapshot_buff, int base)
{ {
microtan_state *state = machine.driver_data<microtan_state>();
logerror("microtan_snapshot_copy: PC:%02X%02X P:%02X A:%02X X:%02X Y:%02X SP:1%02X", logerror("microtan_snapshot_copy: PC:%02X%02X P:%02X A:%02X X:%02X Y:%02X SP:1%02X",
snapshot_buff[base+1], snapshot_buff[base+0], snapshot_buff[base+2], snapshot_buff[base+3], snapshot_buff[base+1], snapshot_buff[base+0], snapshot_buff[base+2], snapshot_buff[base+3],
snapshot_buff[base+4], snapshot_buff[base+5], snapshot_buff[base+6]); snapshot_buff[base+4], snapshot_buff[base+5], snapshot_buff[base+6]);
machine.device("maincpu")->state().set_state_int(M6502_PC, snapshot_buff[base+0] + 256 * snapshot_buff[base+1]); state->m_maincpu->set_state_int(M6502_PC, snapshot_buff[base+0] + 256 * snapshot_buff[base+1]);
machine.device("maincpu")->state().set_state_int(M6502_P, snapshot_buff[base+2]); state->m_maincpu->set_state_int(M6502_P, snapshot_buff[base+2]);
machine.device("maincpu")->state().set_state_int(M6502_A, snapshot_buff[base+3]); state->m_maincpu->set_state_int(M6502_A, snapshot_buff[base+3]);
machine.device("maincpu")->state().set_state_int(M6502_X, snapshot_buff[base+4]); state->m_maincpu->set_state_int(M6502_X, snapshot_buff[base+4]);
machine.device("maincpu")->state().set_state_int(M6502_Y, snapshot_buff[base+5]); state->m_maincpu->set_state_int(M6502_Y, snapshot_buff[base+5]);
machine.device("maincpu")->state().set_state_int(M6502_S, snapshot_buff[base+6]); state->m_maincpu->set_state_int(M6502_S, snapshot_buff[base+6]);
} }
static void microtan_snapshot_copy(running_machine &machine, UINT8 *snapshot_buff, int snapshot_size) static void microtan_snapshot_copy(running_machine &machine, UINT8 *snapshot_buff, int snapshot_size)

View File

@ -304,42 +304,43 @@ static void pdp1_draw_panel_backdrop(running_machine &machine, bitmap_ind16 &bit
*/ */
static void pdp1_draw_panel(running_machine &machine, bitmap_ind16 &bitmap) static void pdp1_draw_panel(running_machine &machine, bitmap_ind16 &bitmap)
{ {
pdp1_state *state = machine.driver_data<pdp1_state>();
/* column 1: registers, test word, test address */ /* column 1: registers, test word, test address */
pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset+16, y_panel_pc_offset+8, machine.device("maincpu")->state().state_int(PDP1_PC), 16); pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset+16, y_panel_pc_offset+8,state->m_maincpu->state_int(PDP1_PC), 16);
pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset+16, y_panel_ma_offset+8, machine.device("maincpu")->state().state_int(PDP1_MA), 16); pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset+16, y_panel_ma_offset+8,state->m_maincpu->state_int(PDP1_MA), 16);
pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset, y_panel_mb_offset+8, machine.device("maincpu")->state().state_int(PDP1_MB), 18); pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset, y_panel_mb_offset+8,state->m_maincpu->state_int(PDP1_MB), 18);
pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset, y_panel_ac_offset+8, machine.device("maincpu")->state().state_int(PDP1_AC), 18); pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset, y_panel_ac_offset+8,state->m_maincpu->state_int(PDP1_AC), 18);
pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset, y_panel_io_offset+8, machine.device("maincpu")->state().state_int(PDP1_IO), 18); pdp1_draw_multipleled(machine, bitmap, x_panel_col1_offset, y_panel_io_offset+8,state->m_maincpu->state_int(PDP1_IO), 18);
pdp1_draw_switch(machine, bitmap, x_panel_col1_offset, y_panel_ta_offset+8, machine.device("maincpu")->state().state_int(PDP1_EXTEND_SW)); pdp1_draw_switch(machine, bitmap, x_panel_col1_offset, y_panel_ta_offset+8,state->m_maincpu->state_int(PDP1_EXTEND_SW));
pdp1_draw_multipleswitch(machine, bitmap, x_panel_col1_offset+16, y_panel_ta_offset+8, machine.device("maincpu")->state().state_int(PDP1_TA), 16); pdp1_draw_multipleswitch(machine, bitmap, x_panel_col1_offset+16, y_panel_ta_offset+8,state->m_maincpu->state_int(PDP1_TA), 16);
pdp1_draw_multipleswitch(machine, bitmap, x_panel_col1_offset, y_panel_tw_offset+8, machine.device("maincpu")->state().state_int(PDP1_TW), 18); pdp1_draw_multipleswitch(machine, bitmap, x_panel_col1_offset, y_panel_tw_offset+8,state->m_maincpu->state_int(PDP1_TW), 18);
/* column 2: 1-bit indicators */ /* column 2: 1-bit indicators */
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_run_offset, machine.device("maincpu")->state().state_int(PDP1_RUN)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_run_offset,state->m_maincpu->state_int(PDP1_RUN));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_cyc_offset, machine.device("maincpu")->state().state_int(PDP1_CYC)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_cyc_offset,state->m_maincpu->state_int(PDP1_CYC));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_defer_offset, machine.device("maincpu")->state().state_int(PDP1_DEFER)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_defer_offset,state->m_maincpu->state_int(PDP1_DEFER));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_hs_cyc_offset, 0); /* not emulated */ pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_hs_cyc_offset, 0); /* not emulated */
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_brk_ctr_1_offset, machine.device("maincpu")->state().state_int(PDP1_BRK_CTR) & 1); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_brk_ctr_1_offset,state->m_maincpu->state_int(PDP1_BRK_CTR) & 1);
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_brk_ctr_2_offset, machine.device("maincpu")->state().state_int(PDP1_BRK_CTR) & 2); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_brk_ctr_2_offset,state->m_maincpu->state_int(PDP1_BRK_CTR) & 2);
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ov_offset, machine.device("maincpu")->state().state_int(PDP1_OV)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ov_offset,state->m_maincpu->state_int(PDP1_OV));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_rim_offset, machine.device("maincpu")->state().state_int(PDP1_RIM)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_rim_offset,state->m_maincpu->state_int(PDP1_RIM));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_sbm_offset, machine.device("maincpu")->state().state_int(PDP1_SBM)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_sbm_offset,state->m_maincpu->state_int(PDP1_SBM));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_exd_offset, machine.device("maincpu")->state().state_int(PDP1_EXD)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_exd_offset,state->m_maincpu->state_int(PDP1_EXD));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ioh_offset, machine.device("maincpu")->state().state_int(PDP1_IOH)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ioh_offset,state->m_maincpu->state_int(PDP1_IOH));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ioc_offset, machine.device("maincpu")->state().state_int(PDP1_IOC)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ioc_offset,state->m_maincpu->state_int(PDP1_IOC));
pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ios_offset, machine.device("maincpu")->state().state_int(PDP1_IOS)); pdp1_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ios_offset,state->m_maincpu->state_int(PDP1_IOS));
/* column 3: power, single step, single inst, sense, flags, instr... */ /* column 3: power, single step, single inst, sense, flags, instr... */
pdp1_draw_led(machine, bitmap, x_panel_col3_offset, y_panel_power_offset, 1); /* always on */ pdp1_draw_led(machine, bitmap, x_panel_col3_offset, y_panel_power_offset, 1); /* always on */
pdp1_draw_switch(machine, bitmap, x_panel_col3_offset+8, y_panel_power_offset, 1); /* always on */ pdp1_draw_switch(machine, bitmap, x_panel_col3_offset+8, y_panel_power_offset, 1); /* always on */
pdp1_draw_led(machine, bitmap, x_panel_col3_offset, y_panel_sngl_step_offset, machine.device("maincpu")->state().state_int(PDP1_SNGL_STEP)); pdp1_draw_led(machine, bitmap, x_panel_col3_offset, y_panel_sngl_step_offset,state->m_maincpu->state_int(PDP1_SNGL_STEP));
pdp1_draw_switch(machine, bitmap, x_panel_col3_offset+8, y_panel_sngl_step_offset, machine.device("maincpu")->state().state_int(PDP1_SNGL_STEP)); pdp1_draw_switch(machine, bitmap, x_panel_col3_offset+8, y_panel_sngl_step_offset,state->m_maincpu->state_int(PDP1_SNGL_STEP));
pdp1_draw_led(machine, bitmap, x_panel_col3_offset, y_panel_sngl_inst_offset, machine.device("maincpu")->state().state_int(PDP1_SNGL_INST)); pdp1_draw_led(machine, bitmap, x_panel_col3_offset, y_panel_sngl_inst_offset,state->m_maincpu->state_int(PDP1_SNGL_INST));
pdp1_draw_switch(machine, bitmap, x_panel_col3_offset+8, y_panel_sngl_inst_offset, machine.device("maincpu")->state().state_int(PDP1_SNGL_INST)); pdp1_draw_switch(machine, bitmap, x_panel_col3_offset+8, y_panel_sngl_inst_offset,state->m_maincpu->state_int(PDP1_SNGL_INST));
pdp1_draw_multipleled(machine, bitmap, x_panel_col3_offset, y_panel_ss_offset+8, machine.device("maincpu")->state().state_int(PDP1_SS), 6); pdp1_draw_multipleled(machine, bitmap, x_panel_col3_offset, y_panel_ss_offset+8,state->m_maincpu->state_int(PDP1_SS), 6);
pdp1_draw_multipleswitch(machine, bitmap, x_panel_col3_offset, y_panel_ss_offset+16, machine.device("maincpu")->state().state_int(PDP1_SS), 6); pdp1_draw_multipleswitch(machine, bitmap, x_panel_col3_offset, y_panel_ss_offset+16,state->m_maincpu->state_int(PDP1_SS), 6);
pdp1_draw_multipleled(machine, bitmap, x_panel_col3_offset, y_panel_pf_offset+8, machine.device("maincpu")->state().state_int(PDP1_PF), 6); pdp1_draw_multipleled(machine, bitmap, x_panel_col3_offset, y_panel_pf_offset+8,state->m_maincpu->state_int(PDP1_PF), 6);
pdp1_draw_multipleled(machine, bitmap, x_panel_col3_offset, y_panel_ir_offset+8, machine.device("maincpu")->state().state_int(PDP1_IR), 5); pdp1_draw_multipleled(machine, bitmap, x_panel_col3_offset, y_panel_ir_offset+8,state->m_maincpu->state_int(PDP1_IR), 5);
} }

View File

@ -294,37 +294,38 @@ static void tx0_draw_panel(running_machine &machine, bitmap_ind16 &bitmap)
{ {
int cm_sel, lr_sel; int cm_sel, lr_sel;
int i; int i;
tx0_state *state = machine.driver_data<tx0_state>();
/* column 1: registers, test accumulator, test buffer, toggle switch storage */ /* column 1: registers, test accumulator, test buffer, toggle switch storage */
tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset+2*8, y_panel_pc_offset+8, machine.device("maincpu")->state().state_int(TX0_PC), 16); tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset+2*8, y_panel_pc_offset+8, state->m_maincpu->state_int(TX0_PC), 16);
tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset+2*8, y_panel_mar_offset+8, machine.device("maincpu")->state().state_int(TX0_MAR), 16); tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset+2*8, y_panel_mar_offset+8, state->m_maincpu->state_int(TX0_MAR), 16);
tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset, y_panel_mbr_offset+8, machine.device("maincpu")->state().state_int(TX0_MBR), 18); tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset, y_panel_mbr_offset+8, state->m_maincpu->state_int(TX0_MBR), 18);
tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset, y_panel_ac_offset+8, machine.device("maincpu")->state().state_int(TX0_AC), 18); tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset, y_panel_ac_offset+8, state->m_maincpu->state_int(TX0_AC), 18);
tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset, y_panel_lr_offset+8, machine.device("maincpu")->state().state_int(TX0_LR), 18); tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset, y_panel_lr_offset+8, state->m_maincpu->state_int(TX0_LR), 18);
tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset+4*8, y_panel_xr_offset+8, machine.device("maincpu")->state().state_int(TX0_XR), 14); tx0_draw_multipleled(machine, bitmap, x_panel_col1b_offset+4*8, y_panel_xr_offset+8, state->m_maincpu->state_int(TX0_XR), 14);
tx0_draw_multipleswitch(machine, bitmap, x_panel_col1b_offset, y_panel_tbr_offset+8, machine.device("maincpu")->state().state_int(TX0_TBR), 18); tx0_draw_multipleswitch(machine, bitmap, x_panel_col1b_offset, y_panel_tbr_offset+8, state->m_maincpu->state_int(TX0_TBR), 18);
tx0_draw_multipleswitch(machine, bitmap, x_panel_col1b_offset, y_panel_tac_offset+8, machine.device("maincpu")->state().state_int(TX0_TAC), 18); tx0_draw_multipleswitch(machine, bitmap, x_panel_col1b_offset, y_panel_tac_offset+8, state->m_maincpu->state_int(TX0_TAC), 18);
cm_sel = machine.device("maincpu")->state().state_int(TX0_CM_SEL); cm_sel = state->m_maincpu->state_int(TX0_CM_SEL);
lr_sel = machine.device("maincpu")->state().state_int(TX0_LR_SEL); lr_sel = state->m_maincpu->state_int(TX0_LR_SEL);
for (i=0; i<16; i++) for (i=0; i<16; i++)
{ {
tx0_draw_switch(machine, bitmap, x_panel_col1a_offset+16, y_panel_tss_offset+8+i*8, (cm_sel >> i) & 1); tx0_draw_switch(machine, bitmap, x_panel_col1a_offset+16, y_panel_tss_offset+8+i*8, (cm_sel >> i) & 1);
tx0_draw_multipleswitch(machine, bitmap, x_panel_col1a_offset+24, y_panel_tss_offset+8+i*8, machine.device("maincpu")->state().state_int(TX0_TSS00+i), 18); tx0_draw_multipleswitch(machine, bitmap, x_panel_col1a_offset+24, y_panel_tss_offset+8+i*8, state->m_maincpu->state_int(TX0_TSS00+i), 18);
tx0_draw_switch(machine, bitmap, x_panel_col1a_offset+168, y_panel_tss_offset+8+i*8, (lr_sel >> i) & 1); tx0_draw_switch(machine, bitmap, x_panel_col1a_offset+168, y_panel_tss_offset+8+i*8, (lr_sel >> i) & 1);
} }
/* column 2: stop c0, stop c1, cm sel, 1-bit indicators, instr, flags */ /* column 2: stop c0, stop c1, cm sel, 1-bit indicators, instr, flags */
tx0_draw_switch(machine, bitmap, x_panel_col2_offset, y_panel_stop_c0_offset, machine.device("maincpu")->state().state_int(TX0_STOP_CYC0)); tx0_draw_switch(machine, bitmap, x_panel_col2_offset, y_panel_stop_c0_offset, state->m_maincpu->state_int(TX0_STOP_CYC0));
tx0_draw_switch(machine, bitmap, x_panel_col2_offset, y_panel_stop_c1_offset, machine.device("maincpu")->state().state_int(TX0_STOP_CYC1)); tx0_draw_switch(machine, bitmap, x_panel_col2_offset, y_panel_stop_c1_offset, state->m_maincpu->state_int(TX0_STOP_CYC1));
tx0_draw_switch(machine, bitmap, x_panel_col2_offset, y_panel_gbl_cm_sel_offset, machine.device("maincpu")->state().state_int(TX0_GBL_CM_SEL)); tx0_draw_switch(machine, bitmap, x_panel_col2_offset, y_panel_gbl_cm_sel_offset, state->m_maincpu->state_int(TX0_GBL_CM_SEL));
tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_run_offset, machine.device("maincpu")->state().state_int(TX0_RUN)); tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_run_offset, state->m_maincpu->state_int(TX0_RUN));
tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_cycle1_offset, machine.device("maincpu")->state().state_int(TX0_CYCLE) & 1); tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_cycle1_offset, state->m_maincpu->state_int(TX0_CYCLE) & 1);
tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_cycle2_offset, machine.device("maincpu")->state().state_int(TX0_CYCLE) & 2); tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_cycle2_offset, state->m_maincpu->state_int(TX0_CYCLE) & 2);
tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_rim_offset, machine.device("maincpu")->state().state_int(TX0_RIM)); tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_rim_offset, state->m_maincpu->state_int(TX0_RIM));
tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ioh_offset, machine.device("maincpu")->state().state_int(TX0_IOH)); tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ioh_offset, state->m_maincpu->state_int(TX0_IOH));
tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ios_offset, machine.device("maincpu")->state().state_int(TX0_IOS)); tx0_draw_led(machine, bitmap, x_panel_col2_offset, y_panel_ios_offset, state->m_maincpu->state_int(TX0_IOS));
tx0_draw_multipleled(machine, bitmap, x_panel_col2_offset, y_panel_ir_offset+8, machine.device("maincpu")->state().state_int(TX0_IR), 5); tx0_draw_multipleled(machine, bitmap, x_panel_col2_offset, y_panel_ir_offset+8, state->m_maincpu->state_int(TX0_IR), 5);
tx0_draw_multipleled(machine, bitmap, x_panel_col2_offset, y_panel_pf_offset+8, machine.device("maincpu")->state().state_int(TX0_PF), 6); tx0_draw_multipleled(machine, bitmap, x_panel_col2_offset, y_panel_pf_offset+8, state->m_maincpu->state_int(TX0_PF), 6);
} }