From c708829357b934a6b694a003edc7f204addd9f19 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Tue, 29 Jul 2025 19:40:34 +0100 Subject: [PATCH 1/5] move stuff --- .../bl_handhelds_lcdc.cpp | 0 .../{tvgames => handheld}/bl_handhelds_lcdc.h | 0 .../{tvgames => handheld}/st2302u_bbl_rom.cpp | 0 .../{tvgames => handheld}/st2302u_bbl_spi.cpp | 0 src/mame/mame.lst | 40 +++++++++---------- 5 files changed, 20 insertions(+), 20 deletions(-) rename src/mame/{tvgames => handheld}/bl_handhelds_lcdc.cpp (100%) rename src/mame/{tvgames => handheld}/bl_handhelds_lcdc.h (100%) rename src/mame/{tvgames => handheld}/st2302u_bbl_rom.cpp (100%) rename src/mame/{tvgames => handheld}/st2302u_bbl_spi.cpp (100%) diff --git a/src/mame/tvgames/bl_handhelds_lcdc.cpp b/src/mame/handheld/bl_handhelds_lcdc.cpp similarity index 100% rename from src/mame/tvgames/bl_handhelds_lcdc.cpp rename to src/mame/handheld/bl_handhelds_lcdc.cpp diff --git a/src/mame/tvgames/bl_handhelds_lcdc.h b/src/mame/handheld/bl_handhelds_lcdc.h similarity index 100% rename from src/mame/tvgames/bl_handhelds_lcdc.h rename to src/mame/handheld/bl_handhelds_lcdc.h diff --git a/src/mame/tvgames/st2302u_bbl_rom.cpp b/src/mame/handheld/st2302u_bbl_rom.cpp similarity index 100% rename from src/mame/tvgames/st2302u_bbl_rom.cpp rename to src/mame/handheld/st2302u_bbl_rom.cpp diff --git a/src/mame/tvgames/st2302u_bbl_spi.cpp b/src/mame/handheld/st2302u_bbl_spi.cpp similarity index 100% rename from src/mame/tvgames/st2302u_bbl_spi.cpp rename to src/mame/handheld/st2302u_bbl_spi.cpp diff --git a/src/mame/mame.lst b/src/mame/mame.lst index cfafe9ecd7089..48e16e0854add 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -19393,6 +19393,26 @@ newbrain newbraina newbrainmd +@source:handheld/st2302u_bbl_rom.cpp +bbl338 +class200 +dphh8213 + +@source:handheld/st2302u_bbl_spi.cpp +arcade10 +bbl380 +dgun2953 +dphh8630 +dphh8633 +mc_cb203 +pg118 +ragc153 +retro150 +retro150a +rhhc152 +supreme +toumapet + @source:handheld/chessking.cpp chesskng @@ -47089,26 +47109,6 @@ lx_jg7410 zonemini react -@source:tvgames/st2302u_bbl_rom.cpp -bbl338 -class200 -dphh8213 - -@source:tvgames/st2302u_bbl_spi.cpp -arcade10 -bbl380 -dgun2953 -dphh8630 -dphh8633 -mc_cb203 -pg118 -ragc153 -retro150 -retro150a -rhhc152 -supreme -toumapet - @source:tvgames/titan_soc.cpp colecofl megadri4 From fe07e58a9dfd32dff16af077c79c2eae237ceda0 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Tue, 29 Jul 2025 19:58:42 +0100 Subject: [PATCH 2/5] add a dump of a different internal ROM (although it still needs verifying) a number of sets now boot albeit with broken gfx (maybe due to error in internal ROM data) --- src/mame/handheld/bl_handhelds_lcdc.h | 6 +- src/mame/handheld/st2302u_bbl_spi.cpp | 81 ++++++++++++++------------- 2 files changed, 45 insertions(+), 42 deletions(-) diff --git a/src/mame/handheld/bl_handhelds_lcdc.h b/src/mame/handheld/bl_handhelds_lcdc.h index 982dd3697e5c8..2c1572a87d29e 100644 --- a/src/mame/handheld/bl_handhelds_lcdc.h +++ b/src/mame/handheld/bl_handhelds_lcdc.h @@ -1,8 +1,8 @@ // license:BSD-3-Clause // copyright-holders:David Haywood -#ifndef MAME_TVGAMES_BL_HANDHELDS_LCDC_H -#define MAME_TVGAMES_BL_HANDHELDS_LCDC_H +#ifndef MAME_HANDHELD_BL_HANDHELDS_LCDC_H +#define MAME_HANDHELD_BL_HANDHELDS_LCDC_H #pragma once @@ -34,4 +34,4 @@ class bl_handhelds_lcdc_device : public device_t }; -#endif // MAME_TVGAMES_BL_HANDHELDS_LCDC_H +#endif // MAME_HANDHELD_BL_HANDHELDS_LCDC_H diff --git a/src/mame/handheld/st2302u_bbl_spi.cpp b/src/mame/handheld/st2302u_bbl_spi.cpp index c28764e357a46..eecbcf60a9c93 100644 --- a/src/mame/handheld/st2302u_bbl_spi.cpp +++ b/src/mame/handheld/st2302u_bbl_spi.cpp @@ -302,108 +302,112 @@ void bbl380_state::bbl380(machine_config &config) // Several other LCDC models are identified by ragc153 and dphh8630 } +// internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range +#define INTERNAL_ROM_TYPE1 \ + ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) \ + ROM_LOAD("st2x_internal_type1.bin", 0x002000, 0x002000, CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) + +// internal OTPROM BIOS, dumped from retro150a PCB, 6000-7fff range +#define INTERNAL_ROM_TYPE2 \ + ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) \ + ROM_LOAD("st2x_internal_type2.bin", 0x002000, 0x002000, BAD_DUMP CRC(32d96794) SHA1(9d7e3e284f1656d8b2f7dae754cab1f82b3a1d61)) /* could still have some errors, double check! */ + + +// sets with unknown version of internal ROM + ROM_START(bbl380) ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD("bbl380_st2205u.bin", 0x000000, 0x004000, NO_DUMP) // internal OTPROM BIOS (addresses are different from other sets) ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) - ROM_LOAD("bbl 380 180 in 1.bin", 0x000000, 0x400000, CRC(146c88da) SHA1(7f18526a6d8cf991f86febce3418d35aac9f49ad) BAD_DUMP) + ROM_LOAD("bbl 380 180 in 1.bin", 0x000000, 0x400000, BAD_DUMP CRC(146c88da) SHA1(7f18526a6d8cf991f86febce3418d35aac9f49ad)) // 0x0022XX, 0x0026XX, 0x002AXX, 0x002CXX, 0x002DXX, 0x0031XX, 0x0036XX, etc. should not be FF fill ROM_END ROM_START(mc_cb203) ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("bbl380_st2205u.bin", 0x000000, 0x004000, NO_DUMP) // internal OTPROM BIOS (addresses are different from other sets, including bbl380) + ROM_LOAD("cb230_st2205u.bin", 0x000000, 0x004000, NO_DUMP) // internal OTPROM BIOS (addresses are different from other sets, including bbl380) ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("s25fl032.bin", 0x000000, 0x400000, CRC(33c4e67b) SHA1(5787db4c8ce4c2569a5f9e9054cbb1944c1b3092)) ROM_END +// sets with 1nd version of internal ROM + ROM_START(rhhc152) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range + INTERNAL_ROM_TYPE1 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("152_mk25q32amg_ef4016.bin", 0x000000, 0x400000, CRC(5f553895) SHA1(cd21c6ff225e0455531f6b1d9f1c66a284948516)) ROM_END ROM_START(ragc153) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range + INTERNAL_ROM_TYPE1 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("25q32ams.bin", 0x000000, 0x400000, CRC(de328d73) SHA1(d17b97e9057be4add68b9f5a26e04c9f0a139673)) // first 0x100 bytes would read as 0xff at regular speed, but give valid looking consistent data at a slower rate ROM_END ROM_START(dphh8630) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range + INTERNAL_ROM_TYPE1 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("bg25q16.bin", 0x000000, 0x200000, CRC(277850d5) SHA1(740087842e1e63bf99b4ca9c1b2053361f267269)) ROM_END -ROM_START(dphh8633) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range - - ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) - ROM_LOAD("25lq032.u2", 0x000000, 0x400000, CRC(45b8609a) SHA1(d03615a68465a1a365ba07db0b352424680d62d0) ) -ROM_END - ROM_START(dgun2953) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range + INTERNAL_ROM_TYPE1 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("dg160_25x32v_ef3016.bin", 0x000000, 0x400000, CRC(2e993bac) SHA1(4b310e326a47df1980aeef38aa9a59018d7fe76f)) ROM_END ROM_START(arcade10) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range + INTERNAL_ROM_TYPE1 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("25q40.bin", 0x000000, 0x080000, CRC(62784666) SHA1(ba1a4abed0a41b2fb3868543306243e68ea6b2e1)) ROM_END -ROM_START(retro150) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - // not correct for this - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range +ROM_START(supreme) + INTERNAL_ROM_TYPE1 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) - ROM_LOAD("p25d32sh.u2", 0x000000, 0x400000, CRC(294290aa) SHA1(078892b2bb10e347ed07273bafed486e0f52c909) ) + ROM_LOAD("25q32.bin", 0x000000, 0x400000, CRC(93072a3d) SHA1(9f8770839032922e64d5ddd8864441357623c45f)) ROM_END -ROM_START(retro150a) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - // not correct for this - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range +// sets with 2nd version of internal ROM + +ROM_START(dphh8633) + INTERNAL_ROM_TYPE2 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) - ROM_LOAD("by25q32ess.bin", 0x000000, 0x400000, CRC(ef9e8091) SHA1(5b924d5fd4419956d49379a695b87435df7a1155) ) + ROM_LOAD("25lq032.u2", 0x000000, 0x400000, CRC(45b8609a) SHA1(d03615a68465a1a365ba07db0b352424680d62d0) ) ROM_END -ROM_START(supreme) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range +ROM_START(retro150) + INTERNAL_ROM_TYPE2 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) - ROM_LOAD("25q32.bin", 0x000000, 0x400000, CRC(93072a3d) SHA1(9f8770839032922e64d5ddd8864441357623c45f)) + ROM_LOAD("p25d32sh.u2", 0x000000, 0x400000, CRC(294290aa) SHA1(078892b2bb10e347ed07273bafed486e0f52c909) ) +ROM_END + +ROM_START(retro150a) + INTERNAL_ROM_TYPE2 + + ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) + ROM_LOAD("by25q32ess.bin", 0x000000, 0x400000, CRC(ef9e8091) SHA1(5b924d5fd4419956d49379a695b87435df7a1155) ) ROM_END ROM_START(pg118) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB (not right for this set), 6000-7fff range + INTERNAL_ROM_TYPE2 ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("25vq32.bin", 0x000000, 0x400000, CRC(e99f1621) SHA1(f907c36a1a884d892331b7de294a8fd58f7bf9d5) ) ROM_END ROM_START(toumapet) - ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("st2x_internal.bin", 0x002000, 0x002000, BAD_DUMP CRC(f4dc1fc2) SHA1(bbc11539c48eb612ebae50da45e03b6fde440941)) // internal OTPROM BIOS, dumped from dgun2953 PCB (not right for this set), 6000-7fff range + INTERNAL_ROM_TYPE2 // still does't boot with this one, is it different internal ROM again, or just different mappings? ROM_REGION(0x800000, "spi", ROMREGION_ERASEFF) ROM_LOAD("p25d32sh.bin", 0x000000, 0x400000, CRC(25498f00) SHA1(c5c410e29f540d7f1fd4bbb333467f8a3eaccc15) ) @@ -434,7 +438,6 @@ CONS( 201?, arcade10, 0, 0, bbl380, bbl380, bbl380_state, empt CONS( 201?, supreme, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Fizz Creations", "Arcade Classics Mini Handheld Arcade (Supreme 150)", MACHINE_IMPERFECT_SOUND ) // these are for the Japanese market, the ROM is the same between the Pocket Game and Game Computer but the form factor is different. -// they have the 0xE4 XOR on the SPI data like many of the above units, but don't currently boot - need to verify if the internal ROM part should be the same or not CONS( 2019, pg118, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Pocket Game / Game Computer", "Pocket Game 118-in-1 / Game Computer 118-in-1", MACHINE_NOT_WORKING ) // also has the 0xE4 XOR, also doesn't currently boot CONS( 2021, toumapet, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Shenzhen Shiji New Technology", "Tou ma Pet", MACHINE_NOT_WORKING ) From d7d6e3ab8e0a2ac68008b41c8906c6115d717a39 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Thu, 14 Aug 2025 23:07:00 +0100 Subject: [PATCH 3/5] double checked this, should be correct, issues coming from elsewhere? --- src/mame/handheld/st2302u_bbl_spi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/handheld/st2302u_bbl_spi.cpp b/src/mame/handheld/st2302u_bbl_spi.cpp index eecbcf60a9c93..f16466d66b9b5 100644 --- a/src/mame/handheld/st2302u_bbl_spi.cpp +++ b/src/mame/handheld/st2302u_bbl_spi.cpp @@ -310,7 +310,7 @@ void bbl380_state::bbl380(machine_config &config) // internal OTPROM BIOS, dumped from retro150a PCB, 6000-7fff range #define INTERNAL_ROM_TYPE2 \ ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) \ - ROM_LOAD("st2x_internal_type2.bin", 0x002000, 0x002000, BAD_DUMP CRC(32d96794) SHA1(9d7e3e284f1656d8b2f7dae754cab1f82b3a1d61)) /* could still have some errors, double check! */ + ROM_LOAD("st2x_internal_type2.bin", 0x002000, 0x002000, CRC(32d96794) SHA1(9d7e3e284f1656d8b2f7dae754cab1f82b3a1d61)) // sets with unknown version of internal ROM From 35d0a1ef50efd04082a098092abcdbef56ef17ba Mon Sep 17 00:00:00 2001 From: David Haywood Date: Thu, 14 Aug 2025 23:54:50 +0100 Subject: [PATCH 4/5] retro150 units are lower clock speed? --- src/mame/handheld/st2302u_bbl_spi.cpp | 42 ++++++++++++++++++--------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/mame/handheld/st2302u_bbl_spi.cpp b/src/mame/handheld/st2302u_bbl_spi.cpp index f16466d66b9b5..0f5567d5cd9e1 100644 --- a/src/mame/handheld/st2302u_bbl_spi.cpp +++ b/src/mame/handheld/st2302u_bbl_spi.cpp @@ -55,11 +55,14 @@ class bbl380_state : public driver_device { } void bbl380(machine_config &config); + void bbl380_24mhz(machine_config &config); private: virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; + void bbl380_do_maincpu_config(); + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void bbl380_map(address_map &map) ATTR_COLD; @@ -265,27 +268,28 @@ static INPUT_PORTS_START(bbl380) PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END -void bbl380_state::bbl380(machine_config &config) +void bbl380_state::bbl380_do_maincpu_config() { - ST2302U(config, m_maincpu, 32000000); // unknown clock; type not confirmed m_maincpu->set_addrmap(AS_DATA, &bbl380_state::bbl380_map); m_maincpu->in_pa_callback().set_ioport("IN0"); m_maincpu->in_pb_callback().set_ioport("IN1"); - - m_maincpu->out_pa_callback().set(FUNC(bbl380_state::output_w)); m_maincpu->out_pb_callback().set(FUNC(bbl380_state::output2_w)); - // TODO, hook these up properly - //m_maincpu->spi_in_callback().set(FUNC(bbl380_state::spi_r)); + //m_maincpu->spi_in_callback().set(FUNC(bbl380_state::spi_r)); // TODO, hook these up properly //m_maincpu->spi_out_callback().set(FUNC(bbl380_state::spi_w)); - /* sound hardware */ - SPEAKER(config, "mono").front_center(); m_maincpu->add_route(0, "mono", 1.00); m_maincpu->add_route(1, "mono", 1.00); m_maincpu->add_route(2, "mono", 1.00); m_maincpu->add_route(3, "mono", 1.00); +} + +void bbl380_state::bbl380(machine_config &config) +{ + ST2302U(config, m_maincpu, 32000000); // 32Mhz clock correct for music tempo. SoC type not confirmed + SPEAKER(config, "mono").front_center(); + bbl380_do_maincpu_config(); SCREEN(config, m_screen, SCREEN_TYPE_LCD); // TFT color LCD m_screen->set_refresh_hz(60); @@ -302,6 +306,13 @@ void bbl380_state::bbl380(machine_config &config) // Several other LCDC models are identified by ragc153 and dphh8630 } +void bbl380_state::bbl380_24mhz(machine_config &config) +{ + bbl380(config); + ST2302U(config.replace(), m_maincpu, 24000000); // 24Mhz clock correct for music tempo. SoC type not confirmed + bbl380_do_maincpu_config(); +} + // internal OTPROM BIOS, dumped from dgun2953 PCB, 6000-7fff range #define INTERNAL_ROM_TYPE1 \ ROM_REGION(0x800000, "maincpu", ROMREGION_ERASEFF) \ @@ -437,13 +448,16 @@ CONS( 201?, arcade10, 0, 0, bbl380, bbl380, bbl380_state, empt CONS( 201?, supreme, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Fizz Creations", "Arcade Classics Mini Handheld Arcade (Supreme 150)", MACHINE_IMPERFECT_SOUND ) +// releases with different internal ROM, these currently have rendering issues for unknown reasons + +// for the UK market, runs at a slightly slower clock +CONS( 201?, retro150, 0, 0, bbl380_24mhz, bbl380, bbl380_state, empty_init, "Red5", "Retro Arcade Game Controller (150-in-1) (set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 201?, retro150a, retro150,0, bbl380_24mhz, bbl380, bbl380_state, empty_init, "Red5", "Retro Arcade Game Controller (150-in-1) (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // these are for the Japanese market, the ROM is the same between the Pocket Game and Game Computer but the form factor is different. CONS( 2019, pg118, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Pocket Game / Game Computer", "Pocket Game 118-in-1 / Game Computer 118-in-1", MACHINE_NOT_WORKING ) -// also has the 0xE4 XOR, also doesn't currently boot -CONS( 2021, toumapet, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Shenzhen Shiji New Technology", "Tou ma Pet", MACHINE_NOT_WORKING ) -// for the UK market, but doesn't boot either -CONS( 201?, retro150, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Red5", "Retro Arcade Game Controller (150-in-1) (set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 201?, retro150a, retro150,0, bbl380, bbl380, bbl380_state, empty_init, "Red5", "Retro Arcade Game Controller (150-in-1) (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) - // it is unclear if dphh8633 refers to the case style, rather than the software, as the dphh8630 set was also noted as previously being found in an 8633 unit CONS( 201?, dphh8633, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "", "Digital Pocket Hand Held System 268-in-1 - Model 8633", MACHINE_NOT_WORKING ) + +// also has the 0xE4 XOR, also doesn't currently boot, could be yet another internal ROM +CONS( 2021, toumapet, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Shenzhen Shiji New Technology", "Tou ma Pet", MACHINE_NOT_WORKING ) + From abe9076a747beeca50da383596315e0910938ccf Mon Sep 17 00:00:00 2001 From: David Haywood Date: Fri, 15 Aug 2025 00:15:14 +0100 Subject: [PATCH 5/5] refactor a little --- src/mame/handheld/st2302u_bbl_spi.cpp | 34 +++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/mame/handheld/st2302u_bbl_spi.cpp b/src/mame/handheld/st2302u_bbl_spi.cpp index 0f5567d5cd9e1..43c2f4a8cca51 100644 --- a/src/mame/handheld/st2302u_bbl_spi.cpp +++ b/src/mame/handheld/st2302u_bbl_spi.cpp @@ -55,6 +55,7 @@ class bbl380_state : public driver_device { } void bbl380(machine_config &config); + void bbl380_menuprot(machine_config &config); void bbl380_24mhz(machine_config &config); private: @@ -263,9 +264,17 @@ static INPUT_PORTS_START(bbl380) PORT_START("IN1") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("A") PORT_BIT(0x06, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) +INPUT_PORTS_END + +static INPUT_PORTS_START(bbl380_prot) + PORT_INCLUDE(bbl380) + + PORT_MODIFY("IN1") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("menucontrol", FUNC(bl_handhelds_menucontrol_device::data_r)) PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("menucontrol", FUNC(bl_handhelds_menucontrol_device::status_r)) - PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END void bbl380_state::bbl380_do_maincpu_config() @@ -274,7 +283,6 @@ void bbl380_state::bbl380_do_maincpu_config() m_maincpu->in_pa_callback().set_ioport("IN0"); m_maincpu->in_pb_callback().set_ioport("IN1"); m_maincpu->out_pa_callback().set(FUNC(bbl380_state::output_w)); - m_maincpu->out_pb_callback().set(FUNC(bbl380_state::output2_w)); //m_maincpu->spi_in_callback().set(FUNC(bbl380_state::spi_r)); // TODO, hook these up properly //m_maincpu->spi_out_callback().set(FUNC(bbl380_state::spi_w)); @@ -306,6 +314,12 @@ void bbl380_state::bbl380(machine_config &config) // Several other LCDC models are identified by ragc153 and dphh8630 } +void bbl380_state::bbl380_menuprot(machine_config &config) +{ + bbl380(config); + m_maincpu->out_pb_callback().set(FUNC(bbl380_state::output2_w)); +} + void bbl380_state::bbl380_24mhz(machine_config &config) { bbl380(config); @@ -436,17 +450,17 @@ CONS( 201?, mc_cb203, 0, 0, bbl380, bbl380, bbl380_state, empt // newer releases (more heavily censored, for export markets?) internal ROM was changed for these -CONS( 201?, dphh8630, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "", "Digital Pocket Hand Held System 230-in-1 - Model 8630", MACHINE_IMPERFECT_SOUND ) // sometimes sold as PCP +CONS( 201?, dphh8630, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "", "Digital Pocket Hand Held System 230-in-1 - Model 8630", MACHINE_IMPERFECT_SOUND ) // sometimes sold as PCP -CONS( 201?, rhhc152, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Orb", "Retro Handheld Console 152-in-1", MACHINE_IMPERFECT_SOUND ) // looks like a mini GameBoy - 'Over 150 games' on box +CONS( 201?, rhhc152, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "Orb", "Retro Handheld Console 152-in-1", MACHINE_IMPERFECT_SOUND ) // looks like a mini GameBoy - 'Over 150 games' on box -CONS( 201?, ragc153, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Orb", "Retro Arcade Game Controller 153-in-1", MACHINE_IMPERFECT_SOUND ) // looks like a Game & Watch +CONS( 201?, ragc153, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "Orb", "Retro Arcade Game Controller 153-in-1", MACHINE_IMPERFECT_SOUND ) // looks like a Game & Watch -CONS( 201?, dgun2953, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "dreamGEAR", "My Arcade Gamer Mini 160-in-1 (DGUN-2953)", MACHINE_IMPERFECT_SOUND ) +CONS( 201?, dgun2953, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "dreamGEAR", "My Arcade Gamer Mini 160-in-1 (DGUN-2953)", MACHINE_IMPERFECT_SOUND ) -CONS( 201?, arcade10, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Fizz Creations", "Mini Arcade Console (Arcade 10-in-1)", MACHINE_IMPERFECT_SOUND ) +CONS( 201?, arcade10, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "Fizz Creations", "Mini Arcade Console (Arcade 10-in-1)", MACHINE_IMPERFECT_SOUND ) -CONS( 201?, supreme, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Fizz Creations", "Arcade Classics Mini Handheld Arcade (Supreme 150)", MACHINE_IMPERFECT_SOUND ) +CONS( 201?, supreme, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "Fizz Creations", "Arcade Classics Mini Handheld Arcade (Supreme 150)", MACHINE_IMPERFECT_SOUND ) // releases with different internal ROM, these currently have rendering issues for unknown reasons @@ -454,9 +468,9 @@ CONS( 201?, supreme, 0, 0, bbl380, bbl380, bbl380_state, empt CONS( 201?, retro150, 0, 0, bbl380_24mhz, bbl380, bbl380_state, empty_init, "Red5", "Retro Arcade Game Controller (150-in-1) (set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 201?, retro150a, retro150,0, bbl380_24mhz, bbl380, bbl380_state, empty_init, "Red5", "Retro Arcade Game Controller (150-in-1) (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // these are for the Japanese market, the ROM is the same between the Pocket Game and Game Computer but the form factor is different. -CONS( 2019, pg118, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Pocket Game / Game Computer", "Pocket Game 118-in-1 / Game Computer 118-in-1", MACHINE_NOT_WORKING ) +CONS( 2019, pg118, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "Pocket Game / Game Computer", "Pocket Game 118-in-1 / Game Computer 118-in-1", MACHINE_NOT_WORKING ) // it is unclear if dphh8633 refers to the case style, rather than the software, as the dphh8630 set was also noted as previously being found in an 8633 unit -CONS( 201?, dphh8633, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "", "Digital Pocket Hand Held System 268-in-1 - Model 8633", MACHINE_NOT_WORKING ) +CONS( 201?, dphh8633, 0, 0, bbl380_menuprot, bbl380_prot, bbl380_state, empty_init, "", "Digital Pocket Hand Held System 268-in-1 - Model 8633", MACHINE_NOT_WORKING ) // also has the 0xE4 XOR, also doesn't currently boot, could be yet another internal ROM CONS( 2021, toumapet, 0, 0, bbl380, bbl380, bbl380_state, empty_init, "Shenzhen Shiji New Technology", "Tou ma Pet", MACHINE_NOT_WORKING )