summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <mamehaze@gmail.com>2018-12-29 02:03:40 +0000
committer ajrhacker <ajrhacker@users.noreply.github.com>2018-12-28 21:03:40 -0500
commit35ff1ea40bae75370e3e952212a0151ad0370d2a (patch)
tree597d6003df80306d2a5af5e7e9366670cc078499
parent7b8ae74be1f9fbae2cfc6a34f123830447672f25 (diff)
XaviX work (new softlist entries etc. promote ddrfammt, popira, nostalgia, card night etc. to working) (#4439)
* XaviX work new Software List items [Sean Riddle, David Haywood] ekara_japan_d:dc0002 BAT Volume 6 (Japan) (DC0002-BAT) ekara_japan_d:dc0005 TV Pop Volume 9 (Japan) (DC0005-TPJ) ekara_japan_p:pc0001 BHT Volume 4 (Japan) (PC0001-BHT) ekara_japan_p:pc0003 ENB Volume 1 (Japan) (PC0003-ENB) ekara_japan_g:gc0001 BAT Volume 1 (Japan) (GC0001-BAT) ekara_japan_g:gc0016 TV Pop Volume 5 (Japan) (GC0016-TPJ) ekara_japan_web:ekaraweb12 e-kara Web cartridge 12M (blank) (Japan) new clones e-kara (US?, NTSC, set 2) [Sean Riddle] enable support for 'p' type cartridges for use with ddrfammt [David Haywood] various documentation improvements [Sean Riddle, David Haywood] (there are also 3 bad dumps, currently commented out, will replace later) * improved filenames (nw) * for later (nw) * checkpoint (nw) * seeprom stuff (nw) * (nw) * correctly saves, does not correctly reload, also promote popira and ddrfammt to working * new Software List entries [Sean Riddle, David Haywood] ekara_japan:ec0001 J-Pop Mix Volume 1 (Japan) (EC0001-JPM) ekara_japan:ec0032 ANM Volume 2 (Japan) (EC0032-ANM) ekara_japan:ec0037 ENK Volume 4 (Japan) (EC0037-ENK) ekara_japan:ec0046 J-Pop Mix Volume 20 (Japan) (EC0046-JPM) ekara_japan:ec0005 J-Pop Mix Volume 5 (Japan) (EC0005-JPM) ekara_japan:ec0007 1976-78 Volume 1 (Japan) (EC0007-G76) ekara_japan:ec0079 ETZ (Japan) (EC0079-ETZ) ekara_japan:ec0082 Matthew's Best Hit Selection (Japan) (EC0082-MBH) ekara_japan:ec0009 ANM Volume 1 (Japan) (EC0009-ANM) ekara_japan_en:en3 EN-3 (Japan) ekara_japan_m:mc0013 KSM Mini Volume 5 (Japan) (MC0005-KSM) ekara_japan_s:sc0012 SAI (series 3) Volume 3 (Japan) (SC0012-SAI) ekara_japan_s:sc0004 SAI (series 1) Volume 1 (Japan) (SC0004-SAI) ekara_japan_g:gc0002 BHT Volume 1 (Japan) (GC0002-BHT) ekara_japan_g:gc0003 BAT Volume 2 (Japan) (GC0003-BAT) ekara_japan_g:gc0004 BHT Volume 2 (Japan) (GC0004-BHT) ekara_japan_p:pc0004 BHT Volume 7 (Japan) (PC0004-BHT) * (nw) * notes (nw) * (nw) * this register seems to be r/w (nw) * fix crash in popira when pausing (requires register readback) * save state stuff (nw) * give excite fishing some inputs while I'm making misc minor changes (nw) * also promote the Nostalgia games, and Card Night, as they have simple digital inputs and seem to work * (nw) * copy+paste modernization * 2 more dumps (nw) * doesn't seem to have an seeprom (nw) * preliminary taikodp controls (nw) * P4 uses SEEPROM (nw) * rejig some bases (nw)
-rw-r--r--hash/ekara_japan.xml393
-rw-r--r--hash/ekara_japan_d.xml53
-rw-r--r--hash/ekara_japan_en.xml32
-rw-r--r--hash/ekara_japan_g.xml131
-rw-r--r--hash/ekara_japan_gc.xml58
-rw-r--r--hash/ekara_japan_m.xml51
-rw-r--r--hash/ekara_japan_p.xml55
-rw-r--r--hash/ekara_japan_s.xml143
-rw-r--r--hash/ekara_japan_sp.xml9
-rw-r--r--hash/ekara_japan_web.xml31
-rw-r--r--scripts/src/bus.lua13
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/devices/bus/ekara/rom.cpp126
-rw-r--r--src/devices/bus/ekara/rom.h90
-rw-r--r--src/devices/bus/ekara/slot.cpp239
-rw-r--r--src/devices/bus/ekara/slot.h120
-rw-r--r--src/mame/audio/xavix.cpp8
-rw-r--r--src/mame/drivers/xavix.cpp247
-rw-r--r--src/mame/includes/xavix.h287
-rw-r--r--src/mame/machine/xavix.cpp130
-rw-r--r--src/mame/mame.lst1
21 files changed, 1766 insertions, 452 deletions
diff --git a/hash/ekara_japan.xml b/hash/ekara_japan.xml
index bf7bcea195e..39142bbaf37 100644
--- a/hash/ekara_japan.xml
+++ b/hash/ekara_japan.xml
@@ -1,56 +1,74 @@
<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-<softwarelist name="ekara_japan" description="Takara e-kara (Japan) cartridges">
+<softwarelist name="ekara_japan" description="Takara e-kara (Japan) ECxxxx- series cartridges">
<!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit -->
<!--
- Each region has it's own set of cartridges (at least US, UK/EU and Japan)
- The Japanese ones appear to have a number of different genres each with their own numbering
-
- There are some carts which are meant to be compatible with both Japanese e-Kara units and
- several other systems.
-
- The genres in the Japanese games are represented by the code after the EC number
- ECxxxx-JPM = J-Pop Mix
- ECxxxx-ATS = Artist Selection (all songs by a single artist)
- ECxxxx-KID = Kid's Mix
- ECxxxx-ENK = unknown
- ECxxxx-BSC = Graduation Encouragement
- ECxxxx-G79 = 1979-1981 collection
-
- Some Japanese carts have a number starting with DC (D-x on case)
- DCxxxx-BHT = unknown (best artists?)
-
- Some Japanese carts have a number starting with GC (G-x on case) (see ekara_japan_gc.xml)
- GCxxxx-BHT = unknown (best artists?)
-
- Some Japanese carts have a number starting with SC (S-x on case)
- SCxxxx-SAI = unknown
- SCxxxx-HKW = unknown
-
- (there are more codes, see lists below)
-
-
- In all lists below
- * = dumped
+ Japanese e-kara carts appear to have a number of different genres split across various
+ cart sub-series (often supporting different hw types) special releases etc.
+
+ This file is for the base set (number on case, ECxxxx-xxx part numbers)
+
+ The genres in the Japanese games are represented by the code after the EC/DC/MC/GC/PC etc. number
+ JPM = J-Pop Mix
+ ATS = Artist Selection (all songs by a single artist)
+ KID = Kid's Mix
+ ENK = unknown
+ BSC = Graduation Encouragement
+ G73 = 1973-1975 collection
+ G76 = 1976-1978 collection
+ G79 = 1979-1981 collection
+ G82 = 1982-1984 collection
+ BHT = (Best Artists?)
+ BAT = (Artist Selection?) but not the same series as ATS
+ SAI = (used with S series carts)
+ HKW = (used with S series carts)
+ ATM = unknown (used by the M series 'mini' carts)
+ TPJ = TV Pop
+ MIN = unknown
+
+ Some Japanese carts have a number starting with S (S-x on case, SCxxxx-xxx part numbers) (see ekara_japan_s.xml) (for e-kara - custom presentation)
+ M (M-x on case, MCxxxx-xxx part numbers) (see ekara_japan_m.xml) (for e-kara - custom presentation)
+ EN (EN-X on case, no part numbers) (see ekara_japan_en.xml) (for e-kara - custom presentation) (check other compatibility)
+ G (G-x on case, GCxxxx-xxx part numbers) (see ekara_japan_g.xml) (for e-kara, Popira / 2)
+ P (P-x on case, PCxxxx-xxx part numbers) (see ekara_japan_p.xml) (for e-kara, Popira / 2, DDR Family Mat)
+ D (D-x on case, DCxxxx-xxx part numbers) (see ekara_japan_d.xml) (for e-kara, Popira / 2, Taiko De Popira)
+ SP (SP-x on case, no part numbers) (see ekara_japan_sp.xml) (for e-kara, Popira / 2, Taiko de Popira, Jumping Popira)
+
+ these exist but haven't got any
+ Some Japanese carts have a number starting with JP (for Jumping Popira Only?)
+ A (for Pichi Pichi Pitch Only?)
+ KE (for Kids Lyric book device Only?)
+ KD (for e-kara?)
+
+ (there are others, need to document them)
+
+
+ There are also e-kara Web cartridges that were meant to be programmed using a special unit connected to a PC using the defunct e-kara web service (see ekara_japan_web.xml)
+
+ Genres can cross multiple cart types, eg. TV Pop 1,3,4,5,6 are in the 'G' series, while TV Pop 2 is in the 'P' series, and TV Pop 9 is in the 'D' series (where are 7,8?)
+
+ for non-Japanese carts see ekara_us.xml and ekara_pal.xml, the PAL ones are noteworthy for using a different timing system
+
***********************************************************************************
Japanese cart listing (by 'just number' code) (number on cartridge / box, EC in cart identifier code)
+ * = dumped
The EC number is printed on the left side of the cart label, as well as in the serial code
early carts don't have a number printed on the box, only the title, after a certain point a number was added (when?)
- .. EC0001-JPM J-Pop Mix Volume 1
+ .. *EC0001-JPM J-Pop Mix Volume 1
.. *EC0002-JPM J-Pop Mix Volume 2
.. *EC0003-JPM J-Pop Mix Volume 3
.. EC0004-JPM J-Pop Mix Volume 4
- .. EC0005-JPM J-Pop Mix Volume 5
+ .. *EC0005-JPM J-Pop Mix Volume 5
.. *EC0006-ENK ENK Volume 1
- .. EC0007-G76 1976-78 Volume 1
+ .. *EC0007-G76 1976-78 Volume 1
.. *EC0008-G79 1979-81 Volume 1
- .. EC0009- untranslated Volume 1
+ .. *EC0009-ANM ANM Volume 1
.. *EC0010-KID Kid's Mix Volume 1
.. EC0011-JPM J-Pop Mix Volume 6
@@ -76,12 +94,12 @@
30 EC0030-ENK ENK Volume 3
31 *EC0031-ATS Artist Selection Volume 4 - untranslated artist
- 32 EC0032- untranslated Volume 2 (sequel to EC0009)
+ 32 *EC0032-ANM ANM Volume 2
33 EC0033-JPM J-Pop Mix Volume 17
34 *EC0034-KID Kid's Mix Volume 3
35 *EC0035-ATS Artist Selection Volume 5 - Matsuda Seiko
36 *EC0036-ATS Artist Selection Volume 6 - KinKi Kids
- 37 EC0037-ENK ENK Volume 4
+ 37 *EC0037-ENK ENK Volume 4
38 EC0038-BSC Graduation Encouragement Volume 2
39 EC0039-ATS Artist Selection Volume 7 - B'z
@@ -91,7 +109,7 @@
43 EC0043-ENK ENK Volume 5
44 *EC0044-ATS Artist Selection Volume 9 - Every Little Thing
45 *EC0045-ATS Artist Selection Volume 10 - Mr. Children
- 46 EC0046-JPM J-Pop Mix Volume 20
+ 46 *EC0046-JPM J-Pop Mix Volume 20
47 EC0047- untranslated Volume 1
48 *EC0048-ENK ENK Volume 6
49 *EC0049-ATS Artist Selection Volume 11 - Judy and Mary
@@ -127,59 +145,18 @@
76 *EC0076-JPM J-Pop Mix Volume 39
77 EC0077-ATS Artist Selection Volume 15 - unknown artist (should be Vol 15? sales sheet lists 5?)
78 EC0078- (unknown)
- 79 EC0079- (unknown)
+ 79 *EC0079-ETZ ETZ (custom presentation etc.)
80 EC0080- (unknown)
81 EC0081-JPM J-Pop Mix Volume 42
+ 82 *EC0082-MBH Matthew's Best Hit Selection
+ 83
+ 84
+ 85 (seen in the wild)
(more? what's the highest regular number?)
***********************************************************************************
- Japanese cart listing (by M code) (M-x on cartridge / box, MC in cart identifier code)
-
- M-1 *MC0001-ATM Mini Volume 1
- M-2 MC0002-
- M-3 MC0003-
- M-4 MC0004- Mini Volume 4 (w-inds)
- M-5 MC0005-
- M-6 MC0006-
- M-7 MC0007-ATM Mini Volume 5
-
- (more? what's the M highest number?)
-
- ***********************************************************************************
-
- Japanese cart listing (by S code) (S-x on cartridge / box, SC in cart identifier code)
- TODO: what are the full titles for SAI and HWK
-
- S-1 SC0001- Hello Kitty Special
- S-2 SC0002- (unknown)
- S-3 SC0003- (unknown)
- S-4 SC0004- (unknown)
- S-5 *SC0005-SAI SAI Volume 1
- S-6 *SC0006-SAI SAI Volume 2
- S-7 SC0007- (unknown)
- S-8 SC0008- (unknown)
- S-9 *SC0009-SAI SAI Volume 3
- S-10 *SC0010-HWK HWK (untranslated)
- S-11 SC0011- (unknown)
- S-12 SC0012- (unknown)
- S-13 SC0013- (unknown)
- S-14 SC0014- (unknown)
- S-15 SC0015- (unknown)
- S-16 SC0016- (unknown)
- S-17 SC0017- (unknown)
- S-18 SC0018- (unknown) Volume 1
- S-19 *SC0019-SAI SAI Volume 6
- S-20 SC0020- (unknown) Volume 5
- S-21 *SC0021-SAI SAI Volume 7
- S-22 *SC0022-SAI SAI Volume 8
- S-23 SC0023- (unknown)
-
- (more? what's the S highest number?)
-
- ***********************************************************************************
-
Japanese cart listing (by KD code)
Seems to be for kids? not the same as KE series below or the -KID carts in the regular series
@@ -189,42 +166,6 @@
KD-02 (unknown)
************************************************************************************************************************************************************
- Everything below is for use with other units as well as e-kara
- ************************************************************************************************************************************************************
-
- Japanese cart listing (by D code) (D-x on cartridge / box, DC in cart identifier code)
-
- These are for use with 3/4 units
- 1. e-Kara
- 2. Drum
- 3. Yellow thing with 4 buttons on it (single player unit?)
- 4. Blue thing with 4 buttons on it (looks like the same as 3, but allows an additional green pad to connect for a 2nd player)
-
- note BAT and BHT aren't the same series
-
- D-1 DC0001- (unknown)
- D-2 DC0002-BAT BAT Volume 6?
- D-3 DC0003-BHT BHT (Best Artists?) Volume 9? (most other BHT carts are in G series, or P series)
-
- (more? what's the D highest number?)
-
- ***********************************************************************************
-
- Japanese cart listing (by P code) (for use on multiple devices, including DDR)
-
- These are for use with 3 different units
- 1. e-Kara
- 2. Blue thing with 4 buttons on it (see note in D series)
- 3. Konami DDR Family Mat
-
- P-1 BHT Volume 4 (Best Artists?) (1,2,3, 5 in G series)
- P-2 TV Pop Volume 2 (1,3,4 in G series)
- P-3 untranslated Volume 1
- P-4 untranslated Volume 7
-
- (more? what's the P highest number?)
-
- ************************************************************************************************************************************************************
Everything below might not work with a standard e-kara, requires different hardware even if cart form is the same
************************************************************************************************************************************************************
@@ -262,6 +203,17 @@
<!-- Japanese e-kara cartridges EC series -->
+ <software name="ec0001">
+ <description>J-Pop Mix Volume 1 (Japan) (EC0001-JPM)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0001-jpm.u1" size="0x100000" crc="f8f314dc" sha1="743b33c835def29dcf129a26ab4636d1eec177be" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0002">
<description>J-Pop Mix Volume 2 (Japan) (EC0002-JPM)</description>
<year>2000</year>
@@ -284,6 +236,17 @@
</part>
</software>
+ <software name="ec0005">
+ <description>J-Pop Mix Volume 5 (Japan) (EC0005-JPM)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0005-jpm.u1" size="0x100000" crc="023b36b9" sha1="5066a9a7a0004fbd048a7b42645e42d6133b9dc2" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0006">
<description>ENK Volume 1 (Japan) (EC0006-ENK)</description>
<year>2000</year>
@@ -295,6 +258,17 @@
</part>
</software>
+ <software name="ec0007">
+ <description>1976-78 Volume 1 (Japan) (EC0007-G76)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0007-g76.u1" size="0x100000" crc="c474f87c" sha1="1818ff5be084e6aca697cc8151a357b77947eb5e" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0008">
<description>1979-81 Volume 1 (Japan) (EC0008-G79)</description>
<year>2000</year>
@@ -306,6 +280,17 @@
</part>
</software>
+ <software name="ec0009">
+ <description>ANM Volume 1 (Japan) (EC0009-ANM)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0009-anm.u1" size="0x100000" crc="1dbbd209" sha1="b8ca02ed1a36aa9caa067db95377cda107b1046b" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0010">
<description>Kid's Mix Volume 1 (Japan) (EC0010-KID)</description>
<year>2000</year>
@@ -438,6 +423,17 @@
</part>
</software>
+ <software name="ec0032">
+ <description>ANM Volume 2 (Japan) (EC0032-ANM)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0032-anm.u1" size="0x100000" crc="6b46c0f8" sha1="c5d8cc10d89e5057b476d792509cabe333b0f497" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0034">
<description>Kid's Mix Volume 3 (Japan) (EC0034-KID)</description>
<year>2000</year>
@@ -471,9 +467,20 @@
</part>
</software>
+ <software name="ec0037">
+ <description>ENK Volume 4 (Japan) (EC0037-ENK)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0037-enk.u1" size="0x100000" crc="3c61036c" sha1="b09096a58f361f70041b35c29a02b768ef1758d2" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0041">
<description>Artist Selection Volume 8 (unknown) (Japan) (EC0041-ATS)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -484,7 +491,7 @@
<software name="ec0042">
<description>J-Pop Mix Volume 19 (Japan) (EC0042-JPM)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -495,7 +502,7 @@
<software name="ec0044">
<description>Artist Selection Volume 9 (Every Little Thing) (Japan) (EC0044-ATS)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -506,7 +513,7 @@
<software name="ec0045">
<description>Artist Selection Volume 10 (Mr. Children) (Japan) (EC0045-ATS)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -515,9 +522,20 @@
</part>
</software>
+ <software name="ec0046">
+ <description>J-Pop Mix Volume 20 (Japan) (EC0046-JPM)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0046-jpm.u1" size="0x100000" crc="becc678f" sha1="30c6700b43dd691ff633fa469e6a34472481af59" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="ec0048">
<description>ENK Volume 6 (Japan) (EC0048-ENK)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -528,7 +546,7 @@
<software name="ec0049">
<description>Artist Selection Volume 11 (Judy and Mary) (Japan) (EC0049-ATS)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -539,7 +557,7 @@
<software name="ec0054">
<description>J-Pop Mix Volume 23 (Japan) (EC0054-JPM)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -550,7 +568,7 @@
<software name="ec0068">
<description>J-Pop Mix Volume 33 (Japan) (EC0068-JPM)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -561,7 +579,7 @@
<software name="ec0070">
<description>J-Pop Mix Volume 34 (Japan) (EC0070-JPM)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -572,7 +590,7 @@
<software name="ec0072">
<description>J-Pop Mix Volume 36 (Japan) (EC0072-JPM)</description>
- <year>2000</year>
+ <year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
@@ -583,122 +601,35 @@
<software name="ec0076">
<description>J-Pop Mix Volume 39 (Japan) (EC0076-JPM)</description>
- <year>2000</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x100000">
- <rom name="ec0076-jpm.u1" size="0x100000" crc="ccdc18d1" sha1="bf0ee7b17ed258495a2805d2608e960f64d5ec5c" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <!-- Japanese e-kara cartridges MC (Mini) series -->
- <!-- these have unique presentation -->
-
- <software name="mc0001">
- <description>Mini Volume 1 (Japan) (MC0001-ATM)</description>
- <year>2003</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x080000">
- <rom name="mc0001-atm.u1" size="0x080000" crc="3ef59e82" sha1="d10f0b4a174bef736fea538028eacbeb46af5bbd" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <!-- Japanese e-kara cartridges SC (Special?) series -->
- <!-- these have unique presentation -->
-
- <software name="sc0005">
- <description>SAI Volume 1 (Japan) (SC0005-SAI)</description>
- <year>2001</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x100000">
- <rom name="sc0005-sai.u1" size="0x100000" crc="f919b155" sha1="60fc9985d277422d4d64fb4f0cebf2732e2958aa" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="sc0006">
- <description>SAI Volume 2 (Japan) (SC0006-SAI)</description>
<year>2001</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
- <rom name="sc0006-sai.u1" size="0x100000" crc="4bd8669e" sha1="e77d16ecead2a6c660fedcbca3a1e0e719648be4" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="sc0009">
- <description>SAI Volume 3 (Japan) (SC0009-SAI)</description>
- <year>2001</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x100000">
- <rom name="sc0009-sai.u1" size="0x100000" crc="61413fd5" sha1="47dad178faa99301009ae74554a39b15c01e0db2" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="sc0010">
- <description>HWK (Japan) (SC0010-HKW)</description>
- <year>2001</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x200000">
- <rom name="sc0010-hkw.u1" size="0x200000" crc="fd6dc588" sha1="fece06706399eb36f3e69f7693116c944fe890e7" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="sc0019">
- <description>SAI Volume 6 (Japan) (SC0019-SAI)</description>
- <year>2001</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x200000">
- <rom name="sc0019-sai.u1" size="0x100000" crc="136c12e3" sha1="fabd2e83732fdbbd737fc55902a3b1612c73f929" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="sc0021">
- <description>SAI Volume 7 (Japan) (SC0021-SAI)</description>
- <year>2001</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x200000">
- <rom name="sc0021-sai.u1" size="0x100000" crc="fbc77e6c" sha1="eee3c8a68807dbac62c8021f9c755d08076925e2" offset="0" />
+ <rom name="ec0076-jpm.u1" size="0x100000" crc="ccdc18d1" sha1="bf0ee7b17ed258495a2805d2608e960f64d5ec5c" offset="0" />
</dataarea>
</part>
</software>
-
- <software name="sc0022">
- <description>SAI Volume 8 (Japan) (SC0022-SAI)</description>
- <year>2001</year>
+
+ <software name="ec0079"> <!-- custom presentation -->
+ <description>ETZ (Japan) (EC0079-ETZ)</description> <!-- Japanese text in 'Volume' box -->
+ <year>2002</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x200000">
- <rom name="sc0022-sai.u1" size="0x100000" crc="d631d890" sha1="a0953aa347c9ec152e64bc455fc360056c5c0807" offset="0" />
+ <rom name="ec0079-etz.u1" size="0x200000" crc="c03b5411" sha1="a88156aec4e0f024461f129c955a953647f51554" offset="0" />
</dataarea>
</part>
- </software>
-
- <!-- Japanese e-kara web cartridge
- this was meant to be used with an e-kara web unit, USB cable and PC software, presumably to transfer songs offered on some online service
- e-karaweb.com no longer resolves to anything -->
- <software name="ekaraweb">
- <description>e-kara Web cartridge 28M (Japan)</description>
- <year>2001</year>
+ </software>
+
+ <software name="ec0082"> <!-- custom presentation -->
+ <description>Matthew's Best Hit Selection (Japan) (EC0082-MBH)</description>
+ <year>2003</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x200000">
- <rom name="web.u1" size="0x200000" crc="69bb06bf" sha1="dafa4fde7b59cb547e1f3af0b29606b33cb76fd0" offset="0" />
+ <dataarea name="rom" size="0x100000">
+ <rom name="ec0082-mbh.u1" size="0x100000" crc="3998e478" sha1="29dad31dfd79c57b2ccec0caac81b3489946b798" offset="0" />
</dataarea>
</part>
- </software>
-
-
+ </software>
+
</softwarelist>
diff --git a/hash/ekara_japan_d.xml b/hash/ekara_japan_d.xml
new file mode 100644
index 00000000000..78835696566
--- /dev/null
+++ b/hash/ekara_japan_d.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_d" description="Takara e-kara (Japan) D-xx / DCxxxx- series cartridges">
+ <!-- cartridges contain ROM + SEEPROM only, the XaviX CPU and BIOS are in the base unit
+
+ ***********************************************************************************
+
+ Japanese cart listing (by D code) (D-xx on cartridge / box, DC in cart identifier code)
+ * = dumped
+
+ These are for use with 4 units
+ 1. e-Kara
+ 2. Taiko De Popira
+ 3. Popira
+ 4. Popira 2
+
+ note BAT and BHT aren't the same series
+
+ D-1 DC0001- (unknown)
+ *D-2 DC0002-BAT BAT Volume 6
+ D-3 DC0003-BHT BHT (Best Artists?) Volume 9? (most other BHT carts are in G series, or P series)
+ D-4 DC0004- (unknown)
+ *D-5 DC0005-TPJ TV Pop Volume 9
+
+ (more? what's the D highest number?)
+
+ -->
+
+ <software name="dc0002">
+ <description>BAT Volume 6 (Japan) (DC0002-BAT)</description>
+ <year>2003</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc02"/>
+ <dataarea name="rom" size="0x100000">
+ <rom name="dc0002-bat.u1" size="0x100000" crc="bb4e13a7" sha1="f9d3a669de1b7ad3080eb428575905ee2170458c" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="dc0005">
+ <description>TV Pop Volume 9 (Japan) (DC0005-TPJ)</description>
+ <year>2004</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc02"/>
+ <dataarea name="rom" size="0x100000">
+ <rom name="dc0005-tpj.u1" size="0x100000" crc="515c125f" sha1="a7c7bf758b1afecb8fb55eb5766343325c1acc89" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/ekara_japan_en.xml b/hash/ekara_japan_en.xml
new file mode 100644
index 00000000000..63533f411bb
--- /dev/null
+++ b/hash/ekara_japan_en.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_en" description="Takara e-kara (Japan) EN-xx series cartridges">
+ <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit -->
+ <!--
+ Japanese cart listing (by EN code) * = dumped
+ * = dumped
+
+ These don't seem to have a secondary numbering scheme (eg ENxxxx-xxx)
+
+ (check what units these are for)
+
+ EN-1 (unknown)
+ EN-2 (unknown)
+ *EN-3 (unknown)
+
+ (more? what's the EN highest number?)
+
+ -->
+
+ <software name="en3">
+ <description>EN-3 (Japan)</description>
+ <year>2004</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="en-3.u1" size="0x100000" crc="e3686ff4" sha1="e7e9a53a778739c406b2b226300d2f525cd9676b" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/ekara_japan_g.xml b/hash/ekara_japan_g.xml
new file mode 100644
index 00000000000..5d8cc24d2e2
--- /dev/null
+++ b/hash/ekara_japan_g.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_g" description="Takara e-kara (Japan) G-xx / GCxxxx- series cartridges">
+ <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit
+
+ ***********************************************************************************
+
+ Japanese cart listing (by G code) (G-x on cartridge / box, GC in cart identifier code)
+
+ These are for use with 2 different units
+ 1. e-Kara
+ 2. Popira (and Popira 2?)
+
+ G-1 *GC0001-BAT BAT Volume 1 (Artist Selection?)
+ G-2 *GC0002-BHT BHT Volume 1 (Best Artists?)
+ G-3 *GC0003-BAT BAT Volume 2 (Artist Selection?)
+ G-4 *GC0004-BHT BHT Volume 2 (Best Artists?)
+ G-5 GC0005-TPJ TV Pop Volume 1
+ G-6 *GC0006-BHT BHT Volume 3 (Best Artists?)
+ G-7 GC0007-BAT BAT Volume 3 (Artist Selection?)
+ G-8 GC0008-MIN? untranslated (no volume)
+ G-9 GC0009-TPJ TV Pop Volume 3 (Volume 2 is 'P-2' in 'P' series)
+ G-10 *GC0010-BAT BAT Volume 4 (Artist Selection?)
+ G-11 GC0011-TPJ TV Pop Volume 4
+ G-12 GC0012-BHT BHT Volume 5 (Best Artists?) (Volume 4 is 'P-1' in 'P' series)
+ G-13 GC0013- (unknown) Volume 6
+ G-14 GC0014- (unknown) Volume 2
+ G-15 *GC0015-BAT BAT Volume 5 (Artist Selection?)
+ G-16 *GC0016-TPJ TV Pop Volume 5
+ G-17 GC0017-TPJ TV Pop Volume 6
+
+ (more? what's the G highest number?)
+
+ -->
+
+ <software name="gc0001">
+ <description>BAT Volume 1 (Japan) (GC0001-BAT)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0001-bat.u1" size="0x100000" crc="226224f3" sha1="d2609f342e19b0cd38678d2709866baa041658e7" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="gc0002">
+ <description>BHT Volume 1 (Japan) (GC0002-BHT)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0002-bht.u1" size="0x100000" crc="eae1cb3b" sha1="d1e594858eecde5409898684654caab0555ac1b4" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="gc0003">
+ <description>BAT Volume 2 (Japan) (GC0003-BAT)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc00003-bat.u1" size="0x100000" crc="49536d5a" sha1="c112b6ac62f586fc1d1615406362fc659e587772" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="gc0004">
+ <description>BHT Volume 2 (Japan) (GC0004-BHT)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0004-bht.u1" size="0x100000" crc="6d2e9711" sha1="0478578c297f14d78a6612ecd61387129bd6df42" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="gc0006">
+ <description>BHT Volume 3 (Japan) (GC0006-BHT)</description>
+ <year>2000</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0006-bht.u1" size="0x100000" crc="76bbefae" sha1="a2a41f58b5750fafa92d6e3094562dd05a5d9029" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- G10 has a 24LC02, but no 74HC125, and pin 2 isn't connected.
+ So I guess that one has a different method of talking to the SEEPROM -->
+ <software name="gc0010">
+ <description>BAT Volume 4 (Japan) (GC0010-BAT)</description>
+ <year>2002</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc02"/> <!-- no 74HC125 TODO: different hookup, see note above -->
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0010-bat.u1" size="0x100000" crc="c08be376" sha1="28cb6baacf64e0382fd9c8bb7167d7fdd96f57ee" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+
+ <!-- G15 looks like G16- 74HC125 and 24LC02. -->
+ <software name="gc0015">
+ <description>BAT Volume 5 (Japan) (GC0015-BAT)</description>
+ <year>2002</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc02"/> <!-- with 74HC125 -->
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0015-bat.u1" size="0x100000" crc="a839b745" sha1="a02bd29383baf1f92b3573aaa6343cc309a6f589" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="gc0016">
+ <description>TV Pop Volume 5 (Japan) (GC0016-TPJ)</description>
+ <year>2002</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc02"/> <!-- with 74HC125 -->
+ <dataarea name="rom" size="0x100000">
+ <rom name="gc0016-tpj.u1" size="0x100000" crc="52d81c55" sha1="c2fad86a2507589625cb507c3e1395cb662f9e34" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/ekara_japan_gc.xml b/hash/ekara_japan_gc.xml
deleted file mode 100644
index d9984f54647..00000000000
--- a/hash/ekara_japan_gc.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-<softwarelist name="ekara_japan_gc" description="Takara e-kara G-xx / GCxxxx- series cartridges">
- <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit
-
- ***********************************************************************************
-
- Japanese cart listing (by G code) (G-x on cartridge / box, GC in cart identifier code)
-
- These are for use with 2 different units
- 1. e-Kara
- 2. Blue thing with 4 buttons on it (see note in D series)
-
- G-1 GC0001-BAT BAT Volume 1 (Artist Selection?)
- G-2 *GC0002-BHT BHT Volume 1 (Best Artists?)
- G-3 GC0003-BAT BAT Volume 2 (Artist Selection?)
- G-4 GC0004-BHT BHT Volume 2 (Best Artists?)
- G-5 GC0005- TV Pop Volume 1
- G-6 *GC0006-BHT BHT Volume 3 (Best Artists?)
- G-7 GC0007-BAT BAT Volume 3 (Artist Selection?)
- G-8 GC0008-MIN? untranslated (no volume)
- G-9 GC0009- TV Pop Volume 3 (Volume 2 is 'P-2' in 'P' series)
- G-10 GC0010- BAT Volume 4 (Artist Selection?)
- G-11 GC0011- TV Pop Volume 4
- G-12 GC0012-BHT BHT Volume 5 (Best Artists?) (Volume 4 is 'P-1' in 'P' series)
- G-13 GC0013- (unknown) Volume 6
- G-14 GC0014- (unknown) Volume 2
- G-15 GC0015- (unknown) Volume 5
- G-16 GC0016- (unknown)
- G-17 GC0017- TV Pop Volume 6
-
- (more? what's the G highest number?)
-
- -->
-
- <software name="gc0002">
- <description>BHT Volume 1 (Japan) (GC0002-BHT)</description>
- <year>2000</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x100000">
- <rom name="gc0002-bht.u1" size="0x100000" crc="eae1cb3b" sha1="d1e594858eecde5409898684654caab0555ac1b4" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="gc0006">
- <description>BHT Volume 3 (Japan) (GC0006-BHT)</description>
- <year>2000</year>
- <publisher>Takara</publisher>
- <part name="cart" interface="ekara_cart">
- <dataarea name="rom" size="0x100000">
- <rom name="gc0006-bht.u1" size="0x100000" crc="76bbefae" sha1="a2a41f58b5750fafa92d6e3094562dd05a5d9029" offset="0" />
- </dataarea>
- </part>
- </software>
-
-</softwarelist>
diff --git a/hash/ekara_japan_m.xml b/hash/ekara_japan_m.xml
new file mode 100644
index 00000000000..f068d1edd87
--- /dev/null
+++ b/hash/ekara_japan_m.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_m" description="Takara e-kara (Japan) M-xx / MCxxxx- series cartridges">
+ <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit
+
+ Japanese cart listing (by M code) (M-x on cartridge / box, MC in cart identifier code)
+
+ M-1 *MC0001-ATM ATM Mini Volume 1
+ M-2 MC0002-
+ M-3 MC0003-
+ M-4 MC0004- ? Mini Volume 4 (w-inds)
+ M-5 MC0005-
+ M-6 MC0006-
+ M-7 MC0007-ATM ATM Mini Volume 5
+ M-8
+ M-9
+ M-10
+ M-11
+ M-12
+ M-13 MC0013-KSM KSM Mini Volume 5
+
+ (more? what's the M highest number?)
+
+ -->
+
+ <!-- Japanese e-kara cartridges MC (Mini) series -->
+ <!-- these have unique presentation -->
+
+ <software name="mc0001">
+ <description>ATM Mini Volume 1 (Japan) (MC0001-ATM)</description>
+ <year>2003</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x080000">
+ <rom name="mc0001-atm.u1" size="0x080000" crc="3ef59e82" sha1="d10f0b4a174bef736fea538028eacbeb46af5bbd" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="mc0013">
+ <description>KSM Mini Volume 5 (Japan) (MC0005-KSM)</description>
+ <year>2003</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x080000">
+ <rom name="mc0013-ksm.u1" size="0x080000" crc="db05eafa" sha1="b58efcc41ad8d5571c319e0d88fa8a3d9badbe93" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/ekara_japan_p.xml b/hash/ekara_japan_p.xml
new file mode 100644
index 00000000000..a6736fff155
--- /dev/null
+++ b/hash/ekara_japan_p.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_p" description="Takara e-kara (Japan) P-xx / PCxxxx- series cartridges">
+ <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit
+
+ ***********************************************************************************
+
+ Japanese cart listing (by P code) (for use on multiple devices, including DDR) (P on box, P/PC on cart)
+
+ These are for use with 3 different units
+ 1. e-Kara
+ 2. Popira (and Popira 2?)
+ 3. Konami DDR Family Mat
+
+ *P-1 BHT Volume 4 (Best Artists?) (1,2,3, 5 in G series)
+ P-2 TV Pop Volume 2 (1,3,4 in G series)
+ *P-3 ENB Volume 1
+ P-4 BHT Volume 7
+ -->
+
+ <software name="pc0001">
+ <description>BHT Volume 4 (Japan) (PC0001-BHT)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="pc0001-bht.u1" size="0x100000" crc="4fbc13a6" sha1="142191a6522c1aa9c7772de6dc1b5706816258de" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="pc0003">
+ <description>ENB Volume 1 (Japan) (PC0003-ENB)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="pc0003-enb.u1" size="0x100000" crc="2fa57d12" sha1="01954a20e190c3f9e1d16c4285c9ec39f601eb80" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="pc0004">
+ <description>BHT Volume 7 (Japan) (PC0004-BHT)</description>
+ <year>2002</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc02"/>
+ <dataarea name="rom" size="0x100000">
+ <rom name="pc0004-bht.u1" size="0x100000" crc="95e35899" sha1="a9bd2694f5ee4b964e8d73afc3e88c0eb18ca1d2" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/ekara_japan_s.xml b/hash/ekara_japan_s.xml
new file mode 100644
index 00000000000..bf95c5d9826
--- /dev/null
+++ b/hash/ekara_japan_s.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_s" description="Takara e-kara (Japan) S-xx / SCxxxx- series cartridges">
+ <!-- cartridges contain ROM only, the XaviX CPU and BIOS are in the base unit
+
+ ***********************************************************************************
+
+ Japanese cart listing (by S code) (S-x on cartridge / box, SC in cart identifier code)
+ TODO: what are the full titles for SAI and HWK
+
+ SAI seems to be used for multiple different series here, need to look at the subtitles too
+
+ S-1 SC0001- Hello Kitty Special
+ S-2 SC0002- (unknown)
+ S-3 SC0003- (unknown)
+ S-4 *SC0004-SAI SAI (series 1) Volume 1
+ S-5 *SC0005-SAI SAI (series 2) Volume 1 (same series as 6,9,19,21,22)
+ S-6 *SC0006-SAI SAI (series 2) Volume 2 (same series as 5,9,19,21,22)
+ S-7 SC0007- (unknown)
+ S-8 SC0008- (unknown)
+ S-9 *SC0009-SAI SAI (series 2) Volume 3 (same series as 5,6,19,21,22)
+ S-10 *SC0010-HWK HWK (untranslated)
+ S-11 SC0011- (unknown)
+ S-12 *SC0012-SAI SAI (series 3) Volume 3
+ S-13 SC0013- (unknown)
+ S-14 SC0014- (unknown)
+ S-15 SC0015- (unknown)
+ S-16 SC0016- (unknown)
+ S-17 SC0017- (unknown)
+ S-18 SC0018- (unknown) Volume 1
+ S-19 *SC0019-SAI SAI (series 2) Volume 6 (same series as 5,6,9,21,22)
+ S-20 SC0020- (unknown) Volume 5
+ S-21 *SC0021-SAI SAI (series 2) Volume 7 (same seires as 5,6,9,19,22)
+ S-22 *SC0022-SAI SAI (series 2) Volume 8 (same seires as 5,6,9,19,21)
+ S-23 SC0023- (unknown)
+
+ (more? what's the S highest number?)
+
+ -->
+
+ <!-- Japanese e-kara cartridges SC (Special?) series -->
+ <!-- these have unique presentation -->
+
+ <software name="sc0004">
+ <description>SAI (series 1) Volume 1 (Japan) (SC0004-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="sc0004-sai.u1" size="0x100000" crc="c2a080da" sha1="6eb803bc8587308002f7f8a15b1928c8f726c192" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0005">
+ <description>SAI (series 2) Volume 1 (Japan) (SC0005-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="sc0005-sai.u1" size="0x100000" crc="f919b155" sha1="60fc9985d277422d4d64fb4f0cebf2732e2958aa" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0006">
+ <description>SAI (series 2) Volume 2 (Japan) (SC0006-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="sc0006-sai.u1" size="0x100000" crc="4bd8669e" sha1="e77d16ecead2a6c660fedcbca3a1e0e719648be4" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0009">
+ <description>SAI (series 2) Volume 3 (Japan) (SC0009-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="sc0009-sai.u1" size="0x100000" crc="61413fd5" sha1="47dad178faa99301009ae74554a39b15c01e0db2" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0010">
+ <description>HWK (Japan) (SC0010-HKW)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="sc0010-hkw.u1" size="0x200000" crc="fd6dc588" sha1="fece06706399eb36f3e69f7693116c944fe890e7" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0012">
+ <description>SAI (series 3) Volume 3 (Japan) (SC0012-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="sc0012-sai.u1" size="0x100000" crc="8b971664" sha1="5f748d3406dbe74ce06c68aa07bafa9e288d5b51" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0019">
+ <description>SAI (series 2) Volume 6 (Japan) (SC0019-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="sc0019-sai.u1" size="0x100000" crc="136c12e3" sha1="fabd2e83732fdbbd737fc55902a3b1612c73f929" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0021">
+ <description>SAI (series 2) Volume 7 (Japan) (SC0021-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="sc0021-sai.u1" size="0x100000" crc="fbc77e6c" sha1="eee3c8a68807dbac62c8021f9c755d08076925e2" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sc0022">
+ <description>SAI (series 2) Volume 8 (Japan) (SC0022-SAI)</description>
+ <year>2001</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="sc0022-sai.u1" size="0x100000" crc="d631d890" sha1="a0953aa347c9ec152e64bc455fc360056c5c0807" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/ekara_japan_sp.xml b/hash/ekara_japan_sp.xml
index c68c30ff8ad..a8a418e268f 100644
--- a/hash/ekara_japan_sp.xml
+++ b/hash/ekara_japan_sp.xml
@@ -1,12 +1,14 @@
<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-<softwarelist name="ekara_japan_sp" description="Takara e-kara SP-xx series cartridges">
+<softwarelist name="ekara_japan_sp" description="Takara e-kara (Japan) SP-xx series cartridges">
<!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit
some cartridges also contain an SEEPROM
***********************************************************************************
Japanese cart listing (by SP code) * = dumped
+
+ These don't seem to have a secondary numbering scheme (eg SPxxxx-xxx)
These are for use with 5 different units
1. e-Kara
@@ -30,12 +32,13 @@
-->
<software name="sp02"> <!-- also has SEEPROM inside -->
- <description>SP-02</description>
+ <description>SP-02 Super Cartridge (Japan)</description>
<year>2000</year>
<publisher>Takara</publisher>
<part name="cart" interface="ekara_cart">
+ <feature name="slot" value="rom_24lc04"/>
<dataarea name="rom" size="0x200000">
- <rom name="ekarasp02.bin" size="0x200000" crc="c8a84ded" sha1="02ffa04cdc7732fd3ab75505c5cc68bda130c7ee" offset="0" />
+ <rom name="sp02.u1" size="0x200000" crc="c8a84ded" sha1="02ffa04cdc7732fd3ab75505c5cc68bda130c7ee" offset="0" />
</dataarea>
</part>
</software>
diff --git a/hash/ekara_japan_web.xml b/hash/ekara_japan_web.xml
new file mode 100644
index 00000000000..d0c1a75fd51
--- /dev/null
+++ b/hash/ekara_japan_web.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="ekara_japan_web" description="Takara e-kara (Japan) Web cartridges">
+ <!-- cartridges contain the ROM only, the XaviX CPU and BIOS are in the base unit -->
+
+ <!-- Japanese e-kara web cartridges
+ this was meant to be used with an e-kara web unit, USB cable and PC software, presumably to transfer songs offered on some online service
+ e-karaweb.com no longer resolves to anything, these cartridges seem to be blank / unused so have no songs in them -->
+ <software name="ekaraweb28">
+ <description>e-kara Web cartridge 28M (blank) (Japan)</description>
+ <year>2003</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="web.u1" size="0x200000" crc="69bb06bf" sha1="dafa4fde7b59cb547e1f3af0b29606b33cb76fd0" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="ekaraweb12">
+ <description>e-kara Web cartridge 12M (blank) (Japan)</description>
+ <year>2003</year>
+ <publisher>Takara</publisher>
+ <part name="cart" interface="ekara_cart">
+ <dataarea name="rom" size="0x100000">
+ <rom name="ekaraweb2.bin" size="0x100000" crc="9149a3a8" sha1="01277650706c1b168c5125b0ddcceacbd207be25" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index dc6bbd80a91..a80e2f6e127 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -784,6 +784,19 @@ if (BUSES["ECONET"]~=null) then
}
end
+---------------------------------------------------
+--
+--@src/devices/bus/ekara/slot.h,BUSES["EKARA"] = true
+---------------------------------------------------
+
+if (BUSES["EKARA"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/bus/ekara/slot.cpp",
+ MAME_DIR .. "src/devices/bus/ekara/slot.h",
+ MAME_DIR .. "src/devices/bus/ekara/rom.cpp",
+ MAME_DIR .. "src/devices/bus/ekara/rom.h",
+ }
+end
---------------------------------------------------
--
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 97121e97e76..68c922732e7 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -725,6 +725,7 @@ BUSES["CRVISION"] = true
BUSES["DMV"] = true
BUSES["ECBBUS"] = true
BUSES["ECONET"] = true
+BUSES["EKARA"] = true
BUSES["EINSTEIN_USERPORT"] = true
BUSES["ELECTRON"] = true
BUSES["ELECTRON_CART"] = true
diff --git a/src/devices/bus/ekara/rom.cpp b/src/devices/bus/ekara/rom.cpp
new file mode 100644
index 00000000000..7ba557b0917
--- /dev/null
+++ b/src/devices/bus/ekara/rom.cpp
@@ -0,0 +1,126 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#include "emu.h"
+#include "rom.h"
+
+//-------------------------------------------------
+// ekara_rom_device - constructor
+//-------------------------------------------------
+
+DEFINE_DEVICE_TYPE(EKARA_ROM_PLAIN, ekara_rom_plain_device, "ekara_rom_plain", "EKARA Cartridge")
+DEFINE_DEVICE_TYPE(EKARA_ROM_I2C_BASE, ekara_rom_i2c_base_device, "ekara_rom_i2c_base", "EKARA Cartridge with I2C")
+DEFINE_DEVICE_TYPE(EKARA_ROM_I2C_24LC04, ekara_rom_i2c_24lc04_device, "ekara_rom_i2c_24lc04", "EKARA Cartridge with I2C 24LC04")
+DEFINE_DEVICE_TYPE(EKARA_ROM_I2C_24LC02, ekara_rom_i2c_24lc02_device, "ekara_rom_i2c_24lc02", "EKARA Cartridge with I2C 24LC02")
+
+
+ekara_rom_plain_device::ekara_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, type, tag, owner, clock), device_ekara_cart_interface(mconfig, *this)
+{
+}
+
+ekara_rom_plain_device::ekara_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ ekara_rom_plain_device(mconfig, EKARA_ROM_PLAIN, tag, owner, clock)
+{
+}
+
+ekara_rom_i2c_base_device::ekara_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ ekara_rom_plain_device(mconfig, EKARA_ROM_I2C_BASE, tag, owner, clock),
+ m_i2cmem(*this, "i2cmem")
+{
+}
+
+ekara_rom_i2c_base_device::ekara_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ ekara_rom_plain_device(mconfig, type, tag, owner, clock),
+ m_i2cmem(*this, "i2cmem")
+{
+}
+
+
+ekara_rom_i2c_24lc04_device::ekara_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ ekara_rom_i2c_base_device(mconfig, EKARA_ROM_I2C_24LC04, tag, owner, clock)
+{
+}
+
+ekara_rom_i2c_24lc02_device::ekara_rom_i2c_24lc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ ekara_rom_i2c_base_device(mconfig, EKARA_ROM_I2C_24LC02, tag, owner, clock)
+{
+}
+
+/*-------------------------------------------------
+ mapper specific handlers
+ -------------------------------------------------*/
+
+// plain
+
+READ8_MEMBER(ekara_rom_plain_device::read_cart)
+{
+ return read_rom(space, offset, mem_mask);
+}
+
+READ8_MEMBER(ekara_rom_plain_device::read_rom)
+{
+ return m_rom[offset & (m_rom_size-1)];
+}
+
+WRITE8_MEMBER(ekara_rom_plain_device::write_cart)
+{
+ write_rom(space, offset, data, mem_mask);
+}
+
+WRITE8_MEMBER(ekara_rom_plain_device::write_rom)
+{
+ logerror("ekara_rom_plain_device::write_rom %08x %02x\n", offset, data);
+}
+
+// i2c base
+
+WRITE8_MEMBER(ekara_rom_i2c_base_device::write_rom)
+{
+ logerror("ekara_rom_i2c_base_device::write_rom %08x %02x\n", offset, data);
+}
+
+READ8_MEMBER(ekara_rom_i2c_base_device::read_rom)
+{
+ return m_rom[offset & (m_rom_size - 1)];
+}
+
+READ8_MEMBER(ekara_rom_i2c_base_device::read_extra)
+{
+ logerror("ekara_rom_i2c_base_device::read_extra %08x\n", offset);
+
+ return (m_i2cmem->read_sda() & 1) ? 0xff : 0x00;
+}
+
+WRITE8_MEMBER(ekara_rom_i2c_base_device::write_extra)
+{
+ logerror("ekara_rom_i2c_base_device::write_extra %08x %02x\n", offset, data);
+
+ m_i2cmem->write_sda((data & 0x01) >> 0);
+ m_i2cmem->write_scl((data & 0x02) >> 1);
+}
+
+
+// i2c 24lc04
+
+MACHINE_CONFIG_START(ekara_rom_i2c_24lc04_device::device_add_mconfig)
+ I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x200); // 24LC04
+MACHINE_CONFIG_END
+
+// i2c 24lc02
+
+MACHINE_CONFIG_START(ekara_rom_i2c_24lc02_device::device_add_mconfig)
+ I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x100); // 24LC02
+MACHINE_CONFIG_END
+
+
+/*-------------------------------------------------
+ slot interface
+ -------------------------------------------------*/
+
+void ekara_cart(device_slot_interface &device)
+{
+ device.option_add_internal("plain", EKARA_ROM_PLAIN);
+ device.option_add_internal("rom_24lc04", EKARA_ROM_I2C_24LC04);
+ device.option_add_internal("rom_24lc02", EKARA_ROM_I2C_24LC02);
+}
diff --git a/src/devices/bus/ekara/rom.h b/src/devices/bus/ekara/rom.h
new file mode 100644
index 00000000000..a765f28d6d3
--- /dev/null
+++ b/src/devices/bus/ekara/rom.h
@@ -0,0 +1,90 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+#ifndef MAME_BUS_EKARA_ROM_H
+#define MAME_BUS_EKARA_ROM_H
+
+#pragma once
+
+#include "slot.h"
+#include "machine/i2cmem.h"
+
+// ======================> ekara_rom_plain_device
+
+class ekara_rom_plain_device : public device_t,
+ public device_ekara_cart_interface
+{
+public:
+ // construction/destruction
+ ekara_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // reading and writing
+ virtual DECLARE_READ8_MEMBER(read_cart) override;
+ virtual DECLARE_WRITE8_MEMBER(write_cart) override;
+
+ virtual DECLARE_READ8_MEMBER(read_extra) override { return 0xff; };
+ virtual DECLARE_WRITE8_MEMBER(write_extra) override { };
+
+ virtual READ8_MEMBER(read_rom);
+ virtual WRITE8_MEMBER(write_rom);
+
+protected:
+ ekara_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ // device-level overrides
+ virtual void device_start() override { }
+ virtual void device_reset() override { }
+};
+
+// ======================> ekara_rom_i2c_base_device
+
+class ekara_rom_i2c_base_device : public ekara_rom_plain_device
+{
+public:
+ // construction/destruction
+ ekara_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ ekara_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ // reading and writing
+ virtual READ8_MEMBER(read_rom) override;
+ virtual WRITE8_MEMBER(write_rom) override;
+
+ optional_device<i2cmem_device> m_i2cmem;
+
+ virtual DECLARE_READ8_MEMBER(read_extra) override;
+ virtual DECLARE_WRITE8_MEMBER(write_extra) override;
+};
+
+// ======================> ekara_rom_i2c_24lc04_device
+
+class ekara_rom_i2c_24lc04_device : public ekara_rom_i2c_base_device
+{
+public:
+ // construction/destruction
+ ekara_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config &config) override;
+};
+
+// ======================> ekara_rom_i2c_24lc02_device
+
+class ekara_rom_i2c_24lc02_device : public ekara_rom_i2c_base_device
+{
+public:
+ // construction/destruction
+ ekara_rom_i2c_24lc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config &config) override;
+};
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(EKARA_ROM_PLAIN, ekara_rom_plain_device)
+DECLARE_DEVICE_TYPE(EKARA_ROM_I2C_BASE, ekara_rom_i2c_base_device)
+DECLARE_DEVICE_TYPE(EKARA_ROM_I2C_24LC04, ekara_rom_i2c_24lc04_device)
+DECLARE_DEVICE_TYPE(EKARA_ROM_I2C_24LC02, ekara_rom_i2c_24lc02_device)
+
+#endif // MAME_BUS_EKARA_ROM_H
diff --git a/src/devices/bus/ekara/slot.cpp b/src/devices/bus/ekara/slot.cpp
new file mode 100644
index 00000000000..0569bb49a6c
--- /dev/null
+++ b/src/devices/bus/ekara/slot.cpp
@@ -0,0 +1,239 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#include "emu.h"
+#include "slot.h"
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+DEFINE_DEVICE_TYPE(EKARA_CART_SLOT, ekara_cart_slot_device, "ekara_cart_slot", "e-kara Cartridge Slot")
+
+//**************************************************************************
+// EKARA cartridges Interface
+//**************************************************************************
+
+//-------------------------------------------------
+// device_ekara_cart_interface - constructor
+//-------------------------------------------------
+
+device_ekara_cart_interface::device_ekara_cart_interface(const machine_config &mconfig, device_t &device)
+ : device_slot_card_interface(mconfig, device),
+ m_rom(nullptr),
+ m_rom_size(0)
+{
+}
+
+
+//-------------------------------------------------
+// ~device_ekara_cart_interface - destructor
+//-------------------------------------------------
+
+device_ekara_cart_interface::~device_ekara_cart_interface()
+{
+}
+
+//-------------------------------------------------
+// rom_alloc - alloc the space for the cart
+//-------------------------------------------------
+
+void device_ekara_cart_interface::rom_alloc(uint32_t size, const char *tag)
+{
+ if (m_rom == nullptr)
+ {
+ m_rom = device().machine().memory().region_alloc(std::string(tag).append(EKARASLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_BIG)->base();
+ m_rom_size = size;
+ }
+}
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// ekara_cart_slot_device - constructor
+//-------------------------------------------------
+ekara_cart_slot_device::ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, EKARA_CART_SLOT, tag, owner, clock),
+ device_image_interface(mconfig, *this),
+ device_slot_interface(mconfig, *this),
+ m_type(EKARA_PLAIN),
+ m_cart(nullptr)
+{
+}
+
+//-------------------------------------------------
+// ekara_cart_slot_device - destructor
+//-------------------------------------------------
+
+ekara_cart_slot_device::~ekara_cart_slot_device()
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void ekara_cart_slot_device::device_start()
+{
+ m_cart = dynamic_cast<device_ekara_cart_interface *>(get_card_device());
+}
+
+//-------------------------------------------------
+// EKARA PCB
+//-------------------------------------------------
+
+struct ekara_slot
+{
+ int pcb_id;
+ const char *slot_option;
+};
+
+// Here, we take the feature attribute from .xml (i.e. the PCB name) and we assign a unique ID to it
+static const ekara_slot slot_list[] =
+{
+ { EKARA_PLAIN, "plain" },
+ { EKARA_I2C_BASE, "i2c_base" },
+ { EKARA_I2C_24LC04, "rom_24lc04" },
+ { EKARA_I2C_24LC02, "rom_24lc02" },
+};
+
+static int ekara_get_pcb_id(const char *slot)
+{
+ for (auto & elem : slot_list)
+ {
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
+ }
+
+ return 0;
+}
+
+static const char *ekara_get_slot(int type)
+{
+ for (auto & elem : slot_list)
+ {
+ if (elem.pcb_id == type)
+ return elem.slot_option;
+ }
+
+ return "plain";
+}
+
+
+/*-------------------------------------------------
+ call load
+ -------------------------------------------------*/
+
+image_init_result ekara_cart_slot_device::call_load()
+{
+ if (m_cart)
+ {
+ uint8_t *ROM;
+ uint32_t len = !loaded_through_softlist() ? length() : get_software_region_length("rom");
+
+ m_cart->rom_alloc(len, tag());
+
+ ROM = m_cart->get_rom_base();
+
+ if (!loaded_through_softlist())
+ fread(ROM, len);
+ else
+ memcpy(ROM, get_software_region("rom"), len);
+
+ if (!loaded_through_softlist())
+ {
+ // attempt to detect cart type without softlist assistance
+ m_type = get_cart_type(ROM, len);
+ }
+ else
+ {
+ // or for softlist loading, use the type specified
+ const char *pcb_name = get_feature("slot");
+ if (pcb_name)
+ m_type = ekara_get_pcb_id(pcb_name);
+ }
+
+ return image_init_result::PASS;
+ }
+
+ return image_init_result::PASS;
+}
+
+
+/*-------------------------------------------------
+ get_cart_type - code to detect cart type from
+ fullpath
+ -------------------------------------------------*/
+
+int ekara_cart_slot_device::get_cart_type(const uint8_t *ROM, uint32_t len)
+{
+ // without code analysis we have no way of knowing.
+ int type = EKARA_PLAIN;
+ return type;
+}
+
+
+/*-------------------------------------------------
+ get default card software
+ -------------------------------------------------*/
+
+std::string ekara_cart_slot_device::get_default_card_software(get_default_card_software_hook &hook) const
+{
+ if (hook.image_file())
+ {
+ const char *slot_string;
+ uint32_t len = hook.image_file()->size();
+ std::vector<uint8_t> rom(len);
+ int type;
+
+ hook.image_file()->read(&rom[0], len);
+
+ type = get_cart_type(&rom[0], len);
+ slot_string = ekara_get_slot(type);
+
+ printf("type: %s\n", slot_string);
+
+ return std::string(slot_string);
+ }
+
+ return software_get_default_slot("plain");
+}
+
+/*-------------------------------------------------
+ read
+ -------------------------------------------------*/
+
+READ8_MEMBER(ekara_cart_slot_device::read_cart)
+{
+ return m_cart->read_cart(space, offset);
+}
+
+/*-------------------------------------------------
+ write
+ -------------------------------------------------*/
+
+WRITE8_MEMBER(ekara_cart_slot_device::write_cart)
+{
+ m_cart->write_cart(space, offset, data);
+}
+
+/*-------------------------------------------------
+ read extra
+ -------------------------------------------------*/
+
+READ8_MEMBER(ekara_cart_slot_device::read_extra)
+{
+ return m_cart->read_extra(space, offset);
+}
+
+/*-------------------------------------------------
+ write extra
+ -------------------------------------------------*/
+
+WRITE8_MEMBER(ekara_cart_slot_device::write_extra)
+{
+ m_cart->write_extra(space, offset, data);
+}
+
diff --git a/src/devices/bus/ekara/slot.h b/src/devices/bus/ekara/slot.h
new file mode 100644
index 00000000000..5f871aa1dfc
--- /dev/null
+++ b/src/devices/bus/ekara/slot.h
@@ -0,0 +1,120 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+#ifndef MAME_BUS_EKARA_SLOT_H
+#define MAME_BUS_EKARA_SLOT_H
+
+#pragma once
+
+#include "softlist_dev.h"
+
+/***************************************************************************
+ TYPE DEFINITIONS
+ ***************************************************************************/
+
+/* PCB */
+enum
+{
+ EKARA_PLAIN = 0,
+ EKARA_I2C_BASE,
+ EKARA_I2C_24LC04,
+ EKARA_I2C_24LC02,
+};
+
+// ======================> device_ekara_cart_interface
+
+class device_ekara_cart_interface : public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ virtual ~device_ekara_cart_interface();
+
+ // reading and writing
+ virtual DECLARE_READ8_MEMBER(read_cart) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_cart) { }
+
+ virtual DECLARE_READ8_MEMBER(read_extra) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_extra) { }
+
+ void rom_alloc(uint32_t size, const char *tag);
+ uint8_t* get_rom_base() { return m_rom; }
+ uint32_t get_rom_size() { return m_rom_size; }
+
+protected:
+ device_ekara_cart_interface(const machine_config &mconfig, device_t &device);
+
+ // internal state
+ uint8_t *m_rom;
+ uint32_t m_rom_size;
+};
+
+// ======================> ekara_cart_slot_device
+
+class ekara_cart_slot_device : public device_t,
+ public device_image_interface,
+ public device_slot_interface
+{
+public:
+ // construction/destruction
+ ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ template <typename T>
+ ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
+ : ekara_cart_slot_device(mconfig, tag, owner, clock)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
+
+ virtual ~ekara_cart_slot_device();
+
+ // image-level overrides
+ virtual image_init_result call_load() override;
+ virtual void call_unload() override {}
+ virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); }
+
+ int get_type() { return m_type; }
+ static int get_cart_type(const uint8_t *ROM, uint32_t len);
+
+ virtual iodevice_t image_type() const override { return IO_CARTSLOT; }
+ virtual bool is_readable() const override { return 1; }
+ virtual bool is_writeable() const override { return 0; }
+ virtual bool is_creatable() const override { return 0; }
+ virtual bool must_be_loaded() const override { return 0; }
+ virtual bool is_reset_on_load() const override { return 1; }
+ virtual const char *image_interface() const override { return "ekara_cart"; }
+ virtual const char *file_extensions() const override { return "bin,u1"; }
+
+ // slot interface overrides
+ virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override;
+
+ // reading and writing
+ virtual DECLARE_READ8_MEMBER(read_cart);
+ virtual DECLARE_WRITE8_MEMBER(write_cart);
+
+ virtual DECLARE_READ8_MEMBER(read_extra);
+ virtual DECLARE_WRITE8_MEMBER(write_extra);
+
+ bool has_cart() { return m_cart ? true : false; }
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+ int m_type;
+ device_ekara_cart_interface* m_cart;
+};
+
+// device type definition
+DECLARE_DEVICE_TYPE(EKARA_CART_SLOT, ekara_cart_slot_device)
+
+/***************************************************************************
+ DEVICE CONFIGURATION MACROS
+ ***************************************************************************/
+
+#define EKARASLOT_ROM_REGION_TAG ":cart:rom"
+
+void ekara_cart(device_slot_interface &device);
+
+#endif // MAME_BUS_EKARA_SLOT_H
diff --git a/src/mame/audio/xavix.cpp b/src/mame/audio/xavix.cpp
index 6a4d095dc66..2888cd212dc 100644
--- a/src/mame/audio/xavix.cpp
+++ b/src/mame/audio/xavix.cpp
@@ -382,12 +382,12 @@ WRITE8_MEMBER(xavix_state::sound_75f8_w)
READ8_MEMBER(xavix_state::sound_75f9_r)
{
LOG("%s: sound_75f9_r\n", machine().describe_context());
- return m_unksnd75f9;
+ return m_unk_snd75f9;
}
WRITE8_MEMBER(xavix_state::sound_75f9_w)
{
- m_unksnd75f9 = data;
+ m_unk_snd75f9 = data;
LOG("%s: sound_75f9_w %02x\n", machine().describe_context().c_str(), data);
}
@@ -492,6 +492,8 @@ WRITE8_MEMBER(xavix_state::sound_irqstatus_w)
11 is too fast (popira checked on various tracks, finish before getting to 100% then jump to 100%) where is this multiplier coming from? clock divided?
10 seems close to correct for ddrfammt, popira, might need fine tuning. seems too slow for rad_crdn / rad_bass?
tweaked to 10.3f stay in time with the first song in https://www.youtube.com/watch?v=3x1C9bhC2rc
+
+ the usual clock divided by 2 would be 10.738636 but that's too high
*/
attotime period = attotime::from_hz(10.3f * (m_sndtimer[t]));
m_sound_timer[t]->adjust(period, t, period);
@@ -514,7 +516,7 @@ WRITE8_MEMBER(xavix_state::sound_irqstatus_w)
WRITE8_MEMBER(xavix_state::sound_75ff_w)
{
- m_unksnd75ff = data;
+ m_unk_snd75ff = data;
LOG("%s: sound_75ff_w %02x\n", machine().describe_context(), data);
}
diff --git a/src/mame/drivers/xavix.cpp b/src/mame/drivers/xavix.cpp
index 224b2b0d3d2..486fc9ce2a3 100644
--- a/src/mame/drivers/xavix.cpp
+++ b/src/mame/drivers/xavix.cpp
@@ -93,7 +93,7 @@
24 Gan-Gan Revoultion /TAKARA/Japan - - - - - - -
2003 1 Tokyo Friend Park II /EPOCH/Japan - - - - - - -
2 TV mah-jongg /EPOCH/Japan - - - - - - -
- 3 e-kara Web /TAKARA/Japan - - - - - - -
+ 3 e-kara Web /TAKARA/Japan (e-kara web unit is a PC attachment, e-kara web carts can have songs flashed into them)
4 Doraemon TV computer /EPOCH/Japan - - - - - - -
5 Exciting stadium DX, Hansin Tigers version /EPOCH/Japan - - - - - - -
6 Dragon Quest /SQUARE ENIX/Japan - - - 8M - SSD 2000? dumped
@@ -135,8 +135,8 @@
16 Popira2 /TAKARA/Japan - - - - - - -
17 Zuba-Zuba Blade /TAKARA/Japan - - - - - - -
18 Starter set for e-kara N "Morning sisters" /TAKARA/Japan - - - - - - -
- 19 e-kara /Hasbro/England - - - - - - -
- 20 e-kara /Takara USA/USA - - - - - - -
+ 19 e-kara /Hasbro/England - - - - - - dumped? (if same as one of the 'US' sets?)
+ 20 e-kara /Takara USA/USA - - - - - - dumped? (or #10 below, this might be ekaraa set with improved text)
21 e-kara PLAY TV Soccer /RADICA/USA 76088500 x8 none none SSD 98 PA7351-107 (aka Radica PlayTV Soccer? if so, have)
22 PLAY TV Jr. Construction /RADICA/USA - - - - - - -
23 PLAY TV Boxing /RADICA/Japan 72039 x8 48 2M none SSD 98 PA7351-107 dumped
@@ -161,7 +161,7 @@
10 Popira Korea version /SONOKONG/Korea - - - - - - -
11 I singer: e-kara Korean version /SONOKONG/Korea - - - - - - -
12 Ms.Comett, Lovely baton /TAKARA/Japan< - - - - - - -
- 13 Dance Dance revolution family mat /KONAMI,KONAMI Sports/Japan - - - - - - -
+ 13 Dance Dance revolution family mat /KONAMI,KONAMI Sports/Japan - - - - - - dumped
14 PLAY TV Card Night /RADICA/USA 71063 x8 40 1M none SSD 98 PA7351-107 dumped
15 PLAY TV Bass Fishin' /RADICA/USA 71008 x8 40 1M none SSD 98 PA7351-107 dumped
16 PLAY TV Snowboarder (blue) /RADICA/USA 71023 x8 40 1M none SSD 98 PL7351-181 dumped
@@ -177,9 +177,9 @@
26 Webdiver Gradion /TAKARA/Japan - - - - - - -
27 black bass tsurouze! Excite Fishing/EPOCH/Japan - - - - - - -
28 Hamu-chan's Daishuugou dance surunoda! hasirunoda!/EPOCH/Japan - - - - - - -
- 2000 1 Popira /TAKARA/Japan - - - - - - -
+ 2000 1 Popira /TAKARA/Japan - - - - - - dumped
2 e-kara Duet microphone /TAKARA/Japan - - - - - - -
- 3 e-kara /TAKARA/Japan - - - - - - -
+ 3 e-kara /TAKARA/Japan - - - - - - dumped
4 Let's play ping-pong. Exciting ping-pong /EPOCH/Japan - - - - - - -
5 PLAY TV Huntin' Buckmasters /RADICA/USA 8074 x8 none none SSD 98 PA7351-107 have
6 PLAY TV Ping Pong /RADICA/USA,HK,EU 8028 x8 48 1M none SSD 97 PA7270-107 dumped
@@ -208,6 +208,8 @@
// NTSC clock for regular XaviX?
#define MAIN_CLOCK XTAL(21'477'272)
+// some games (eg Radica Opus) run off a 3.579545MHz XTAL ( same as the above /6 ) so presumably there is a divider / multiplier circuit on some PCBs?
+// TODO: what's the PAL clock?
/* rad_madf has callf #$8f3f21 in various places, and expects to jump to code in ROM, it is unclear how things map in this case, as presumably
the CPU 0 page memory and stack are still at 0 but ROM must be in the 3xxx range (game hasn't got far enough to call this yet to help either)
@@ -236,24 +238,6 @@
*/
-READ8_MEMBER(xavix_state::opcodes_000000_r)
-{
- if (offset & 0x8000)
- {
- return m_rgn[(offset) & (m_rgnlen - 1)];
- }
- else
- {
- return m_lowbus->read8(space, offset & 0x7fff);
- }
-}
-
-READ8_MEMBER(xavix_state::opcodes_800000_r)
-{
- // rad_fb, rad_madf confirm that for >0x800000 the CPU only sees ROM when executing opcodes
- return m_rgn[(offset) & (m_rgnlen - 1)];
-}
-
// this is only used for opcode / oprand reads, data memory addressing is handled in core, doing the opcode / oprand addressing in core causes disassembly issues when running from lowbus space (ram, interrupts on most games)
void xavix_state::xavix_map(address_map &map)
{
@@ -343,10 +327,8 @@ void xavix_state::xavix_lowbus_map(address_map &map)
// Slot Registers
map(0x7810, 0x7810).w(FUNC(xavix_state::slotreg_7810_w)); // startup
- // External Interface
- map(0x7900, 0x7900).w(FUNC(xavix_state::extintrf_7900_w));
- map(0x7901, 0x7901).w(FUNC(xavix_state::extintrf_7901_w));
- map(0x7902, 0x7902).w(FUNC(xavix_state::extintrf_7902_w));
+ // External Bus Interface control
+ map(0x7900, 0x7902).rw(FUNC(xavix_state::extintrf_790x_r), FUNC(xavix_state::extintrf_790x_w));
// DMA Controller
map(0x7980, 0x7980).rw(FUNC(xavix_state::rom_dmastat_r), FUNC(xavix_state::rom_dmatrg_w));
@@ -392,8 +374,8 @@ void xavix_state::xavix_lowbus_map(address_map &map)
// CPU Vector registers
map(0x7ff9, 0x7ff9).w(FUNC(xavix_state::vector_enable_w)); // enables / disables the custom vectors
- map(0x7ffa, 0x7ffa).w(FUNC(xavix_state::nmi_vector_lo_w)); // an IRQ vector (nmi?)
- map(0x7ffb, 0x7ffb).w(FUNC(xavix_state::nmi_vector_hi_w));
+ map(0x7ffa, 0x7ffa).rw(FUNC(xavix_state::nmi_vector_lo_r), FUNC(xavix_state::nmi_vector_lo_w)); // an IRQ vector (nmi?) - popira needs to read it back if you pause on one of the seeprom carts
+ map(0x7ffb, 0x7ffb).rw(FUNC(xavix_state::nmi_vector_hi_r), FUNC(xavix_state::nmi_vector_hi_w));
map(0x7ffc, 0x7ffc).rw(FUNC(xavix_state::irq_source_r), FUNC(xavix_state::irq_source_w));
// map(0x7ffd, 0x7ffd) some of the Nostalgia games read here, why?
map(0x7ffe, 0x7ffe).w(FUNC(xavix_state::irq_vector_lo_w)); // an IRQ vector (irq?)
@@ -464,10 +446,77 @@ static INPUT_PORTS_START( xavix )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_START("AN0")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN1")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN2")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN3")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN4")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN5")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN6")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_START("AN7")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+
PORT_START("REGION") // PAL/NTSC flag
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM )
INPUT_PORTS_END
+static INPUT_PORTS_START( xavix_an )
+ PORT_INCLUDE(xavix)
+
+ // test inputs, not real!
+ PORT_MODIFY("AN0") // 00
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN1") // 01
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN2") // 02
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN3") // 03
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN4") // 10
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN5") // 11
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN6") // 12
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+ PORT_MODIFY("AN7") // 13
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+INPUT_PORTS_END
+
+// left + right drums together = select / forward (needed on initial screen). left drum = left in menus right drum = right in menus
+// analog reading depends heavily on timers, they're too fast right now so drum hits are too hard and register multiple times
+static INPUT_PORTS_START( taikodp )
+ PORT_INCLUDE(xavix_an)
+
+ PORT_MODIFY("AN0") // 00 (read by one type of function, handled in timer interrupt at 0x1d92 in RAM)
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+
+ PORT_MODIFY("AN1") // 01 (read by identical function to 00 but with different addresses, handled in timer interrupt at 0x1dbd in RAM)
+ PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
+
+ PORT_MODIFY("AN5") // 11 (read by different function, handled in timer interrupt at 0x1de8) (battery status related?)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_MODIFY("AN7") // 13 (read by identical function to 11 but with different addresses, handled in timer interrupt at 0x1e09 in RAM) (battery status related?)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ // not read
+ PORT_MODIFY("AN2") // 02
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_MODIFY("AN3") // 03
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_MODIFY("AN4") // 10
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_MODIFY("AN6") // 12
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
+
/*
static INPUT_PORTS_START( xavixp )
PORT_INCLUDE(xavix)
@@ -638,13 +687,20 @@ static INPUT_PORTS_START( popira )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pad 2") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Pad 3") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pad 4") PORT_PLAYER(1)
- // 0x10 unused?
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Select Previous") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Select Next") PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") PORT_PLAYER(1)
PORT_MODIFY("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) // halts execution and enables a memory viewer if used with cartridge gc0001 (debug leftover?)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@@ -699,7 +755,7 @@ static INPUT_PORTS_START( rad_pingp )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
-static INPUT_PORTS_START( namcons2 )
+static INPUT_PORTS_START( nostalgia )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0") // mappings based on Dragon Buster button list, inputs don't seem to work properly in some games, probably because bad EEPROM support means all buttons are mapped to the same thing?
@@ -779,6 +835,19 @@ static INPUT_PORTS_START( rad_rh )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
+static INPUT_PORTS_START( epo_efdx )
+ PORT_INCLUDE(xavix)
+
+ PORT_MODIFY("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // select
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // back
+ // 04/08 not used for buttons?
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
+INPUT_PORTS_END
+
/* correct, 4bpp gfxs */
static const gfx_layout charlayout =
{
@@ -843,9 +912,6 @@ void xavix_state::xavix(machine_config &config)
m_maincpu->set_vblank_int("screen", FUNC(xavix_state::interrupt));
m_maincpu->set_vector_callback(FUNC(xavix_state::get_vectors));
- // is a battery / power source required to store NVRAM in the CPU?
- NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
-
TIMER(config, "scantimer").configure_scanline(FUNC(xavix_state::scanline_cb), "screen", 0, 1);
ADDRESS_MAP_BANK(config, "lowbus").set_map(&xavix_state::xavix_lowbus_map).set_options(ENDIANNESS_LITTLE, 8, 24, 0x8000);
@@ -886,16 +952,6 @@ void xavix_i2c_state::xavix_i2c_24lc02(machine_config &config)
I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x100); // 24LC02 (taiko)
}
-void xavix_i2c_cart_state::xavix_i2c_taiko(machine_config &config)
-{
- xavix_i2c_24lc02(config);
-
- generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "ekara_cart", "bin"));
- m_cart->set_width(GENERIC_ROM8_WIDTH);
- cartslot.set_device_load(device_image_load_delegate(&xavix_i2c_cart_state::device_image_load_taiko_cart, this));
-
- SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp");
-}
void xavix_i2c_state::xavix_i2c_24lc04(machine_config &config)
{
@@ -971,40 +1027,24 @@ void xavix_madfb_state::xavix_madfb(machine_config &config)
m_ball->event_out_cb().set(FUNC(xavix_state::ioevent_trg01));
}
-DEVICE_IMAGE_LOAD_MEMBER( xavix_cart_state, ekara_cart )
-{
- uint32_t size = m_cart->common_get_size("rom");
- std::vector<uint8_t> temp;
- temp.resize(size);
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(&temp[0], size, "rom");
- memcpy(memregion("bios")->base(), &temp[0], size);
+void xavix_cart_state::xavix_cart(machine_config &config)
+{
+ xavix(config);
- return image_init_result::PASS;
+ EKARA_CART_SLOT(config, m_cartslot, 0, ekara_cart, nullptr);
}
-DEVICE_IMAGE_LOAD_MEMBER( xavix_i2c_cart_state, taiko_cart ) // TODO: check if this really is the same logic as the other ekara carts once some of the 'D' carts are dumped
+void xavix_i2c_cart_state::xavix_i2c_taiko(machine_config &config)
{
- uint32_t size = m_cart->common_get_size("rom");
- std::vector<uint8_t> temp;
- temp.resize(size);
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(&temp[0], size, "rom");
-
- memcpy(memregion("bios")->base(), &temp[0], size);
-
- return image_init_result::PASS;
-}
+ xavix_cart(config);
+ I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x100); // 24LC02
-void xavix_cart_state::xavix_cart(machine_config &config)
-{
- xavix(config);
+ SOFTWARE_LIST(config, "cart_list_japan_d").set_original("ekara_japan_d");
+ SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp");
- generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "ekara_cart", "bin"));
- m_cart->set_width(GENERIC_ROM8_WIDTH);
- cartslot.set_device_load(device_image_load_delegate(&xavix_cart_state::device_image_load_ekara_cart, this));
+ // do any of the later G/P series carts with SEEPROM work with this too? check
}
void xavix_cart_state::xavix_cart_ekara(machine_config &config)
@@ -1015,19 +1055,40 @@ void xavix_cart_state::xavix_cart_ekara(machine_config &config)
SOFTWARE_LIST(config, "cart_list_us").set_original("ekara_us");
SOFTWARE_LIST(config, "cart_list_pal").set_original("ekara_pal");
SOFTWARE_LIST(config, "cart_list_japan").set_original("ekara_japan");
- SOFTWARE_LIST(config, "cart_list_japan_ec").set_original("ekara_japan_gc");
+ SOFTWARE_LIST(config, "cart_list_japan_g").set_original("ekara_japan_g");
+ SOFTWARE_LIST(config, "cart_list_japan_p").set_original("ekara_japan_p");
+ SOFTWARE_LIST(config, "cart_list_japan_s").set_original("ekara_japan_s");
+ SOFTWARE_LIST(config, "cart_list_japan_m").set_original("ekara_japan_m");
+ SOFTWARE_LIST(config, "cart_list_japan_d").set_original("ekara_japan_d");
+ SOFTWARE_LIST(config, "cart_list_japan_en").set_original("ekara_japan_en");
SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp");
+ SOFTWARE_LIST(config, "cart_list_japan_web").set_original("ekara_japan_web");
}
void xavix_cart_state::xavix_cart_popira(machine_config &config)
{
xavix_cart(config);
+ // is a battery / power source required to store NVRAM in the CPU? Popira definitely needs NVRAM storing on power-of
+ // XaviX Tennis won't boot if you do (but that could be an unrelated SEEPROM issue?) & DDR Family Mat gets stuck in 2 Player mode with no obvious way of changing back
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
+
/* software lists */
- SOFTWARE_LIST(config, "cart_list_japan_ec").set_original("ekara_japan_gc");
+ SOFTWARE_LIST(config, "cart_list_japan_g").set_original("ekara_japan_g");
+ SOFTWARE_LIST(config, "cart_list_japan_p").set_original("ekara_japan_p");
+ SOFTWARE_LIST(config, "cart_list_japan_d").set_original("ekara_japan_d");
SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp");
}
+void xavix_cart_state::xavix_cart_ddrfammt(machine_config &config)
+{
+ xavix_cart(config);
+
+ /* software lists */
+ SOFTWARE_LIST(config, "cart_list_japan_p").set_original("ekara_japan_p");
+ //SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp"); // not for this system, but unlike other carts, actually tells you this if inserted rather than crashing the system
+}
+
void xavix_state::init_xavix()
{
m_rgnlen = memregion("bios")->bytes();
@@ -1163,6 +1224,12 @@ ROM_START( ekara )
ROM_RELOAD(0x000000, 0x100000)
ROM_END
+ROM_START( ekaraa )
+ ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
+ ROM_LOAD( "ekara2.bin", 0x600000, 0x100000, CRC(3c92d48d) SHA1(450fbe53826cdb87ec797f84b9757987afcc1ec5) )
+ ROM_RELOAD(0x000000, 0x100000)
+ROM_END
+
ROM_START( ekaraj )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "ekarajapan.bin", 0x600000, 0x100000, CRC(e459e43b) SHA1(58b7f36a81571a2df5e812c118fdf68812a05abc) )
@@ -1190,13 +1257,13 @@ ROM_END
/* XaviX hardware titles */
-CONS( 2006, taitons1, 0, 0, xavix_i2c_24lc04, namcons2, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Taito", "Let's! TV Play Classic - Taito Nostalgia 1 (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 2006, taitons1, 0, 0, xavix_i2c_24lc04, nostalgia,xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Taito", "Let's! TV Play Classic - Taito Nostalgia 1 (Japan)", MACHINE_IMPERFECT_SOUND )
-CONS( 2006, taitons2, 0, 0, xavix_i2c_24lc04, namcons2, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Taito", "Let's! TV Play Classic - Taito Nostalgia 2 (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 2006, taitons2, 0, 0, xavix_i2c_24lc04, nostalgia,xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Taito", "Let's! TV Play Classic - Taito Nostalgia 2 (Japan)", MACHINE_IMPERFECT_SOUND )
-CONS( 2006, namcons1, 0, 0, xavix_i2c_24lc04, namcons2, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Namco", "Let's! TV Play Classic - Namco Nostalgia 1 (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 2006, namcons1, 0, 0, xavix_i2c_24lc04, nostalgia,xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Namco", "Let's! TV Play Classic - Namco Nostalgia 1 (Japan)", MACHINE_IMPERFECT_SOUND )
-CONS( 2006, namcons2, 0, 0, xavix_i2c_24lc04, namcons2, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Namco", "Let's! TV Play Classic - Namco Nostalgia 2 (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 2006, namcons2, 0, 0, xavix_i2c_24lc04, nostalgia,xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD / Namco", "Let's! TV Play Classic - Namco Nostalgia 2 (Japan)", MACHINE_IMPERFECT_SOUND )
CONS( 2000, rad_ping, 0, 0, xavix, rad_ping, xavix_state, init_xavix, "Radica / SSD Company LTD / Simmer Technology", "Play TV Ping Pong (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // "Simmer Technology" is also known as "Hummer Technology Co., Ltd"
CONS( 2000, rad_pingp, rad_ping, 0, xavixp, rad_pingp,xavix_state, init_xavix, "Radica / SSD Company LTD / Simmer Technology", "ConnecTV Table Tennis (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
@@ -1207,8 +1274,8 @@ CONS( 2003, rad_mtrkp, rad_mtrk, 0, xavix_mtrkp, rad_mtrkp,xavix_mtrk_st
CONS( 200?, rad_box, 0, 0, xavix, rad_box, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Boxin' (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 200?, rad_boxp, rad_box, 0, xavixp, rad_boxp, xavix_state, init_xavix, "Radica / SSD Company LTD", "ConnecTV Boxin' (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
-CONS( 200?, rad_crdn, 0, 0, xavix, rad_crdn, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Card Night (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
-CONS( 200?, rad_crdnp, rad_crdn, 0, xavixp, rad_crdnp,xavix_state, init_xavix, "Radica / SSD Company LTD", "ConnecTV Card Night (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, rad_crdn, 0, 0, xavix, rad_crdn, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Card Night (NTSC)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, rad_crdnp, rad_crdn, 0, xavixp, rad_crdnp,xavix_state, init_xavix, "Radica / SSD Company LTD", "ConnecTV Card Night (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
CONS( 2002, rad_bb2, 0, 0, xavix, rad_bb2, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Baseball 2 (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // contains string "Radica RBB2 V1.0"
@@ -1225,20 +1292,28 @@ CONS( 200?, rad_fb, 0, 0, xavix_madfb, rad_fb, xavix_madfb_s
CONS( 200?, rad_rh, 0, 0, xavix, rad_rh, xavix_state, init_xavix, "Radioa / Fisher-Price / SSD Company LTD", "Play TV Rescue Heroes (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
-CONS( 200?, epo_efdx, 0, 0, xavix_i2c_24c08, xavix, xavix_i2c_state, init_epo_efdx, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_state, init_epo_efdx, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 200?, has_wamg, 0, 0, xavix, xavix, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
-// timers need fixing up, otherwise music plays at the wrong speed
-CONS( 2000, ekara, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IS_BIOS_ROOT ) // unclear if same ROM was used for Europe and US
-CONS( 2000, ekaraj, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IS_BIOS_ROOT )
+
+/* Music titles: Emulation note:
+ SEEPROM write appears to work (save NVRAM file looks valid) but game fails to read it back properly, fails backup data checksum, and blanks it again.
+ Timers might not be 100%, PAL stuff uses different ways to do timing.
+*/
+CONS( 2000, ekara, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turn it on" without cart
+CONS( 2000, ekaraa, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turning on e-kara" without cart
+CONS( 2000, ekaraj, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows Japanese message without cart
// there appear to be later e-kara releases for each region with 3 built in songs too
-CONS( 2001, ddrfammt, 0, 0, xavix_cart, ddrfammt, xavix_cart_state, init_xavix, "Takara / Konami / SSD Company LTD", "Dance Dance Revolution Family Mat (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND|MACHINE_IS_BIOS_ROOT )
+CONS( 2001, ddrfammt, 0, 0, xavix_cart_ddrfammt,ddrfammt, xavix_cart_state, init_xavix, "Takara / Konami / SSD Company LTD", "Dance Dance Revolution Family Mat (Japan)", MACHINE_IMPERFECT_SOUND/*|MACHINE_IS_BIOS_ROOT*/ )
+
+CONS( 2000, popira, 0, 0, xavix_cart_popira,popira, xavix_cart_state, init_xavix, "Takara / SSD Company LTD", "Popira (Japan)", MACHINE_IMPERFECT_SOUND/*|MACHINE_IS_BIOS_ROOT*/ ) // The original Popira is a single yellow unit
+
+// Popira 2 is a Green unit and a Blue Unit linked together
-CONS( 2000, popira, 0, 0, xavix_cart_popira,popira, xavix_cart_state, init_xavix, "Takara / SSD Company LTD", "Popira (Yellow, single player) (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND|MACHINE_IS_BIOS_ROOT ) // there is a blue+green set with 2 Player support, probably different ROM
+CONS( 2003, taikodp, 0, 0, xavix_i2c_taiko, taikodp, xavix_i2c_cart_state, init_xavix, "Takara / SSD Company LTD", "Taiko De Popira (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*|MACHINE_IS_BIOS_ROOT*/ ) // inputs? are the drums analog?
-CONS( 2003, taikodp, 0, 0, xavix_i2c_taiko, xavix, xavix_i2c_cart_state, init_xavix, "Takara / SSD Company LTD", "Taiko De Popira (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND|MACHINE_IS_BIOS_ROOT ) // inputs? are the drums analog?
/* SuperXaviX hardware titles */
diff --git a/src/mame/includes/xavix.h b/src/mame/includes/xavix.h
index f41fe709db6..cdc0c1d79d4 100644
--- a/src/mame/includes/xavix.h
+++ b/src/mame/includes/xavix.h
@@ -13,6 +13,7 @@
#include "machine/i2cmem.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
+#include "bus/ekara/slot.h"
#include "machine/nvram.h"
#include "machine/xavix_mtrk_wheel.h"
@@ -69,9 +70,11 @@ public:
: driver_device(mconfig, type, tag),
m_in0(*this, "IN0"),
m_in1(*this, "IN1"),
+ m_an_in(*this, "AN%u", 0U),
m_maincpu(*this, "maincpu"),
m_nvram(*this, "nvram"),
m_screen(*this, "screen"),
+ m_lowbus(*this, "lowbus"),
m_sprite_xhigh_ignore_hack(true),
m_mainram(*this, "mainram"),
m_fragment_sprite(*this, "fragment_sprite"),
@@ -92,7 +95,6 @@ public:
m_palette(*this, "palette"),
m_region(*this, "REGION"),
m_gfxdecode(*this, "gfxdecode"),
- m_lowbus(*this, "lowbus"),
m_sound(*this, "xavix_sound")
{ }
@@ -107,44 +109,9 @@ public:
DECLARE_WRITE_LINE_MEMBER(ioevent_trg04);
DECLARE_WRITE_LINE_MEMBER(ioevent_trg08);
-protected:
-
- virtual uint8_t read_io0(uint8_t direction);
- virtual uint8_t read_io1(uint8_t direction);
- virtual void write_io0(uint8_t data, uint8_t direction);
- virtual void write_io1(uint8_t data, uint8_t direction);
- required_ioport m_in0;
- required_ioport m_in1;
- required_device<xavix_device> m_maincpu;
- required_device<nvram_device> m_nvram;
- required_device<screen_device> m_screen;
-
-private:
-
- // screen updates
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
- void xavix_map(address_map &map);
-
- void xavix_lowbus_map(address_map &map);
- void xavix_extbus_map(address_map &map);
- void superxavix_lowbus_map(address_map &map);
-
- INTERRUPT_GEN_MEMBER(interrupt);
- TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
-
- // driver_device overrides
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- virtual void video_start() override;
-
- DECLARE_READ8_MEMBER(opcodes_000000_r);
- DECLARE_READ8_MEMBER(opcodes_800000_r);
-
- DECLARE_READ8_MEMBER(extbus_r) { return m_rgn[(offset) & (m_rgnlen - 1)]; }
- DECLARE_WRITE8_MEMBER(extbus_w) { logerror("write to external bus %06x %02x\n", offset, data); }
+ int m_rgnlen;
+ uint8_t* m_rgn;
/* this is just a quick memory system bypass for video reads etc. because going through the
memory system is slow and also pollutes logs significantly with unmapped reads if the games
@@ -192,12 +159,73 @@ private:
return 0x00;
}
+protected:
+
+ virtual uint8_t read_io0(uint8_t direction);
+ virtual uint8_t read_io1(uint8_t direction);
+ virtual void write_io0(uint8_t data, uint8_t direction);
+ virtual void write_io1(uint8_t data, uint8_t direction);
+ required_ioport m_in0;
+ required_ioport m_in1;
+ required_ioport_array<8> m_an_in;
+ required_device<xavix_device> m_maincpu;
+ optional_device<nvram_device> m_nvram;
+ required_device<screen_device> m_screen;
+ required_device<address_map_bank_device> m_lowbus;
+ address_space* m_cpuspace;
+ uint8_t m_extbusctrl[3];
+
+private:
+
+ // screen updates
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ void xavix_map(address_map &map);
+
+ void xavix_lowbus_map(address_map &map);
+ void xavix_extbus_map(address_map &map);
+ void superxavix_lowbus_map(address_map &map);
+
+ INTERRUPT_GEN_MEMBER(interrupt);
+ TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
+
+ // driver_device overrides
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ virtual void video_start() override;
+
+ virtual DECLARE_READ8_MEMBER(opcodes_000000_r)
+ {
+ if (offset & 0x8000)
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ else
+ {
+ return m_lowbus->read8(space, offset & 0x7fff);
+ }
+ }
+
+ virtual DECLARE_READ8_MEMBER(opcodes_800000_r)
+ {
+ // rad_fb, rad_madf confirm that for >0x800000 the CPU only sees ROM when executing opcodes
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+
+ virtual DECLARE_READ8_MEMBER(extbus_r) { return m_rgn[(offset) & (m_rgnlen - 1)]; }
+ virtual DECLARE_WRITE8_MEMBER(extbus_w)
+ {
+ logerror("%s: write to external bus %06x %02x\n", machine().describe_context(), offset, data);
+ }
+
+
DECLARE_READ8_MEMBER(sample_read)
{
return read_full_data_sp_bypass(offset);
};
- inline uint8_t read_full_data_sp_bypass(uint32_t adr)
+ virtual inline uint8_t read_full_data_sp_bypass(uint32_t adr)
{
uint8_t databank = adr >> 16;
@@ -218,9 +246,8 @@ private:
}
}
- DECLARE_WRITE8_MEMBER(extintrf_7900_w);
- DECLARE_WRITE8_MEMBER(extintrf_7901_w);
- DECLARE_WRITE8_MEMBER(extintrf_7902_w);
+ DECLARE_READ8_MEMBER(extintrf_790x_r);
+ DECLARE_WRITE8_MEMBER(extintrf_790x_w);
DECLARE_READ8_MEMBER(ioevent_enable_r);
DECLARE_WRITE8_MEMBER(ioevent_enable_w);
@@ -269,6 +296,11 @@ private:
uint8_t m_io0_direction;
uint8_t m_io1_direction;
+ uint8_t m_adc_inlatch;
+
+ DECLARE_READ8_MEMBER(nmi_vector_lo_r);
+ DECLARE_READ8_MEMBER(nmi_vector_hi_r);
+
DECLARE_WRITE8_MEMBER(vector_enable_w);
DECLARE_WRITE8_MEMBER(nmi_vector_lo_w);
DECLARE_WRITE8_MEMBER(nmi_vector_hi_w);
@@ -437,8 +469,8 @@ private:
uint8_t m_mastervol;
uint8_t m_unk_snd75f8;
- uint8_t m_unksnd75f9;
- uint8_t m_unksnd75ff;
+ uint8_t m_unk_snd75f9;
+ uint8_t m_unk_snd75ff;
uint8_t m_sndtimer[4];
uint8_t m_timer_baseval;
@@ -492,9 +524,6 @@ private:
uint8_t m_spritereg;
- int m_rgnlen;
- uint8_t* m_rgn;
-
// variables used by rendering
int m_tmp_dataaddress;
int m_tmp_databit;
@@ -505,7 +534,6 @@ private:
uint8_t get_next_byte();
int get_current_address_byte();
- required_device<address_map_bank_device> m_lowbus;
required_device<xavix_sound_device> m_sound;
DECLARE_READ8_MEMBER(sound_regram_read_cb);
@@ -596,33 +624,176 @@ class xavix_cart_state : public xavix_state
public:
xavix_cart_state(const machine_config &mconfig, device_type type, const char *tag)
: xavix_state(mconfig, type, tag),
- m_cart(*this, "cartslot")
+ m_cartslot(*this, "cartslot")
{ }
void xavix_cart(machine_config &config);
void xavix_cart_ekara(machine_config &config);
void xavix_cart_popira(machine_config &config);
+ void xavix_cart_ddrfammt(machine_config &config);
protected:
- required_device<generic_slot_device> m_cart;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ekara_cart);
- //READ8_MEMBER(cart_r) { return m_cart->read_rom(space, offset); }
+
+ // for Cart cases this memory bypass becomes more complex
+
+ virtual DECLARE_READ8_MEMBER(opcodes_000000_r) override
+ {
+ if (offset & 0x8000)
+ {
+ if (offset & 0x400000)
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ else
+ {
+ if (m_cartslot->has_cart())
+ {
+ return m_cartslot->read_cart(*m_cpuspace, offset);
+ }
+ else
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ }
+ }
+ else
+ {
+ return m_lowbus->read8(space, offset & 0x7fff);
+ }
+ }
+
+ virtual DECLARE_READ8_MEMBER(opcodes_800000_r) override
+ {
+ if (offset & 0x400000)
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ else
+ {
+ if (m_cartslot->has_cart())
+ {
+ return m_cartslot->read_cart(*m_cpuspace, offset);
+ }
+ else
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ }
+ }
+
+ virtual DECLARE_READ8_MEMBER(extbus_r) override
+ {
+ if (m_extbusctrl[1] & 0x08)
+ {
+ logerror("%s: read from external bus %06x (SEEPROM READ?)\n", machine().describe_context(), offset);
+ return m_cartslot->read_extra(*m_cpuspace, offset);
+ }
+ else
+ {
+ if (offset & 0x400000)
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ else
+ {
+ if (m_cartslot->has_cart())
+ {
+ return m_cartslot->read_cart(*m_cpuspace, offset);
+ }
+ else
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ }
+ }
+ }
+ virtual DECLARE_WRITE8_MEMBER(extbus_w) override
+ {
+ if (m_extbusctrl[0] & 0x08)
+ {
+ logerror("%s: write to external bus %06x %02x (SEEPROM WRITE?)\n", machine().describe_context(), offset, data);
+ return m_cartslot->write_extra(*m_cpuspace, offset, data);
+ }
+ else
+ {
+ if (m_cartslot->has_cart())
+ {
+ return m_cartslot->write_cart(*m_cpuspace, offset, data);
+ }
+ else
+ {
+ logerror("%s: write to external bus %06x %02x\n", machine().describe_context(), offset, data);
+ }
+ }
+ }
+
+ virtual inline uint8_t read_full_data_sp_bypass(uint32_t offset) override
+ {
+ uint8_t databank = offset >> 16;
+
+ if (databank >= 0x80)
+ {
+ if (offset & 0x400000)
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ else
+ {
+ if (m_cartslot->has_cart())
+ {
+ return m_cartslot->read_cart(*m_cpuspace, offset);
+ }
+ else
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ }
+ }
+ else
+ {
+ if ((offset & 0xffff) >= 0x8000)
+ {
+ if (offset & 0x400000)
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ else
+ {
+ if (m_cartslot->has_cart())
+ {
+ return m_cartslot->read_cart(*m_cpuspace, offset);
+ }
+ else
+ {
+ return m_rgn[(offset) & (m_rgnlen - 1)];
+ }
+ }
+ }
+ else
+ {
+ return read_full_data_sp_lowbus_bypass(offset);
+ }
+ }
+ }
+
+ required_device<ekara_cart_slot_device> m_cartslot;
};
-class xavix_i2c_cart_state : public xavix_i2c_state
+class xavix_i2c_cart_state : public xavix_cart_state
{
public:
xavix_i2c_cart_state(const machine_config &mconfig, device_type type, const char *tag)
- : xavix_i2c_state(mconfig,type,tag),
- m_cart(*this, "cartslot")
+ : xavix_cart_state(mconfig,type,tag),
+ m_i2cmem(*this, "i2cmem")
{ }
void xavix_i2c_taiko(machine_config &config);
protected:
- required_device<generic_slot_device> m_cart;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(taiko_cart);
- //READ8_MEMBER(cart_r) { return m_cart->read_rom(space, offset); }
+ virtual uint8_t read_io1(uint8_t direction) override;
+ virtual void write_io1(uint8_t data, uint8_t direction) override;
+
+ required_device<i2cmem_device> m_i2cmem;
};
diff --git a/src/mame/machine/xavix.cpp b/src/mame/machine/xavix.cpp
index 6ede34905f8..2f2d164be05 100644
--- a/src/mame/machine/xavix.cpp
+++ b/src/mame/machine/xavix.cpp
@@ -94,12 +94,22 @@ WRITE8_MEMBER(xavix_state::vector_enable_w)
m_vectorenable = data;
}
+READ8_MEMBER(xavix_state::nmi_vector_lo_r)
+{
+ return m_nmi_vector_lo_data;
+}
+
WRITE8_MEMBER(xavix_state::nmi_vector_lo_w)
{
LOG("%s: nmi_vector_lo_w %02x\n", machine().describe_context(), data);
m_nmi_vector_lo_data = data;
}
+READ8_MEMBER(xavix_state::nmi_vector_hi_r)
+{
+ return m_nmi_vector_hi_data;
+}
+
WRITE8_MEMBER(xavix_state::nmi_vector_hi_w)
{
LOG("%s: nmi_vector_hi_w %02x\n", machine().describe_context(), data);
@@ -118,21 +128,22 @@ WRITE8_MEMBER(xavix_state::irq_vector_hi_w)
m_irq_vector_hi_data = data;
}
+// this is external bus control (access to ROM etc.)
-WRITE8_MEMBER(xavix_state::extintrf_7900_w)
+READ8_MEMBER(xavix_state::extintrf_790x_r)
{
- LOG("%s: extintrf_7900_w %02x (---FIRST WRITE ON STARTUP---)\n", machine().describe_context(), data);
+ LOG("%s: extintrf_790x_r %02x\n", machine().describe_context(), offset);
+ return m_extbusctrl[offset];
}
-WRITE8_MEMBER(xavix_state::extintrf_7901_w)
+WRITE8_MEMBER(xavix_state::extintrf_790x_w)
{
- LOG("%s: extintrf_7901_w %02x\n", machine().describe_context(), data);
+ // Popira, Taiko De Popira etc. games with SEEPROM cartridges uses this to swap between ROM and other peripherals in the cart for data bus access?
+ LOG("%s: extintrf_790x_w %02x %02x\n", machine().describe_context(), offset, data);
+ m_extbusctrl[offset] = data;
}
-WRITE8_MEMBER(xavix_state::extintrf_7902_w)
-{
- LOG("%s: extintrf_7902_w %02x\n", machine().describe_context(), data);
-}
+
@@ -231,11 +242,12 @@ WRITE8_MEMBER(xavix_state::adc_7b00_w)
READ8_MEMBER(xavix_state::adc_7b80_r)
{
LOG("%s: adc_7b80_r\n", machine().describe_context());
- return 0x00;//0xff;
+ return m_adc_inlatch;
}
WRITE8_MEMBER(xavix_state::adc_7b80_w)
{
+ // is the latch writeable?
LOG("%s: adc_7b80_w %02x\n", machine().describe_context(), data);
}
@@ -247,8 +259,23 @@ WRITE8_MEMBER(xavix_state::adc_7b81_w)
LOG("%s: adc_7b81_w %02x\n", machine().describe_context(), data);
m_adc_control = data;
-// m_adc_timer->adjust(attotime::from_usec(200));
+ // bit 0x40 = run? or IRQ? (doesn't seem to be any obvious way to clear IRQs tho, ADC handling is usually done in timer IRQ?)
+ // should probably set latch after a timer has expired not instantly?
+ // bits 0x0c are not port select?
+ // bit 0x80 is some kind of ack? / done flag?
+ switch (m_adc_control & 0x13)
+ {
+ case 0x00: m_adc_inlatch = m_an_in[0]->read(); break;
+ case 0x01: m_adc_inlatch = m_an_in[1]->read(); break;
+ case 0x02: m_adc_inlatch = m_an_in[2]->read(); break;
+ case 0x03: m_adc_inlatch = m_an_in[3]->read(); break;
+ case 0x10: m_adc_inlatch = m_an_in[4]->read(); break;
+ case 0x11: m_adc_inlatch = m_an_in[5]->read(); break;
+ case 0x12: m_adc_inlatch = m_an_in[6]->read(); break;
+ case 0x13: m_adc_inlatch = m_an_in[7]->read(); break;
+ }
+// m_adc_timer->adjust(attotime::from_usec(200));
}
READ8_MEMBER(xavix_state::adc_7b81_r)
@@ -428,6 +455,34 @@ void xavix_i2c_state::write_io1(uint8_t data, uint8_t direction)
}
}
+// for taikodp
+uint8_t xavix_i2c_cart_state::read_io1(uint8_t direction)
+{
+ uint8_t ret = m_in1->read();
+
+ if (!(direction & 0x08))
+ {
+ ret &= ~0x08;
+ ret |= (m_i2cmem->read_sda() & 1) << 3;
+ }
+
+ return ret;
+}
+
+void xavix_i2c_cart_state::write_io1(uint8_t data, uint8_t direction)
+{
+ if (direction & 0x08)
+ {
+ m_i2cmem->write_sda((data & 0x08) >> 3);
+ }
+
+ if (direction & 0x10)
+ {
+ m_i2cmem->write_scl((data & 0x10) >> 4);
+ }
+}
+
+
uint8_t xavix_i2c_lotr_state::read_io1(uint8_t direction)
{
uint8_t ret = m_in1->read();
@@ -842,7 +897,49 @@ void xavix_state::machine_start()
}
// at least some of the internal CPU RAM is backed up, not sure how much
- m_nvram->set_base(&m_mainram[0x3e00], 0x200);
+ if (m_nvram)
+ m_nvram->set_base(&m_mainram[0x3e00], 0x200);
+
+
+ save_item(NAME(m_extbusctrl));
+ save_item(NAME(m_ioevent_enable));
+ save_item(NAME(m_ioevent_active));
+ save_item(NAME(m_io0_data));
+ save_item(NAME(m_io1_data));
+ save_item(NAME(m_io0_direction));
+ save_item(NAME(m_io1_direction));
+ save_item(NAME(m_adc_control));
+ save_item(NAME(m_sound_irqstatus));
+ save_item(NAME(m_soundreg16_0));
+ save_item(NAME(m_soundreg16_1));
+ save_item(NAME(m_sound_regbase));
+ save_item(NAME(m_timer_control));
+ save_item(NAME(m_timer_freq));
+ save_item(NAME(m_txarray));
+ save_item(NAME(m_irqsource));
+ save_item(NAME(m_vectorenable));
+ save_item(NAME(m_nmi_vector_lo_data));
+ save_item(NAME(m_nmi_vector_hi_data));
+ save_item(NAME(m_irq_vector_lo_data));
+ save_item(NAME(m_irq_vector_hi_data));
+ save_item(NAME(m_multparams));
+ save_item(NAME(m_multresults));
+ save_item(NAME(m_spritefragment_dmaparam1));
+ save_item(NAME(m_spritefragment_dmaparam2));
+ save_item(NAME(m_tmap1_regs));
+ save_item(NAME(m_tmap2_regs));
+ save_item(NAME(m_arena_start));
+ save_item(NAME(m_arena_end));
+ save_item(NAME(m_arena_control));
+ save_item(NAME(m_6ff0));
+ save_item(NAME(m_video_ctrl));
+ save_item(NAME(m_mastervol));
+ save_item(NAME(m_unk_snd75f8));
+ save_item(NAME(m_unk_snd75f9));
+ save_item(NAME(m_unk_snd75ff));
+ save_item(NAME(m_sndtimer));
+ save_item(NAME(m_timer_baseval));
+ save_item(NAME(m_spritereg));
}
void xavix_state::machine_reset()
@@ -873,8 +970,8 @@ void xavix_state::machine_reset()
m_mastervol = 0x00;
m_unk_snd75f8 = 0x00;
- m_unksnd75f9 = 0x00;
- m_unksnd75ff = 0x00;
+ m_unk_snd75f9 = 0x00;
+ m_unk_snd75ff = 0x00;
for (int i = 0; i < 4; i++)
{
@@ -911,6 +1008,13 @@ void xavix_state::machine_reset()
m_adc_control = 0x00;
m_sprite_xhigh_ignore_hack = true;
+
+ m_cpuspace = &m_maincpu->space(AS_PROGRAM);
+
+ m_extbusctrl[0] = 0x00;
+ m_extbusctrl[1] = 0x00;
+ m_extbusctrl[2] = 0x00;
+
}
typedef device_delegate<uint8_t(int which, int half)> xavix_interrupt_vector_delegate;
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index ce324c7d493..8eb3717e2b6 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -39681,6 +39681,7 @@ epo_efdx //
rad_rh //
has_wamg //
ekara //
+ekaraa //
ekaraj //
ddrfammt //
popira //