From 42072e8e729202fd09cec0ada25ddcc571302ab7 Mon Sep 17 00:00:00 2001
From: mamehaze <140764005+mamehaze@users.noreply.github.com>
Date: Thu, 18 Jan 2024 19:00:52 +0000
Subject: tvgames/xavix_2002.cpp: Added a branded variant of the Epoch Super
TV-PC, and a sofware list. (#11935)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
New clones marked not working
-----------------
Epoch / SSD Company LTD Super TV-PC [TeamEurope, QUFB]
New software list items marked not working (super_tv_pc_cart.xml)
-------------
Detective Conan: Suiri Adventure [TeamEurope, QUFB]
Doraemon Chō Nōryoku Game Collection [TeamEurope, QUFB]
Double Mouse Party [TeamEurope, QUFB]
ECC Junior: Ason de Eigo dekichatta! [TeamEurope, QUFB]
Tottoko Hamtaro Ham Ham Ongaku Paradaichu! [TeamEurope, QUFB]
Pet Keitai Link [TeamEurope, QUFB]
---
hash/super_tv_pc_cart.xml | 88 +++++++++++++++++++++++++++++++++++++++++
src/mame/mame.lst | 17 ++++----
src/mame/tvgames/xavix_2002.cpp | 88 ++++++++++++++++++++++++++++++++++-------
src/mame/tvgames/xavix_2002.h | 16 ++++++--
4 files changed, 183 insertions(+), 26 deletions(-)
create mode 100644 hash/super_tv_pc_cart.xml
diff --git a/hash/super_tv_pc_cart.xml b/hash/super_tv_pc_cart.xml
new file mode 100644
index 00000000000..6f26ef37967
--- /dev/null
+++ b/hash/super_tv_pc_cart.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+ Tottoko Hamtaro Ham Ham Ongaku Paradaichu!
+ 2004
+ Epoch
+
+
+
+
+
+
+
+
+
+ Doraemon Chō Nōryoku Game Collection
+ 2004
+ Epoch
+
+
+
+
+
+
+
+
+
+ Double Mouse Party
+ 2004
+ Epoch
+
+
+
+
+
+
+
+
+
+ Detective Conan: Suiri Adventure
+ 2005
+ Epoch
+
+
+
+
+
+
+
+
+
+ ECC Junior: Ason de Eigo dekichatta!
+ 2005
+ Epoch
+
+
+
+
+
+
+
+
+
+
+
+ Pet Keitai Link
+ 2006
+ Epoch
+
+
+
+
+
+
+
+
+
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 66ddf6eb0fb..16c007b29fd 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -45108,22 +45108,23 @@ drgqst //
ban_onep //
@source:tvgames/xavix_2002.cpp
-suprpctv
-udance
-mrangbat
+domdance //
+domfitch //
+domfitex //
+domstepc //
epo_tfit
+mrangbat
+suprtvpc
+suprtvpchk
tmy_thom //
-xavtenni //
+udance
xavbaseb //
xavbassf //
xavbowl //
xavbox //
xavjmat //
xavmusic //
-domfitex //
-domfitch //
-domdance //
-domstepc //
+xavtenni //
@source:ultimachine/rambo.cpp
metamaq2 // Metamaquina 2 desktop 3d printer
diff --git a/src/mame/tvgames/xavix_2002.cpp b/src/mame/tvgames/xavix_2002.cpp
index 43661581063..e95b90a84d7 100644
--- a/src/mame/tvgames/xavix_2002.cpp
+++ b/src/mame/tvgames/xavix_2002.cpp
@@ -346,13 +346,60 @@ void xavix_i2c_jmat_state::xavix2002_i2c_jmat(machine_config &config)
m_xavix2002io->write_2_callback().set(FUNC(xavix_i2c_jmat_state::write_extended_io2));
}
-void xavix2002_superpttv_state::xavix2002_superpctv(machine_config& config)
+DEVICE_IMAGE_LOAD_MEMBER(xavix2002_super_tv_pc_state::cart_load)
+{
+ u64 length;
+ memory_region *cart_region;
+ if (m_cart->loaded_through_softlist())
+ {
+ cart_region = m_cart->memregion("prg");
+ if (!cart_region)
+ return std::make_pair(image_error::BADSOFTWARE, "Software list item is missing 'prg' region");
+ length = cart_region->bytes();
+ }
+ else
+ {
+ length = m_cart->length();
+ }
+
+ if (!length)
+ return std::make_pair(image_error::INVALIDLENGTH, "Cartridges must not be empty");
+ else if (length > 0x40'0000)
+ return std::make_pair(image_error::INVALIDLENGTH, "Cartridges must be no larger than 4 MiB (0x400000 bytes)");
+ else if (length & (length - 1))
+ return std::make_pair(image_error::INVALIDLENGTH, "Cartridges size must be a power of two"); // to simplify copying into BIOS region
+
+ if (!m_cart->loaded_through_softlist())
+ {
+ cart_region = machine().memory().region_alloc(m_cart->subtag("prg"), length, 1, ENDIANNESS_LITTLE);
+ if (!cart_region)
+ return std::make_pair(std::errc::not_enough_memory, std::string());
+
+ if (m_cart->fread(cart_region->base(), length) != length)
+ return std::make_pair(std::errc::io_error, "Error reading cartridge file");
+ }
+
+ // driver requires ROM code to be in a memory region, so need to copy (can't install in address space)
+ memory_region *const bios_region = memregion("bios");
+ for (offs_t base = 0; base < 0x40'0000; base += length)
+ memcpy(bios_region->base() + base, cart_region->base(), length);
+
+ return std::make_pair(std::error_condition(), std::string());
+}
+
+void xavix2002_super_tv_pc_state::xavix2002_super_tv_pc(machine_config& config)
{
xavix2002(config);
- m_xavix2002io->read_0_callback().set(FUNC(xavix2002_superpttv_state::read_extended_io0));
- m_xavix2002io->read_1_callback().set(FUNC(xavix2002_superpttv_state::read_extended_io1));
- m_xavix2002io->read_2_callback().set(FUNC(xavix2002_superpttv_state::read_extended_io2));
+ m_xavix2002io->read_0_callback().set(FUNC(xavix2002_super_tv_pc_state::read_extended_io0));
+ m_xavix2002io->read_1_callback().set(FUNC(xavix2002_super_tv_pc_state::read_extended_io1));
+ m_xavix2002io->read_2_callback().set(FUNC(xavix2002_super_tv_pc_state::read_extended_io2));
+
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "super_tv_pc_cart");
+ m_cart->set_width(GENERIC_ROM8_WIDTH);
+ m_cart->set_device_load(FUNC(xavix2002_super_tv_pc_state::cart_load));
+
+ SOFTWARE_LIST(config, "cart_list").set_original("super_tv_pc_cart");
}
@@ -487,14 +534,6 @@ ROM_START( epo_tfit )
ROM_LOAD("tennisfitness.bin", 0x000000, 0x400000, CRC(cbf65bd2) SHA1(30b3da6f061b2dd91679db42a050f715901beb87) )
ROM_END
-ROM_START( suprpctv )
- ROM_REGION(0x800000, "bios", ROMREGION_ERASE00) // inverted line?
- ROM_LOAD("superpctv.bin", 0x200000, 0x200000, CRC(4a55a81c) SHA1(178b4b595a3aefc6d1c176031b436fc3312009e7) )
- ROM_CONTINUE(0x000000, 0x200000)
- ROM_CONTINUE(0x600000, 0x200000)
- ROM_CONTINUE(0x400000, 0x200000)
-ROM_END
-
ROM_START( udance )
ROM_REGION(0x800000, "bios", ROMREGION_ERASE00)
ROM_LOAD("udancerom0.bin", 0x000000, 0x800000, CRC(3066580a) SHA1(545257c75a892894faf386f4ab9a31967cdbe8ae) )
@@ -503,6 +542,22 @@ ROM_START( udance )
ROM_LOAD("udancerom1.bin", 0x000000, 0x800000, CRC(7dbaabde) SHA1(38c523dcdf8185465fc550fb9b0e8c7909f839be) )
ROM_END
+ROM_START( suprtvpc )
+ ROM_REGION(0x800000, "bios", ROMREGION_ERASE00) // inverted line?
+ ROM_LOAD("supertvpc_dogs.u4", 0x200000, 0x200000, CRC(ab326e6d) SHA1(e22205f6ff4c8cc46538d78e27535be63acea42a) )
+ ROM_CONTINUE(0x000000, 0x200000)
+ ROM_CONTINUE(0x600000, 0x200000)
+ ROM_CONTINUE(0x400000, 0x200000)
+ROM_END
+
+ROM_START( suprtvpchk )
+ ROM_REGION(0x800000, "bios", ROMREGION_ERASE00) // inverted line?
+ ROM_LOAD("superpctv.bin", 0x200000, 0x200000, CRC(4a55a81c) SHA1(178b4b595a3aefc6d1c176031b436fc3312009e7) )
+ ROM_CONTINUE(0x000000, 0x200000)
+ ROM_CONTINUE(0x600000, 0x200000)
+ ROM_CONTINUE(0x400000, 0x200000)
+ROM_END
+
CONS( 2004, xavtenni, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
CONS( 2004, xavbaseb, 0, 0, xavix2002_i2c_24c08, xavix_i2c, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Baseball (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
@@ -545,7 +600,10 @@ CONS( 2005, tmy_thom, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state,
// has HT24LC16
CONS( 2008, udance, 0, 0, xavix2002, xavix, xavix_state, init_xavix, "Tiger / SSD Company LTD", "U-Dance", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-// this has RAM in the usual ROM space, needs handling, also has Atmel 24LC64.
-CONS( 200?, suprpctv, 0, 0, xavix2002_superpctv, xavix, xavix2002_superpttv_state, init_xavix, "Epoch / SSD Company LTD", "Super PC TV (Epoch)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-
+// these have RAM in the usual ROM space (still needs handling) & also have an Atmel 24LC64,
+// this one (pet themed) boots to the desktop (as do the 'hamtaro' 'eccjr' cartridges)
+CONS( 2004, suprtvpc, 0, 0, xavix2002_super_tv_pc, xavix, xavix2002_super_tv_pc_state, init_xavix, "Epoch / SSD Company LTD", "Super TV-PC", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+// hangs after 'loading' sequence
+CONS( 200?, suprtvpchk, suprtvpc, 0, xavix2002_super_tv_pc, xavix, xavix2002_super_tv_pc_state, init_xavix, "Epoch / SSD Company LTD", "Super TV-PC - Hello Kitty", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+// Hamtaro and Doraemon themed Super TV PC units also exist, likely with their own internal ROMs
diff --git a/src/mame/tvgames/xavix_2002.h b/src/mame/tvgames/xavix_2002.h
index c60fe55373e..df4cdace86e 100644
--- a/src/mame/tvgames/xavix_2002.h
+++ b/src/mame/tvgames/xavix_2002.h
@@ -5,6 +5,11 @@
#include "xavix_2000.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+#include "softlist_dev.h"
+
class xavix_i2c_jmat_state : public xavix_i2c_state
{
public:
@@ -23,14 +28,15 @@ private:
void write_extended_io2(uint8_t data);
};
-class xavix2002_superpttv_state : public xavix_state
+class xavix2002_super_tv_pc_state : public xavix_state
{
public:
- xavix2002_superpttv_state(const machine_config &mconfig, device_type type, const char *tag)
+ xavix2002_super_tv_pc_state(const machine_config &mconfig, device_type type, const char *tag)
: xavix_state(mconfig, type, tag)
+ , m_cart(*this, "cartslot")
{ }
- void xavix2002_superpctv(machine_config &config);
+ void xavix2002_super_tv_pc(machine_config &config);
private:
uint8_t read_extended_io0() { return 0x00; }
@@ -39,6 +45,10 @@ private:
//void write_extended_io0(uint8_t data);
//void write_extended_io1(uint8_t data);
//void write_extended_io2(uint8_t data);
+
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
+
+ required_device m_cart;
};
class xavix_i2c_bowl_state : public xavix_i2c_state
--
cgit v1.2.3