Skip to content

Commit d4ed4c4

Browse files
authored
Dumped 11 systems (two working). (#13235)
* machine/generalplus_gpl16250soc_video.cpp: Treat DMA destination 0 sprite RAM to work around issue in jak_spmm. * cpu/m6502: Use conventional call stack for SuperXaviX. * super_tv_pc_cart.xml: Verified dump of Double Mouse Party. * machine/spg_renderer.cpp: Fixed lower bit depth modes (added games use 6 bits per pixel modes). New working systems --------------------- Bandai Let's! TV Play Nou to Karada o Kitaeru Taikan Zunou Family Mattore (Japan) [David Haywood, Team Europe] Takara / SSD Company LTD Webdiver DX W-05 Gladion (Japan) [David Haywood, TeamEurope] New systems marked not working -------------------------------- Bandai Let's! TV Play Digital Monster Battle Junction (Japan) [David Haywood, Team Europe] Bandai / SSD Company LTD Let's! TV Play Narikiri Taikan Boukenger Hashire! Ute! Mission Start!! (Japan) [David Haywood, TeamEurope] Bandai / SSD Company LTD Let's! TV Play Taikan Cast Off - Kamen Rider Kabuto Clock Up & Rider Kick!! (Japan) [David Haywood, TeamEurope] Enter Tech Leadsinger II (LS-K2) [David Haywood, Sean Riddle] Epoch / SSD Company LTD Doraemon Taikan Take-copter! Sora Tobu Daibouken (Japan) [David Haywood, TeamEurope] Epoch / SSD Company LTD Ishikawa Ryou Excite Golf (Japan) [David Haywood, TeamEurope] JAKKS Pacific Inc / Santa Cruz Games The Amazing Spider-Man and The Masked Menace (JAKKS Pacific TV Game) [David Haywood, TeamEurope] Radica / FarSight Studios Connectv Real Swing Golf (set 2) [David Haywood, Sean Riddle] WinFun TV Art Design Center [David Haywood, TeamEurope]
1 parent 4832f65 commit d4ed4c4

17 files changed

+533
-256
lines changed

hash/super_tv_pc_cart.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ license:CC0-1.0
4040
<info name="alt_title" value="ダブルマウスパーティー" />
4141
<part name="cart" interface="super_tv_pc_cart">
4242
<dataarea name="prg" size="0x200000">
43-
<!-- baddump because code seems to be corrupt in places -->
44-
<rom name="c-03.u1" size="0x200000" crc="94634a7b" sha1="d69ec0a8c6061e749206927ee68dbcf852fcc03e" status="baddump" />
43+
<rom name="c-03.u1" size="0x200000" crc="94634a7b" sha1="d69ec0a8c6061e749206927ee68dbcf852fcc03e" />
4544
</dataarea>
4645
</part>
4746
</software>

src/devices/cpu/m6502/oxavix.lst

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
callf_xa3
66
read_stack(SP);
7-
write_special_stack(get_codebank());
7+
write_special_stack(SP, get_codebank());
88
dec_special_stack();
99
TMP2 = read_pc();
1010
PC++;
@@ -40,7 +40,7 @@ retf_imp
4040
inc_SP();
4141
PC = set_h(PC, read_stack(SP));
4242
inc_special_stack();
43-
TMP2 = read_special_stack();
43+
TMP2 = read_special_stack(SP);
4444
set_codebank(TMP2);
4545
read_pc();
4646
PC++;
@@ -55,7 +55,7 @@ brk_xav_imp
5555
read_pc();
5656
PC++;
5757
}
58-
write_special_stack(get_codebank());
58+
write_special_stack(SP, get_codebank());
5959
set_codebank(0x00); // epo_efdx, rad_ping and rad_mtrk strongly suggest that interrupts must force bank 0 as code jumps to a ROM pointer stored earlier / a fixed pointer to a rom address in bank 0
6060
dec_special_stack();
6161
write_stack(SP, PC >> 8);
@@ -123,7 +123,7 @@ rti_xav_imp
123123
inc_SP();
124124
PC = set_h(PC, read_stack(SP));
125125
inc_special_stack();
126-
TMP2 = read_special_stack();
126+
TMP2 = read_special_stack(SP);
127127
set_codebank(TMP2);
128128
prefetch();
129129

src/devices/cpu/m6502/xavix.cpp

+34-6
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,52 @@ xavix_device::mi_xavix::mi_xavix(xavix_device *_base)
106106
base = _base;
107107
}
108108

109-
void xavix_device::write_special_stack(uint8_t data)
109+
void xavix_device::write_special_stack(uint32_t addr, uint8_t data)
110110
{
111-
m_special_stack[m_special_stackpos&0xff] = data;
111+
if (m_use_private_stack_for_extra_callf_byte)
112+
{
113+
m_special_stack[m_special_stackpos & 0xff] = data;
114+
}
115+
else
116+
{
117+
write_stack(addr, data);
118+
}
112119
}
113120

114121
void xavix_device::dec_special_stack()
115122
{
116-
m_special_stackpos--;
123+
if (m_use_private_stack_for_extra_callf_byte)
124+
{
125+
m_special_stackpos--;
126+
}
127+
else
128+
{
129+
dec_SP();
130+
}
117131
}
118132

119133
void xavix_device::inc_special_stack()
120134
{
121-
m_special_stackpos++;
135+
if (m_use_private_stack_for_extra_callf_byte)
136+
{
137+
m_special_stackpos++;
138+
}
139+
else
140+
{
141+
inc_SP();
142+
}
122143
}
123144

124-
uint8_t xavix_device::read_special_stack()
145+
uint8_t xavix_device::read_special_stack(uint32_t addr)
125146
{
126-
return m_special_stack[m_special_stackpos&0xff];
147+
if (m_use_private_stack_for_extra_callf_byte)
148+
{
149+
return m_special_stack[m_special_stackpos & 0xff];
150+
}
151+
else
152+
{
153+
return read_stack(addr);
154+
}
127155
}
128156

129157

src/devices/cpu/m6502/xavix.h

+12-2
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ class xavix_device : public m6502_device {
192192
void set_databank(uint8_t bank);
193193
uint8_t get_databank();
194194

195-
void write_special_stack(uint8_t data);
195+
void write_special_stack(uint32_t addr, uint8_t data);
196196
void dec_special_stack();
197197
void inc_special_stack();
198-
uint8_t read_special_stack();
198+
uint8_t read_special_stack(uint32_t addr);
199199

200200
/* we store the additional 'codebank' used for far calls in a different, private stack
201201
this seems to be neccessary for 'rad_hnt2' not to crash when bringing up the calibration / score table screens
@@ -211,6 +211,16 @@ class xavix_device : public m6502_device {
211211
uint8_t read_zeropage(uint32_t addr);
212212
void write_zeropage(uint32_t addr, uint8_t val);
213213

214+
// Some original XaviX games seemed to suggest that the extra byte of the far calls went to a different
215+
// stack, but dblmouse on suprtvpc does direct stack manipulation which challenges this assumption.
216+
// It could be a SuperXaviX vs XaviX differences however, so currently leaving this as a toggle for testing.
217+
//
218+
// pausing in rad_hnt2 (press shift when on the map) is broken without this logic as the stack becomes too
219+
// big with the extra bytes
220+
//
221+
// we currently use the private stack for regular XaviX but not for the later CPUs, however the root cause
222+
// of needing it for regular XaviX could be somewhere else
223+
bool m_use_private_stack_for_extra_callf_byte = true;
214224
};
215225

216226
enum {

src/devices/cpu/m6502/xavix2000.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ DEFINE_DEVICE_TYPE(XAVIX2002, xavix2002_device, "xavix2002", "XaviX (SSD 2002) (
3838
xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
3939
xavix_device(mconfig, type, tag, owner, clock)
4040
{
41+
m_use_private_stack_for_extra_callf_byte = false;
4142
}
4243

4344
xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :

src/devices/machine/generalplus_gpl16250soc_video.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,11 @@ void gcm394_base_video_device::video_dma_size_trigger_w(address_space &space, ui
779779

780780
LOGMASKED(LOG_GCM394_VIDEO_DMA, "%s: doing sprite / video DMA source %04x dest %04x size %04x value of 707e (bank) %04x value of 707f %04x\n", machine().describe_context(), m_videodma_source, m_videodma_dest, m_videodma_size, m_707e_spritebank, m_707f );
781781

782+
// jak_spmm sets dest to 0 when it wants to write to spriteram, looks intentional?
783+
// does something else force writes to go to spriteram or does 0 always just mean there?
784+
if (m_videodma_dest == 0)
785+
m_videodma_dest = 0x7400;
786+
782787
for (int i = 0; i <= m_videodma_size; i++)
783788
{
784789
uint16_t dat = space.read_word(m_videodma_source+i);

src/devices/machine/spg_renderer.cpp

+26-15
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ void spg_renderer_device::draw_linemap(bool has_extended_tilemaps, const rectang
255255
uint32_t tilemap = tilemapregs[2];
256256
uint32_t palette_map = tilemapregs[3];
257257

258-
//popmessage("draw draw_linemap bases %04x %04x\n", tilemap, palette_map);
258+
//if (scanline == 128)
259+
// popmessage("draw draw_linemap reg0 %04x reg1 %04x bases %04x %04x\n", tilemapregs[0], tilemapregs[1], tilemap, palette_map);
259260

260261
//uint32_t xscroll = scrollregs[0];
261262
uint32_t yscroll = scrollregs[1];
@@ -294,26 +295,36 @@ void spg_renderer_device::draw_linemap(bool has_extended_tilemaps, const rectang
294295
}
295296
else
296297
{
297-
for (int i = 0; i < 320 / 2; i++)
298-
{
299-
uint8_t palette_entry;
300-
uint16_t color;
301-
const uint16_t data = spc.read_word(sourcebase + i);
298+
const uint32_t attr = tilemapregs[0];
299+
const uint8_t bpp = attr & 0x0003;
300+
const uint32_t nc_bpp = ((bpp)+1) << 1;
301+
uint32_t palette_offset = (attr & 0x0f00) >> 4;
302+
palette_offset >>= nc_bpp;
303+
palette_offset <<= nc_bpp;
302304

303-
palette_entry = (data & 0x00ff);
304-
color = paletteram[palette_entry];
305+
uint32_t bits = 0;
306+
uint32_t nbits = 0;
305307

306-
if (!(color & 0x8000))
307-
{
308-
m_linebuf[(i * 2) + 0] = color & 0x7fff;
308+
for (int i = 0; i < 320; i++)
309+
{
310+
bits <<= nc_bpp;
311+
if (nbits < nc_bpp)
312+
{
313+
uint16_t b = spc.read_word(sourcebase++ & 0x3fffff);
314+
b = (b << 8) | (b >> 8);
315+
bits |= b << (nc_bpp - nbits);
316+
nbits += 16;
309317
}
318+
nbits -= nc_bpp;
319+
320+
uint32_t pal = palette_offset + (bits >> 16);
321+
bits &= 0xffff;
310322

311-
palette_entry = (data & 0xff00) >> 8;
312-
color = paletteram[palette_entry];
323+
uint16_t rgb = paletteram[pal];
313324

314-
if (!(color & 0x8000))
325+
if (!(rgb & 0x8000))
315326
{
316-
m_linebuf[(i * 2) + 1] = color & 0x7fff;
327+
m_linebuf[i] = rgb;
317328
}
318329
}
319330
}

src/mame/mame.lst

+13
Original file line numberDiff line numberDiff line change
@@ -42710,6 +42710,9 @@ dbzscout
4271042710
@source:skeleton/kron.cpp
4271142711
kron180 // 1995 Kron Ltd, Ukraine
4271242712

42713+
@source:skeleton/leadsinger2.cpp
42714+
leadsng2
42715+
4271342716
@source:skeleton/lee1214.cpp
4271442717
lee1214d //
4271542718

@@ -45874,6 +45877,7 @@ batvgc
4587445877
rad_gtg
4587545878
rad_rsg
4587645879
rad_rsgp
45880+
rad_rsgpa
4587745881
rad_foot
4587845882
rad_bb3
4587945883
rad_bb3p
@@ -45917,6 +45921,7 @@ gameu50
4591745921
gameu108
4591845922
gormiti
4591945923
imgame
45924+
jak_spmm
4592045925
myac220
4592145926
smartfp // Smart Fit Park
4592245927
smartfpf
@@ -46021,10 +46026,12 @@ zone3d
4602146026
ablkickb
4602246027
abltenni //
4602346028
anpantv
46029+
ban_krkk
4602446030
comil //
4602546031
ddr33v
4602646032
decathln
4602746033
decathlna
46034+
dmbtjunc
4602846035
doraglob // (c) 2007 VTech
4602946036
doraglobf
4603046037
doraglobg
@@ -46067,6 +46074,7 @@ virtbb
4606746074
virtten
4606846075
vtechtvsgr // (c) 2006 VTech
4606946076
vtechtvssp // (c) 2006 VTech
46077+
wfart
4607046078
wfcentro
4607146079

4607246080
@source:tvgames/spg2xx_digimake.cpp
@@ -46347,6 +46355,7 @@ tak_gin //
4634746355
tak_geig //
4634846356
tak_hamr //
4634946357
tak_town //
46358+
tak_wdg //
4635046359
tak_zuba //
4635146360
tcarnavi //
4635246361
tom_tvho //
@@ -46364,6 +46373,7 @@ ltv_naru //
4636446373
domfitad //
4636546374
dombikec //
4636646375
epo_dabj
46376+
epo_dtcj
4636746377

4636846378
@source:tvgames/xavix_2000.cpp
4636946379
ban_omt //
@@ -46388,9 +46398,12 @@ ttv_swj //
4638846398
@source:tvgames/xavix_2002.cpp
4638946399
anpanmdx
4639046400
apmj2009
46401+
ban_bkgj
4639146402
ban_dn1j
4639246403
ban_kksj
46404+
ban_utmj
4639346405
epo_ntpj
46406+
epo_rgfj
4639446407
ban_ordj
4639546408
domdance //
4639646409
domfitch //

0 commit comments

Comments
 (0)