Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/mame/sinclair/sprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ u8 sprinter_state::dcp_r(offs_t offset)
do_mem_wait(4);
}

const u16 dcp_offset = (BIT(m_cnf, 3, 2) << 12) | (0 << 11) | (m_dos << 10) | (1 << 9) | (BIT(offset, 14, 2) << 7) | (BIT(offset, 13) << 4) | (BIT(offset, 7) << 3) | (offset & 0x67);
const u16 dcp_offset = (BIT(m_cnf, 3, 2) << 12) | (BIT(m_pn, 5) << 11) | (m_dos << 10) | (1 << 9) | (BIT(offset, 14, 2) << 7) | (BIT(offset, 13) << 4) | (BIT(offset, 7) << 3) | (offset & 0x67);
const u8 dcpp = m_dcp_location[dcp_offset];
u8 data = 0xff;
switch (dcpp)
Expand Down Expand Up @@ -700,7 +700,7 @@ void sprinter_state::dcp_w(offs_t offset, u8 data)
}
do_mem_wait(4);

const u16 dcp_offset = (BIT(m_cnf, 3, 2) << 12) | (0 << 11) | (m_dos << 10) | (0 << 9) | (BIT(offset, 14, 2) << 7) | (BIT(offset, 13) << 4) | (BIT(offset, 7) << 3) | (offset & 0x67);
const u16 dcp_offset = (BIT(m_cnf, 3, 2) << 12) | (BIT(m_pn, 5) << 11) | (m_dos << 10) | (0 << 9) | (BIT(offset, 14, 2) << 7) | (BIT(offset, 13) << 4) | (BIT(offset, 7) << 3) | (offset & 0x67);
const u8 dcpp = m_dcp_location[dcp_offset];
if ((dcpp >= 0xc0) && (dcpp < 0xf0))
m_ram_pages[dcpp - 0xc0] = data;
Expand Down Expand Up @@ -826,14 +826,15 @@ void sprinter_state::dcp_w(offs_t offset, u8 data)
case 0xc0: // 1FFD
case 0xc8:
m_sc = data;
if (BIT(m_cnf, 6)) m_sc = 0; // CNF_SC_RESET
if (BIT(m_cnf, 6)) m_sc = 0; // CNF_SC_CLEAN
update_memory();
break;
case 0xc1: // 7FFD
case 0xc9:
m_pn = data;
if (BIT(m_cnf, 5)) m_pn &= 0xc0; // CNF_PN[5..0]_RESET
if (BIT(~m_cnf, 7)) m_pn &= 0x1f; // CNF_PN[7..6]_RESET
if (BIT(~m_cnf, 7)) m_pn &= 0x3f; // CNF_PN[7..6]_CLEAN
if (BIT(~m_cnf, 7) && BIT(m_cnf, 5)) m_pn &= 0xdf; // CNF_PN[5]_CLEAN
if (BIT(m_cnf, 5)) m_pn &= 0xe0; // CNF_PN[4..0]_CLEAN
update_memory();
break;
case 0xc2:
Expand Down Expand Up @@ -871,9 +872,10 @@ void sprinter_state::dcp_w(offs_t offset, u8 data)
if (BIT(data, 2))
{
m_cnf = data;
if (BIT(m_cnf, 5)) m_pn &= 0xc0; // CNF_PN[5..0]_RESET
if (BIT(m_cnf, 6)) m_sc = 0; // CNF_SC_RESET
if (BIT(~m_cnf, 7)) m_pn &= 0x1f; // CNF_PN[7..6]_RESET
if (BIT(m_cnf, 6)) m_sc = 0; // CNF_SC_CLEAN
if (BIT(~m_cnf, 7)) m_pn &= 0x3f; // CNF_PN[7..6]_CLEAN
if (BIT(~m_cnf, 7) && BIT(m_cnf, 5)) m_pn &= 0xdf; // CNF_PN[5]_CLEAN
if (BIT(m_cnf, 5)) m_pn &= 0xe0; // CNF_PN[4..0]_CLEAN
}

update_memory();
Expand Down
Loading