-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpfscroll_proto.asm
145 lines (111 loc) · 3.32 KB
/
pfscroll_proto.asm
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
;==============================================================================
; mzxrules 2024
;==============================================================================
processor 6502
TIA_BASE_ADDRESS = $00
INCLUDE "vcs.h"
INCLUDE "macro.h"
INCLUDE "zmacros.asm"
; ****************************************
; * Variables *
; ****************************************
SEG.U VARS
ORG $80
Frame ds 1
roomIdNext ds 1
roomId ds 1
roomTimer ds 1
roomFlags ds 1
RF_EV_LOAD = $80 ; 1000_0000 Force Load Room
RF_EV_LOADED = $40 ; 0100_0000 Room Load happened this frame
roomDY ds 1
; Temps
Temp0 ds 1
Temp1 ds 1
Temp2 ds 1
; Debug
testIndex = Temp2
; ****************************************
; * Extended RAM *
; ****************************************
ORG $F800
rRAM_SEG
rPF1RoomL ds ROOM_PX_HEIGHT
rPF2Room ds ROOM_PX_HEIGHT
rPF1RoomR ds ROOM_PX_HEIGHT
ORG $FA00
wRAM_SEG
wPF1RoomL ds ROOM_PX_HEIGHT
wPF2Room ds ROOM_PX_HEIGHT
wPF1RoomR ds ROOM_PX_HEIGHT
ROOM_PX_HEIGHT = 20
; ****************************************
; * Constants *
; ****************************************
; Segment Constants
RAMSEG_F0 = $00
RAMSEG_F4 = $40
RAMSEG_F8 = $80
RAMSEG_FC = $C0
BANK_SLOT_RAM = $3E
BANK_SLOT = $3F
SLOT_FC_MAIN = RAMSEG_FC | 0
SLOT_FC_HALT_RSCR = RAMSEG_FC | 1
SLOT_F4_PF = RAMSEG_F4 | 2
SLOT_F0_ROOM = RAMSEG_F0 | 3
SLOT_F4_ROOMSCROLL = RAMSEG_F4 | 4
SLOT_RW_F0_ROOMSCROLL = RAMSEG_F0 | 0
SLOT_RW_F8_WX = RAMSEG_F8 | 1
; ****************************************
; * BANK 00 *
; ****************************************
SEG CODE
ORG $0000
RORG $FC00
BANK_0
.byte #'T, #'J, #'3, #'E
INCLUDE "scroll/Game_Dummy.asm"
LOG_BANK_SIZE "Main Sim", BANK_0
ORG $03FC
RORG $FFFC
.word (ENTRY)
.word (ENTRY)
; ****************************************
; * BANK 01 *
; ****************************************
ORG $0400
RORG $FC00
BANK_1
.byte #'T, #'J, #'3, #'E
INCLUDE "scroll/Game_HaltRoom.asm"
INCLUDE "scroll/task_lut.asm"
LOG_BANK_SIZE "HALT ROOM", BANK_1
; ****************************************
; * BANK 02 *
; ****************************************
ORG $0800
RORG $F400
INCLUDE "scroll/sprite_data.asm"
; ****************************************
; * BANK 03 *
; ****************************************
ORG $0C00
RORG $F000
INCLUDE "scroll/room_A.asm"
; ****************************************
; * BANK 04 *
; ****************************************
ORG $1000
RORG $F400
BANK_4
INCLUDE "scroll/bit_mirror.asm"
INCLUDE "scroll/TransferA.asm"
INCLUDE "scroll/TransferB.asm"
LOG_BANK_SIZE "Scroll", BANK_4
; ****************************************
; * BANK 07 *
; ****************************************
ORG $1FFF
RORG $FFFF
.byte 0
END