Updated darius.c, opwolf.c, rainbow.c, rastan.c, topspeed.c and volfied.c to use Taito video devices

This commit is contained in:
Fabio Priuli 2009-12-28 11:56:59 +00:00
parent 2e6f342c69
commit 49c68fef35
10 changed files with 190 additions and 139 deletions

View File

@ -128,7 +128,7 @@ sounds.
#include "driver.h"
#include "cpu/m68000/m68000.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
#include "cpu/z80/z80.h"
#include "audio/taitosnd.h"
#include "sound/2203intf.h"
@ -253,10 +253,10 @@ static ADDRESS_MAP_START( darius_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(cpua_ctrl_w)
AM_RANGE(0x0b0000, 0x0b0001) AM_WRITE(darius_watchdog_w)
AM_RANGE(0xc00000, 0xc0007f) AM_READWRITE(darius_ioc_r, darius_ioc_w) /* inputs, sound */
AM_RANGE(0xd00000, 0xd0ffff) AM_READWRITE(PC080SN_word_0_r, PC080SN_word_0_w) /* tilemaps */
AM_RANGE(0xd20000, 0xd20003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0xd40000, 0xd40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xd50000, 0xd50003) AM_WRITE(PC080SN_ctrl_word_0_w)
AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE("pc080sn", pc080sn_word_r, pc080sn_word_w) /* tilemaps */
AM_RANGE(0xd20000, 0xd20003) AM_DEVWRITE("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0xd40000, 0xd40003) AM_DEVWRITE("pc080sn", pc080sn_xscroll_word_w)
AM_RANGE(0xd50000, 0xd50003) AM_DEVWRITE("pc080sn", pc080sn_ctrl_word_w)
AM_RANGE(0xd80000, 0xd80fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)/* palette */
AM_RANGE(0xe00100, 0xe00fff) AM_RAM AM_SHARE("share1") AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0xe01000, 0xe02fff) AM_RAM AM_SHARE("share2")
@ -807,6 +807,12 @@ static const ym2203_interface ym2203_interface_2 =
MACHINE DRIVERS
***********************************************************/
static const pc080sn_interface darius_pc080sn_intf =
{
1, /* gfxnum */
-16, 8, 0, 1 /* x_offset, y_offset, y_invert, dblwidth */
};
static MACHINE_DRIVER_START( darius )
/* basic machine hardware */
@ -859,6 +865,8 @@ static MACHINE_DRIVER_START( darius )
MDRV_VIDEO_START(darius)
MDRV_VIDEO_UPDATE(darius)
MDRV_PC080SN_ADD("pc080sn", darius_pc080sn_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

View File

@ -278,7 +278,7 @@ register. So what is controlling priority.
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
#include "includes/taitoipt.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
#include "audio/taitosnd.h"
#include "sound/2151intf.h"
#include "sound/msm5205.h"
@ -295,7 +295,6 @@ static int adpcm_data[2];
static int opwolf_gun_xoffs, opwolf_gun_yoffs;
WRITE16_HANDLER( rainbow_spritectrl_w );
VIDEO_START( opwolf );
VIDEO_UPDATE( opwolf );
static READ16_HANDLER( cchip_r )
@ -383,12 +382,12 @@ static ADDRESS_MAP_START( opwolf_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITENOP /* watchdog ?? */
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_WRITE8(taitosound_port_w, 0xff00)
AM_RANGE(0x3e0002, 0x3e0003) AM_READWRITE8(taitosound_comm_r,taitosound_comm_w, 0xff00)
AM_RANGE(0xc00000, 0xc0ffff) AM_READWRITE(PC080SN_word_0_r,PC080SN_word_0_w)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc10000, 0xc1ffff) AM_WRITEONLY /* error in init code (?) */
AM_RANGE(0xc20000, 0xc20003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0xc40000, 0xc40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xc50000, 0xc50003) AM_WRITE(PC080SN_ctrl_word_0_w)
AM_RANGE(0xd00000, 0xd03fff) AM_READWRITE(PC090OJ_word_0_r,PC090OJ_word_0_w) /* sprite ram */
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0xc40000, 0xc40003) AM_DEVWRITE("pc080sn", pc080sn_xscroll_word_w)
AM_RANGE(0xc50000, 0xc50003) AM_DEVWRITE("pc080sn", pc080sn_ctrl_word_w)
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("pc090oj", pc090oj_word_r, pc090oj_word_w) /* sprite ram */
ADDRESS_MAP_END
@ -404,12 +403,12 @@ static ADDRESS_MAP_START( opwolfb_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITENOP /* watchdog ?? */
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_WRITE8(taitosound_port_w, 0xff00)
AM_RANGE(0x3e0002, 0x3e0003) AM_READWRITE8(taitosound_comm_r,taitosound_comm_w, 0xff00)
AM_RANGE(0xc00000, 0xc0ffff) AM_READWRITE(PC080SN_word_0_r,PC080SN_word_0_w)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc10000, 0xc1ffff) AM_WRITEONLY /* error in init code (?) */
AM_RANGE(0xc20000, 0xc20003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0xc40000, 0xc40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xc50000, 0xc50003) AM_WRITE(PC080SN_ctrl_word_0_w)
AM_RANGE(0xd00000, 0xd03fff) AM_READWRITE(PC090OJ_word_0_r,PC090OJ_word_0_w) /* sprite ram */
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0xc40000, 0xc40003) AM_DEVWRITE("pc080sn", pc080sn_xscroll_word_w)
AM_RANGE(0xc50000, 0xc50003) AM_DEVWRITE("pc080sn", pc080sn_ctrl_word_w)
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("pc090oj", pc090oj_word_r, pc090oj_word_w) /* sprite ram */
ADDRESS_MAP_END
@ -709,6 +708,17 @@ static const msm5205_interface msm5205_config =
MACHINE DRIVERS
***********************************************************/
static const pc080sn_interface opwolf_pc080sn_intf =
{
1, /* gfxnum */
0, 0, 0, 0 /* x_offset, y_offset, y_invert, dblwidth */
};
static const pc090oj_interface opwolf_pc090oj_intf =
{
0, 0, 0, 0
};
static MACHINE_DRIVER_START( opwolf )
/* basic machine hardware */
@ -735,9 +745,11 @@ static MACHINE_DRIVER_START( opwolf )
MDRV_GFXDECODE(opwolf)
MDRV_PALETTE_LENGTH(8192)
MDRV_VIDEO_START(opwolf)
MDRV_VIDEO_UPDATE(opwolf)
MDRV_PC080SN_ADD("pc080sn", opwolf_pc080sn_intf)
MDRV_PC090OJ_ADD("pc090oj", opwolf_pc090oj_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@ -787,9 +799,11 @@ static MACHINE_DRIVER_START( opwolfb ) /* OSC clocks unknown for the bootleg, bu
MDRV_GFXDECODE(opwolfb)
MDRV_PALETTE_LENGTH(8192)
MDRV_VIDEO_START(opwolf)
MDRV_VIDEO_UPDATE(opwolf)
MDRV_PC080SN_ADD("pc080sn", opwolf_pc080sn_intf)
MDRV_PC090OJ_ADD("pc090oj", opwolf_pc090oj_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

View File

@ -321,13 +321,12 @@ Stephh's notes (based on the game M68000 code and some tests) :
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
#include "includes/taitoipt.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
#include "audio/taitosnd.h"
#include "sound/2203intf.h"
#include "sound/2151intf.h"
#include "includes/cchip.h"
VIDEO_START( rainbow );
VIDEO_START( jumping );
VIDEO_UPDATE( rainbow );
@ -367,11 +366,11 @@ static ADDRESS_MAP_START( rainbow_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x800000, 0x8007ff) AM_READWRITE(rainbow_cchip_ram_r,rainbow_cchip_ram_w)
AM_RANGE(0x800802, 0x800803) AM_READWRITE(rainbow_cchip_ctrl_r,rainbow_cchip_ctrl_w)
AM_RANGE(0x800c00, 0x800c01) AM_WRITE(rainbow_cchip_bank_w)
AM_RANGE(0xc00000, 0xc0ffff) AM_READWRITE(PC080SN_word_0_r,PC080SN_word_0_w)
AM_RANGE(0xc20000, 0xc20003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0xc40000, 0xc40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xc50000, 0xc50003) AM_WRITE(PC080SN_ctrl_word_0_w)
AM_RANGE(0xd00000, 0xd03fff) AM_READWRITE(PC090OJ_word_0_r,PC090OJ_word_0_w) /* sprite ram + other stuff */
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0xc40000, 0xc40003) AM_DEVWRITE("pc080sn", pc080sn_xscroll_word_w)
AM_RANGE(0xc50000, 0xc50003) AM_DEVWRITE("pc080sn", pc080sn_ctrl_word_w)
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("pc090oj", pc090oj_word_r, pc090oj_word_w) /* sprite ram + other stuff */
ADDRESS_MAP_END
static ADDRESS_MAP_START( jumping_map, ADDRESS_SPACE_PROGRAM, 16 )
@ -387,12 +386,12 @@ static ADDRESS_MAP_START( jumping_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITENOP /* watchdog? */
AM_RANGE(0x400006, 0x400007) AM_WRITE(jumping_sound_w)
AM_RANGE(0x420000, 0x420001) AM_READNOP /* read, but result not used */
AM_RANGE(0x430000, 0x430003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0x430000, 0x430003) AM_DEVWRITE("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0x440000, 0x4407ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x800000, 0x80ffff) AM_WRITENOP /* original c-chip location (not used) */
AM_RANGE(0xc00000, 0xc0ffff) AM_READWRITE(PC080SN_word_0_r,PC080SN_word_0_w)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc20000, 0xc20003) AM_WRITENOP /* seems it is a leftover from rainbow: scroll y written here too */
AM_RANGE(0xc40000, 0xc40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xc40000, 0xc40003) AM_DEVWRITE("pc080sn", pc080sn_xscroll_word_w)
AM_RANGE(0xd00000, 0xd01fff) AM_RAM /* original spriteram location, needed for Attract Mode */
ADDRESS_MAP_END
@ -648,6 +647,23 @@ static const ym2151_interface ym2151_config =
MACHINE DRIVERS
***********************************************************/
static const pc080sn_interface rainbow_pc080sn_intf =
{
1, /* gfxnum */
0, 0, 0, 0 /* x_offset, y_offset, y_invert, dblwidth */
};
static const pc080sn_interface jumping_pc080sn_intf =
{
1, /* gfxnum */
0, 0, 1, 0 /* x_offset, y_offset, y_invert, dblwidth */
};
static const pc090oj_interface rainbow_pc090oj_intf =
{
0, 0, 0, 0
};
static MACHINE_DRIVER_START( rainbow )
/* basic machine hardware */
@ -671,9 +687,11 @@ static MACHINE_DRIVER_START( rainbow )
MDRV_GFXDECODE(rainbow)
MDRV_PALETTE_LENGTH(8192)
MDRV_VIDEO_START(rainbow)
MDRV_VIDEO_UPDATE(rainbow)
MDRV_PC080SN_ADD("pc080sn", rainbow_pc080sn_intf)
MDRV_PC090OJ_ADD("pc090oj", rainbow_pc090oj_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")
@ -711,6 +729,8 @@ static MACHINE_DRIVER_START( jumping )
MDRV_VIDEO_START(jumping)
MDRV_VIDEO_UPDATE(jumping)
MDRV_PC080SN_ADD("pc080sn", jumping_pc080sn_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")

View File

@ -160,7 +160,7 @@ Stephh's notes (based on the game M68000 code and some tests) :
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
#include "includes/taitoipt.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
#include "audio/taitosnd.h"
#include "sound/2151intf.h"
#include "sound/msm5205.h"
@ -168,7 +168,6 @@ Stephh's notes (based on the game M68000 code and some tests) :
WRITE16_HANDLER( rastan_spritectrl_w );
VIDEO_START( rastan );
VIDEO_UPDATE( rastan );
@ -236,11 +235,11 @@ static ADDRESS_MAP_START( rastan_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(watchdog_reset16_w)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_WRITE8(taitosound_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0x00ff)
AM_RANGE(0xc00000, 0xc0ffff) AM_READWRITE(PC080SN_word_0_r, PC080SN_word_0_w)
AM_RANGE(0xc20000, 0xc20003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0xc40000, 0xc40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xc50000, 0xc50003) AM_WRITE(PC080SN_ctrl_word_0_w)
AM_RANGE(0xd00000, 0xd03fff) AM_READWRITE(PC090OJ_word_0_r, PC090OJ_word_0_w) /* sprite ram */
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0xc40000, 0xc40003) AM_DEVWRITE("pc080sn", pc080sn_xscroll_word_w)
AM_RANGE(0xc50000, 0xc50003) AM_DEVWRITE("pc080sn", pc080sn_ctrl_word_w)
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("pc090oj", pc090oj_word_r, pc090oj_word_w) /* sprite ram */
ADDRESS_MAP_END
@ -381,6 +380,17 @@ static MACHINE_RESET( rastan )
}
static const pc080sn_interface rastan_pc080sn_intf =
{
0, /* gfxnum */
0, 0, 0, 0 /* x_offset, y_offset, y_invert, dblwidth */
};
static const pc090oj_interface rastan_pc090oj_intf =
{
1, 0, 0, 0
};
static MACHINE_DRIVER_START( rastan )
/* basic machine hardware */
@ -404,9 +414,11 @@ static MACHINE_DRIVER_START( rastan )
MDRV_GFXDECODE(rastan)
MDRV_PALETTE_LENGTH(8192)
MDRV_VIDEO_START(rastan)
MDRV_VIDEO_UPDATE(rastan)
MDRV_PC080SN_ADD("pc080sn", rastan_pc080sn_intf)
MDRV_PC090OJ_ADD("pc090oj", rastan_pc090oj_intf)
MDRV_MACHINE_RESET(rastan)
/* sound hardware */

View File

@ -233,7 +233,7 @@ Stephh's notes (based on the game M68000 code and some tests) :
#include "cpu/z80/z80.h"
#include "includes/taitoipt.h"
#include "cpu/m68000/m68000.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
#include "machine/taitoio.h"
#include "audio/taitosnd.h"
#include "sound/2151intf.h"
@ -459,14 +459,14 @@ static ADDRESS_MAP_START( topspeed_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x7e0002, 0x7e0003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x8003ff) AM_RAM AM_BASE(&topspeed_raster_ctrl)
AM_RANGE(0x800400, 0x80ffff) AM_RAM
AM_RANGE(0xa00000, 0xa0ffff) AM_READWRITE(PC080SN_word_0_r, PC080SN_word_0_w)
AM_RANGE(0xa20000, 0xa20003) AM_WRITE(PC080SN_yscroll_word_0_w)
AM_RANGE(0xa40000, 0xa40003) AM_WRITE(PC080SN_xscroll_word_0_w)
AM_RANGE(0xa50000, 0xa50003) AM_WRITE(PC080SN_ctrl_word_0_w)
AM_RANGE(0xb00000, 0xb0ffff) AM_READWRITE(PC080SN_word_1_r, PC080SN_word_1_w)
AM_RANGE(0xb20000, 0xb20003) AM_WRITE(PC080SN_yscroll_word_1_w)
AM_RANGE(0xb40000, 0xb40003) AM_WRITE(PC080SN_xscroll_word_1_w)
AM_RANGE(0xb50000, 0xb50003) AM_WRITE(PC080SN_ctrl_word_1_w)
AM_RANGE(0xa00000, 0xa0ffff) AM_DEVREADWRITE("pc080sn_1", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xa20000, 0xa20003) AM_DEVWRITE("pc080sn_1", pc080sn_yscroll_word_w)
AM_RANGE(0xa40000, 0xa40003) AM_DEVWRITE("pc080sn_1", pc080sn_xscroll_word_w)
AM_RANGE(0xa50000, 0xa50003) AM_DEVWRITE("pc080sn_1", pc080sn_ctrl_word_w)
AM_RANGE(0xb00000, 0xb0ffff) AM_DEVREADWRITE("pc080sn_2", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xb20000, 0xb20003) AM_DEVWRITE("pc080sn_2", pc080sn_yscroll_word_w)
AM_RANGE(0xb40000, 0xb40003) AM_DEVWRITE("pc080sn_2", pc080sn_xscroll_word_w)
AM_RANGE(0xb50000, 0xb50003) AM_DEVWRITE("pc080sn_2", pc080sn_ctrl_word_w)
AM_RANGE(0xd00000, 0xd00fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_BASE(&topspeed_spritemap)
ADDRESS_MAP_END
@ -670,6 +670,12 @@ static MACHINE_RESET( topspeed )
adpcm_data = -1;
}
static const pc080sn_interface topspeed_pc080sn_intf =
{
1, /* gfxnum */
0, 8, 0, 0 /* x_offset, y_offset, y_invert, dblwidth */
};
static const tc0220ioc_interface topspeed_io_intf =
{
DEVCB_INPUT_PORT("DSWA"), DEVCB_INPUT_PORT("DSWB"),
@ -706,9 +712,11 @@ static MACHINE_DRIVER_START( topspeed )
MDRV_GFXDECODE(topspeed)
MDRV_PALETTE_LENGTH(8192)
MDRV_VIDEO_START(topspeed)
MDRV_VIDEO_UPDATE(topspeed)
MDRV_PC080SN_ADD("pc080sn_1", topspeed_pc080sn_intf)
MDRV_PC080SN_ADD("pc080sn_2", topspeed_pc080sn_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")

View File

@ -51,7 +51,7 @@ Stephh's notes (based on the game M68000 code and some tests) :
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
#include "includes/taitoipt.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
#include "audio/taitosnd.h"
#include "sound/2203intf.h"
#include "includes/cchip.h"
@ -75,7 +75,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_ROM /* program */
AM_RANGE(0x080000, 0x0fffff) AM_ROM /* tiles */
AM_RANGE(0x100000, 0x103fff) AM_RAM /* main */
AM_RANGE(0x200000, 0x203fff) AM_READWRITE(PC090OJ_word_0_r, PC090OJ_word_0_w)
AM_RANGE(0x200000, 0x203fff) AM_DEVREADWRITE("pc090oj", pc090oj_word_r, pc090oj_word_w)
AM_RANGE(0x400000, 0x47ffff) AM_READWRITE(volfied_video_ram_r, volfied_video_ram_w)
AM_RANGE(0x500000, 0x503fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x600000, 0x600001) AM_WRITE(volfied_video_mask_w)
@ -245,6 +245,11 @@ static DRIVER_INIT( volfied )
volfied_cchip_init(machine);
}
static const pc090oj_interface volfied_pc090oj_intf =
{
0, 0, 0, 0
};
static MACHINE_DRIVER_START( volfied )
/* basic machine hardware */
@ -271,6 +276,8 @@ static MACHINE_DRIVER_START( volfied )
MDRV_VIDEO_START(volfied)
MDRV_VIDEO_UPDATE(volfied)
MDRV_PC090OJ_ADD("pc090oj", volfied_pc090oj_intf)
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")

View File

@ -1,5 +1,5 @@
#include "driver.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
static tilemap_t *fg_tilemap;
@ -44,9 +44,6 @@ VIDEO_START( darius )
spritelist = auto_alloc_array(machine, struct tempsprite, 0x800);
/* (chips, gfxnum, x_offs, y_offs, y_invert, opaque, dblwidth) */
PC080SN_vh_start(machine,1,1,-16,8,0,1,1);
tilemap_set_transparent_pen(fg_tilemap,0);
}
@ -123,30 +120,31 @@ VIDEO_UPDATE( darius )
const device_config *left_screen = devtag_get_device(screen->machine, "lscreen");
const device_config *middle_screen = devtag_get_device(screen->machine, "mscreen");
const device_config *right_screen = devtag_get_device(screen->machine, "rscreen");
const device_config *pc080sn = devtag_get_device(screen->machine, "pc080sn");
if (screen == left_screen)
xoffs = 36*8*0;
xoffs = 36 * 8 * 0;
else if (screen == middle_screen)
xoffs = 36*8*1;
xoffs = 36 * 8 * 1;
else if (screen == right_screen)
xoffs = 36*8*2;
xoffs = 36 * 8 * 2;
PC080SN_tilemap_update();
pc080sn_tilemap_update(pc080sn);
// draw bottom layer(always active)
PC080SN_tilemap_draw_offset(bitmap,cliprect,0,0,TILEMAP_DRAW_OPAQUE,0,-xoffs,0);
pc080sn_tilemap_draw_offset(pc080sn, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0, -xoffs, 0);
/* Sprites can be under/over the layer below text layer */
draw_sprites(screen->machine,bitmap,cliprect,0,xoffs,-8); // draw sprites with priority 0 which are under the mid layer
draw_sprites(screen->machine, bitmap, cliprect, 0, xoffs, -8); // draw sprites with priority 0 which are under the mid layer
// draw middle layer
PC080SN_tilemap_draw_offset(bitmap,cliprect,0,1,0,0,-xoffs,0);
pc080sn_tilemap_draw_offset(pc080sn, bitmap, cliprect, 1, 0, 0, -xoffs, 0);
draw_sprites(screen->machine,bitmap,cliprect,1,xoffs,-8); // draw sprites with priority 1 which are over the mid layer
draw_sprites(screen->machine, bitmap, cliprect, 1, xoffs, -8); // draw sprites with priority 1 which are over the mid layer
/* top(text) layer is in fixed position */
tilemap_set_scrollx(fg_tilemap,0,0+xoffs);
tilemap_set_scrolly(fg_tilemap,0,-8);
tilemap_draw(bitmap,cliprect,fg_tilemap,0,0);
tilemap_set_scrollx(fg_tilemap, 0, 0 + xoffs);
tilemap_set_scrolly(fg_tilemap, 0, -8);
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
return 0;
}

View File

@ -9,7 +9,7 @@
***************************************************************************/
#include "driver.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
static UINT16 sprite_ctrl = 0;
@ -17,31 +17,11 @@ static UINT16 sprites_flipscreen = 0;
/***************************************************************************/
VIDEO_START( rastan )
{
/* (chips, gfxnum, x_offs, y_offs, y_invert, opaque, dblwidth) */
PC080SN_vh_start(machine,1,0,0,0,0,0,0);
PC090OJ_vh_start(machine,1,0,0,0);
}
VIDEO_START( opwolf )
{
PC080SN_vh_start(machine,1,1,0,0,0,0,0);
PC090OJ_vh_start(machine,0,0,0,0);
}
VIDEO_START( rainbow )
{
/* (chips, gfxnum, x_offs, y_offs, y_invert, opaque, dblwidth) */
PC080SN_vh_start(machine,1,1,0,0,0,0,0);
PC090OJ_vh_start(machine,0,0,0,0);
}
VIDEO_START( jumping )
{
PC080SN_vh_start(machine,1,1,0,0,1,0,0);
const device_config *pc080sn = devtag_get_device(machine, "pc080sn");
PC080SN_set_trans_pen(0,1,15);
pc080sn_set_trans_pen(pc080sn, 1, 15);
/* not 100% sure Jumping needs to save both... */
state_save_register_global(machine, sprite_ctrl);
@ -51,8 +31,10 @@ VIDEO_START( jumping )
WRITE16_HANDLER( rastan_spritectrl_w )
{
const device_config *pc090oj = devtag_get_device(space->machine, "pc090oj");
/* bits 5-7 are the sprite palette bank */
PC090OJ_sprite_ctrl = (data & 0xe0) >> 5;
pc090oj_set_sprite_ctrl(pc090oj, (data & 0xe0) >> 5);
/* bit 4 unused */
@ -67,13 +49,14 @@ WRITE16_HANDLER( rastan_spritectrl_w )
WRITE16_HANDLER( rainbow_spritectrl_w )
{
const device_config *pc090oj = devtag_get_device(space->machine, "pc090oj");
if (offset == 0)
{
/* bits 0 and 1 always set */
/* bits 5-7 are the sprite palette bank */
/* other bits unknown */
PC090OJ_sprite_ctrl = (data & 0xe0) >> 5;
pc090oj_set_sprite_ctrl(pc090oj, (data & 0xe0) >> 5);
}
}
@ -95,19 +78,21 @@ WRITE16_HANDLER( jumping_spritectrl_w )
VIDEO_UPDATE( rastan )
{
const device_config *pc080sn = devtag_get_device(screen->machine, "pc080sn");
const device_config *pc090oj = devtag_get_device(screen->machine, "pc090oj");
int layer[2];
PC080SN_tilemap_update();
pc080sn_tilemap_update(pc080sn);
layer[0] = 0;
layer[1] = 1;
bitmap_fill(screen->machine->priority_bitmap,cliprect,0);
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,1);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[1],0,2);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[1], 0, 2);
PC090OJ_draw_sprites(screen->machine,bitmap,cliprect,0);
pc090oj_draw_sprites(pc090oj, bitmap, cliprect, 0);
return 0;
}
@ -115,19 +100,21 @@ VIDEO_UPDATE( rastan )
VIDEO_UPDATE( opwolf )
{
const device_config *pc080sn = devtag_get_device(screen->machine, "pc080sn");
const device_config *pc090oj = devtag_get_device(screen->machine, "pc090oj");
int layer[2];
PC080SN_tilemap_update();
pc080sn_tilemap_update(pc080sn);
layer[0] = 0;
layer[1] = 1;
bitmap_fill(screen->machine->priority_bitmap,cliprect,0);
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,1);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[1],0,2);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[1], 0, 2);
PC090OJ_draw_sprites(screen->machine,bitmap,cliprect,1);
pc090oj_draw_sprites(pc090oj, bitmap, cliprect, 1);
// if (input_port_read(machine, "P1X"))
// popmessage("%d %d", input_port_read(machine, "P1X"), input_port_read(machine, "P1Y"));
@ -139,19 +126,21 @@ VIDEO_UPDATE( opwolf )
VIDEO_UPDATE( rainbow )
{
const device_config *pc080sn = devtag_get_device(screen->machine, "pc080sn");
const device_config *pc090oj = devtag_get_device(screen->machine, "pc090oj");
int layer[2];
PC080SN_tilemap_update();
pc080sn_tilemap_update(pc080sn);
layer[0] = 0;
layer[1] = 1;
bitmap_fill(screen->machine->priority_bitmap,cliprect,0);
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,1);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[1],0,2);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[1], 0, 2);
PC090OJ_draw_sprites(screen->machine,bitmap,cliprect,1);
pc090oj_draw_sprites(pc090oj, bitmap, cliprect, 1);
return 0;
}
@ -167,24 +156,25 @@ the Y settings are active low.
VIDEO_UPDATE( jumping )
{
const device_config *pc080sn = devtag_get_device(screen->machine, "pc080sn");
UINT16 *spriteram16 = screen->machine->generic.spriteram.u16;
int offs,layer[2];
int offs, layer[2];
int sprite_colbank = (sprite_ctrl & 0xe0) >> 1;
PC080SN_tilemap_update();
pc080sn_tilemap_update(pc080sn);
/* Override values, or foreground layer is in wrong position */
PC080SN_set_scroll(0,1,16,0);
pc080sn_set_scroll(pc080sn, 1, 16, 0);
layer[0] = 0;
layer[1] = 1;
bitmap_fill(screen->machine->priority_bitmap,cliprect,0);
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,0);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
/* Draw the sprites. 128 sprites in total */
for (offs = screen->machine->generic.spriteram_size/2-8; offs >= 0; offs -= 8)
for (offs = screen->machine->generic.spriteram_size / 2 - 8; offs >= 0; offs -= 8)
{
int tile = spriteram16[offs];
if (tile < screen->machine->gfx[1]->total_elements)
@ -207,7 +197,7 @@ VIDEO_UPDATE( jumping )
}
}
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[1],0,0);
pc080sn_tilemap_draw(pc080sn, bitmap, cliprect, layer[1], 0, 0);
#if 0
{

View File

@ -1,19 +1,11 @@
#include "driver.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
UINT16 *topspeed_spritemap;
UINT16 *topspeed_raster_ctrl;
/****************************************************************************/
/****************************************************************************
VIDEO_START( topspeed )
{
/* (chips, gfxnum, x_offs, y_offs, y_invert, opaque, dblwidth) */
PC080SN_vh_start(machine,2,1,0,8,0,0,0);
}
/********************************************************************************
SPRITES
Layout 8 bytes per sprite
@ -119,6 +111,8 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
VIDEO_UPDATE( topspeed )
{
const device_config *pc080sn_1 = devtag_get_device(screen->machine, "pc080sn_1");
const device_config *pc080sn_2 = devtag_get_device(screen->machine, "pc080sn_2");
UINT8 layer[4];
#ifdef MAME_DEBUG
@ -157,7 +151,8 @@ VIDEO_UPDATE( topspeed )
}
#endif
PC080SN_tilemap_update();
pc080sn_tilemap_update(pc080sn_1);
pc080sn_tilemap_update(pc080sn_2);
/* Tilemap layer priority seems hardwired (the order is odd, too) */
layer[0] = 1;
@ -165,35 +160,33 @@ VIDEO_UPDATE( topspeed )
layer[2] = 1;
layer[3] = 0;
bitmap_fill(screen->machine->priority_bitmap,cliprect,0);
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
bitmap_fill(bitmap, cliprect, 0);
#ifdef MAME_DEBUG
if (dislayer[3]==0)
if (dislayer[3] == 0)
#endif
PC080SN_tilemap_draw(bitmap,cliprect,1,layer[0],TILEMAP_DRAW_OPAQUE,1);
pc080sn_tilemap_draw(pc080sn_2, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1);
#ifdef MAME_DEBUG
if (dislayer[2]==0)
if (dislayer[2] == 0)
#endif
PC080SN_tilemap_draw_special(screen->machine,bitmap,cliprect,1,layer[1],0,2,topspeed_raster_ctrl);
pc080sn_tilemap_draw_special(pc080sn_2, bitmap, cliprect, layer[1], 0, 2, topspeed_raster_ctrl);
#ifdef MAME_DEBUG
if (dislayer[1]==0)
if (dislayer[1] == 0)
#endif
PC080SN_tilemap_draw_special(screen->machine,bitmap,cliprect,0,layer[2],0,4,topspeed_raster_ctrl + 0x100);
pc080sn_tilemap_draw_special(pc080sn_1, bitmap, cliprect, layer[2], 0, 4, topspeed_raster_ctrl + 0x100);
#ifdef MAME_DEBUG
if (dislayer[0]==0)
if (dislayer[0] == 0)
#endif
PC080SN_tilemap_draw(bitmap,cliprect,0,layer[3],0,8);
pc080sn_tilemap_draw(pc080sn_1, bitmap, cliprect, layer[3], 0, 8);
#ifdef MAME_DEBUG
if (dislayer[4]==0)
if (dislayer[4] == 0)
#endif
draw_sprites(screen->machine, bitmap,cliprect);
return 0;
}

View File

@ -1,5 +1,5 @@
#include "driver.h"
#include "video/taitoic.h"
#include "video/taiicdev.h"
static UINT16* video_ram = NULL;
@ -18,8 +18,6 @@ VIDEO_START( volfied )
state_save_register_global_pointer(machine, video_ram, 0x40000);
state_save_register_global(machine, video_ctrl);
state_save_register_global(machine, video_mask);
PC090OJ_vh_start(machine, 0, 0, 0, 0);
}
@ -62,7 +60,8 @@ WRITE16_HANDLER( volfied_video_mask_w )
WRITE16_HANDLER( volfied_sprite_ctrl_w )
{
PC090OJ_sprite_ctrl = (data & 0x3c) >> 2;
const device_config *pc090oj = devtag_get_device(space->machine, "pc090oj");
pc090oj_set_sprite_ctrl(pc090oj, (data & 0x3c) >> 2);
}
@ -126,8 +125,10 @@ static void refresh_pixel_layer(running_machine *machine, bitmap_t *bitmap)
VIDEO_UPDATE( volfied )
{
const device_config *pc090oj = devtag_get_device(screen->machine, "pc090oj");
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
refresh_pixel_layer(screen->machine, bitmap);
PC090OJ_draw_sprites(screen->machine, bitmap, cliprect, 0);
pc090oj_draw_sprites(pc090oj, bitmap, cliprect, 0);
return 0;
}