summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nicola Salmoria <nicola@mamedev.org>2008-08-27 13:39:09 +0000
committer Nicola Salmoria <nicola@mamedev.org>2008-08-27 13:39:09 +0000
commitf03d10d3357338a3d1ff9b2f7e4a0861677d1315 (patch)
treea685e3bcf06258d41ccae549849876c220f7b5ef
parent36c88b32ddb1a632dff666cfb7067df317afb922 (diff)
merged jcross.c into snk.c
fixed fg layer and visible area the game seems to be ok now? is there still something wrong?
-rw-r--r--.gitattributes2
-rw-r--r--src/mame/drivers/jcross.c340
-rw-r--r--src/mame/drivers/snk.c259
-rw-r--r--src/mame/includes/snk.h2
-rw-r--r--src/mame/mame.mak1
-rw-r--r--src/mame/mamedriv.c2
-rw-r--r--src/mame/video/jcross.c194
-rw-r--r--src/mame/video/snk.c55
8 files changed, 284 insertions, 571 deletions
diff --git a/.gitattributes b/.gitattributes
index fe836051d6c..310e6b633af 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1589,7 +1589,6 @@ src/mame/drivers/jackpool.c svneol=native#text/plain
src/mame/drivers/jailbrek.c svneol=native#text/plain
src/mame/drivers/jalmah.c svneol=native#text/plain
src/mame/drivers/jchan.c svneol=native#text/plain
-src/mame/drivers/jcross.c svneol=native#text/plain
src/mame/drivers/jedi.c svneol=native#text/plain
src/mame/drivers/jollyjgr.c svneol=native#text/plain
src/mame/drivers/jongkyo.c svneol=native#text/plain
@@ -2977,7 +2976,6 @@ src/mame/video/jagobj.c svneol=native#text/plain
src/mame/video/jaguar.c svneol=native#text/plain
src/mame/video/jailbrek.c svneol=native#text/plain
src/mame/video/jalblend.c svneol=native#text/plain
-src/mame/video/jcross.c svneol=native#text/plain
src/mame/video/jedi.c svneol=native#text/plain
src/mame/video/jpmimpct.c svneol=native#text/plain
src/mame/video/kan_panb.c svneol=native#text/plain
diff --git a/src/mame/drivers/jcross.c b/src/mame/drivers/jcross.c
deleted file mode 100644
index 6d4c8f6556e..00000000000
--- a/src/mame/drivers/jcross.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
-Jumping Cross - (c) 1984 SNK
-driver by Tomasz Slanina
-
-Based on marvin's maze driver
-
-Todo:
-- problems with sprites - strange movement in attract mode,
-- $c800-$d7ff - unknown read (related with ^^^ )
-- verify dipswitches
-- verify colors (is palette banking correct ?)
-- unused tileset (almost identical to txt layer tiles , few (3?) chars are different)
-- cocktail mdoe/screen flipping
-
-Could be bad dump ('final' romset is made of two sets marked as 'bad' )
-
-*/
-
-#include "driver.h"
-#include "cpu/z80/z80.h"
-#include "snk.h"
-#include "sound/ay8910.h"
-#include "sound/namco.h"
-
-UINT8 *jcr_textram;
-
-READ8_HANDLER( jcross_background_ram_r );
-WRITE8_HANDLER( jcross_background_ram_w );
-
-READ8_HANDLER( jcross_text_ram_r );
-WRITE8_HANDLER( jcross_text_ram_w );
-
-extern VIDEO_START( jcross );
-extern VIDEO_UPDATE( jcross );
-extern int jcross_vregs[5];
-WRITE8_HANDLER( jcross_palettebank_w );
-
-static int sound_cpu_busy=0;
-
-#ifdef UNUSED_FUNCTION
-UINT8 *jcr_sharedram;
-static READ8_HANDLER(sharedram_r){ return jcr_sharedram[offset];}
-static WRITE8_HANDLER(sharedram_w){ jcr_sharedram[offset]=data;}
-#endif
-
-static const namco_interface snkwave_interface =
-{
- 1,
- 0 /* stereo */
-};
-
-static WRITE8_HANDLER( sound_command_w )
-{
- sound_cpu_busy = 1;
- soundlatch_w(machine, 0, data);
- cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, PULSE_LINE);
-}
-
-static READ8_HANDLER( sound_command_r )
-{
- sound_cpu_busy = 0;
- return(soundlatch_r(machine,0));
-}
-
-static READ8_HANDLER( sound_nmi_ack_r )
-{
- cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, CLEAR_LINE);
- return 0;
-}
-
-static CUSTOM_INPUT( sound_status_r )
-{
- return sound_cpu_busy;
-}
-
-static WRITE8_HANDLER(jcross_vregs0_w){jcross_vregs[0]=data;}
-static WRITE8_HANDLER(jcross_vregs1_w){jcross_vregs[1]=data;}
-static WRITE8_HANDLER(jcross_vregs2_w){jcross_vregs[2]=data;}
-static WRITE8_HANDLER(jcross_vregs3_w){jcross_vregs[3]=data;}
-static WRITE8_HANDLER(jcross_vregs4_w){jcross_vregs[4]=data;}
-
-
-static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x3fff) AM_ROM AM_BASE(&namco_wavedata)
- AM_RANGE(0x8000, 0x87ff) AM_RAM
- AM_RANGE(0xa000, 0xa000) AM_READ(sound_command_r)
- AM_RANGE(0xc000, 0xc000) AM_READ(sound_nmi_ack_r)
- AM_RANGE(0xe000, 0xe000) AM_WRITE(ay8910_control_port_0_w)
- AM_RANGE(0xe001, 0xe001) AM_WRITE(ay8910_write_port_0_w)
- AM_RANGE(0xe002, 0xe007) AM_WRITE(snkwave_w)
- AM_RANGE(0xe008, 0xe008) AM_WRITE(ay8910_control_port_1_w)
- AM_RANGE(0xe009, 0xe009) AM_WRITE(ay8910_write_port_1_w)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( sound_portmap, ADDRESS_SPACE_IO, 8 )
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_READNOP
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( cpuA_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x9fff) AM_ROM
- AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
- AM_RANGE(0xa100, 0xa100) AM_READ_PORT("IN1")
- AM_RANGE(0xa200, 0xa200) AM_READ_PORT("IN2")
- AM_RANGE(0xa300, 0xa300) AM_WRITE(sound_command_w)
- AM_RANGE(0xa400, 0xa400) AM_READ_PORT("DSW1")
- AM_RANGE(0xa500, 0xa500) AM_READ_PORT("DSW2")
- AM_RANGE(0xa600, 0xa600) AM_WRITE(jcross_palettebank_w)
- AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w)
- AM_RANGE(0xd300, 0xd300) AM_WRITE(jcross_vregs0_w)
- AM_RANGE(0xd400, 0xd400) AM_WRITE(jcross_vregs1_w)
- AM_RANGE(0xd500, 0xd500) AM_WRITE(jcross_vregs2_w)
- AM_RANGE(0xd600, 0xd600) AM_WRITE(jcross_vregs3_w)
- AM_RANGE(0xd700, 0xd700) AM_WRITE(jcross_vregs4_w)
- AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE(1) AM_BASE(&spriteram)
- AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(jcross_background_ram_w) AM_SHARE(2) AM_BASE(&videoram)
- AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(jcross_text_ram_w) AM_BASE(&jcr_textram)
- AM_RANGE(0xf400, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( cpuB_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w)
- AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE(1)
- AM_RANGE(0xc800, 0xd7ff) AM_RAM AM_SHARE(2) /* unknown ??? */
-ADDRESS_MAP_END
-
-
-static INPUT_PORTS_START( jcross )
- PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sound_status_r, NULL) /* sound CPU status */
-
-
- PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
-
-
- PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x01, "Unknown SW 1-0" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
-
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x04, "3" )
- PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) )
- /* PORT_DIPSETTING( 0x10, ) ???? 'insert more coin'*/
- PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0xc0, "20000 60000" )
- PORT_DIPSETTING( 0x80, "40000 90000" )
- PORT_DIPSETTING( 0x40, "50000 120000" )
- PORT_DIPSETTING( 0x00, DEF_STR( None ) )
-
- PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x00, "Bonus Life Occurence" ) /* not verified */
- PORT_DIPSETTING( 0x01, "1st, 2nd, then every 2nd" )
- PORT_DIPSETTING( 0x00, "1st and 2nd only" )
- PORT_DIPNAME( 0x06, 0x04, "scrolling speed" )
- PORT_DIPSETTING( 0x06, "Slow" )
- PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x02, "Fast" )
- PORT_DIPSETTING( 0x00, "Fastest" )
- PORT_DIPNAME( 0x18, 0x10, "Game mode" )
- PORT_DIPSETTING( 0x18, "Demo Sounds Off" )
- PORT_DIPSETTING( 0x10, "Demo Sounds On" )
- PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)" )
- PORT_DIPSETTING( 0x00, "Freeze" )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x80, 0x80, "BG Collisions" )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
-
-INPUT_PORTS_END
-
-
-
-/***************************************************************************
-**
-** Graphics Layout
-**
-***************************************************************************/
-
-static const gfx_layout sprite_layout =
-{
- 16,16,
- RGN_FRAC(1,3),
- 3,
- { 0,0x2000*8,0x4000*8 },
- {
- 7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8
- },
- {
- 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
- 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16
- },
- 256
-};
-
-static const gfx_layout tile_layout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 4, 0, 12, 8, 20, 16, 28, 24},
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
- 256
-};
-
-static GFXDECODE_START( jcross )
- GFXDECODE_ENTRY( "gfx1", 0, tile_layout, 0x080, 8 )
- GFXDECODE_ENTRY( "gfx2", 0, tile_layout, 0x110, 1 )
- GFXDECODE_ENTRY( "gfx3", 0, tile_layout, 0x100, 1 )
- GFXDECODE_ENTRY( "gfx4", 0, sprite_layout, 0x000, 16 ) /* sprites */
-GFXDECODE_END
-
-
-/***************************************************************************
-**
-** Machine Driver
-**
-***************************************************************************/
-
-static MACHINE_DRIVER_START( jcross )
-
- MDRV_CPU_ADD("main", Z80, 3360000)
- MDRV_CPU_PROGRAM_MAP(cpuA_map,0)
- MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
-
- MDRV_CPU_ADD("sub", Z80, 3360000)
- MDRV_CPU_PROGRAM_MAP(cpuB_map,0)
- MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
-
- MDRV_CPU_ADD("audio", Z80, 4000000)
- MDRV_CPU_PROGRAM_MAP(sound_map,0)
- MDRV_CPU_IO_MAP(sound_portmap,0)
- MDRV_CPU_PERIODIC_INT(irq0_line_hold, 244)
-
- MDRV_INTERLEAVE(100)
-
- /* video hardware */
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_REFRESH_RATE(61)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_SIZE(512, 512)
- MDRV_SCREEN_VISIBLE_AREA(0, 255,0, 223)
-
- MDRV_GFXDECODE(jcross)
- MDRV_PALETTE_LENGTH((16+2)*16)
- MDRV_VIDEO_START(jcross)
- MDRV_VIDEO_UPDATE(jcross)
-
- /* sound hardware */
- MDRV_SPEAKER_STANDARD_MONO("mono")
-
- MDRV_SOUND_ADD("ay1", AY8910, 2000000)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
-
- MDRV_SOUND_ADD("ay2", AY8910, 2000000)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
-
- MDRV_SOUND_ADD("namco", NAMCO, 24000)
- MDRV_SOUND_CONFIG(snkwave_interface)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08)
-MACHINE_DRIVER_END
-
-
-ROM_START( jcross )
- ROM_REGION( 0x10000, "main", 0 )
- ROM_LOAD( "jcrossa0.10b", 0x0000, 0x2000, CRC(0e79bbcd) SHA1(7088a8effd30080529b797991e24e9807bf90475) )
- ROM_LOAD( "jcrossa1.12b", 0x2000, 0x2000, CRC(999b2bcc) SHA1(e5d13c9c11a82cedee15777341e6424639ecf2f5) )
- ROM_LOAD( "jcrossa2.13b", 0x4000, 0x2000, CRC(ac89e49c) SHA1(9b9a0eec8ad341ce7af58bffe55f10bec696af62) )
- ROM_LOAD( "jcrossa3.14b", 0x6000, 0x2000, CRC(4fd7848d) SHA1(870aea0b8e027616814df87afd24418fd140f736) )
- ROM_LOAD( "jcrossa4.15b", 0x8000, 0x2000, CRC(8500575d) SHA1(b8751b86508de484f2eb8a6702c63a47ec882036) )
-
- ROM_REGION( 0x10000, "sub", 0 )
- ROM_LOAD( "jcrossb0.15a", 0x0000, 0x2000, CRC(77ed51e7) SHA1(56b457846f71f442da6f99889231d4b71d5fcb6c) )
- ROM_LOAD( "jcrossb1.14a", 0x2000, 0x2000, CRC(23cf0f70) SHA1(f258e899f332a026eeb0db92330fd60c478218af) )
- ROM_LOAD( "jcrossb2.13a", 0x4000, 0x2000, CRC(5bed3118) SHA1(f105ca55223a4bfbc8e2d61c365c76cf2153254c) )
- ROM_LOAD( "jcrossb3.12a", 0x6000, 0x2000, CRC(cd75dc95) SHA1(ef03d2b0f66f30fad5132e7b6aee9ec978650b53) )
-
- ROM_REGION( 0x10000, "audio", 0 )
- ROM_LOAD( "jcrosss0.f1", 0x0000, 0x2000, CRC(9ae8ea93) SHA1(1d824302305a41bf5c354c36e2e11981d1aa5ea4) )
- ROM_LOAD( "jcrosss1.h2", 0x2000, 0x2000, CRC(83785601) SHA1(cd3d484ef5464090c4b543b1edbbedcc52b15071) )
-
- ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
- ROM_LOAD( "jcrosss.d2", 0x0000, 0x2000, CRC(3ebb5beb) SHA1(de0a1f0fdb5b08b76dab9fa64d9ae3047c4ff84b) )
-
- ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
- ROM_LOAD( "jcrossb1.a2", 0x0000, 0x2000, CRC(ea3dfbc9) SHA1(eee56acd1c9dbc6c3ecdee4ffe860273e65cc09b) )
-
- ROM_REGION( 0x2000, "gfx3", ROMREGION_DISPOSE )
- ROM_LOAD( "jcrossb4.10a", 0x0000, 0x2000, CRC(08ad93fe) SHA1(04baf2d9735b0d794b114abeced5a6b899958ce7) )
-
- ROM_REGION( 0x6000, "gfx4", ROMREGION_DISPOSE )
- ROM_LOAD( "jcrossf2.j2", 0x0000, 0x2000, CRC(42a12b9d) SHA1(9f2bdb1f84f444442282cf0fc1f7b3c7f9a9bf48) )
- ROM_LOAD( "jcrossf1.k2", 0x2000, 0x2000, CRC(70d219bf) SHA1(9ff9f88221edd141e8204ac810434b4290db7cff) )
- ROM_LOAD( "jcrossf0.l2", 0x4000, 0x2000, CRC(4532509b) SHA1(c99f87e2b06b94d815e6099bccb2aee0edf8c98d) )
-
- ROM_REGION( 0x0c00, "proms", 0 )
- ROM_LOAD( "jcrossp2.j7", 0x000, 0x400, CRC(b72a96a5) SHA1(20d40e4b6a2652e61dc3ad0c4afaec04e3c7cf74) )
- ROM_LOAD( "jcrossp1.j8", 0x400, 0x400, CRC(35650448) SHA1(17e4a661ff304c093bb0253efceaf4e9b2498924) )
- ROM_LOAD( "jcrossp0.j9", 0x800, 0x400, CRC(99f54d48) SHA1(9bd20eaa9706d28eaca9f5e195204d89e302272f) )
-ROM_END
-
-GAME( 1984, jcross, 0, jcross, jcross, 0, ROT270, "SNK", "Jumping Cross",GAME_NO_COCKTAIL|GAME_IMPERFECT_GRAPHICS)
diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c
index 48c1424bd31..62739c25a08 100644
--- a/src/mame/drivers/snk.c
+++ b/src/mame/drivers/snk.c
@@ -1,8 +1,11 @@
-/*
+*
snk.c
various SNK triple Z80 games
+ay8910x2 + namco wave
+Jumping Cross
+
ay8910x2
Gladiator 1984
@@ -29,17 +32,19 @@ Credits (in alphabetical order)
Marco Cassili
Ernesto Corvi
Carlos A. Lozano
- Bryan McPhail
+ Bryan McPhail
Jarek Parchanski
- Nicola Salmoria
+ Nicola Salmoria
+ Tomasz Slanina
Phil Stroffolino
- Acho A. Tang
+ Acho A. Tang
Victor Trucco
Notes:
------
- How to enter test mode:
+ 1984 jcross: n/a
1984 sgladiat: n/a
1985 tnk3: keep 1 pressed during boot
1985 aso: keep 1 pressed during boot
@@ -59,6 +64,8 @@ Notes:
- the I/O area (C000-CFFF) is probably mirrored in large part on the two main
CPUs, however I mapped only the addresses actually used by the games.
+- sgladiat runs on a modified jcross pcb (same pcb ID with flying wires).
+
- the original sgladiat pcb is verified to have huge sprite lag.
- there are two versions of the Ikari Warriors board, one has the standard JAMMA
@@ -151,11 +158,14 @@ Notes:
TODO:
-----
-- sgladiat: unknown writes to D200/DA00, probably video related. Also most bits
- of A600 are unknown.
+- jcross might be a bad dump. The current ROM set is made by mixing two sets
+ which were marked as 'bad'.
-- sgladiat: bg only uses palette 0, and colors seem to be fine. Is there some
- place where it should switch to a different palette?
+- jcross: only the first bank of the fg charset is used. The second bank is
+ almost identical apart from a few characters. Should it be used? When?
+
+- sgladiat: unknown writes to D200/DA00, probably video related. Also some bits
+ of A600 are unknown.
- ASO: unknown writes to CE00, probably video related. Always 05?
Also unknown writes to F002 by the sound CPU, during reset.
@@ -192,6 +202,7 @@ TODO:
#include "driver.h"
#include "snk.h"
#include "sound/ay8910.h"
+#include "sound/namco.h"
#include "sound/3812intf.h"
@@ -349,6 +360,13 @@ static TIMER_CALLBACK( sndirq_update_callback )
+static const namco_interface snkwave_interface =
+{
+ 1,
+ 0 /* stereo */
+};
+
+
static void ymirq_callback_1(running_machine *machine, int irq)
{
if (irq)
@@ -698,6 +716,36 @@ static CUSTOM_INPUT( countryc_trackball_y )
/************************************************************************/
+static ADDRESS_MAP_START( jcross_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x9fff) AM_ROM
+ AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
+ AM_RANGE(0xa100, 0xa100) AM_READ_PORT("IN1")
+ AM_RANGE(0xa200, 0xa200) AM_READ_PORT("IN2")
+ AM_RANGE(0xa300, 0xa300) AM_WRITE(sgladiat_soundlatch_w)
+ AM_RANGE(0xa400, 0xa400) AM_READ_PORT("DSW1")
+ AM_RANGE(0xa500, 0xa500) AM_READ_PORT("DSW2")
+ AM_RANGE(0xa600, 0xa600) AM_WRITE(sgladiat_flipscreen_w)
+ AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w)
+ AM_RANGE(0xd300, 0xd300) AM_WRITE(jcross_scroll_msb_w)
+ AM_RANGE(0xd400, 0xd400) AM_WRITE(snk_sp16_scrolly_w)
+ AM_RANGE(0xd500, 0xd500) AM_WRITE(snk_sp16_scrollx_w)
+ AM_RANGE(0xd600, 0xd600) AM_WRITE(snk_bg_scrolly_w)
+ AM_RANGE(0xd700, 0xd700) AM_WRITE(snk_bg_scrollx_w)
+ AM_RANGE(0xd800, 0xdfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1)
+ AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(2) AM_BASE(&snk_bg_videoram)
+ AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(snk_fg_videoram_w) AM_SHARE(3) AM_BASE(&snk_fg_videoram) // + work RAM
+ AM_RANGE(0xffff, 0xffff) AM_WRITENOP // simply a program patch to not write to two not existing video registers?
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( jcross_cpuB_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0xa700, 0xa700) AM_READWRITE(snk_cpuA_nmi_trigger_r, snk_cpuB_nmi_ack_w)
+ AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE(1)
+ AM_RANGE(0xc800, 0xd7ff) AM_RAM_WRITE(aso_bg_videoram_w) AM_SHARE(2)
+ AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(snk_fg_videoram_w) AM_SHARE(3)
+ADDRESS_MAP_END
+
+
static ADDRESS_MAP_START( sgladiat_cpuA_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x9fff) AM_ROM
AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
@@ -1038,6 +1086,18 @@ ADDRESS_MAP_END
/***********************************************************************/
+static ADDRESS_MAP_START( jcross_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x3fff) AM_ROM AM_BASE(&namco_wavedata)
+ AM_RANGE(0x8000, 0x87ff) AM_RAM
+ AM_RANGE(0xa000, 0xa000) AM_READ(sgladiat_soundlatch_r)
+ AM_RANGE(0xc000, 0xc000) AM_READ(sgladiat_sound_nmi_ack_r)
+ AM_RANGE(0xe000, 0xe000) AM_WRITE(ay8910_control_port_0_w)
+ AM_RANGE(0xe001, 0xe001) AM_WRITE(ay8910_write_port_0_w)
+ AM_RANGE(0xe002, 0xe007) AM_WRITE(snkwave_w)
+ AM_RANGE(0xe008, 0xe008) AM_WRITE(ay8910_control_port_1_w)
+ AM_RANGE(0xe009, 0xe009) AM_WRITE(ay8910_write_port_1_w)
+ADDRESS_MAP_END
+
static ADDRESS_MAP_START( sgladiat_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x8000, 0x87ff) AM_RAM
@@ -1050,7 +1110,7 @@ static ADDRESS_MAP_START( sgladiat_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xe005, 0xe005) AM_WRITE(ay8910_write_port_1_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( sgladiat_sound_portmap, ADDRESS_SPACE_IO, 8 )
+static ADDRESS_MAP_START( jcross_sound_portmap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READ(sgladiat_sound_irq_ack_r)
ADDRESS_MAP_END
@@ -1131,11 +1191,93 @@ ADDRESS_MAP_END
/*********************************************************************/
+static INPUT_PORTS_START( jcross )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3")
+ PORT_DIPSETTING( 0x04, "3" )
+ PORT_DIPSETTING( 0x00, "5" )
+ PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:4,5,6")
+ /* PORT_DIPSETTING( 0x10, ) ???? 'insert more coin'*/
+ PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:7,8")
+ PORT_DIPSETTING( 0xc0, "20000 60000" )
+ PORT_DIPSETTING( 0x80, "40000 90000" )
+ PORT_DIPSETTING( 0x40, "50000 120000" )
+ PORT_DIPSETTING( 0x00, DEF_STR( None ) )
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x00, "Bonus Life Occurence?" ) PORT_DIPLOCATION("DSW2:1") /* not verified */
+ PORT_DIPSETTING( 0x01, "1st, 2nd, then every 2nd?" )
+ PORT_DIPSETTING( 0x00, "1st and 2nd only?" )
+ PORT_DIPNAME( 0x06, 0x04, "Scrolling Speed" ) PORT_DIPLOCATION("DSW2:2,3")
+ PORT_DIPSETTING( 0x06, "Slow" )
+ PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x02, "Fast" )
+ PORT_DIPSETTING( 0x00, "Fastest" )
+ PORT_DIPNAME( 0x18, 0x10, "Game mode" ) PORT_DIPLOCATION("DSW2:4,5")
+ PORT_DIPSETTING( 0x18, "Demo Sounds Off" )
+ PORT_DIPSETTING( 0x10, "Demo Sounds On" )
+ PORT_DIPSETTING( 0x08, "Infinite Lives (Cheat)" )
+ PORT_DIPSETTING( 0x00, "Freeze" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
+ PORT_DIPNAME( 0x80, 0x80, "Disable BG Collisions (Cheat)" ) PORT_DIPLOCATION("DSW2:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
+INPUT_PORTS_END
+
+
static INPUT_PORTS_START( sgladiat )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
@@ -1213,9 +1355,9 @@ INPUT_PORTS_END
static INPUT_PORTS_START( aso )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
@@ -2637,20 +2779,20 @@ GFXDECODE_END
/**********************************************************************/
-static MACHINE_DRIVER_START( sgladiat )
+static MACHINE_DRIVER_START( jcross )
/* basic machine hardware */
- MDRV_CPU_ADD("main", Z80, 4000000) /* NOT verified (probably lower?) */
- MDRV_CPU_PROGRAM_MAP(sgladiat_cpuA_map,0)
+ MDRV_CPU_ADD("main", Z80, 3250000) /* NOT verified */
+ MDRV_CPU_PROGRAM_MAP(jcross_cpuA_map,0)
MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
- MDRV_CPU_ADD("sub", Z80, 4000000) /* NOT verified (probably lower?) */
- MDRV_CPU_PROGRAM_MAP(sgladiat_cpuB_map,0)
+ MDRV_CPU_ADD("sub", Z80, 3250000) /* NOT verified */
+ MDRV_CPU_PROGRAM_MAP(jcross_cpuB_map,0)
MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
MDRV_CPU_ADD("audio", Z80, 4000000) /* NOT verified */
- MDRV_CPU_PROGRAM_MAP(sgladiat_sound_map,0)
- MDRV_CPU_IO_MAP(sgladiat_sound_portmap,0)
+ MDRV_CPU_PROGRAM_MAP(jcross_sound_map,0)
+ MDRV_CPU_IO_MAP(jcross_sound_portmap,0)
MDRV_CPU_PERIODIC_INT(irq0_line_assert, 244) // Marvin's frequency, sounds ok
MDRV_INTERLEAVE(100)
@@ -2662,25 +2804,52 @@ static MACHINE_DRIVER_START( sgladiat )
MDRV_SCREEN_REFRESH_RATE(60)
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(36*8, 28*8)
- /* visible area is correct. Debug info is shown in the black bars at the sides
- of the screen when the Debug dip switch is on */
MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 1*8, 28*8-1)
MDRV_GFXDECODE(tnk3)
MDRV_PALETTE_LENGTH(0x400)
MDRV_PALETTE_INIT(tnk3)
- MDRV_VIDEO_START(sgladiat)
+ MDRV_VIDEO_START(jcross)
MDRV_VIDEO_UPDATE(tnk3)
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")
MDRV_SOUND_ADD("ay1", AY8910, 2000000) /* NOT verified */
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MDRV_SOUND_ADD("ay2", AY8910, 2000000) /* NOT verified */
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+
+ MDRV_SOUND_ADD("namco", NAMCO, 24000)
+ MDRV_SOUND_CONFIG(snkwave_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08)
+MACHINE_DRIVER_END
+
+
+static MACHINE_DRIVER_START( sgladiat )
+
+ MDRV_IMPORT_FROM(jcross)
+
+ /* basic machine hardware */
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(sgladiat_cpuA_map,0)
+
+ MDRV_CPU_MODIFY("sub")
+ MDRV_CPU_PROGRAM_MAP(sgladiat_cpuB_map,0)
+
+ MDRV_CPU_MODIFY("audio")
+ MDRV_CPU_PROGRAM_MAP(sgladiat_sound_map,0)
+
+ /* video hardware */
+ /* visible area is correct. Debug info is shown in the black bars at the sides
+ of the screen when the Debug dip switch is on */
+
+ MDRV_VIDEO_START(sgladiat)
+
+ /* sound hardware */
+ MDRV_SOUND_REMOVE("namco")
MACHINE_DRIVER_END
@@ -3009,6 +3178,44 @@ MACHINE_DRIVER_END
/***********************************************************************/
+ROM_START( jcross )
+ ROM_REGION( 0x10000, "main", 0 )
+ ROM_LOAD( "jcrossa0.10b", 0x0000, 0x2000, CRC(0e79bbcd) SHA1(7088a8effd30080529b797991e24e9807bf90475) )
+ ROM_LOAD( "jcrossa1.12b", 0x2000, 0x2000, CRC(999b2bcc) SHA1(e5d13c9c11a82cedee15777341e6424639ecf2f5) )
+ ROM_LOAD( "jcrossa2.13b", 0x4000, 0x2000, CRC(ac89e49c) SHA1(9b9a0eec8ad341ce7af58bffe55f10bec696af62) )
+ ROM_LOAD( "jcrossa3.14b", 0x6000, 0x2000, CRC(4fd7848d) SHA1(870aea0b8e027616814df87afd24418fd140f736) )
+ ROM_LOAD( "jcrossa4.15b", 0x8000, 0x2000, CRC(8500575d) SHA1(b8751b86508de484f2eb8a6702c63a47ec882036) )
+
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "jcrossb0.15a", 0x0000, 0x2000, CRC(77ed51e7) SHA1(56b457846f71f442da6f99889231d4b71d5fcb6c) )
+ ROM_LOAD( "jcrossb1.14a", 0x2000, 0x2000, CRC(23cf0f70) SHA1(f258e899f332a026eeb0db92330fd60c478218af) )
+ ROM_LOAD( "jcrossb2.13a", 0x4000, 0x2000, CRC(5bed3118) SHA1(f105ca55223a4bfbc8e2d61c365c76cf2153254c) )
+ ROM_LOAD( "jcrossb3.12a", 0x6000, 0x2000, CRC(cd75dc95) SHA1(ef03d2b0f66f30fad5132e7b6aee9ec978650b53) )
+
+ ROM_REGION( 0x10000, "audio", 0 )
+ ROM_LOAD( "jcrosss0.f1", 0x0000, 0x2000, CRC(9ae8ea93) SHA1(1d824302305a41bf5c354c36e2e11981d1aa5ea4) )
+ ROM_LOAD( "jcrosss1.h2", 0x2000, 0x2000, CRC(83785601) SHA1(cd3d484ef5464090c4b543b1edbbedcc52b15071) )
+
+ ROM_REGION( 0x4000, "fg_tiles", ROMREGION_DISPOSE )
+ ROM_LOAD( "jcrossb4.10a", 0x0000, 0x2000, CRC(08ad93fe) SHA1(04baf2d9735b0d794b114abeced5a6b899958ce7) )
+ ROM_LOAD( "jcrosss.d2", 0x2000, 0x2000, CRC(3ebb5beb) SHA1(de0a1f0fdb5b08b76dab9fa64d9ae3047c4ff84b) )
+
+ ROM_REGION( 0x2000, "bg_tiles", ROMREGION_DISPOSE )
+ ROM_LOAD( "jcrossb1.a2", 0x0000, 0x2000, CRC(ea3dfbc9) SHA1(eee56acd1c9dbc6c3ecdee4ffe860273e65cc09b) )
+
+ ROM_REGION( 0x6000, "sp16_tiles", ROMREGION_DISPOSE )
+ ROM_LOAD( "jcrossf0.l2", 0x0000, 0x2000, CRC(4532509b) SHA1(c99f87e2b06b94d815e6099bccb2aee0edf8c98d) )
+ ROM_LOAD( "jcrossf1.k2", 0x2000, 0x2000, CRC(70d219bf) SHA1(9ff9f88221edd141e8204ac810434b4290db7cff) )
+ ROM_LOAD( "jcrossf2.j2", 0x4000, 0x2000, CRC(42a12b9d) SHA1(9f2bdb1f84f444442282cf0fc1f7b3c7f9a9bf48) )
+
+ ROM_REGION( 0x0c00, "proms", 0 )
+ ROM_LOAD( "jcrossp2.j7", 0x000, 0x400, CRC(b72a96a5) SHA1(20d40e4b6a2652e61dc3ad0c4afaec04e3c7cf74) )
+ ROM_LOAD( "jcrossp1.j8", 0x400, 0x400, CRC(35650448) SHA1(17e4a661ff304c093bb0253efceaf4e9b2498924) )
+ ROM_LOAD( "jcrossp0.j9", 0x800, 0x400, CRC(99f54d48) SHA1(9bd20eaa9706d28eaca9f5e195204d89e302272f) )
+ROM_END
+
+/***********************************************************************/
+
ROM_START( sgladiat )
ROM_REGION( 0x10000, "main", 0 )
ROM_LOAD( "glad.005", 0x0000, 0x4000, CRC(4bc60f0b) SHA1(19baf7533b8fc6bab372f1d35603068a6b93627c) )
@@ -3040,6 +3247,7 @@ ROM_START( sgladiat )
ROM_LOAD( "82s137.003", 0x800, 0x400, CRC(c0e70308) SHA1(d7dbc500bc9991c2d1b95850f3723a2a224fbfbb) )
ROM_END
+/***********************************************************************/
ROM_START( aso )
ROM_REGION( 0x10000, "main", 0 )
@@ -4868,6 +5076,7 @@ static DRIVER_INIT( countryc )
+GAME( 1984, jcross, 0, jcross, jcross, 0, ROT270, "SNK", "Jumping Cross", 0 )
GAME( 1984, sgladiat, 0, sgladiat, sgladiat, 0, ROT0, "SNK", "Gladiator 1984", 0 )
GAME( 1985, aso, 0, aso, aso, 0, ROT270, "SNK", "ASO - Armored Scrum Object", 0 )
diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h
index 94dc294315e..ab63c1b513f 100644
--- a/src/mame/includes/snk.h
+++ b/src/mame/includes/snk.h
@@ -19,6 +19,7 @@ extern WRITE8_HANDLER( snk_cpuB_nmi_ack_w );
extern PALETTE_INIT( tnk3 );
+extern VIDEO_START( jcross );
extern VIDEO_START( sgladiat );
extern VIDEO_START( tnk3 );
extern VIDEO_START( aso );
@@ -38,6 +39,7 @@ extern WRITE8_HANDLER( snk_sp16_scrolly_w );
extern WRITE8_HANDLER( snk_sp32_scrollx_w );
extern WRITE8_HANDLER( snk_sp32_scrolly_w );
+extern WRITE8_HANDLER( jcross_scroll_msb_w );
extern WRITE8_HANDLER( sgladiat_scroll_msb_w );
extern WRITE8_HANDLER( sgladiat_flipscreen_w );
extern WRITE8_HANDLER( tnk3_videoattrs_w );
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index d73ed180208..7d0a6cfa9b6 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -1265,7 +1265,6 @@ $(MAMEOBJ)/snk.a: \
$(DRIVERS)/dmndrby.o \
$(DRIVERS)/hal21.o \
$(DRIVERS)/hng64.o $(VIDEO)/hng64.o \
- $(DRIVERS)/jcross.o $(VIDEO)/jcross.o \
$(DRIVERS)/lasso.o $(VIDEO)/lasso.o \
$(DRIVERS)/mainsnk.o $(VIDEO)/mainsnk.o \
$(DRIVERS)/marvins.o $(VIDEO)/marvins.o \
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index b8a5b20b39b..95bf34d3750 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -5459,9 +5459,9 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( marvins ) /* A2003 (c) 1983 */
DRIVER( madcrash ) /* A2005 (c) 1984 */
DRIVER( vangrd2 ) /* A2005 (c) 1984 */
- DRIVER( jcross ) /* .. */
DRIVER( mainsnk ) /* fill in */
DRIVER( canvas ) /* (c) 1985 */
+ DRIVER( jcross ) /* .. */
DRIVER( sgladiat ) /* A3006 (c) 1984 */
DRIVER( hal21 ) /* A4031 (c) 1985 */
DRIVER( hal21j ) /* (c) 1985 (Japan) */
diff --git a/src/mame/video/jcross.c b/src/mame/video/jcross.c
deleted file mode 100644
index 485e4e1358e..00000000000
--- a/src/mame/video/jcross.c
+++ /dev/null
@@ -1,194 +0,0 @@
-#include "driver.h"
-#include "cpu/z80/z80.h"
-
-static int flipscreen;
-static tilemap *bg_tilemap, *tx_tilemap;
-static UINT8 fg_color, old_fg_color;
-
-extern UINT8 *jcr_textram;
-
-
-int jcross_vregs[5];
-
-WRITE8_HANDLER( jcross_palettebank_w )
-{
- fg_color = data&0xf;
-}
-
-
-static void stuff_palette( running_machine *machine, int source_index, int dest_index, int num_colors )
-{
- UINT8 *color_prom = memory_region(machine, "proms") + source_index;
- int i;
- for( i=0; i<num_colors; i++ )
- {
- int bit0=0,bit1,bit2,bit3;
- int red, green, blue;
-
- bit0 = (color_prom[0x800] >> 2) & 0x01; // ?
- bit1 = (color_prom[0x000] >> 1) & 0x01;
- bit2 = (color_prom[0x000] >> 2) & 0x01;
- bit3 = (color_prom[0x000] >> 3) & 0x01;
- red = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- bit0 = (color_prom[0x800] >> 1) & 0x01; // ?
- bit1 = (color_prom[0x400] >> 2) & 0x01;
- bit2 = (color_prom[0x400] >> 3) & 0x01;
- bit3 = (color_prom[0x000] >> 0) & 0x01;
- green = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- bit0 = (color_prom[0x800] >> 0) & 0x01; // ?
- bit1 = (color_prom[0x800] >> 3) & 0x01; // ?
- bit2 = (color_prom[0x400] >> 0) & 0x01;
- bit3 = (color_prom[0x400] >> 1) & 0x01;
- blue = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- palette_set_color( machine, dest_index++, MAKE_RGB(red, green, blue) );
- color_prom++;
- }
-}
-
-static void update_palette(running_machine *machine, int type )
-{
- if( fg_color!=old_fg_color )
- {
- stuff_palette(machine, 128+16*(fg_color&0x7), (0x10+type)*16, 16 );
- old_fg_color = fg_color;
- }
-}
-
-WRITE8_HANDLER( jcross_background_ram_w )
-{
- videoram[offset]=data;
- tilemap_mark_tile_dirty(bg_tilemap,offset);
-}
-
-WRITE8_HANDLER( jcross_text_ram_w )
-{
- jcr_textram[offset]=data;
- tilemap_mark_tile_dirty(tx_tilemap,offset);
-}
-
-
-static TILE_GET_INFO( get_bg_tilemap_info )
-{
- SET_TILE_INFO(
- 1,
- videoram[tile_index],
- 0,
- 0);
-}
-
-static TILE_GET_INFO( get_tx_tilemap_info )
-{
- int tile_number = jcr_textram[tile_index];
- SET_TILE_INFO(
- 0,
- tile_number,
- 0,
- 0);
-}
-
-VIDEO_START( jcross )
-{
- flipscreen = -1; old_fg_color = -1;
-
- stuff_palette( machine, 0, 0, 16*8 );
- stuff_palette( machine, 16*8*3, 16*8, 16*8 );
-
- bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,8,8,64,64);
- tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,8,8,32,32);
-
- tilemap_set_transparent_pen(tx_tilemap,0xf);
- tilemap_set_scrolldx( bg_tilemap, 16, 22 );
-}
-
-/***************************************************************************
-**
-** Screen Refresh
-**
-***************************************************************************/
-
-static void draw_status(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
-{
- const UINT8 *base = jcr_textram + 0x400;
- const gfx_element *gfx = machine->gfx[0];
- int row;
- for( row=0; row<4; row++ )
- {
- int sy,sx = (row&1)*8;
- const UINT8 *source = base + (row&1)*32;
- if( row>1 )
- sx+=256+16;
- else
- source+=30*32;
-
- for( sy=0; sy<256; sy+=8 )
- {
- int tile_number = *source++;
- drawgfx( bitmap, gfx,
- tile_number, tile_number>>5,
- 0,0,
- sx,sy,
- cliprect,
- TRANSPARENCY_NONE, 0xf );
- }
- }
-}
-
-static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int scrollx, int scrolly )
-{
- const gfx_element *gfx = machine->gfx[3];
- const UINT8 *source, *finish;
- source = spriteram;
- finish = spriteram + 0x64;
-
- while( source<finish )
- {
- int attributes = source[3];
- int tile_number = source[1];
- int sy = source[0] + ((attributes&0x10)?256:0);
- int sx = source[2] + ((attributes&0x80)?256:0);
- int color = attributes&0xf;
- int flipy = (attributes&0x20);
- int flipx = 0;
-
- sy=(sy-scrolly)&0x1ff;
- sx=(sx-scrollx)&0x1ff;
-
- drawgfx( bitmap,gfx,
- tile_number,
- color,
- flipx, flipy,
- (256-sx)&0x1ff,sy-16,
- cliprect,TRANSPARENCY_PEN,7);
-
- source+=4;
- }
-}
-
-
-VIDEO_UPDATE( jcross )
-{
- int scroll_attributes = jcross_vregs[0];
- int sprite_scrolly = jcross_vregs[1];
- int sprite_scrollx = jcross_vregs[2];
- int bg_scrolly = jcross_vregs[3];
- int bg_scrollx = jcross_vregs[4];
-
- if( scroll_attributes & 1 ) sprite_scrollx += 256;
- if( scroll_attributes & 2 ) bg_scrollx += 256;
-
- if( scroll_attributes & 8 ) sprite_scrolly += 256;
- if( scroll_attributes & 0x10 ) bg_scrolly += 256;
- update_palette(screen->machine, 1);
-
-
- tilemap_set_scrollx( bg_tilemap, 0, bg_scrollx );
- tilemap_set_scrolly( bg_tilemap, 0, bg_scrolly );
- tilemap_draw(bitmap,cliprect,bg_tilemap,0 ,0);
- draw_sprites(screen->machine, bitmap,cliprect, sprite_scrollx+23, sprite_scrolly+1 );
- tilemap_draw(bitmap,cliprect,tx_tilemap,0 ,0);
- draw_status(screen->machine, bitmap,cliprect );
- return 0;
-}
diff --git a/src/mame/video/snk.c b/src/mame/video/snk.c
index 5d4111e0183..e97af8df872 100644
--- a/src/mame/video/snk.c
+++ b/src/mame/video/snk.c
@@ -29,7 +29,7 @@ static tilemap *fg_tilemap;
static tilemap *bg_tilemap;
static int bg_scrollx, bg_scrolly, sp16_scrollx, sp16_scrolly, sp32_scrollx, sp32_scrolly;
static UINT8 sprite_split_point;
-static int yscroll_mask;
+static int num_sprites, yscroll_mask;
static UINT8 empty_tile[16*16];
@@ -200,6 +200,23 @@ static VIDEO_START( snk_4bpp_shadow )
}
+VIDEO_START( jcross )
+{
+ VIDEO_START_CALL(snk_3bpp_shadow);
+
+ fg_tilemap = tilemap_create(tnk3_get_fg_tile_info, tnk3_fg_scan_cols, 8, 8, 36, 28);
+ bg_tilemap = tilemap_create(aso_get_bg_tile_info, tilemap_scan_cols, 8, 8, 64, 64);
+
+ tilemap_set_transparent_pen(fg_tilemap, 15);
+ tilemap_set_scrolldy(fg_tilemap, 8, 8);
+
+ tilemap_set_scrolldx(bg_tilemap, 15, 24);
+ tilemap_set_scrolldy(bg_tilemap, 8, -32);
+
+ num_sprites = 25;
+ yscroll_mask = 0x1ff;
+}
+
VIDEO_START( sgladiat )
{
VIDEO_START_CALL(snk_3bpp_shadow);
@@ -213,6 +230,7 @@ VIDEO_START( sgladiat )
tilemap_set_scrolldx(bg_tilemap, 15, 24);
tilemap_set_scrolldy(bg_tilemap, 8, -32);
+ num_sprites = 25;
yscroll_mask = 0x0ff;
}
@@ -229,6 +247,7 @@ VIDEO_START( aso )
tilemap_set_scrolldx(bg_tilemap, 15+256, 24+256);
tilemap_set_scrolldy(bg_tilemap, 8, -32);
+ num_sprites = 50;
yscroll_mask = 0x1ff;
}
@@ -245,6 +264,7 @@ VIDEO_START( tnk3 )
tilemap_set_scrolldx(bg_tilemap, 15, 24);
tilemap_set_scrolldy(bg_tilemap, 8, -32);
+ num_sprites = 50;
yscroll_mask = 0x1ff;
}
@@ -337,9 +357,19 @@ WRITE8_HANDLER( sgladiat_flipscreen_w )
{
flip_screen_set(data & 0x80);
+ tilemap_set_palette_offset(bg_tilemap, ((data & 0xf) ^ 8) << 4);
+
// other bits unknown
}
+WRITE8_HANDLER( jcross_scroll_msb_w )
+{
+ bg_scrolly = (bg_scrolly & 0xff) | ((data & 0x10) << 4);
+ sp16_scrolly = (sp16_scrolly & 0xff) | ((data & 0x08) << 5);
+ bg_scrollx = (bg_scrollx & 0xff) | ((data & 0x02) << 7);
+ sp16_scrollx = (sp16_scrollx & 0xff) | ((data & 0x01) << 8);
+}
+
WRITE8_HANDLER( sgladiat_scroll_msb_w )
{
bg_scrollx = (bg_scrollx & 0xff) | ((data & 0x02) << 7);
@@ -498,11 +528,13 @@ static void tnk3_draw_sprites(running_machine *machine, bitmap_t *bitmap, const
int xflip,yflip;
int offs;
- /* tnk3 has 512 tiles, attribute bit 5 is y-flip */
- /* athena has 1024 tiles, attribute bit 5 is extra bank bit */
- int is_athena = (gfx->total_elements > 512);
+ /* jcross and sgladiat have only 25 sprites, the others 50 */
- for (offs = 0; offs < 50*4; offs += 4)
+ /* jcross has 256 tiles, attribute bit 6 MIGHT be x-flip (uncertain) */
+ /* sgladiat and tnk3 have 512 tiles, bit 6 is bank and bit 5 is y-flip */
+ /* athena has 1024 tiles, bit 6 and bit 5 are bank */
+
+ for (offs = 0; offs < num_sprites*4; offs += 4)
{
tile_number = spriteram[offs+1];
attributes = spriteram[offs+3];
@@ -514,13 +546,20 @@ static void tnk3_draw_sprites(running_machine *machine, bitmap_t *bitmap, const
xflip = 0;
yflip = 0;
- tile_number |= (attributes & 0x40) << 2;
+ if (gfx->total_elements > 256) // all except jcross
+ {
+ tile_number |= (attributes & 0x40) << 2;
+ }
+ else // jcross
+ {
+ xflip = attributes & 0x40; // uncertain (not used?)
+ }
- if (is_athena)
+ if (gfx->total_elements > 512) // athena
{
tile_number |= (attributes & 0x20) << 4;
}
- else // tnk3, sgladiat
+ else // all others
{
yflip = attributes & 0x20;
}