trunk/src/mame/machine/raiden2cop.c
| r32364 | r32365 | |
| 184 | 184 | else return space.read_byte(address); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | void raiden2cop_device::cop_write_word(address_space &space, int address, UINT16 data) |
| 188 | { |
| 189 | if (m_cpu_is_68k) space.write_word(address ^ 2, data); |
| 190 | else space.write_word(address, data); |
| 191 | } |
| 187 | 192 | |
| 193 | |
| 188 | 194 | /*** Command Table uploads ***/ |
| 189 | 195 | |
| 190 | 196 | |
| r32364 | r32365 | |
| 768 | 774 | int npos = ppos + space.read_dword(cop_regs[0] + 0x10 + offset * 4); |
| 769 | 775 | int delta = (npos >> 16) - (ppos >> 16); |
| 770 | 776 | space.write_dword(cop_regs[0] + 4 + offset * 4, npos); |
| 771 | | space.write_word(cop_regs[0] + 0x1e + offset * 4, space.read_word(cop_regs[0] + 0x1e + offset * 4) + delta); |
| 777 | cop_write_word(space,cop_regs[0] + 0x1e + offset * 4, cop_read_word(space, cop_regs[0] + 0x1e + offset * 4) + delta); |
| 772 | 778 | } |
| 773 | 779 | |
| 774 | | void raiden2cop_device::LEGACY_execute_0205(address_space &space, int offset, UINT16 data) |
| 775 | | { |
| 776 | | UINT8 offs; |
| 777 | | |
| 778 | | offs = (offset & 3) * 4; |
| 779 | | int ppos = space.read_dword(cop_regs[0] + 4 + offs); |
| 780 | | int npos = ppos + space.read_dword(cop_regs[0] + 0x10 + offs); |
| 781 | | int delta = (npos >> 16) - (ppos >> 16); |
| 782 | | |
| 783 | | space.write_dword(cop_regs[0] + 4 + offs, npos); |
| 784 | | space.write_word(cop_regs[0] + 0x1c + offs, space.read_word(cop_regs[0] + 0x1c + offs) + delta); |
| 785 | | } |
| 786 | | |
| 787 | 780 | /* |
| 788 | 781 | 01 - 0905 (0905 ) : (194, 288, 088, 000, 000, 000, 000, 000) 6 fbfb (heatbrl, legionna, cupsoc, godzilla, grainbow, denjinmk, raiden2, raidendx, zeroteam, xsedae) |
| 789 | 782 | 01 - 0b05 (0b05 ) : (180, 2e0, 0a0, 182, 2e0, 0c0, 000, 000) 6 ffdb (zeroteamsr) |
| r32364 | r32365 | |
| 1989 | 1982 | if (check_command_matches(command, 0x188, 0x282, 0x082, 0xb8e, 0x98e, 0x000, 0x000, 0x000, 6, 0xffeb)) |
| 1990 | 1983 | { |
| 1991 | 1984 | executed = 1; |
| 1992 | | LEGACY_execute_0205(space, offset, data); |
| 1985 | execute_0205(space, offset, data); |
| 1993 | 1986 | return; |
| 1994 | 1987 | } |
| 1995 | 1988 | |
trunk/src/mame/machine/raiden2cop.h
| r32364 | r32365 | |
| 177 | 177 | void LEGACY_execute_b100(address_space &space, int offset, UINT16 data); |
| 178 | 178 | void LEGACY_execute_a900(address_space &space, int offset, UINT16 data); |
| 179 | 179 | void LEGACY_execute_b900(address_space &space, int offset, UINT16 data); |
| 180 | | void LEGACY_execute_0205(address_space &space, int offset, UINT16 data); |
| 181 | 180 | void LEGACY_execute_42c2(address_space &space, int offset, UINT16 data); |
| 182 | 181 | void LEGACY_execute_e30e(address_space &space, int offset, UINT16 data); |
| 183 | 182 | void LEGACY_execute_6200(address_space &space, int offset, UINT16 data); |
| r32364 | r32365 | |
| 259 | 258 | static void set_cpu_is_68k(device_t &device, int value) { downcast<raiden2cop_device &>(device).m_cpu_is_68k = value; } |
| 260 | 259 | UINT16 cop_read_word(address_space &space, int address); |
| 261 | 260 | UINT8 cop_read_byte(address_space &space, int address); |
| 261 | void cop_write_word(address_space &space, int address, UINT16 data); |
| 262 | 262 | |
| 263 | 263 | // DEBUG |
| 264 | 264 | void dump_table(); |