2023-04-26 02:55:26 +00:00
|
|
|
; Yet Another HR project
|
|
|
|
;
|
|
|
|
; by deater (Vince Weaver) <vince@deater.net>
|
|
|
|
|
|
|
|
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
|
|
|
|
|
|
|
|
hires_start:
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; set graphics mode
|
|
|
|
;===================
|
|
|
|
jsr HOME
|
|
|
|
|
2023-05-31 21:06:35 +00:00
|
|
|
jsr HGR
|
|
|
|
; bit HIRES
|
2023-04-26 02:55:26 +00:00
|
|
|
bit FULLGR
|
2023-05-31 21:06:35 +00:00
|
|
|
; bit SET_GR
|
|
|
|
; bit PAGE1
|
2023-04-26 02:55:26 +00:00
|
|
|
|
2023-05-30 04:36:16 +00:00
|
|
|
;====================
|
|
|
|
; set up tables
|
|
|
|
;====================
|
|
|
|
|
|
|
|
lda #$20
|
|
|
|
sta HGR_PAGE
|
|
|
|
jsr hgr_make_tables
|
2023-04-26 02:55:26 +00:00
|
|
|
|
2023-05-31 05:14:56 +00:00
|
|
|
|
|
|
|
;=========================================
|
|
|
|
; detect if we have a language card (64k)
|
|
|
|
; and load sound into it if possible
|
|
|
|
;===================================
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta SOUND_STATUS ; clear out, sound enabled
|
|
|
|
|
|
|
|
jsr detect_language_card
|
|
|
|
bcs no_language_card
|
|
|
|
|
|
|
|
yes_language_card:
|
|
|
|
|
|
|
|
; update sound status
|
|
|
|
lda SOUND_STATUS
|
|
|
|
ora #SOUND_IN_LC
|
|
|
|
sta SOUND_STATUS
|
|
|
|
|
|
|
|
;==================================
|
|
|
|
; load sound into the language card
|
|
|
|
; into $D000 set 1
|
|
|
|
;==================================
|
|
|
|
|
|
|
|
; read/write RAM, use $d000 bank1
|
|
|
|
bit $C083
|
|
|
|
bit $C083
|
|
|
|
|
|
|
|
lda #<purple_data
|
|
|
|
sta ZX0_src
|
|
|
|
lda #>purple_data
|
|
|
|
sta ZX0_src+1
|
|
|
|
|
|
|
|
lda #$D0 ; decompress to $D000
|
|
|
|
|
|
|
|
jsr full_decomp
|
|
|
|
|
2023-05-31 21:06:35 +00:00
|
|
|
; read ROM/no-write
|
|
|
|
bit $C082
|
|
|
|
|
2023-05-31 05:14:56 +00:00
|
|
|
|
|
|
|
no_language_card:
|
|
|
|
|
|
|
|
|
2023-04-26 02:55:26 +00:00
|
|
|
;===================
|
|
|
|
;===================
|
2023-05-30 04:36:16 +00:00
|
|
|
; scroll the logo
|
|
|
|
;===================
|
|
|
|
;===================
|
|
|
|
scroll_logo:
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; decomress to $a000
|
|
|
|
|
|
|
|
; size in ldsizeh:ldsizel (f1/f0)
|
|
|
|
|
|
|
|
lda #<vid_top
|
|
|
|
sta ZX0_src
|
|
|
|
lda #>vid_top
|
|
|
|
sta ZX0_src+1
|
|
|
|
|
|
|
|
|
2023-05-31 21:06:35 +00:00
|
|
|
lda #$40
|
2023-05-30 04:36:16 +00:00
|
|
|
|
|
|
|
jsr full_decomp
|
|
|
|
|
|
|
|
;======================
|
|
|
|
; scroll up vertically
|
|
|
|
;======================
|
2023-04-26 02:55:26 +00:00
|
|
|
|
2023-06-01 18:29:59 +00:00
|
|
|
jsr hgr_logo_vscroll
|
2023-04-26 02:55:26 +00:00
|
|
|
|
|
|
|
|
2023-05-30 04:36:16 +00:00
|
|
|
;===================
|
|
|
|
; Do Title Screen
|
|
|
|
;===================
|
|
|
|
load_loop:
|
|
|
|
|
2023-04-26 02:55:26 +00:00
|
|
|
;==========================
|
2023-05-30 04:36:16 +00:00
|
|
|
; Load Title Image
|
2023-04-26 02:55:26 +00:00
|
|
|
;===========================
|
|
|
|
|
2023-05-30 04:36:16 +00:00
|
|
|
load_title_image:
|
2023-04-26 02:55:26 +00:00
|
|
|
|
|
|
|
; size in ldsizeh:ldsizel (f1/f0)
|
|
|
|
|
2023-05-30 04:36:16 +00:00
|
|
|
lda #<title_data
|
2023-04-26 02:55:26 +00:00
|
|
|
sta ZX0_src
|
2023-05-30 04:36:16 +00:00
|
|
|
lda #>title_data
|
2023-04-26 02:55:26 +00:00
|
|
|
sta ZX0_src+1
|
|
|
|
|
|
|
|
|
|
|
|
lda #$20
|
|
|
|
|
|
|
|
|
|
|
|
jsr full_decomp
|
|
|
|
|
2023-05-31 05:14:56 +00:00
|
|
|
;==========================
|
|
|
|
; Play sound
|
|
|
|
;===========================
|
2023-04-26 02:55:26 +00:00
|
|
|
|
2023-05-31 05:14:56 +00:00
|
|
|
jsr play_purple
|
2023-04-26 02:55:26 +00:00
|
|
|
|
2023-06-01 20:21:40 +00:00
|
|
|
;==========================
|
|
|
|
; Update purple sprite
|
|
|
|
;===========================
|
|
|
|
|
|
|
|
lda #<purple_sprite
|
|
|
|
sta INL
|
|
|
|
lda #>purple_sprite
|
|
|
|
sta INH
|
|
|
|
lda #(175/7)
|
|
|
|
sta SPRITE_X
|
|
|
|
lda #83
|
|
|
|
sta SPRITE_Y
|
|
|
|
jsr hgr_draw_sprite
|
|
|
|
|
|
|
|
|
|
|
|
;==========================
|
|
|
|
; Draw arrow
|
|
|
|
;===========================
|
|
|
|
|
|
|
|
lda #<arrow_sprite
|
|
|
|
sta INL
|
|
|
|
lda #>arrow_sprite
|
|
|
|
sta INH
|
|
|
|
lda #(105/7)
|
|
|
|
sta SPRITE_X
|
|
|
|
lda #111
|
|
|
|
sta SPRITE_Y
|
|
|
|
jsr hgr_draw_sprite
|
2023-04-26 02:55:26 +00:00
|
|
|
|
|
|
|
wait_until_keypress:
|
|
|
|
lda KEYPRESS ; 4
|
|
|
|
bpl wait_until_keypress ; 3
|
|
|
|
bit KEYRESET ; clear the keyboard buffer
|
|
|
|
|
2023-05-26 04:18:33 +00:00
|
|
|
and #$7f
|
|
|
|
cmp #'1'
|
|
|
|
bcc which_ok
|
|
|
|
cmp #'4'
|
|
|
|
bcs which_ok
|
|
|
|
|
|
|
|
jmp done
|
|
|
|
|
2023-04-26 02:55:26 +00:00
|
|
|
which_ok:
|
|
|
|
jmp load_loop
|
|
|
|
|
|
|
|
|
2023-05-26 04:18:33 +00:00
|
|
|
done:
|
|
|
|
and #$f
|
|
|
|
sta WHICH_LOAD
|
|
|
|
rts
|
2023-04-26 02:55:26 +00:00
|
|
|
|
|
|
|
.include "zx02_optim.s"
|
2023-05-30 04:36:16 +00:00
|
|
|
.include "hgr_tables.s"
|
2023-05-31 21:06:35 +00:00
|
|
|
.include "hgr_logo_scroll.s"
|
2023-05-31 05:14:56 +00:00
|
|
|
.include "audio.s"
|
|
|
|
.include "purple.s"
|
|
|
|
.include "lc_detect.s"
|
2023-06-01 20:21:40 +00:00
|
|
|
.include "graphics/title_sprites.inc"
|
|
|
|
.include "hgr_sprite.s"
|
2023-04-26 02:55:26 +00:00
|
|
|
|
2023-05-30 04:36:16 +00:00
|
|
|
title_data:
|
2023-05-02 04:50:49 +00:00
|
|
|
.incbin "graphics/czmg4ap_title.hgr.zx02"
|
2023-05-30 04:36:16 +00:00
|
|
|
vid_top:
|
|
|
|
.incbin "graphics/videlectrix_top.hgr.zx02"
|
2023-05-31 05:14:56 +00:00
|
|
|
|
|
|
|
purple_data:
|
|
|
|
.incbin "sound/purple.btc.zx02"
|