1 #include "../copyright"
2 
3 #ifndef _DSP4_H_
4 #define _DSP4_H_
5 
6 /* op control */
7 int8_t DSP4_Logic; /* controls op flow */
8 
9 /* projection format */
10 const int16_t PLANE_START = 0x7fff; /* starting distance */
11 
12 int16_t view_plane; /* viewer location */
13 int16_t far_plane;  /* next milestone into screen */
14 int16_t segments;   /* # raster segments to draw */
15 int16_t raster;     /* current raster line */
16 
17 int16_t project_x; /* current x-position */
18 int16_t project_y; /* current y-position */
19 
20 int16_t project_centerx; /* x-target of projection */
21 int16_t project_centery; /* y-target of projection */
22 
23 int16_t project_x1;    /* current x-distance */
24 int16_t project_x1low; /* lower 16-bits */
25 int16_t project_y1;    /* current y-distance */
26 int16_t project_y1low; /* lower 16-bits */
27 
28 int16_t project_x2; /* next projected x-distance */
29 int16_t project_y2; /* next projected y-distance */
30 
31 int16_t project_pitchx;    /* delta center */
32 int16_t project_pitchxlow; /* lower 16-bits */
33 int16_t project_pitchy;    /* delta center */
34 int16_t project_pitchylow; /* lower 16-bits */
35 
36 int16_t project_focalx; /* x-point of projection at viewer plane */
37 int16_t project_focaly; /* y-point of projection at viewer plane */
38 
39 int16_t project_ptr; /* data structure pointer */
40 
41 /* render window */
42 int16_t center_x;        /* x-center of viewport */
43 int16_t center_y;        /* y-center of viewport */
44 int16_t viewport_left;   /* x-left of viewport */
45 int16_t viewport_right;  /* x-right of viewport */
46 int16_t viewport_top;    /* y-top of viewport */
47 int16_t viewport_bottom; /* y-bottom of viewport */
48 
49 /* sprite structure */
50 int16_t sprite_x;      /* projected x-pos of sprite */
51 int16_t sprite_y;      /* projected y-pos of sprite */
52 int16_t sprite_offset; /* data pointer offset */
53 int8_t sprite_type;    /* vehicle, terrain */
54 bool sprite_size;      /* sprite size: 8x8 or 16x16 */
55 
56 /* path strips */
57 int16_t path_clipRight[4]; /* value to clip to for x>b */
58 int16_t path_clipLeft[4];  /* value to clip to for x<a */
59 int16_t path_pos[4];       /* x-positions of lanes */
60 int16_t path_ptr[4];       /* data structure pointers */
61 int16_t path_raster[4];    /* current raster */
62 int16_t path_top[4];       /* viewport_top */
63 
64 int16_t path_y[2];     /* current y-position */
65 int16_t path_x[2];     /* current focals */
66 int16_t path_plane[2]; /* previous plane */
67 
68 /* op09 window sorting */
69 int16_t multi_index1; /* index counter */
70 int16_t multi_index2; /* index counter */
71 bool op09_mode;       /* window mode */
72 
73 /* multi-op storage */
74 int16_t multi_focaly[64];  /* focal_y values */
75 int16_t multi_farplane[4]; /* farthest drawn distance */
76 int16_t multi_raster[4];   /* line where track stops */
77 
78 /* OAM */
79 int8_t op06_OAM[32]; /* OAM (size,MSB) data */
80 int8_t op06_index;   /* index into OAM table */
81 int8_t op06_offset;  /* offset into OAM table */
82 #endif
83