forked from historicalsource/smashtv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DISP.EQU
115 lines (112 loc) · 3.98 KB
/
DISP.EQU
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.GLOBAL OFREE,OBJLST,BAKLST,DISPLAYON,SCRNRELV
.GLOBAL OINIT,GETOBJ,INSOBJ,DELOBJ,DISPLAY,ADDOBJ,KILOBJ,OBJSTR,DISPH
.GLOBAL ANI,STFOBJ,MAKOBJ,SCRTST,SCRTSTG,GSAGOF,GANIOF
.GLOBAL YZSORT,INSBOBJ,KILBOBJ
.GLOBAL PULLBOBJ,PULLOBJ,GANISAG,ADJSTWTL,CLIPOBJ
.GLOBAL QDMA,QDMAN,GETANIXY
.GLOBAL SCROLLX,SCROLLY,WORLDTLX,WORLDTLY,WORLDTL
.GLOBAL SCRNTL,SCRNLR,GSCRNREL,ADJNEWTL
.GLOBAL OBJSTR,SCREENTL,SCREENLR,QSYNC,DMAQCUR,DMAQCNT
.GLOBAL BOTQ0CNT,BOTQ1CNT,TOPQ0CNT,TOPQ1CNT,BOTQ0FLG,BOTQ1FLG
.GLOBAL TOPQ0FLG,TOPQ1FLG,BOTQ0,BOTQ1,TOPQ0,TOPQ1,STOPOBJS
.GLOBAL FREEOBJ,FREEOBJE
.GLOBAL EXISTOBJ,DMAINT
.GLOBAL DISPQT,ENDOFREE,ISOBJ
.GLOBAL BEGINOBJ,BEGINOBJ2,BKGSAGOF
*
*GLOBALS CONNECTED TO NARC
.GLOBAL DFRMGRND,CURPAL,DUMCOLL
*
*CONSTANTS
*
;
SCRNST .EQU [1,5] ;TOP LEFT OF SCREEN
SCRNEND .EQU [252,395] ;BOTTOM RIGHT OF SCREEN
SCRNMID .EQU [128,200] ;MIDPOINT OF SCREEN
;SHADID .EQU 00FFFH ;SHADOWS ARE HIGH PRI
*
*OBJECT INITIALIZATION TABLE
INITXVAL .EQU 0
INITYVAL .EQU 20H
INITIMG .EQU 40H
INITZPOS .EQU 60H
INITFLAGS .EQU 70H
INITID .EQU 80H
INITXVEL .EQU 90H
INITYVEL .EQU 0B0H
;INITCVECT .EQU 0D0H
*
* OBJECT BLOCK LAYOUT
*
*STRUCT OBJ
OLINK .EQU 0 ;UHL 32 BIT LINK TO NEXT OBJECT BLOCK
OXVEL .EQU 20H ;UHL 32 BIT X VELOCITY 16.16
OYVEL .EQU 40H ;UHL 32 BIT Y VELOCITY 16.16
OXVAL .EQU 60H ;UHL 32 BIT X POSITION
OXFRAC .EQU 60H ; FRACTIONAL PORTION OF X POSITION
OXPOS .EQU 70H ; INTEGER PORTION OF X POSITION
OYVAL .EQU 080H ;UHL 32 BIT Y POSITION
OYFRAC .EQU 080H ; FRACTIONAL PORTION OF Y POSITION
OYPOS .EQU 090H ; INTEGER PORTION OF Y POSITION
;OZVAL .EQU 0A0H ; 32 BIT Z POSITION
OZPOS .EQU 0A0H ;UHW INTEGER Z POSITION OF OBJECT
;OZVEL .EQU 0C0H ; 32 BIT Z VELOCITY
OFLAGS .EQU 0B0H ;UHW 32 BIT BITS 0 - 5 DMA CONTROL; B16-31= OFFSET PRECOMPUTED
OFSET .EQU 0C0H ;UHW PRECOMPUTED OFFSET
OSAG .EQU 0D0H ;UHL 32 BIT SOURCE ADDRESS (UNCLIPPED, ADJUSTED FOR FLIPS)
OSIZE .EQU 0F0H ; 32 BIT H,W OF OBJECT (16,16) W=ADJUSTED FOR MORSEL
OSIZEX .EQU 0F0H ;UHW X SIZE
OSIZEY .EQU 100H ;UHW Y SIZE
OPAL .EQU 110H ;UHW PALLETTE
OCONST .EQU 120H ;CONSTANT COLOR
OIMG .EQU 130H ;UHL 32 BIT POINTER TO IMAGE DATA TABLE
OID .EQU 150H ;UHW 16 BIT OBJECT ID
;OZSIZ .EQU 190H ; 32 BIT Z THICKNESS
;OZMINUS .EQU 1B0H ; THICKNESS ALONG MINUS Z
;OZPLUS .EQU 1C0H ; THICKNESS ALONG PLUS Z
;OCVECT .EQU 180H ; 32 BIT LINK TO COLLISION HANDLER
OPLINK .EQU 160H ;UHL 32 BIT LINK TO CONTROLLING PROCESS
ODMAXY .EQU 180H ; 32 BIT SCREEN COORD OF OBJECT
ODMAX .EQU 180H ;X COORDINATE
ODMAY .EQU 190H ;Y COORDINATE
OXCLIP .EQU 1A0H ;UHW 16 BIT TOTAL X PRECLIP
;OSHAD .EQU 1C0H ;32 BIT SHADOW LINK
OCOLLIDE .EQU 1E0H
OBSIZ .EQU 1F0H
*ENDSTRUCT
NOBJ .EQU 420 ; OBJECTS TO DISPLAY
*
BQCELL .EQU 0A0H ;SIZE OF DMA QUEUE ELEMENT
***********************
* VALUES FOR OFLAGS *
***********************
M_WRZERO .EQU 1 ;WRITE ZERO DATA
M_WRNONZ .EQU 2 ;WRITE NON-ZERO DATA
M_CONZER .EQU 4 ;REPLACE ZERO DATA WITH CONSTANT
M_CONNON .EQU 8 ;REPLACE NON-ZERO DATA WITH CONSTANT
M_CONST .EQU 0CH ;ANY CONSTANT DATA REPLACEMENT
M_FLIPH .EQU 010H ;FLIP HORIZONTALLY
M_FLIPV .EQU 020H ;FLIP VERTICALLY
M_NODIS .EQU 0100H ;IGNORE THIS ENTRY
M_PZPLUS .EQU 0200H ;TAKE Z VALUE FROM RAM LOC. PREVZ AND ADD 1
M_PIXSCAN .EQU 0400H ;IF=1 O.K. TO PIXEL SCAN WITH THIS OBJECT
M_NOCOLL .EQU 0800H ;IF=1 OBJECT NOT COLLIDABLE
M_PREVZ .EQU 01000H ;TAKE Z VALUE FROM RAM LOC. PREVZ
M_NOMOV .EQU 02000H ;DO NOT ADD VELOCITIES
M_INUSE .set 08000H ;obj in use by display system
*
*BIT POSITIONS FOR OFLAGS
B_WRZERO .EQU 0
B_WRNONZ .EQU 1
B_CONZER .EQU 2
B_CONNON .EQU 3
B_FLIPH .EQU 4
B_FLIPV .EQU 5
B_NODIS .EQU 8
B_PZPLUS .EQU 9
B_PIXSCAN .EQU 10
B_NOCOLL .EQU 11
B_PREVZ .EQU 12
B_NOMOV .EQU 13
B_INUSE .set 15