mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
- MAMEtesters bugs fixed: ninjakd2_0111u3gra, mnight0102gre
- cleaned up and merged ninjakd2, mnight and omegaf drivers into a single driver - added flip screen support to all games - fixed sprite overdraw mode: - ninjakd2 congratulations screen (e.g. stage 3) shows japanese characters which were previously missing - in ninjakd2, at the beginning of a level items are visible during the initial fade in. I'm not sure if this is correct but the other effects wouldn't work otherwise - in mnight attract mode, when the big ship is firing the other sprites no longer leave trails - in mnight at the end of a level the screen is slowly filled with balls and then slowly cleared to begin the following level. Same effect in the death sequence during attract mode. - added proper computation of sprites to be drawn taking into account double size sprites. This fixes sticking shots in mnight without need for a hack. - lowered ninjakd2 PCM playback rate to 13020 (from 16000). This seems to sound better and is a round division from one of the master clocks. - removed ROM patch that was used to avoid the input protection in omegaf, added a rough but effective protection simulation. - corrected some dip switches - hooked up sound cpu reset line - simplified ROM loading for the older games swizzling address lines in driver init.
This commit is contained in:
parent
34a413510d
commit
3caf91c713
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -1639,7 +1639,6 @@ src/mame/drivers/mjkjidai.c svneol=native#text/plain
|
||||
src/mame/drivers/mjsister.c svneol=native#text/plain
|
||||
src/mame/drivers/mjsiyoub.c svneol=native#text/plain
|
||||
src/mame/drivers/mlanding.c svneol=native#text/plain
|
||||
src/mame/drivers/mnight.c svneol=native#text/plain
|
||||
src/mame/drivers/model1.c svneol=native#text/plain
|
||||
src/mame/drivers/model2.c svneol=native#text/plain
|
||||
src/mame/drivers/model3.c svneol=native#text/plain
|
||||
@ -1708,7 +1707,6 @@ src/mame/drivers/offtwall.c svneol=native#text/plain
|
||||
src/mame/drivers/ohmygod.c svneol=native#text/plain
|
||||
src/mame/drivers/ojankohs.c svneol=native#text/plain
|
||||
src/mame/drivers/olibochu.c svneol=native#text/plain
|
||||
src/mame/drivers/omegaf.c svneol=native#text/plain
|
||||
src/mame/drivers/omegrace.c svneol=native#text/plain
|
||||
src/mame/drivers/oneshot.c svneol=native#text/plain
|
||||
src/mame/drivers/onetwo.c svneol=native#text/plain
|
||||
@ -2231,6 +2229,7 @@ src/mame/includes/namcos22.h svneol=native#text/plain
|
||||
src/mame/includes/nb1413m3.h svneol=native#text/plain
|
||||
src/mame/includes/neogeo.h svneol=native#text/plain
|
||||
src/mame/includes/news.h svneol=native#text/plain
|
||||
src/mame/includes/ninjakd2.h svneol=native#text/plain
|
||||
src/mame/includes/nitedrvr.h svneol=native#text/plain
|
||||
src/mame/includes/offtwall.h svneol=native#text/plain
|
||||
src/mame/includes/orbit.h svneol=native#text/plain
|
||||
@ -2909,7 +2908,6 @@ src/mame/video/mikie.c svneol=native#text/plain
|
||||
src/mame/video/mitchell.c svneol=native#text/plain
|
||||
src/mame/video/mjkjidai.c svneol=native#text/plain
|
||||
src/mame/video/mjsister.c svneol=native#text/plain
|
||||
src/mame/video/mnight.c svneol=native#text/plain
|
||||
src/mame/video/model1.c svneol=native#text/plain
|
||||
src/mame/video/model2.c svneol=native#text/plain
|
||||
src/mame/video/model2rd.c svneol=native#text/plain
|
||||
@ -2960,7 +2958,6 @@ src/mame/video/nycaptor.c svneol=native#text/plain
|
||||
src/mame/video/offtwall.c svneol=native#text/plain
|
||||
src/mame/video/ohmygod.c svneol=native#text/plain
|
||||
src/mame/video/ojankohs.c svneol=native#text/plain
|
||||
src/mame/video/omegaf.c svneol=native#text/plain
|
||||
src/mame/video/oneshot.c svneol=native#text/plain
|
||||
src/mame/video/orbit.c svneol=native#text/plain
|
||||
src/mame/video/othldrby.c svneol=native#text/plain
|
||||
|
@ -51,6 +51,7 @@ enum
|
||||
XTAL_4_224MHz = 4224000, /* Used to drive OKI M6295 chips, usually with /4 divider */
|
||||
XTAL_4_433619MHz = 4433619, /* PAL subcarrier */
|
||||
XTAL_4_9152MHz = 4915200,
|
||||
XTAL_5MHz = 5000000, /* Mutant Night */
|
||||
XTAL_6MHz = 6000000,
|
||||
XTAL_6_144MHz = 6144000, /* Used on Alpha Denshi early 80's games sound board */
|
||||
XTAL_7_3728MHz = 7372800,
|
||||
|
@ -1,476 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
Mutant Night
|
||||
|
||||
driver by Leandro Dardini
|
||||
|
||||
TODO:
|
||||
- must do palette marking, it is overflowing at the moment
|
||||
|
||||
***************************************************************************/
|
||||
#include "driver.h"
|
||||
#include "sound/2203intf.h"
|
||||
|
||||
WRITE8_HANDLER( mnight_bgvideoram_w );
|
||||
WRITE8_HANDLER( mnight_fgvideoram_w );
|
||||
WRITE8_HANDLER( mnight_sprite_overdraw_w );
|
||||
WRITE8_HANDLER( mnight_background_enable_w );
|
||||
VIDEO_START( mnight );
|
||||
VIDEO_UPDATE( mnight );
|
||||
|
||||
extern UINT8 *mnight_scrolly_ram;
|
||||
extern UINT8 *mnight_scrollx_ram;
|
||||
extern UINT8 *mnight_bgenable_ram;
|
||||
extern UINT8 *mnight_spoverdraw_ram;
|
||||
extern UINT8 *mnight_background_videoram;
|
||||
extern UINT8 *mnight_foreground_videoram;
|
||||
extern size_t mnight_backgroundram_size;
|
||||
extern size_t mnight_foregroundram_size;
|
||||
|
||||
static int mnight_bank_latch = 255, main_cpu_num;
|
||||
|
||||
static MACHINE_RESET( mnight )
|
||||
{
|
||||
main_cpu_num = 0;
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( mnight_interrupt )
|
||||
{
|
||||
cpunum_set_input_line_and_vector(0,0,HOLD_LINE,0xd7); /* RST 10h */
|
||||
}
|
||||
|
||||
static READ8_HANDLER( mnight_bankselect_r )
|
||||
{
|
||||
return mnight_bank_latch;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( mnight_bankselect_w )
|
||||
{
|
||||
UINT8 *RAM = memory_region(REGION_CPU1+main_cpu_num);
|
||||
int bankaddress;
|
||||
|
||||
if ( data != mnight_bank_latch )
|
||||
{
|
||||
mnight_bank_latch = data;
|
||||
|
||||
bankaddress = 0x10000 + ((data & 0x7) * 0x4000);
|
||||
memory_set_bankptr(1,&RAM[bankaddress]); /* Select 8 banks of 16k */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_READ(MRA8_BANK1)
|
||||
AM_RANGE(0xc000, 0xf7ff) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xf800, 0xf800) AM_READ(input_port_2_r)
|
||||
AM_RANGE(0xf801, 0xf801) AM_READ(input_port_0_r)
|
||||
AM_RANGE(0xf802, 0xf802) AM_READ(input_port_1_r)
|
||||
AM_RANGE(0xf803, 0xf803) AM_READ(input_port_3_r)
|
||||
AM_RANGE(0xf804, 0xf804) AM_READ(input_port_4_r)
|
||||
AM_RANGE(0xfa00, 0xfa00) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xfa01, 0xfa01) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xfa02, 0xfa02) AM_READ(mnight_bankselect_r)
|
||||
AM_RANGE(0xfa03, 0xfa03) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xfa08, 0xfa09) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xfa0a, 0xfa0b) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xfa0c, 0xfa0c) AM_READ(MRA8_RAM)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0xc000, 0xd9ff) AM_WRITE(MWA8_RAM)
|
||||
AM_RANGE(0xda00, 0xdfff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(mnight_bgvideoram_w) AM_BASE(&mnight_background_videoram) AM_SIZE(&mnight_backgroundram_size) // VFY
|
||||
AM_RANGE(0xe800, 0xefff) AM_WRITE(mnight_fgvideoram_w) AM_BASE(&mnight_foreground_videoram) AM_SIZE(&mnight_foregroundram_size) //VFY
|
||||
AM_RANGE(0xf000, 0xf5ff) AM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram)
|
||||
AM_RANGE(0xf600, 0xf7ff) AM_WRITE(MWA8_RAM)
|
||||
AM_RANGE(0xfa00, 0xfa00) AM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xfa01, 0xfa01) AM_WRITE(MWA8_RAM) // unknown but used
|
||||
AM_RANGE(0xfa02, 0xfa02) AM_WRITE(mnight_bankselect_w)
|
||||
AM_RANGE(0xfa03, 0xfa03) AM_WRITE(mnight_sprite_overdraw_w) AM_BASE(&mnight_spoverdraw_ram)
|
||||
AM_RANGE(0xfa08, 0xfa09) AM_WRITE(MWA8_RAM) AM_BASE(&mnight_scrollx_ram)
|
||||
AM_RANGE(0xfa0a, 0xfa0b) AM_WRITE(MWA8_RAM) AM_BASE(&mnight_scrolly_ram)
|
||||
AM_RANGE(0xfa0c, 0xfa0c) AM_WRITE(mnight_background_enable_w) AM_BASE(&mnight_bgenable_ram)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( snd_readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r)
|
||||
AM_RANGE(0xefee, 0xefee) AM_READ(MRA8_NOP)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( snd_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM)
|
||||
AM_RANGE(0xeff5, 0xeff6) AM_WRITE(MWA8_NOP) /* SAMPLE FREQUENCY ??? */
|
||||
AM_RANGE(0xefee, 0xefee) AM_WRITE(MWA8_NOP) /* CHIP COMMAND ?? */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( snd_writeport, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x00, 0x00) AM_WRITE(YM2203_control_port_0_w)
|
||||
AM_RANGE(0x01, 0x01) AM_WRITE(YM2203_write_port_0_w)
|
||||
AM_RANGE(0x80, 0x80) AM_WRITE(YM2203_control_port_1_w)
|
||||
AM_RANGE(0x81, 0x81) AM_WRITE(YM2203_write_port_1_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( mnight )
|
||||
PORT_START /* Player 1 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START /* Player 2 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) /* keep pressed during boot to enter service mode */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START /* DSW0 */
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x02, "30k and every 50k" )
|
||||
PORT_DIPSETTING( 0x00, "50k and every 80k" )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x00, "Difficult" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Free Game" )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x80, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x40, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
|
||||
PORT_START /* DSW1 */
|
||||
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( arkarea )
|
||||
PORT_START /* Player 1 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START /* Player 2 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) /* keep pressed during boot to enter service mode */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START /* DSW0 */
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x40, "50000 and every 50000" )
|
||||
PORT_DIPSETTING( 0x00, "100000 and every 100000" )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x80, "3" )
|
||||
PORT_DIPSETTING( 0x00, "4" )
|
||||
|
||||
PORT_START /* DSW1 */
|
||||
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8,8, /* 8*8 characters */
|
||||
1024, /* 1024 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{0,1,2,3}, /* the bitplanes are packed in one nibble */
|
||||
{0, 4, 16384*8+0, 16384*8+4, 8, 12, 16384*8+8, 16384*8+12},
|
||||
{16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7},
|
||||
8*16
|
||||
};
|
||||
|
||||
static const gfx_layout spritelayout =
|
||||
{
|
||||
16,16, /* 16*16 characters */
|
||||
1536, /* 1536 sprites */
|
||||
4, /* 4 bits per pixel */
|
||||
{0,1,2,3}, /* the bitplanes are packed in one nibble */
|
||||
{0, 4, 0x18000*8+0, 0x18000*8+4, 8, 12, 0x18000*8+8, 0x18000*8+12,
|
||||
16*8+0, 16*8+4, 16*8+0x18000*8+0, 16*8+0x18000*8+4, 16*8+8, 16*8+12, 16*8+0x18000*8+8, 16*8+0x18000*8+12},
|
||||
{16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7,
|
||||
32*8+16*0, 32*8+16*1, 32*8+16*2, 32*8+16*3, 32*8+16*4, 32*8+16*5, 32*8+16*6, 32*8+16*7},
|
||||
8*64
|
||||
};
|
||||
|
||||
static const gfx_layout bigspritelayout =
|
||||
{
|
||||
32,32, /* 32*32 characters */
|
||||
384, /* 384 sprites */
|
||||
4, /* 4 bits per pixel */
|
||||
{0,1,2,3}, /* the bitplanes are packed in one nibble */
|
||||
{0, 4, 0x18000*8+0, 0x18000*8+4, 8, 12, 0x18000*8+8, 0x18000*8+12,
|
||||
16*8+0, 16*8+4, 16*8+0x18000*8+0, 16*8+0x18000*8+4, 16*8+8, 16*8+12, 16*8+0x18000*8+8, 16*8+0x18000*8+12,
|
||||
64*8+0, 64*8+4, 64*8+0x18000*8+0, 64*8+0x18000*8+4, 64*8+8, 64*8+12, 64*8+0x18000*8+8, 64*8+0x18000*8+12,
|
||||
64*8+16*8+0, 64*8+16*8+4, 64*8+16*8+0x18000*8+0, 64*8+16*8+0x18000*8+4,
|
||||
64*8+16*8+8, 64*8+16*8+12, 64*8+16*8+0x18000*8+8, 64*8+16*8+0x18000*8+12 },
|
||||
{16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7,
|
||||
32*8+16*0, 32*8+16*1, 32*8+16*2, 32*8+16*3, 32*8+16*4, 32*8+16*5, 32*8+16*6, 32*8+16*7,
|
||||
128*8+16*0, 128*8+16*1, 128*8+16*2, 128*8+16*3,
|
||||
128*8+16*4, 128*8+16*5, 128*8+16*6, 128*8+16*7,
|
||||
128*8+32*8+16*0, 128*8+32*8+16*1, 128*8+32*8+16*2, 128*8+32*8+16*3,
|
||||
128*8+32*8+16*4, 128*8+32*8+16*5, 128*8+32*8+16*6, 128*8+32*8+16*7 },
|
||||
8*64*4
|
||||
};
|
||||
|
||||
|
||||
static GFXDECODE_START( mnight )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, bigspritelayout, 16*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0, charlayout, 32*16, 16)
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( mnight )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD(Z80, 12000000/2) /* 12000000/2 ??? */
|
||||
MDRV_CPU_PROGRAM_MAP(readmem,writemem) /* very sensitive to these settings */
|
||||
MDRV_CPU_VBLANK_INT(mnight_interrupt,1)
|
||||
|
||||
MDRV_CPU_ADD(Z80, 5000000)
|
||||
/* audio CPU */ /* 5mhz crystal ??? */
|
||||
MDRV_CPU_PROGRAM_MAP(snd_readmem,snd_writemem)
|
||||
MDRV_CPU_IO_MAP(0,snd_writeport)
|
||||
MDRV_CPU_VBLANK_INT(irq0_line_hold,2)
|
||||
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(10000))
|
||||
MDRV_INTERLEAVE(10)
|
||||
|
||||
MDRV_MACHINE_RESET(mnight)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1)
|
||||
MDRV_GFXDECODE(mnight)
|
||||
MDRV_PALETTE_LENGTH(768)
|
||||
|
||||
MDRV_VIDEO_START(mnight)
|
||||
MDRV_VIDEO_UPDATE(mnight)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD(YM2203, 12000000/8)
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MDRV_SOUND_ADD(YM2203, 12000000/8)
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
ROM_START( mnight )
|
||||
ROM_REGION( 0x30000, REGION_CPU1, 0 )
|
||||
ROM_LOAD( "mn6-j19.bin", 0x00000, 0x8000, CRC(56678d14) SHA1(acf3a97ca29db8ab9cad69599c5567464af3ae44) )
|
||||
ROM_LOAD( "mn5-j17.bin", 0x10000, 0x8000, CRC(2a73f88e) SHA1(0a7b769174f2b976650453d808cb23668dff0260) )
|
||||
ROM_LOAD( "mn4-j16.bin", 0x18000, 0x8000, CRC(c5e42bb4) SHA1(1956e737ae393e987cb7e8eae520518f1e0f597f) )
|
||||
ROM_LOAD( "mn3-j14.bin", 0x20000, 0x8000, CRC(df6a4f7a) SHA1(ce3cb84b514220d686b12c03567289fd23da0fe1) )
|
||||
ROM_LOAD( "mn2-j12.bin", 0x28000, 0x8000, CRC(9c391d1b) SHA1(06e8c202337e3eba38c479e8b7e29a3f8ffc4ed1) )
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "mn1-j7.bin", 0x00000, 0x10000, CRC(a0782a31) SHA1(8abd2f0b0c2c2eb876f324f7a095a5cdc773c187) )
|
||||
|
||||
ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "mn11-b20.bin", 0x00000, 0x4000, CRC(4d37e0f4) SHA1(a6d9aaccd97769197622cda45474e223c2ee1d98) ) // background tiles
|
||||
ROM_CONTINUE( 0x18000, 0x4000 )
|
||||
ROM_CONTINUE( 0x04000, 0x4000 )
|
||||
ROM_CONTINUE( 0x1c000, 0x4000 )
|
||||
ROM_LOAD( "mn12-b22.bin", 0x08000, 0x4000, CRC(b22cbbd3) SHA1(70984f1051fd236730d97011bc87dacb3ca38594) )
|
||||
ROM_CONTINUE( 0x20000, 0x4000 )
|
||||
ROM_CONTINUE( 0x0c000, 0x4000 )
|
||||
ROM_CONTINUE( 0x24000, 0x4000 )
|
||||
ROM_LOAD( "mn13-b23.bin", 0x10000, 0x4000, CRC(65714070) SHA1(48f3c130c97d00e8f0535904dc2237277067c475) )
|
||||
ROM_CONTINUE( 0x28000, 0x4000 )
|
||||
ROM_CONTINUE( 0x14000, 0x4000 )
|
||||
ROM_CONTINUE( 0x2c000, 0x4000 )
|
||||
|
||||
ROM_REGION( 0x30000, REGION_GFX2, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "mn7-e11.bin", 0x00000, 0x4000, CRC(4883059c) SHA1(53d4b9b0f0725c25e302ee1549a306778ec74d85) ) // sprites tiles
|
||||
ROM_CONTINUE( 0x18000, 0x4000 )
|
||||
ROM_CONTINUE( 0x04000, 0x4000 )
|
||||
ROM_CONTINUE( 0x1c000, 0x4000 )
|
||||
ROM_LOAD( "mn8-e12.bin", 0x08000, 0x4000, CRC(02b91445) SHA1(f0cf85f9e17c40248de16bca8df6d745e359b92d) )
|
||||
ROM_CONTINUE( 0x20000, 0x4000 )
|
||||
ROM_CONTINUE( 0x0c000, 0x4000 )
|
||||
ROM_CONTINUE( 0x24000, 0x4000 )
|
||||
ROM_LOAD( "mn9-e14.bin", 0x10000, 0x4000, CRC(9f08d160) SHA1(1a0041ad138e7e6598d4d03d7cbd52a7244557ac) )
|
||||
ROM_CONTINUE( 0x28000, 0x4000 )
|
||||
ROM_CONTINUE( 0x14000, 0x4000 )
|
||||
ROM_CONTINUE( 0x2c000, 0x4000 )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX3, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "mn10-b10.bin", 0x00000, 0x2000, CRC(37b8221f) SHA1(ac86e0ae8039fd30a028a893d08ce099f7765615) ) // foreground tiles OK
|
||||
ROM_CONTINUE( 0x04000, 0x2000 )
|
||||
ROM_CONTINUE( 0x02000, 0x2000 )
|
||||
ROM_CONTINUE( 0x06000, 0x2000 )
|
||||
ROM_END
|
||||
|
||||
ROM_START( arkarea )
|
||||
ROM_REGION( 0x30000, REGION_CPU1, 0 )
|
||||
ROM_LOAD( "arkarea.008", 0x00000, 0x8000, CRC(1ce1b5b9) SHA1(ab7755523d58736b124deb59779dedee870fd7d2) )
|
||||
ROM_LOAD( "arkarea.009", 0x10000, 0x8000, CRC(db1c81d1) SHA1(64a2f51c218d84c4eaeb8c5a5a3f0f4cdf5d174c) )
|
||||
ROM_LOAD( "arkarea.010", 0x18000, 0x8000, CRC(5a460dae) SHA1(e64d3662bb074a528cd71061621c0dd3765928b6) )
|
||||
ROM_LOAD( "arkarea.011", 0x20000, 0x8000, CRC(63f022c9) SHA1(414f52d2b9584f08285b261d1dafcc9e6e5e0c74) )
|
||||
ROM_LOAD( "arkarea.012", 0x28000, 0x8000, CRC(3c4c65d5) SHA1(e11f840f8b1da0933a0a4342f5fa1a17f0d6d3e2) )
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "arkarea.013", 0x00000, 0x8000, CRC(2d409d58) SHA1(6344b43db5459691728c3f843b643c84ea71dd8e) )
|
||||
|
||||
ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "arkarea.003", 0x00000, 0x4000, CRC(6f45a308) SHA1(b6994fe1f50d5e9cf38d3efbd69a2c5f76f33c56) ) // background tiles
|
||||
ROM_CONTINUE( 0x18000, 0x4000 )
|
||||
ROM_CONTINUE( 0x04000, 0x4000 )
|
||||
ROM_CONTINUE( 0x1c000, 0x4000 )
|
||||
ROM_LOAD( "arkarea.002", 0x08000, 0x4000, CRC(051d3482) SHA1(3ebef1a7280f52df6d5ee34e3d4e7567aac0c165) )
|
||||
ROM_CONTINUE( 0x20000, 0x4000 )
|
||||
ROM_CONTINUE( 0x0c000, 0x4000 )
|
||||
ROM_CONTINUE( 0x24000, 0x4000 )
|
||||
ROM_LOAD( "arkarea.001", 0x10000, 0x4000, CRC(09d11ab7) SHA1(14f68e93e7173069f790493eafe9e1adc1a074cc) )
|
||||
ROM_CONTINUE( 0x28000, 0x4000 )
|
||||
ROM_CONTINUE( 0x14000, 0x4000 )
|
||||
ROM_CONTINUE( 0x2c000, 0x4000 )
|
||||
|
||||
ROM_REGION( 0x30000, REGION_GFX2, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "arkarea.007", 0x00000, 0x4000, CRC(d5684a27) SHA1(4961e8a5df2510afb1ef3e937d0a5d52e91893a3) ) // sprites tiles
|
||||
ROM_CONTINUE( 0x18000, 0x4000 )
|
||||
ROM_CONTINUE( 0x04000, 0x4000 )
|
||||
ROM_CONTINUE( 0x1c000, 0x4000 )
|
||||
ROM_LOAD( "arkarea.006", 0x08000, 0x4000, CRC(2c0567d6) SHA1(f36a2a3ff487660f89470516617482331f008da0) )
|
||||
ROM_CONTINUE( 0x20000, 0x4000 )
|
||||
ROM_CONTINUE( 0x0c000, 0x4000 )
|
||||
ROM_CONTINUE( 0x24000, 0x4000 )
|
||||
ROM_LOAD( "arkarea.005", 0x10000, 0x4000, CRC(9886004d) SHA1(4050756af5c00ab1a368780fe091460fd9e2cb05) )
|
||||
ROM_CONTINUE( 0x28000, 0x4000 )
|
||||
ROM_CONTINUE( 0x14000, 0x4000 )
|
||||
ROM_CONTINUE( 0x2c000, 0x4000 )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX3, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "arkarea.004", 0x00000, 0x2000, CRC(69e36af2) SHA1(2bccef8f396dcb5261af0140af04c95ee8ecae11) ) // foreground tiles OK
|
||||
ROM_CONTINUE( 0x04000, 0x2000 )
|
||||
ROM_CONTINUE( 0x02000, 0x2000 )
|
||||
ROM_CONTINUE( 0x06000, 0x2000 )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
GAME( 1987, mnight, 0, mnight, mnight, 0, ROT0, "UPL (Kawakus license)", "Mutant Night", 0 )
|
||||
GAME( 1988?,arkarea, 0, mnight, arkarea, 0, ROT0, "UPL", "Ark Area", 0 )
|
File diff suppressed because it is too large
Load Diff
@ -1,885 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
Omega Fighter
|
||||
----------------------
|
||||
driver by Yochizo
|
||||
|
||||
This driver is heavily dependent on the Raine source.
|
||||
Very thanks to Richard Bush and the Raine team.
|
||||
|
||||
|
||||
Supported games :
|
||||
==================
|
||||
Omega Fighter (C) 1989 UPL
|
||||
Atomic Robokid (C) 1988 UPL
|
||||
|
||||
Known issues :
|
||||
================
|
||||
- Cocktail mode has not been supported yet.
|
||||
- Omega Fighter has a input protection. Currently it is hacked instead
|
||||
of emulated.
|
||||
- I don't know if Omega Fighter uses sprite overdraw flag or not.
|
||||
- Sometimes sprites stays behind the screen in Atomic Robokid due to
|
||||
incomplete sprite overdraw emulation.
|
||||
- Currently it has not been implemented palette marking in sprite
|
||||
overdraw mode.
|
||||
- When RAM and ROM check and color test mode, the palette is overflows.
|
||||
16 bit color is needed ?
|
||||
|
||||
NOTE :
|
||||
========
|
||||
- To skip dip setting display, press 1P + 2P start in Atomic Robokid.
|
||||
- To enter the level code in Atomic Robokid, in the title screen insert 1 coin
|
||||
and then press 1P or 2P start while keeping pressed 1P or 2P button1
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
- "XXX Intturupt Hold ???" msg at post screen
|
||||
- coin counters/lockouts
|
||||
- sprites are invisible in flipscreen mode
|
||||
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "sound/2203intf.h"
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Variables
|
||||
**************************************************************************/
|
||||
|
||||
extern UINT8 *omegaf_fg_videoram;
|
||||
extern size_t omegaf_fgvideoram_size;
|
||||
|
||||
extern UINT8 *omegaf_bg0_scroll_x;
|
||||
extern UINT8 *omegaf_bg1_scroll_x;
|
||||
extern UINT8 *omegaf_bg2_scroll_x;
|
||||
extern UINT8 *omegaf_bg0_scroll_y;
|
||||
extern UINT8 *omegaf_bg1_scroll_y;
|
||||
extern UINT8 *omegaf_bg2_scroll_y;
|
||||
|
||||
extern WRITE8_HANDLER( omegaf_bg0_bank_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg1_bank_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg2_bank_w );
|
||||
extern READ8_HANDLER( omegaf_bg0_videoram_r );
|
||||
extern READ8_HANDLER( omegaf_bg1_videoram_r );
|
||||
extern READ8_HANDLER( omegaf_bg2_videoram_r );
|
||||
extern WRITE8_HANDLER( omegaf_bg0_videoram_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg1_videoram_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg2_videoram_w );
|
||||
extern WRITE8_HANDLER( robokid_bg0_videoram_w );
|
||||
extern WRITE8_HANDLER( robokid_bg1_videoram_w );
|
||||
extern WRITE8_HANDLER( robokid_bg2_videoram_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg0_scrollx_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg1_scrollx_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg2_scrollx_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg0_scrolly_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg1_scrolly_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg2_scrolly_w );
|
||||
extern WRITE8_HANDLER( omegaf_fgvideoram_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg0_enabled_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg1_enabled_w );
|
||||
extern WRITE8_HANDLER( omegaf_bg2_enabled_w );
|
||||
extern WRITE8_HANDLER( omegaf_sprite_overdraw_w );
|
||||
extern WRITE8_HANDLER( omegaf_flipscreen_w );
|
||||
|
||||
extern VIDEO_START( omegaf );
|
||||
extern VIDEO_START( robokid );
|
||||
extern VIDEO_UPDATE( omegaf );
|
||||
extern VIDEO_UPDATE( robokid );
|
||||
|
||||
static int omegaf_bank_latch = 2;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Initializers
|
||||
**************************************************************************/
|
||||
|
||||
static DRIVER_INIT( omegaf )
|
||||
{
|
||||
UINT8 *RAM = memory_region(REGION_CPU1);
|
||||
|
||||
/* Hack the input protection. $00 and $01 code is written to $C005 */
|
||||
/* and $C006. */
|
||||
|
||||
RAM[0x029a] = 0x00;
|
||||
RAM[0x029b] = 0x00;
|
||||
RAM[0x02a6] = 0x00;
|
||||
RAM[0x02a7] = 0x00;
|
||||
|
||||
RAM[0x02b2] = 0xC9;
|
||||
RAM[0x02b5] = 0xC9;
|
||||
RAM[0x02c9] = 0xC9;
|
||||
RAM[0x02f6] = 0xC9;
|
||||
|
||||
RAM[0x05f0] = 0x00;
|
||||
RAM[0x054c] = 0x04;
|
||||
RAM[0x0557] = 0x03;
|
||||
|
||||
|
||||
/* Fix ROM check */
|
||||
|
||||
RAM[0x0b8d] = 0x00;
|
||||
RAM[0x0b8e] = 0x00;
|
||||
RAM[0x0b8f] = 0x00;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Interrupts
|
||||
**************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( omegaf_interrupt )
|
||||
{
|
||||
cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Inputs
|
||||
**************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START( omegaf )
|
||||
PORT_START /* Player 1 inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START /* Player 2 inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START /* System inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START /* DSW 0 */
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Hardest ) )
|
||||
PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x40, "4" )
|
||||
PORT_DIPSETTING( 0x80, "5" )
|
||||
|
||||
PORT_START /* DSW 1 */
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x00, "20000" )
|
||||
PORT_DIPSETTING( 0x03, "30000" )
|
||||
PORT_DIPSETTING( 0x01, "50000" )
|
||||
PORT_DIPSETTING( 0x02, "100000" )
|
||||
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( robokid )
|
||||
PORT_START /* Player 1 inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // fire
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // jump
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START /* Player 2 inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START /* System inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START /* DSW 0 */
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x02, "50K 100K+" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Free_Play ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x80, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x40, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
|
||||
PORT_START /* DSW 1 */
|
||||
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x1e, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coinage ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( robokidj )
|
||||
PORT_START /* Player 1 inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // fire
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // jump
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START /* Player 2 inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START /* System inputs */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) /* keep pressed during boot to enter service mode */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START /* DSW 0 */
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x02, "30K 50K+" )
|
||||
PORT_DIPSETTING( 0x00, "50K 80K+" )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Free_Play ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x80, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x40, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
|
||||
PORT_START /* DSW 1 */
|
||||
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x1e, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coinage ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Memory handlers
|
||||
**************************************************************************/
|
||||
|
||||
static WRITE8_HANDLER( omegaf_bankselect_w )
|
||||
{
|
||||
UINT8 *RAM = memory_region(REGION_CPU1);
|
||||
int bankaddress;
|
||||
|
||||
if ( (data & 0x0f) != omegaf_bank_latch )
|
||||
{
|
||||
omegaf_bank_latch = data & 0x0f;
|
||||
|
||||
if (omegaf_bank_latch < 2)
|
||||
bankaddress = omegaf_bank_latch * 0x4000;
|
||||
else
|
||||
bankaddress = 0x10000 + ( (omegaf_bank_latch - 2) * 0x4000);
|
||||
memory_set_bankptr( 1, &RAM[bankaddress] ); /* Select 16 banks of 16k */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Memory maps
|
||||
**************************************************************************/
|
||||
|
||||
static ADDRESS_MAP_START( omegaf_readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_READ(MRA8_BANK1)
|
||||
AM_RANGE(0xc000, 0xc000) AM_READ(input_port_2_r) /* system input */
|
||||
AM_RANGE(0xc001, 0xc001) AM_READ(input_port_0_r) /* player 1 input */
|
||||
AM_RANGE(0xc002, 0xc002) AM_READ(input_port_1_r) /* player 2 input */
|
||||
AM_RANGE(0xc003, 0xc003) AM_READ(input_port_3_r) /* DSW 1 input */
|
||||
AM_RANGE(0xc004, 0xc004) AM_READ(input_port_4_r) /* DSW 2 input */
|
||||
AM_RANGE(0xc005, 0xc005) AM_READ(MRA8_NOP)
|
||||
AM_RANGE(0xc006, 0xc006) AM_READ(MRA8_NOP)
|
||||
AM_RANGE(0xc100, 0xc105) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xc200, 0xc205) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xc300, 0xc305) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xc400, 0xc7ff) AM_READ(omegaf_bg0_videoram_r) /* BG0 video RAM */
|
||||
AM_RANGE(0xc800, 0xcbff) AM_READ(omegaf_bg1_videoram_r) /* BG1 video RAM */
|
||||
AM_RANGE(0xcc00, 0xcfff) AM_READ(omegaf_bg2_videoram_r) /* BG2 video RAM */
|
||||
AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) /* FG RAM */
|
||||
AM_RANGE(0xd800, 0xdfff) AM_READ(MRA8_RAM) /* palette RAM */
|
||||
AM_RANGE(0xe000, 0xf9ff) AM_READ(MRA8_RAM) /* RAM */
|
||||
AM_RANGE(0xfa00, 0xffff) AM_READ(MRA8_RAM) /* sprite RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( omegaf_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0xc000, 0xc000) AM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xc001, 0xc001) AM_WRITE(omegaf_flipscreen_w)
|
||||
AM_RANGE(0xc002, 0xc002) AM_WRITE(omegaf_bankselect_w)
|
||||
AM_RANGE(0xc003, 0xc003) AM_WRITE(omegaf_sprite_overdraw_w)
|
||||
AM_RANGE(0xc004, 0xc004) AM_WRITE(MWA8_NOP) /* input protection */
|
||||
AM_RANGE(0xc005, 0xc005) AM_WRITE(MWA8_NOP) /* input protection */
|
||||
AM_RANGE(0xc006, 0xc006) AM_WRITE(MWA8_NOP) /* input protection */
|
||||
AM_RANGE(0xc100, 0xc101) AM_WRITE(omegaf_bg0_scrollx_w) AM_BASE(&omegaf_bg0_scroll_x)
|
||||
AM_RANGE(0xc102, 0xc103) AM_WRITE(omegaf_bg0_scrolly_w) AM_BASE(&omegaf_bg0_scroll_y)
|
||||
AM_RANGE(0xc104, 0xc104) AM_WRITE(omegaf_bg0_enabled_w) /* BG0 enabled */
|
||||
AM_RANGE(0xc105, 0xc105) AM_WRITE(omegaf_bg0_bank_w) /* BG0 bank select */
|
||||
AM_RANGE(0xc200, 0xc201) AM_WRITE(omegaf_bg1_scrollx_w) AM_BASE(&omegaf_bg1_scroll_x)
|
||||
AM_RANGE(0xc202, 0xc203) AM_WRITE(omegaf_bg1_scrolly_w) AM_BASE(&omegaf_bg1_scroll_y)
|
||||
AM_RANGE(0xc204, 0xc204) AM_WRITE(omegaf_bg1_enabled_w) /* BG1 enabled */
|
||||
AM_RANGE(0xc205, 0xc205) AM_WRITE(omegaf_bg1_bank_w) /* BG1 bank select */
|
||||
AM_RANGE(0xc300, 0xc301) AM_WRITE(omegaf_bg2_scrollx_w) AM_BASE(&omegaf_bg2_scroll_x)
|
||||
AM_RANGE(0xc302, 0xc303) AM_WRITE(omegaf_bg2_scrolly_w) AM_BASE(&omegaf_bg2_scroll_y)
|
||||
AM_RANGE(0xc304, 0xc304) AM_WRITE(omegaf_bg2_enabled_w) /* BG2 enabled */
|
||||
AM_RANGE(0xc305, 0xc305) AM_WRITE(omegaf_bg2_bank_w) /* BG2 bank select */
|
||||
AM_RANGE(0xc400, 0xc7ff) AM_WRITE(omegaf_bg0_videoram_w) /* BG0 video RAM */
|
||||
AM_RANGE(0xc800, 0xcbff) AM_WRITE(omegaf_bg1_videoram_w) /* BG1 video RAM */
|
||||
AM_RANGE(0xcc00, 0xcfff) AM_WRITE(omegaf_bg2_videoram_w) /* BG2 video RAM */
|
||||
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(omegaf_fgvideoram_w) AM_BASE(&omegaf_fg_videoram)
|
||||
AM_RANGE(0xd800, 0xdfff) AM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram)
|
||||
AM_RANGE(0xe000, 0xf9ff) AM_WRITE(MWA8_RAM) /* RAM */
|
||||
AM_RANGE(0xfa00, 0xffff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( robokid_readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_READ(MRA8_BANK1)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) /* palette RAM */
|
||||
AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM) /* FG RAM */
|
||||
AM_RANGE(0xd000, 0xd3ff) AM_READ(omegaf_bg2_videoram_r)
|
||||
AM_RANGE(0xd400, 0xd7ff) AM_READ(omegaf_bg1_videoram_r)
|
||||
AM_RANGE(0xd800, 0xdbff) AM_READ(omegaf_bg0_videoram_r)
|
||||
AM_RANGE(0xdc00, 0xdc00) AM_READ(input_port_2_r) /* system input */
|
||||
AM_RANGE(0xdc01, 0xdc01) AM_READ(input_port_0_r) /* player 1 input */
|
||||
AM_RANGE(0xdc02, 0xdc02) AM_READ(input_port_1_r) /* player 2 input */
|
||||
AM_RANGE(0xdc03, 0xdc03) AM_READ(input_port_3_r) /* DSW 1 input */
|
||||
AM_RANGE(0xdc04, 0xdc04) AM_READ(input_port_4_r) /* DSW 2 input */
|
||||
AM_RANGE(0xdd00, 0xdd05) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xde00, 0xde05) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xdf00, 0xdf05) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xe000, 0xf9ff) AM_READ(MRA8_RAM) /* RAM */
|
||||
AM_RANGE(0xfa00, 0xffff) AM_READ(MRA8_RAM) /* sprite RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( robokid_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram)
|
||||
AM_RANGE(0xc800, 0xcfff) AM_WRITE(omegaf_fgvideoram_w) AM_BASE(&omegaf_fg_videoram)
|
||||
AM_RANGE(0xd000, 0xd3ff) AM_WRITE(robokid_bg2_videoram_w) /* BG2 video RAM */
|
||||
AM_RANGE(0xd400, 0xd7ff) AM_WRITE(robokid_bg1_videoram_w) /* BG1 video RAM */
|
||||
AM_RANGE(0xd800, 0xdbff) AM_WRITE(robokid_bg0_videoram_w) /* BG0 video RAM */
|
||||
AM_RANGE(0xdc00, 0xdc00) AM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xdc01, 0xdc01) AM_WRITE(omegaf_flipscreen_w)
|
||||
AM_RANGE(0xdc02, 0xdc02) AM_WRITE(omegaf_bankselect_w)
|
||||
AM_RANGE(0xdc03, 0xdc03) AM_WRITE(omegaf_sprite_overdraw_w)
|
||||
AM_RANGE(0xdd00, 0xdd01) AM_WRITE(omegaf_bg0_scrollx_w) AM_BASE(&omegaf_bg0_scroll_x)
|
||||
AM_RANGE(0xdd02, 0xdd03) AM_WRITE(omegaf_bg0_scrolly_w) AM_BASE(&omegaf_bg0_scroll_y)
|
||||
AM_RANGE(0xdd04, 0xdd04) AM_WRITE(omegaf_bg0_enabled_w) /* BG0 enabled */
|
||||
AM_RANGE(0xdd05, 0xdd05) AM_WRITE(omegaf_bg0_bank_w) /* BG0 bank select */
|
||||
AM_RANGE(0xde00, 0xde01) AM_WRITE(omegaf_bg1_scrollx_w) AM_BASE(&omegaf_bg1_scroll_x)
|
||||
AM_RANGE(0xde02, 0xde03) AM_WRITE(omegaf_bg1_scrolly_w) AM_BASE(&omegaf_bg1_scroll_y)
|
||||
AM_RANGE(0xde04, 0xde04) AM_WRITE(omegaf_bg1_enabled_w) /* BG1 enabled */
|
||||
AM_RANGE(0xde05, 0xde05) AM_WRITE(omegaf_bg1_bank_w) /* BG1 bank select */
|
||||
AM_RANGE(0xdf00, 0xdf01) AM_WRITE(omegaf_bg2_scrollx_w) AM_BASE(&omegaf_bg2_scroll_x)
|
||||
AM_RANGE(0xdf02, 0xdf03) AM_WRITE(omegaf_bg2_scrolly_w) AM_BASE(&omegaf_bg2_scroll_y)
|
||||
AM_RANGE(0xdf04, 0xdf04) AM_WRITE(omegaf_bg2_enabled_w) /* BG2 enabled */
|
||||
AM_RANGE(0xdf05, 0xdf05) AM_WRITE(omegaf_bg2_bank_w) /* BG2 bank select */
|
||||
AM_RANGE(0xe000, 0xf9ff) AM_WRITE(MWA8_RAM) /* RAM */
|
||||
AM_RANGE(0xfa00, 0xffff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r)
|
||||
AM_RANGE(0xefee, 0xefee) AM_READ(MRA8_NOP)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM)
|
||||
AM_RANGE(0xe000, 0xe000) AM_WRITE(MWA8_NOP)
|
||||
AM_RANGE(0xeff5, 0xeff6) AM_WRITE(MWA8_NOP) /* sample frequency ??? */
|
||||
AM_RANGE(0xefee, 0xefee) AM_WRITE(MWA8_NOP) /* chip command ?? */
|
||||
AM_RANGE(0xf000, 0xf000) AM_WRITE(MWA8_NOP) // ???
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x00, 0x00) AM_READ(YM2203_status_port_0_r)
|
||||
AM_RANGE(0x01, 0x01) AM_READ(YM2203_read_port_0_r)
|
||||
AM_RANGE(0x80, 0x80) AM_READ(YM2203_status_port_1_r)
|
||||
AM_RANGE(0x81, 0x81) AM_READ(YM2203_read_port_1_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x00, 0x00) AM_WRITE(YM2203_control_port_0_w)
|
||||
AM_RANGE(0x01, 0x01) AM_WRITE(YM2203_write_port_0_w)
|
||||
AM_RANGE(0x80, 0x80) AM_WRITE(YM2203_control_port_1_w)
|
||||
AM_RANGE(0x81, 0x81) AM_WRITE(YM2203_write_port_1_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
GFX decoding
|
||||
**************************************************************************/
|
||||
|
||||
static const gfx_layout omegaf_charlayout =
|
||||
{
|
||||
8, 8, /* 8x8 characters */
|
||||
1024, /* 1024 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28 },
|
||||
{ 32*0, 32*1, 32*2, 32*3, 32*4, 32*5, 32*6, 32*7 },
|
||||
8*32
|
||||
};
|
||||
|
||||
static const gfx_layout omegaf_spritelayout =
|
||||
{
|
||||
16, 16, /* 16x16 characters */
|
||||
1024,
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
64*8+0, 64*8+4, 64*8+8, 64*8+12, 64*8+16, 64*8+20, 64*8+24, 64*8+28 },
|
||||
{ 32*0, 32*1, 32*2, 32*3, 32*4, 32*5, 32*6, 32*7,
|
||||
32*8, 32*9, 32*10, 32*11, 32*12, 32*13, 32*14, 32*15 },
|
||||
16*64
|
||||
};
|
||||
|
||||
static const gfx_layout omegaf_bigspritelayout =
|
||||
{
|
||||
32, 32, /* 32x32 characters */
|
||||
256,
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
64*8+0, 64*8+4, 64*8+8, 64*8+12, 64*8+16, 64*8+20, 64*8+24, 64*8+28,
|
||||
128*16+0, 128*16+4, 128*16+8, 128*16+12, 128*16+16, 128*16+20, 128*16+24, 128*16+28,
|
||||
128*16+64*8+0, 128*16+64*8+4, 128*16+64*8+8, 128*16+64*8+12, 128*16+64*8+16, 128*16+64*8+20, 128*16+64*8+24, 128*16+64*8+28 },
|
||||
{ 32*0, 32*1, 32*2, 32*3, 32*4, 32*5, 32*6, 32*7,
|
||||
32*8, 32*9, 32*10, 32*11, 32*12, 32*13, 32*14, 32*15,
|
||||
64*16+32*0, 64*16+32*1, 64*16+32*2, 64*16+32*3, 64*16+32*4, 64*16+32*5, 64*16+32*6, 64*16+32*7,
|
||||
64*16+32*8, 64*16+32*9, 64*16+32*10, 64*16+32*11, 64*16+32*12, 64*16+32*13, 64*16+32*14, 64*16+32*15 },
|
||||
16*64*4
|
||||
};
|
||||
|
||||
static const gfx_layout omegaf_bglayout =
|
||||
{
|
||||
16, 16, /* 16x16 characters */
|
||||
4096,
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
64*8+0, 64*8+4, 64*8+8, 64*8+12, 64*8+16, 64*8+20, 64*8+24, 64*8+28 },
|
||||
{ 32*0, 32*1, 32*2, 32*3, 32*4, 32*5, 32*6, 32*7,
|
||||
32*8, 32*9, 32*10, 32*11, 32*12, 32*13, 32*14, 32*15 },
|
||||
16*64
|
||||
};
|
||||
|
||||
static const gfx_layout robokid_spritelayout =
|
||||
{
|
||||
16, 16, /* 16x16 characters */
|
||||
2048,
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
64*8+0, 64*8+4, 64*8+8, 64*8+12, 64*8+16, 64*8+20, 64*8+24, 64*8+28 },
|
||||
{ 32*0, 32*1, 32*2, 32*3, 32*4, 32*5, 32*6, 32*7,
|
||||
32*8, 32*9, 32*10, 32*11, 32*12, 32*13, 32*14, 32*15 },
|
||||
16*64
|
||||
};
|
||||
|
||||
static const gfx_layout robokid_bigspritelayout =
|
||||
{
|
||||
32, 32, /* 32x32 characters */
|
||||
512,
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
64*8+0, 64*8+4, 64*8+8, 64*8+12, 64*8+16, 64*8+20, 64*8+24, 64*8+28,
|
||||
128*16+0, 128*16+4, 128*16+8, 128*16+12, 128*16+16, 128*16+20, 128*16+24, 128*16+28,
|
||||
128*16+64*8+0, 128*16+64*8+4, 128*16+64*8+8, 128*16+64*8+12, 128*16+64*8+16, 128*16+64*8+20, 128*16+64*8+24, 128*16+64*8+28 },
|
||||
{ 32*0, 32*1, 32*2, 32*3, 32*4, 32*5, 32*6, 32*7,
|
||||
32*8, 32*9, 32*10, 32*11, 32*12, 32*13, 32*14, 32*15,
|
||||
64*16+32*0, 64*16+32*1, 64*16+32*2, 64*16+32*3, 64*16+32*4, 64*16+32*5, 64*16+32*6, 64*16+32*7,
|
||||
64*16+32*8, 64*16+32*9, 64*16+32*10, 64*16+32*11, 64*16+32*12, 64*16+32*13, 64*16+32*14, 64*16+32*15 },
|
||||
16*64*4
|
||||
};
|
||||
|
||||
static GFXDECODE_START( omegaf )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, omegaf_bglayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, omegaf_bglayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0, omegaf_bglayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX4, 0, omegaf_spritelayout, 32*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX4, 0, omegaf_bigspritelayout, 32*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX5, 0, omegaf_charlayout, 48*16, 16)
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( robokid )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, omegaf_bglayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, omegaf_bglayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0, omegaf_bglayout, 0*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX4, 0, robokid_spritelayout, 32*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX4, 0, robokid_bigspritelayout, 32*16, 16)
|
||||
GFXDECODE_ENTRY( REGION_GFX5, 0, omegaf_charlayout, 48*16, 16)
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Machine drivers
|
||||
**************************************************************************/
|
||||
|
||||
static MACHINE_DRIVER_START( omegaf )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD_TAG("main", Z80, 12000000/2) /* 12000000/2 (verified on pcb) */
|
||||
MDRV_CPU_PROGRAM_MAP(omegaf_readmem,omegaf_writemem) /* very sensitive to these settings */
|
||||
MDRV_CPU_VBLANK_INT(omegaf_interrupt,1)
|
||||
|
||||
MDRV_CPU_ADD(Z80, 5000000)
|
||||
/* audio CPU */ /* 5 mhz crystal (verified on pcb) */
|
||||
MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
|
||||
MDRV_CPU_IO_MAP(sound_readport,sound_writeport)
|
||||
MDRV_CPU_VBLANK_INT(irq0_line_hold,2)
|
||||
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
|
||||
MDRV_INTERLEAVE(10) /* number of slices per frame */
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(128*16, 32*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1)
|
||||
MDRV_GFXDECODE(omegaf)
|
||||
MDRV_PALETTE_LENGTH(1024)
|
||||
|
||||
MDRV_VIDEO_START(omegaf)
|
||||
MDRV_VIDEO_UPDATE(omegaf)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD(YM2203, 12000000/8) /* (verified on pcb) */
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
|
||||
|
||||
MDRV_SOUND_ADD(YM2203, 12000000/8) /* (verified on pcb) */
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( robokid )
|
||||
MDRV_IMPORT_FROM(omegaf)
|
||||
|
||||
MDRV_CPU_MODIFY("main")
|
||||
MDRV_CPU_PROGRAM_MAP(robokid_readmem,robokid_writemem)
|
||||
|
||||
MDRV_GFXDECODE(robokid)
|
||||
MDRV_VIDEO_START(robokid)
|
||||
MDRV_VIDEO_UPDATE(robokid)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
ROM loaders
|
||||
**************************************************************************/
|
||||
|
||||
ROM_START( omegaf )
|
||||
ROM_REGION( 0x48000, REGION_CPU1, 0 ) /* main CPU */
|
||||
ROM_LOAD( "1.5", 0x00000, 0x08000, CRC(57a7fd96) SHA1(65ca290b48f8579fcce00db5b3b3f8694667a136) )
|
||||
ROM_CONTINUE( 0x10000, 0x18000 )
|
||||
ROM_LOAD( "6.4l", 0x28000, 0x20000, CRC(6277735c) SHA1(b0f91f0cc51d424a1a7834c126736f24c2e23c17) )
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
|
||||
ROM_LOAD( "7.7m", 0x00000, 0x10000, CRC(d40fc8d5) SHA1(4f615a0fb786cafc20f82f0b5fa112a9c356378f) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) /* BG0 */
|
||||
ROM_LOAD( "2back1.27b", 0x00000, 0x80000, CRC(21f8a32e) SHA1(26582e06e7381e09443fa99f24ca9edd0b4a2937) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) /* BG1 */
|
||||
ROM_LOAD( "1back2.15b", 0x00000, 0x80000, CRC(6210ddcc) SHA1(89c091eeafcc92750d0ea303fcde8a8dc3eeba89) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX3, ROMREGION_DISPOSE ) /* BG2 */
|
||||
ROM_LOAD( "3back3.5f", 0x00000, 0x80000, CRC(c31cae56) SHA1(4cc2d0d70990ca04b0e3abd15e5afe183e98e4ab) )
|
||||
|
||||
ROM_REGION( 0x20000, REGION_GFX4, ROMREGION_DISPOSE ) /* sprite */
|
||||
ROM_LOAD( "8.23m", 0x00000, 0x20000, CRC(0bd2a5d1) SHA1(ef84f1a5554e891fc38d17314e3952ea5c9d2731) )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX5, ROMREGION_DISPOSE ) /* FG */
|
||||
ROM_LOAD( "4.18h", 0x00000, 0x08000, CRC(9e2d8152) SHA1(4b50557d171d1b03a870db5891ae67d70858ad37) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( omegafs )
|
||||
ROM_REGION( 0x48000, REGION_CPU1, 0 ) /* main CPU */
|
||||
ROM_LOAD( "5.3l", 0x00000, 0x08000, CRC(503a3e63) SHA1(73420aecb653cd4fd3b6afe67d6f5726f01411dd) )
|
||||
ROM_CONTINUE( 0x10000, 0x18000 )
|
||||
ROM_LOAD( "6.4l", 0x28000, 0x20000, CRC(6277735c) SHA1(b0f91f0cc51d424a1a7834c126736f24c2e23c17) )
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
|
||||
ROM_LOAD( "7.7m", 0x00000, 0x10000, CRC(d40fc8d5) SHA1(4f615a0fb786cafc20f82f0b5fa112a9c356378f) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) /* BG0 */
|
||||
ROM_LOAD( "2back1.27b", 0x00000, 0x80000, CRC(21f8a32e) SHA1(26582e06e7381e09443fa99f24ca9edd0b4a2937) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) /* BG1 */
|
||||
ROM_LOAD( "1back2.15b", 0x00000, 0x80000, CRC(6210ddcc) SHA1(89c091eeafcc92750d0ea303fcde8a8dc3eeba89) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX3, ROMREGION_DISPOSE ) /* BG2 */
|
||||
ROM_LOAD( "3back3.5f", 0x00000, 0x80000, CRC(c31cae56) SHA1(4cc2d0d70990ca04b0e3abd15e5afe183e98e4ab) )
|
||||
|
||||
ROM_REGION( 0x20000, REGION_GFX4, ROMREGION_DISPOSE ) /* sprite */
|
||||
ROM_LOAD( "8.23m", 0x00000, 0x20000, CRC(0bd2a5d1) SHA1(ef84f1a5554e891fc38d17314e3952ea5c9d2731) )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX5, ROMREGION_DISPOSE ) /* FG */
|
||||
ROM_LOAD( "4.18h", 0x00000, 0x08000, CRC(9e2d8152) SHA1(4b50557d171d1b03a870db5891ae67d70858ad37) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( robokid )
|
||||
ROM_REGION( 0x48000, REGION_CPU1, 0 ) /* main CPU */
|
||||
ROM_LOAD( "robokid1.18j", 0x00000, 0x08000, CRC(378c21fc) SHA1(58163bd6fbfa8385b1bd648cfde3d75bf81ac07d) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
ROM_LOAD( "robokid2.18k", 0x18000, 0x10000, CRC(ddef8c5a) SHA1(a1dd2f51205863c3d5d3527991d538ca8adf7587) )
|
||||
ROM_LOAD( "robokid3.15k", 0x28000, 0x10000, CRC(05295ec3) SHA1(33dd0853a2064cb4301cfbdc7856def81f6e1223) )
|
||||
ROM_LOAD( "robokid4.12k", 0x38000, 0x10000, CRC(3bc3977f) SHA1(da394e12d197b0e109b03c854da06b1267bd9d59) )
|
||||
ROM_COPY( REGION_CPU1 , 0x10000, 0x8000, 0x4000 ) /* to avoid crash */
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
|
||||
ROM_LOAD( "robokid.k7", 0x00000, 0x10000, CRC(f490a2e9) SHA1(861d1256c090ce3d1f45f95cc894affbbc3f1466) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) /* BG0 */
|
||||
ROM_LOAD( "robokid.19c", 0x00000, 0x10000, CRC(02220421) SHA1(f533e9c6cea1dccbb60e0528c470f3cb5e8fc44e) )
|
||||
ROM_LOAD( "robokid.20c", 0x10000, 0x10000, CRC(02d59bc2) SHA1(031acbb14145f9f4623de8868c6207fb9f8e8207) )
|
||||
ROM_LOAD( "robokid.17d", 0x20000, 0x10000, CRC(2fa29b99) SHA1(13dce7932e2e9c03a139a4293584838aa3d9f1c3) )
|
||||
ROM_LOAD( "robokid.18d", 0x30000, 0x10000, CRC(ae15ce02) SHA1(175e4eebdf12f1f373e01a4b1c933053ddd09abf) )
|
||||
ROM_LOAD( "robokid.19d", 0x40000, 0x10000, CRC(784b089e) SHA1(1ae3346b4afa3da9484ebc59c8a530cb95f7d277) )
|
||||
ROM_LOAD( "robokid.20d", 0x50000, 0x10000, CRC(b0b395ed) SHA1(31ec07634053793a701bbfd601b029f7da66e9d7) )
|
||||
ROM_LOAD( "robokid.19f", 0x60000, 0x10000, CRC(0f9071c6) SHA1(8bf0c35189eda98a9bc150788890e136870cb5b2) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) /* BG1 */
|
||||
ROM_LOAD( "robokid.12c", 0x00000, 0x10000, CRC(0ab45f94) SHA1(d8274263068d998c89a1b247dde7f814037cc15b) )
|
||||
ROM_LOAD( "robokid.14c", 0x10000, 0x10000, CRC(029bbd4a) SHA1(8e078cdafe608fc6cde827be85c5267ade4ecca6) )
|
||||
ROM_LOAD( "robokid.15c", 0x20000, 0x10000, CRC(7de67ebb) SHA1(2fe92e50e2894dd363e69b053db96bdb66a273eb) )
|
||||
ROM_LOAD( "robokid.16c", 0x30000, 0x10000, CRC(53c0e582) SHA1(763e6127532d022a707bf9ddf1a832413745f248) )
|
||||
ROM_LOAD( "robokid.17c", 0x40000, 0x10000, CRC(0cae5a1e) SHA1(a183a33516c81ea2c029b72ee6261c4519e095ab) )
|
||||
ROM_LOAD( "robokid.18c", 0x50000, 0x10000, CRC(56ac7c8a) SHA1(66ed5646a2e8563caeb4ff96fa7d34fde27e9899) )
|
||||
ROM_LOAD( "robokid.15d", 0x60000, 0x10000, CRC(cd632a4d) SHA1(a537d9ced45fdac490097e9162ac4d09a470be79) )
|
||||
ROM_LOAD( "robokid.16d", 0x70000, 0x10000, CRC(18d92b2b) SHA1(e6d20ea8f0fac8bd4824a3b279a0fd8a1d6c26f5) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX3, ROMREGION_DISPOSE ) /* BG2 */
|
||||
ROM_LOAD( "robokid.12a", 0x00000, 0x10000, CRC(e64d1c10) SHA1(d1073c80c9788aba65410f88691747a37b2a9d4a) )
|
||||
ROM_LOAD( "robokid.14a", 0x10000, 0x10000, CRC(8f9371e4) SHA1(0ea06d62bf4673ebda49a849cead832a24e5b886) )
|
||||
ROM_LOAD( "robokid.15a", 0x20000, 0x10000, CRC(469204e7) SHA1(8c2e94635b2b304e7dfa2e6ad58ba526dcf02453) )
|
||||
ROM_LOAD( "robokid.16a", 0x30000, 0x10000, CRC(4e340815) SHA1(d204b830c5809f25f7dfa451bbcbeda8b81ced54) )
|
||||
ROM_LOAD( "robokid.17a", 0x40000, 0x10000, CRC(f0863106) SHA1(ff7e44d0aa5a07ec9a7eddef1a55181bd2e867b1) )
|
||||
ROM_LOAD( "robokid.18a", 0x50000, 0x10000, CRC(fdff7441) SHA1(843b2c92bbc6f7319568677d50cbd9b03475b34a) )
|
||||
|
||||
ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE ) /* sprite */
|
||||
ROM_LOAD( "robokid.15f", 0x00000, 0x10000, CRC(ba61f5ab) SHA1(8433ddd55f0184cd5e8bb4a94a1c2336b2f8ff05) )
|
||||
ROM_LOAD( "robokid.16f", 0x10000, 0x10000, CRC(d9b399ce) SHA1(70755c9cae27187f183ae6d61bedb95c420756f4) )
|
||||
ROM_LOAD( "robokid.17f", 0x20000, 0x10000, CRC(afe432b9) SHA1(1ec7954ccf112eddf0ffcb8b5aec6cbc5cba7a7a) )
|
||||
ROM_LOAD( "robokid.18f", 0x30000, 0x10000, CRC(a0aa2a84) SHA1(4d46c169429cd285644336c7d47e393b33bd8770) )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX5, ROMREGION_DISPOSE ) /* FG */
|
||||
ROM_LOAD( "robokid.b9", 0x00000, 0x08000, CRC(fac59c3f) SHA1(1b202ad5c12982512129d9e097267dd31b984ae8) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( robokidj )
|
||||
ROM_REGION( 0x48000, REGION_CPU1, 0 ) /* main CPU */
|
||||
ROM_LOAD( "1.29", 0x00000, 0x08000, CRC(59a1e2ec) SHA1(71f9d28dd8d2cf77a27fab163ce9562e3e75a540) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
ROM_LOAD( "2.30", 0x18000, 0x10000, CRC(e3f73476) SHA1(bd1c8946d637df21432bd52ae9324255251570b9) )
|
||||
ROM_LOAD( "robokid3.15k", 0x28000, 0x10000, CRC(05295ec3) SHA1(33dd0853a2064cb4301cfbdc7856def81f6e1223) )
|
||||
ROM_LOAD( "robokid4.12k", 0x38000, 0x10000, CRC(3bc3977f) SHA1(da394e12d197b0e109b03c854da06b1267bd9d59) )
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
|
||||
ROM_LOAD( "robokid.k7", 0x00000, 0x10000, CRC(f490a2e9) SHA1(861d1256c090ce3d1f45f95cc894affbbc3f1466) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) /* BG0 */
|
||||
ROM_LOAD( "robokid.19c", 0x00000, 0x10000, CRC(02220421) SHA1(f533e9c6cea1dccbb60e0528c470f3cb5e8fc44e) )
|
||||
ROM_LOAD( "robokid.20c", 0x10000, 0x10000, CRC(02d59bc2) SHA1(031acbb14145f9f4623de8868c6207fb9f8e8207) )
|
||||
ROM_LOAD( "robokid.17d", 0x20000, 0x10000, CRC(2fa29b99) SHA1(13dce7932e2e9c03a139a4293584838aa3d9f1c3) )
|
||||
ROM_LOAD( "robokid.18d", 0x30000, 0x10000, CRC(ae15ce02) SHA1(175e4eebdf12f1f373e01a4b1c933053ddd09abf) )
|
||||
ROM_LOAD( "robokid.19d", 0x40000, 0x10000, CRC(784b089e) SHA1(1ae3346b4afa3da9484ebc59c8a530cb95f7d277) )
|
||||
ROM_LOAD( "robokid.20d", 0x50000, 0x10000, CRC(b0b395ed) SHA1(31ec07634053793a701bbfd601b029f7da66e9d7) )
|
||||
ROM_LOAD( "robokid.19f", 0x60000, 0x10000, CRC(0f9071c6) SHA1(8bf0c35189eda98a9bc150788890e136870cb5b2) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) /* BG1 */
|
||||
ROM_LOAD( "robokid.12c", 0x00000, 0x10000, CRC(0ab45f94) SHA1(d8274263068d998c89a1b247dde7f814037cc15b) )
|
||||
ROM_LOAD( "robokid.14c", 0x10000, 0x10000, CRC(029bbd4a) SHA1(8e078cdafe608fc6cde827be85c5267ade4ecca6) )
|
||||
ROM_LOAD( "robokid.15c", 0x20000, 0x10000, CRC(7de67ebb) SHA1(2fe92e50e2894dd363e69b053db96bdb66a273eb) )
|
||||
ROM_LOAD( "robokid.16c", 0x30000, 0x10000, CRC(53c0e582) SHA1(763e6127532d022a707bf9ddf1a832413745f248) )
|
||||
ROM_LOAD( "robokid.17c", 0x40000, 0x10000, CRC(0cae5a1e) SHA1(a183a33516c81ea2c029b72ee6261c4519e095ab) )
|
||||
ROM_LOAD( "robokid.18c", 0x50000, 0x10000, CRC(56ac7c8a) SHA1(66ed5646a2e8563caeb4ff96fa7d34fde27e9899) )
|
||||
ROM_LOAD( "robokid.15d", 0x60000, 0x10000, CRC(cd632a4d) SHA1(a537d9ced45fdac490097e9162ac4d09a470be79) )
|
||||
ROM_LOAD( "robokid.16d", 0x70000, 0x10000, CRC(18d92b2b) SHA1(e6d20ea8f0fac8bd4824a3b279a0fd8a1d6c26f5) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX3, ROMREGION_DISPOSE ) /* BG2 */
|
||||
ROM_LOAD( "robokid.12a", 0x00000, 0x10000, CRC(e64d1c10) SHA1(d1073c80c9788aba65410f88691747a37b2a9d4a) )
|
||||
ROM_LOAD( "robokid.14a", 0x10000, 0x10000, CRC(8f9371e4) SHA1(0ea06d62bf4673ebda49a849cead832a24e5b886) )
|
||||
ROM_LOAD( "robokid.15a", 0x20000, 0x10000, CRC(469204e7) SHA1(8c2e94635b2b304e7dfa2e6ad58ba526dcf02453) )
|
||||
ROM_LOAD( "robokid.16a", 0x30000, 0x10000, CRC(4e340815) SHA1(d204b830c5809f25f7dfa451bbcbeda8b81ced54) )
|
||||
ROM_LOAD( "robokid.17a", 0x40000, 0x10000, CRC(f0863106) SHA1(ff7e44d0aa5a07ec9a7eddef1a55181bd2e867b1) )
|
||||
ROM_LOAD( "robokid.18a", 0x50000, 0x10000, CRC(fdff7441) SHA1(843b2c92bbc6f7319568677d50cbd9b03475b34a) )
|
||||
|
||||
ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE ) /* sprite */
|
||||
ROM_LOAD( "robokid.15f", 0x00000, 0x10000, CRC(ba61f5ab) SHA1(8433ddd55f0184cd5e8bb4a94a1c2336b2f8ff05) )
|
||||
ROM_LOAD( "robokid.16f", 0x10000, 0x10000, CRC(d9b399ce) SHA1(70755c9cae27187f183ae6d61bedb95c420756f4) )
|
||||
ROM_LOAD( "robokid.17f", 0x20000, 0x10000, CRC(afe432b9) SHA1(1ec7954ccf112eddf0ffcb8b5aec6cbc5cba7a7a) )
|
||||
ROM_LOAD( "robokid.18f", 0x30000, 0x10000, CRC(a0aa2a84) SHA1(4d46c169429cd285644336c7d47e393b33bd8770) )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX5, ROMREGION_DISPOSE ) /* FG */
|
||||
ROM_LOAD( "robokid.b9", 0x00000, 0x08000, CRC(fac59c3f) SHA1(1b202ad5c12982512129d9e097267dd31b984ae8) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( robokdj2 )
|
||||
ROM_REGION( 0x48000, REGION_CPU1, 0 ) /* main CPU */
|
||||
ROM_LOAD( "1_rom29.18j", 0x00000, 0x08000, CRC(969fb951) SHA1(aa32f0cb33ba2ccbb933dab5444a7e0dbbb84b3d) )
|
||||
ROM_CONTINUE( 0x10000, 0x08000 )
|
||||
ROM_LOAD( "2_rom30.18k", 0x18000, 0x10000, CRC(c0228b63) SHA1(8f7e3a29a35723abc8b10bf511fc8611e31a2961) )
|
||||
ROM_LOAD( "robokid3.15k", 0x28000, 0x10000, CRC(05295ec3) SHA1(33dd0853a2064cb4301cfbdc7856def81f6e1223) )
|
||||
ROM_LOAD( "robokid4.12k", 0x38000, 0x10000, CRC(3bc3977f) SHA1(da394e12d197b0e109b03c854da06b1267bd9d59) )
|
||||
ROM_COPY( REGION_CPU1 , 0x10000, 0x8000, 0x4000 ) /* to avoid crash */
|
||||
|
||||
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
|
||||
ROM_LOAD( "robokid.k7", 0x00000, 0x10000, CRC(f490a2e9) SHA1(861d1256c090ce3d1f45f95cc894affbbc3f1466) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) /* BG0 */
|
||||
ROM_LOAD( "robokid.19c", 0x00000, 0x10000, CRC(02220421) SHA1(f533e9c6cea1dccbb60e0528c470f3cb5e8fc44e) )
|
||||
ROM_LOAD( "robokid.20c", 0x10000, 0x10000, CRC(02d59bc2) SHA1(031acbb14145f9f4623de8868c6207fb9f8e8207) )
|
||||
ROM_LOAD( "robokid.17d", 0x20000, 0x10000, CRC(2fa29b99) SHA1(13dce7932e2e9c03a139a4293584838aa3d9f1c3) )
|
||||
ROM_LOAD( "robokid.18d", 0x30000, 0x10000, CRC(ae15ce02) SHA1(175e4eebdf12f1f373e01a4b1c933053ddd09abf) )
|
||||
ROM_LOAD( "robokid.19d", 0x40000, 0x10000, CRC(784b089e) SHA1(1ae3346b4afa3da9484ebc59c8a530cb95f7d277) )
|
||||
ROM_LOAD( "robokid.20d", 0x50000, 0x10000, CRC(b0b395ed) SHA1(31ec07634053793a701bbfd601b029f7da66e9d7) )
|
||||
ROM_LOAD( "robokid.19f", 0x60000, 0x10000, CRC(0f9071c6) SHA1(8bf0c35189eda98a9bc150788890e136870cb5b2) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) /* BG1 */
|
||||
ROM_LOAD( "robokid.12c", 0x00000, 0x10000, CRC(0ab45f94) SHA1(d8274263068d998c89a1b247dde7f814037cc15b) )
|
||||
ROM_LOAD( "robokid.14c", 0x10000, 0x10000, CRC(029bbd4a) SHA1(8e078cdafe608fc6cde827be85c5267ade4ecca6) )
|
||||
ROM_LOAD( "robokid.15c", 0x20000, 0x10000, CRC(7de67ebb) SHA1(2fe92e50e2894dd363e69b053db96bdb66a273eb) )
|
||||
ROM_LOAD( "robokid.16c", 0x30000, 0x10000, CRC(53c0e582) SHA1(763e6127532d022a707bf9ddf1a832413745f248) )
|
||||
ROM_LOAD( "robokid.17c", 0x40000, 0x10000, CRC(0cae5a1e) SHA1(a183a33516c81ea2c029b72ee6261c4519e095ab) )
|
||||
ROM_LOAD( "robokid.18c", 0x50000, 0x10000, CRC(56ac7c8a) SHA1(66ed5646a2e8563caeb4ff96fa7d34fde27e9899) )
|
||||
ROM_LOAD( "robokid.15d", 0x60000, 0x10000, CRC(cd632a4d) SHA1(a537d9ced45fdac490097e9162ac4d09a470be79) )
|
||||
ROM_LOAD( "robokid.16d", 0x70000, 0x10000, CRC(18d92b2b) SHA1(e6d20ea8f0fac8bd4824a3b279a0fd8a1d6c26f5) )
|
||||
|
||||
ROM_REGION( 0x80000, REGION_GFX3, ROMREGION_DISPOSE ) /* BG2 */
|
||||
ROM_LOAD( "robokid.12a", 0x00000, 0x10000, CRC(e64d1c10) SHA1(d1073c80c9788aba65410f88691747a37b2a9d4a) )
|
||||
ROM_LOAD( "robokid.14a", 0x10000, 0x10000, CRC(8f9371e4) SHA1(0ea06d62bf4673ebda49a849cead832a24e5b886) )
|
||||
ROM_LOAD( "robokid.15a", 0x20000, 0x10000, CRC(469204e7) SHA1(8c2e94635b2b304e7dfa2e6ad58ba526dcf02453) )
|
||||
ROM_LOAD( "robokid.16a", 0x30000, 0x10000, CRC(4e340815) SHA1(d204b830c5809f25f7dfa451bbcbeda8b81ced54) )
|
||||
ROM_LOAD( "robokid.17a", 0x40000, 0x10000, CRC(f0863106) SHA1(ff7e44d0aa5a07ec9a7eddef1a55181bd2e867b1) )
|
||||
ROM_LOAD( "robokid.18a", 0x50000, 0x10000, CRC(fdff7441) SHA1(843b2c92bbc6f7319568677d50cbd9b03475b34a) )
|
||||
|
||||
ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE ) /* sprite */
|
||||
ROM_LOAD( "robokid.15f", 0x00000, 0x10000, CRC(ba61f5ab) SHA1(8433ddd55f0184cd5e8bb4a94a1c2336b2f8ff05) )
|
||||
ROM_LOAD( "robokid.16f", 0x10000, 0x10000, CRC(d9b399ce) SHA1(70755c9cae27187f183ae6d61bedb95c420756f4) )
|
||||
ROM_LOAD( "robokid.17f", 0x20000, 0x10000, CRC(afe432b9) SHA1(1ec7954ccf112eddf0ffcb8b5aec6cbc5cba7a7a) )
|
||||
ROM_LOAD( "robokid.18f", 0x30000, 0x10000, CRC(a0aa2a84) SHA1(4d46c169429cd285644336c7d47e393b33bd8770) )
|
||||
|
||||
ROM_REGION( 0x08000, REGION_GFX5, ROMREGION_DISPOSE ) /* FG */
|
||||
ROM_LOAD( "robokid.b9", 0x00000, 0x08000, CRC(fac59c3f) SHA1(1b202ad5c12982512129d9e097267dd31b984ae8) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME FLAGS ) */
|
||||
GAME( 1988, robokid, 0, robokid, robokid, 0, ROT0, "UPL", "Atomic Robo-kid", GAME_NO_COCKTAIL )
|
||||
GAME( 1988, robokidj, robokid, robokid, robokidj,0, ROT0, "UPL", "Atomic Robo-kid (Japan, Set 1)", GAME_NO_COCKTAIL )
|
||||
GAME( 1988, robokdj2, robokid, robokid, robokidj,0, ROT0, "UPL", "Atomic Robo-kid (Japan, Set 2)", GAME_NO_COCKTAIL )
|
||||
GAME( 1989, omegaf, 0, omegaf, omegaf, omegaf, ROT270, "UPL", "Omega Fighter", GAME_NO_COCKTAIL )
|
||||
GAME( 1989, omegafs, omegaf, omegaf, omegaf, omegaf, ROT270, "UPL", "Omega Fighter Special", GAME_NO_COCKTAIL )
|
29
src/mame/includes/ninjakd2.h
Normal file
29
src/mame/includes/ninjakd2.h
Normal file
@ -0,0 +1,29 @@
|
||||
extern WRITE8_HANDLER( ninjakd2_bgvideoram_w );
|
||||
extern WRITE8_HANDLER( ninjakd2_fgvideoram_w );
|
||||
extern WRITE8_HANDLER( ninjakd2_bg_ctrl_w );
|
||||
extern WRITE8_HANDLER( ninjakd2_sprite_overdraw_w );
|
||||
|
||||
extern READ8_HANDLER( robokid_bg0_videoram_r );
|
||||
extern READ8_HANDLER( robokid_bg1_videoram_r );
|
||||
extern READ8_HANDLER( robokid_bg2_videoram_r );
|
||||
extern WRITE8_HANDLER( robokid_bg0_videoram_w );
|
||||
extern WRITE8_HANDLER( robokid_bg1_videoram_w );
|
||||
extern WRITE8_HANDLER( robokid_bg2_videoram_w );
|
||||
extern WRITE8_HANDLER( robokid_bg0_ctrl_w );
|
||||
extern WRITE8_HANDLER( robokid_bg1_ctrl_w );
|
||||
extern WRITE8_HANDLER( robokid_bg2_ctrl_w );
|
||||
extern WRITE8_HANDLER( robokid_bg0_bank_w );
|
||||
extern WRITE8_HANDLER( robokid_bg1_bank_w );
|
||||
extern WRITE8_HANDLER( robokid_bg2_bank_w );
|
||||
|
||||
extern VIDEO_START( ninjakd2 );
|
||||
extern VIDEO_START( mnight );
|
||||
extern VIDEO_START( robokid );
|
||||
extern VIDEO_START( omegaf );
|
||||
extern VIDEO_UPDATE( ninjakd2 );
|
||||
extern VIDEO_UPDATE( robokid );
|
||||
extern VIDEO_UPDATE( omegaf );
|
||||
extern VIDEO_EOF( ninjakd2 );
|
||||
|
||||
extern UINT8* ninjakd2_bg_videoram;
|
||||
extern UINT8* ninjakd2_fg_videoram;
|
@ -1434,12 +1434,10 @@ $(MAMEOBJ)/univers.a: \
|
||||
$(DRIVERS)/superdq.o
|
||||
|
||||
$(MAMEOBJ)/upl.a: \
|
||||
$(DRIVERS)/mnight.o $(VIDEO)/mnight.o \
|
||||
$(DRIVERS)/mouser.o $(VIDEO)/mouser.o \
|
||||
$(DRIVERS)/ninjakid.o $(VIDEO)/ninjakid.o \
|
||||
$(DRIVERS)/ninjakd2.o $(VIDEO)/ninjakd2.o \
|
||||
$(DRIVERS)/nova2001.o $(VIDEO)/nova2001.o \
|
||||
$(DRIVERS)/omegaf.o $(VIDEO)/omegaf.o \
|
||||
$(DRIVERS)/pkunwar.o $(VIDEO)/pkunwar.o \
|
||||
$(DRIVERS)/raiders5.o $(VIDEO)/raiders5.o \
|
||||
$(DRIVERS)/xxmissio.o $(VIDEO)/xxmissio.o \
|
||||
|
@ -5871,7 +5871,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
|
||||
DRIVER( ninjak2b ) /* UPL-????? (c) 1987 */
|
||||
DRIVER( rdaction ) /* UPL-87003?(c) 1987 + World Games license */
|
||||
DRIVER( mnight ) /* UPL-????? (c) 1987 distributed by Kawakus */
|
||||
DRIVER( arkarea ) /* UPL-87007 (c) [1988?] */
|
||||
DRIVER( arkarea ) /* UPL-87007 (c) [1987] */
|
||||
DRIVER( robokid ) /* UPL-88013 (c) 1988 */
|
||||
DRIVER( robokidj ) /* UPL-88013 (c) 1988 */
|
||||
DRIVER( robokdj2 ) /* UPL-88013 (c) 1988 */
|
||||
|
@ -1,206 +0,0 @@
|
||||
#include "driver.h"
|
||||
|
||||
UINT8 *mnight_scrolly_ram;
|
||||
UINT8 *mnight_scrollx_ram;
|
||||
UINT8 *mnight_bgenable_ram;
|
||||
UINT8 *mnight_spoverdraw_ram;
|
||||
UINT8 *mnight_background_videoram;
|
||||
size_t mnight_backgroundram_size;
|
||||
UINT8 *mnight_foreground_videoram;
|
||||
size_t mnight_foregroundram_size;
|
||||
|
||||
static mame_bitmap *bitmap_bg;
|
||||
static mame_bitmap *bitmap_sp;
|
||||
|
||||
static UINT8 *bg_dirtybuffer;
|
||||
static int bg_enable = 1;
|
||||
static int sp_overdraw = 0;
|
||||
|
||||
static void mnight_mark_background_dirty(void)
|
||||
{
|
||||
/* set 1024 bytes allocated in VIDEO_START( mnight ) to 'true' */
|
||||
memset(bg_dirtybuffer,1,1024);
|
||||
}
|
||||
|
||||
VIDEO_START( mnight )
|
||||
{
|
||||
bg_dirtybuffer = auto_malloc(1024);
|
||||
|
||||
bitmap_bg = auto_bitmap_alloc (machine->screen[0].width*2,machine->screen[0].height*2,machine->screen[0].format);
|
||||
bitmap_sp = auto_bitmap_alloc (machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
|
||||
|
||||
mnight_mark_background_dirty() ;
|
||||
|
||||
state_save_register_func_postload(mnight_mark_background_dirty) ;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( mnight_bgvideoram_w )
|
||||
{
|
||||
if (mnight_background_videoram[offset] != data)
|
||||
{
|
||||
bg_dirtybuffer[offset >> 1] = 1;
|
||||
mnight_background_videoram[offset] = data;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( mnight_fgvideoram_w )
|
||||
{
|
||||
if (mnight_foreground_videoram[offset] != data)
|
||||
mnight_foreground_videoram[offset] = data;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( mnight_background_enable_w )
|
||||
{
|
||||
if (bg_enable!=data)
|
||||
{
|
||||
mnight_bgenable_ram[offset] = data;
|
||||
bg_enable = data;
|
||||
if (bg_enable)
|
||||
memset(bg_dirtybuffer, 1, mnight_backgroundram_size / 2);
|
||||
else
|
||||
fillbitmap(bitmap_bg, Machine->pens[0],0);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( mnight_sprite_overdraw_w )
|
||||
{
|
||||
if (sp_overdraw != (data&1))
|
||||
{
|
||||
mnight_spoverdraw_ram[offset] = data;
|
||||
fillbitmap(bitmap_sp,15,&Machine->screen[0].visarea);
|
||||
sp_overdraw = data & 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_foreground(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
|
||||
/* Draw the foreground text */
|
||||
|
||||
for (offs = 0 ;offs < mnight_foregroundram_size / 2; offs++)
|
||||
{
|
||||
int sx,sy,tile,palette,flipx,flipy,lo,hi;
|
||||
|
||||
if (mnight_foreground_videoram[offs*2] | mnight_foreground_videoram[offs*2+1])
|
||||
{
|
||||
sx = (offs % 32) << 3;
|
||||
sy = (offs >> 5) << 3;
|
||||
|
||||
lo = mnight_foreground_videoram[offs*2];
|
||||
hi = mnight_foreground_videoram[offs*2+1];
|
||||
tile = ((hi & 0xc0) << 2) | lo;
|
||||
flipx = hi & 0x10;
|
||||
flipy = hi & 0x20;
|
||||
palette = hi & 0x0f;
|
||||
|
||||
drawgfx(bitmap,machine->gfx[3],
|
||||
tile,
|
||||
palette,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,TRANSPARENCY_PEN, 15);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
|
||||
/* for every character in the Video RAM, check if it has been modified */
|
||||
/* since last time and update it accordingly. */
|
||||
|
||||
for (offs = 0 ;offs < mnight_backgroundram_size / 2; offs++)
|
||||
{
|
||||
int sx,sy,tile,palette,flipy,lo,hi;
|
||||
|
||||
if (bg_dirtybuffer[offs])
|
||||
{
|
||||
sx = (offs % 32) << 4;
|
||||
sy = (offs >> 5) << 4;
|
||||
|
||||
bg_dirtybuffer[offs] = 0;
|
||||
|
||||
lo = mnight_background_videoram[offs*2];
|
||||
hi = mnight_background_videoram[offs*2+1];
|
||||
tile = ((hi & 0x10) << 6) | ((hi & 0xc0) << 2) | lo;
|
||||
flipy = hi & 0x20;
|
||||
palette = hi & 0x0f;
|
||||
drawgfx(bitmap,machine->gfx[0],
|
||||
tile,
|
||||
palette,
|
||||
0,flipy,
|
||||
sx,sy,
|
||||
cliprect,TRANSPARENCY_NONE,0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
|
||||
for (offs = 11 ;offs < spriteram_size; offs+=16)
|
||||
{
|
||||
int sx,sy,tile,palette,flipx,flipy,big;
|
||||
|
||||
if (spriteram[offs+2] & 2)
|
||||
{
|
||||
sx = spriteram[offs+1];
|
||||
sy = spriteram[offs];
|
||||
if (spriteram[offs+2] & 1) sx-=256;
|
||||
tile = spriteram[offs+3]+((spriteram[offs+2] & 0xc0)<<2) + ((spriteram[offs+2] & 0x08)<<7);
|
||||
big = spriteram[offs+2] & 4;
|
||||
if (big) tile /= 4;
|
||||
flipx = spriteram[offs+2] & 0x10;
|
||||
flipy = spriteram[offs+2] & 0x20;
|
||||
palette = spriteram[offs+4] & 0x0f;
|
||||
drawgfx(bitmap,machine->gfx[(big)?2:1],
|
||||
tile,
|
||||
palette,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, 15);
|
||||
|
||||
/* kludge to clear shots */
|
||||
if (((spriteram[offs+2]==2) || (spriteram[offs+2]==0x12)) && (((tile>=0xd0) && (tile<=0xd5)) || ((tile>=0x20) && (tile<=0x25))))
|
||||
spriteram[offs+2]=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VIDEO_UPDATE( mnight )
|
||||
{
|
||||
int scrollx,scrolly;
|
||||
|
||||
|
||||
if (bg_enable)
|
||||
draw_background(machine, bitmap_bg, 0);
|
||||
|
||||
scrollx = -((mnight_scrollx_ram[0]+mnight_scrollx_ram[1]*256) & 0x1FF);
|
||||
scrolly = -((mnight_scrolly_ram[0]+mnight_scrolly_ram[1]*256) & 0x1FF);
|
||||
|
||||
if (sp_overdraw) /* overdraw sprite mode */
|
||||
{
|
||||
copyscrollbitmap(bitmap,bitmap_bg,1,&scrollx,1,&scrolly,cliprect,TRANSPARENCY_NONE,0);
|
||||
draw_sprites(machine, bitmap_sp, 0);
|
||||
draw_foreground(machine, bitmap_sp, 0);
|
||||
copybitmap(bitmap,bitmap_sp,0,0,0,0,cliprect,TRANSPARENCY_PEN, 15);
|
||||
}
|
||||
else /* normal sprite mode */
|
||||
{
|
||||
copyscrollbitmap(bitmap,bitmap_bg,1,&scrollx,1,&scrolly,cliprect,TRANSPARENCY_NONE,0);
|
||||
draw_sprites(machine, bitmap, cliprect);
|
||||
draw_foreground(machine, bitmap, cliprect);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,36 +1,199 @@
|
||||
#include "driver.h"
|
||||
#include "ninjakd2.h"
|
||||
|
||||
UINT8 *ninjakd2_bg_videoram, *ninjakd2_fg_videoram;
|
||||
UINT8* ninjakd2_bg_videoram;
|
||||
UINT8* ninjakd2_fg_videoram;
|
||||
|
||||
static UINT8 ninjakd2_bg_enable = 1, sprite_overdraw_enabled = 0;
|
||||
static UINT16 ninjakd2_scrollx, ninjakd2_scrolly;
|
||||
static tilemap *fg_tilemap, *bg_tilemap;
|
||||
static mame_bitmap *bitmap_sp; /* for sprite overdraw */
|
||||
static int sprite_overdraw_enabled;
|
||||
static int next_sprite_overdraw_enabled;
|
||||
static mame_bitmap *sp_bitmap;
|
||||
// in robokid and omegaf big sprites are laid out differently in ROM
|
||||
static int robokid_sprites;
|
||||
|
||||
static tilemap* fg_tilemap;
|
||||
static tilemap* bg_tilemap;
|
||||
static tilemap* bg0_tilemap;
|
||||
static tilemap* bg1_tilemap;
|
||||
static tilemap* bg2_tilemap;
|
||||
|
||||
static int bank_mask = 1;
|
||||
static int robokid_bg0_bank = 0;
|
||||
static int robokid_bg1_bank = 0;
|
||||
static int robokid_bg2_bank = 0;
|
||||
static UINT8* robokid_bg0_videoram;
|
||||
static UINT8* robokid_bg1_videoram;
|
||||
static UINT8* robokid_bg2_videoram;
|
||||
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
{
|
||||
int code = ((ninjakd2_bg_videoram[tile_index*2 + 1] & 0xc0) << 2) | ninjakd2_bg_videoram[tile_index*2];
|
||||
int color = ninjakd2_bg_videoram[tile_index*2 + 1] & 0xf;
|
||||
SET_TILE_INFO(0, code, color, TILE_FLIPYX((ninjakd2_bg_videoram[tile_index*2 + 1] & 0x30) >> 4));
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_fg_tile_info )
|
||||
{
|
||||
int code = ((ninjakd2_fg_videoram[tile_index*2 + 1] & 0xc0) << 2) | ninjakd2_fg_videoram[tile_index*2];
|
||||
int color = ninjakd2_fg_videoram[tile_index*2 + 1] & 0xf;
|
||||
SET_TILE_INFO(2, code, color, TILE_FLIPYX((ninjakd2_fg_videoram[tile_index*2 + 1] & 0x30) >> 4));
|
||||
int const lo = ninjakd2_fg_videoram[(tile_index << 1)];
|
||||
int const hi = ninjakd2_fg_videoram[(tile_index << 1) | 1];
|
||||
int const tile = ((hi & 0xc0) << 2) | lo;
|
||||
int const flipyx = (hi & 0x30) >> 4;
|
||||
int const color = hi & 0x0f;
|
||||
|
||||
SET_TILE_INFO(
|
||||
0,
|
||||
tile,
|
||||
color,
|
||||
TILE_FLIPYX(flipyx));
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( ninjakd2_get_bg_tile_info )
|
||||
{
|
||||
int const lo = ninjakd2_bg_videoram[(tile_index << 1)];
|
||||
int const hi = ninjakd2_bg_videoram[(tile_index << 1) | 1];
|
||||
int const tile = ((hi & 0xc0) << 2) | lo;
|
||||
int const flipyx = (hi & 0x30) >> 4;
|
||||
int const color = hi & 0x0f;
|
||||
|
||||
SET_TILE_INFO(
|
||||
2,
|
||||
tile,
|
||||
color,
|
||||
TILE_FLIPYX(flipyx));
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( mnight_get_bg_tile_info )
|
||||
{
|
||||
int const lo = ninjakd2_bg_videoram[(tile_index << 1)];
|
||||
int const hi = ninjakd2_bg_videoram[(tile_index << 1) | 1];
|
||||
int const tile = ((hi & 0x10) << 6) | ((hi & 0xc0) << 2) | lo;
|
||||
int const flipy = (hi & 0x20) >> 5;
|
||||
int const color = hi & 0x0f;
|
||||
|
||||
SET_TILE_INFO(
|
||||
2,
|
||||
tile,
|
||||
color,
|
||||
flipy ? TILE_FLIPY : 0);
|
||||
}
|
||||
|
||||
static TILEMAP_MAPPER( robokid_bg_scan )
|
||||
{
|
||||
/* logical (col,row) -> memory offset */
|
||||
return (col & 0x0f) | ((row & 0x1f) << 4) | ((col & 0x10) << 5);
|
||||
}
|
||||
|
||||
static TILEMAP_MAPPER( omegaf_bg_scan )
|
||||
{
|
||||
/* logical (col,row) -> memory offset */
|
||||
return (col & 0x0f) | ((row & 0x1f) << 4) | ((col & 0x70) << 5);
|
||||
}
|
||||
|
||||
void robokid_get_bg_tile_info(running_machine* const machine, tile_data* const tileinfo, tilemap_memory_index const tile_index, int const gfxnum, const UINT8* const videoram)
|
||||
{
|
||||
int const lo = videoram[(tile_index << 1)];
|
||||
int const hi = videoram[(tile_index << 1) | 1];
|
||||
int const tile = ((hi & 0x10) << 7) | ((hi & 0x20) << 5) | ((hi & 0xc0) << 2) | lo;
|
||||
int const color = hi & 0x0f;
|
||||
|
||||
SET_TILE_INFO(
|
||||
gfxnum,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( robokid_get_bg0_tile_info )
|
||||
{
|
||||
robokid_get_bg_tile_info(machine, tileinfo, tile_index, 2, robokid_bg0_videoram);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( robokid_get_bg1_tile_info )
|
||||
{
|
||||
robokid_get_bg_tile_info(machine, tileinfo, tile_index, 3, robokid_bg1_videoram);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( robokid_get_bg2_tile_info )
|
||||
{
|
||||
robokid_get_bg_tile_info(machine, tileinfo, tile_index, 4, robokid_bg2_videoram);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void videoram_alloc(const running_machine* const machine, int const size)
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
/* create video ram */
|
||||
robokid_bg0_videoram = auto_malloc(size);
|
||||
memset(robokid_bg0_videoram, 0x00, size);
|
||||
|
||||
robokid_bg1_videoram = auto_malloc(size);
|
||||
memset(robokid_bg1_videoram, 0x00, size);
|
||||
|
||||
robokid_bg2_videoram = auto_malloc(size);
|
||||
memset(robokid_bg2_videoram, 0x00, size);
|
||||
}
|
||||
|
||||
sp_bitmap = auto_bitmap_alloc (machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
|
||||
}
|
||||
|
||||
VIDEO_START( ninjakd2 )
|
||||
{
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
videoram_alloc(machine, 0);
|
||||
|
||||
fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
bg_tilemap = tilemap_create(ninjakd2_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(fg_tilemap, 15);
|
||||
|
||||
bitmap_sp = auto_bitmap_alloc (machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
|
||||
robokid_sprites = 0;
|
||||
}
|
||||
|
||||
VIDEO_START( mnight )
|
||||
{
|
||||
videoram_alloc(machine, 0);
|
||||
|
||||
fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
bg_tilemap = tilemap_create(mnight_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(fg_tilemap, 15);
|
||||
|
||||
robokid_sprites = 0;
|
||||
}
|
||||
|
||||
VIDEO_START( robokid )
|
||||
{
|
||||
bank_mask = 1;
|
||||
|
||||
videoram_alloc(machine, 0x0800);
|
||||
|
||||
fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, robokid_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, robokid_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, robokid_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(fg_tilemap, 15);
|
||||
tilemap_set_transparent_pen(bg1_tilemap, 15);
|
||||
tilemap_set_transparent_pen(bg2_tilemap, 15);
|
||||
|
||||
robokid_sprites = 1;
|
||||
}
|
||||
|
||||
VIDEO_START( omegaf )
|
||||
{
|
||||
bank_mask = 7;
|
||||
|
||||
videoram_alloc(machine, 0x2000);
|
||||
|
||||
fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, omegaf_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 128, 32);
|
||||
bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, omegaf_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 128, 32);
|
||||
bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, omegaf_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 128, 32);
|
||||
|
||||
tilemap_set_transparent_pen(fg_tilemap, 15);
|
||||
tilemap_set_transparent_pen(bg0_tilemap, 15);
|
||||
tilemap_set_transparent_pen(bg1_tilemap, 15);
|
||||
tilemap_set_transparent_pen(bg2_tilemap, 15);
|
||||
|
||||
robokid_sprites = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_HANDLER( ninjakd2_bgvideoram_w )
|
||||
{
|
||||
ninjakd2_bg_videoram[offset] = data;
|
||||
@ -43,116 +206,293 @@ WRITE8_HANDLER( ninjakd2_fgvideoram_w )
|
||||
tilemap_mark_tile_dirty(fg_tilemap, offset >> 1);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( ninjakd2_scrollx_w )
|
||||
|
||||
|
||||
WRITE8_HANDLER( robokid_bg0_bank_w )
|
||||
{
|
||||
if(offset)
|
||||
ninjakd2_scrollx = ((ninjakd2_scrollx & 0x0ff) | data*256) & 0x1ff;
|
||||
else
|
||||
ninjakd2_scrollx = ((ninjakd2_scrollx & 0x100) | data) & 0x1ff;
|
||||
robokid_bg0_bank = data & bank_mask;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( ninjakd2_scrolly_w )
|
||||
WRITE8_HANDLER( robokid_bg1_bank_w )
|
||||
{
|
||||
if(offset)
|
||||
ninjakd2_scrolly = ((ninjakd2_scrolly & 0x0ff) | data*256) & 0x1ff;
|
||||
else
|
||||
ninjakd2_scrolly = ((ninjakd2_scrolly & 0x100) | data) & 0x1ff;
|
||||
robokid_bg1_bank = data & bank_mask;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( ninjakd2_background_enable_w )
|
||||
WRITE8_HANDLER( robokid_bg2_bank_w )
|
||||
{
|
||||
ninjakd2_bg_enable = data & 1;
|
||||
robokid_bg2_bank = data & bank_mask;
|
||||
}
|
||||
|
||||
READ8_HANDLER( robokid_bg0_videoram_r )
|
||||
{
|
||||
return robokid_bg0_videoram[(robokid_bg0_bank << 10) | offset];
|
||||
}
|
||||
|
||||
READ8_HANDLER( robokid_bg1_videoram_r )
|
||||
{
|
||||
return robokid_bg1_videoram[(robokid_bg1_bank << 10) | offset];
|
||||
}
|
||||
|
||||
READ8_HANDLER( robokid_bg2_videoram_r )
|
||||
{
|
||||
return robokid_bg2_videoram[(robokid_bg2_bank << 10) | offset];
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg0_videoram_w )
|
||||
{
|
||||
int const address = (robokid_bg0_bank << 10 ) | offset;
|
||||
|
||||
robokid_bg0_videoram[address] = data;
|
||||
tilemap_mark_tile_dirty(bg0_tilemap, address >> 1);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg1_videoram_w )
|
||||
{
|
||||
int const address = (robokid_bg1_bank << 10 ) | offset;
|
||||
|
||||
robokid_bg1_videoram[address] = data;
|
||||
tilemap_mark_tile_dirty(bg1_tilemap, address >> 1);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg2_videoram_w )
|
||||
{
|
||||
int const address = (robokid_bg2_bank << 10 ) | offset;
|
||||
|
||||
robokid_bg2_videoram[address] = data;
|
||||
tilemap_mark_tile_dirty(bg2_tilemap, address >> 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void bg_ctrl(int offset, int data, tilemap* tilemap)
|
||||
{
|
||||
int scrollx = tilemap_get_scrollx(tilemap, 0);
|
||||
int scrolly = tilemap_get_scrolly(tilemap, 0);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: scrollx = ((scrollx & 0x100) | data); break;
|
||||
case 1: scrollx = ((scrollx & 0x0ff) | (data << 8)); break;
|
||||
case 2: scrolly = ((scrolly & 0x100) | data); break;
|
||||
case 3: scrolly = ((scrolly & 0x0ff) | (data << 8)); break;
|
||||
case 4: tilemap_set_enable(tilemap, data & 1); break;
|
||||
}
|
||||
|
||||
tilemap_set_scrollx(tilemap, 0, scrollx);
|
||||
tilemap_set_scrolly(tilemap, 0, scrolly);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( ninjakd2_bg_ctrl_w )
|
||||
{
|
||||
bg_ctrl(offset, data, bg_tilemap);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg0_ctrl_w )
|
||||
{
|
||||
bg_ctrl(offset, data, bg0_tilemap);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg1_ctrl_w )
|
||||
{
|
||||
bg_ctrl(offset, data, bg1_tilemap);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg2_ctrl_w )
|
||||
{
|
||||
bg_ctrl(offset, data, bg2_tilemap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_HANDLER( ninjakd2_sprite_overdraw_w )
|
||||
{
|
||||
sprite_overdraw_enabled = data & 1;
|
||||
|
||||
if(sprite_overdraw_enabled)
|
||||
fillbitmap(bitmap_sp, 15, &Machine->screen[0].visarea);
|
||||
next_sprite_overdraw_enabled = data & 1;
|
||||
}
|
||||
|
||||
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
|
||||
static void draw_sprites(running_machine* const machine, mame_bitmap* const bitmap, const rectangle* const cliprect)
|
||||
{
|
||||
int offs;
|
||||
const gfx_element* const gfx = machine->gfx[1];
|
||||
int const big_xshift = robokid_sprites ? 1 : 0;
|
||||
int const big_yshift = robokid_sprites ? 0 : 1;
|
||||
|
||||
/* Draw the sprites */
|
||||
UINT8* sprptr = &spriteram[11];
|
||||
int sprites_drawn = 0;
|
||||
|
||||
for (offs = 11 ;offs < spriteram_size; offs+=16)
|
||||
// the sprite generator draws exactly 96 16x16 sprites per frame. When big
|
||||
// (32x32) sprites are drawn, this counts for 4 sprites drawn, so the sprite
|
||||
// list is reduced accordingly (i.e. three slots at the end of the list will
|
||||
// be ignored). Note that a disabled sprite, even if it is not draw, still
|
||||
// counts as one sprite drawn.
|
||||
// This is proven by Mutant Night, which doesn't work correctly (leaves shots
|
||||
// on screen) if we don't take this into account.
|
||||
|
||||
for (;;)
|
||||
{
|
||||
int sx,sy,tile,color,flipx,flipy;
|
||||
|
||||
if (spriteram[offs+2] & 2)
|
||||
if (sprptr[2] & 0x02)
|
||||
{
|
||||
sx = spriteram[offs+1];
|
||||
sy = spriteram[offs];
|
||||
if (spriteram[offs+2] & 1) sx-=256;
|
||||
tile = spriteram[offs+3]+((spriteram[offs+2] & 0xc0)<<2);
|
||||
flipx = spriteram[offs+2] & 0x10;
|
||||
flipy = spriteram[offs+2] & 0x20;
|
||||
color = spriteram[offs+4] & 0x0f;
|
||||
int sx = sprptr[1] - ((sprptr[2] & 0x01) << 8);
|
||||
int sy = sprptr[0];
|
||||
// Ninja Kid II doesn't use the topmost bit (it has smaller ROMs) so it might not be connected on the board
|
||||
int code = sprptr[3] + ((sprptr[2] & 0xc0) << 2) + ((sprptr[2] & 0x08) << 7);
|
||||
int flipx = (sprptr[2] & 0x10) >> 4;
|
||||
int flipy = (sprptr[2] & 0x20) >> 5;
|
||||
int const color = sprptr[4] & 0x0f;
|
||||
// Ninja Kid II doesn't use the 'big' feature so it might not be available on the board
|
||||
int const big = (sprptr[2] & 0x04) >> 2;
|
||||
int x,y;
|
||||
|
||||
if(sprite_overdraw_enabled && (color >= 0x0c && color <= 0x0e) )
|
||||
if (flip_screen)
|
||||
{
|
||||
/* "static" sprites */
|
||||
drawgfx(bitmap_sp,machine->gfx[1],
|
||||
tile,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, 15);
|
||||
sx = 240 - 16*big - sx;
|
||||
sy = 240 - 16*big - sy;
|
||||
flipx ^= 1;
|
||||
flipy ^= 1;
|
||||
}
|
||||
else
|
||||
|
||||
if (big)
|
||||
{
|
||||
drawgfx(bitmap,machine->gfx[1],
|
||||
tile,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, 15);
|
||||
code &= ~3;
|
||||
code ^= flipx << big_xshift;
|
||||
code ^= flipy << big_yshift;
|
||||
}
|
||||
|
||||
/* "normal" sprites with color = 0x0f clear the "static" ones */
|
||||
if(sprite_overdraw_enabled && color == 0x0f)
|
||||
for (y = 0; y <= big; ++y)
|
||||
{
|
||||
for (x = 0; x <= big; ++x)
|
||||
{
|
||||
int x,y,offset = 0;
|
||||
const gfx_element *gfx = machine->gfx[1];
|
||||
UINT8 *srcgfx = gfx->gfxdata + tile * gfx->char_modulo;
|
||||
int const tile = code ^ (x << big_xshift) ^ (y << big_yshift);
|
||||
|
||||
for(y = 0; y < gfx->height; y++)
|
||||
// sprites with color = 0x0f erase pixels that use palettes C-F
|
||||
if (sprite_overdraw_enabled && color == 0x0f)
|
||||
{
|
||||
for(x = 0; x < gfx->width; x++)
|
||||
{
|
||||
if(srcgfx[offset] != 15)
|
||||
{
|
||||
*BITMAP_ADDR16(bitmap_sp, sy + y, sx + x) = 15;
|
||||
}
|
||||
const UINT8* const srcgfx = gfx->gfxdata + tile * gfx->char_modulo;
|
||||
int xx,yy;
|
||||
|
||||
offset++;
|
||||
for (yy = 0; yy < 16; ++yy)
|
||||
{
|
||||
for (xx = 0; xx < 16; ++xx)
|
||||
{
|
||||
UINT16* const ptr = BITMAP_ADDR16(bitmap, sy + yy, sx + xx);
|
||||
int const offset = (flipx ? (16 - xx) : xx) + (flipy ? (16 - yy) : yy ) * gfx->line_modulo;;
|
||||
|
||||
if (srcgfx[offset] != 15 && (*ptr & 0xf0) >= 0xc0)
|
||||
{
|
||||
*ptr = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
drawgfx(bitmap, gfx,
|
||||
tile,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx + 16*x, sy + 16*y,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, 15);
|
||||
}
|
||||
|
||||
++sprites_drawn;
|
||||
if (sprites_drawn >= 96)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++sprites_drawn;
|
||||
if (sprites_drawn >= 96)
|
||||
return;
|
||||
}
|
||||
|
||||
sprptr += 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void erase_sprites(running_machine* const machine, mame_bitmap* const bitmap, const rectangle* const cliprect)
|
||||
{
|
||||
// if sprite overdraw is disabled, clear the sprite framebuffer
|
||||
// if sprite overdraw is enabled, only clear palettes 0-B, and leave C-F on screen
|
||||
if (!sprite_overdraw_enabled)
|
||||
fillbitmap(sp_bitmap, 15, cliprect);
|
||||
else
|
||||
{
|
||||
int x,y;
|
||||
|
||||
for (y = 0; y < sp_bitmap->height; ++y)
|
||||
{
|
||||
for (x = 0; x < sp_bitmap->width; ++x)
|
||||
{
|
||||
UINT16* const ptr = BITMAP_ADDR16(sp_bitmap, y, x);
|
||||
if ((*ptr & 0xf0) < 0xc0)
|
||||
{
|
||||
*ptr = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(sprite_overdraw_enabled)
|
||||
copybitmap(bitmap, bitmap_sp, 0, 0, 0, 0, cliprect, TRANSPARENCY_PEN, 15);
|
||||
}
|
||||
|
||||
|
||||
VIDEO_UPDATE( ninjakd2 )
|
||||
{
|
||||
fillbitmap(bitmap, machine->pens[0],0);
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
|
||||
tilemap_set_scrollx(bg_tilemap, 0, ninjakd2_scrollx);
|
||||
tilemap_set_scrolly(bg_tilemap, 0, ninjakd2_scrolly);
|
||||
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
|
||||
|
||||
if (ninjakd2_bg_enable)
|
||||
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
|
||||
copybitmap(bitmap, sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_PEN, 15);
|
||||
|
||||
draw_sprites(machine, bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( robokid )
|
||||
{
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, bg0_tilemap, 0, 0);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, bg1_tilemap, 0, 0);
|
||||
|
||||
copybitmap(bitmap, sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_PEN, 15);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, bg2_tilemap, 0, 0);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( omegaf )
|
||||
{
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, bg0_tilemap, 0, 0);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, bg1_tilemap, 0, 0);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, bg2_tilemap, 0, 0);
|
||||
|
||||
copybitmap(bitmap, sp_bitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_PEN, 15);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
VIDEO_EOF( ninjakd2 )
|
||||
{
|
||||
erase_sprites(machine, sp_bitmap, 0);
|
||||
|
||||
// we want to erase the sprites with the old setting and draw them with the
|
||||
// new one. Not doing this causes a glitch in Ninja Kid II when taking the top
|
||||
// exit from stage 3.
|
||||
sprite_overdraw_enabled = next_sprite_overdraw_enabled;
|
||||
|
||||
draw_sprites(machine, sp_bitmap, 0);
|
||||
}
|
||||
|
@ -1,615 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
Functions to emulate the video hardware of the machine.
|
||||
|
||||
This hardware of the machine is similar with that of Mutant Night.
|
||||
The difference between the two machines is that there are three BG
|
||||
layers as against just one BG layer in Mutant Night.
|
||||
|
||||
|
||||
Foreground RAM format ( Foreground RAM format is same as Mutant Night )
|
||||
--------------------------------------------------------------
|
||||
+0 +1
|
||||
xxxx xxxx ---- ---- = bottom 8 bits of tile number
|
||||
---- ---- xx-- ---- = top 2 bits of tile number
|
||||
---- ---- --x- ---- = flip X
|
||||
---- ---- ---x ---- = flip Y
|
||||
---- ---- ---- xxxx = color ( 00h - 0fh )
|
||||
|
||||
|
||||
Background RAM format
|
||||
--------------------------------------------------------------
|
||||
+0 +1
|
||||
xxxx xxxx ---- ---- = bottom 8 bits of tile number
|
||||
---- ---- x--- ---- = bit 9 of tile number
|
||||
---- ---- -x-- ---- = bit 8 of tile number
|
||||
---- ---- --x- ---- = bit 10 of tile number
|
||||
---- ---- ---x ---- = bit 11 of tile number (the most top bit)
|
||||
---- ---- ---- xxxx = color ( 00h - 1fh )
|
||||
|
||||
|
||||
Sprite RAM format ( Sprite format is same as Mutant Night )
|
||||
--------------------------------------------------------------
|
||||
+0 +1 +2 +3 +4
|
||||
xxxx xxxx ---- ---- ---- ---- ---- ---- ---- ---- = sprite Y position
|
||||
---- ---- xxxx xxxx ---- ---- ---- ---- ---- ---- = bottom 8 bits of sprite X position
|
||||
---- ---- ---- ---- xx-- ---- ---- ---- ---- ---- = middle 2 bits of sprite number
|
||||
---- ---- ---- ---- --x- ---- ---- ---- ---- ---- = flip X
|
||||
---- ---- ---- ---- ---x ---- ---- ---- ---- ---- = flip Y
|
||||
---- ---- ---- ---- ---- x--- ---- ---- ---- ---- = top bit of sprite number
|
||||
---- ---- ---- ---- ---- -x-- ---- ---- ---- ---- = 0:normal size (16x16) 1:big size (32x32)
|
||||
---- ---- ---- ---- ---- --x- ---- ---- ---- ---- = sprite on / off
|
||||
---- ---- ---- ---- ---- ---x ---- ---- ---- ---- = top bit of sprite X position
|
||||
---- ---- ---- ---- ---- ---- xxxx xxxx ---- ---- = bottom 8 bits of sprite number
|
||||
---- ---- ---- ---- ---- ---- ---- ---- xxxx xxxx = color
|
||||
|
||||
|
||||
Scroll RAM format (Omega Fighter)
|
||||
--------------------------------------------------------------
|
||||
+0 +1
|
||||
X ???? -xxx xxxx xxxx = scroll X (0 - 0x3ff)
|
||||
Y ???? ---x xxxx xxxx = scroll Y (0 - 0x1ff)
|
||||
|
||||
Scroll RAM format (Atomic Robokid)
|
||||
--------------------------------------------------------------
|
||||
+0 +1
|
||||
X ???? ---x xxxx xxxx = scroll X (0 - 0x1ff)
|
||||
Y ???? ---x xxxx xxxx = scroll Y (0 - 0x1ff)
|
||||
|
||||
|
||||
Real screen resolution and virtual one
|
||||
--------------------------------------------------------------
|
||||
Real Virtual
|
||||
Omega Fighter 256x192(H) 2048x512
|
||||
Atomic Robokid 256x192(H) 512x512
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
Variables
|
||||
**************************************************************************/
|
||||
|
||||
UINT8 *omegaf_fg_videoram;
|
||||
static UINT8 *omegaf_bg0_videoram;
|
||||
static UINT8 *omegaf_bg1_videoram;
|
||||
static UINT8 *omegaf_bg2_videoram;
|
||||
//size_t omegaf_fgvideoram_size;
|
||||
|
||||
static int omegaf_bg0_bank = 0;
|
||||
static int omegaf_bg1_bank = 0;
|
||||
static int omegaf_bg2_bank = 0;
|
||||
|
||||
UINT8 *omegaf_bg0_scroll_x;
|
||||
UINT8 *omegaf_bg1_scroll_x;
|
||||
UINT8 *omegaf_bg2_scroll_x;
|
||||
UINT8 *omegaf_bg0_scroll_y;
|
||||
UINT8 *omegaf_bg1_scroll_y;
|
||||
UINT8 *omegaf_bg2_scroll_y;
|
||||
|
||||
static tilemap *fg_tilemap;
|
||||
static tilemap *bg0_tilemap;
|
||||
static tilemap *bg1_tilemap;
|
||||
static tilemap *bg2_tilemap;
|
||||
|
||||
static int bg0_enabled = 1;
|
||||
static int bg1_enabled = 1;
|
||||
static int bg2_enabled = 1;
|
||||
|
||||
static mame_bitmap *bitmap_sp; /* for sprite overdraw */
|
||||
static int sprite_overdraw_enabled = 0;
|
||||
|
||||
static int scrollx_mask = 0x07ff;
|
||||
static int bank_mask = 1;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Callbacks for the tilemap code
|
||||
***************************************************************************/
|
||||
|
||||
static TILE_GET_INFO( get_bg0_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
int attrib = ( (tile_index & 0x00f) | ( (tile_index & 0x070) << 5 ) |
|
||||
( (tile_index & 0xf80) >> 3 ) ) << 1;
|
||||
lo = omegaf_bg0_videoram[ attrib ];
|
||||
hi = omegaf_bg0_videoram[ attrib | 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
0,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_bg1_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
int attrib = ( (tile_index & 0x00f) | ( (tile_index & 0x070) << 5 ) |
|
||||
( (tile_index & 0xf80) >> 3 ) ) << 1;
|
||||
lo = omegaf_bg1_videoram[ attrib ];
|
||||
hi = omegaf_bg1_videoram[ attrib | 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
1,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_bg2_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
int attrib = ( (tile_index & 0x00f) | ( (tile_index & 0x070) << 5 ) |
|
||||
( (tile_index & 0xf80) >> 3 ) ) << 1;
|
||||
lo = omegaf_bg2_videoram[ attrib ];
|
||||
hi = omegaf_bg2_videoram[ attrib | 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
2,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( robokid_get_bg0_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
int attrib = ( (tile_index & 0x00f) | ( (tile_index & 0x010) << 5 ) |
|
||||
( (tile_index & 0x3e0) >> 1 ) ) << 1;
|
||||
lo = omegaf_bg0_videoram[ attrib ];
|
||||
hi = omegaf_bg0_videoram[ attrib | 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
0,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( robokid_get_bg1_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
int attrib = ( (tile_index & 0x00f) | ( (tile_index & 0x010) << 5 ) |
|
||||
( (tile_index & 0x3e0) >> 1 ) ) << 1;
|
||||
lo = omegaf_bg1_videoram[ attrib ];
|
||||
hi = omegaf_bg1_videoram[ attrib | 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
1,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( robokid_get_bg2_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
int attrib = ( (tile_index & 0x00f) | ( (tile_index & 0x010) << 5 ) |
|
||||
( (tile_index & 0x3e0) >> 1 ) ) << 1;
|
||||
lo = omegaf_bg2_videoram[ attrib ];
|
||||
hi = omegaf_bg2_videoram[ attrib | 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
2,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_fg_tile_info )
|
||||
{
|
||||
int color, tile, hi, lo;
|
||||
|
||||
lo = omegaf_fg_videoram[ tile_index << 1 ];
|
||||
hi = omegaf_fg_videoram[ (tile_index << 1) + 1 ];
|
||||
color = hi & 0x0f;
|
||||
tile = ( ((hi & 0x80) << 2) | ((hi & 0x40) << 2) |
|
||||
((hi & 0x20) << 5) | ((hi & 0x10) << 7) ) | lo;
|
||||
SET_TILE_INFO(
|
||||
5,
|
||||
tile,
|
||||
color,
|
||||
0);
|
||||
tileinfo->category = 0;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Initialize and destroy video hardware emulation
|
||||
***************************************************************************/
|
||||
|
||||
static void videoram_alloc(running_machine *machine, int size)
|
||||
{
|
||||
/* create video ram */
|
||||
omegaf_bg0_videoram = auto_malloc(size);
|
||||
memset( omegaf_bg0_videoram, 0x00, size );
|
||||
|
||||
omegaf_bg1_videoram = auto_malloc(size);
|
||||
memset( omegaf_bg1_videoram, 0x00, size );
|
||||
|
||||
omegaf_bg2_videoram = auto_malloc(size);
|
||||
memset( omegaf_bg2_videoram, 0x00, size );
|
||||
|
||||
bitmap_sp = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
|
||||
}
|
||||
|
||||
VIDEO_START( omegaf )
|
||||
{
|
||||
scrollx_mask = 0x07ff;
|
||||
bank_mask = 7;
|
||||
|
||||
videoram_alloc(machine, 0x2000);
|
||||
|
||||
/* Info Offset Type w h col row */
|
||||
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
bg0_tilemap = tilemap_create(get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 32);
|
||||
bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 32);
|
||||
bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 32);
|
||||
|
||||
tilemap_set_transparent_pen( fg_tilemap, 15 );
|
||||
tilemap_set_transparent_pen( bg0_tilemap, 15 );
|
||||
tilemap_set_transparent_pen( bg1_tilemap, 15 );
|
||||
tilemap_set_transparent_pen( bg2_tilemap, 15 );
|
||||
}
|
||||
|
||||
VIDEO_START( robokid )
|
||||
{
|
||||
scrollx_mask = 0x01ff;
|
||||
bank_mask = 1;
|
||||
|
||||
videoram_alloc(machine, 0x0800);
|
||||
|
||||
/* Info Offset Type w h col row */
|
||||
fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
|
||||
bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen( fg_tilemap, 15 );
|
||||
tilemap_set_transparent_pen( bg1_tilemap, 15 );
|
||||
tilemap_set_transparent_pen( bg2_tilemap, 15 );
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Memory handler
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg0_bank_w )
|
||||
{
|
||||
omegaf_bg0_bank = data & bank_mask;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg1_bank_w )
|
||||
{
|
||||
omegaf_bg1_bank = data & bank_mask;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg2_bank_w )
|
||||
{
|
||||
omegaf_bg2_bank = data & bank_mask;
|
||||
}
|
||||
|
||||
READ8_HANDLER( omegaf_bg0_videoram_r )
|
||||
{
|
||||
return omegaf_bg0_videoram[ (omegaf_bg0_bank << 10) | offset ];
|
||||
}
|
||||
|
||||
READ8_HANDLER( omegaf_bg1_videoram_r )
|
||||
{
|
||||
return omegaf_bg1_videoram[ (omegaf_bg1_bank << 10) | offset ];
|
||||
}
|
||||
|
||||
READ8_HANDLER( omegaf_bg2_videoram_r )
|
||||
{
|
||||
return omegaf_bg2_videoram[ (omegaf_bg2_bank << 10) | offset ];
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg0_videoram_w )
|
||||
{
|
||||
int address;
|
||||
int tile_index;
|
||||
|
||||
address = (omegaf_bg0_bank << 10 ) | offset;
|
||||
omegaf_bg0_videoram[ address ] = data;
|
||||
tile_index = ( (address & 0x001e) >> 1 ) | ( (address & 0x1c00) >> 6 ) |
|
||||
( (address & 0x03e0) << 2 );
|
||||
tilemap_mark_tile_dirty( bg0_tilemap, tile_index );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg1_videoram_w )
|
||||
{
|
||||
int address;
|
||||
int tile_index;
|
||||
|
||||
address = (omegaf_bg1_bank << 10 ) | offset;
|
||||
omegaf_bg1_videoram[ address ] = data;
|
||||
tile_index = ( (address & 0x001e) >> 1 ) | ( (address & 0x1c00) >> 6 ) |
|
||||
( (address & 0x03e0) << 2 );
|
||||
tilemap_mark_tile_dirty( bg1_tilemap, tile_index );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg2_videoram_w )
|
||||
{
|
||||
int address;
|
||||
int tile_index;
|
||||
|
||||
address = (omegaf_bg2_bank << 10 ) | offset;
|
||||
omegaf_bg2_videoram[ address ] = data;
|
||||
tile_index = ( (address & 0x001e) >> 1 ) | ( (address & 0x1c00) >> 6 ) |
|
||||
( (address & 0x03e0) << 2 );
|
||||
tilemap_mark_tile_dirty( bg2_tilemap, tile_index );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg0_videoram_w )
|
||||
{
|
||||
int address;
|
||||
int tile_index;
|
||||
|
||||
address = (omegaf_bg0_bank << 10 ) | offset;
|
||||
omegaf_bg0_videoram[ address ] = data;
|
||||
tile_index = ( (address & 0x001e) >> 1 ) | ( (address & 0x0400) >> 6 ) |
|
||||
(address & 0x03e0);
|
||||
tilemap_mark_tile_dirty( bg0_tilemap, tile_index );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg1_videoram_w )
|
||||
{
|
||||
int address;
|
||||
int tile_index;
|
||||
|
||||
address = (omegaf_bg1_bank << 10 ) | offset;
|
||||
omegaf_bg1_videoram[ address ] = data;
|
||||
tile_index = ( (address & 0x001e) >> 1 ) | ( (address & 0x0400) >> 6 ) |
|
||||
(address & 0x03e0);
|
||||
tilemap_mark_tile_dirty( bg1_tilemap, tile_index );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( robokid_bg2_videoram_w )
|
||||
{
|
||||
int address;
|
||||
int tile_index;
|
||||
|
||||
address = (omegaf_bg2_bank << 10 ) | offset;
|
||||
omegaf_bg2_videoram[ address ] = data;
|
||||
tile_index = ( (address & 0x001e) >> 1 ) | ( (address & 0x0400) >> 6 ) |
|
||||
(address & 0x03e0);
|
||||
tilemap_mark_tile_dirty( bg2_tilemap, tile_index );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg0_scrollx_w )
|
||||
{
|
||||
int scrollx;
|
||||
|
||||
omegaf_bg0_scroll_x[offset] = data;
|
||||
|
||||
scrollx = (omegaf_bg0_scroll_x[1] << 8) | omegaf_bg0_scroll_x[0];
|
||||
scrollx &= scrollx_mask;
|
||||
tilemap_set_scrollx( bg0_tilemap, 0, scrollx );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg0_scrolly_w )
|
||||
{
|
||||
int scrolly;
|
||||
|
||||
omegaf_bg0_scroll_y[offset] = data;
|
||||
|
||||
scrolly = (omegaf_bg0_scroll_y[1] << 8) | omegaf_bg0_scroll_y[0];
|
||||
scrolly &= 0x01ff;
|
||||
tilemap_set_scrolly( bg0_tilemap, 0, scrolly );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg1_scrollx_w )
|
||||
{
|
||||
int scrollx;
|
||||
|
||||
omegaf_bg1_scroll_x[offset] = data;
|
||||
|
||||
scrollx = (omegaf_bg1_scroll_x[1] << 8) | omegaf_bg1_scroll_x[0];
|
||||
scrollx &= scrollx_mask;
|
||||
tilemap_set_scrollx( bg1_tilemap, 0, scrollx );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg1_scrolly_w )
|
||||
{
|
||||
int scrolly;
|
||||
|
||||
omegaf_bg1_scroll_y[offset] = data;
|
||||
|
||||
scrolly = (omegaf_bg1_scroll_y[1] << 8) | omegaf_bg1_scroll_y[0];
|
||||
scrolly &= 0x01ff;
|
||||
tilemap_set_scrolly( bg1_tilemap, 0, scrolly );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg2_scrollx_w )
|
||||
{
|
||||
int scrollx;
|
||||
|
||||
omegaf_bg2_scroll_x[offset] = data;
|
||||
|
||||
scrollx = (omegaf_bg2_scroll_x[1] << 8) | omegaf_bg2_scroll_x[0];
|
||||
scrollx &= scrollx_mask;
|
||||
tilemap_set_scrollx( bg2_tilemap, 0, scrollx );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg2_scrolly_w )
|
||||
{
|
||||
int scrolly;
|
||||
|
||||
omegaf_bg2_scroll_y[offset] = data;
|
||||
|
||||
scrolly = (omegaf_bg2_scroll_y[1] << 8) | omegaf_bg2_scroll_y[0];
|
||||
scrolly &= 0x01ff;
|
||||
tilemap_set_scrolly( bg2_tilemap, 0, scrolly );
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_fgvideoram_w )
|
||||
{
|
||||
omegaf_fg_videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(fg_tilemap, offset >> 1);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg0_enabled_w )
|
||||
{
|
||||
if (bg0_enabled != data)
|
||||
bg0_enabled = data;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg1_enabled_w )
|
||||
{
|
||||
if (bg1_enabled != data)
|
||||
bg1_enabled = data;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_bg2_enabled_w )
|
||||
{
|
||||
if (bg2_enabled != data)
|
||||
bg2_enabled = data;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_sprite_overdraw_w )
|
||||
{
|
||||
logerror( "sprite overdraw flag : %02x\n", data );
|
||||
if (sprite_overdraw_enabled != (data & 1))
|
||||
{
|
||||
sprite_overdraw_enabled = data & 1;
|
||||
fillbitmap(bitmap_sp, 15, &Machine->screen[0].visarea);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( omegaf_flipscreen_w )
|
||||
{
|
||||
flip_screen_set(data & 0x80);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Screen refresh
|
||||
***************************************************************************/
|
||||
|
||||
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
|
||||
/* Draw the sprites */
|
||||
for (offs = 11 ;offs < spriteram_size; offs += 16)
|
||||
{
|
||||
int sx, sy, tile, color, flipx, flipy, big;
|
||||
|
||||
if (spriteram[offs + 2] & 2)
|
||||
{
|
||||
sx = spriteram[offs + 1];
|
||||
sy = spriteram[offs];
|
||||
if (spriteram[offs + 2] & 1)
|
||||
sx -= 256;
|
||||
tile = spriteram[offs + 3] |
|
||||
((spriteram[offs + 2] & 0xc0) << 2) |
|
||||
((spriteram[offs + 2] & 0x08) << 7);
|
||||
|
||||
big = spriteram[offs + 2] & 4;
|
||||
if (big)
|
||||
tile >>= 2;
|
||||
flipx = spriteram[offs + 2] & 0x10;
|
||||
flipy = spriteram[offs + 2] & 0x20;
|
||||
color = spriteram[offs + 4] & 0x0f;
|
||||
|
||||
if(sprite_overdraw_enabled && (color & 8))
|
||||
{
|
||||
/* "static" sprites */
|
||||
drawgfx(bitmap_sp,machine->gfx[(big) ? 4 : 3],
|
||||
tile,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
0,
|
||||
TRANSPARENCY_PEN, 15);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawgfx(bitmap,machine->gfx[(big) ? 4 : 3],
|
||||
tile,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, 15);
|
||||
|
||||
/* all the "normal" sprites clear the "static" ones */
|
||||
if(sprite_overdraw_enabled)
|
||||
{
|
||||
int x,y,offset = 0;
|
||||
const gfx_element *gfx = machine->gfx[(big) ? 4 : 3];
|
||||
UINT8 *srcgfx = gfx->gfxdata + tile * gfx->char_modulo;
|
||||
|
||||
for(y = 0; y < gfx->height; y++)
|
||||
{
|
||||
for(x = 0; x < gfx->width; x++)
|
||||
{
|
||||
if(srcgfx[offset] != 15)
|
||||
{
|
||||
*BITMAP_ADDR16(bitmap_sp, sy + y, sx + x) = 15;
|
||||
}
|
||||
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(sprite_overdraw_enabled)
|
||||
copybitmap(bitmap, bitmap_sp, 0, 0, 0, 0, cliprect, TRANSPARENCY_PEN, 15);
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( omegaf )
|
||||
{
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
|
||||
if (bg0_enabled) tilemap_draw(bitmap,cliprect, bg0_tilemap, 0, 0);
|
||||
if (bg1_enabled) tilemap_draw(bitmap,cliprect, bg1_tilemap, 0, 0);
|
||||
if (bg2_enabled) tilemap_draw(bitmap,cliprect, bg2_tilemap, 0, 0);
|
||||
draw_sprites(machine,bitmap,cliprect);
|
||||
tilemap_draw(bitmap,cliprect, fg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( robokid )
|
||||
{
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
|
||||
if (bg0_enabled) tilemap_draw(bitmap,cliprect, bg0_tilemap, 0, 0);
|
||||
if (bg1_enabled) tilemap_draw(bitmap,cliprect, bg1_tilemap, 0, 0);
|
||||
draw_sprites(machine,bitmap,cliprect);
|
||||
if (bg2_enabled) tilemap_draw(bitmap,cliprect, bg2_tilemap, 0, 0);
|
||||
tilemap_draw(bitmap,cliprect, fg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user