diff options
Diffstat (limited to 'src/mame/machine')
-rw-r--r-- | src/mame/machine/decocass.cpp | 96 | ||||
-rw-r--r-- | src/mame/machine/harddriv.cpp | 73 | ||||
-rw-r--r-- | src/mame/machine/rmnimbus.cpp | 20 |
3 files changed, 94 insertions, 95 deletions
diff --git a/src/mame/machine/decocass.cpp b/src/mame/machine/decocass.cpp index 435e3957277..653c967b014 100644 --- a/src/mame/machine/decocass.cpp +++ b/src/mame/machine/decocass.cpp @@ -257,7 +257,7 @@ READ8_MEMBER(decocass_type1_state::decocass_type1_r) data = (BIT(data, 0) << 0) | (BIT(data, 1) << 1) | 0x7c; LOG(4,("%10s 6502-PC: %04x decocass_type1_r(%02x): $%02x <- (%s %s)\n", - machine().time().as_string(6), space.device().safe_pcbase(), offset, data, + machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data & 1) ? "OBF" : "-", (data & 2) ? "IBF" : "-")); } @@ -310,7 +310,7 @@ READ8_MEMBER(decocass_type1_state::decocass_type1_r) } LOG(3,("%10s 6502-PC: %04x decocass_type1_r(%02x): $%02x\n", - machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); m_latch1 = save; /* latch the data for the next A0 == 0 read */ } @@ -518,7 +518,7 @@ READ8_MEMBER(decocass_type2_state::decocass_type2_r) { uint8_t *prom = memregion("dongle")->base(); data = prom[256 * m_type2_d2_latch + m_type2_promaddr]; - LOG(3,("%10s 6502-PC: %04x decocass_type2_r(%02x): $%02x <- prom[%03x]\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, 256 * m_type2_d2_latch + m_type2_promaddr)); + LOG(3,("%10s 6502-PC: %04x decocass_type2_r(%02x): $%02x <- prom[%03x]\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, 256 * m_type2_d2_latch + m_type2_promaddr)); } else { @@ -532,7 +532,7 @@ READ8_MEMBER(decocass_type2_state::decocass_type2_r) else data = offset & 0xff; - LOG(3,("%10s 6502-PC: %04x decocass_type2_r(%02x): $%02x <- 8041-%s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "STATUS" : "DATA")); + LOG(3,("%10s 6502-PC: %04x decocass_type2_r(%02x): $%02x <- 8041-%s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "STATUS" : "DATA")); } return data; } @@ -543,18 +543,18 @@ WRITE8_MEMBER(decocass_type2_state::decocass_type2_w) { if (1 == (offset & 1)) { - LOG(4,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> set PROM+D2 latch", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> set PROM+D2 latch", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { m_type2_promaddr = data; - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> set PROM addr $%02x\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_type2_promaddr)); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> set PROM addr $%02x\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, m_type2_promaddr)); return; } } else { - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s ", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041 DATA")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s ", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041 DATA")); } if (1 == (offset & 1)) { @@ -600,7 +600,7 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r) { uint8_t *prom = memregion("dongle")->base(); data = prom[m_type3_ctrs]; - LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- prom[$%03x]\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_type3_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- prom[$%03x]\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, m_type3_ctrs)); if (++m_type3_ctrs == 4096) m_type3_ctrs = 0; } @@ -609,12 +609,12 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,1); - LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } } @@ -623,7 +623,7 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r) if (1 == m_type3_pal_19) { save = data = 0xff; /* open data bus? */ - LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- open bus", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- open bus", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { @@ -765,7 +765,7 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r) (BIT(save, 7) << 7); } m_type3_d0_latch = save & 1; - LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x '%c' <- 8041-DATA\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x '%c' <- 8041-DATA\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); } else { @@ -779,7 +779,7 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r) (BIT(save, 5) << 5) | (BIT(save, 6) << 7) | (BIT(save, 7) << 6); - LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); m_type3_d0_latch = save & 1; } } @@ -795,7 +795,7 @@ WRITE8_MEMBER(decocass_type3_state::decocass_type3_w) if (1 == m_type3_pal_19) { m_type3_ctrs = data << 4; - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, "LDCTRS")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, "LDCTRS")); return; } else @@ -807,11 +807,11 @@ WRITE8_MEMBER(decocass_type3_state::decocass_type3_w) if (1 == m_type3_pal_19) { /* write nowhere?? */ - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, "nowhere?")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, "nowhere?")); return; } } - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); m_mcu->upi41_master_w(space,offset, data); } @@ -837,12 +837,12 @@ READ8_MEMBER(decocass_type4_state::decocass_type4_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,1); - LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } else @@ -852,7 +852,7 @@ READ8_MEMBER(decocass_type4_state::decocass_type4_r) uint8_t *prom = machine().root_device().memregion("dongle")->base(); data = prom[m_type4_ctrs]; - LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- PROM[%04x]\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.', m_type4_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- PROM[%04x]\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.', m_type4_ctrs)); m_type4_ctrs = (m_type4_ctrs + 1) & 0x7fff; } else @@ -860,12 +860,12 @@ READ8_MEMBER(decocass_type4_state::decocass_type4_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,0); - LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } } @@ -880,7 +880,7 @@ WRITE8_MEMBER(decocass_type4_state::decocass_type4_w) if (1 == m_type4_latch) { m_type4_ctrs = (m_type4_ctrs & 0x00ff) | ((data & 0x7f) << 8); - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS MSB (%04x)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_type4_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS MSB (%04x)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, m_type4_ctrs)); return; } else @@ -894,11 +894,11 @@ WRITE8_MEMBER(decocass_type4_state::decocass_type4_w) if (m_type4_latch) { m_type4_ctrs = (m_type4_ctrs & 0xff00) | data; - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS LSB (%04x)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_type4_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS LSB (%04x)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, m_type4_ctrs)); return; } } - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); m_mcu->upi41_master_w(space,offset, data); } @@ -920,12 +920,12 @@ READ8_MEMBER(decocass_type5_state::decocass_type5_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,1); - LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } else @@ -933,19 +933,19 @@ READ8_MEMBER(decocass_type5_state::decocass_type5_r) if (m_type5_latch) { data = 0x55; /* Only a fixed value? It looks like this is all we need to do */ - LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- fixed value???\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- fixed value???\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); } else { if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,0); - LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } } @@ -959,7 +959,7 @@ WRITE8_MEMBER(decocass_type5_state::decocass_type5_w) { if (1 == m_type5_latch) { - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, "latch #2??")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, "latch #2??")); return; } else @@ -971,11 +971,11 @@ WRITE8_MEMBER(decocass_type5_state::decocass_type5_w) if (m_type5_latch) { /* write nowhere?? */ - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, "nowhere?")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, "nowhere?")); return; } } - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); m_mcu->upi41_master_w(space,offset, data); } @@ -996,12 +996,12 @@ READ8_MEMBER(decocass_nodong_state::decocass_nodong_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,1); - LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } else @@ -1009,12 +1009,12 @@ READ8_MEMBER(decocass_nodong_state::decocass_nodong_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,0); - LOG(3,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } @@ -1040,12 +1040,12 @@ READ8_MEMBER(decocass_widel_state::decocass_widel_r) if (m_widel_latch && !machine().side_effect_disabled()) m_widel_ctrs = (m_widel_ctrs + 0x100) & 0xfffff; data = m_mcu->upi41_master_r(space,1); - LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } else @@ -1055,7 +1055,7 @@ READ8_MEMBER(decocass_widel_state::decocass_widel_r) uint8_t *prom = machine().root_device().memregion("dongle")->base(); data = prom[m_widel_ctrs]; - LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- PROM[%04x]\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.', m_widel_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- PROM[%04x]\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.', m_widel_ctrs)); if (!machine().side_effect_disabled()) m_widel_ctrs = (m_widel_ctrs + 1) & 0xfffff; @@ -1065,12 +1065,12 @@ READ8_MEMBER(decocass_widel_state::decocass_widel_r) if (0 == (offset & E5XX_MASK)) { data = m_mcu->upi41_master_r(space,0); - LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.')); } else { data = 0xff; /* open data bus? */ - LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- open bus\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data)); } } } @@ -1089,7 +1089,7 @@ WRITE8_MEMBER(decocass_widel_state::decocass_widel_w) // Counterintuitive though it may seem, the value written is probably just ignored. // Treasure Island depends on this clearing the lower bits as well. m_widel_ctrs = 0; - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS MSB (%04x)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_widel_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS MSB (%04x)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, m_widel_ctrs)); return; } else @@ -1103,11 +1103,11 @@ WRITE8_MEMBER(decocass_widel_state::decocass_widel_w) if (m_widel_latch) { m_widel_ctrs = (m_widel_ctrs & 0xfff00) | data; - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS LSB (%04x)\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_widel_ctrs)); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS LSB (%04x)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, m_widel_ctrs)); return; } } - LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); m_mcu->upi41_master_w(space,offset, data); } @@ -1642,7 +1642,7 @@ WRITE8_MEMBER(decocass_state::i8041_p1_w) { LOG(4,("%10s 8041-PC: %03x i8041_p1_w: $%02x (%s%s%s%s%s%s%s%s)\n", machine().time().as_string(6), - space.device().safe_pcbase(), + m_maincpu->pcbase(), data, data & 0x01 ? "" : "DATA-WRT", data & 0x02 ? "" : " DATA-CLK", @@ -1678,7 +1678,7 @@ READ8_MEMBER(decocass_state::i8041_p1_r) { LOG(4,("%10s 8041-PC: %03x i8041_p1_r: $%02x (%s%s%s%s%s%s%s%s)\n", machine().time().as_string(6), - space.device().safe_pcbase(), + m_maincpu->pcbase(), data, data & 0x01 ? "" : "DATA-WRT", data & 0x02 ? "" : " DATA-CLK", @@ -1699,7 +1699,7 @@ WRITE8_MEMBER(decocass_state::i8041_p2_w) { LOG(4,("%10s 8041-PC: %03x i8041_p2_w: $%02x (%s%s%s%s%s%s%s%s)\n", machine().time().as_string(6), - space.device().safe_pcbase(), + m_maincpu->pcbase(), data, data & 0x01 ? "" : "FNO/", data & 0x02 ? "" : " EOT/", @@ -1724,7 +1724,7 @@ READ8_MEMBER(decocass_state::i8041_p2_r) { LOG(4,("%10s 8041-PC: %03x i8041_p2_r: $%02x (%s%s%s%s%s%s%s%s)\n", machine().time().as_string(6), - space.device().safe_pcbase(), + m_maincpu->pcbase(), data, data & 0x01 ? "" : "FNO/", data & 0x02 ? "" : " EOT/", diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp index 3a1756aecb5..a6199aa9679 100644 --- a/src/mame/machine/harddriv.cpp +++ b/src/mame/machine/harddriv.cpp @@ -521,7 +521,7 @@ WRITE16_MEMBER( harddriv_state::hdgsp_io_w ) { m_last_gsp_shiftreg = new_shiftreg; if (new_shiftreg) - space.device().execute().yield(); + m_gsp->yield(); } } @@ -611,12 +611,12 @@ WRITE16_MEMBER( harddriv_state::hd68k_adsp_data_w ) /* any write to $1FFF is taken to be a trigger; synchronize the CPUs */ if (offset == 0x1fff) { - logerror("%06X:ADSP sync address written (%04X)\n", space.device().safe_pcbase(), data); + logerror("%06X:ADSP sync address written (%04X)\n", m_maincpu->pcbase(), data); machine().scheduler().synchronize(); m_adsp->signal_interrupt_trigger(); } else - logerror("%06X:ADSP W@%04X (%04X)\n", space.device().safe_pcbase(), offset, data); + logerror("%06X:ADSP W@%04X (%04X)\n", m_maincpu->pcbase(), offset, data); } @@ -730,7 +730,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_adsp_control_w ) /* a yield in this case is not enough */ /* we would need to increase the interleaving otherwise */ /* note that this only affects the test mode */ - space.device().execute().spin(); + m_maincpu->spin(); } break; @@ -747,14 +747,14 @@ WRITE16_MEMBER( harddriv_state::hd68k_adsp_control_w ) /* a yield in this case is not enough */ /* we would need to increase the interleaving otherwise */ /* note that this only affects the test mode */ - space.device().execute().spin(); + m_maincpu->spin(); } break; case 7: logerror("ADSP reset = %d\n", val); m_adsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); - space.device().execute().yield(); + m_maincpu->yield(); break; default: @@ -766,7 +766,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_adsp_control_w ) WRITE16_MEMBER( harddriv_state::hd68k_adsp_irq_clear_w ) { - logerror("%06X:68k clears ADSP interrupt\n", space.device().safe_pcbase()); + logerror("%06X:68k clears ADSP interrupt\n", m_maincpu->pcbase()); m_adsp_irq_state = 0; update_interrupts(); } @@ -777,7 +777,7 @@ READ16_MEMBER( harddriv_state::hd68k_adsp_irq_state_r ) int result = 0xfffd; if (m_adsp_xflag) result ^= 2; if (m_adsp_irq_state) result ^= 1; - logerror("%06X:68k reads ADSP interrupt state = %04x\n", space.device().safe_pcbase(), result); + logerror("%06X:68k reads ADSP interrupt state = %04x\n", m_maincpu->pcbase(), result); return result; } @@ -809,7 +809,7 @@ READ16_MEMBER( harddriv_state::hdadsp_special_r ) break; default: - logerror("%04X:hdadsp_special_r(%04X)\n", space.device().safe_pcbase(), offset); + logerror("%04X:hdadsp_special_r(%04X)\n", m_adsp->pcbase(), offset); break; } return 0; @@ -837,7 +837,7 @@ WRITE16_MEMBER( harddriv_state::hdadsp_special_w ) break; case 6: /* /GINT */ - logerror("%04X:ADSP signals interrupt\n", space.device().safe_pcbase()); + logerror("%04X:ADSP signals interrupt\n", m_adsp->pcbase()); m_adsp_irq_state = 1; update_interrupts(); break; @@ -847,7 +847,7 @@ WRITE16_MEMBER( harddriv_state::hdadsp_special_w ) break; default: - logerror("%04X:hdadsp_special_w(%04X)=%04X\n", space.device().safe_pcbase(), offset, data); + logerror("%04X:hdadsp_special_w(%04X)=%04X\n", m_adsp->pcbase(), offset, data); break; } } @@ -907,7 +907,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w ) update_ds3_sirq(); } m_ds3_sreset = val; - space.device().execute().yield(); + m_maincpu->yield(); } break; @@ -932,7 +932,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w ) /* a yield in this case is not enough */ /* we would need to increase the interleaving otherwise */ /* note that this only affects the test mode */ - space.device().execute().spin(); + m_maincpu->spin(); } break; @@ -948,7 +948,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w ) update_ds3_irq(); } m_ds3_reset = val; - space.device().execute().yield(); + m_maincpu->yield(); logerror("DS III reset = %d\n", val); break; @@ -983,15 +983,15 @@ READ16_MEMBER( harddriv_state::hd68k_ds3_girq_state_r ) READ16_MEMBER( harddriv_state::hd68k_ds3_gdata_r ) { - offs_t pc = space.device().safe_pc(); + offs_t pc = m_maincpu->pc(); m_ds3_gflag = 0; update_ds3_irq(); - logerror("%06X:hd68k_ds3_gdata_r(%04X)\n", space.device().safe_pcbase(), m_ds3_gdata); + logerror("%06X:hd68k_ds3_gdata_r(%04X)\n", m_maincpu->pcbase(), m_ds3_gdata); /* attempt to optimize the transfer if conditions are right */ - if (&space.device() == m_maincpu && pc == m_ds3_transfer_pc && + if (pc == m_ds3_transfer_pc && !(!m_ds3_g68flag && m_ds3_g68irqs) && !(m_ds3_gflag && m_ds3_gfirqs)) { uint32_t destaddr = m_maincpu->state_int(M68K_A1); @@ -1000,12 +1000,13 @@ READ16_MEMBER( harddriv_state::hd68k_ds3_gdata_r ) uint16_t i6 = m_adsp->state_int((mstat & 1) ? ADSP2100_MR0 : ADSP2100_MR0_SEC); uint16_t l6 = m_adsp->state_int(ADSP2100_L6) - 1; uint16_t m7 = m_adsp->state_int(ADSP2100_M7); + auto &mspace = m_maincpu->space(AS_PROGRAM); logerror("%06X:optimizing 68k transfer, %d words\n", m_maincpu->pcbase(), count68k); while (count68k > 0 && m_adsp_data_memory[0x16e6] > 0) { - space.write_word(destaddr, m_ds3_gdata); + mspace.write_word(destaddr, m_ds3_gdata); { m_adsp_data_memory[0x16e6]--; m_ds3_gdata = m_adsp_pgm_memory[i6] >> 8; @@ -1021,7 +1022,7 @@ READ16_MEMBER( harddriv_state::hd68k_ds3_gdata_r ) /* if we just cleared the IRQ, we are going to do some VERY timing critical reads */ /* it is important that all the CPUs be in sync before we continue, so spin a little */ /* while to let everyone else catch up */ - space.device().execute().spin_until_trigger(DS3_TRIGGER); + m_maincpu->spin_until_trigger(DS3_TRIGGER); machine().scheduler().trigger(DS3_TRIGGER, attotime::from_usec(5)); return m_ds3_gdata; @@ -1030,7 +1031,7 @@ READ16_MEMBER( harddriv_state::hd68k_ds3_gdata_r ) WRITE16_MEMBER( harddriv_state::hd68k_ds3_gdata_w ) { - logerror("%06X:hd68k_ds3_gdata_w(%04X)\n", space.device().safe_pcbase(), m_ds3_gdata); + logerror("%06X:hd68k_ds3_gdata_w(%04X)\n", m_maincpu->pcbase(), m_ds3_gdata); COMBINE_DATA(&m_ds3_g68data); m_ds3_g68flag = 1; @@ -1049,7 +1050,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_gdata_w ) WRITE16_MEMBER( harddriv_state::hd68k_ds3_sirq_clear_w ) { - logerror("%06X:68k clears ADSP interrupt\n", space.device().safe_pcbase()); + logerror("%06X:68k clears ADSP interrupt\n", m_maincpu->pcbase()); m_sound_int_state = 0; update_interrupts(); } @@ -1074,7 +1075,7 @@ READ16_MEMBER( harddriv_state::hd68k_ds3_sdata_r ) /* if we just cleared the IRQ, we are going to do some VERY timing critical reads */ /* it is important that all the CPUs be in sync before we continue, so spin a little */ /* while to let everyone else catch up */ - space.device().execute().spin_until_trigger(DS3_STRIGGER); + m_maincpu->spin_until_trigger(DS3_STRIGGER); machine().scheduler().trigger(DS3_STRIGGER, attotime::from_usec(5)); return m_ds3_sdata; @@ -1425,7 +1426,7 @@ WRITE16_MEMBER( harddriv_state::hdds3_special_w ) switch (offset & 7) { case 0: - logerror("%04X:ADSP sets gdata to %04X\n", space.device().safe_pcbase(), data); + logerror("%s:ADSP sets gdata to %04X\n", machine().describe_context(), data); m_ds3_gdata = data; m_ds3_gflag = 1; update_ds3_irq(); @@ -1435,7 +1436,7 @@ WRITE16_MEMBER( harddriv_state::hdds3_special_w ) break; case 1: - logerror("%04X:ADSP sets interrupt = %d\n", space.device().safe_pcbase(), (data >> 1) & 1); + logerror("%s:ADSP sets interrupt = %d\n", machine().describe_context(), (data >> 1) & 1); m_adsp_irq_state = (data >> 1) & 1; update_interrupts(); break; @@ -1860,10 +1861,10 @@ READ16_MEMBER( harddriv_state::hdgsp_speedup_r ) /* if both this address and the other important address are not $ffff */ /* then we can spin until something gets written */ if (result != 0xffff && m_gsp_speedup_addr[1][0] != 0xffff && - &space.device() == m_gsp && space.device().safe_pc() == m_gsp_speedup_pc) + m_gsp->pc() == m_gsp_speedup_pc) { m_gsp_speedup_count[0]++; - space.device().execute().spin_until_interrupt(); + m_gsp->spin_until_interrupt(); } return result; @@ -1904,11 +1905,11 @@ READ16_MEMBER( harddriv_state::rdgsp_speedup1_r ) uint16_t result = m_gsp_speedup_addr[0][offset]; /* if this address is equal to $f000, spin until something gets written */ - if (&space.device() == m_gsp && space.device().safe_pc() == m_gsp_speedup_pc && - (uint8_t)result < space.device().state().state_int(TMS34010_A1)) + if (m_gsp->pc() == m_gsp_speedup_pc && + (uint8_t)result < m_gsp->state_int(TMS34010_A1)) { m_gsp_speedup_count[0]++; - space.device().execute().spin_until_interrupt(); + m_gsp->spin_until_interrupt(); } return result; @@ -1918,8 +1919,6 @@ READ16_MEMBER( harddriv_state::rdgsp_speedup1_r ) WRITE16_MEMBER( harddriv_state::rdgsp_speedup1_w ) { COMBINE_DATA(&m_gsp_speedup_addr[0][offset]); - if (&space.device() != m_gsp) - m_gsp->signal_interrupt_trigger(); } @@ -1939,10 +1938,10 @@ READ16_MEMBER( harddriv_state::hdmsp_speedup_r ) { int data = m_msp_speedup_addr[offset]; - if (data == 0 && &space.device() == m_msp && space.device().safe_pc() == m_msp_speedup_pc) + if (data == 0 && m_msp->pc() == m_msp_speedup_pc) { m_msp_speedup_count[0]++; - space.device().execute().spin_until_interrupt(); + m_msp->spin_until_interrupt(); } return data; @@ -1972,10 +1971,10 @@ READ16_MEMBER( harddriv_state::hdadsp_speedup_r ) { int data = m_adsp_data_memory[0x1fff]; - if (data == 0xffff && &space.device() == m_adsp && space.device().safe_pc() <= 0x3b) + if (data == 0xffff && m_adsp->pc() <= 0x3b) { m_adsp_speedup_count[0]++; - space.device().execute().spin_until_interrupt(); + m_adsp->spin_until_interrupt(); } return data; @@ -1986,10 +1985,10 @@ READ16_MEMBER( harddriv_state::hdds3_speedup_r ) { int data = *m_ds3_speedup_addr; - if (data != 0 && &space.device() == m_adsp && space.device().safe_pc() == m_ds3_speedup_pc) + if (data != 0 && m_adsp->pc() == m_ds3_speedup_pc) { m_adsp_speedup_count[2]++; - space.device().execute().spin_until_interrupt(); + m_adsp->spin_until_interrupt(); } return data; diff --git a/src/mame/machine/rmnimbus.cpp b/src/mame/machine/rmnimbus.cpp index d37fcf92e80..43a2dccb92e 100644 --- a/src/mame/machine/rmnimbus.cpp +++ b/src/mame/machine/rmnimbus.cpp @@ -1073,7 +1073,7 @@ READ8_MEMBER(rmnimbus_state::scsi_r) { int result = 0; - int pc=space.device().safe_pc(); + int pc=m_maincpu->pc(); char drive[5]; floppy_image_device *floppy; @@ -1153,7 +1153,7 @@ WRITE8_MEMBER(rmnimbus_state::fdc_ctl_w) WRITE8_MEMBER(rmnimbus_state::scsi_w) { - int pc=space.device().safe_pc(); + int pc=m_maincpu->pc(); if(LOG_DISK_HDD) logerror("Nimbus HDCW at %05X write of %02X to %04X\n",pc,data,(offset*2)+0x410); @@ -1272,7 +1272,7 @@ void rmnimbus_state::ipc_dumpregs() READ8_MEMBER(rmnimbus_state::nimbus_pc8031_r) { - int pc=space.device().safe_pc(); + int pc=m_maincpu->pc(); uint8_t result; switch(offset*2) @@ -1296,7 +1296,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_pc8031_r) WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_w) { - int pc=space.device().safe_pc(); + int pc=m_maincpu->pc(); switch(offset*2) { @@ -1322,7 +1322,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_w) READ8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_r) { - int pc=space.device().safe_pc(); + int pc=m_iocpu->pc(); uint8_t result = 0; switch (offset & 0x01) @@ -1347,7 +1347,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_r) WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_w) { - int pc=space.device().safe_pc(); + int pc=m_iocpu->pc(); if(LOG_PC8031) logerror("8031 PCIOW %04X write of %02X to %04X\n",pc,data,offset); @@ -1386,7 +1386,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_w) READ8_MEMBER(rmnimbus_state::nimbus_pc8031_port_r) { - int pc=space.device().safe_pc(); + int pc=m_iocpu->pc(); uint8_t result = 0; if(LOG_PC8031_PORT) @@ -1404,7 +1404,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_pc8031_port_r) WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_port_w) { - int pc=space.device().safe_pc(); + int pc=m_iocpu->pc(); switch (offset) { @@ -1435,7 +1435,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_port_w) /* IO Unit */ READ8_MEMBER(rmnimbus_state::nimbus_iou_r) { - int pc=space.device().safe_pc(); + int pc=m_maincpu->pc(); uint8_t result=0; if(offset==0) @@ -1451,7 +1451,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_iou_r) WRITE8_MEMBER(rmnimbus_state::nimbus_iou_w) { - int pc=space.device().safe_pc(); + int pc=m_maincpu->pc(); if(LOG_IOU) logerror("Nimbus IOUW %08X write of %02X to %04X\n",pc,data,(offset*2)+0x92); |