cop400: correct internal RAM memorymap for COP410 [Sean Riddle]

This commit is contained in:
hap 2016-12-20 18:33:45 +01:00
parent 746b030b0e
commit e6155387a0
3 changed files with 51 additions and 26 deletions

View File

@ -150,7 +150,10 @@ static ADDRESS_MAP_START( program_2kb, AS_PROGRAM, 8, cop400_cpu_device )
ADDRESS_MAP_END
static ADDRESS_MAP_START( data_32b, AS_DATA, 8, cop400_cpu_device )
AM_RANGE(0x00, 0x1f) AM_RAM
AM_RANGE(0x00, 0x07) AM_MIRROR(0x08) AM_RAM
AM_RANGE(0x10, 0x17) AM_MIRROR(0x08) AM_RAM
AM_RANGE(0x20, 0x27) AM_MIRROR(0x08) AM_RAM
AM_RANGE(0x30, 0x37) AM_MIRROR(0x08) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( data_64b, AS_DATA, 8, cop400_cpu_device )
@ -231,17 +234,17 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type
}
cop401_cpu_device::cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cop400_cpu_device(mconfig, COP401, "COP401", tag, owner, clock, "cop401", __FILE__, 9, 5, COP410_FEATURE, 0xf, 0xf, 0, false, false, nullptr, ADDRESS_MAP_NAME(data_32b))
: cop400_cpu_device(mconfig, COP401, "COP401", tag, owner, clock, "cop401", __FILE__, 9, 6, COP410_FEATURE, 0xf, 0xf, 0, false, false, nullptr, ADDRESS_MAP_NAME(data_32b))
{
}
cop410_cpu_device::cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cop400_cpu_device(mconfig, COP410, "COP410", tag, owner, clock, "cop410", __FILE__, 9, 5, COP410_FEATURE, 0xf, 0xf, 0, false, false, ADDRESS_MAP_NAME(program_512b), ADDRESS_MAP_NAME(data_32b))
: cop400_cpu_device(mconfig, COP410, "COP410", tag, owner, clock, "cop410", __FILE__, 9, 6, COP410_FEATURE, 0xf, 0xf, 0, false, false, ADDRESS_MAP_NAME(program_512b), ADDRESS_MAP_NAME(data_32b))
{
}
cop411_cpu_device::cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cop400_cpu_device(mconfig, COP411, "COP411", tag, owner, clock, "cop411", __FILE__, 9, 5, COP410_FEATURE, 0x7, 0x3, 0, false, false, ADDRESS_MAP_NAME(program_512b), ADDRESS_MAP_NAME(data_32b))
: cop400_cpu_device(mconfig, COP411, "COP411", tag, owner, clock, "cop411", __FILE__, 9, 6, COP410_FEATURE, 0x7, 0x3, 0, false, false, ADDRESS_MAP_NAME(program_512b), ADDRESS_MAP_NAME(data_32b))
{
}

View File

@ -612,7 +612,7 @@ WRITE8_MEMBER(funjacks_state::write_d)
{
// D: led grid + input mux
m_inp_mux = data;
m_d = data ^ 0xf;
m_d = ~data & 0xf;
display_matrix(2, 4, m_l, m_d);
}
@ -671,8 +671,8 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( funjacks, funjacks_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", COP410, 2000000) // approximation - RC osc. R=47K, C=56pf
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_CPU_ADD("maincpu", COP410, 1000000) // approximation - RC osc. R=47K, C=56pf
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_8, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_COP400_WRITE_D_CB(WRITE8(funjacks_state, write_d))
MCFG_COP400_WRITE_L_CB(WRITE8(funjacks_state, write_l))
MCFG_COP400_WRITE_G_CB(WRITE8(funjacks_state, write_g))
@ -727,7 +727,7 @@ public:
WRITE8_MEMBER(funrlgl_state::write_d)
{
// D: led grid
m_d = data ^ 0xf;
m_d = ~data & 0xf;
display_matrix(4, 4, m_l, m_d);
}
@ -771,8 +771,8 @@ INPUT_CHANGED_MEMBER(funrlgl_state::reset_button)
static MACHINE_CONFIG_START( funrlgl, funrlgl_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", COP410, 2000000) // approximation - RC osc. R=51K, C=91pf
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_CPU_ADD("maincpu", COP410, 1000000) // approximation - RC osc. R=51K, C=91pf
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_8, COP400_CKO_OSCILLATOR_OUTPUT, true) // guessed
MCFG_COP400_WRITE_D_CB(WRITE8(funrlgl_state, write_d))
MCFG_COP400_WRITE_L_CB(WRITE8(funrlgl_state, write_l))
MCFG_COP400_WRITE_G_CB(WRITE8(funrlgl_state, write_g))

View File

@ -18,27 +18,49 @@
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-1" right="12" top="-0.2" bottom="12" />
<bounds left="-1" right="12" top="-0.2" bottom="20" />
<bezel element="static_black">
<bounds left="-1" right="12" top="-0.2" bottom="12" />
<bounds left="-1" right="12" top="-0.2" bottom="20" />
</bezel>
<bezel name="lamp0" element="ledr"><bounds x="0" y="0" width="1" height="1" /></bezel>
<bezel name="lamp10" element="ledr"><bounds x="0" y="2" width="1" height="1" /></bezel>
<bezel name="lamp20" element="ledr"><bounds x="0" y="4" width="1" height="1" /></bezel>
<bezel name="lamp30" element="ledr"><bounds x="0" y="6" width="1" height="1" /></bezel>
<bezel name="lamp2" element="ledr"><bounds x="0" y="8" width="1" height="1" /></bezel>
<bezel name="lamp12" element="ledr"><bounds x="0" y="10" width="1" height="1" /></bezel>
<bezel name="0.0" element="ledr"><bounds x="0" y="0" width="1" height="1" /></bezel>
<bezel name="1.0" element="ledr"><bounds x="0" y="2" width="1" height="1" /></bezel>
<bezel name="2.0" element="ledr"><bounds x="0" y="4" width="1" height="1" /></bezel>
<bezel name="3.0" element="ledr"><bounds x="0" y="6" width="1" height="1" /></bezel>
<bezel name="0.2" element="ledr"><bounds x="0" y="8" width="1" height="1" /></bezel>
<bezel name="1.2" element="ledr"><bounds x="0" y="10" width="1" height="1" /></bezel>
<bezel name="lamp22" element="ledr"><bounds x="5" y="2" width="1" height="1" /></bezel>
<bezel name="lamp33" element="ledg"><bounds x="5" y="4" width="1" height="1" /></bezel>
<bezel name="2.2" element="ledr"><bounds x="5" y="2" width="1" height="1" /></bezel>
<bezel name="3.3" element="ledg"><bounds x="5" y="4" width="1" height="1" /></bezel>
<bezel name="lamp1" element="ledr"><bounds x="10" y="0" width="1" height="1" /></bezel>
<bezel name="lamp11" element="ledr"><bounds x="10" y="2" width="1" height="1" /></bezel>
<bezel name="lamp21" element="ledr"><bounds x="10" y="4" width="1" height="1" /></bezel>
<bezel name="lamp31" element="ledr"><bounds x="10" y="6" width="1" height="1" /></bezel>
<bezel name="lamp3" element="ledr"><bounds x="10" y="8" width="1" height="1" /></bezel>
<bezel name="lamp13" element="ledr"><bounds x="10" y="10" width="1" height="1" /></bezel>
<bezel name="0.1" element="ledr"><bounds x="10" y="0" width="1" height="1" /></bezel>
<bezel name="1.1" element="ledr"><bounds x="10" y="2" width="1" height="1" /></bezel>
<bezel name="2.1" element="ledr"><bounds x="10" y="4" width="1" height="1" /></bezel>
<bezel name="3.1" element="ledr"><bounds x="10" y="6" width="1" height="1" /></bezel>
<bezel name="0.3" element="ledr"><bounds x="10" y="8" width="1" height="1" /></bezel>
<bezel name="1.3" element="ledr"><bounds x="10" y="10" width="1" height="1" /></bezel>
<!-- test -->
<bezel name="0.0" element="ledr"><bounds x="0" y="12" width="1" height="1" /></bezel>
<bezel name="0.1" element="ledr"><bounds x="1" y="12" width="1" height="1" /></bezel>
<bezel name="0.2" element="ledr"><bounds x="2" y="12" width="1" height="1" /></bezel>
<bezel name="0.3" element="ledr"><bounds x="3" y="12" width="1" height="1" /></bezel>
<bezel name="1.0" element="ledr"><bounds x="0" y="13" width="1" height="1" /></bezel>
<bezel name="1.1" element="ledr"><bounds x="1" y="13" width="1" height="1" /></bezel>
<bezel name="1.2" element="ledr"><bounds x="2" y="13" width="1" height="1" /></bezel>
<bezel name="1.3" element="ledr"><bounds x="3" y="13" width="1" height="1" /></bezel>
<bezel name="2.0" element="ledr"><bounds x="0" y="14" width="1" height="1" /></bezel>
<bezel name="2.1" element="ledr"><bounds x="1" y="14" width="1" height="1" /></bezel>
<bezel name="2.2" element="ledr"><bounds x="2" y="14" width="1" height="1" /></bezel>
<bezel name="2.3" element="ledr"><bounds x="3" y="14" width="1" height="1" /></bezel>
<bezel name="3.0" element="ledr"><bounds x="0" y="15" width="1" height="1" /></bezel>
<bezel name="3.1" element="ledr"><bounds x="1" y="15" width="1" height="1" /></bezel>
<bezel name="3.2" element="ledr"><bounds x="2" y="15" width="1" height="1" /></bezel>
<bezel name="3.3" element="ledr"><bounds x="3" y="15" width="1" height="1" /></bezel>
</view>
</mamelayout>