summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2022-10-01 01:44:54 +0200
committer hap <happppp@users.noreply.github.com>2022-10-01 01:44:54 +0200
commit221566b9d31a66b7595188ab925757a57b0ca4f6 (patch)
treed50da87d77592cb0b28ca579db074800649f08a7
parent450395f838dd0d0bcec2d4568aa4ad2071062d65 (diff)
suprgolf: readd that rompatchHEADmaster
-rw-r--r--src/mame/nasco/suprgolf.cpp47
1 files changed, 30 insertions, 17 deletions
diff --git a/src/mame/nasco/suprgolf.cpp b/src/mame/nasco/suprgolf.cpp
index 7cf3a5d720c..1dca42ec66c 100644
--- a/src/mame/nasco/suprgolf.cpp
+++ b/src/mame/nasco/suprgolf.cpp
@@ -7,7 +7,9 @@
driver by Tomasz Slanina & Angelo Salese
TODO:
- - understand what needs to be modified for the gfxs;
+ - remove the rom patch and understand what needs to be modified for the gfxs,
+ it reads from 0x06(PPI1 port C) and then fails to fill bg vram correctly.
+ PPI1 ports configuration is very standard, so it's not a 8255 device bug;
- Some weird framebuffer vertical gaps with some object, namely the green and the
trees (zooming?)
- not sure if the analog inputs are handled correctly;
@@ -48,6 +50,9 @@ public:
void suprgolf(machine_config &config);
+ void init_suprgolf();
+ void init_suprgolfj();
+
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -66,7 +71,6 @@ private:
std::unique_ptr<uint8_t[]> m_bg_vram;
std::unique_ptr<uint16_t[]> m_bg_fb;
std::unique_ptr<uint16_t[]> m_fg_fb;
- uint8_t m_rom_bank = 0;
uint8_t m_bg_bank = 0;
uint8_t m_msm5205next = 0;
uint8_t m_msm_nmi_mask = 0;
@@ -82,7 +86,6 @@ private:
void adpcm_data_w(uint8_t data);
void rom2_bank_select_w(uint8_t data);
void vregs_w(uint8_t data);
- uint8_t rom_bank_select_r();
void rom_bank_select_w(uint8_t data);
uint8_t pedal_extra_bits_r();
uint8_t p1_r();
@@ -264,7 +267,6 @@ void suprgolf_state::machine_start()
membank("bank1")->configure_entries(0, 16, memregion("user2")->base(), 0x4000);
membank("bank2")->configure_entries(0, 64, memregion("user1")->base(), 0x4000);
- save_item(NAME(m_rom_bank));
save_item(NAME(m_msm5205next));
save_item(NAME(m_msm_nmi_mask));
save_item(NAME(m_toggle));
@@ -280,15 +282,8 @@ void suprgolf_state::adpcm_data_w(uint8_t data)
m_msm5205next = data;
}
-uint8_t suprgolf_state::rom_bank_select_r()
-{
- return m_rom_bank;
-}
-
void suprgolf_state::rom_bank_select_w(uint8_t data)
{
- m_rom_bank = data;
-
//popmessage("%08x %02x",((data & 0x3f) * 0x4000),data);
//osd_printf_debug("ROM_BANK 0x8000 - %X @%X\n",data,m_maincpu->pcbase());
membank("bank2")->set_entry(data & 0x3f);
@@ -302,8 +297,8 @@ void suprgolf_state::rom2_bank_select_w(uint8_t data)
//osd_printf_debug("ROM_BANK 0x4000 - %X @%X\n",data,m_maincpu->pcbase());
membank("bank1")->set_entry(data & 0x0f);
- if(data & 0xf0)
- printf("Rom bank select 2 with data %02x activated\n",data);
+ //if(data & 0xf0)
+ // printf("Rom bank select 2 with data %02x activated\n",data);
}
uint8_t suprgolf_state::pedal_extra_bits_r()
@@ -483,7 +478,6 @@ void suprgolf_state::suprgolf(machine_config &config)
i8255_device &ppi1(I8255A(config, "ppi8255_1"));
ppi1.in_pa_callback().set_ioport("SYSTEM");
- ppi1.in_pb_callback().set(FUNC(suprgolf_state::rom_bank_select_r));
ppi1.out_pb_callback().set(FUNC(suprgolf_state::rom_bank_select_w));
ppi1.out_pc_callback().set(FUNC(suprgolf_state::vregs_w));
@@ -645,9 +639,28 @@ ROM_START( albatross )
ROM_LOAD( "chr4.3d", 0x030000, 0x010000, CRC(0fb88270) SHA1(d85a7f1bc5b3c4b13bbd887cea4c055541cbb737) )
ROM_END
+
+void suprgolf_state::init_suprgolf()
+{
+ uint8_t *ROM = memregion("user2")->base();
+
+ ROM[0x74f4-0x4000] = 0x00;
+ ROM[0x74f5-0x4000] = 0x00;
+ ROM[0x74fa+(0x4000*3)-0x4000] = 0x20; // patch ROM check
+}
+
+void suprgolf_state::init_suprgolfj()
+{
+ uint8_t *ROM = memregion("user2")->base();
+
+ ROM[0x74f4-0x4000] = 0x00;
+ ROM[0x74f5-0x4000] = 0x00;
+ ROM[0x6d72+(0x4000*3)-0x4000] = 0x20; // patch ROM check
+}
+
} // Anonymous namespace
-GAME( 1989, suprgolf, 0, suprgolf, suprgolf, suprgolf_state, empty_init, ROT0, "Nasco", "Super Crowns Golf (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, suprgolfj, suprgolf, suprgolf, suprgolf, suprgolf_state, empty_init, ROT0, "Nasco", "Super Crowns Golf (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, albatross, suprgolf, suprgolf, suprgolf, suprgolf_state, empty_init, ROT0, "Nasco", "Albatross (US Prototype?)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL| MACHINE_SUPPORTS_SAVE )
+GAME( 1989, suprgolf, 0, suprgolf, suprgolf, suprgolf_state, init_suprgolf, ROT0, "Nasco", "Super Crowns Golf (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, suprgolfj, suprgolf, suprgolf, suprgolf, suprgolf_state, init_suprgolfj, ROT0, "Nasco", "Super Crowns Golf (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, albatross, suprgolf, suprgolf, suprgolf, suprgolf_state, init_suprgolf, ROT0, "Nasco (Technos license)", "Albatross (US prototype?)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL| MACHINE_SUPPORTS_SAVE )