mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Fixed Seibu Cup coin slots (nw)
This commit is contained in:
parent
71053ad9dd
commit
c12afa4937
@ -777,6 +777,7 @@ static INPUT_PORTS_START( grainbow )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( denjinmk )
|
||||
// SEIBU_COIN_INPUTS override
|
||||
PORT_START("COIN") /* coin inputs read through sound cpu, an impulse of 4 frame is too much for this game, especially for coin 2 */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(2)
|
||||
@ -892,13 +893,23 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( cupsoc )
|
||||
SEIBU_COIN_INPUTS /* coin inputs read through sound cpu */
|
||||
// TODO: dip-conditional with coin slots
|
||||
// SEIBU_COIN_INPUTS override
|
||||
PORT_START("COIN")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) //TEST
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE2 )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START3 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START4 )
|
||||
@ -912,7 +923,7 @@ static INPUT_PORTS_START( cupsoc )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
@ -920,7 +931,7 @@ static INPUT_PORTS_START( cupsoc )
|
||||
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_COIN2 )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("PLAYERS34")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
|
||||
@ -930,7 +941,7 @@ static INPUT_PORTS_START( cupsoc )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) //TEST
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) // p3 coin slot
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
|
||||
@ -938,7 +949,7 @@ static INPUT_PORTS_START( cupsoc )
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) // p4 coin slot
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0007, 0x0007, "Coin 1 (3)" )
|
||||
|
@ -50,7 +50,7 @@
|
||||
- palette dims too much on attract / continue screen.
|
||||
It's known that the DMA data arrangement gives same results on a real Legionnaire board, so shrug?
|
||||
|
||||
Tech notes (to move into mainpage):
|
||||
Tech notes (to move into own file with doxy mainpage):
|
||||
-----------
|
||||
[0x6fc] DMA mode bit scheme:
|
||||
---1 ---1 ---- ---- fill op if true, else transfer
|
||||
@ -58,6 +58,14 @@
|
||||
---- ---- ---x ---- internal buffer selector
|
||||
---- ---- ---- x--- size modifier? Bus transfer size actually?
|
||||
---- ---- ---- -xxx select channel
|
||||
|
||||
work RAM object structure (in seibu cup soccer)
|
||||
all object have a [0x40] boundary
|
||||
[0x04-0x07] Y position
|
||||
[0x08-0x0b] X position
|
||||
[0x10-0x13] Y offset (a.k.a. calculated sine)
|
||||
[0x14-0x17] X offset (a.k.a. calculated cosine)
|
||||
[0x37] angle direction
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -727,12 +735,14 @@ WRITE16_MEMBER(raiden2cop_device::cop_dma_trigger_w)
|
||||
case 0x85:
|
||||
case 0x86:
|
||||
case 0x87:
|
||||
{ dma_palette_brightness();
|
||||
{
|
||||
dma_palette_brightness();
|
||||
break;
|
||||
}
|
||||
|
||||
/********************************************************************************************************************/
|
||||
case 0x09: {
|
||||
case 0x09:
|
||||
{
|
||||
UINT32 src, dst, size;
|
||||
int i;
|
||||
|
||||
@ -1459,8 +1469,8 @@ WRITE16_MEMBER(raiden2cop_device::LEGACY_cop_cmd_w)
|
||||
|
||||
if (check_command_matches(command, 0xb80, 0xb82, 0xb84, 0xb86, 0x000, 0x000, 0x000, 0x000, funcval, funcmask))
|
||||
{
|
||||
execute_a100(offset, data);
|
||||
executed = 1;
|
||||
execute_a100(offset, data);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1505,8 +1515,6 @@ WRITE16_MEMBER(raiden2cop_device::LEGACY_cop_cmd_w)
|
||||
|
||||
// cupsoc 1b | 5 | 7ff7 | dde5 | f80 aa2 984 0c2
|
||||
/* radar x/y positions */
|
||||
/* FIXME: x/ys are offsetted */
|
||||
/* FIXME: uses 0x10044a for something */
|
||||
if (check_command_matches(command, 0xf80, 0xaa2, 0x984, 0x0c2, 0x000, 0x000, 0x000, 0x000, 5, 0x7ff7))
|
||||
{
|
||||
executed = 1;
|
||||
@ -1548,12 +1556,40 @@ WRITE16_MEMBER(raiden2cop_device::LEGACY_cop_cmd_w)
|
||||
LEGACY_execute_d104(offset, data);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
[:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 50 a80 15.0.00 [:raiden2cop] sub32 (r0)
|
||||
[:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 51 984 13.0.04 [:raiden2cop] write16h 8(r0)
|
||||
[:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 52 082 01.0.02 [:raiden2cop] addmem32 4(r0)
|
||||
*/
|
||||
|
||||
if (check_command_matches(command, 0xa80, 0x984, 0x082, 0x000, 0x000, 0x000, 0x000, 0x000, 5, 0xfefb))
|
||||
{
|
||||
//executed = 1;
|
||||
printf("5105\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
[:raiden2cop] COPDIS: 5905 s=58 f1=0 l=3 f2=05 5 fffb 58 9c8 13.2.08 [:raiden2cop] write16h 10(r2)
|
||||
[:raiden2cop] COPDIS: 5905 s=58 f1=0 l=3 f2=05 5 fffb 59 a84 15.0.04 [:raiden2cop] sub32 8(r0)
|
||||
[:raiden2cop] COPDIS: 5905 s=58 f1=0 l=3 f2=05 5 fffb 5a 0a2 01.1.02 [:raiden2cop] addmem32 4(r1)*/
|
||||
|
||||
if (check_command_matches(command, 0x9c8, 0xa84, 0x0a2, 0x000, 0x000, 0x000, 0x000, 0x000, 5, 0xfffb))
|
||||
{
|
||||
//executed = 1;
|
||||
printf("5905\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// player to ball collision
|
||||
if (check_command_matches(command, 0xa88, 0x994, 0x088, 0x000, 0x000, 0x000, 0x000, 0x000, 5, 0xfefb))
|
||||
{
|
||||
execute_f105(offset,data);
|
||||
return;
|
||||
}
|
||||
|
||||
if (executed == 0)
|
||||
{
|
||||
if(data == 0xf105) // cupsoc transition from presentation to kick off
|
||||
return;
|
||||
|
||||
printf("did not execute %04x\n", data); // cup soccer triggers this a lot (and others)
|
||||
}
|
||||
}
|
||||
|
@ -245,8 +245,9 @@ private:
|
||||
void execute_a900(int offset, UINT16 data);
|
||||
void execute_b100(int offset, UINT16 data);
|
||||
void execute_b900(int offset, UINT16 data);
|
||||
void execute_f105(int offset, UINT16 data);
|
||||
|
||||
// TODO: remove these
|
||||
// TODO: remove/rename these
|
||||
//void LEGACY_execute_130e(int offset, UINT16 data);
|
||||
void LEGACY_execute_130e_cupsoc(int offset, UINT16 data);
|
||||
//void LEGACY_execute_3b30(int offset, UINT16 data);
|
||||
@ -257,7 +258,7 @@ private:
|
||||
void LEGACY_execute_d104(int offset, UINT16 data);
|
||||
void LEGACY_execute_6980(int offset, UINT16 data);
|
||||
void LEGACY_execute_c480(int offset, UINT16 data);
|
||||
|
||||
|
||||
void cop_collision_update_hitbox(UINT16 data, int slot, UINT32 hitadr);
|
||||
void bcd_update();
|
||||
|
||||
|
@ -584,14 +584,16 @@ void raiden2cop_device::LEGACY_execute_dde5(int offset, UINT16 data)
|
||||
1c - e38e ( 1c) ( 38e) : (984, ac4, d82, ac2, 39b, b9a, b9a, a9a) 5 b07f (cupsoc, grainbow)
|
||||
1c - e105 ( 1c) ( 105) : (a88, 994, 088, 000, 000, 000, 000, 000) 5 06fb (zeroteam, xsedae)
|
||||
*/
|
||||
|
||||
// controls GK position, aligned to the ball position
|
||||
void raiden2cop_device::LEGACY_execute_e30e(int offset, UINT16 data)
|
||||
{
|
||||
{
|
||||
int dy = m_host_space->read_dword(cop_regs[2] + 4) - m_host_space->read_dword(cop_regs[0] + 4);
|
||||
int dx = m_host_space->read_dword(cop_regs[2] + 8) - m_host_space->read_dword(cop_regs[0] + 8);
|
||||
|
||||
|
||||
cop_status = 7;
|
||||
if (!dx) {
|
||||
if (!dx)
|
||||
{
|
||||
cop_status |= 0x8000;
|
||||
cop_angle = 0;
|
||||
}
|
||||
@ -599,15 +601,17 @@ void raiden2cop_device::LEGACY_execute_e30e(int offset, UINT16 data)
|
||||
cop_angle = (int)(atan(double(dy) / double(dx)) * 128.0 / M_PI);
|
||||
if (dx < 0)
|
||||
cop_angle += 0x80;
|
||||
|
||||
cop_angle &= 0xff;
|
||||
}
|
||||
|
||||
#if LOG_Phytagoras
|
||||
printf("cmd %04x: dx = %d dy = %d angle = %02x %04x\n",data,dx,dy,cop_angle);
|
||||
#endif
|
||||
|
||||
m_LEGACY_r0 = dy;
|
||||
m_LEGACY_r1 = dx;
|
||||
|
||||
//printf("%d %d %f %04x\n",dx,dy,atan(double(dy)/double(dx)) * 128 / M_PI,cop_angle);
|
||||
|
||||
if (data & 0x80)
|
||||
m_host_space->write_word(cop_regs[0] + (0x34 ^ 2), cop_angle);
|
||||
// TODO: byte or word?
|
||||
if (data & 0x0080)
|
||||
cop_write_byte(cop_regs[0] + 0x34, cop_angle);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -633,6 +637,18 @@ void raiden2cop_device::execute_f205(int offset, UINT16 data)
|
||||
1f - fc84 ( 1f) ( 484) : (182, 280, 000, 000, 000, 000, 000, 000) 6 00ff (zeroteam, xsedae)
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
[:raiden2cop] COPDIS: f105 s=f0 f1=0 l=3 f2=05 5 fefb f0 a88 15.0.08 [:raiden2cop] sub32 10(r0)
|
||||
[:raiden2cop] COPDIS: f105 s=f0 f1=0 l=3 f2=05 5 fefb f1 994 13.0.14 [:raiden2cop] write16h 28(r0)
|
||||
[:raiden2cop] COPDIS: f105 s=f0 f1=0 l=3 f2=05 5 fefb f2 088 01.0.08 [:raiden2cop] addmem32 10(r0)
|
||||
*/
|
||||
// seibu cup soccer, before cosine (ball dribbling actually?)
|
||||
void raiden2cop_device::execute_f105(int offset, UINT16 data)
|
||||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
#ifdef UNUSED_COMMANDS
|
||||
|
||||
// For reference only, will be nuked at some point
|
||||
|
Loading…
Reference in New Issue
Block a user