mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-16 23:20:43 +00:00
184 lines
2.8 KiB
ArmAsm
184 lines
2.8 KiB
ArmAsm
; Apple ][ Second Reality, Startup for Disk1
|
|
|
|
;
|
|
; by deater (Vince Weaver) <vince@deater.net>
|
|
|
|
;.include "zp.inc"
|
|
;.include "hardware.inc"
|
|
;.include "qload.inc"
|
|
;.include "music.inc"
|
|
|
|
second_start:
|
|
;=====================
|
|
; initializations
|
|
;=====================
|
|
|
|
jsr hardware_detect ; FIXME: remove when hook up part00
|
|
|
|
jsr hgr_make_tables
|
|
|
|
|
|
;===================
|
|
; restart?
|
|
;===================
|
|
restart:
|
|
lda #0
|
|
sta DRAW_PAGE
|
|
|
|
;==================================
|
|
; load sound into the language card
|
|
; into $D000 set 1
|
|
;==================================
|
|
|
|
; read/write RAM, use $d000 bank1
|
|
bit $C083
|
|
bit $C083
|
|
|
|
lda #0
|
|
sta WHICH_LOAD
|
|
|
|
jsr load_file
|
|
|
|
lda #0
|
|
sta DONE_PLAYING
|
|
|
|
lda #1
|
|
sta LOOP
|
|
|
|
; patch mockingboard
|
|
|
|
jsr mockingboard_patch ; patch to work in slots other than 4?
|
|
|
|
;=======================
|
|
; Set up 50Hz interrupt
|
|
;========================
|
|
|
|
jsr mockingboard_init
|
|
jsr mockingboard_setup_interrupt
|
|
|
|
;============================
|
|
; Init the Mockingboard
|
|
;============================
|
|
|
|
jsr reset_ay_both
|
|
jsr clear_ay_both
|
|
|
|
;==================
|
|
; init song
|
|
;==================
|
|
|
|
jsr pt3_init_song
|
|
|
|
dont_enable_mc:
|
|
|
|
skip_all_checks:
|
|
|
|
|
|
;===================
|
|
; Load graphics
|
|
;===================
|
|
load_loop:
|
|
|
|
; jsr HGR
|
|
; bit SET_GR
|
|
; bit HIRES
|
|
; bit FULLGR
|
|
bit PAGE1
|
|
|
|
|
|
;=======================
|
|
; Load, copy to AUXMEM
|
|
;=======================
|
|
|
|
sta $C008 ; use MAIN zero-page/stack/language card
|
|
|
|
|
|
|
|
;====================
|
|
; load POLAR to $6000
|
|
|
|
lda #4 ; POLAR
|
|
sta WHICH_LOAD
|
|
jsr load_file
|
|
|
|
;======================
|
|
; copy POLAR to AUX $1000
|
|
|
|
lda #$10 ; AUX dest $1000
|
|
ldy #$60 ; MAIN src $6000
|
|
ldx #16 ; 16 pages
|
|
jsr copy_main_aux
|
|
|
|
|
|
;=======================
|
|
; run POLAR
|
|
;============================================
|
|
; copy POLAR from AUX $1000 to MAIN $8000
|
|
|
|
lda #$10 ; AUX src $1000
|
|
ldy #$80 ; MAIN dest $8000
|
|
ldx #16 ; 16 pages
|
|
jsr copy_aux_main
|
|
|
|
; setup music
|
|
; ocean=pattern24 (3:07) pattern#43
|
|
|
|
lda #43
|
|
sta current_pattern_smc+1
|
|
jsr pt3_set_pattern
|
|
|
|
cli
|
|
|
|
; run polar
|
|
|
|
jsr $8000
|
|
|
|
|
|
|
|
|
|
;=======================
|
|
; start music
|
|
;=======================
|
|
|
|
; lda #5 ; POLAR
|
|
; lda #4 ; OCEAN
|
|
; lda #3 ; THREED
|
|
; lda #2 ; TUNNEL
|
|
; lda #1 ; INTRO
|
|
|
|
; sta WHICH_LOAD
|
|
; jsr load_file
|
|
|
|
|
|
; setup music
|
|
; ocean=pattern24 (3:07) pattern#43
|
|
|
|
; lda #43
|
|
; sta $55A+$D000 ;current_pattern_smc+1
|
|
; jsr $559+$D000 ; pt3_set_pattern
|
|
|
|
; cli
|
|
|
|
; jmp $4000
|
|
|
|
; jmp $6000
|
|
|
|
|
|
|
|
forever:
|
|
jmp forever
|
|
|
|
.align $100
|
|
.include "wait_keypress.s"
|
|
.include "zx02_optim.s"
|
|
|
|
.include "title.s"
|
|
|
|
config_string:
|
|
; 0123456789012345678901234567890123456789
|
|
.byte 0,23,"APPLE II?, 48K, MOCKINGBOARD: NO, SSI: N",0
|
|
|
|
.include "pt3_lib_mockingboard_patch.s"
|
|
|
|
.include "hardware_detect.s"
|