Previous 199869 Revisions Next

r32336 Wednesday 24th September, 2014 at 00:34:50 UTC by David Haywood
another step (nw)
[src/mame/drivers]legionna.c
[src/mame/machine]raiden2cop.c seicop.c seicop.h

trunk/src/mame/machine/seicop.c
r32335r32336
16011601seibu_cop_legacy_device::seibu_cop_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
16021602   : device_t(mconfig, SEIBU_COP_LEGACY, "Seibu COP Legacy", tag, owner, clock, "seibu_cop_legacy", __FILE__),
16031603   m_cop_mcu_ram(NULL),
1604   m_copd2_offs(0),
16051604   m_cop_hit_val_x(0),
16061605   m_cop_hit_val_y(0),
16071606   m_cop_hit_val_z(0),
1608   m_cop_hit_val_unk(0),
16091607   m_legacycop_angle_compare(0),
16101608   m_legacycop_angle_mod_val(0),
16111609   m_r0(0),
r32335r32336
16451643   m_cop_mcu_ram = reinterpret_cast<UINT16 *>(machine().root_device().memshare("cop_mcu_ram")->ptr());
16461644
16471645
1648   save_item(NAME(m_copd2_offs));
16491646   save_item(NAME(m_cop_hit_val_x));
16501647   save_item(NAME(m_cop_hit_val_y));
16511648   save_item(NAME(m_cop_hit_val_z));
1652   save_item(NAME(m_cop_hit_val_unk));
16531649   save_item(NAME(m_legacycop_angle_compare));
16541650   save_item(NAME(m_legacycop_angle_mod_val));
16551651   save_item(NAME(m_r0));
r32335r32336
20222018   m_cop_hit_val_x = (m_cop_collision_info[0].x - m_cop_collision_info[1].x) >> 16;
20232019   m_cop_hit_val_y = (m_cop_collision_info[0].y - m_cop_collision_info[1].y) >> 16;
20242020   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
20262022
20272023   //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);
20282024
r32335r32336
20542050      case 0x186/2:
20552051         return (m_cop_hit_val_z);
20562052
2057      case 0x188/2:
2058         return m_cop_hit_val_unk;
20592053
20602054
20612055
trunk/src/mame/machine/seicop.h
r32335r32336
4242
4343
4444
45   UINT16 m_copd2_offs;
46   INT16 m_cop_hit_val_x,m_cop_hit_val_y,m_cop_hit_val_z,m_cop_hit_val_unk;
45   INT16 m_cop_hit_val_x,m_cop_hit_val_y,m_cop_hit_val_z;
4746   INT8 m_legacycop_angle_compare;
4847   INT8 m_legacycop_angle_mod_val;
4948   struct collision_info m_cop_collision_info[2];
trunk/src/mame/machine/raiden2cop.c
r32335r32336
624624// according to score display in  https://www.youtube.com/watch?v=T1M8sxYgt9A
625625// we should return 0x30 for unused digits? according to Raiden 2 and Zero
626626// Team the value should be 0x20, can this be configured?
627// grainbow doesn't like this implementation at all (21 credits, 2 digit high scores etc.)
627628WRITE16_MEMBER(raiden2cop_device::cop_itoa_low_w)
628629{
629630   cop_itoa = (cop_itoa & ~UINT32(mem_mask)) | (data & mem_mask);
trunk/src/mame/drivers/legionna.c
r32335r32336
122122   AM_RANGE(0x1004a0, 0x1004ad) AM_DEVREADWRITE("raiden2cop", raiden2cop_device, cop_reg_high_r, cop_reg_high_w)
123123   AM_RANGE(0x1004c0, 0x1004cd) AM_DEVREADWRITE("raiden2cop", raiden2cop_device, cop_reg_low_r, cop_reg_low_w)
124124//   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)
126126//   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)
128128   AM_RANGE(0x100590, 0x100599) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_itoa_digits_r)
129129
130130   AM_RANGE(0x1005a0, 0x1005a7) AM_DEVREAD("raiden2cop", raiden2cop_device, cop_prng_r)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team