[Core/MS] improved SG-1000 & Mark-III hardware emulation

This commit is contained in:
EkeEke 2014-11-23 20:38:55 +01:00
parent d08b903a11
commit 2a5592cd25
2 changed files with 9 additions and 0 deletions

View File

@ -324,6 +324,12 @@ void io_reset(void)
/* Control registers */ /* Control registers */
io_reg[0x0E] = 0x00; io_reg[0x0E] = 0x00;
io_reg[0x0F] = 0xFF; io_reg[0x0F] = 0xFF;
/* on SG-1000 & Mark-III, TH is not connected (always return 1) */
if (system_hw < SYSTEM_SMS)
{
io_reg[0x0F] = 0xF5;
}
} }
/* Reset connected peripherals */ /* Reset connected peripherals */

View File

@ -648,6 +648,9 @@ void z80_sg_port_w(unsigned int port, unsigned char data)
case 0x41: case 0x41:
{ {
SN76489_Write(Z80.cycles, data); SN76489_Write(Z80.cycles, data);
/* Z80 !WAIT input is tied to SN76489AN chip READY pin (held low for 32 clocks after each write access) */
Z80.cycles += (32 * 15);
return; return;
} }