mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2026-04-20 00:17:04 +00:00
@@ -51,7 +51,7 @@ EXITDOS equ $03D0
|
||||
; ------------------------------------
|
||||
; Build Options
|
||||
; ------------------------------------
|
||||
|
||||
|
||||
NOISY equ 0 ; 0 = Sound off, 1 = Sound on
|
||||
CHARSET equ 1 ; 0 = Olde Skoole, 1 = Pixel, 2 = Inverse, 3 = Small O's, 4 = Enhanced
|
||||
INIT_PATTERN equ 0 ; 0 = Glider gun, 1 = "Random", 2 = Edge test
|
||||
@@ -125,7 +125,7 @@ y_bottomright equ dataWidth*2+2
|
||||
; Entry Point
|
||||
; ------------------------------------
|
||||
seg program
|
||||
org $803
|
||||
org $803 ; Starting address, do not change
|
||||
|
||||
start subroutine
|
||||
lda #0
|
||||
@@ -146,7 +146,7 @@ runLoop subroutine
|
||||
|
||||
perfTest subroutine
|
||||
jsr RDKEY
|
||||
.startTimer
|
||||
.startTimer
|
||||
lda #50
|
||||
sta .counter
|
||||
.loop jsr iterate
|
||||
@@ -210,13 +210,13 @@ iterate subroutine
|
||||
bit CLICK
|
||||
endif
|
||||
ldy #y_topleft ; set top left value to one (previous value is stale)
|
||||
lda #1
|
||||
sta (altData),y
|
||||
lda #1
|
||||
sta (altData),y
|
||||
if soundEnabled
|
||||
bit CLICK ; (Pretend I'm not here... I just click the speaker)
|
||||
endif
|
||||
clc
|
||||
INCREMENT top
|
||||
INCREMENT top
|
||||
INCREMENT topright
|
||||
INCREMENT left
|
||||
INCREMENT right
|
||||
@@ -277,9 +277,9 @@ updateData subroutine
|
||||
cmp #charOff
|
||||
beq .clearTopLeft
|
||||
ldy #y_topleft ; set top left value to one (previous value is stale)
|
||||
lda #1
|
||||
lda #1
|
||||
sta (altData),y
|
||||
clc
|
||||
clc
|
||||
INCREMENT top
|
||||
INCREMENT topright
|
||||
INCREMENT left
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
;;;
|
||||
|
||||
; uninitialized zero-page variables
|
||||
seg.u ZEROPAGE
|
||||
seg.u ZEROPAGE
|
||||
org $0
|
||||
PWMBUF .ds 2
|
||||
PWMLEN .ds 1
|
||||
@@ -88,14 +88,14 @@ PULWID = 6
|
||||
IF {2} == 1
|
||||
sta SPKR
|
||||
ENDIF
|
||||
|
||||
|
||||
; increment pointer lo byte
|
||||
iny ; 2-1 = 1
|
||||
|
||||
|
||||
IF {2} == 2
|
||||
sta SPKR
|
||||
ENDIF
|
||||
|
||||
|
||||
bne .noinchi ; 4
|
||||
; increment pointer hi byte
|
||||
inc PWMBUF+1
|
||||
@@ -107,17 +107,17 @@ PULWID = 6
|
||||
IF {2} == 3
|
||||
sta SPKR
|
||||
ENDIF
|
||||
|
||||
|
||||
; reset X counter
|
||||
ldx #8 ; 6
|
||||
|
||||
|
||||
IF {2} == 4 || {2} == 5
|
||||
sta SPKR
|
||||
ENDIF
|
||||
|
||||
|
||||
; fetch new byte
|
||||
lda (PWMBUF),y ; 11
|
||||
|
||||
|
||||
; a few NOPs to match the normal pulse width
|
||||
; (inx, lsr, branch)
|
||||
IF {2} == 6
|
||||
@@ -130,7 +130,7 @@ PULWID = 6
|
||||
ENDIF
|
||||
; make up cycles we missed
|
||||
SLEEP2 PULWID*2-6
|
||||
|
||||
|
||||
.noinc
|
||||
; carry flag still valid from lsr
|
||||
bcc LVLS{1}
|
||||
@@ -138,7 +138,7 @@ PULWID = 6
|
||||
|
||||
;;; start of code
|
||||
seg CODE
|
||||
org $803 ; starting address
|
||||
org $803 ; starting address, do not change
|
||||
|
||||
Start
|
||||
lda #>(SAMPLE_END-SAMPLES)+1
|
||||
|
||||
+18
-19
@@ -1,21 +1,21 @@
|
||||
|
||||
;
|
||||
; LZ4FH uncompression for 6502
|
||||
; By Andy McFadden
|
||||
; Version 1.0.1, August 2015
|
||||
;
|
||||
; Refactored for size & speed
|
||||
; by Peter Ferrie.
|
||||
;
|
||||
; Developed with Merlin-16
|
||||
; Ported to DASM by Steven Hugg
|
||||
; Apache 2.0 license
|
||||
;
|
||||
; LZ4FH uncompression for 6502
|
||||
; By Andy McFadden
|
||||
; Version 1.0.1, August 2015
|
||||
;
|
||||
; Refactored for size & speed
|
||||
; by Peter Ferrie.
|
||||
;
|
||||
; Developed with Merlin-16
|
||||
; Ported to DASM by Steven Hugg
|
||||
; Apache 2.0 license
|
||||
; http://www.apache.org/licenses/LICENSE-2.0
|
||||
;
|
||||
;
|
||||
|
||||
processor 6502
|
||||
|
||||
org $0803
|
||||
org $0803 ; starting address, do not change
|
||||
|
||||
;
|
||||
; Constants
|
||||
@@ -47,7 +47,7 @@ entry
|
||||
jsr UnpackLZ4FH
|
||||
.endless
|
||||
jmp .endless
|
||||
|
||||
|
||||
|
||||
UnpackLZ4FH:
|
||||
lda #<LZDATA ;copy source address to zero page
|
||||
@@ -119,9 +119,9 @@ mainloop
|
||||
lda (srcptr),y ;get mixed-length byte
|
||||
sta savmix
|
||||
lsr ;get the literal length
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
beq noliteral
|
||||
cmp #$0f ;sets carry for >= 15
|
||||
bne shortlit
|
||||
@@ -413,5 +413,4 @@ LZDATA:
|
||||
hex 012d1b1504340d1f0628cc0331030013
|
||||
hex c21821000cbc0c130c711536047c6621
|
||||
hex 0a005a062c0343b1031a006a000f1500
|
||||
hex 000ffe
|
||||
|
||||
hex 000ffe
|
||||
|
||||
Reference in New Issue
Block a user