diff options
Diffstat (limited to 'src/mame/drivers/nes.cpp')
-rw-r--r-- | src/mame/drivers/nes.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mame/drivers/nes.cpp b/src/mame/drivers/nes.cpp index 59b38b9c1e7..4ad7f1966d4 100644 --- a/src/mame/drivers/nes.cpp +++ b/src/mame/drivers/nes.cpp @@ -27,11 +27,11 @@ WRITE8_MEMBER(nes_state::nes_vh_sprite_dma_w) void nes_state::nes_map(address_map &map) { - map(0x0000, 0x07ff).ram().mirror(0x1800); /* RAM */ - map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); /* PPU registers */ - map(0x4014, 0x4014).w(FUNC(nes_state::nes_vh_sprite_dma_w)); /* stupid address space hole */ - map(0x4016, 0x4016).rw(FUNC(nes_state::nes_in0_r), FUNC(nes_state::nes_in0_w)); /* IN0 - input port 1 */ - map(0x4017, 0x4017).r(FUNC(nes_state::nes_in1_r)); /* IN1 - input port 2 */ + map(0x0000, 0x07ff).ram().mirror(0x1800); // RAM + map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); // PPU registers + map(0x4014, 0x4014).w(FUNC(nes_state::nes_vh_sprite_dma_w)); // stupid address space hole + map(0x4016, 0x4016).rw(FUNC(nes_state::nes_in0_r), FUNC(nes_state::nes_in0_w)); // IN0 - input port 1 + map(0x4017, 0x4017).r(FUNC(nes_state::nes_in1_r)); // IN1 - input port 2 // 0x4100-0x5fff -> LOW HANDLER defined on a pcb base // 0x6000-0x7fff -> MID HANDLER defined on a pcb base // 0x8000-0xffff -> HIGH HANDLER defined on a pcb base @@ -91,6 +91,7 @@ void nes_state::nes(machine_config &config) void nes_state::nespal(machine_config &config) { nes(config); + /* basic machine hardware */ m_maincpu->set_clock(PAL_APU_CLOCK); @@ -111,6 +112,7 @@ void nes_state::nespal(machine_config &config) void nes_state::famicom(machine_config &config) { nes(config); + NES_CONTROL_PORT(config.replace(), m_ctrl1, fc_control_port1_devices, "joypad"); NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad"); NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr); @@ -125,6 +127,7 @@ void nes_state::famicom(machine_config &config) void nes_state::nespalc(machine_config &config) { nespal(config); + m_maincpu->set_clock(PALC_APU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &nes_state::nes_map); @@ -144,6 +147,7 @@ void nes_state::nespalc(machine_config &config) void nes_state::famipalc(machine_config &config) { nespalc(config); + NES_CONTROL_PORT(config.replace(), m_ctrl1, fc_control_port1_devices, "joypad"); NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad"); NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr); @@ -157,6 +161,7 @@ void nes_state::famipalc(machine_config &config) void nes_state::suborkbd(machine_config &config) { famipalc(config); + /* TODO: emulate the parallel port bus! */ m_exp->set_default_option("subor_keyboard"); m_exp->set_fixed(true); |