mirror of
https://github.com/holub/mame
synced 2025-05-31 10:01:51 +03:00
v25: Add stubs for serial interface registers
This commit is contained in:
parent
8230c553f4
commit
6765c7765c
@ -218,6 +218,14 @@ void v25_common_device::device_reset()
|
||||
m_TM0 = m_MD0 = m_TM1 = m_MD1 = 0;
|
||||
m_TMC0 = m_TMC1 = 0;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
m_scm[i] = 0;
|
||||
m_scc[i] = 0;
|
||||
m_brg[i] = 0;
|
||||
m_sce[i] = 0;
|
||||
}
|
||||
|
||||
m_RAMEN = 1;
|
||||
m_TB = 20;
|
||||
m_PCK = 8;
|
||||
@ -618,6 +626,10 @@ void v25_common_device::device_start()
|
||||
save_item(NAME(m_MD1));
|
||||
save_item(NAME(m_TMC0));
|
||||
save_item(NAME(m_TMC1));
|
||||
save_item(NAME(m_scm));
|
||||
save_item(NAME(m_scc));
|
||||
save_item(NAME(m_brg));
|
||||
save_item(NAME(m_sce));
|
||||
save_item(NAME(m_RAMEN));
|
||||
save_item(NAME(m_TB));
|
||||
save_item(NAME(m_PCK));
|
||||
|
@ -118,6 +118,12 @@ private:
|
||||
uint8_t m_TMC0, m_TMC1;
|
||||
emu_timer *m_timers[4];
|
||||
|
||||
/* serial interface related */
|
||||
uint8_t m_scm[2];
|
||||
uint8_t m_scc[2];
|
||||
uint8_t m_brg[2];
|
||||
uint8_t m_sce[2];
|
||||
|
||||
/* system control */
|
||||
uint8_t m_RAMEN, m_TB, m_PCK; /* PRC register */
|
||||
uint8_t m_RFM;
|
||||
@ -203,6 +209,13 @@ private:
|
||||
void srms0_w(uint8_t d);
|
||||
uint8_t stms0_r();
|
||||
void stms0_w(uint8_t d);
|
||||
uint8_t scm0_r();
|
||||
void scm0_w(uint8_t d);
|
||||
uint8_t scc0_r();
|
||||
void scc0_w(uint8_t d);
|
||||
uint8_t brg0_r();
|
||||
void brg0_w(uint8_t d);
|
||||
uint8_t sce0_r();
|
||||
uint8_t seic0_r();
|
||||
void seic0_w(uint8_t d);
|
||||
uint8_t sric0_r();
|
||||
@ -213,6 +226,13 @@ private:
|
||||
void srms1_w(uint8_t d);
|
||||
uint8_t stms1_r();
|
||||
void stms1_w(uint8_t d);
|
||||
uint8_t scm1_r();
|
||||
void scm1_w(uint8_t d);
|
||||
uint8_t scc1_r();
|
||||
void scc1_w(uint8_t d);
|
||||
uint8_t brg1_r();
|
||||
void brg1_w(uint8_t d);
|
||||
uint8_t sce1_r();
|
||||
uint8_t seic1_r();
|
||||
void seic1_w(uint8_t d);
|
||||
uint8_t sric1_r();
|
||||
|
@ -31,11 +31,19 @@ void v25_common_device::ida_sfr_map(address_map &map)
|
||||
map(0x14e, 0x14e).rw(FUNC(v25_common_device::exic2_r), FUNC(v25_common_device::exic2_w));
|
||||
map(0x165, 0x165).rw(FUNC(v25_common_device::srms0_r), FUNC(v25_common_device::srms0_w));
|
||||
map(0x166, 0x166).rw(FUNC(v25_common_device::stms0_r), FUNC(v25_common_device::stms0_w));
|
||||
map(0x168, 0x168).rw(FUNC(v25_common_device::scm0_r), FUNC(v25_common_device::scm0_w));
|
||||
map(0x169, 0x169).rw(FUNC(v25_common_device::scc0_r), FUNC(v25_common_device::scc0_w));
|
||||
map(0x16a, 0x16a).rw(FUNC(v25_common_device::brg0_r), FUNC(v25_common_device::brg0_w));
|
||||
map(0x16b, 0x16b).r(FUNC(v25_common_device::sce0_r));
|
||||
map(0x16c, 0x16c).rw(FUNC(v25_common_device::seic0_r), FUNC(v25_common_device::seic0_w));
|
||||
map(0x16d, 0x16d).rw(FUNC(v25_common_device::sric0_r), FUNC(v25_common_device::sric0_w));
|
||||
map(0x16e, 0x16e).rw(FUNC(v25_common_device::stic0_r), FUNC(v25_common_device::stic0_w));
|
||||
map(0x175, 0x175).rw(FUNC(v25_common_device::srms1_r), FUNC(v25_common_device::srms1_w));
|
||||
map(0x176, 0x176).rw(FUNC(v25_common_device::stms1_r), FUNC(v25_common_device::stms1_w));
|
||||
map(0x178, 0x178).rw(FUNC(v25_common_device::scm1_r), FUNC(v25_common_device::scm1_w));
|
||||
map(0x179, 0x179).rw(FUNC(v25_common_device::scc1_r), FUNC(v25_common_device::scc1_w));
|
||||
map(0x17a, 0x17a).rw(FUNC(v25_common_device::brg1_r), FUNC(v25_common_device::brg1_w));
|
||||
map(0x17b, 0x17b).r(FUNC(v25_common_device::sce1_r));
|
||||
map(0x17c, 0x17c).rw(FUNC(v25_common_device::seic1_r), FUNC(v25_common_device::seic1_w));
|
||||
map(0x17d, 0x17d).rw(FUNC(v25_common_device::sric1_r), FUNC(v25_common_device::sric1_w));
|
||||
map(0x17e, 0x17e).rw(FUNC(v25_common_device::stic1_r), FUNC(v25_common_device::stic1_w));
|
||||
@ -246,6 +254,46 @@ void v25_common_device::stms0_w(uint8_t d)
|
||||
m_stms[0] = d & 0xf7;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::scm0_r()
|
||||
{
|
||||
return m_scm[0];
|
||||
}
|
||||
|
||||
void v25_common_device::scm0_w(uint8_t d)
|
||||
{
|
||||
logerror("%06x: SCM0 set to %02x\n", PC(), d);
|
||||
m_scm[0] = d;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::scc0_r()
|
||||
{
|
||||
return m_scc[0];
|
||||
}
|
||||
|
||||
void v25_common_device::scc0_w(uint8_t d)
|
||||
{
|
||||
logerror("%06x: SCC0 set to %02x\n", PC(), d & 0x0f);
|
||||
m_scc[0] = d & 0x0f;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::brg0_r()
|
||||
{
|
||||
return m_brg[0];
|
||||
}
|
||||
|
||||
void v25_common_device::brg0_w(uint8_t d)
|
||||
{
|
||||
logerror("%06x: BRG0 divider set to %d\n", PC(), d + 1);
|
||||
m_brg[0] = d;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::sce0_r()
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
logerror("%06x: Warning: read back SCE0\n",PC());
|
||||
return m_sce[0];
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::seic0_r()
|
||||
{
|
||||
return read_irqcontrol(INTSER0, m_priority_ints0);
|
||||
@ -302,6 +350,46 @@ void v25_common_device::stms1_w(uint8_t d)
|
||||
m_stms[1] = d & 0xf7;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::scm1_r()
|
||||
{
|
||||
return m_scm[1];
|
||||
}
|
||||
|
||||
void v25_common_device::scm1_w(uint8_t d)
|
||||
{
|
||||
logerror("%06x: SCM1 set to %02x\n", PC(), d);
|
||||
m_scm[1] = d;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::scc1_r()
|
||||
{
|
||||
return m_scc[1];
|
||||
}
|
||||
|
||||
void v25_common_device::scc1_w(uint8_t d)
|
||||
{
|
||||
logerror("%06x: SCC1 set to %02x\n", PC(), d & 0x0f);
|
||||
m_scc[1] = d & 0x0f;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::brg1_r()
|
||||
{
|
||||
return m_brg[1];
|
||||
}
|
||||
|
||||
void v25_common_device::brg1_w(uint8_t d)
|
||||
{
|
||||
logerror("%06x: BRG1 divider set to %d\n", PC(), d + 1);
|
||||
m_brg[1] = d;
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::sce1_r()
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
logerror("%06x: Warning: read back SCE1\n",PC());
|
||||
return m_sce[1];
|
||||
}
|
||||
|
||||
uint8_t v25_common_device::seic1_r()
|
||||
{
|
||||
return read_irqcontrol(INTSER1, m_priority_ints1);
|
||||
|
Loading…
Reference in New Issue
Block a user