mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
amstrad: workaround to make PPI port C ignore I/O status on Plus systems. Fixes system detection on Allergy demo.
This commit is contained in:
parent
36ce16ddb0
commit
2f470cfbba
@ -317,6 +317,7 @@ protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
||||
int m_centronics_busy;
|
||||
UINT8 m_last_write;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1863,8 +1863,8 @@ READ8_MEMBER(amstrad_state::amstrad_cpc_io_r)
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000 ) // Plus systems return 0 when attempting to read the gate array (and any other unreadable space too?)
|
||||
data = 0;
|
||||
if ( m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000 ) // Plus systems return 0x78 (464+) or 0x79 (6128+) when attempting to read the gate array (and any other unreadable space too?)
|
||||
data = 0x79;
|
||||
|
||||
/* if b14 = 0 : CRTC Read selected */
|
||||
if ((offset & (1<<14)) == 0)
|
||||
@ -1913,6 +1913,9 @@ b9 b8 | PPI Function Read/Write status
|
||||
{
|
||||
if (r1r0 < 0x03 )
|
||||
data = m_ppi->read(space, r1r0);
|
||||
if ( m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000 ) // Plus systems return the data written to port C (I/O status is ignored)
|
||||
if(r1r0 == 0x02)
|
||||
data = m_last_write;
|
||||
}
|
||||
|
||||
/* if b10 = 0 : Expansion Peripherals Read selected
|
||||
@ -2104,9 +2107,11 @@ WRITE8_MEMBER(amstrad_state::amstrad_cpc_io_w)
|
||||
*/
|
||||
if ((offset & (1<<11)) == 0)
|
||||
{
|
||||
unsigned int Index = ((offset & 0x0300) >> 8);
|
||||
unsigned int idx = ((offset & 0x0300) >> 8);
|
||||
|
||||
m_ppi->write(space, Index, data);
|
||||
m_ppi->write(space, idx, data);
|
||||
if(idx == 0x02)
|
||||
m_last_write = data;
|
||||
}
|
||||
|
||||
/* if b10 = 0 : Expansion Peripherals Write selected */
|
||||
@ -2335,6 +2340,8 @@ Once all tables and jumpblocks have been set up,
|
||||
control is passed to the default entry in rom 0*/
|
||||
void amstrad_state::amstrad_reset_machine()
|
||||
{
|
||||
m_last_write = 0xff;
|
||||
|
||||
/* enable lower rom (OS rom) */
|
||||
amstrad_GateArray_write(0x089);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user