mirror of
https://github.com/holub/mame
synced 2025-05-19 12:18:56 +03:00
Fixed sound comms in Seibu Cup Soccer sets [Angelo Salese]
This commit is contained in:
parent
85b617ef9c
commit
7839dca4a7
@ -184,6 +184,25 @@ static ADDRESS_MAP_START( cupsoc_mem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x11e000, 0x11ffff) AM_RAM /*Stack Ram*/
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cupsocs_mem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100400, 0x1007ff) AM_READWRITE(cupsocs_mcu_r,cupsocs_mcu_w) AM_BASE(&cop_mcu_ram)
|
||||
AM_RANGE(0x100800, 0x100fff) AM_RAM_WRITE(legionna_background_w) AM_BASE(&legionna_back_data)
|
||||
AM_RANGE(0x101000, 0x1017ff) AM_RAM_WRITE(legionna_foreground_w) AM_BASE(&legionna_fore_data)
|
||||
AM_RANGE(0x101800, 0x101fff) AM_RAM_WRITE(legionna_midground_w) AM_BASE(&legionna_mid_data)
|
||||
AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(legionna_text_w) AM_BASE(&legionna_textram)
|
||||
AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x104000, 0x104fff) AM_RAM
|
||||
AM_RANGE(0x105000, 0x106fff) AM_RAM
|
||||
AM_RANGE(0x107000, 0x1077ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x107800, 0x107fff) AM_RAM /*Ani Dsp(?) Ram*/
|
||||
AM_RANGE(0x108000, 0x10ffff) AM_RAM
|
||||
AM_RANGE(0x110000, 0x119fff) AM_RAM
|
||||
AM_RANGE(0x11a000, 0x11dfff) AM_RAM
|
||||
AM_RANGE(0x11e000, 0x11ffff) AM_RAM /*Stack Ram*/
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cupsocbl_mem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
//AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
@ -1236,6 +1255,10 @@ static MACHINE_CONFIG_START( cupsoc, driver_device )
|
||||
SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(14318180/4,1320000)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( cupsocs, cupsoc )
|
||||
MDRV_CPU_MODIFY("maincpu")
|
||||
MDRV_CPU_PROGRAM_MAP(cupsocs_mem)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( cupsocbl, driver_device )
|
||||
|
||||
@ -2196,8 +2219,8 @@ GAME( 1993, denjinmk, 0, denjinmk, denjinmk, denjinmk, ROT0, "Banpresto"
|
||||
|
||||
GAME( 1992, cupsoc, 0, cupsoc, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Seibu Cup Soccer (set 1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsoca, cupsoc, cupsoc, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Seibu Cup Soccer (set 2)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsocs, cupsoc, cupsoc, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Seibu Cup Soccer :Selection: (set 1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsocs2, cupsoc, cupsoc, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Seibu Cup Soccer :Selection: (set 2)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsocs, cupsoc, cupsocs, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Seibu Cup Soccer :Selection: (set 1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsocs2, cupsoc, cupsocs, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Seibu Cup Soccer :Selection: (set 2)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsocsb, cupsoc, cupsocbl, cupsoc, cupsoc, ROT0, "bootleg", "Seibu Cup Soccer :Selection: (bootleg, set 1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, cupsocsb2,cupsoc, cupsocbl, cupsoc, cupsoc, ROT0, "bootleg", "Seibu Cup Soccer :Selection: (bootleg, set 2)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, olysoc92, cupsoc, cupsoc, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Olympic Soccer '92", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
GAME( 1992, olysoc92, cupsoc, cupsoc, cupsoc, 0, ROT0, "Seibu Kaihatsu", "Olympic Soccer '92", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
|
||||
|
@ -2505,7 +2505,7 @@ static WRITE16_HANDLER( generic_cop_w )
|
||||
cop_clearfill_lasttrigger = 0;
|
||||
}
|
||||
|
||||
dma_trigger = data;
|
||||
dma_trigger = data; //dmach according to Olympic Soccer '92
|
||||
|
||||
break;
|
||||
}
|
||||
@ -2573,6 +2573,8 @@ static WRITE16_HANDLER( generic_cop_w )
|
||||
{
|
||||
seibu_cop_log("%06x: COPX execute current layer clear??? %04x\n", cpu_get_pc(space->cpu), data);
|
||||
|
||||
printf("SRC: %08x DST:%08x SIZE:%08x TRIGGER: %08x\n",dma_src,dma_dst,dma_size,dma_trigger);
|
||||
|
||||
if (dma_trigger & 0x80)
|
||||
{
|
||||
static UINT32 src,dst,size,i;
|
||||
@ -2608,7 +2610,6 @@ static WRITE16_HANDLER( generic_cop_w )
|
||||
if (dma_trigger == 0x0e)
|
||||
{
|
||||
static UINT32 src,dst,size,i;
|
||||
printf("SRC: %08x DST:%08x SIZE:%08x TRIGGER: %08x\n",dma_src,dma_dst,dma_size,dma_trigger);
|
||||
|
||||
src = dma_src;
|
||||
dst = dma_dst;
|
||||
@ -2794,21 +2795,16 @@ READ16_HANDLER( cupsoc_mcu_r )
|
||||
//case (0x1b4/2):
|
||||
// return cop_mcu_ram[offset];
|
||||
|
||||
/* returning 0xffff for some inputs for now, breaks coinage but
|
||||
allows cupsoc to boot */
|
||||
case (0x300/2): return input_port_read(space->machine, "DSW1");
|
||||
case (0x304/2): return input_port_read(space->machine, "PLAYERS12");
|
||||
case (0x308/2): return input_port_read(space->machine, "PLAYERS34");
|
||||
case (0x30c/2): return input_port_read(space->machine, "SYSTEM");
|
||||
case (0x314/2): return 0xffff;
|
||||
case (0x31c/2): return input_port_read(space->machine, "DSW2");
|
||||
case (0x340/2): return input_port_read(space->machine, "DSW1");
|
||||
case (0x344/2): return input_port_read(space->machine, "PLAYERS12");
|
||||
case (0x348/2): return input_port_read(space->machine, "PLAYERS34");
|
||||
case (0x34c/2): return input_port_read(space->machine, "SYSTEM");
|
||||
case (0x354/2): return 0xffff;
|
||||
case (0x35c/2): return input_port_read(space->machine, "DSW2");
|
||||
|
||||
case (0x340/2): return 0xffff;
|
||||
case (0x344/2): return 0xffff;
|
||||
case (0x348/2): return 0xffff;//seibu_main_word_r(space,2,0xffff);
|
||||
case (0x34c/2): return 0xffff;//seibu_main_word_r(space,3,0xffff);
|
||||
case (0x354/2): return 0xffff;//seibu_main_word_r(space,5,0xffff);
|
||||
case (0x35c/2): return 0xffff;
|
||||
case (0x308/2): return seibu_main_word_r(space,2,0xffff);
|
||||
case (0x30c/2): return seibu_main_word_r(space,3,0xffff);
|
||||
case (0x314/2): return seibu_main_word_r(space,5,0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2828,6 +2824,7 @@ WRITE16_HANDLER( cupsoc_mcu_w )
|
||||
400-5ff - Protection writes
|
||||
*********************************************************************/
|
||||
|
||||
#if 0
|
||||
/* Trigger Macro Command */
|
||||
case (0x100/2):
|
||||
{
|
||||
@ -2881,6 +2878,154 @@ WRITE16_HANDLER( cupsoc_mcu_w )
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Video Regs */
|
||||
case (0x204/2):
|
||||
{
|
||||
//C.R.T. Controller
|
||||
/*
|
||||
data = setting
|
||||
0x01e = 320x256 ---- ---x xxx-
|
||||
0x0e1 = 320x256 REVERSE ---- xxx- ---x
|
||||
0x016 = 320x240 ---- ---x -xx-
|
||||
0x0e9 = 320x240 REVERSE ---- xxx- x--x
|
||||
0x004 = 320x224 ---- ---- -x--
|
||||
0x10b = 320x224 REVERSE ---x ---- x-xx
|
||||
For now we use this by cases and not per bits.
|
||||
*/
|
||||
|
||||
switch(data)
|
||||
{
|
||||
case 0x0000:
|
||||
case 0x001e: CRT_MODE(320,256,0); break;
|
||||
case 0x00e1: CRT_MODE(320,256,1); break;
|
||||
case 0x0016: CRT_MODE(320,240,0); break;
|
||||
case 0x00e9: CRT_MODE(320,240,1); break;
|
||||
case 0x0004: CRT_MODE(320,224,0); break;
|
||||
case 0x010b: CRT_MODE(320,224,1); break;
|
||||
default:
|
||||
#ifdef MAME_DEBUG
|
||||
popmessage("Warning: Undefined CRT Mode %04x",data);
|
||||
#endif
|
||||
CRT_MODE(320,256,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*TODO: what's going on here,some scroll values aren't sent in these locations
|
||||
but somewhere else?*/
|
||||
case (0x22c/2): { legionna_scrollram16[0] = cop_mcu_ram[offset]; break; }
|
||||
case (0x22e/2): { legionna_scrollram16[1] = cop_mcu_ram[offset]; break; }
|
||||
case (0x230/2): { legionna_scrollram16[2] = cop_mcu_ram[offset]; break; }
|
||||
case (0x232/2): { legionna_scrollram16[3] = cop_mcu_ram[offset]; break; }
|
||||
case (0x234/2): { legionna_scrollram16[4] = cop_mcu_ram[offset]; break; }
|
||||
case (0x236/2): { legionna_scrollram16[5] = cop_mcu_ram[offset]; break; }
|
||||
case (0x238/2): { legionna_scrollram16[6] = cop_mcu_ram[offset]; break; }
|
||||
case (0x23a/2): { legionna_scrollram16[7] = cop_mcu_ram[offset]; break; }
|
||||
|
||||
case (0x300/2): { seibu_main_word_w(space,0,cop_mcu_ram[offset],0x00ff); break; }
|
||||
case (0x304/2): { seibu_main_word_w(space,1,cop_mcu_ram[offset],0x00ff); break; }
|
||||
case (0x310/2): { seibu_main_word_w(space,4,cop_mcu_ram[offset],0x00ff); break; }
|
||||
case (0x318/2): { seibu_main_word_w(space,6,cop_mcu_ram[offset],0x00ff); break; }
|
||||
}
|
||||
}
|
||||
|
||||
READ16_HANDLER( cupsocs_mcu_r )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
default:
|
||||
return generic_cop_r(space, offset, mem_mask);
|
||||
|
||||
//case (0x07e/2):
|
||||
//case (0x1b0/2):
|
||||
//case (0x1b4/2):
|
||||
// return cop_mcu_ram[offset];
|
||||
|
||||
case (0x300/2): return input_port_read(space->machine, "DSW1");
|
||||
case (0x304/2): return input_port_read(space->machine, "PLAYERS12");
|
||||
case (0x308/2): return input_port_read(space->machine, "PLAYERS34");
|
||||
case (0x30c/2): return input_port_read(space->machine, "SYSTEM");
|
||||
case (0x314/2): return 0xffff;
|
||||
case (0x31c/2): return input_port_read(space->machine, "DSW2");
|
||||
|
||||
case (0x348/2): return seibu_main_word_r(space,2,0xffff);
|
||||
case (0x34c/2): return seibu_main_word_r(space,3,0xffff);
|
||||
case (0x354/2): return seibu_main_word_r(space,5,0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( cupsocs_mcu_w )
|
||||
{
|
||||
COMBINE_DATA(&cop_mcu_ram[offset]);
|
||||
|
||||
seibu_cop_log("%06x: Legionna write data %04x at offset %04x\n", cpu_get_pc(space->cpu), data, offset*2);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
default:
|
||||
generic_cop_w(space, offset, data, mem_mask);
|
||||
break;
|
||||
|
||||
/*********************************************************************
|
||||
400-5ff - Protection writes
|
||||
*********************************************************************/
|
||||
|
||||
#if 0
|
||||
/* Trigger Macro Command */
|
||||
case (0x100/2):
|
||||
{
|
||||
switch(cop_mcu_ram[offset])
|
||||
{
|
||||
/*???*/
|
||||
case 0x8100:
|
||||
{
|
||||
UINT32 src = cop_register[0];
|
||||
space->write_word(src+0x36,0xffc0);
|
||||
break;
|
||||
}
|
||||
case 0x8900:
|
||||
{
|
||||
UINT32 src = cop_register[0];
|
||||
space->write_word(src+0x36,0xff80);
|
||||
break;
|
||||
}
|
||||
/*Right*/
|
||||
case 0x0205:
|
||||
{
|
||||
UINT32 src = cop_register[0];
|
||||
INT16 y = space->read_word(src+0x4);
|
||||
INT16 x = space->read_word(src+0x8);
|
||||
INT16 y_rel = space->read_word(src+0x10);
|
||||
INT16 x_rel = space->read_word(src+0x14);
|
||||
space->write_word(src+0x4,(y+y_rel));
|
||||
space->write_word(src+0x8,(x+x_rel));
|
||||
/*logerror("%08x %08x %08x %08x %08x\n",cop_register[0],
|
||||
space->read_word(cop_reg[0]+0x4),
|
||||
space->read_word(cop_reg[0]+0x8),
|
||||
space->read_word(cop_reg[0]+0x10),
|
||||
space->read_word(cop_reg[0]+0x14));*/
|
||||
break;
|
||||
}
|
||||
/*???*/
|
||||
case 0x3bb0:
|
||||
{
|
||||
//UINT32 dst = cop_register[0];
|
||||
//UINT32 dst = cop_register[1];
|
||||
//space->write_word(dst, mame_rand(space->machine)/*space->read_word(src)*/);
|
||||
//space->write_word(dst+2,mame_rand(space->machine)/*space->read_word(src+2)*/);
|
||||
//space->write_word(dst+4,mame_rand(space->machine)/*space->read_word(src+4)*/);
|
||||
//space->write_word(dst+6,mame_rand(space->machine)/*space->read_word(src+6)*/);
|
||||
//logerror("%04x\n",cop_register[0]);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
//logerror("%04x\n",data);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Video Regs */
|
||||
case (0x204/2):
|
||||
|
@ -7,6 +7,8 @@ READ16_HANDLER( heatbrl_mcu_r );
|
||||
WRITE16_HANDLER( heatbrl_mcu_w );
|
||||
READ16_HANDLER( cupsoc_mcu_r );
|
||||
WRITE16_HANDLER( cupsoc_mcu_w );
|
||||
READ16_HANDLER( cupsocs_mcu_r );
|
||||
WRITE16_HANDLER( cupsocs_mcu_w );
|
||||
READ16_HANDLER( godzilla_mcu_r );
|
||||
WRITE16_HANDLER( godzilla_mcu_w );
|
||||
READ16_HANDLER( denjinmk_mcu_r );
|
||||
|
Loading…
Reference in New Issue
Block a user