Previous 199869 Revisions Next

r32035 Tuesday 9th September, 2014 at 20:20:11 UTC by Angelo Salese
Fixed radar for Seibu Cup Soccer
[src/mame/machine]seicop.c

trunk/src/mame/machine/seicop.c
r32034r32035
27392739                  m_cop_angle += 0x80;
27402740            }
27412741
2742            m_cop_angle-=0x80;
27422743            m_r0 = dy;
27432744            m_r1 = dx;
27442745
r32034r32035
29112912         {
29122913            UINT8 offs;
29132914            int div;
2915            INT16 dir_offset;
29142916//              INT16 offs_val;
29152917
29162918            /* TODO: [4-7] could be mirrors of [0-3] (this is the only command so far that uses 4-7 actually)*/
2917            /* 0 + [4] */
2918            /* 4 + [5] */
2919            /* 8 + [4] */
2920            /* 4 + [6] */
2919            /* ? 0 + [4] */
2920            /* sub32 4 + [5] */
2921            /* write16h 8 + [4] */
2922            /* addmem16 4 + [6] */
29212923
29222924            // these two are obvious ...
29232925            // 0xf x 16 = 240
29242926            // 0x14 x 16 = 320
2925            // what are these two instead? scale factor? offsets?
2927            // what are these two instead? scale factor? offsets? (edit: offsets to apply from the initial sprite data)
29262928            // 0xfc69 ?
29272929            // 0x7f4 ?
29282930            //printf("%08x %08x %08x %08x %08x %08x %08x\n",m_cop_register[0],m_cop_register[1],m_cop_register[2],m_cop_register[3],m_cop_register[4],m_cop_register[5],m_cop_register[6]);
29292931
29302932            offs = (offset & 3) * 4;
29312933
2932            div = space.read_word(m_cop_register[4] + offs) + 1;
2934            div = space.read_word(m_cop_register[4] + offs);
2935            dir_offset = space.read_word(m_cop_register[4] + offs + 8);
29332936//              offs_val = space.read_word(m_cop_register[3] + offs);
29342937            //420 / 180 = 500 : 400 = 30 / 50 = 98 / 18
2935
2938           
2939            /* TODO: this probably trips a cop status flag */
29362940            if(div == 0) { div = 1; }
2937
2938            space.write_word((m_cop_register[6] + offs + 4), ((space.read_word(m_cop_register[5] + offs + 4)) / div));
2941           
2942           
2943            space.write_word((m_cop_register[6] + offs + 4), ((space.read_word(m_cop_register[5] + offs + 4) + dir_offset) / div));
29392944            return;
29402945         }
29412946

Previous 199869 Revisions Next


© 1997-2024 The MAME Team