mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
Input documentation and COP tweaks based on M68000 and V30 code
- grainbow: Correct score and credits display - heatbrl: Suppress "divide by zero?" message since code actually checks for it (no, still not working) - legionna: 2P inputs now designated as such - zeroteam: Hook up PRNG (definitely used in this game)
This commit is contained in:
parent
cc088d53a6
commit
9e44bb530a
@ -335,7 +335,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
/*
|
||||
|
||||
Goal '92 (bootleg of Seibu Cup Soccer)
|
||||
Goal '92 (bootleg of Olympic Soccer '92 on non-Seibu board)
|
||||
|
||||
|
||||
PCB Layout
|
||||
@ -373,7 +373,7 @@ Z80 clock: 2.51MHz
|
||||
*/
|
||||
|
||||
ROM_START( goal92 )
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code - first 0x20000 bytes are a heavily patched copy of olysoc92a */
|
||||
ROM_LOAD16_BYTE( "2.bin", 0x00000, 0x80000, CRC(db0a6c7c) SHA1(b609db7806b99bc921806d8b3e5e515b4651c375) )
|
||||
ROM_LOAD16_BYTE( "3.bin", 0x00001, 0x80000, CRC(e4c45dee) SHA1(542749bd1ff51220a151fe66acdadac83df8f0ee) )
|
||||
|
||||
|
@ -15,6 +15,15 @@ hardware. It has a graphics banking facility, which doubles the 0xfff
|
||||
different tiles available for use in the foreground layer.
|
||||
|
||||
|
||||
Board names displayed on test mode menu:
|
||||
SYS68C2 BOARD Seibu Cup Soccer
|
||||
SYS68C3 BOARD SD Gundam Sangokushi Rainbow Tairiku Senki
|
||||
Denden Makamaka Denjin Makai
|
||||
(none) Godzilla
|
||||
|
||||
Heated Barrel includes only the I/O test, and Legionnaire only has a DSW
|
||||
display. These can be accessed by holding down the P1 joystick at reset.
|
||||
|
||||
|
||||
TODO
|
||||
----
|
||||
@ -102,7 +111,7 @@ static ADDRESS_MAP_START( legionna_cop_mem, AS_PROGRAM, 16, legionna_state )
|
||||
|
||||
AM_RANGE(0x100420, 0x100421) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_low_w)
|
||||
AM_RANGE(0x100422, 0x100423) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_high_w)
|
||||
AM_RANGE(0x100424, 0x100425) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_digit_count_w)
|
||||
AM_RANGE(0x100424, 0x100425) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_mode_w)
|
||||
AM_RANGE(0x100428, 0x100429) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_dma_v1_w)
|
||||
AM_RANGE(0x10042a, 0x10042b) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_dma_v2_w)
|
||||
AM_RANGE(0x10042c, 0x10042d) AM_DEVREADWRITE("raiden2cop", raiden2cop_device, cop_prng_maxvalue_r, cop_prng_maxvalue_w)
|
||||
@ -115,10 +124,12 @@ static ADDRESS_MAP_START( legionna_cop_mem, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x10043c, 0x10043d) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_pgm_trigger_w)
|
||||
//AM_RANGE(0x10043e, 0x10043f) AM_DEVWRITE("raiden2cop", raiden2cop_device,) /* 0 in all 68k based games, 0xffff in raiden2 / raidendx, 0x2000 in zeroteam / xsedae , it's always set up just before the 0x474 register */
|
||||
|
||||
AM_RANGE(0x100440, 0x100441) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_unk_param_a_w)
|
||||
AM_RANGE(0x100442, 0x100443) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_unk_param_b_w)
|
||||
AM_RANGE(0x100444, 0x100445) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_scale_w)
|
||||
AM_RANGE(0x100446, 0x100447) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_rom_addr_unk_w) // 68k
|
||||
AM_RANGE(0x100448, 0x100449) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_rom_addr_lo_w) // 68k
|
||||
AM_RANGE(0x10044a, 0x10044b) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_rom_addr_hi_w) // 68k
|
||||
AM_RANGE(0x100446, 0x100447) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_rom_addr_hi_w) // cupsoc
|
||||
AM_RANGE(0x100448, 0x100449) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_rom_addr_lo_w) // cupsoc
|
||||
AM_RANGE(0x10044a, 0x10044b) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_precmd_w) // cupsoc
|
||||
|
||||
AM_RANGE(0x100450, 0x100451) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_sort_ram_addr_hi_w)
|
||||
AM_RANGE(0x100452, 0x100453) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_sort_ram_addr_lo_w)
|
||||
@ -169,7 +180,7 @@ static ADDRESS_MAP_START( legionna_map, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100470, 0x100471) AM_WRITENOP // toggles 0x2000 / 0x0000, tile bank on some games
|
||||
AM_RANGE(0x100600, 0x10063f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // writes 0x0000
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x10071f) AM_READWRITE(sound_comms_r,sound_comms_w)
|
||||
AM_RANGE(0x100740, 0x100741) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100744, 0x100745) AM_READ_PORT("PLAYERS12")
|
||||
@ -191,6 +202,7 @@ static ADDRESS_MAP_START( heatbrl_map, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100470, 0x100471) AM_WRITE(heatbrl_setgfxbank)
|
||||
AM_RANGE(0x100600, 0x100601) AM_WRITENOP // 0xffff written on every update
|
||||
AM_RANGE(0x100640, 0x10068f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100740, 0x100741) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100744, 0x100745) AM_READ_PORT("PLAYERS12")
|
||||
@ -212,6 +224,7 @@ static ADDRESS_MAP_START( godzilla_map, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100470, 0x100471) AM_WRITE(denjinmk_setgfxbank)
|
||||
AM_RANGE(0x100600, 0x10063f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x10071f) AM_READWRITE(sound_comms_r,sound_comms_w)
|
||||
AM_RANGE(0x100740, 0x100741) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100744, 0x100745) AM_READ_PORT("PLAYERS12")
|
||||
@ -246,6 +259,7 @@ static ADDRESS_MAP_START( denjinmk_map, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100470, 0x100471) AM_WRITE(denjinmk_setgfxbank)
|
||||
AM_RANGE(0x100600, 0x10063f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x10071f) AM_READWRITE(sound_comms_r,sound_comms_w)
|
||||
AM_RANGE(0x100740, 0x100741) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100744, 0x100745) AM_READ_PORT("PLAYERS12")
|
||||
@ -269,7 +283,9 @@ static ADDRESS_MAP_START( grainbow_map, AS_PROGRAM, 16, legionna_state )
|
||||
AM_IMPORT_FROM( legionna_cop_mem )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100480, 0x100487) AM_WRITE(grainbow_layer_config_w) // probably a COP feature
|
||||
AM_RANGE(0x100600, 0x10063f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x10071f) AM_READWRITE(sound_comms_r,sound_comms_w)
|
||||
AM_RANGE(0x100740, 0x100741) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100744, 0x100745) AM_READ_PORT("PLAYERS12")
|
||||
@ -293,6 +309,7 @@ static ADDRESS_MAP_START( cupsoc_mem, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100600, 0x10063f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x10071f) AM_READWRITE(sound_comms_r,sound_comms_w)
|
||||
AM_RANGE(0x100740, 0x100741) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100744, 0x100745) AM_READ_PORT("PLAYERS12")
|
||||
@ -320,6 +337,7 @@ static ADDRESS_MAP_START( cupsocs_mem, AS_PROGRAM, 16, legionna_state )
|
||||
AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100600, 0x10060f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)//?
|
||||
AM_RANGE(0x100640, 0x10067f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x100701) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100704, 0x100705) AM_READ_PORT("PLAYERS12")
|
||||
AM_RANGE(0x100708, 0x100709) AM_READ_PORT("PLAYERS34")
|
||||
@ -347,6 +365,7 @@ static ADDRESS_MAP_START( cupsocbl_mem, AS_PROGRAM, 16, legionna_state )
|
||||
//AM_RANGE(0x100000, 0x1003ff) AM_RAM
|
||||
AM_RANGE(0x100600, 0x10060f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)//?
|
||||
AM_RANGE(0x100640, 0x10067f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0x100680, 0x100681) AM_WRITENOP // D0 written on every update
|
||||
AM_RANGE(0x100700, 0x100701) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x100704, 0x100705) AM_READ_PORT("PLAYERS12")
|
||||
AM_RANGE(0x100708, 0x100709) AM_READ_PORT("PLAYERS34")
|
||||
@ -402,22 +421,22 @@ static INPUT_PORTS_START( legionna )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("PLAYERS12")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
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_UNKNOWN ) // ???
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ???
|
||||
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)
|
||||
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_UNKNOWN ) // ???
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ???
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x001f, 0x001f, DEF_STR( Coinage ) )
|
||||
@ -474,7 +493,11 @@ static INPUT_PORTS_START( legionna )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("PLAYERS34")
|
||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Some sort of rotational input?
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ???
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Also read but not used
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -726,12 +749,11 @@ static INPUT_PORTS_START( grainbow )
|
||||
PORT_DIPSETTING( 0x0003, "3")
|
||||
PORT_DIPSETTING( 0x0000, "5")
|
||||
PORT_DIPSETTING( 0x0001, "4")
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) ) // ???
|
||||
PORT_DIPSETTING( 0x000c, "2" ) // Internal value stored at 0x1086cc and often used as table offset
|
||||
PORT_DIPSETTING( 0x0008, "0" )
|
||||
PORT_DIPSETTING( 0x0004, "4" )
|
||||
//PORT_DIPSETTING( 0x0000, "4" ) // Was one of these settings intended to be 6?
|
||||
PORT_DIPNAME( 0x00f0, 0x00f0, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
|
||||
PORT_DIPSETTING( 0x00a0, DEF_STR( 6C_1C ) )
|
||||
@ -752,7 +774,7 @@ static INPUT_PORTS_START( grainbow )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) // Dead code?
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
|
@ -17,7 +17,8 @@ Then it puts settings at 0x9e08 and 0x9e0a (bp 91acb)
|
||||
- EEPROM contains high scores, but they don't get restored? (original bug?)
|
||||
|
||||
New Zero Team
|
||||
- 2 Player only? Service mode only shows 2 Players and I don't see a switch
|
||||
- 2 Player only. Service mode only shows 2 Players, and the code confirms that the options
|
||||
for three and four players have been removed from this version.
|
||||
- Stages 3 and 1 are swapped, this is correct.
|
||||
|
||||
Raiden 2 New / Raiden DX
|
||||
@ -636,6 +637,8 @@ static INPUT_PORTS_START( nzerotea )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
// The P3_P4 port is never read in this version
|
||||
|
||||
PORT_START("DSW") // taken from zeroteam, except last dip is service mode
|
||||
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!1,!2,!3")
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina
|
||||
/********************************************************************************************************
|
||||
|
||||
Seibu Protected 1993-94 era hardware, V30 based (sequel to the 68k based hardware)
|
||||
Seibu Protected 1993-94 era hardware, V30 based (sequel to the SYS68C hardware)
|
||||
|
||||
TODO:
|
||||
* zeroteam - sort-DMA doesn't seem to work too well, sprite-sprite priorities are broken as per now
|
||||
@ -120,6 +120,42 @@ Some of these games were also released on updated PCBs
|
||||
which usually featured vastly inferior sound hardware
|
||||
(see the V33 based version of Raiden II/DX New)
|
||||
|
||||
All games on this hardware have a startup routine that reads a few of the highest bytes of ROM
|
||||
and stores their adjusted values in RAM. Which bytes are read differs from set to set, but one
|
||||
is always FFFFB, which determines the region and/or licensee.
|
||||
|
||||
Raiden II/DX Zero Team
|
||||
------------- ----------
|
||||
00/FF Japan/Default Japan/Default
|
||||
01 U.S. (Fabtek) U.S. (Fabtek)
|
||||
02 Taiwan (Liang Hwa) Korea (Dream Soft)
|
||||
03 HK (Metrotainment) Taiwan (Liang Hwa)
|
||||
04 Korea? "Selection"
|
||||
05 Germany (Tuning)
|
||||
06 Austria
|
||||
07 Belgium
|
||||
08 Denmark
|
||||
09 Finland
|
||||
0A France
|
||||
0B Great Britain
|
||||
0C Greece
|
||||
0D Holland
|
||||
0E Italy
|
||||
0F Norway
|
||||
10 Portugal
|
||||
11 Spain
|
||||
12 Sweden
|
||||
13 Switzerland
|
||||
14 Australia
|
||||
15 New Zealand
|
||||
|
||||
Most sets of Raiden II and Raiden DX display "USE IN JAPAN ONLY" when the region byte is set
|
||||
to 00 or FF. This string is absent from the 'easier' sets of Raiden II, and Zero Team has
|
||||
nothing of the sort. (The obviously Korean-only X Se Dae Quiz still reads the byte.)
|
||||
|
||||
Region 04 for Raiden II and Raiden DX is presumably Korea, but the notice that would confirm
|
||||
this does not seem to be present in any of the sets.
|
||||
|
||||
|
||||
Protection Notes:
|
||||
These games use the 2nd (and 3rd) generation of Seibu's 'COP' protection,
|
||||
@ -859,9 +895,10 @@ static ADDRESS_MAP_START( raiden2_cop_mem, AS_PROGRAM, 16, raiden2_state )
|
||||
AM_RANGE(0x0041e, 0x0041f) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_angle_step_w) // angle step (for 0x6200 COP macro)
|
||||
AM_RANGE(0x00420, 0x00421) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_low_w)
|
||||
AM_RANGE(0x00422, 0x00423) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_high_w)
|
||||
AM_RANGE(0x00424, 0x00425) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_digit_count_w)
|
||||
AM_RANGE(0x00424, 0x00425) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_itoa_mode_w)
|
||||
AM_RANGE(0x00428, 0x00429) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_dma_v1_w)
|
||||
AM_RANGE(0x0042a, 0x0042b) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_dma_v2_w)
|
||||
AM_RANGE(0x0042c, 0x0042d) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_prng_maxvalue_w)
|
||||
AM_RANGE(0x00432, 0x00433) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_pgm_data_w)
|
||||
AM_RANGE(0x00434, 0x00435) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_pgm_addr_w)
|
||||
AM_RANGE(0x00436, 0x00437) AM_DEVWRITE("raiden2cop", raiden2cop_device, cop_hitbox_baseadr_w)
|
||||
@ -890,6 +927,7 @@ static ADDRESS_MAP_START( raiden2_cop_mem, AS_PROGRAM, 16, raiden2_state )
|
||||
AM_RANGE(0x00582, 0x00587) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_collision_status_val_r)
|
||||
AM_RANGE(0x00588, 0x00589) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_collision_status_stat_r)
|
||||
AM_RANGE(0x00590, 0x00599) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_itoa_digits_r)
|
||||
AM_RANGE(0x005a0, 0x005a7) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_prng_r) // zeroteam reads from 5a4
|
||||
AM_RANGE(0x005b0, 0x005b1) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_status_r)
|
||||
AM_RANGE(0x005b2, 0x005b3) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_dist_r)
|
||||
AM_RANGE(0x005b4, 0x005b5) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_angle_r)
|
||||
@ -908,6 +946,7 @@ static ADDRESS_MAP_START( raiden2_cop_mem, AS_PROGRAM, 16, raiden2_state )
|
||||
AM_RANGE(0x006bc, 0x006bf) AM_WRITE(sprcpt_adr_w)
|
||||
AM_RANGE(0x006c0, 0x006c1) AM_READWRITE(sprite_prot_off_r, sprite_prot_off_w)
|
||||
AM_RANGE(0x006c2, 0x006c3) AM_READWRITE(sprite_prot_src_seg_r, sprite_prot_src_seg_w)
|
||||
AM_RANGE(0x006c4, 0x006c5) AM_WRITENOP // constant value written along with 0x6c0
|
||||
AM_RANGE(0x006c6, 0x006c7) AM_WRITE(sprite_prot_dst1_w)
|
||||
AM_RANGE(0x006ca, 0x006cb) AM_WRITE(raiden2_bank_w)
|
||||
AM_RANGE(0x006cc, 0x006cd) AM_WRITE(tile_bank_01_w)
|
||||
@ -1135,7 +1174,7 @@ static INPUT_PORTS_START( zeroteam )
|
||||
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_UNUSED )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) // read in unused dead code - debugging leftover?
|
||||
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)
|
||||
@ -1143,7 +1182,7 @@ static INPUT_PORTS_START( zeroteam )
|
||||
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_UNUSED )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) // read in unused dead code - debugging leftover?
|
||||
|
||||
PORT_MODIFY("DSW") // not the same as raiden2/dx: coins, difficulty, lives and bonus lives all differ!
|
||||
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!1,!2,!3")
|
||||
@ -1358,7 +1397,6 @@ static MACHINE_CONFIG_START( raiden2, raiden2_state )
|
||||
|
||||
MCFG_RAIDEN2COP_ADD("raiden2cop")
|
||||
MCFG_RAIDEN2COP_VIDEORAM_OUT_CB(WRITE16(raiden2_state, m_videoram_private_w))
|
||||
MCFG_ITOA_UNUSED_DIGIT_VALUE(0x20)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(raiden2_state,raiden2)
|
||||
|
||||
@ -1419,7 +1457,6 @@ static MACHINE_CONFIG_START( zeroteam, raiden2_state )
|
||||
|
||||
MCFG_RAIDEN2COP_ADD("raiden2cop")
|
||||
MCFG_RAIDEN2COP_VIDEORAM_OUT_CB(WRITE16(raiden2_state, m_videoram_private_w))
|
||||
MCFG_ITOA_UNUSED_DIGIT_VALUE(0x20)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(raiden2_state,raiden2)
|
||||
|
||||
@ -3113,7 +3150,7 @@ GAME( 1994, raidendxg, raidendx, raidendx, raidendx, raiden2_state, raidendx, R
|
||||
GAME( 1994, raidendxnl, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Holland)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1994, raidendxj, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Japan, set 1)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1994, raidendxja, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu", "Raiden DX (Japan, set 2)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1994, raidendxch, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu (Ideal International Development Corp license) ", "Raiden DX (China)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1994, raidendxch, raidendx, raidendx, raidendx, raiden2_state, raidendx, ROT270, "Seibu Kaihatsu (Ideal International Development Corp license) ", "Raiden DX (China)", MACHINE_SUPPORTS_SAVE ) // Region byte is 0x16, defined as "MAIN LAND CHINA" for this set only
|
||||
|
||||
GAME( 1993, zeroteam, 0, zeroteam, zeroteam, raiden2_state, zeroteam, ROT0, "Seibu Kaihatsu (Fabtek license)", "Zero Team USA (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
|
||||
GAME( 1993, zeroteama, zeroteam, zeroteam, zeroteam, raiden2_state, zeroteam, ROT0, "Seibu Kaihatsu", "Zero Team (Japan?, earlier?)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
std::unique_ptr<UINT16[]> m_textram;
|
||||
std::unique_ptr<UINT16[]> m_scrollram16;
|
||||
UINT16 m_layer_disable;
|
||||
std::unique_ptr<UINT16[]> m_layer_config;
|
||||
int m_sprite_xoffs;
|
||||
int m_sprite_yoffs;
|
||||
tilemap_t *m_background_layer;
|
||||
@ -61,6 +62,7 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(sound_comms_w);
|
||||
DECLARE_WRITE16_MEMBER(denjinmk_setgfxbank);
|
||||
DECLARE_WRITE16_MEMBER(heatbrl_setgfxbank);
|
||||
DECLARE_WRITE16_MEMBER(grainbow_layer_config_w);
|
||||
|
||||
DECLARE_DRIVER_INIT(legiongfx);
|
||||
DECLARE_DRIVER_INIT(cupsoc_debug);
|
||||
|
@ -37,8 +37,7 @@ raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *
|
||||
pal_brightness_val(0),
|
||||
pal_brightness_mode(0),
|
||||
cop_itoa(0),
|
||||
cop_itoa_digit_count(0),
|
||||
m_cop_itoa_unused_digit_value(0x30),
|
||||
cop_itoa_mode(0),
|
||||
|
||||
cop_status(0),
|
||||
cop_scale(0),
|
||||
@ -61,9 +60,12 @@ raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *
|
||||
m_cop_sprite_dma_src(0),
|
||||
m_cop_sprite_dma_size(0),
|
||||
|
||||
m_cop_unk_param_a(0),
|
||||
m_cop_unk_param_b(0),
|
||||
|
||||
m_cop_rom_addr_lo(0),
|
||||
m_cop_rom_addr_hi(0),
|
||||
m_cop_rom_addr_unk(0),
|
||||
m_cop_precmd(0),
|
||||
|
||||
m_cop_sprite_dma_abs_x(0),
|
||||
m_cop_sprite_dma_abs_y(0),
|
||||
@ -121,7 +123,7 @@ void raiden2cop_device::device_start()
|
||||
save_item(NAME(cop_dma_size));
|
||||
|
||||
save_item(NAME(cop_itoa));
|
||||
save_item(NAME(cop_itoa_digit_count));
|
||||
save_item(NAME(cop_itoa_mode));
|
||||
save_item(NAME(cop_itoa_digits));
|
||||
|
||||
save_item(NAME(cop_status));
|
||||
@ -168,9 +170,12 @@ void raiden2cop_device::device_start()
|
||||
save_item(NAME(m_cop_sprite_dma_size));
|
||||
save_item(NAME(m_cop_sprite_dma_src));
|
||||
|
||||
save_item(NAME(m_cop_unk_param_a));
|
||||
save_item(NAME(m_cop_unk_param_b));
|
||||
|
||||
save_item(NAME(m_cop_rom_addr_lo));
|
||||
save_item(NAME(m_cop_rom_addr_hi));
|
||||
save_item(NAME(m_cop_rom_addr_unk));
|
||||
save_item(NAME(m_cop_precmd));
|
||||
|
||||
save_item(NAME(m_cop_sprite_dma_abs_x));
|
||||
save_item(NAME(m_cop_sprite_dma_abs_y));
|
||||
@ -180,9 +185,6 @@ void raiden2cop_device::device_start()
|
||||
save_item(NAME(m_LEGACY_r1));
|
||||
|
||||
m_videoramout_cb.resolve_safe();
|
||||
|
||||
cop_itoa_digit_count = 4; //TODO: Raiden 2 never inits the BCD register, value here is a guess (8 digits, as WR is 10.000.000 + a)
|
||||
|
||||
}
|
||||
|
||||
UINT16 raiden2cop_device::cop_read_word(address_space &space, int address)
|
||||
@ -391,6 +393,7 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
triggerval == 0x42c2 || // distance?
|
||||
triggerval == 0xa180 || triggerval == 0xa980 || triggerval == 0xb100 || triggerval == 0xb900) /* collisions */
|
||||
otherlog = 0;
|
||||
// An unused routine writes to 0x9180 and 0x9980 (arguments written to 0x100442 and 0x100440 first)
|
||||
}
|
||||
else if (!strcmp(machine().system().name, "cupsoc"))
|
||||
{
|
||||
@ -406,10 +409,18 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
triggerval == 0xf105 ||
|
||||
triggerval == 0x8100 || triggerval == 0x8900) /* sin / cos */
|
||||
otherlog = 0;
|
||||
// Unused M68000 code in some (earlier?) sets also writes these trigger values:
|
||||
// - 0x9180, 0x9980 (arguments written to 0x100442 and 0x100440 first)
|
||||
// - 0xa180, 0xa980, 0x1905 (twice at successive offsets)
|
||||
// - 0x2a05 (twice or three times at successive offsets)
|
||||
// - 0x2288 (may set bit 15 of status), 0x138e, 0x3bb0
|
||||
// - 0x338e (may set bit 15 of status), 0x3bb0, 0x4aa0
|
||||
// - 0xa180, 0xb100, 0xa980, 0xb100
|
||||
// - 0xa180, 0x6880 (to second offset), 0xc480 (to second offset; one of these may set bit 1 of status)
|
||||
}
|
||||
else if (!strcmp(machine().system().name, "heatbrl"))
|
||||
{
|
||||
// note, stage 2 end boss (fire breather) will sometimes glitch, also shows 'divide by zero' from MAME when it fires (and homing missile stg3 - they don't home in properly either?)
|
||||
// note, stage 2 end boss (fire breather) will sometimes glitch (and homing missile stg3 - they don't home in properly either?)
|
||||
// stage 2+3 priority of boaters is wrong
|
||||
// game eventually crashes with address error (happened in stage 4 for me)
|
||||
|
||||
@ -420,6 +431,7 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
triggerval == 0x42c2 ||
|
||||
triggerval == 0xa100 || triggerval == 0xa900 || triggerval == 0xb080 || triggerval == 0xb880) /* collisions */
|
||||
otherlog = 0;
|
||||
// Program code also includes the unused routine from Legionnaire
|
||||
}
|
||||
else if (!strcmp(machine().system().name, "godzilla"))
|
||||
{
|
||||
@ -431,11 +443,9 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
else if (!strcmp(machine().system().name, "grainbow"))
|
||||
{
|
||||
// path 3 (caves) midboss has wrong tiles
|
||||
// doesn't like our BCD / Number conversion - not command related
|
||||
// stage 4 (after 3 selectable stages) has sprite glitches bottom left
|
||||
// fade logic is wrong (palettes for some layers shouldn't fade) - DMA operation related, not command related
|
||||
|
||||
|
||||
if (triggerval == 0x0205 ||
|
||||
triggerval == 0x8100 || triggerval == 0x8900 || /* sin / cos */
|
||||
triggerval == 0x138e ||
|
||||
@ -446,11 +456,11 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
triggerval == 0x6200 ||
|
||||
triggerval == 0x6980)
|
||||
otherlog = 0;
|
||||
|
||||
// Program code also includes many of the unused routines from Olympic Soccer '92
|
||||
}
|
||||
else if (!strcmp(machine().system().name, "denjinmk"))
|
||||
{
|
||||
// never calls any programs
|
||||
// never calls any programs (M68000 code handles sine and cosine lookups on its own)
|
||||
}
|
||||
else if (!strcmp(machine().system().name, "zeroteam"))
|
||||
{
|
||||
@ -477,8 +487,7 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
triggerval == 0x4aa0)
|
||||
|
||||
otherlog = 0;
|
||||
|
||||
|
||||
// An unused routine in the program code triggers 0x6980 and 0x7100 after writing zero to the word at 0x426
|
||||
}
|
||||
else if (!strcmp(machine().system().name, "xsedae"))
|
||||
{
|
||||
@ -510,6 +519,7 @@ int raiden2cop_device::find_trigger_match(UINT16 triggerval, UINT16 mask)
|
||||
triggerval == 0xa100 || triggerval == 0xa900 || triggerval == 0xb100 || triggerval == 0xb900 /* collisions */
|
||||
)
|
||||
otherlog = 0;
|
||||
// An unused routine in the program code triggers 0x9100 and 0x9900
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -878,25 +888,25 @@ WRITE16_MEMBER(raiden2cop_device::cop_dma_trigger_w)
|
||||
|
||||
/* Number Conversion */
|
||||
|
||||
// according to score display in https://www.youtube.com/watch?v=T1M8sxYgt9A
|
||||
// we should return 0x30 for unused digits? according to Raiden 2 and Zero
|
||||
// Team the value should be 0x20, can this be configured?
|
||||
// grainbow doesn't like this implementation at all (21 credits, 2 digit high scores etc.)
|
||||
WRITE16_MEMBER(raiden2cop_device::cop_itoa_low_w)
|
||||
{
|
||||
cop_itoa = (cop_itoa & ~UINT32(mem_mask)) | (data & mem_mask);
|
||||
|
||||
int digits = 1 << cop_itoa_digit_count*2;
|
||||
//int digits = 1 << cop_itoa_mode*2;
|
||||
UINT32 val = cop_itoa;
|
||||
|
||||
if(digits > 9)
|
||||
digits = 9;
|
||||
//if(digits > 9)
|
||||
int digits = 9;
|
||||
|
||||
for (int i = 0; i < digits; i++)
|
||||
{
|
||||
if (!val && i)
|
||||
{
|
||||
cop_itoa_digits[i] = m_cop_itoa_unused_digit_value;
|
||||
// according to score display in https://www.youtube.com/watch?v=T1M8sxYgt9A
|
||||
// we should return 0x30 for unused digits in Godzilla
|
||||
// however, Raiden II, Zero Team and SD Gundam all want 0x20 (SD Gundam even corrects 0x20 to 0x30 in the credits counter)
|
||||
// this is guesswork based on comparing M68000 code, using the most likely parameter that Godzilla configures differently
|
||||
cop_itoa_digits[i] = (cop_itoa_mode == 3) ? 0x30 : 0x20;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -913,9 +923,14 @@ WRITE16_MEMBER(raiden2cop_device::cop_itoa_high_w)
|
||||
cop_itoa = (cop_itoa & ~(mem_mask << 16)) | ((data & mem_mask) << 16);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(raiden2cop_device::cop_itoa_digit_count_w)
|
||||
WRITE16_MEMBER(raiden2cop_device::cop_itoa_mode_w)
|
||||
{
|
||||
COMBINE_DATA(&cop_itoa_digit_count);
|
||||
// BCD / Number conversion related parameter
|
||||
// The former working hypothesis that this value is some sort of digit count is almost certainly incorrect
|
||||
// SD Gundam writes 0 here at startup, whereas Godzilla and Heated Barrel write 3
|
||||
// Denjin Makai writes either 2 or 3 at various times
|
||||
// Raiden II and Zero Team also write 2 here, but only in unused routines
|
||||
COMBINE_DATA(&cop_itoa_mode);
|
||||
}
|
||||
|
||||
READ16_MEMBER(raiden2cop_device::cop_itoa_digits_r)
|
||||
@ -929,7 +944,7 @@ READ16_MEMBER(raiden2cop_device::cop_itoa_digits_r)
|
||||
// (TABLENOTE1)
|
||||
// in all but one case the upload table position (5-bits) is the SAME as the upper 5-bits of the 'trigger value'
|
||||
// the exception to this rule is program 0x18 uploads on zeroteam
|
||||
// in this case you can see that the 'trigger' value upper bits are 0x0f, this makes it a potentially interesting case (if it gets used)
|
||||
// in this case you can see that the 'trigger' value upper bits are 0x0f, this would be potentially interesting if it were used (but it isn't)
|
||||
// 18 - c480 ( 18) ( 480) : (080, 882, 000, 000, 000, 000, 000, 000) a ff00 (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk)
|
||||
// 18 - 7c80 ( 0f) ( 480) : (080, 882, 000, 000, 000, 000, 000, 000) a ff00 (zeroteam, xsedae)
|
||||
|
||||
@ -1150,7 +1165,11 @@ void raiden2cop_device::execute_42c2(address_space &space, int offset, UINT16 da
|
||||
{
|
||||
int div = space.read_word(cop_regs[0] + (0x36));
|
||||
if (!div)
|
||||
div = 1;
|
||||
{
|
||||
cop_status |= 0x8000;
|
||||
space.write_word(cop_regs[0] + (0x38), 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* TODO: bits 5-6-15 */
|
||||
cop_status = 7;
|
||||
@ -1166,28 +1185,31 @@ void raiden2cop_device::LEGACY_execute_42c2(address_space &space, int offset, UI
|
||||
int res;
|
||||
int cop_dist_raw;
|
||||
|
||||
// divide by zero?
|
||||
if (!div)
|
||||
{
|
||||
printf("divide by zero?\n");
|
||||
div = 1;
|
||||
// No emulation error here: heatbrl specifically tests this
|
||||
cop_status |= 0x8000;
|
||||
res = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: calculation of this one should occur at 0x3b30/0x3bb0 I *think* */
|
||||
/* TODO: recheck if cop_scale still masks at 3 with this command */
|
||||
dx >>= 11 + cop_scale;
|
||||
dy >>= 11 + cop_scale;
|
||||
cop_dist_raw = sqrt((double)(dx*dx + dy*dy));
|
||||
|
||||
res = cop_dist_raw;
|
||||
res /= div;
|
||||
|
||||
cop_dist = (1 << (5 - cop_scale)) / div;
|
||||
|
||||
/* TODO: bits 5-6-15 */
|
||||
cop_status = 7;
|
||||
}
|
||||
|
||||
/* TODO: calculation of this one should occur at 0x3b30/0x3bb0 I *think* */
|
||||
/* TODO: recheck if cop_scale still masks at 3 with this command */
|
||||
dx >>= 11 + cop_scale;
|
||||
dy >>= 11 + cop_scale;
|
||||
cop_dist_raw = sqrt((double)(dx*dx + dy*dy));
|
||||
|
||||
res = cop_dist_raw;
|
||||
res /= div;
|
||||
|
||||
cop_dist = (1 << (5 - cop_scale)) / div;
|
||||
|
||||
/* TODO: bits 5-6-15 */
|
||||
cop_status = 7;
|
||||
|
||||
space.write_word(cop_regs[0] + (0x38 ^ 2), res);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1399,6 +1421,7 @@ void raiden2cop_device::execute_8900(address_space &space, int offset, UINT16 da
|
||||
12 - 9100 ( 12) ( 100) : (b80, b94, 894, 000, 000, 000, 000, 000) 7 fefb (raiden2, raidendx)
|
||||
12 - 9100 ( 12) ( 100) : (b80, b94, b94, 894, 000, 000, 000, 000) 7 f8f7 (zeroteam, xsedae)
|
||||
*/
|
||||
// Unused code suggests this may be an alternate sine function: the longword result at cop_regs[0] + 0x28 is doubled when the angle is 0xC0.
|
||||
|
||||
/*
|
||||
## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask
|
||||
@ -1407,6 +1430,7 @@ void raiden2cop_device::execute_8900(address_space &space, int offset, UINT16 da
|
||||
13 - 9900 ( 13) ( 100) : (b80, b94, 896, 000, 000, 000, 000, 000) 7 fefb (raiden2, raidendx)
|
||||
13 - 9900 ( 13) ( 100) : (b80, b94, b94, 896, 000, 000, 000, 000) 7 f8f7 (zeroteam, xsedae)
|
||||
*/
|
||||
// Unused code suggests this may be an alternate cosine function: the longword result at cop_regs[0] + 0x2C is doubled when the angle is 0x80.
|
||||
|
||||
/*
|
||||
## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask
|
||||
@ -1494,7 +1518,7 @@ void raiden2cop_device::LEGACY_execute_d104(address_space &space, int offset, UI
|
||||
/* writes to some unemulated COP registers, then puts the result in here, adding a parameter taken from ROM */
|
||||
//space.write_word(cop_regs[0]+(0x44 + offset * 4), rom_data);
|
||||
|
||||
logerror("%04x%04x %04x %04x\n", m_cop_rom_addr_hi, m_cop_rom_addr_lo, m_cop_rom_addr_unk, rom_data);
|
||||
logerror("%04x%04x %04x %04x\n", m_cop_rom_addr_hi, m_cop_rom_addr_lo, m_cop_precmd, rom_data);
|
||||
}
|
||||
/*
|
||||
## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask
|
||||
@ -2024,11 +2048,27 @@ WRITE16_MEMBER(raiden2cop_device::cop_sprite_dma_inc_w)
|
||||
|
||||
// more misc
|
||||
|
||||
WRITE16_MEMBER( raiden2cop_device::cop_rom_addr_unk_w)
|
||||
// Involved with 0x9100/0x9180 and 0x9900/0x9980
|
||||
// Some angle results seem to be stored here as well; legionna writes here when 0x138e raises the divide by zero flag
|
||||
WRITE16_MEMBER( raiden2cop_device::cop_unk_param_a_w)
|
||||
{
|
||||
COMBINE_DATA(&m_cop_rom_addr_unk);
|
||||
COMBINE_DATA(&m_cop_unk_param_a);
|
||||
}
|
||||
|
||||
// Involved with 0x9100/0x9180 and 0x9900/0x9980
|
||||
WRITE16_MEMBER( raiden2cop_device::cop_unk_param_b_w)
|
||||
{
|
||||
COMBINE_DATA(&m_cop_unk_param_b);
|
||||
}
|
||||
|
||||
// cupsoc always writes 0xF before commands 0x5105, 0x5905, 0xD104 and 0xF105 and 0xE before 0xD104, then resets this to zero
|
||||
// zeroteam writes 0xE here before 0xEDE5, then resets it to zero
|
||||
WRITE16_MEMBER( raiden2cop_device::cop_precmd_w)
|
||||
{
|
||||
COMBINE_DATA(&m_cop_precmd);
|
||||
}
|
||||
|
||||
// cupsoc writes a longword before 0x5105 or 0xF105 (always 0xC000 for the latter)
|
||||
WRITE16_MEMBER( raiden2cop_device::cop_rom_addr_lo_w)
|
||||
{
|
||||
COMBINE_DATA(&m_cop_rom_addr_lo);
|
||||
|
@ -16,9 +16,6 @@
|
||||
#define MCFG_RAIDEN2COP_VIDEORAM_OUT_CB(_devcb) \
|
||||
devcb = &raiden2cop_device::set_m_videoramout_cb(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_ITOA_UNUSED_DIGIT_VALUE(value) \
|
||||
raiden2cop_device::set_itoa_unused_digit_value(*device, value);
|
||||
|
||||
#define MCFG_CPU_IS_68K(value) \
|
||||
raiden2cop_device::set_cpu_is_68k(*device, value);
|
||||
|
||||
@ -87,15 +84,12 @@ public:
|
||||
|
||||
DECLARE_WRITE16_MEMBER( cop_itoa_low_w );
|
||||
DECLARE_WRITE16_MEMBER( cop_itoa_high_w );
|
||||
DECLARE_WRITE16_MEMBER( cop_itoa_digit_count_w );
|
||||
DECLARE_WRITE16_MEMBER( cop_itoa_mode_w );
|
||||
DECLARE_READ16_MEMBER ( cop_itoa_digits_r );
|
||||
|
||||
UINT32 cop_itoa;
|
||||
UINT16 cop_itoa_digit_count;
|
||||
UINT16 cop_itoa_mode;
|
||||
UINT8 cop_itoa_digits[10];
|
||||
UINT8 m_cop_itoa_unused_digit_value;
|
||||
|
||||
static void set_itoa_unused_digit_value(device_t &device, int value) { downcast<raiden2cop_device &>(device).m_cop_itoa_unused_digit_value = value; }
|
||||
|
||||
// Main COP functionality
|
||||
|
||||
@ -228,8 +222,12 @@ public:
|
||||
int m_cop_sprite_dma_size;
|
||||
|
||||
// misc 68k
|
||||
UINT16 m_cop_rom_addr_lo,m_cop_rom_addr_hi,m_cop_rom_addr_unk;
|
||||
DECLARE_WRITE16_MEMBER(cop_rom_addr_unk_w);
|
||||
UINT16 m_cop_unk_param_a,m_cop_unk_param_b;
|
||||
DECLARE_WRITE16_MEMBER(cop_unk_param_a_w);
|
||||
DECLARE_WRITE16_MEMBER(cop_unk_param_b_w);
|
||||
|
||||
UINT16 m_cop_rom_addr_lo,m_cop_rom_addr_hi,m_cop_precmd;
|
||||
DECLARE_WRITE16_MEMBER(cop_precmd_w);
|
||||
DECLARE_WRITE16_MEMBER(cop_rom_addr_lo_w);
|
||||
DECLARE_WRITE16_MEMBER(cop_rom_addr_hi_w);
|
||||
|
||||
|
@ -106,6 +106,12 @@ WRITE16_MEMBER(legionna_state::videowrite_cb_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(legionna_state::grainbow_layer_config_w)
|
||||
{
|
||||
// (0x8000|0x1ff), 0x200, 0x1ff, 0x200 written in sequence at startup
|
||||
COMBINE_DATA(&m_layer_config[offset]);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(legionna_state::legionna_background_w)
|
||||
{
|
||||
COMBINE_DATA(&m_back_data[offset]);
|
||||
@ -291,6 +297,8 @@ VIDEO_START_MEMBER(legionna_state,grainbow)
|
||||
|
||||
m_has_extended_banking = 0;
|
||||
m_has_extended_priority = 1;
|
||||
|
||||
m_layer_config = std::make_unique<UINT16[]>(0x8/2);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(legionna_state,godzilla)
|
||||
@ -299,7 +307,6 @@ VIDEO_START_MEMBER(legionna_state,godzilla)
|
||||
|
||||
m_has_extended_banking = 1;
|
||||
m_has_extended_priority = 0;
|
||||
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user