Skip to content

added first pass of a new internal ROM to some st2302u_bbl_spi.cpp sets, move to handheld folder #14003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ class bbl380_state : public driver_device
{ }

void bbl380(machine_config &config);
void bbl380_menuprot(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;
Expand Down Expand Up @@ -260,32 +264,40 @@ 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(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);
Expand All @@ -302,108 +314,125 @@ 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);
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) \
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, CRC(32d96794) SHA1(9d7e3e284f1656d8b2f7dae754cab1f82b3a1d61))


// 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) )
Expand All @@ -421,26 +450,28 @@ 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, "<unknown>", "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, "<unknown>", "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

// 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.
// 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( 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_menuprot, bbl380_prot, bbl380_state, empty_init, "<unknown>", "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 )
// 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, "<unknown>", "Digital Pocket Hand Held System 268-in-1 - Model 8633", MACHINE_NOT_WORKING )
40 changes: 20 additions & 20 deletions src/mame/mame.lst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
Loading