mirror of
https://github.com/holub/mame
synced 2025-05-29 09:03:08 +03:00
Various improvements to Parent Jack driver.
This commit is contained in:
parent
2f3a715a85
commit
0d71c2d7c8
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -1859,7 +1859,6 @@ src/mame/drivers/pangofun.c svneol=native#text/plain
|
||||
src/mame/drivers/panicr.c svneol=native#text/plain
|
||||
src/mame/drivers/paradise.c svneol=native#text/plain
|
||||
src/mame/drivers/paranoia.c svneol=native#text/plain
|
||||
src/mame/drivers/parentj.c svneol=native#text/plain
|
||||
src/mame/drivers/parodius.c svneol=native#text/plain
|
||||
src/mame/drivers/pasha2.c svneol=native#text/plain
|
||||
src/mame/drivers/pass.c svneol=native#text/plain
|
||||
@ -2093,6 +2092,7 @@ src/mame/drivers/taito_f2.c svneol=native#text/plain
|
||||
src/mame/drivers/taito_f3.c svneol=native#text/plain
|
||||
src/mame/drivers/taito_h.c svneol=native#text/plain
|
||||
src/mame/drivers/taito_l.c svneol=native#text/plain
|
||||
src/mame/drivers/taito_o.c svneol=native#text/plain
|
||||
src/mame/drivers/taito_x.c svneol=native#text/plain
|
||||
src/mame/drivers/taito_z.c svneol=native#text/plain
|
||||
src/mame/drivers/taitoair.c svneol=native#text/plain
|
||||
@ -3465,6 +3465,7 @@ src/mame/video/taito_f2.c svneol=native#text/plain
|
||||
src/mame/video/taito_f3.c svneol=native#text/plain
|
||||
src/mame/video/taito_h.c svneol=native#text/plain
|
||||
src/mame/video/taito_l.c svneol=native#text/plain
|
||||
src/mame/video/taito_o.c svneol=native#text/plain
|
||||
src/mame/video/taito_z.c svneol=native#text/plain
|
||||
src/mame/video/taitoair.c svneol=native#text/plain
|
||||
src/mame/video/taitoic.c svneol=native#text/plain
|
||||
|
@ -1,127 +0,0 @@
|
||||
/* Taito
|
||||
'Parent Jack'
|
||||
(Medal Game)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "driver.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
|
||||
static UINT16* parentj_video;
|
||||
|
||||
static VIDEO_START(parentj)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
static VIDEO_UPDATE(parentj)
|
||||
{
|
||||
const gfx_element *gfx = screen->machine->gfx[0];
|
||||
int count = 0x0c000/2;
|
||||
|
||||
int y,x;
|
||||
|
||||
|
||||
for (y=0;y<64;y++)
|
||||
{
|
||||
for (x=0;x<64;x++)
|
||||
{
|
||||
int tile = parentj_video[count];
|
||||
//int colour = tile>>12;
|
||||
drawgfx(bitmap,gfx,tile,9,0,0,x*16,y*16,cliprect,TRANSPARENCY_NONE,0);
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( parentj_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x01ffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x103fff) AM_RAM
|
||||
|
||||
|
||||
AM_RANGE(0x200004, 0x200005) AM_WRITENOP
|
||||
|
||||
AM_RANGE(0x400000, 0x41ffff) AM_RAM AM_BASE(&parentj_video)
|
||||
|
||||
AM_RANGE(0x500800, 0x500fff) AM_RAM AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16)
|
||||
|
||||
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
|
||||
static const gfx_layout parentj_layout =
|
||||
{
|
||||
16,16,
|
||||
RGN_FRAC(1,8),
|
||||
4,
|
||||
{ 0,1,2,3 },
|
||||
{ RGN_FRAC(7,8)+4, RGN_FRAC(7,8)+0,
|
||||
RGN_FRAC(6,8)+4, RGN_FRAC(6,8)+0,
|
||||
RGN_FRAC(5,8)+4, RGN_FRAC(5,8)+0,
|
||||
RGN_FRAC(4,8)+4, RGN_FRAC(4,8)+0,
|
||||
RGN_FRAC(3,8)+4, RGN_FRAC(3,8)+0,
|
||||
RGN_FRAC(2,8)+4, RGN_FRAC(2,8)+0,
|
||||
RGN_FRAC(1,8)+4, RGN_FRAC(1,8)+0,
|
||||
RGN_FRAC(0,8)+4, RGN_FRAC(0,8)+0
|
||||
},
|
||||
{ 0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120},
|
||||
|
||||
1*128
|
||||
};
|
||||
|
||||
static GFXDECODE_START( parentj )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, parentj_layout, 0x0, 0x400/16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( parentj )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static MACHINE_DRIVER_START( parentj )
|
||||
MDRV_CPU_ADD("maincpu", M68000, 16000000) // ?
|
||||
MDRV_CPU_PROGRAM_MAP(parentj_map,0)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq4_line_hold) // 4/5/6 valid?
|
||||
|
||||
MDRV_GFXDECODE(parentj)
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(64*16, 64*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(32*16, 64*16-1, 0*16, 32*16-1)
|
||||
|
||||
MDRV_PALETTE_LENGTH(0x400)
|
||||
|
||||
MDRV_VIDEO_START(parentj)
|
||||
MDRV_VIDEO_UPDATE(parentj)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
ROM_START( parentj )
|
||||
ROM_REGION( 0x20000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_LOAD16_BYTE( "c42-13.21", 0x00000, 0x10000, CRC(823623eb) SHA1(7302cc0ac532f6190ae35218ea05bf8cf11fd687) )
|
||||
ROM_LOAD16_BYTE( "c42-12.20", 0x00001, 0x10000, CRC(8654b0ab) SHA1(edd23a731c1c60cab353e51ef5e66d33bc3fde61) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx1", 0 )
|
||||
ROM_LOAD( "c42-05.06", 0x00000, 0x20000, CRC(7af0d45d) SHA1(bc527b74185596e4e77b34d08eb3e1678614b451) )
|
||||
ROM_LOAD( "c42-04.05", 0x20000, 0x20000, CRC(133009a1) SHA1(fae5dd600384790225c24a62d1f8a00f0366dae9) )
|
||||
ROM_LOAD( "c42-09.13", 0x40000, 0x20000, CRC(ba35fb03) SHA1(b76e50d298ccc0f230c865b563cd8e02866a4ffb) )
|
||||
ROM_LOAD( "c42-08.12", 0x60000, 0x20000, CRC(7fae35a7) SHA1(f4bc6c6fd4afc167eb36b8f16589e1bfd729085e) )
|
||||
ROM_LOAD( "c42-07.10", 0x80000, 0x20000, CRC(f92c6f03) SHA1(ff42318ee425b423b67e2cec1fe3ef9d9785ebf6) )
|
||||
ROM_LOAD( "c42-06.09", 0xa0000, 0x20000, CRC(3685febd) SHA1(637946377f6d934f791d52e9790c91f60a5b2c65) )
|
||||
ROM_LOAD( "c42-11.17", 0xc0000, 0x20000, CRC(5d8d3c59) SHA1(c8a8a957ac9f2f1c346b4504495893c71fbfe14b) )
|
||||
ROM_LOAD( "c42-10.16", 0xe0000, 0x20000, CRC(e85e536e) SHA1(9ed9e316869333338e39cb0d1293e3380861a3ca) )
|
||||
|
||||
ROM_REGION( 0x2dd, "misc", 0 )
|
||||
ROM_LOAD( "ampal22v10a-0233.c42", 0x000, 0x2dd, CRC(0c030a81) SHA1(0f8198df2cb046683d2db9ac8e609cdff53083ed) )
|
||||
ROM_END
|
||||
|
||||
GAME( 1989, parentj, 0, parentj, parentj, 0, ROT0, "Taito", "Parent Jack", GAME_NOT_WORKING|GAME_NO_SOUND )
|
284
src/mame/drivers/taito_o.c
Normal file
284
src/mame/drivers/taito_o.c
Normal file
@ -0,0 +1,284 @@
|
||||
/***************************************************************
|
||||
|
||||
Taito 'O System'
|
||||
-------------------
|
||||
|
||||
Taito gambling hardware, very similar to H system.
|
||||
|
||||
Board specs (based on poor quality pic):
|
||||
|
||||
68000
|
||||
YM2203
|
||||
4 custom Taito chips ( TC0080VCO? TC0070RGB? )
|
||||
Custom (non JAMMA) connector
|
||||
Battery
|
||||
|
||||
|
||||
Games :
|
||||
|
||||
Parent Jack (C) 1989 Taito
|
||||
|
||||
TODO:
|
||||
|
||||
- inputs (coins)
|
||||
- NVRAM
|
||||
- sprite priorities
|
||||
- dips
|
||||
- interrupts (sources) - valid levels 4,5,6(hop empty?)
|
||||
|
||||
*****************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "video/taitoic.h"
|
||||
#include "sound/2203intf.h"
|
||||
|
||||
static const int clear_hack=1;
|
||||
|
||||
VIDEO_START( parentj );
|
||||
VIDEO_UPDATE( parentj );
|
||||
|
||||
static WRITE16_HANDLER(io_w)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
case 2: watchdog_reset(space->machine); break;
|
||||
|
||||
default: logerror("IO W %x %x %x\n",offset,data,mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
static READ16_HANDLER(io_r)
|
||||
{
|
||||
int retval=0;
|
||||
switch(offset)
|
||||
{
|
||||
case 0: retval=input_port_read(space->machine, "IN0")&(clear_hack?0xf7ff:0xffff);break;
|
||||
case 1: retval=input_port_read(space->machine, "IN1")&(clear_hack?0xfff7:0xffff);break;
|
||||
default: logerror("IO R %x %x = %x @ %x\n",offset,mem_mask,retval,cpu_get_pc(space->cpu));
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( parentj_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x01ffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM
|
||||
AM_RANGE(0x200000, 0x20000f) AM_READWRITE(io_r, io_w) /* TC0220IOC ? */
|
||||
AM_RANGE(0x300000, 0x300003) AM_DEVREADWRITE8("ym", ym2203_r, ym2203_w, 0x00ff)
|
||||
AM_RANGE(0x400000, 0x420fff) AM_READWRITE(TC0080VCO_word_r, TC0080VCO_word_w)
|
||||
AM_RANGE(0x500800, 0x500fff) AM_RAM AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( parentj )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("Bet 1")
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("Bet 2")
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("Bet 3")
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("Bet 4")
|
||||
|
||||
PORT_DIPNAME(0x0010, 0x10, "IN0 4")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_F) PORT_NAME("Payout")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_D) PORT_NAME("Check")
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_A) PORT_NAME("Deal/Hit")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_S) PORT_NAME("Double")
|
||||
PORT_DIPNAME(0x000400, 0x400, "IN0 a")
|
||||
PORT_DIPSETTING( 0x400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_J) PORT_NAME("Reset")
|
||||
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_Q) PORT_NAME("Last Key")
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_W) PORT_NAME("Meter Key")
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_E) PORT_NAME("Opto 1H")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("Opto 1L")
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_U) PORT_NAME("Hop Over")
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_T) PORT_NAME("Opto 2H")
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_Y) PORT_NAME("Opto 2L")
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_I) PORT_NAME("All Clear")
|
||||
|
||||
PORT_DIPNAME(0x0010, 0x10, "Test Mode") /* sometimes */
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x000, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0020, 0x20, "IN1 5")
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0040, 0x40, "IN1 6")
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0080, 0x80, "IN1 7")
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x000100, 0x000, "Battery test?")
|
||||
PORT_DIPSETTING( 0x000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x100, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_O) PORT_NAME("Pay Out")
|
||||
PORT_DIPNAME(0x000400, 0x400, "IN1 a")
|
||||
PORT_DIPSETTING( 0x400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x000, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x000800, 0x800, "IN1 b")
|
||||
PORT_DIPSETTING( 0x800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x000, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x001000, 0x1000, "IN1 c")
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x002000, 0x2000, "IN1 d")
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x004000, 0x4000, "IN1 e")
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x008000, 0x8000, "IN1 f")
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSWA")
|
||||
PORT_DIPNAME(0x0001, 0x00, "DSWA 0")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0002, 0x00, "DSWA 1")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0004, 0x00, "DSWA 2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0008, 0x00, "DSWA 3")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0010, 0x00, "DSWA 4")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x010, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0020, 0x00, "DSWA 5")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x020, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0040, 0x00, "DSWA 6")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x040, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0080, 0x00, "DSWA 7")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x080, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSWB")
|
||||
PORT_DIPNAME(0x0001, 0x00, "Credits at start")
|
||||
PORT_DIPSETTING( 0x00, "500" )
|
||||
PORT_DIPSETTING( 0x01, "0" )
|
||||
PORT_DIPNAME(0x0002, 0x00, "DSWB 1")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0004, 0x00, "DSWB 2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0008, 0x00, "DSWB 3")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0010, 0x00, "DSWB 4")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x010, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0020, 0x00, "DSWB 5")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x020, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0040, 0x00, "DSWB 6")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x040, DEF_STR( On ) )
|
||||
PORT_DIPNAME(0x0080, 0x00, "DSWB 7")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x080, DEF_STR( On ) )
|
||||
|
||||
INPUT_PORTS_END
|
||||
|
||||
static const gfx_layout parentj_layout =
|
||||
{
|
||||
16,16,
|
||||
RGN_FRAC(1,8),
|
||||
4,
|
||||
{ 0,1,2,3 },
|
||||
{ RGN_FRAC(7,8)+4, RGN_FRAC(7,8)+0,
|
||||
RGN_FRAC(6,8)+4, RGN_FRAC(6,8)+0,
|
||||
RGN_FRAC(5,8)+4, RGN_FRAC(5,8)+0,
|
||||
RGN_FRAC(4,8)+4, RGN_FRAC(4,8)+0,
|
||||
RGN_FRAC(3,8)+4, RGN_FRAC(3,8)+0,
|
||||
RGN_FRAC(2,8)+4, RGN_FRAC(2,8)+0,
|
||||
RGN_FRAC(1,8)+4, RGN_FRAC(1,8)+0,
|
||||
RGN_FRAC(0,8)+4, RGN_FRAC(0,8)+0
|
||||
},
|
||||
{ 0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120},
|
||||
|
||||
1*128
|
||||
};
|
||||
|
||||
static GFXDECODE_START( parentj )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, parentj_layout, 0x0, 0x400/16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static INTERRUPT_GEN( parentj_interrupt )
|
||||
{
|
||||
cpu_set_input_line(device, cpu_getiloops(device)?4:5 , HOLD_LINE);
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
{
|
||||
{
|
||||
AY8910_LEGACY_OUTPUT,
|
||||
AY8910_DEFAULT_LOADS,
|
||||
DEVCB_INPUT_PORT("DSWA"),DEVCB_INPUT_PORT("DSWB"),
|
||||
DEVCB_NULL, DEVCB_NULL,
|
||||
},
|
||||
NULL
|
||||
};
|
||||
|
||||
static MACHINE_DRIVER_START( parentj )
|
||||
|
||||
|
||||
MDRV_CPU_ADD("maincpu", M68000,12000000 ) /*?? MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(parentj_map,0)
|
||||
MDRV_CPU_VBLANK_INT_HACK(parentj_interrupt,2)
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(64*16, 64*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*16, 32*16-1, 3*16, 31*16-1)
|
||||
|
||||
MDRV_GFXDECODE(parentj)
|
||||
MDRV_PALETTE_LENGTH(33*16)
|
||||
|
||||
MDRV_VIDEO_START(parentj)
|
||||
MDRV_VIDEO_UPDATE(parentj)
|
||||
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD("ym", YM2203, 2000000) /*?? MHz */
|
||||
MDRV_SOUND_CONFIG(ym2203_config)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.25)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.25)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 1.0)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 1.0)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
ROM_START( parentj )
|
||||
ROM_REGION( 0x20000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_LOAD16_BYTE( "c42-13.21", 0x00000, 0x10000, CRC(823623eb) SHA1(7302cc0ac532f6190ae35218ea05bf8cf11fd687) )
|
||||
ROM_LOAD16_BYTE( "c42-12.20", 0x00001, 0x10000, CRC(8654b0ab) SHA1(edd23a731c1c60cab353e51ef5e66d33bc3fde61) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx1", 0 )
|
||||
ROM_LOAD( "c42-05.06", 0x00000, 0x20000, CRC(7af0d45d) SHA1(bc527b74185596e4e77b34d08eb3e1678614b451) )
|
||||
ROM_LOAD( "c42-04.05", 0x20000, 0x20000, CRC(133009a1) SHA1(fae5dd600384790225c24a62d1f8a00f0366dae9) )
|
||||
ROM_LOAD( "c42-09.13", 0x40000, 0x20000, CRC(ba35fb03) SHA1(b76e50d298ccc0f230c865b563cd8e02866a4ffb) )
|
||||
ROM_LOAD( "c42-08.12", 0x60000, 0x20000, CRC(7fae35a7) SHA1(f4bc6c6fd4afc167eb36b8f16589e1bfd729085e) )
|
||||
ROM_LOAD( "c42-07.10", 0x80000, 0x20000, CRC(f92c6f03) SHA1(ff42318ee425b423b67e2cec1fe3ef9d9785ebf6) )
|
||||
ROM_LOAD( "c42-06.09", 0xa0000, 0x20000, CRC(3685febd) SHA1(637946377f6d934f791d52e9790c91f60a5b2c65) )
|
||||
ROM_LOAD( "c42-11.17", 0xc0000, 0x20000, CRC(5d8d3c59) SHA1(c8a8a957ac9f2f1c346b4504495893c71fbfe14b) )
|
||||
ROM_LOAD( "c42-10.16", 0xe0000, 0x20000, CRC(e85e536e) SHA1(9ed9e316869333338e39cb0d1293e3380861a3ca) )
|
||||
|
||||
ROM_REGION( 0x2dd, "misc", 0 )
|
||||
ROM_LOAD( "ampal22v10a-0233.c42", 0x000, 0x2dd, CRC(0c030a81) SHA1(0f8198df2cb046683d2db9ac8e609cdff53083ed) )
|
||||
ROM_END
|
||||
|
||||
GAME( 1989, parentj, 0, parentj, parentj, 0, ROT0, "Taito", "Parent Jack", GAME_NOT_WORKING)
|
@ -1275,7 +1275,6 @@ $(MAMEOBJ)/taito.a: \
|
||||
$(DRIVERS)/nycaptor.o $(MACHINE)/nycaptor.o $(VIDEO)/nycaptor.o \
|
||||
$(DRIVERS)/opwolf.o $(MACHINE)/opwolf.o \
|
||||
$(DRIVERS)/othunder.o $(VIDEO)/othunder.o \
|
||||
$(DRIVERS)/parentj.o \
|
||||
$(DRIVERS)/pitnrun.o $(MACHINE)/pitnrun.o $(VIDEO)/pitnrun.o \
|
||||
$(DRIVERS)/qix.o $(MACHINE)/qix.o $(AUDIO)/qix.o $(VIDEO)/qix.o \
|
||||
$(DRIVERS)/rainbow.o $(MACHINE)/rainbow.o \
|
||||
@ -1294,6 +1293,7 @@ $(MAMEOBJ)/taito.a: \
|
||||
$(DRIVERS)/taito_l.o $(VIDEO)/taito_l.o \
|
||||
$(DRIVERS)/taito_x.o $(MACHINE)/cchip.o \
|
||||
$(DRIVERS)/taito_z.o $(VIDEO)/taito_z.o \
|
||||
$(DRIVERS)/taito_o.o $(VIDEO)/taito_o.o \
|
||||
$(DRIVERS)/taitoair.o $(VIDEO)/taitoair.o \
|
||||
$(DRIVERS)/taitojc.o $(VIDEO)/taitojc.o \
|
||||
$(DRIVERS)/taitopjc.o $\
|
||||
|
157
src/mame/video/taito_o.c
Normal file
157
src/mame/video/taito_o.c
Normal file
@ -0,0 +1,157 @@
|
||||
/***************************************************************************
|
||||
|
||||
Based on taito_h.c
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "taitoic.h"
|
||||
|
||||
|
||||
/* These are hand-tuned values */
|
||||
static const int zoomy_conv_table[] =
|
||||
{
|
||||
/* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */
|
||||
0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b, /* 0x00 */
|
||||
0x0b,0x0c,0x0c,0x0d,0x0e,0x0e,0x0f,0x10, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x16,
|
||||
0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e, 0x1f,0x20,0x21,0x22,0x24,0x25,0x26,0x27,
|
||||
0x28,0x2a,0x2b,0x2c,0x2e,0x30,0x31,0x32, 0x34,0x36,0x37,0x38,0x3a,0x3c,0x3e,0x3f,
|
||||
|
||||
0x40,0x41,0x42,0x42,0x43,0x43,0x44,0x44, 0x45,0x45,0x46,0x46,0x47,0x47,0x48,0x49, /* 0x40 */
|
||||
0x4a,0x4a,0x4b,0x4b,0x4c,0x4d,0x4e,0x4f, 0x4f,0x50,0x51,0x51,0x52,0x53,0x54,0x55,
|
||||
0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d, 0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x66,
|
||||
0x67,0x68,0x6a,0x6b,0x6c,0x6e,0x6f,0x71, 0x72,0x74,0x76,0x78,0x80,0x7b,0x7d,0x7f
|
||||
};
|
||||
|
||||
VIDEO_START( parentj )
|
||||
{
|
||||
TC0080VCO_vh_start(machine,0,0,1,1,-2);
|
||||
}
|
||||
|
||||
|
||||
static void parentj_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int priority)
|
||||
{
|
||||
/* Y chain size is 16/32?/64/64? pixels. X chain size
|
||||
is always 64 pixels. */
|
||||
|
||||
static const int size[] = { 1, 2, 4, 4 };
|
||||
int x0, y0, x, y, dx, dy, ex, ey, zx, zy;
|
||||
int ysize;
|
||||
int j, k;
|
||||
int offs; /* sprite RAM offset */
|
||||
int tile_offs; /* sprite chain offset */
|
||||
int zoomx, zoomy; /* zoom value */
|
||||
|
||||
for (offs = 0x03f8 / 2 ; offs >= 0 ; offs -= 0x008 / 2)
|
||||
{
|
||||
if (offs < 0x01b0 && priority == 0) continue;
|
||||
if (offs >= 0x01b0 && priority == 1) continue;
|
||||
|
||||
x0 = TC0080VCO_spriteram[offs + 1] & 0x3ff;
|
||||
y0 = TC0080VCO_spriteram[offs + 0] & 0x3ff;
|
||||
zoomx = (TC0080VCO_spriteram[offs + 2] & 0x7f00) >> 8;
|
||||
zoomy = (TC0080VCO_spriteram[offs + 2] & 0x007f);
|
||||
tile_offs = (TC0080VCO_spriteram[offs + 3] & 0x1fff) << 2;
|
||||
ysize = size[ ( TC0080VCO_spriteram[ offs ] & 0x0c00 ) >> 10 ];
|
||||
|
||||
if (tile_offs)
|
||||
{
|
||||
/* Convert zoomy value to real value as zoomx */
|
||||
zoomy = zoomy_conv_table[zoomy];
|
||||
|
||||
if (zoomx < 63)
|
||||
{
|
||||
dx = 8 + (zoomx + 2) / 8;
|
||||
ex = (zoomx + 2) % 8;
|
||||
zx = ((dx << 1) + ex) << 11;
|
||||
}
|
||||
else
|
||||
{
|
||||
dx = 16 + (zoomx - 63) / 4;
|
||||
ex = (zoomx - 63) % 4;
|
||||
zx = (dx + ex) << 12;
|
||||
}
|
||||
|
||||
if (zoomy < 63)
|
||||
{
|
||||
dy = 8 + (zoomy + 2) / 8;
|
||||
ey = (zoomy + 2) % 8;
|
||||
zy = ((dy << 1) + ey) << 11;
|
||||
}
|
||||
else
|
||||
{
|
||||
dy = 16 + (zoomy - 63) / 4;
|
||||
ey = (zoomy - 63) % 4;
|
||||
zy = (dy + ey) << 12;
|
||||
}
|
||||
|
||||
if (x0 >= 0x200) x0 -= 0x400;
|
||||
if (y0 >= 0x200) y0 -= 0x400;
|
||||
|
||||
if (TC0080VCO_flipscreen)
|
||||
{
|
||||
x0 = 497 - x0;
|
||||
y0 = 498 - y0;
|
||||
dx = -dx;
|
||||
dy = -dy;
|
||||
}
|
||||
else
|
||||
{
|
||||
x0 += 1;
|
||||
y0 += 2;
|
||||
}
|
||||
|
||||
y = y0;
|
||||
for (j = 0 ; j < ysize ; j ++)
|
||||
{
|
||||
x = x0;
|
||||
for (k = 0 ; k < 4 ; k ++)
|
||||
{
|
||||
if (tile_offs >= 0x1000)
|
||||
{
|
||||
int tile, color, flipx, flipy;
|
||||
|
||||
tile = TC0080VCO_chain_ram_0[tile_offs] & 0x7fff;
|
||||
color = TC0080VCO_chain_ram_1[tile_offs] & 0x001f;
|
||||
flipx = TC0080VCO_chain_ram_1[tile_offs] & 0x0040;
|
||||
flipy = TC0080VCO_chain_ram_1[tile_offs] & 0x0080;
|
||||
|
||||
if (TC0080VCO_flipscreen)
|
||||
{
|
||||
flipx ^= 0x0040;
|
||||
flipy ^= 0x0080;
|
||||
}
|
||||
|
||||
drawgfxzoom( bitmap, machine -> gfx[0],
|
||||
tile,
|
||||
color,
|
||||
flipx, flipy,
|
||||
x, y,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, 0,
|
||||
zx, zy
|
||||
);
|
||||
}
|
||||
tile_offs ++;
|
||||
x += dx;
|
||||
}
|
||||
y += dy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VIDEO_UPDATE( parentj )
|
||||
{
|
||||
TC0080VCO_tilemap_update(screen->machine);
|
||||
bitmap_fill(bitmap, cliprect, 0);
|
||||
TC0080VCO_tilemap_draw(screen->machine,bitmap,cliprect,0,TILEMAP_DRAW_OPAQUE,0);
|
||||
parentj_draw_sprites(screen->machine,bitmap,cliprect,0);
|
||||
parentj_draw_sprites(screen->machine,bitmap,cliprect,1);
|
||||
TC0080VCO_tilemap_draw(screen->machine,bitmap,cliprect,1,0,0);
|
||||
TC0080VCO_tilemap_draw(screen->machine,bitmap,cliprect,2,0,0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user