Fixed CDP1869 character memory access, and Cidelsa sprite flashing.

This commit is contained in:
Curt Coder 2008-05-19 15:38:19 +00:00
parent ef6d13be04
commit d41a31dd12
2 changed files with 31 additions and 23 deletions

View File

@ -582,34 +582,43 @@ READ8_DEVICE_HANDLER( cdp1869_charram_r )
{ {
cdp1869_t *cdp1869 = get_safe_token(device); cdp1869_t *cdp1869 = get_safe_token(device);
UINT8 cma = offset & 0x0f;
UINT16 pma;
if (cdp1869->cmem) if (cdp1869->cmem)
{ {
UINT16 pma = cdp1869_get_pma(device); pma = cdp1869_get_pma(device);
UINT8 cma = offset & 0x0f; }
else
{
pma = offset;
}
if (cdp1869_get_lines(device) == 8) if (cdp1869->dblpage)
{ {
cma &= 0x07; cma &= 0x07;
} }
return cdp1869->intf->char_ram_r(device, pma, cma); return cdp1869->intf->char_ram_r(device, pma, cma);
} }
else
{
return 0xff;
}
}
WRITE8_DEVICE_HANDLER( cdp1869_charram_w ) WRITE8_DEVICE_HANDLER( cdp1869_charram_w )
{ {
cdp1869_t *cdp1869 = get_safe_token(device); cdp1869_t *cdp1869 = get_safe_token(device);
UINT8 cma = offset & 0x0f;
UINT16 pma;
if (cdp1869->cmem) if (cdp1869->cmem)
{ {
UINT16 pma = cdp1869_get_pma(device); pma = cdp1869_get_pma(device);
UINT8 cma = offset & 0x0f; }
else
{
pma = offset;
}
if (cdp1869_get_lines(device) == 8) if (cdp1869->dblpage)
{ {
cma &= 0x07; cma &= 0x07;
} }
@ -619,7 +628,6 @@ WRITE8_DEVICE_HANDLER( cdp1869_charram_w )
cdp1869->intf->char_ram_w(device, pma, cma, data); cdp1869->intf->char_ram_w(device, pma, cma, data);
} }
} }
}
/* Screen Update */ /* Screen Update */

View File

@ -394,7 +394,7 @@ static INPUT_PORTS_START( destryer )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0)
PORT_START_TAG("IN1") PORT_START_TAG("IN1")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
@ -434,7 +434,7 @@ static INPUT_PORTS_START( altair )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0)
PORT_START_TAG("IN1") PORT_START_TAG("IN1")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
@ -484,7 +484,7 @@ static INPUT_PORTS_START( draco )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0)
PORT_START_TAG("IN1") PORT_START_TAG("IN1")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )