m6801: mask unused ram ctrl reg bits

This commit is contained in:
hap 2023-12-05 20:34:30 +01:00
parent 73751bcea9
commit d2c4286eca
3 changed files with 19 additions and 2 deletions

View File

@ -1285,7 +1285,7 @@ void m6801_cpu_device::device_reset()
OCD = 0xffff;
TOD = 0xffff;
m_timer_next = 0xffff;
m_ram_ctrl |= 0x78;
m_ram_ctrl |= 0x40;
m_latch09 = 0;
m_trcsr = M6801_TRCSR_TDRE;
@ -1311,6 +1311,7 @@ void hd6301x_cpu_device::device_reset()
m_tcsr2 = 0x00;
m_pending_tcsr2 = 0x00;
OC2D = 0xffff;
m_ram_ctrl = (m_ram_ctrl & 0x80) | 0x7c;
m_t2cnt = 0x00;
m_tconr = 0xff;
@ -1333,6 +1334,7 @@ void hd6301y_cpu_device::device_reset()
{
hd6301x_cpu_device::device_reset();
m_ram_ctrl = (m_ram_ctrl & 0x80) | 0x78;
m_p6csr = 7;
}
@ -2231,6 +2233,17 @@ void m6801_cpu_device::sci_tdr_w(uint8_t data)
uint8_t m6801_cpu_device::rcr_r()
{
return m_ram_ctrl | 0x3f;
}
uint8_t hd6301x_cpu_device::rcr_r()
{
return m_ram_ctrl | 0x30;
}
uint8_t hd6301y_cpu_device::rcr_r()
{
// no unused bits
return m_ram_ctrl;
}

View File

@ -122,7 +122,7 @@ protected:
uint8_t sci_rdr_r();
void sci_tdr_w(uint8_t data);
uint8_t rcr_r();
virtual uint8_t rcr_r();
virtual void rcr_w(uint8_t data);
uint8_t ff_r();
@ -340,6 +340,7 @@ protected:
virtual void p6_data_w(uint8_t data);
uint8_t p7_data_r();
void p7_data_w(uint8_t data);
virtual uint8_t rcr_r() override;
uint8_t tcsr2_r();
void tcsr2_w(uint8_t data);
@ -442,6 +443,7 @@ protected:
virtual void p6_data_w(uint8_t data) override;
uint8_t p6_csr_r();
void p6_csr_w(uint8_t data);
virtual uint8_t rcr_r() override;
virtual void rcr_w(uint8_t data) override;
virtual void m6800_check_irq2() override;

View File

@ -16,6 +16,8 @@ Hardware notes:
- Hitachi HD63B01X0, 8MHz XTAL
- 8*8 chessboard buttons, 16+1 LEDs, piezo
Yeno 309 XT is on the same PCB, and has the same MCU ROM.
TODO:
- if/when MAME supports an exit callback, hook up power-off IRQ to that