diff options
Diffstat (limited to 'src/mame/machine/seibucop/seibucop_cmd.hxx')
-rw-r--r-- | src/mame/machine/seibucop/seibucop_cmd.hxx | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/src/mame/machine/seibucop/seibucop_cmd.hxx b/src/mame/machine/seibucop/seibucop_cmd.hxx index d699e7a3026..94a7bbe7edd 100644 --- a/src/mame/machine/seibucop/seibucop_cmd.hxx +++ b/src/mame/machine/seibucop/seibucop_cmd.hxx @@ -19,7 +19,7 @@ 00 - 0205 ( 00) ( 205) : (188, 282, 082, b8e, 98e, 000, 000, 000) 6 ffeb (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) 00 - 0105 ( 00) ( 105) : (180, 2e0, 0a0, 000, 000, 000, 000, 000) 6 fffb (zeroteamsr) */ -void raiden2cop_device::execute_0205(int offset, UINT16 data) +void raiden2cop_device::execute_0205(int offset, uint16_t data) { int ppos = m_host_space->read_dword(cop_regs[0] + 0x04 + offset * 4); int npos = ppos + m_host_space->read_dword(cop_regs[0] + 0x10 + offset * 4); @@ -39,7 +39,7 @@ void raiden2cop_device::execute_0205(int offset, UINT16 data) // triggered with 0904 0905 -void raiden2cop_device::execute_0904(int offset, UINT16 data) +void raiden2cop_device::execute_0904(int offset, uint16_t data) { #if LOG_Move0905 printf("cmd %04x: %08x %08x [%08x]\n",data, m_host_space->read_dword(cop_regs[0] + 16 + offset * 4),m_host_space->read_dword(cop_regs[0] + 0x28 + offset * 4),cop_regs[0]); @@ -62,13 +62,13 @@ void raiden2cop_device::execute_0904(int offset, UINT16 data) */ // triggered with 130e, 138e -void raiden2cop_device::execute_130e(int offset, UINT16 data) +void raiden2cop_device::execute_130e(int offset, uint16_t data) { // this can't be right, or bits 15-12 from mask have different meaning ... execute_338e(offset, data); } -void raiden2cop_device::LEGACY_execute_130e_cupsoc(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_130e_cupsoc(int offset, uint16_t data) { int dy = m_host_space->read_dword(cop_regs[1] + 4) - m_host_space->read_dword(cop_regs[0] + 4); int dx = m_host_space->read_dword(cop_regs[1] + 8) - m_host_space->read_dword(cop_regs[0] + 8); @@ -110,7 +110,7 @@ void raiden2cop_device::LEGACY_execute_130e_cupsoc(int offset, UINT16 data) */ // also triggered with 0x2208 -void raiden2cop_device::execute_2288(int offset, UINT16 data) +void raiden2cop_device::execute_2288(int offset, uint16_t data) { int dx = m_host_space->read_word(cop_regs[0] + 0x12); int dy = m_host_space->read_word(cop_regs[0] + 0x16); @@ -135,7 +135,7 @@ void raiden2cop_device::execute_2288(int offset, UINT16 data) 05 - 2a05 ( 05) ( 205) : (9af, a82, 082, a8f, 18e, 000, 000, 000) 6 ebeb (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) */ -void raiden2cop_device::execute_2a05(int offset, UINT16 data) +void raiden2cop_device::execute_2a05(int offset, uint16_t data) { int delta = m_host_space->read_word(cop_regs[1] + 0x1e + offset * 4); m_host_space->write_dword(cop_regs[0] + 4 + 2 + offset * 4, m_host_space->read_word(cop_regs[0] + 4 + 2 + offset * 4) + delta); @@ -148,7 +148,7 @@ void raiden2cop_device::execute_2a05(int offset, UINT16 data) 06 - 338e ( 06) ( 38e) : (984, aa4, d82, aa2, 39c, b9c, b9c, a9a) 5 bf7f (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx) 06 - 330e ( 06) ( 30e) : (984, aa4, d82, aa2, 39c, b9c, b9c, a9a) 5 bf7f (zeroteam, xsedae) */ -void raiden2cop_device::execute_338e(int offset, UINT16 data) +void raiden2cop_device::execute_338e(int offset, uint16_t data) { int dx = m_host_space->read_dword(cop_regs[1] + 4) - m_host_space->read_dword(cop_regs[0] + 4); int dy = m_host_space->read_dword(cop_regs[1] + 8) - m_host_space->read_dword(cop_regs[0] + 8); @@ -185,7 +185,7 @@ void raiden2cop_device::execute_338e(int offset, UINT16 data) // triggered with 0x39b0, 0x3b30, 0x3bb0 -void raiden2cop_device::execute_3b30(int offset, UINT16 data) +void raiden2cop_device::execute_3b30(int offset, uint16_t data) { /* TODO: these are actually internally loaded via 0x130e command */ int dx, dy; @@ -209,7 +209,7 @@ void raiden2cop_device::execute_3b30(int offset, UINT16 data) ## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask 08 - 42c2 ( 08) ( 2c2) : (f9a, b9a, b9c, b9c, b9c, 29c, 000, 000) 5 fcdd (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) */ -void raiden2cop_device::execute_42c2(int offset, UINT16 data) +void raiden2cop_device::execute_42c2(int offset, uint16_t data) { int div = cop_read_word(cop_regs[0] + (0x36)); @@ -241,7 +241,7 @@ void raiden2cop_device::execute_42c2(int offset, UINT16 data) ## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask 09 - 4aa0 ( 09) ( 2a0) : (f9a, b9a, b9c, b9c, b9c, 99b, 000, 000) 5 fcdd (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) */ -void raiden2cop_device::execute_4aa0(int offset, UINT16 data) +void raiden2cop_device::execute_4aa0(int offset, uint16_t data) { int div = m_host_space->read_word(cop_regs[0] + (0x38)); if (!div) @@ -259,7 +259,7 @@ void raiden2cop_device::execute_4aa0(int offset, UINT16 data) 0a - 5205 ( 0a) ( 205) : (180, 2e0, 3a0, 0a0, 3a0, 000, 000, 000) 6 fff7 (raiden2, raidendx) 0a - 5105 ( 0a) ( 105) : (180, 2e0, 0a0, 000, 000, 000, 000, 000) 6 fffb (zeroteam, xsedae) */ -void raiden2cop_device::execute_5205(int offset, UINT16 data) +void raiden2cop_device::execute_5205(int offset, uint16_t data) { m_host_space->write_dword(cop_regs[1], m_host_space->read_dword(cop_regs[0])); } @@ -269,7 +269,7 @@ void raiden2cop_device::execute_5205(int offset, UINT16 data) 0b - 5a05 ( 0b) ( 205) : (180, 2e0, 3a0, 0a0, 3a0, 000, 000, 000) 6 fff7 (raiden2, raidendx) 0b - 5a85 ( 0b) ( 285) : (180, 2e0, 0a0, 182, 2e0, 0c0, 3c0, 3c0) 6 ffdb (zeroteam, xsedae) */ -void raiden2cop_device::execute_5a05(int offset, UINT16 data) +void raiden2cop_device::execute_5a05(int offset, uint16_t data) { m_host_space->write_dword(cop_regs[1], m_host_space->read_dword(cop_regs[0])); } @@ -279,13 +279,13 @@ void raiden2cop_device::execute_5a05(int offset, UINT16 data) 0c - 6200 ( 0c) ( 200) : (380, 39a, 380, a80, 29a, 000, 000, 000) 8 f3e7 (legionn, heatbrla, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) 0c - 6200 ( 0c) ( 200) : (3a0, 3a6, 380, aa0, 2a6, 000, 000, 000) 8 f3e7 (cupsoc) */ -void raiden2cop_device::execute_6200(int offset, UINT16 data) +void raiden2cop_device::execute_6200(int offset, uint16_t data) { int primary_reg = 0; int primary_offset = 0x34; - UINT8 angle = cop_read_byte(cop_regs[primary_reg] + primary_offset); - UINT16 flags = cop_read_word(cop_regs[primary_reg]); + uint8_t angle = cop_read_byte(cop_regs[primary_reg] + primary_offset); + uint16_t flags = cop_read_word(cop_regs[primary_reg]); cop_angle_target &= 0xff; cop_angle_step &= 0xff; flags &= ~0x0004; @@ -321,13 +321,13 @@ void raiden2cop_device::execute_6200(int offset, UINT16 data) } -void raiden2cop_device::LEGACY_execute_6200(int offset, UINT16 data) // this is for cupsoc, different sequence, works on different registers +void raiden2cop_device::LEGACY_execute_6200(int offset, uint16_t data) // this is for cupsoc, different sequence, works on different registers { int primary_reg = 1; int primary_offset = 0xc; - UINT8 angle = cop_read_byte(cop_regs[primary_reg] + primary_offset); - UINT16 flags = cop_read_word(cop_regs[primary_reg]); + uint8_t angle = cop_read_byte(cop_regs[primary_reg] + primary_offset); + uint16_t flags = cop_read_word(cop_regs[primary_reg]); cop_angle_target &= 0xff; cop_angle_step &= 0xff; flags &= ~0x0004; @@ -366,9 +366,9 @@ void raiden2cop_device::LEGACY_execute_6200(int offset, UINT16 data) // this is 0d - 6880 ( 0d) ( 080) : (b80, ba0, 000, 000, 000, 000, 000, 000) a fff3 (legionna, heatbrl, cupsoc, godzilla, denjinmk) 0d - 6980 ( 0d) ( 180) : (b80, ba0, 000, 000, 000, 000, 000, 000) a fff3 (grainbow, zeroteam, xsedae) */ -void raiden2cop_device::LEGACY_execute_6980(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_6980(int offset, uint16_t data) { - UINT8 offs; + uint8_t offs; int abs_x, abs_y, rel_xy; offs = (offset & 3) * 4; @@ -400,7 +400,7 @@ void raiden2cop_device::LEGACY_execute_6980(int offset, UINT16 data) 0f - 7e05 ( 0f) ( 605) : (180, 282, 080, 180, 282, 000, 000, 000) 6 fffb (raidendx) */ -void raiden2cop_device::execute_7e05(int offset, UINT16 data) // raidendx +void raiden2cop_device::execute_7e05(int offset, uint16_t data) // raidendx { m_host_space->write_byte(0x470, m_host_space->read_byte(cop_regs[4])); } @@ -410,7 +410,7 @@ void raiden2cop_device::execute_7e05(int offset, UINT16 data) // raidendx 10 - 8100 ( 10) ( 100) : (b9a, b88, 888, 000, 000, 000, 000, 000) 7 fdfb (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) */ -void raiden2cop_device::execute_8100(int offset, UINT16 data) +void raiden2cop_device::execute_8100(int offset, uint16_t data) { int raw_angle = (cop_read_word(cop_regs[0] + (0x34)) & 0xff); double angle = raw_angle * M_PI / 128; @@ -427,7 +427,7 @@ void raiden2cop_device::execute_8100(int offset, UINT16 data) ## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask 11 - 8900 ( 11) ( 100) : (b9a, b8a, 88a, 000, 000, 000, 000, 000) 7 fdfb (legionna, heatbrl, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) */ -void raiden2cop_device::execute_8900(int offset, UINT16 data) +void raiden2cop_device::execute_8900(int offset, uint16_t data) { int raw_angle = (cop_read_word(cop_regs[0] + (0x34)) & 0xff); double angle = raw_angle * M_PI / 128; @@ -466,7 +466,7 @@ void raiden2cop_device::execute_8900(int offset, UINT16 data) */ // the last value (ffff / 02ff / 00ff depending on game) might be important here as they've been intentionally changed for the different games -void raiden2cop_device::execute_a100(int offset, UINT16 data) +void raiden2cop_device::execute_a100(int offset, uint16_t data) { cop_collision_read_pos(0, cop_regs[0], data & 0x0080); } @@ -477,7 +477,7 @@ void raiden2cop_device::execute_a100(int offset, UINT16 data) 15 - a900 ( 15) ( 100) : (ba0, ba2, ba4, ba6, 000, 000, 000, 000) f ffff (heatbrl, zeroteam), xsedae 15 - a980 ( 15) ( 180) : (ba0, ba2, ba4, ba6, 000, 000, 000, 000) f 02ff (grainbow) 15 - a900 ( 15) ( 100) : (ba0, ba2, ba4, ba6, 000, 000, 000, 000) f 00ff (raiden2, raidendx)*/ -void raiden2cop_device::execute_a900(int offset, UINT16 data) +void raiden2cop_device::execute_a900(int offset, uint16_t data) { cop_collision_read_pos(1, cop_regs[1], data & 0x0080); } @@ -488,7 +488,7 @@ void raiden2cop_device::execute_a900(int offset, UINT16 data) 16 - b100 ( 16) ( 100) : (b40, bc0, bc2, 000, 000, 000, 000, 000) 9 ffff (legionna, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) 16 - b080 ( 16) ( 080) : (b40, bc0, bc2, 000, 000, 000, 000, 000) 9 ffff (heatbrl) */ -void raiden2cop_device::execute_b100(int offset, UINT16 data) +void raiden2cop_device::execute_b100(int offset, uint16_t data) { cop_collision_update_hitbox(data, 0, cop_regs[2]); } @@ -501,7 +501,7 @@ void raiden2cop_device::execute_b100(int offset, UINT16 data) 17 - b900 ( 17) ( 100) : (b60, be0, be2, 000, 000, 000, 000, 000) 6 ffff (legionna, cupsoc, grainbow, godzilla, denjinmk, raiden2, raidendx, zeroteam, xsedae) 17 - b880 ( 17) ( 080) : (b60, be0, be2, 000, 000, 000, 000, 000) 6 ffff (heatbrl) */ -void raiden2cop_device::execute_b900(int offset, UINT16 data) +void raiden2cop_device::execute_b900(int offset, uint16_t data) { cop_collision_update_hitbox(data, 1, cop_regs[3]); } @@ -514,9 +514,9 @@ void raiden2cop_device::execute_b900(int offset, UINT16 data) 18 - 7c80 ( 0f) ( 480) : (080, 882, 000, 000, 000, 000, 000, 000) a ff00 (zeroteam, xsedae) */ -void raiden2cop_device::LEGACY_execute_c480(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_c480(int offset, uint16_t data) { - UINT8 offs; + uint8_t offs; offs = (offset & 3) * 4; @@ -534,11 +534,11 @@ void raiden2cop_device::LEGACY_execute_c480(int offset, UINT16 data) ## - trig (up5) (low11) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask 1a - d104 ( 1a) ( 104) : (ac2, 9e0, 0a2, 000, 000, 000, 000, 000) 5 fffb (cupsoc, grainbow) */ -void raiden2cop_device::LEGACY_execute_d104(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_d104(int offset, uint16_t data) { - UINT16 *ROM = (UINT16 *)m_host_space->machine().root_device().memregion("maincpu")->base(); - UINT32 rom_addr = (m_cop_rom_addr_hi << 16 | m_cop_rom_addr_lo); - UINT16 rom_data = ROM[rom_addr / 2]; + uint16_t *ROM = (uint16_t *)m_host_space->machine().root_device().memregion("maincpu")->base(); + uint32_t rom_addr = (m_cop_rom_addr_hi << 16 | m_cop_rom_addr_lo); + uint16_t rom_data = ROM[rom_addr / 2]; /* writes to some unemulated COP registers, then puts the result in here, adding a parameter taken from ROM */ //m_host_space->write_word(cop_regs[0]+(0x44 + offset * 4), rom_data); @@ -550,12 +550,12 @@ void raiden2cop_device::LEGACY_execute_d104(int offset, UINT16 data) 1b - dde5 ( 1b) ( 5e5) : (f80, aa2, 984, 0c2, 000, 000, 000, 000) 5 7ff7 (cupsoc, grainbow) */ -void raiden2cop_device::LEGACY_execute_dde5(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_dde5(int offset, uint16_t data) { - UINT8 offs; + uint8_t offs; int div; - INT16 dir_offset; - // INT16 offs_val; + int16_t dir_offset; + // int16_t offs_val; /* TODO: [4-7] could be mirrors of [0-3] (this is the only command so far that uses 4-7 actually)*/ /* ? 0 + [4] */ @@ -591,7 +591,7 @@ void raiden2cop_device::LEGACY_execute_dde5(int offset, UINT16 data) 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) +void raiden2cop_device::LEGACY_execute_e30e(int offset, uint16_t 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); @@ -633,7 +633,7 @@ void raiden2cop_device::LEGACY_execute_e30e(int offset, UINT16 data) 1e - f790 ( 1e) ( 790) : (f80, b84, b84, b84, b84, b84, b84, b84) 4 00ff (zeroteam, xsedae) */ -void raiden2cop_device::execute_f205(int offset, UINT16 data) +void raiden2cop_device::execute_f205(int offset, uint16_t data) { m_host_space->write_dword(cop_regs[2], m_host_space->read_dword(cop_regs[0]+4)); } @@ -650,7 +650,7 @@ void raiden2cop_device::execute_f205(int offset, UINT16 data) [: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) +void raiden2cop_device::execute_f105(int offset, uint16_t data) { // ... } @@ -659,7 +659,7 @@ void raiden2cop_device::execute_f105(int offset, UINT16 data) // For reference only, will be nuked at some point -void raiden2cop_device::LEGACY_execute_130e(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_130e(int offset, uint16_t data) { int dy = m_host_space->read_dword(cop_regs[1] + 4) - m_host_space->read_dword(cop_regs[0] + 4); int dx = m_host_space->read_dword(cop_regs[1] + 8) - m_host_space->read_dword(cop_regs[0] + 8); @@ -682,7 +682,7 @@ void raiden2cop_device::LEGACY_execute_130e(int offset, UINT16 data) m_host_space->write_word(cop_regs[0] + (0x34 ^ 2), cop_angle); } -void raiden2cop_device::LEGACY_execute_3b30(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_3b30(int offset, uint16_t data) { int dy = m_LEGACY_r0; int dx = m_LEGACY_r1; @@ -695,7 +695,7 @@ void raiden2cop_device::LEGACY_execute_3b30(int offset, UINT16 data) m_host_space->write_word(cop_regs[0] + (0x38), cop_dist); } -void raiden2cop_device::LEGACY_execute_42c2(int offset, UINT16 data) +void raiden2cop_device::LEGACY_execute_42c2(int offset, uint16_t data) { int dy = m_LEGACY_r0; int dx = m_LEGACY_r1; @@ -731,7 +731,7 @@ void raiden2cop_device::LEGACY_execute_42c2(int offset, UINT16 data) } // used by seibu cup soccer, not sure if right so left out -void raiden2cop_device::execute_5105(int offset, UINT16 data) +void raiden2cop_device::execute_5105(int offset, uint16_t data) { int res = m_host_space->read_dword(cop_regs[0]) + m_host_space->read_dword(cop_regs[0]+8); m_host_space->write_dword(cop_regs[0]+4, res); @@ -742,7 +742,7 @@ void raiden2cop_device::execute_5105(int offset, UINT16 data) [: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) */ -void raiden2cop_device::execute_5905(int offset, UINT16 data) +void raiden2cop_device::execute_5905(int offset, uint16_t data) { int res = m_host_space->read_dword(cop_regs[2]+10 + offset*4) - m_host_space->read_dword(cop_regs[0]+8 + offset*4); m_host_space->write_dword(cop_regs[1]+4 + offset *4, res); |