diff options
| author | 2025-09-18 03:34:18 +0200 | |
|---|---|---|
| committer | 2025-09-18 03:34:18 +0200 | |
| commit | dc74f111e504d46a846c373b160e33800870115e (patch) | |
| tree | 3593c240059d616f7733a8733ea5a15f6c6f9758 | |
| parent | 76768ad69e5d83d0e78b816e628301afbdb54963 (diff) | |
goldstar.cpp driver improvements. [Roberto Fresca, Grull Osgo]
- Reworked the screen update to take rid of the boolean states
toward a real video register for joker master.
- Removed the imperfect graphics and imperfect colors flags to
all the joker master sets.
- Fixed cmfb55 inputs.
Systems promoted to working
---------------------------
Cherry Master (bootleg, Game FB55 Ver.2) [Roberto Fresca, Grull Osgo]
| -rw-r--r-- | src/mame/igs/goldstar.cpp | 78 |
1 files changed, 48 insertions, 30 deletions
diff --git a/src/mame/igs/goldstar.cpp b/src/mame/igs/goldstar.cpp index 98944a0dd94..f4dc37ff7bc 100644 --- a/src/mame/igs/goldstar.cpp +++ b/src/mame/igs/goldstar.cpp @@ -389,7 +389,7 @@ protected: void goldstar_fa00_w(uint8_t data); void cm_palette(palette_device &palette) const ATTR_COLD; void lucky8_palette(palette_device &palette) const ATTR_COLD; - template <bool Has_bg_tmap> uint32_t screen_update_goldstar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update_goldstar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void common_decrypted_opcodes_map(address_map &map) ATTR_COLD; void goldstar_map(address_map &map) ATTR_COLD; @@ -511,6 +511,7 @@ private: void background_col_w(uint8_t data); void coincount_w(uint8_t data); void pkm_out0_w(uint8_t data); + void jkm_vid_reg_w(uint8_t data); uint32_t screen_update_amcoe1a(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_cmast91(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -1044,7 +1045,6 @@ void goldstar_state::goldstar_fa00_w(uint8_t data) -template <bool Has_bg_tmap> uint32_t goldstar_state::screen_update_goldstar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { bitmap.fill(rgb_t::black(), cliprect); @@ -1052,7 +1052,7 @@ uint32_t goldstar_state::screen_update_goldstar(screen_device &screen, bitmap_rg if (!(m_enable_reg & 0x01)) return 0; - if (Has_bg_tmap) + if (m_enable_reg & 0x10) { for (int i = 0; i < 64; i++) m_bg_tilemap->set_scrolly(i, m_bg_scroll[i]); @@ -2556,6 +2556,12 @@ void cmaster_state::pkm_out0_w(uint8_t data) } +void cmaster_state::jkm_vid_reg_w(uint8_t data) +{ + m_enable_reg = bitswap<8>(data, 7, 6, 5, 4, 2, 3, 1, 0); +} + + void cb3_state::coincount_w(uint8_t data) { @@ -2742,7 +2748,7 @@ void cmaster_state::jkrmast_portmap(address_map &map) map(0x12, 0x12).portr("IN2"); map(0x13, 0x13).w(FUNC(cmaster_state::pkm_out0_w)); map(0x17, 0x17).lw8(NAME([this] (uint8_t data) { m_reel_bank = (data & 0x30) >> 4; m_bgcolor = data & 0x03; m_bg_tilemap->mark_all_dirty(); })); - // map(0x18, 0x18).w // enable reg? + map(0x18, 0x18).w(FUNC(cmaster_state::jkm_vid_reg_w)); // enable reg? } void cmaster_state::eldoraddoa_portmap(address_map &map) // TODO: incomplete! @@ -11781,7 +11787,7 @@ void goldstar_state::goldstar(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_goldstar); @@ -11814,7 +11820,7 @@ void goldstar_state::goldstbl(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_bl); @@ -11895,7 +11901,7 @@ void goldstar_state::super9(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 32*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_super9); @@ -12000,7 +12006,7 @@ void cb3_state::ncb3(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(cb3_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(cb3_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ncb3); @@ -12068,7 +12074,7 @@ void goldstar_state::wcherry(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_cb3e); @@ -12112,7 +12118,7 @@ void cmaster_state::cm(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_cmbitmap); @@ -12400,7 +12406,7 @@ void wingco_state::superdrg(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(wingco_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(wingco_state::screen_update_goldstar)); screen.screen_vblank().set(FUNC(wingco_state::masked_irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_animalhs); @@ -12670,7 +12676,7 @@ void goldstar_state::kkotnoli(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ncb3); @@ -12703,7 +12709,7 @@ void goldstar_state::ladylinr(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ncb3); @@ -12755,7 +12761,7 @@ void wingco_state::wcat3(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(wingco_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(wingco_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ncb3); @@ -12802,7 +12808,7 @@ void cmaster_state::amcoe1(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_cm); @@ -12856,7 +12862,7 @@ void cmaster_state::amcoe2(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_cm); @@ -12963,7 +12969,7 @@ void cmaster_state::pkrmast(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(cmaster_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_pkrmast); @@ -12990,7 +12996,7 @@ void cmaster_state::jkrmast(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &cmaster_state::jkrmast_map); m_maincpu->set_addrmap(AS_IO, &cmaster_state::jkrmast_portmap); - subdevice<screen_device>("screen")->set_screen_update(FUNC(cmaster_state::screen_update_goldstar<true>)); + subdevice<screen_device>("screen")->set_screen_update(FUNC(cmaster_state::screen_update_goldstar)); MCFG_VIDEO_START_OVERRIDE(cmaster_state, jkrmast) subdevice<ay8910_device>("aysnd")->port_a_read_callback().set_ioport("DSW3"); @@ -13053,7 +13059,7 @@ void goldstar_state::megaline(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_megaline); @@ -13083,7 +13089,7 @@ void unkch_state::bonusch(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(unkch_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(unkch_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_megaline); @@ -13123,7 +13129,7 @@ void goldstar_state::feverch(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar<false>)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ncb3); @@ -25435,9 +25441,15 @@ void cmaster_state::init_ll3() // verified with ICE dump rom[0x8b] = 0; rom[0x8c] = 0; - // NOP'ing the writes to port 10h (video register) - // all the writes have masked the bit1 ON, getting - // the video totally disabled. Surely for protection. +/* + NOP'ing the writes to port 10h (video register) + all the writes have masked the bit1 ON, getting + the video totally disabled. Surely for protection. + + The most probably thing is that bit1 are inverted. + Need to be checked... + +*/ rom[0x0b2c] = 0x00; rom[0x0b2d] = 0x00; } @@ -25456,9 +25468,15 @@ void cmaster_state::init_ll3b() // verified with ICE dump rom[0x8b] = 0; rom[0x8c] = 0; - // NOP'ing the writes to port 10h (video register) - // all the writes have masked the bit1 ON, getting - // the video totally disabled. Surely for protection. +/* + NOP'ing the writes to port 10h (video register) + all the writes have masked the bit1 ON, getting + the video totally disabled. Surely for protection. + + The most probably thing is that bit1 are inverted. + Need to be checked... + +*/ rom[0x0b2c] = 0x00; rom[0x0b2d] = 0x00; } @@ -26860,7 +26878,7 @@ GAME ( 1993, ll3c, ll3, ll3, ll3, cmaster_state, init_ll3b GAME ( 1993, ll3d, ll3, ll3, ll3, cmaster_state, init_ll3b, ROT0, "bootleg", "Lucky Line III (ver 2.00, Wang QL-1 v3.03, set 5)", 0 ) // needs layout GAME ( 1993, ll3e, ll3, ll3, ll3, cmaster_state, init_ll3b, ROT0, "bootleg", "Lucky Line III (ver 2.00, Wang QL-1 v3.03, set 6)", 0 ) // needs layout GAME ( 1993, ll3f, ll3, ll3, ll3, cmaster_state, init_ll3, ROT0, "bootleg (LLC)", "Lucky Line III (ver 2.00, Wang QL-1 v3.03, set 7)", 0 ) // needs layout -GAMEL( 199?, cmfb55, cmaster, cmfb55, cmaster, cmaster_state, init_palnibbles,ROT0, "bootleg", "Cherry Master (bootleg, Game FB55 Ver.2)", MACHINE_NOT_WORKING, layout_cmv4 ) // inputs not done +GAMEL( 199?, cmfb55, cmaster, cmfb55, cmv4, cmaster_state, init_palnibbles,ROT0, "bootleg", "Cherry Master (bootleg, Game FB55 Ver.2)", 0, layout_cmv4 ) GAMEL( 199?, hamhouse, cmaster, cm, cmaster, cmaster_state, init_hamhouse, ROT0, "bootleg", "Hamburger House", 0, layout_cmaster ) GAMEL( 199?, hamhouse9, cmaster, cm, cmaster, cmaster_state, init_hamhouse9, ROT0, "bootleg", "Hamburger House 9", 0, layout_cmaster ) GAMEL( 199?, alienatt, cmaster, cm, cmv4, cmaster_state, init_alienatt, ROT0, "bootleg", "Allien Attack (Game FBV2, ver.T)", 0, layout_cmv4 ) @@ -26878,8 +26896,8 @@ GAMEL( 1992, cb3micro, cmv4, cm, cm_nodsw, cmaster_state, empty_ini // poker master type sets GAMEL( 1991, tonypok, 0, cm, tonypok, cmaster_state, init_tonypok, ROT0, "Corsica", "Poker Master (Tony-Poker V3.A, hack?)", 0 , layout_tonypok ) GAME( 1999, jkrmast, 0, jkrmast, jkrmast, cmaster_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master 2000 Special Edition (V515)", 0 ) -GAME( 1999, jkrmasta, jkrmast, jkrmast, jkrmast, cmaster_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master 2000 Special Edition (V512/513)", MACHINE_IMPERFECT_COLORS ) // sometimes fg colors are wrong, bonus stages have reels bg always white --> tilemap garbage or white -GAME( 1999, jkrmastb, jkrmast, jkrmast, jkrmastb, cmaster_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master 2000 Special Edition (V512)", MACHINE_IMPERFECT_GRAPHICS ) // needs to clean the bg tilemap properly +GAME( 1999, jkrmasta, jkrmast, jkrmast, jkrmast, cmaster_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master 2000 Special Edition (V512/513)", 0 ) +GAME( 1999, jkrmastb, jkrmast, jkrmast, jkrmastb, cmaster_state, init_jkrmast, ROT0, "Pick-A-Party USA", "Joker Master 2000 Special Edition (V512)", 0 ) GAME( 1993, pkrmast, 0, pkrmast, pkrmast, cmaster_state, init_pkrmast, ROT0, "Fun USA", "Poker Master (ED-1993, dual game, set 1)", 0 ) // puts FUN USA 95H N/G V2.20 in NVRAM GAME( 1993, pkrmasta, pkrmast, pkrmast, pkrmast, cmaster_state, init_pkrmast, ROT0, "Fun USA", "Poker Master (ED-1993, dual game, set 2)", 0 ) // needs dips fixed, puts PM93 JAN 29/1996 V1.52 in NVRAM GAME( 1993, missbingo, pkrmast, pkrmast, pkrmast, cmaster_state, init_pkrmast, ROT0, "Fun USA", "Miss Bingo (Poker Master HW, dual game)", 0 ) // needs girl support |
