From d328d28ffa1c7ba4ace49a4764e757e636301b6b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 9 Jun 2019 01:18:39 -0400 Subject: [PATCH] pt3: move note vars to zero page since we're being crazy --- pt3_player/OPTIMIZATION.txt | 1 + pt3_player/hello.bas | 2 +- pt3_player/pt3_lib.s | 11 +++++++++++ pt3_player/pt3_player.dsk | Bin 143360 -> 143360 bytes 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pt3_player/OPTIMIZATION.txt b/pt3_player/OPTIMIZATION.txt index a0b0df6d..025f0127 100644 --- a/pt3_player/OPTIMIZATION.txt +++ b/pt3_player/OPTIMIZATION.txt @@ -27,6 +27,7 @@ Code Optimization Qkumba#3+vmw 2816 ?? 1C.22 28s 171s 16.3% Fixes,zero init 2776 ?? 1C.10 28s 171s 16.3% Qkumba-SuperSMC 2739 ?? 1B.15 27s 171s 15.8% + MoveNoteToZP 2650 ?? 1A.23 26s 171s 15.2% Times: Validated BH.PT3: 10.0B 16 1:33 93 17.2% diff --git a/pt3_player/hello.bas b/pt3_player/hello.bas index 71d828cb..ef8bd500 100644 --- a/pt3_player/hello.bas +++ b/pt3_player/hello.bas @@ -1,2 +1,2 @@ - 10 PRINT "PT3 PLAYER V0.9" + 10 PRINT "PT3 PLAYER V1.0" 100 PRINT CHR$ (4)"BRUN PT3_PLAYER" diff --git a/pt3_player/pt3_lib.s b/pt3_player/pt3_lib.s index e61ead1e..7f336153 100644 --- a/pt3_player/pt3_lib.s +++ b/pt3_player/pt3_lib.s @@ -22,6 +22,7 @@ ; + 2828 bytes -- fix some correctness issues ; + 2776 bytes -- init vars with loop (slower, but more correct and smaller) ; + 2739 bytes -- qkumba's crazy SMC everywhere patch +; + 2430+120 = 2650 bytes -- move NOTE structs to page0 ; TODO ; move some of these flags to be bits rather than bytes? @@ -87,9 +88,18 @@ NOTE_TONE_SLIDE_TO_STEP =39 NOTE_STRUCT_SIZE=40 +note_a = $80 +note_b = $80+(NOTE_STRUCT_SIZE*1) +note_c = $80+(NOTE_STRUCT_SIZE*2) + +begin_vars=$80 +end_vars=$80+(NOTE_STRUCT_SIZE*3) + +.if 0 begin_vars: note_a: ; reset? + .byte $0 ; NOTE_VOLUME ; 0 ; Y .byte $0 ; NOTE_TONE_SLIDING_L ; 1 ; Y .byte $0 ; NOTE_TONE_SLIDING_H ; 2 ; Y @@ -215,6 +225,7 @@ note_c: .byte $0 ; NOTE_TONE_DELTA_H .byte $0 ; NOTE_TONE_SLIDE_TO_STEP end_vars: +.endif load_ornament0_sample1: lda #0 ; 2 diff --git a/pt3_player/pt3_player.dsk b/pt3_player/pt3_player.dsk index c2960db2129bfd54b3403718ad9b2cba78fee5ae..f43a4d91df6b1f602dbad2ad1d21d3440d283a1c 100644 GIT binary patch delta 4400 zcmZ`-3v?6LnVvf{dW|GY$OdFtkHHqjGLJam5O<-}P1{|}aZ)>hGzn>=niyN;Kmv&q zhc(DHTnffxM8z;R35`$~$K$S2`7t<77V0*JNX{l5EsvgVx(Ab!a3E*HPO^k@mTk5F zNI5>qY2$O}{`Y^}@Bi<;|9!|EGscb?W2|!IZmXrpN)=Ex2jM^t(m^?Bht8pQL_d40 zBx+~Qj-oYLG{7Ph|DG*giAEZ%6r!V+^$$c5BaWgCSteeCMt){B*%`fAZ_!)z1$vu~ z&>>xP!D}@b{x= zZ`K_BaQouu;%6?79L}qvZczPU6dlQ$;~i+^gjGM+z!(`5!!TyX!dRIC#%3Z+2&^uT zqQR^ox<9fix+-#ZWY}shw3w~t0<(=F7{rha#n6ln46lr$(^)beLnFV<4`^x$NZ%Pn zXR}PSZrT_%CU1{qtU9ERS}r-GrLTQ3ivExV@uVecpQPba<5z6a#v3c6E0yVy&#YEd z5Via@2NFfuYvtTi!QozoPBMZt>(a6o}XtkO;YDWjq|3y)mD;h3a1vAZ# zXYI&pL8M^ypi-n4DuGZY`kZjZhdc&`&{6c;DZ%bRZbN{eEcEZbWGsZkNWVXo(+D4U z(A|g;tX_by3Y9=;9ewWYoK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