-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBANK_GENERIC.asm
executable file
·62 lines (39 loc) · 2.17 KB
/
BANK_GENERIC.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
;------------------------------------------------------------------------------
;##############################################################################
;------------------------------------------------------------------------------
NEWBANK GENERIC_BANK_1
DEFINE_1K_SEGMENT DECODE_LEVEL_SHADOW
CHECK_HALF_BANK_SIZE "GENERIC_BANK_1 (DECODE_LEVEL)"
;------------------------------------------------------------------------------
; ... the above is a RAM-copied section -- the following is ROM-only. Note that
; we do not configure a 1K boundary, as we con't really care when the above 'RAM'
; bank finishes. Just continue on from where it left off...
;------------------------------------------------------------------------------
DEFINE_SUBROUTINE Cart_Init ; in GENERIC_BANK_1
; Note the variables from the title selection are incredibly transient an can be stomped
; at any time. So they need to be used immediately.
; odd usage below is to prevent any possibility of variable stomping/assumptions
lda #0
sta SWBCNT ; console I/O always set to INPUT
sta SWACNT ; set controller I/O to INPUT
sta HMCLR
; cleanup remains of title screen
sta GRP0
sta GRP1
lda #%00010000 ; 2 double width missile, double width player
sta NUSIZ0 ; 3
sta NUSIZ1
lda #%100 ; players/missiles BEHIND BG
sta CTRLPF
lda #$FF
sta BufferedJoystick
;-------------------------------------------------------------------------------------
DEFINE_SUBROUTINE Resync
RESYNC
Ret rts
;------------------------------------------------------------------------------
OverscanTime
.byte OVERSCAN_TIM_NTSC, OVERSCAN_TIM_NTSC
.byte OVERSCAN_TIM_PAL, OVERSCAN_TIM_NTSC
;------------------------------------------------------------------------------
CHECK_BANK_SIZE "GENERIC_BANK_1 -- full 2K"