-
Notifications
You must be signed in to change notification settings - Fork 0
/
BANK_FIXED.asm
executable file
·69 lines (41 loc) · 2 KB
/
BANK_FIXED.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
;------------------------------------------------------------------------------
;############################### FIXED BANK #################################
;------------------------------------------------------------------------------
ORIGIN SET FIXED_BANK
NEWBANK THE_FIXED_BANK
RORG $f800
;------------------------------------------------------------------------------
DEFINE_SUBROUTINE Reset
CLEAN_START
Restart ; go here on RESET + SELECT
ldx #$ff ; adjust stack pointer after RESET + SELECT
txs
lda #BANK_Cart_Init ; 2
sta SET_BANK ; 3
jsr Cart_Init ; 6+x
;---------------------------------------------------------------------------
lda #BANK_BitmapSetup
sta SET_BANK
jsr BitmapSetup
lda #BANK_BitmapDraw
sta SET_BANK
jsr BitmapDraw
;---------------------------------------------------------------------------
VBlankTime
.byte VBLANK_TIM_NTSC, VBLANK_TIM_NTSC
.byte VBLANK_TIM_PAL, VBLANK_TIM_PAL
;---------------------------------------------------------------------------
DEFINE_SUBROUTINE Random
NEXT_RANDOM
rts
ECHO "FREE BYTES IN FIXED BANK = ", $FFFB - *
;---------------------------------------------------------------------------
; The reset vectors
; these must live in the fixed bank (last 2K of any ROM image in TigerVision)
SEG InterruptVectors
ORG FIXED_BANK + $7FC
RORG $7ffC
; .word Reset ; NMI (not used)
.word Reset ; RESET
.word Reset ; IRQ (not used)
;---------------------------------------------------------------------------