mode7_demo: add mockingboard detection

This commit is contained in:
Vince Weaver 2018-03-01 19:52:11 -05:00
parent c92313aad9
commit 2f3b41c761
3 changed files with 67 additions and 41 deletions

View File

@ -27,7 +27,9 @@ mode7_demo.o: mode7_demo.s mode7_demo_backgrounds.inc sprites.inc \
../asm_routines/gr_fade.s \
../asm_routines/gr_copy.s \
../asm_routines/gr_scroll.s \
credits.s mode7.s rasterbars.s starfield_demo.s
../asm_routines/mockingboard_a.s \
credits.s mode7.s rasterbars.s starfield_demo.s \
zp.inc
ca65 -o mode7_demo.o mode7_demo.s -l mode7_demo.lst
$(PNG2RLE):

View File

@ -1,5 +1,16 @@
.include "zp.inc"
;================================
; TODO: LZ4 decompress
;================================
;================================
; Mockingboard detect
;================================
jsr mockingboard_detect_slot4 ; call detection routine
stx MB_DETECTED
;================================
; Clear screen and setup graphics
;================================
@ -211,6 +222,7 @@ title_routine:
.include "../asm_routines/gr_offsets.s"
.include "../asm_routines/gr_plot.s"
.include "../asm_routines/text_print.s"
.include "../asm_routines/mockingboard_a.s"
.include "mode7.s"

View File

@ -2,55 +2,23 @@
;; Zero page monitor routines addresses
WNDLFT EQU $20
WNDWDTH EQU $21
WNDTOP EQU $22
WNDBTM EQU $23
;WNDLFT EQU $20
;WNDWDTH EQU $21
;WNDTOP EQU $22
;WNDBTM EQU $23
CH EQU $24
CV EQU $25
GBASL EQU $26
GBASH EQU $27
BASL EQU $28
BASH EQU $29
H2 EQU $2C
;H2 EQU $2C
V2 EQU $2D
MASK EQU $2E
COLOR EQU $30
INVFLG EQU $32
; More zero-page addresses
; we try not to conflict with anything DOS, MONITOR or BASIC related
COLOR1 EQU $E0
COLOR2 EQU $E1
MATCH EQU $E2
XX EQU $E3
YY EQU $E4
YADD EQU $E5
LOOP EQU $E6
MEMPTRL EQU $E7
MEMPTRH EQU $E8
NAMEL EQU $E9
NAMEH EQU $EA
NAMEX EQU $EB
CHAR EQU $EC
DISP_PAGE EQU $ED
DRAW_PAGE EQU $EE
FIRST EQU $F0
LASTKEY EQU $F1
PADDLE_STATUS EQU $F2
XPOS EQU $F3
YPOS EQU $F4
TEMP EQU $FA
RUN EQU $FA
TEMP2 EQU $FB
TEMPY EQU $FB
INL EQU $FC
INH EQU $FD
OUTL EQU $FE
OUTH EQU $FF
;INVFLG EQU $32
MB_DETECTED EQU $50
;; Flying Routine Only
@ -89,7 +57,7 @@ NUM1H EQU $7F
NUM2L EQU $80
NUM2H EQU $81
RESULT EQU $82 ; 83,84,85
NEGATE EQU $86 ; UNUSED?
;NEGATE EQU $86 ; UNUSED?
LAST_SPACEX_I EQU $87
LAST_SPACEY_I EQU $88
LAST_MAP_COLOR EQU $89
@ -101,8 +69,52 @@ DRAW_BLUE_SKY EQU $8E
RANDOM_POINTER EQU $8F
FRAME_COUNT EQU $90
MB_VALUE EQU $91
MB_ADDRL EQU $91
MB_ADDRH EQU $92
DONE_PLAYING EQU $93
MB_CHUNK_OFFSET EQU $94
; More zero-page addresses
; we try not to conflict with anything DOS, MONITOR or BASIC related
COLOR1 EQU $E0
COLOR2 EQU $E1
MATCH EQU $E2
XX EQU $E3
YY EQU $E4
SHIPY EQU $E4
YADD EQU $E5
LOOP EQU $E6
MEMPTRL EQU $E7
MEMPTRH EQU $E8
NAMEL EQU $E9
NAMEH EQU $EA
NAMEX EQU $EB
CHAR EQU $EC
DISP_PAGE EQU $ED
DRAW_PAGE EQU $EE
FIRST EQU $F0
LASTKEY EQU $F1
PADDLE_STATUS EQU $F2
XPOS EQU $F3
YPOS EQU $F4
TEMP EQU $FA
RUN EQU $FA
TEMP2 EQU $FB
TEMPY EQU $FB
INL EQU $FC
INH EQU $FD
OUTL EQU $FE
OUTH EQU $FF
KEYPRESS EQU $C000
KEYRESET EQU $C010