From ec7f293a836528441ed1e4e4fd92b405ff1be2c8 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 21 May 2018 13:33:08 -0400 Subject: [PATCH] sa: setup ascii art template --- still_alive/Makefile | 1 - still_alive/still_alive.s | 107 ++++++++++++++++++++++++++++---------- 2 files changed, 79 insertions(+), 29 deletions(-) diff --git a/still_alive/Makefile b/still_alive/Makefile index dbcdde7e..c5db840c 100644 --- a/still_alive/Makefile +++ b/still_alive/Makefile @@ -13,7 +13,6 @@ STILL_ALIVE: still_alive.o still_alive.o: still_alive.s \ ../asm_routines/mockingboard.s \ - ../asm_routines/dos33_routines.s \ ../asm_routines/lz4_decode.s \ ../asm_routines/keypress_minimal.s \ interrupt_handler.s \ diff --git a/still_alive/still_alive.s b/still_alive/still_alive.s index ca3802a4..57488301 100644 --- a/still_alive/still_alive.s +++ b/still_alive/still_alive.s @@ -1,14 +1,11 @@ ; And Believe Me, I'm Still Alive .include "zp.inc" - ; program is ~4k, so from 0xc00 to 0x1C00 -LZ4_BUFFER EQU $1C00 ; $1C00 - $5C00, 16k for now + ; program is ~16k, so from 0xc00 to 0x4C00 UNPACK_BUFFER EQU $5E00 ; $5E00 - $9600, 14k, $3800 ; trying not to hit DOS at $9600 ; Reserve 3 chunks plus spare (14k) -NUM_FILES EQU 15 - ;============================= ; Setup ;============================= @@ -93,9 +90,6 @@ mockingboard_found: ; 4fe7 / 1e6 = .020s, 50Hz - ;============================ - ; Draw title screen - ;============================ ;=========================== @@ -110,6 +104,57 @@ mockingboard_found: sta clear_all_color+1 jsr clear_all + + ;============================ + ; Draw title screen + ;============================ + + ; Draw top line + + lda #' '+$80 + sta dal_first+1 + lda #'-'+$80 + sta dal_second+1 + jsr draw_ascii_line + + ; Draw columns + + ldy #20 + + lda #'|'+$80 + sta dal_first+1 + lda #' '+$80 + sta dal_second+1 +line_loop: + jsr draw_ascii_line + dey + bne line_loop + + ; Draw bottom line + + lda #' '+$80 + sta dal_first+1 + lda #'-'+$80 + sta dal_second+1 + jsr draw_ascii_line + + + ;============================ + ; Setup bounds + ;============================ + + lda #2 + sta WNDLFT + lda #35 + sta WNDWDTH + lda #1 + sta WNDTOP + lda #21 + sta WNDBTM + + + + ;================== ; load song ;================== @@ -120,6 +165,9 @@ mockingboard_found: ; Init Background ;============================ + + + ;============================ ; Enable 6502 interrupts ;============================ @@ -210,20 +258,9 @@ load_song: sta CHUNKSIZE ;=========================== - ; Load in KRW file + ; Setup KRW file ;=========================== - - lda #krw_file - sta INH - -disk_buff EQU LZ4_BUFFER -read_size EQU $4000 - - jsr read_file ; read KRW file from disk - ; Point LZ4 src at proper place ldy #0 @@ -325,17 +362,29 @@ page_copy_loop: + ;===================== + ; Draw ascii line art + ; + ; trashes A,X +draw_ascii_line: +dal_first: + lda #'|'+$80 + jsr COUT1 -;========== -; filenames -;========== -krw_file: - .asciiz "SA.KRW" - + ldx #38 +dal_second: + lda #' '+$80 +dal_loop: + jsr COUT1 + dex + bne dal_loop + lda dal_first+1 + jsr COUT1 + rts ;========= ;routines @@ -344,9 +393,6 @@ krw_file: .include "../asm_routines/text_print.s" .include "../asm_routines/mockingboard_a.s" .include "../asm_routines/gr_fast_clear.s" -.include "../asm_routines/pageflip.s" -.include "../asm_routines/gr_setpage.s" -.include "../asm_routines/dos33_routines.s" .include "../asm_routines/lz4_decode.s" .include "../asm_routines/keypress_minimal.s" @@ -359,4 +405,9 @@ mocking_message: .asciiz "LOOKING FOR MOCKINGBOARD IN SLOT #4" not_message: .byte "NOT " loading_message: .asciiz "LOADING" + .include "ascii_art.inc" + +LZ4_BUFFER: +.incbin "SA.KRW" +