diff options
author | Happy <Happy-yappH@users.noreply.github.com> | 2016-03-14 19:51:57 -0600 |
---|---|---|
committer | Happy <Happy-yappH@users.noreply.github.com> | 2016-03-14 19:51:57 -0600 |
commit | 3b5a16983fbca21b91c23eb1b9c174bb8f12ecc7 (patch) | |
tree | 2f126acc37af17b97c5df03ee58444ecdb5c61dc | |
parent | 9420cf631abf42aedd0ec6a86041ff36826c495f (diff) |
N64: Add ability to change reported EEPROM size at runtime
Adjust timing for SI <-> PIF DMA.
-rw-r--r-- | src/mame/drivers/n64.cpp | 5 | ||||
-rw-r--r-- | src/mame/machine/n64.cpp | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/mame/drivers/n64.cpp b/src/mame/drivers/n64.cpp index 770c42a6a09..b4b22a35aca 100644 --- a/src/mame/drivers/n64.cpp +++ b/src/mame/drivers/n64.cpp @@ -111,6 +111,11 @@ static INPUT_PORTS_START( n64 ) PORT_CONFSETTING(0x0000, "Retail") PORT_CONFSETTING(0x0100, "Development") + PORT_CONFNAME(0xC000, 0x8000, "EEPROM Size") + PORT_CONFSETTING(0x0000, "None") + PORT_CONFSETTING(0x8000, "4KB") + PORT_CONFSETTING(0xC000, "16KB") + //Player 1 PORT_START("P1") PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Button A / Left Click") diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp index 32ba2ee627e..b7968787d94 100644 --- a/src/mame/machine/n64.cpp +++ b/src/mame/machine/n64.cpp @@ -1043,7 +1043,7 @@ READ32_MEMBER( n64_periphs::vi_reg_r ) break; case 0x10/4: // VI_CURRENT_REG - ret = (m_screen->vpos() & 0x3FE) + field; // << 1); + ret = (m_screen->vpos() & 0x3FE) + field; break; case 0x14/4: // VI_BURST_REG @@ -1742,7 +1742,7 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda { // Read EEPROM status rdata[0] = 0x00; - rdata[1] = 0x80; + rdata[1] = (machine().root_device().ioport("input")->read() >> 8) & 0xC0; rdata[2] = 0x00; return 0; @@ -2127,9 +2127,7 @@ void n64_periphs::pif_dma(int direction) } } si_status |= 1; - si_dma_timer->adjust(attotime::from_hz(1000)); - //si_status |= 0x1000; - //signal_rcp_interrupt(SI_INTERRUPT); + si_dma_timer->adjust(attotime::from_hz(10000)); } READ32_MEMBER( n64_periphs::si_reg_r ) @@ -2171,6 +2169,7 @@ WRITE32_MEMBER( n64_periphs::si_reg_w ) case 0x18/4: // SI_STATUS_REG si_status = 0; + si_dma_timer->adjust(attotime::never); clear_rcp_interrupt(SI_INTERRUPT); break; |