trunk/src/mame/machine/seicop.c
| r32335 | r32336 | |
| 1601 | 1601 | seibu_cop_legacy_device::seibu_cop_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1602 | 1602 | : device_t(mconfig, SEIBU_COP_LEGACY, "Seibu COP Legacy", tag, owner, clock, "seibu_cop_legacy", __FILE__), |
| 1603 | 1603 | m_cop_mcu_ram(NULL), |
| 1604 | | m_copd2_offs(0), |
| 1605 | 1604 | m_cop_hit_val_x(0), |
| 1606 | 1605 | m_cop_hit_val_y(0), |
| 1607 | 1606 | m_cop_hit_val_z(0), |
| 1608 | | m_cop_hit_val_unk(0), |
| 1609 | 1607 | m_legacycop_angle_compare(0), |
| 1610 | 1608 | m_legacycop_angle_mod_val(0), |
| 1611 | 1609 | m_r0(0), |
| r32335 | r32336 | |
| 1645 | 1643 | m_cop_mcu_ram = reinterpret_cast<UINT16 *>(machine().root_device().memshare("cop_mcu_ram")->ptr()); |
| 1646 | 1644 | |
| 1647 | 1645 | |
| 1648 | | save_item(NAME(m_copd2_offs)); |
| 1649 | 1646 | save_item(NAME(m_cop_hit_val_x)); |
| 1650 | 1647 | save_item(NAME(m_cop_hit_val_y)); |
| 1651 | 1648 | save_item(NAME(m_cop_hit_val_z)); |
| 1652 | | save_item(NAME(m_cop_hit_val_unk)); |
| 1653 | 1649 | save_item(NAME(m_legacycop_angle_compare)); |
| 1654 | 1650 | save_item(NAME(m_legacycop_angle_mod_val)); |
| 1655 | 1651 | save_item(NAME(m_r0)); |
| r32335 | r32336 | |
| 2022 | 2018 | m_cop_hit_val_x = (m_cop_collision_info[0].x - m_cop_collision_info[1].x) >> 16; |
| 2023 | 2019 | m_cop_hit_val_y = (m_cop_collision_info[0].y - m_cop_collision_info[1].y) >> 16; |
| 2024 | 2020 | m_cop_hit_val_z = 1; |
| 2025 | | m_cop_hit_val_unk = res; // TODO: there's also bit 2 and 3 triggered in the tests, no known meaning |
| 2021 | m_raiden2cop->cop_hit_val_stat = res; // TODO: there's also bit 2 and 3 triggered in the tests, no known meaning |
| 2026 | 2022 | |
| 2027 | 2023 | //popmessage("%d %d %04x %04x %04x %04x",m_cop_hit_val_x,m_cop_hit_val_y,m_cop_collision_info[0].hitbox_x,m_cop_collision_info[0].hitbox_y,m_cop_collision_info[1].hitbox_x,m_cop_collision_info[1].hitbox_y); |
| 2028 | 2024 | |
| r32335 | r32336 | |
| 2054 | 2050 | case 0x186/2: |
| 2055 | 2051 | return (m_cop_hit_val_z); |
| 2056 | 2052 | |
| 2057 | | case 0x188/2: |
| 2058 | | return m_cop_hit_val_unk; |
| 2059 | 2053 | |
| 2060 | 2054 | |
| 2061 | 2055 | |
trunk/src/mame/drivers/legionna.c
| r32335 | r32336 | |
| 122 | 122 | AM_RANGE(0x1004a0, 0x1004ad) AM_DEVREADWRITE("raiden2cop", raiden2cop_device, cop_reg_high_r, cop_reg_high_w) |
| 123 | 123 | AM_RANGE(0x1004c0, 0x1004cd) AM_DEVREADWRITE("raiden2cop", raiden2cop_device, cop_reg_low_r, cop_reg_low_w) |
| 124 | 124 | // AM_RANGE(0x100500, 0x100505) AM_WRITE(cop_cmd_w) |
| 125 | | // AM_RANGE(0x100580, 0x100581) AM_READ(cop_collision_status_r) |
| 125 | AM_RANGE(0x100580, 0x100581) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_collision_status_r) |
| 126 | 126 | // AM_RANGE(0x100582, 0x100587) AM_READ(cop_collision_status_val_r) |
| 127 | | // AM_RANGE(0x100588, 0x100589) AM_READ(cop_collision_status_stat_r) |
| 127 | AM_RANGE(0x100588, 0x100589) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_collision_status_stat_r) |
| 128 | 128 | AM_RANGE(0x100590, 0x100599) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_itoa_digits_r) |
| 129 | 129 | |
| 130 | 130 | AM_RANGE(0x1005a0, 0x1005a7) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_prng_r) |