From 166311e24ebd7514299a81a633fefd0eb43deae0 Mon Sep 17 00:00:00 2001
From: mamehaze <140764005+mamehaze@users.noreply.github.com>
Date: Wed, 19 Jun 2024 18:10:49 +0100
Subject: Benesse work / Challenge Gear (#12487)
New NOT WORKING Machine
----------
Challenge Gear [TeamEurope, SSJ, Youkal3]
New NOT WORKING Software List Entries
---------
challenge_gear_cart.xml:
Challenge 6 Years [TeamEurope, SSJ, Youkal3]
- moved pockchal.cpp and the new driver to a benesse folder, as benesse had many more products
- created a separate machine for the Pocket Challenge v2, the BIOS isn't dumped, but carts aren't physically compatible with a Wonderswan even if the software is. Makes more sense to have a driver with the borrowed Wonderswan BIOS marked as BAD_DUMP than hiding everything behind the Wonderswan itself.
---
hash/challenge_gear_cart.xml | 60 +++++++++++++++
src/mame/bandai/wswan.cpp | 41 +++++++++--
src/mame/benesse/challenge_gear.cpp | 131 +++++++++++++++++++++++++++++++++
src/mame/benesse/pockchal.cpp | 141 ++++++++++++++++++++++++++++++++++++
src/mame/mame.lst | 10 ++-
src/mame/skeleton/pockchal.cpp | 141 ------------------------------------
6 files changed, 375 insertions(+), 149 deletions(-)
create mode 100644 hash/challenge_gear_cart.xml
create mode 100644 src/mame/benesse/challenge_gear.cpp
create mode 100644 src/mame/benesse/pockchal.cpp
delete mode 100644 src/mame/skeleton/pockchal.cpp
diff --git a/hash/challenge_gear_cart.xml b/hash/challenge_gear_cart.xml
new file mode 100644
index 00000000000..69a9663cca4
--- /dev/null
+++ b/hash/challenge_gear_cart.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+ Challenge 6 Years
+ 199?
+ Benesse Corporation
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mame/bandai/wswan.cpp b/src/mame/bandai/wswan.cpp
index 9d63cc26a06..4fb5fe4ae2a 100644
--- a/src/mame/bandai/wswan.cpp
+++ b/src/mame/bandai/wswan.cpp
@@ -12,6 +12,8 @@
Based on the WStech documentation by Judge and Dox.
+ These systems were developed by Koto Laboratory
+
Usage:
Keep START button pressed during startup (or reset) to enter the internal
configuration menu.
@@ -63,8 +65,11 @@ public:
{ }
void wswan(machine_config &config);
+ void pockchv2(machine_config &config);
protected:
+ void wswan_base(machine_config &config);
+
// Interrupt flags
static constexpr u8 WSWAN_IFLAG_STX = 0x01;
static constexpr u8 WSWAN_IFLAG_KEY = 0x02;
@@ -258,7 +263,7 @@ static void wswan_cart(device_slot_interface &device)
}
-void wswan_state::wswan(machine_config &config)
+void wswan_state::wswan_base(machine_config &config)
{
// Basic machine hardware
V30MZ(config, m_maincpu, X1 / 4);
@@ -298,14 +303,27 @@ void wswan_state::wswan(machine_config &config)
// cartridge
WS_CART_SLOT(config, m_cart, X1 / 32, wswan_cart, nullptr);
+
+}
+
+void wswan_state::wswan(machine_config &config)
+{
+ wswan_base(config);
+
// software lists
SOFTWARE_LIST(config, "cart_list").set_original("wswan");
SOFTWARE_LIST(config, "wsc_list").set_compatible("wscolor");
+}
+
+// while the pc2 software is compatible with a Wonderswan, the physical cartridges are not
+void wswan_state::pockchv2(machine_config &config)
+{
+ wswan_base(config);
+ // software lists
SOFTWARE_LIST(config, "pc2_list").set_compatible("pockchalv2");
}
-
void wscolor_state::wscolor(machine_config &config)
{
wswan(config);
@@ -982,11 +1000,24 @@ ROM_START(wscolor)
ROM_LOAD("internal_eeprom.wsc", 0x000, 0x800, BAD_DUMP CRC(ca11afc9) SHA1(0951845f01f83bee497268a63b5fb7baccfeff7c))
ROM_END
+// this currently uses the wswan internal ROMs, the real ones should be different
+ROM_START(pockchv2)
+ ROM_REGION(0x1000, "maincpu", 0)
+ ROM_LOAD("boot.rom", 0x0000, 0x1000, BAD_DUMP CRC(7f35f890) SHA1(4015bcacea76bb0b5bbdb13c5358f7e1abb986a1))
+
+ ROM_REGION(0x80, "nvram", 0)
+ // Need a dump from an original new unit
+ // Empty file containing just the name 'WONDERSAN'
+ ROM_LOAD("internal_eeprom.ws", 0x00, 0x80, BAD_DUMP CRC(b1dff316) SHA1(7b76c3d59c9add9501f95e8bfc34427773fcbd28))
+ROM_END
+
// SwanCrystal has the name 'SWANCRYSTAL' (from Youtube videos)
} // anonymous namespace
-// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME
-CONS( 1999, wswan, 0, 0, wswan, wswan, wswan_state, empty_init, "Bandai", "WonderSwan", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-CONS( 2000, wscolor, wswan, 0, wscolor, wswan, wscolor_state, empty_init, "Bandai", "WonderSwan Color", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME
+CONS( 1999, wswan, 0, 0, wswan, wswan, wswan_state, empty_init, "Bandai", "WonderSwan", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+CONS( 2000, wscolor, wswan, 0, wscolor, wswan, wscolor_state, empty_init, "Bandai", "WonderSwan Color", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+
+CONS( 2002, pockchv2, wswan, 0, pockchv2, wswan, wswan_state, empty_init, "Benesse Corporation", "Pocket Challenge V2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/benesse/challenge_gear.cpp b/src/mame/benesse/challenge_gear.cpp
new file mode 100644
index 00000000000..d8688d0db62
--- /dev/null
+++ b/src/mame/benesse/challenge_gear.cpp
@@ -0,0 +1,131 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#include "emu.h"
+
+//#include "cpu/olms66k/nx8.h"
+
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+#include "emupal.h"
+#include "screen.h"
+#include "softlist_dev.h"
+
+/*
+
+TSOP32 Maskrom:
+The pinout matches nearly the 29LV040 (TSOP32) flashrom. It has no WE# and Pin 07 and 09 are swapped.
+
+ --------
+A11 --|01 32|-- OE#
+A09 --|02 31|-- A10
+A08 --|03 30|-- CE#
+A13 --|04 29|-- Q07
+A14 --|05 28|-- Q06
+A17 --|06 27|-- Q05
+A18 --|07 26|-- Q04
+VCC --|08 25|-- Q03
+NC --|09 24|-- GND
+A16 --|10 23|-- Q02
+A15 --|11 22|-- Q01
+A12 --|12 21|-- Q00
+A07 --|13 20|-- A00
+A06 --|14 19|-- A01
+A05 --|15 18|-- A02
+A04 --|16 17|-- A03
+ --------
+
+*/
+
+namespace {
+
+class challenge_gear_state : public driver_device
+{
+public:
+ challenge_gear_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ //, m_maincpu(*this, "maincpu")
+ , m_cart(*this, "cartslot")
+ { }
+
+ void challenge_gear(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+private:
+ uint32_t screen_update_challenge_gear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
+ void challenge_gear_map(address_map &map);
+
+ //required_device m_maincpu;
+ required_device m_cart;
+ uint32_t m_rom_size = 0;
+};
+
+
+DEVICE_IMAGE_LOAD_MEMBER( challenge_gear_state::cart_load )
+{
+ m_rom_size = m_cart->common_get_size("rom");
+ m_cart->rom_alloc(m_rom_size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
+ m_cart->common_load_rom(m_cart->get_rom_base(), m_rom_size, "rom");
+
+ return std::make_pair(std::error_condition(), std::string());
+}
+
+void challenge_gear_state::video_start()
+{
+}
+
+uint32_t challenge_gear_state::screen_update_challenge_gear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+static INPUT_PORTS_START( challenge_gear )
+INPUT_PORTS_END
+
+void challenge_gear_state::machine_start()
+{
+}
+
+void challenge_gear_state::machine_reset()
+{
+}
+
+
+void challenge_gear_state::challenge_gear(machine_config &config)
+{
+ /* basic machine hardware */
+ // Oki nX-8/500S
+
+ /* video hardware - this is incorrect, but it does have a screen */
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-1, 16, 256-16-1);
+ screen.set_screen_update(FUNC(challenge_gear_state::screen_update_challenge_gear));
+
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "challenge_gear_cart", "bin"));
+ cartslot.set_device_load(FUNC(challenge_gear_state::cart_load));
+
+ SOFTWARE_LIST(config, "cg_list").set_compatible("challenge_gear_cart");
+}
+
+
+ROM_START( chalgear )
+ ROM_REGION(0x80000, "maincpu", 0)
+ ROM_SYSTEM_BIOS(0, "rom501", "ms040501") // yellow function buttons (blue text), orange number buttons (blue text), patterned purple screen surround
+ ROMX_LOAD("ms040501.ic2", 0x0000, 0x80000, CRC(fe8918ca) SHA1(e1e560d0bf811f3f8a6c122fbff065da4a30a9b6), ROM_BIOS(0))
+
+ ROM_SYSTEM_BIOS(1, "rom402", "ms040402") // blue function buttons (yellow text), yellow numbers buttons (blue text), plain black screen surrounded
+ ROMX_LOAD("ms040402.ic2", 0x0000, 0x80000, CRC(25aa24b2) SHA1(72c3f304289da531165d83c63f2c3632985428ba), ROM_BIOS(1))
+ROM_END
+
+} // Anonymous namespace
+
+CONS( 199?, chalgear, 0, 0, challenge_gear, challenge_gear, challenge_gear_state, empty_init, "Benesse Corporation", "Challenge Gear (Japan)", MACHINE_IS_SKELETON )
diff --git a/src/mame/benesse/pockchal.cpp b/src/mame/benesse/pockchal.cpp
new file mode 100644
index 00000000000..4ae5f46d7a1
--- /dev/null
+++ b/src/mame/benesse/pockchal.cpp
@@ -0,0 +1,141 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/*********************************************************************
+
+Similar to https://www.youtube.com/watch?v=FmyR-kL-QWo
+
+base unit contains
+
+1x Toshiba TMP90C845AF
+
+1x SANYO LC21003 BLA5
+
+3x SEC C941A KS0108B
+
+1x Toshiba T9842B
+
+(system has no bios ROM)
+
+Cart sizes: 1MB, 2MB, 4MB
+
+********************************************************************/
+
+#include "emu.h"
+
+#include "cpu/tlcs90/tlcs90.h"
+
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+#include "emupal.h"
+#include "screen.h"
+#include "softlist_dev.h"
+
+
+namespace {
+
+class pockchalv1_state : public driver_device
+{
+public:
+ pockchalv1_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_cart(*this, "cartslot")
+ { }
+
+ void pockchalv1(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+private:
+ uint32_t screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
+ void pockchalv1_map(address_map &map);
+
+ required_device m_maincpu;
+ required_device m_cart;
+ uint32_t m_rom_size = 0;
+};
+
+
+DEVICE_IMAGE_LOAD_MEMBER( pockchalv1_state::cart_load )
+{
+ m_rom_size = m_cart->common_get_size("rom");
+ m_cart->rom_alloc(m_rom_size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
+ m_cart->common_load_rom(m_cart->get_rom_base(), m_rom_size, "rom");
+
+ return std::make_pair(std::error_condition(), std::string());
+}
+
+void pockchalv1_state::video_start()
+{
+}
+
+uint32_t pockchalv1_state::screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+
+void pockchalv1_state::pockchalv1_map(address_map &map)
+{
+ map(0xc000, 0xffff).ram();
+}
+
+
+static INPUT_PORTS_START( pockchalv1 )
+INPUT_PORTS_END
+
+
+
+void pockchalv1_state::machine_start()
+{
+ address_space &space = m_maincpu->space(AS_PROGRAM);
+ if (m_cart->exists())
+ space.install_read_handler(0x0000, 0x7fff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom)));
+}
+
+void pockchalv1_state::machine_reset()
+{
+}
+
+
+void pockchalv1_state::pockchalv1(machine_config &config)
+{
+ /* basic machine hardware */
+ TMP90845(config, m_maincpu, 8000000); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &pockchalv1_state::pockchalv1_map);
+// m_maincpu->->set_vblank_int("screen", FUNC(pockchalv1_state::irq0_line_hold));
+
+ // wrong, it's a b&w / greyscale thing
+ PALETTE(config, "palette").set_format(palette_device::xRGB_444, 0x100).set_endianness(ENDIANNESS_BIG);
+
+ /* video hardware */
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-1, 16, 256-16-1);
+ screen.set_screen_update(FUNC(pockchalv1_state::screen_update_pockchalv1));
+ screen.set_palette("palette");
+
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "pockchalw_cart", "bin"));
+ cartslot.set_device_load(FUNC(pockchalv1_state::cart_load));
+ cartslot.set_must_be_loaded(true);
+
+ SOFTWARE_LIST(config, "pc1_list").set_compatible("pockchalw");
+}
+
+
+
+ROM_START( pockchal )
+ROM_END
+
+} // Anonymous namespace
+
+
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+CONS( 199?, pockchal, 0, 0, pockchalv1, pockchalv1, pockchalv1_state, empty_init, "Benesse Corporation", "Pocket Challenge W (Japan)", MACHINE_IS_SKELETON )
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 6d47d7e0509..ff842645bf0 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -2371,6 +2371,7 @@ sv8000 // Super Vision 8000
tama // Bandai
@source:bandai/wswan.cpp
+pockchv2 // Benesse Pocket Challenge V2
wscolor // Bandai WonderSwan Color Handheld
wswan // Bandai WonderSwan Handheld
@@ -9152,6 +9153,12 @@ bebox2 // BeBox Dual603-133
@source:beehive/microb.cpp
dm3270 //
+@source:benesse/challenge_gear.cpp
+chalgear
+
+@source:benesse/pockchal.cpp
+pockchal
+
@source:bfm/bfcobra.cpp
beeline // 1991 BFM
brkball // 1994 BFM / ATOD
@@ -42178,9 +42185,6 @@ plan80 //
@source:skeleton/pm68k.cpp
pm68k //
-@source:skeleton/pockchal.cpp
-pockchal
-
@source:skeleton/proteus3.cpp
proteus3 //
diff --git a/src/mame/skeleton/pockchal.cpp b/src/mame/skeleton/pockchal.cpp
deleted file mode 100644
index 8a910ae86e7..00000000000
--- a/src/mame/skeleton/pockchal.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:David Haywood
-/*********************************************************************
-
-Similar to https://www.youtube.com/watch?v=FmyR-kL-QWo
-
-base unit contains
-
-1x Toshiba TMP90C845AF
-
-1x SANYO LC21003 BLA5
-
-3x SEC C941A KS0108B
-
-1x Toshiba T9842B
-
-(system has no bios ROM)
-
-Cart sizes: 1MB, 2MB, 4MB
-
-********************************************************************/
-
-#include "emu.h"
-
-#include "cpu/tlcs90/tlcs90.h"
-
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
-
-#include "emupal.h"
-#include "screen.h"
-#include "softlist_dev.h"
-
-
-namespace {
-
-class pockchalv1_state : public driver_device
-{
-public:
- pockchalv1_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , m_maincpu(*this, "maincpu")
- , m_cart(*this, "cartslot")
- { }
-
- void pockchalv1(machine_config &config);
-
-protected:
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
-
-private:
- uint32_t screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
- void pockchalv1_map(address_map &map);
-
- required_device m_maincpu;
- required_device m_cart;
- uint32_t m_rom_size = 0;
-};
-
-
-DEVICE_IMAGE_LOAD_MEMBER( pockchalv1_state::cart_load )
-{
- m_rom_size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(m_rom_size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), m_rom_size, "rom");
-
- return std::make_pair(std::error_condition(), std::string());
-}
-
-void pockchalv1_state::video_start()
-{
-}
-
-uint32_t pockchalv1_state::screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- return 0;
-}
-
-
-void pockchalv1_state::pockchalv1_map(address_map &map)
-{
- map(0xc000, 0xffff).ram();
-}
-
-
-static INPUT_PORTS_START( pockchalv1 )
-INPUT_PORTS_END
-
-
-
-void pockchalv1_state::machine_start()
-{
- address_space &space = m_maincpu->space(AS_PROGRAM);
- if (m_cart->exists())
- space.install_read_handler(0x0000, 0x7fff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom)));
-}
-
-void pockchalv1_state::machine_reset()
-{
-}
-
-
-void pockchalv1_state::pockchalv1(machine_config &config)
-{
- /* basic machine hardware */
- TMP90845(config, m_maincpu, 8000000); /* ? MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &pockchalv1_state::pockchalv1_map);
-// m_maincpu->->set_vblank_int("screen", FUNC(pockchalv1_state::irq0_line_hold));
-
- // wrong, it's a b&w / greyscale thing
- PALETTE(config, "palette").set_format(palette_device::xRGB_444, 0x100).set_endianness(ENDIANNESS_BIG);
-
- /* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size(256, 256);
- screen.set_visarea(0, 256-1, 16, 256-16-1);
- screen.set_screen_update(FUNC(pockchalv1_state::screen_update_pockchalv1));
- screen.set_palette("palette");
-
- generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "pockchalw_cart", "bin"));
- cartslot.set_device_load(FUNC(pockchalv1_state::cart_load));
- cartslot.set_must_be_loaded(true);
-
- SOFTWARE_LIST(config, "pc1_list").set_compatible("pockchalw");
-}
-
-
-
-ROM_START( pockchal )
-ROM_END
-
-} // Anonymous namespace
-
-
-// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-CONS( 199?, pockchal, 0, 0, pockchalv1, pockchalv1, pockchalv1_state, empty_init, "Benesse Corporation", "Pocket Challenge W (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
--
cgit v1.2.3