Previous 199869 Revisions Next

r18005 Tuesday 18th September, 2012 at 22:12:17 UTC by Angelo Salese
0x6200 note, nw
[src/mame/machine]seicop.c

trunk/src/mame/machine/seicop.c
r18004r18005
15271527
152815280x00  0x00 | 0x0067 0x10 0x2d  0x0000 0x0001 0x0020  0xb5 0x0b50
15291529
1530*same as 0x3bb0
15301531
1531*same as 0x3bb0
1532command 0x6200
1533raw angle|angle compare|angle mod value| res |
1534---------|-------------|---------------|-----|
15350x00      ****          0x00            0x00
15360x00      0x00          0x20            0x00
15370x00      0x20          0x20            0x20
15380x00      0x40          0x20            0x20
15390x00      0x60          0x20            0x20
15400x00      0x80          0x20            0xe0
15410x00      0xa0          0x20            0xe0
15420x00      0xc0          0x20            0xe0
15430x00      0xe0          0x20            0xe0
15440x00      0x00          0x40            0x00
15450x00      0x20          0x40            0x20
15460x00      0x40          0x40            0x40
15470x00      0x60          0x40            0x40
15480x00      0x80          0x40            0xc0
15490x00      0xa0          0x40            0xc0
15500x00      0xc0          0x40            0xc0
15510x00      0xe0          0x40            0xe0
15520x00      0x00          0x60            0x00
15530x00      0x20          0x60            0x20
15540x00      0x40          0x60            0x60 *
15550x00      0x60          0x60            0x60
15560x00      0x80          0x60            0xa0
15570x00      0xa0          0x60            0xa0
15580x00      0xc0          0x60            0xc0
15590x00      0xe0          0x60            0xe0
15600x00      0x00          0x80            0x00
15610x00      0x20          0x80            0x80 *
15620x00      0x40          0x80            0x80 *
15630x00      0x60          0x80            0x80 *
15640x00      0x80          0x80            0x80 *
15650x00      0xa0          0x80            0x80
15660x00      0xc0          0x80            0x80
15670x00      0xe0          0x80            0x80
15680x00      0x00          0xa0            0x00
15690x00      0x20          0xa0            0x20
15700x00      0x40          0xa0            0xa0
15710x00      0x60          0xa0            0xa0
15720x00      0x80          0xa0            0x60
15730x00      0xa0          0xa0            0x60
15740x00      0xc0          0xa0            0x60
15750x00      0xe0          0xa0            0xe0
15760x00      0x00          0xc0            0x00
15770x00      0x20          0xc0            0x20
15780x00      0x40          0xc0            0xc0
15790x00      0x60          0xc0            ****
15800x00      0x80          0xc0            0x40
15810x00      0xa0          0xc0            ****
15820x00      0xc0          0xc0            0xc0
15830x00      0xe0          0xc0            0xe0
15840x00      0x00          0xe0            0x00
15850x00      0x20          0xe0            0x20
15860x00      0x40          0xe0            0xe0
15870x00      0x60          0xe0            0xe0
15880x00      0x80          0xe0            0x20
15890x00      0xa0          0xe0            0x20
15900x00      0xc0          0xe0            0xc0
15910x00      0xe0          0xe0            0xe0
15321592*/
15331593
15341594#include "emu.h"
r18004r18005
18681928static INT16 cop_hit_val_x,cop_hit_val_y,cop_hit_val_z,cop_hit_val_unk;
18691929static UINT32 cop_sort_lookup,cop_sort_ram_addr,cop_sort_param;
18701930static INT8 cop_angle_compare;
1871static UINT8 cop_angle_mod_val;
1931static INT8 cop_angle_mod_val;
18721932static struct
18731933{
18741934   int x,y;
r18004r18005
20912151         break;
20922152
20932153      /* triggered before 0x6200 in Seibu Cup, looks like an angle value ... */
2094      case (0x01c/2): cop_angle_compare = cop_mcu_ram[0x1c/2] & 0xff;   break;
2095      case (0x01e/2): cop_angle_mod_val = cop_mcu_ram[0x1e/2] & 0xff; break;
2154      case (0x01c/2): cop_angle_compare = INT8(cop_mcu_ram[0x1c/2]);   break;
2155      case (0x01e/2): cop_angle_mod_val = INT8(cop_mcu_ram[0x1e/2]); break;
20962156
20972157      case (0x08c/2): cop_sprite_dma_abs_y = (cop_mcu_ram[0x08c/2]); break;
20982158      case (0x08e/2): cop_sprite_dma_abs_x = (cop_mcu_ram[0x08e/2]); break;
r18004r18005
26582718         {
26592719            INT8 cur_angle;
26602720
2661            cur_angle = space.read_byte(cop_register[0] + (0x34 ^ 3));
2721            cur_angle = INT8(space.read_byte(cop_register[0] + (0x34 ^ 3)));
26622722            //space.write_byte(cop_register[0] + (0^3),space.read_byte(cop_register[0] + (0^3)) & 0xfb); //correct?
2723            /*
2724            0x00      0x00          0x60            0x00
2725            0x00      0x20          0x60            0x20
2726            0x00      0x40          0x60            0x60
2727            0x00      0x60          0x60            0x60
2728            0x00      0x80          0x60            0xa0
2729            0x00      0xa0          0x60            0xa0
2730            0x00      0xc0          0x60            0xc0
2731            0x00      0xe0          0x60            0xe0
2732            */
26632733
2664            if(cur_angle >= cop_angle_compare)
2734            if(cur_angle > cop_angle_compare)
26652735            {
26662736               cur_angle -= cop_angle_mod_val;
26672737
2668               if(cur_angle <= cop_angle_compare)
2669               {
2738               if(cur_angle < cop_angle_compare)
26702739                  cur_angle = cop_angle_compare;
2671                  //space.write_byte(cop_register[0] + (0^3),space.read_byte(cop_register[0] + (0^3)) | 2);
2672               }
26732740            }
2674            else if(cur_angle <= cop_angle_compare)
2741            else if(cur_angle < cop_angle_compare)
26752742            {
26762743               cur_angle += cop_angle_mod_val;
26772744
2678               if(cur_angle >= cop_angle_compare)
2679               {
2745               if(cur_angle > cop_angle_compare)
26802746                  cur_angle = cop_angle_compare;
2681                  //space.write_byte(cop_register[0] + (0^3),space.read_byte(cop_register[0] + (0^3)) | 2);
2682               }
26832747            }
26842748
26852749            space.write_byte(cop_register[0] + (0x34 ^ 3),cur_angle);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team