seta2.c update: [Luca Elia]

- Horizontal clipping of "tilemap" sprites
- Shadows emulation

sigmab98: added sammymdl BIOS and hardware info [Smitdogg, The Dumping Union]


New games added or promoted from NOT_WORKING status
---------------------------------------------------

Reel'N Quake [Luca Elia, Smitdogg, The Dumping Union]


New clones added
----------------

Magic Train (Clear NVRAM ROM?) (not working) [Grull Osgo, Roberto Fresca]
This commit is contained in:
Luca Elia 2011-02-27 19:50:09 +00:00
parent 0d96f47789
commit ae8109d5bf
6 changed files with 1389 additions and 892 deletions

File diff suppressed because it is too large Load Diff

View File

@ -70,11 +70,16 @@ http://www.tsc-acnet.com/index.php?sort=8&action=cataloglist&s=1&mode=3&genre_id
To Do:
- KL5C80 emulation is needed to consolidate the sammymdl games in one memory map and to run the BIOS
- Remove ROM patches from gegege
- gegege checks the EEPROM output after reset, and wants a timed 0->1 transition or locks up while
saving setting in service mode. Using a reset_delay of 7 works, unless when "play style" is set
to "coin" (it probably changes the number of reads from port $C0).
I guess the reset_delay mechanism should be implemented with a timer in eeprom.c.
- animalc needs a green backgound during part of the intro (floating animals in and out of the screen).
This can be achieved using either pen 0 or ff as background color, but messes up the other games.
- pyenaget intro: when the theater scrolls out to the left, the train should scroll in from the right,
with no visible gaps. It currently leaves the screen empty instead, for several seconds.
Notes:
@ -679,7 +684,7 @@ static ADDRESS_MAP_START( animalc_io, ADDRESS_SPACE_IO, 8 )
AM_RANGE( 0x32, 0x32 ) AM_WRITE( sammymdl_leds_w )
AM_RANGE( 0x34, 0x34 ) AM_READ( unk_34_r )
AM_RANGE( 0x90, 0x90 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write )
AM_RANGE( 0x90, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x91, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x92, 0x92 ) AM_DEVREAD_MODERN("oki", okim9810_device, read )
AM_RANGE( 0xb0, 0xb0 ) AM_WRITE( sammymdl_hopper_w )
AM_RANGE( 0xc0, 0xc0 ) AM_WRITE( watchdog_reset_w ) // 1
@ -911,7 +916,7 @@ static ADDRESS_MAP_START( haekaka_io, ADDRESS_SPACE_IO, 8 )
AM_RANGE( 0x31, 0x31 ) AM_WRITE( haekaka_coin_w )
AM_RANGE( 0x32, 0x32 ) AM_WRITE( haekaka_leds_w )
AM_RANGE( 0x90, 0x90 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write )
AM_RANGE( 0x90, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x91, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x92, 0x92 ) AM_DEVREAD_MODERN("oki", okim9810_device, read )
AM_RANGE( 0xb0, 0xb0 ) AM_WRITE( sammymdl_hopper_w )
AM_RANGE( 0xc0, 0xc0 ) AM_WRITE( watchdog_reset_w ) // 1
@ -1149,7 +1154,7 @@ static ADDRESS_MAP_START( itazuram_io, ADDRESS_SPACE_IO, 8 )
AM_RANGE( 0x31, 0x31 ) AM_WRITE( sammymdl_coin_w )
AM_RANGE( 0x32, 0x32 ) AM_WRITE( sammymdl_leds_w )
AM_RANGE( 0x90, 0x90 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write )
AM_RANGE( 0x90, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x91, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x92, 0x92 ) AM_DEVREAD_MODERN("oki", okim9810_device, read )
AM_RANGE( 0xb0, 0xb0 ) AM_WRITE( sammymdl_hopper_w )
AM_RANGE( 0xc0, 0xc0 ) AM_WRITE( watchdog_reset_w ) // 1
@ -1363,7 +1368,7 @@ static ADDRESS_MAP_START( tdoboon_io, ADDRESS_SPACE_IO, 8 )
AM_RANGE( 0x31, 0x31 ) AM_WRITE( sammymdl_coin_w )
AM_RANGE( 0x32, 0x32 ) AM_WRITE( sammymdl_leds_w )
AM_RANGE( 0x90, 0x90 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write )
AM_RANGE( 0x90, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x91, 0x91 ) AM_DEVWRITE_MODERN("oki", okim9810_device, write_TMP_register )
AM_RANGE( 0x92, 0x92 ) AM_DEVREAD_MODERN("oki", okim9810_device, read )
AM_RANGE( 0xb0, 0xb0 ) AM_WRITE( sammymdl_hopper_w )
AM_RANGE( 0xc0, 0xc0 ) AM_WRITE( watchdog_reset_w ) // 1
@ -1581,6 +1586,8 @@ static MACHINE_RESET( sammymdl )
static MACHINE_CONFIG_START( sammymdl, driver_device )
MCFG_CPU_ADD("maincpu", Z80, XTAL_20MHz / 2) // !! KL5C80A120FP @ 10MHz? (actually 4 times faster than Z80) !!
MCFG_CPU_PROGRAM_MAP( animalc_map )
MCFG_CPU_IO_MAP( animalc_io )
MCFG_MACHINE_RESET( sammymdl )
@ -1851,6 +1858,20 @@ static DRIVER_INIT( gegege )
***************************************************************************/
#define SAMMYMDL_BIOS \
ROM_REGION( 0x80000, "mainbios", 0 ) \
ROM_SYSTEM_BIOS( 0, "v5", "IPL Ver. 5.0" ) \
ROM_LOAD( "vm1211l01.u2", 0x000000, 0x080000, CRC(c3c74dc5) SHA1(07352e6dba7514214e778ba39e1ca773e4698858) )
ROM_START( sammymdl )
SAMMYMDL_BIOS
ROM_REGION( 0x1000000, "oki", ROMREGION_ERASEFF )
ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASEFF )
ROM_REGION( 0x200000, "sprites", ROMREGION_ERASEFF )
ROM_END
/***************************************************************************
@ -1863,6 +1884,8 @@ static DRIVER_INIT( gegege )
***************************************************************************/
ROM_START( animalc )
SAMMYMDL_BIOS
ROM_REGION( 0x1000000, "oki", 0 )
ROM_LOAD( "vx2302l01.u021", 0x00000, 0x200000, CRC(84cf123b) SHA1(d8b425c93ff1a560e3f92c70d7eb93a05c3581af) )
@ -1898,6 +1921,8 @@ static DRIVER_INIT( animalc )
***************************************************************************/
ROM_START( itazuram )
SAMMYMDL_BIOS
ROM_REGION( 0x1000000, "oki", 0 )
ROM_LOAD( "vx2002l01.u021", 0x00000, 0x200000, CRC(ddbdd2f3) SHA1(91f67a938929be0261442e066e3d2c03b5e9f06a) )
@ -1953,6 +1978,8 @@ static DRIVER_INIT( itazuram )
***************************************************************************/
ROM_START( tdoboon )
SAMMYMDL_BIOS
ROM_REGION( 0x1000000, "oki", 0 )
ROM_LOAD( "em4210l01.u021.bin", 0x00000, 0x200000, CRC(3523e314) SHA1(d07c5d17d3f285be4cde810547f427e84f98968f) )
@ -1973,6 +2000,8 @@ ROM_END
***************************************************************************/
ROM_START( pyenaget )
SAMMYMDL_BIOS
ROM_REGION( 0x1000000, "oki", 0 )
ROM_LOAD( "vx1802l01.u021", 0x00000, 0x200000, CRC(7a22a657) SHA1(2a98085862fd958209253c5401e41eae4f7c06ea) )
@ -2007,6 +2036,8 @@ ROM_END
***************************************************************************/
ROM_START( haekaka )
SAMMYMDL_BIOS
ROM_REGION( 0x1000000, "oki", 0 )
ROM_LOAD( "em4208l01.u021.bin", 0x00000, 0x200000, CRC(d23bb748) SHA1(38d5b6c4b2cd470b3a68574aeca3f9fa9032245e) )
@ -2038,10 +2069,11 @@ static DRIVER_INIT( haekaka )
***************************************************************************/
GAME( 1997, gegege, 0, gegege, gegege, gegege, ROT0, "Banpresto / Sigma", "GeGeGe no Kitarou Youkai Slot", 0 )
GAME( 1997, gegege, 0, gegege, gegege, gegege, ROT0, "Banpresto / Sigma", "GeGeGe no Kitarou Youkai Slot", 0 )
// Sammy Medal Games:
GAME( 2000, animalc, 0, animalc, sammymdl, animalc, ROT0, "Sammy", "Animal Catch", GAME_IMPERFECT_SOUND )
GAME( 2000, itazuram, 0, itazuram, sammymdl, itazuram, ROT0, "Sammy", "Itazura Monkey", GAME_IMPERFECT_SOUND )
GAME( 2000, pyenaget, 0, pyenaget, sammymdl, haekaka, ROT0, "Sammy", "Pye-nage Taikai", GAME_IMPERFECT_SOUND )
GAME( 2000, tdoboon, 0, tdoboon, haekaka, haekaka, ROT0, "Sammy", "Taihou de Doboon", GAME_IMPERFECT_SOUND )
GAME( 2001, haekaka, 0, haekaka, haekaka, haekaka, ROT0, "Sammy", "Hae Hae Ka Ka Ka", GAME_IMPERFECT_SOUND )
GAME( 2000, sammymdl, 0, sammymdl, sammymdl, 0, ROT0, "Sammy", "Sammy Medal Game System Bios", GAME_IS_BIOS_ROOT )
GAME( 2000, animalc, sammymdl, animalc, sammymdl, animalc, ROT0, "Sammy", "Animal Catch", 0 )
GAME( 2000, itazuram, sammymdl, itazuram, sammymdl, itazuram, ROT0, "Sammy", "Itazura Monkey", 0 )
GAME( 2000, pyenaget, sammymdl, pyenaget, sammymdl, haekaka, ROT0, "Sammy", "Pye-nage Taikai", 0 )
GAME( 2000, tdoboon, sammymdl, tdoboon, haekaka, haekaka, ROT0, "Sammy", "Taihou de Doboon", 0 )
GAME( 2001, haekaka, sammymdl, haekaka, haekaka, haekaka, ROT0, "Sammy", "Hae Hae Ka Ka Ka", 0 )

View File

@ -1107,6 +1107,48 @@ static ADDRESS_MAP_START( stisub_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE( 0xfc00, 0xfdff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_BASE(&reel3_ram)
ADDRESS_MAP_END
/***************************************************************************
Magic Train (Clear NVRAM ROM?)
***************************************************************************/
static ADDRESS_MAP_START( mtrainnv_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE( 0x00000, 0x0bfff ) AM_ROM
AM_RANGE( 0x0c000, 0x0cfff ) AM_RAM
AM_RANGE( 0x0d000, 0x0d000 ) AM_READ_PORT( "SW1" )
AM_RANGE( 0x0d001, 0x0d001 ) AM_READ_PORT( "SW2" )
AM_RANGE( 0x0d002, 0x0d002 ) AM_READ_PORT( "SW3" )
AM_RANGE( 0x0d004, 0x0d004 ) AM_READ_PORT( "SW4" )
AM_RANGE( 0x0d005, 0x0d005 ) AM_READ_PORT( "INB" )
AM_RANGE( 0x0d006, 0x0d006 ) AM_READ_PORT( "INA" )
// AM_RANGE( 0x0d008, 0x0d008 ) AM_READWRITE
// AM_RANGE( 0x0d009, 0x0d009 ) AM_WRITE
// AM_RANGE( 0x0d00a, 0x0d00a ) AM_WRITE
// AM_RANGE( 0x0d00b, 0x0d00b ) AM_WRITE
AM_RANGE( 0x0d00c, 0x0d00c ) AM_READ_PORT( "INC" )
AM_RANGE( 0x0d010, 0x0d013 ) AM_WRITE(colordac_w)
// AM_RANGE( 0x0d012, 0x0d012 ) AM_WRITE
AM_RANGE( 0x0d016, 0x0d017 ) AM_DEVWRITE( "ymsnd", ym3812_w )
// AM_RANGE( 0x0d018, 0x0d018 ) AM_DEVREADWRITE_MODERN("oki", okim6295_device, read, write)
AM_RANGE( 0x0e000, 0x0e7ff ) AM_RAM_WRITE( subsino_colorram_w ) AM_BASE( &colorram )
AM_RANGE( 0x0e800, 0x0efff ) AM_RAM_WRITE( subsino_videoram_w ) AM_BASE( &videoram )
AM_RANGE( 0xf000, 0xf7ff ) AM_READWRITE(reel_scrollattr_r, reel_scrollattr_w)
AM_RANGE( 0xf800, 0xf9ff ) AM_RAM_WRITE(subsino_reel1_ram_w) AM_BASE(&reel1_ram)
AM_RANGE( 0xfa00, 0xfbff ) AM_RAM_WRITE(subsino_reel2_ram_w) AM_BASE(&reel2_ram)
AM_RANGE( 0xfc00, 0xfdff ) AM_RAM_WRITE(subsino_reel3_ram_w) AM_BASE(&reel3_ram)
ADDRESS_MAP_END
static ADDRESS_MAP_START( subsino_iomap, ADDRESS_SPACE_IO, 8 )
AM_RANGE( 0x0000, 0x003f ) AM_RAM // internal regs
ADDRESS_MAP_END
@ -2703,6 +2745,13 @@ static MACHINE_CONFIG_START( stisub, driver_device )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mtrainnv, stisub )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(mtrainnv_map)
MACHINE_CONFIG_END
/***************************************************************************
* ROMs Loading *
@ -3355,6 +3404,32 @@ ROM_START( stisub )
ROM_END
/***************************************************************************
This is allegedly Magic Train - Clear NVRAM ROM:
Subsino sold a "Settings/Clear ROM" for some released titles.
These devices are *extremely* expensive (and ultra rare, only sold
to big casino corporations), and should be placed in the empty socket
to fix a dead board due to NVRAM corruption.
A version of Magic Train running on subsino.c (unlike mtrain, which is
subsino2.c) is needed to match this program ROM.
***************************************************************************/
ROM_START( mtrainnv )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "mtrain_settings.bin", 0x00000, 0x10000, CRC(584af1b5) SHA1(91d966d282823dddfdc455bb03728fcdf3713dd7) )
ROM_REGION( 0x10000, "tilemap", 0 )
ROM_COPY( "maincpu", 0x0000, 0x00000, 0x10000 ) // just to show something
ROM_REGION( 0x10000, "reels", 0 )
ROM_COPY( "maincpu", 0x0000, 0x00000, 0x10000 ) // just to show something
ROM_END
/***************************************************************************
* Driver Init / Decryption *
***************************************************************************/
@ -3529,7 +3604,19 @@ static DRIVER_INIT( stisub )
reel1_attr = auto_alloc_array(machine, UINT8, 0x200);
reel2_attr = auto_alloc_array(machine, UINT8, 0x200);
reel3_attr = auto_alloc_array(machine, UINT8, 0x200);
}
static DRIVER_INIT( mtrainnv )
{
stisub_colorram = auto_alloc_array(machine, UINT8, 256*3);
reel1_scroll = auto_alloc_array(machine, UINT8, 0x40);
reel2_scroll = auto_alloc_array(machine, UINT8, 0x40);
reel3_scroll = auto_alloc_array(machine, UINT8, 0x40);
reel1_attr = auto_alloc_array(machine, UINT8, 0x200);
reel2_attr = auto_alloc_array(machine, UINT8, 0x200);
reel3_attr = auto_alloc_array(machine, UINT8, 0x200);
}
@ -3537,18 +3624,19 @@ static DRIVER_INIT( stisub )
* Game Drivers *
***************************************************************************/
/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
GAMEL( 1990, victor21, 0, victor21, victor21, victor21, ROT0, "Subsino / Buffy", "Victor 21", 0, layout_victor21 )
GAMEL( 1991, victor5, 0, victor5, victor5, victor5, ROT0, "Subsino", "G.E.A.", 0, layout_victor5 ) // PCB black-box was marked 'victor 5' - in-game says G.E.A with no manufacturer info?
GAMEL( 1992, tisub, 0, tisub, tisub, tisub, ROT0, "Subsino", "Treasure Island (Subsino, set 1)", 0, layout_tisub )
GAMEL( 1992, tisuba, tisub, tisub, tisub, tisuba, ROT0, "Subsino", "Treasure Island (Subsino, set 2)", 0, layout_tisub )
GAMEL( 1991, crsbingo, 0, crsbingo, crsbingo, crsbingo, ROT0, "Subsino", "Poker Carnival", 0, layout_crsbingo )
GAMEL( 1995, stisub, 0, stisub, stisub, stisub, ROT0, "American Alpha", "Treasure Bonus (Subsino)", 0, layout_stisub ) // board CPU module marked 'Super Treasure Island' (alt title?)
GAMEL( 1996, sharkpy, 0, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.3)", 0, layout_sharkpy ) // missing POST messages?
GAMEL( 1996, sharkpya, sharkpy, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.6)", 0, layout_sharkpy ) // missing POST messages?
GAMEL( 1995, sharkpye, sharkpy, sharkpy, sharkpye, sharkpye, ROT0, "American Alpha", "Shark Party (English, Alpha license)", 0, layout_sharkpye ) // PCB black-box was marked 'victor 6'
GAMEL( 1995, victor6, 0, sharkpy, victor6, sharkpye, ROT0, "American Alpha", "Victor 6 (v2.3N)", 0, layout_sharkpye ) // ^^
GAMEL( 1995, victor6a, victor6, sharkpy, victor6a, sharkpye, ROT0, "American Alpha", "Victor 6 (v2.3)", 0, layout_sharkpye ) // ^^
GAMEL( 1995, victor6b, victor6, sharkpy, victor6b, sharkpye, ROT0, "American Alpha", "Victor 6 (v1.2)", 0, layout_sharkpye ) // ^^ Version # according to label, not displayed
GAMEL( 1996, smoto20, 0, srider, smoto20, smoto20, ROT0, "Subsino", "Super Rider (Italy, v2.0)", 0, layout_smoto )
GAMEL( 1996, smoto16, smoto20, srider, smoto16, smoto16, ROT0, "Subsino", "Super Moto (Italy, v1.6)", 0, layout_smoto )
// YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT
GAMEL( 1990, victor21, 0, victor21, victor21, victor21, ROT0, "Subsino / Buffy", "Victor 21", 0, layout_victor21 )
GAMEL( 1991, victor5, 0, victor5, victor5, victor5, ROT0, "Subsino", "G.E.A.", 0, layout_victor5 ) // PCB black-box was marked 'victor 5' - in-game says G.E.A with no manufacturer info?
GAMEL( 1992, tisub, 0, tisub, tisub, tisub, ROT0, "Subsino", "Treasure Island (Subsino, set 1)", 0, layout_tisub )
GAMEL( 1992, tisuba, tisub, tisub, tisub, tisuba, ROT0, "Subsino", "Treasure Island (Subsino, set 2)", 0, layout_tisub )
GAMEL( 1991, crsbingo, 0, crsbingo, crsbingo, crsbingo, ROT0, "Subsino", "Poker Carnival", 0, layout_crsbingo )
GAMEL( 1995, stisub, 0, stisub, stisub, stisub, ROT0, "American Alpha", "Treasure Bonus (Subsino)", 0, layout_stisub ) // board CPU module marked 'Super Treasure Island' (alt title?)
GAMEL( 1996, sharkpy, 0, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.3)", 0, layout_sharkpy ) // missing POST messages?
GAMEL( 1996, sharkpya, sharkpy, sharkpy, sharkpy, sharkpy, ROT0, "Subsino", "Shark Party (Italy, v1.6)", 0, layout_sharkpy ) // missing POST messages?
GAMEL( 1995, sharkpye, sharkpy, sharkpy, sharkpye, sharkpye, ROT0, "American Alpha", "Shark Party (English, Alpha license)", 0, layout_sharkpye ) // PCB black-box was marked 'victor 6'
GAMEL( 1995, victor6, 0, sharkpy, victor6, sharkpye, ROT0, "American Alpha", "Victor 6 (v2.3N)", 0, layout_sharkpye ) // ^^
GAMEL( 1995, victor6a, victor6, sharkpy, victor6a, sharkpye, ROT0, "American Alpha", "Victor 6 (v2.3)", 0, layout_sharkpye ) // ^^
GAMEL( 1995, victor6b, victor6, sharkpy, victor6b, sharkpye, ROT0, "American Alpha", "Victor 6 (v1.2)", 0, layout_sharkpye ) // ^^ Version # according to label, not displayed
GAMEL( 1996, smoto20, 0, srider, smoto20, smoto20, ROT0, "Subsino", "Super Rider (Italy, v2.0)", 0, layout_smoto )
GAMEL( 1996, smoto16, smoto20, srider, smoto16, smoto16, ROT0, "Subsino", "Super Moto (Italy, v1.6)", 0, layout_smoto )
GAME ( 1996, mtrainnv, mtrain, mtrainnv, stisub, mtrainnv, ROT0, "Subsino", "Magic Train (Clear NVRAM ROM?)", GAME_NOT_WORKING )

View File

@ -8,7 +8,7 @@ public:
optional_shared_ptr<UINT16> m_nvram;
UINT16 *vregs;
int yoffset;
int xoffset, yoffset;
int keyboard_row;
UINT16 *spriteram;
@ -32,8 +32,7 @@ public:
WRITE16_HANDLER( seta2_vregs_w );
VIDEO_START( seta2 );
VIDEO_START( seta2_offset );
VIDEO_START( seta2_xoffset );
VIDEO_START( seta2_yoffset );
SCREEN_UPDATE( seta2 );
SCREEN_EOF( seta2 );

View File

@ -8053,6 +8053,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( funcube2 ) /* (c) 2001 Namco */
DRIVER( funcube4 ) /* (c) 2001 Namco */
DRIVER( trophyh ) /* (c) 2002 Sammy USA Corporation */
DRIVER( reelquak ) /* (c) ???? <unknown> */
/* SSV System (Seta, Sammy, Visco) games */
DRIVER( srmp4 ) /* (c) 1993 Seta */
@ -8556,6 +8557,7 @@ Other Sun games
/* Sigma B98 / Sammy Medal Games */
DRIVER( gegege ) /* (c) 1997 Banpresto / Sigma */
DRIVER( sammymdl ) /* (c) 2000-2003 Sammy */
DRIVER( animalc ) /* (c) 2000 Sammy */
DRIVER( itazuram ) /* (c) 2000 Sammy */
DRIVER( pyenaget ) /* (c) 2000 Sammy */
@ -9608,6 +9610,7 @@ Other Sun games
DRIVER( smoto20 ) /* (c) 1996 Subsino */
DRIVER( smoto16 ) /* (c) 1996 Subsino */
DRIVER( mtrain ) /* (c) 1996 Subsino */
DRIVER( mtrainnv ) /* (c) 1996 Subsino */
DRIVER( expcard ) /* (c) 1998 American Alpha */
DRIVER( saklove ) /* (c) 1998 Subsino */
DRIVER( bishjan ) /* (c) 1999 Subsino */

View File

@ -15,33 +15,31 @@
Offset: Bits: Value:
0.w f--- ---- ---- ---- Last sprite
-edc ---- ---- ---- ?
---c ---- ---- ---- 0 = Each sprite specifies its size, 1 = use the size in the following words
---- b--- ---- ---- ?
---- -a98 ---- ---- tile color depth
-ed- ---- ---- ---- ?
---c ---- ---- ---- 0 = Each sprite specifies its size, 1 = Use the global size (following words)
---- b--- ---- ---- Shadow
---- -a98 ---- ---- Tile color depth
---- ---- 7654 3210 Number of sprites - 1
2.w fedc ---- ---- ---- Number of tiles?
---- ba-- ---- ---- Number of tiles along X (1 << n)
2.w fedc ba-- ---- ---- X global size
---- --98 7654 3210 X displacement
4.w fedc ---- ---- ---- Number of tiles?
---- ba-- ---- ---- Number of tiles along Y (1 << n)
4.w fedc ba-- ---- ---- Y global size
---- --98 7654 3210 Y displacement
6.w f--- ---- ---- ---- Single-sprite(s) type: tile (0) or row of tiles (1)
-edc ba98 7654 3210 Offset of the single-sprite(s) data
-edc ba98 7654 3210 Offset of the single-sprite(s) data (8 bytes each)
A single-sprite can be a tile or some horizontal rows of tiles.
Tile case:
0.w fedc ---- ---- ---- Number of tiles?
0.w fedc ---- ---- ----
---- ba-- ---- ---- Number of tiles along X (1 << n)
---- --98 7654 3210 X
2.w fedc ---- ---- ---- Number of tiles?
2.w fedc ---- ---- ----
---- ba-- ---- ---- Number of tiles along Y (1 << n)
---- --98 7654 3210 Y
@ -55,18 +53,24 @@
Row case:
0.w fedc ba-- ---- ----
0.w fedc ba-- ---- ---- Number of columns
---- --98 7654 3210 X
2.w fedc ba-- ---- ---- Number of rows - 1
---- --98 7654 3210 Y
4.w f--- ---- ---- ---- Tile size: 8x8 (0) or 16x16 (1)
-edc ba-- ---- ---- "Tilemap" page
---- --98 7654 3210 "Tilemap" Scroll X
-edc ba-- ---- ---- "Tilemap" page (0x2000 bytes each)
---- --98 7654 3210 "Tilemap" scroll X
6.w fedc ba9- ---- ----
---- ---8 7654 3210 "Tilemap" Scroll Y
---- ---8 7654 3210 "Tilemap" scroll Y
Shadows (same principle as ssv.c):
The low bits of the pens from a "shadowing" tile (regardless of color code)
substitute the top bits of the color index (0-7fff) in the frame buffer.
***************************************************************************/
@ -75,13 +79,12 @@
/***************************************************************************
Video Registers
Offset: Bits: Value:
0/2/4/6 ? Horizontal
8/a/c/e ? Vertical
0/2/4/6 ? Horizontal (same as ssv.c?)
8/a/c/e ? Vertical (same as ssv.c?)
10
12 Offset X?
@ -91,16 +94,17 @@
18
1a Offset Y?
1c Zoom Y? low bits
1e Zoom Y? high bits
1e Zoom Y? high bits *
26 1->0 during INT0, before writing sprites
30 fedc ba98 7654 321-
---- ---- ---- ---0 Disable video
32..3f ?
* A value of 1 is means no zoom, a value of 2 will halve the size.
It's unknown whether a value less than 1 means magnification (probably yes)
* A value of 0x0100 is means no zoom, a value of 0x0200 will halve the size.
A value less than 0x0100 probably means magnification.
***************************************************************************/
@ -157,60 +161,132 @@ WRITE16_HANDLER( seta2_vregs_w )
***************************************************************************/
static void seta_drawgfx( bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0,
int shadow_depth )
{
const UINT8 *addr, *source;
UINT8 pen;
UINT16 *dest;
int sx, x1, dx;
int sy, y1, dy;
addr = gfx_element_get_data(gfx, code % gfx->total_elements);
color = gfx->color_granularity * (color % gfx->total_colors);
if ( flipx ) { x1 = x0-1; x0 += gfx->width-1; dx = -1; }
else { x1 = x0 + gfx->width; dx = 1; }
if ( flipy ) { y1 = y0-1; y0 += gfx->height-1; dy = -1; }
else { y1 = y0 + gfx->height; dy = 1; }
#define SETA_DRAWGFX(SETPIXELCOLOR) \
for ( sy = y0; sy != y1; sy += dy ) \
{ \
if ( sy >= cliprect->min_y && sy <= cliprect->max_y ) \
{ \
source = addr; \
dest = BITMAP_ADDR16(bitmap, sy, 0); \
\
for ( sx = x0; sx != x1; sx += dx ) \
{ \
pen = *source++; \
\
if ( pen && sx >= cliprect->min_x && sx <= cliprect->max_x ) \
SETPIXELCOLOR \
} \
} \
\
addr += gfx->line_modulo; \
}
if (shadow_depth)
{
int pen_shift = 15 - shadow_depth;
int pen_mask = (1 << pen_shift) - 1;
SETA_DRAWGFX( { dest[sx] = ((dest[sx] & pen_mask) | (pen << pen_shift)) & 0x7fff; } )
}
else
{
SETA_DRAWGFX( { dest[sx] = (color + pen) & 0x7fff; } )
}
}
static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
{
/* Sprites list */
// Sprites list
seta2_state *state = machine->driver_data<seta2_state>();
// When debugging, use state->spriteram here, and run mame -update_in_pause
UINT16 *buffered_spriteram16 = state->buffered_spriteram;
UINT16 *s1 = buffered_spriteram16 + 0x3000/2;
UINT16 *end = &buffered_spriteram16[state->spriteram_size/2];
for ( ; s1 < end; s1+=4 )
{
int gfx;
const gfx_element *gfx;
int num = s1[0];
int xoffs = s1[1];
int yoffs = s1[2];
int sprite = s1[3];
/* Single-sprite address */
// Single-sprite address
UINT16 *s2 = &buffered_spriteram16[(sprite & 0x7fff) * 4];
/* Single-sprite tile size */
int global_sizex = xoffs & 0x0c00;
int global_sizey = yoffs & 0x0c00;
// Single-sprite size
int global_sizex = xoffs & 0xfc00;
int global_sizey = yoffs & 0xfc00;
int use_global_size = num & 0x1000;
int use_global_size = num & 0x1000;
int use_shadow = num & 0x0800;
xoffs &= 0x3ff;
yoffs &= 0x3ff;
/* Color depth */
// Color depth
int shadow_depth;
switch (num & 0x0700)
{
default:
popmessage("unknown gfxset %x",(num & 0x0700)>>8);
gfx = machine->rand()&3; break;
case 0x0700: // 8bpp tiles (76543210)
gfx = 3; break;
case 0x0600: // 6bpp tiles (--543210) (myangel sliding blocks test)
gfx = 2; break;
case 0x0500: // 4bpp tiles (3210----)
gfx = 1; break;
case 0x0400: // 4bpp tiles (----3210)
gfx = 0; break;
shadow_depth = 0;
gfx = machine->gfx[machine->rand()&3];
break;
case 0x0700: // 8bpp tiles (76543210)
shadow_depth = 8; // ?
gfx = machine->gfx[3];
break;
case 0x0600: // 6bpp tiles (--543210) (myangel sliding blocks test)
shadow_depth = 6; // ?
gfx = machine->gfx[2];
break;
case 0x0500: // 4bpp tiles (3210----)
shadow_depth = 4; // ?
gfx = machine->gfx[1];
break;
case 0x0400: // 4bpp tiles (----3210)
shadow_depth = 3; // reelquak
gfx = machine->gfx[0];
break;
// case 0x0300:
// unknown
case 0x0200: // 3bpp tiles? (-----210) (myangel "Graduate Tests")
gfx = 4; break;
case 0x0100: // 2bpp tiles??? (--10----) (myangel2 question bubble, myangel endgame)
gfx = 5; break;
case 0x0000: // no idea!
gfx = 0; break;
case 0x0200: // 3bpp tiles? (-----210) (myangel "Graduate Tests")
shadow_depth = 3; // ?
gfx = machine->gfx[4];
break;
case 0x0100: // 2bpp tiles??? (--10----) (myangel2 question bubble, myangel endgame)
shadow_depth = 2; // myangel2
gfx = machine->gfx[5];
break;
case 0x0000: // no idea!
shadow_depth = 4; // ?
gfx = machine->gfx[0];
break;
}
if (!use_shadow)
shadow_depth = 0;
/* Number of single-sprites */
// Number of single-sprites
num = (num & 0x00ff) + 1;
for( ; num > 0; num--,s2+=4 )
@ -222,7 +298,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
if (sprite & 0x8000)
{
rectangle clip;
int dx,x,y;
int dx, x, y;
int flipx;
int flipy;
int sx = s2[0];
@ -231,48 +307,54 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
int scrolly = s2[3];
int tilesize = (scrollx & 0x8000) >> 15;
int page = (scrollx & 0x7c00) >> 10;
int height = ((sy & 0xfc00) >> 10) + 1;
int width = use_global_size ? global_sizex : sx;
int height = use_global_size ? global_sizey : sy;
height = ((height & 0xfc00) >> 10) + 1;
width = ((width & 0xfc00) >> 10)/* + 1*/; // reelquak reels
if (!width)
continue;
sx &= 0x3ff;
sy &= 0x1ff;
scrollx += state->xoffset;
scrollx &= 0x3ff;
scrolly &= 0x1ff;
clip.min_y = (sy + yoffs) & 0x1ff;
// sprite clipping region (x)
clip.min_x = (sx + xoffs) & 0x3ff;
clip.min_x = (clip.min_x & 0x1ff) - (clip.min_x & 0x200);
clip.max_x = clip.min_x + width * 0x10 - 1;
if (clip.min_x > cliprect->max_x) continue;
if (clip.max_x < cliprect->min_x) continue;
if (clip.min_x < cliprect->min_x) clip.min_x = cliprect->min_x;
if (clip.max_x > cliprect->max_x) clip.max_x = cliprect->max_x;
// sprite clipping region (y)
clip.min_y = ((sy + yoffs) & 0x1ff) - state->yoffset;
clip.max_y = clip.min_y + height * 0x10 - 1;
if (clip.min_y > cliprect->max_y) continue;
if (clip.max_y < cliprect->min_y) continue;
clip.min_x = cliprect->min_x;
clip.max_x = cliprect->max_x;
if (clip.min_y < cliprect->min_y) clip.min_y = cliprect->min_y;
if (clip.max_y > cliprect->max_y) clip.max_y = cliprect->max_y;
dx = sx + (scrollx & 0x3ff) + xoffs + 0x10;
/* Draw the rows */
/* I don't think the following is entirely correct (when using 16x16
tiles x should probably loop from 0 to 0x20) but it seems to work
fine in all the games we have for now. */
// Draw the rows
for (y = 0; y < (0x40 >> tilesize); y++)
{
int py = ((scrolly - (y+1) * (8 << tilesize) + 0x10) & 0x1ff) - 0x10 - state->yoffset;
if (py < clip.min_y - 0x10) continue;
if (py > clip.max_y) continue;
for (x = 0; x < 0x40;x++)
for (x = 0; x < 0x40; x++)
{
int px = ((dx + x * (8 << tilesize) + 0x10) & 0x3ff) - 0x10;
int tx, ty;
int attr, code, color;
UINT16 *s3;
if (px < clip.min_x - 0x10) continue;
if (px > clip.max_x) continue;
s3 = &buffered_spriteram16[2 * ((page * 0x2000/4) + ((y & 0x1f) << 6) + (x & 0x03f))];
attr = s3[0];
@ -287,11 +369,17 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
{
for (tx = 0; tx <= tilesize; tx++)
{
drawgfx_transpen(bitmap, cliprect,machine->gfx[gfx],
int dst_x = (px + (flipx ? tilesize-tx : tx) * 8) & 0x3ff;
int dst_y = (py + (flipy ? tilesize-ty : ty) * 8) & 0x1ff;
dst_x = (dst_x & 0x1ff) - (dst_x & 0x200);
seta_drawgfx(bitmap, &clip, gfx,
code ^ tx ^ (ty<<1),
color,
flipx, flipy,
px + (flipx ? tilesize-tx : tx) * 8, py + (flipy ? tilesize-ty : ty) * 8,0 );
dst_x, dst_y,
shadow_depth );
}
}
@ -320,6 +408,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
sy += yoffs;
sx = (sx & 0x1ff) - (sx & 0x200);
sy &= 0x1ff;
sy -= state->yoffset;
@ -329,18 +418,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
{
for (x = 0; x <= sizex; x++)
{
drawgfx_transpen(bitmap, cliprect,machine->gfx[gfx],
seta_drawgfx(bitmap, cliprect, gfx,
code++,
color,
flipx, flipy,
sx + (flipx ? sizex-x : x) * 8, sy + (flipy ? sizey-y : y) * 8,0 );
sx + (flipx ? sizex-x : x) * 8, sy + (flipy ? sizey-y : y) * 8,
shadow_depth );
}
}
}
}
if (s1[0] & 0x8000) break; /* end of list marker */
} /* sprite list */
if (s1[0] & 0x8000) break; // end of list marker
} // sprite list
}
@ -363,10 +453,22 @@ VIDEO_START( seta2 )
state->buffered_spriteram = auto_alloc_array(machine, UINT16, state->spriteram_size/2);
state->xoffset = 0;
state->yoffset = 0;
state_save_register_global_pointer(machine, state->vregs, 0x40);
}
VIDEO_START( seta2_offset )
VIDEO_START( seta2_xoffset )
{
seta2_state *state = machine->driver_data<seta2_state>();
VIDEO_START_CALL(seta2);
state->xoffset = 0x200;
}
VIDEO_START( seta2_yoffset )
{
seta2_state *state = machine->driver_data<seta2_state>();
@ -379,12 +481,12 @@ SCREEN_UPDATE( seta2 )
{
seta2_state *state = screen->machine->driver_data<seta2_state>();
/* Black or pen 0? */
bitmap_fill(bitmap,cliprect,0);
// Black or pen 0?
bitmap_fill(bitmap, cliprect, screen->machine->pens[0]);
if (state->vregs[0x30/2] & 1) return 0; // BLANK SCREEN
if ( (state->vregs[0x30/2] & 1) == 0 ) // 1 = BLANK SCREEN
draw_sprites(screen->machine, bitmap, cliprect);
draw_sprites(screen->machine,bitmap,cliprect);
return 0;
}
@ -392,6 +494,6 @@ SCREEN_EOF( seta2 )
{
seta2_state *state = machine->driver_data<seta2_state>();
/* Buffer sprites by 1 frame */
// Buffer sprites by 1 frame
memcpy(state->buffered_spriteram, state->spriteram, state->spriteram_size);
}