diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c index 79db28c4ddb..40017f3e57e 100644 --- a/src/mame/drivers/kaneko16.c +++ b/src/mame/drivers/kaneko16.c @@ -229,6 +229,17 @@ static MACHINE_RESET( shogwarr ) { MACHINE_RESET_CALL(kaneko16); + kaneko16_sprite_xoffs = 0xa00; + + kaneko16_sprite_yoffs = 0x200; + + + kaneko16_priority.sprite[0] = 2; // below all + kaneko16_priority.sprite[1] = 3; // above tile[0], below the others + kaneko16_priority.sprite[2] = 5; // above all + kaneko16_priority.sprite[3] = 7; // "" + kaneko16_priority.VIEW2_2_pri = 0; + calc3_mcu_init(); } @@ -1496,8 +1507,8 @@ static INPUT_PORTS_START( shogwarr ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_START("P2") /* b80002.w */ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) @@ -1506,18 +1517,18 @@ static INPUT_PORTS_START( shogwarr ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START("SYSTEM") /* b80004.w */ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) - PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("UNK") /* ? - b80006.w */ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1981,8 +1992,8 @@ static INTERRUPT_GEN( shogwarr_interrupt ) case 1: cpu_set_input_line(device, 3, HOLD_LINE); break; // the code for this interupt is provided by the MCU.. - //case 0: cpu_set_input_line(device, 4, HOLD_LINE); break; - case 0: + case 0: cpu_set_input_line(device, 4, HOLD_LINE); break; + /*case 0: { // hack, clear this ram address to get into test mode (interrupt would clear it) if (kaneko16_mainram[0x2dfe/2]==0xff00) @@ -1990,7 +2001,7 @@ static INTERRUPT_GEN( shogwarr_interrupt ) kaneko16_mainram[0x2dfe/2]=0x0000; } - } + }*/ } } @@ -2009,7 +2020,7 @@ static MACHINE_DRIVER_START( shogwarr ) MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) MDRV_SCREEN_SIZE(320, 240) - MDRV_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1) + MDRV_SCREEN_VISIBLE_AREA(40, 296-1, 0, 240-1) MDRV_GFXDECODE(1x4bit_1x4bit) MDRV_PALETTE_LENGTH(2048) @@ -3190,7 +3201,7 @@ ROM_START( shogwarr ) ROM_REGION( 0x020000, "cpu1", 0 ) /* MCU Code */ ROM_LOAD( "fb040a.u33", 0x000000, 0x020000, CRC(4b62c4d9) SHA1(35c943dde70438a411714070e42a84366db5ef83) ) - ROM_REGION( 0x600000, "gfx1", 0 ) /* Sprites */ + ROM_REGION( 0x1000000, "gfx1", 0 ) /* Sprites */ /* not sure these are all correct size */ ROM_LOAD( "fb020a.u1", 0x000000, 0x080000, CRC(da1b7373) SHA1(89510901848f1798fb76dd82d1cd9ac97c41521d) ) ROM_LOAD( "fb022a.u5", 0x080000, 0x080000, CRC(60aa1282) SHA1(4648816016e00df3256226ba5134f6e5bb429909) ) ROM_LOAD( "fb020b.u2", 0x100000, 0x100000, CRC(276b9d7b) SHA1(7a154f65b4737f2b6ac8effa3352711079f571dc) ) @@ -3792,6 +3803,7 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, { // shogwarr does this with 'mode' as 0x08, which probably has some special meaning //printf("CALC3: requested 0 length table!\n"); + // -- seems to be 'reset stack' to default for the protection table writes } if (inline_table_size) @@ -3799,7 +3811,26 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, for (i=0;i>1]; + + } + + + } + dstram[(dstoffset+i)^1] = dat; } } @@ -3816,8 +3847,110 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, for (i=0;i