From 07476896d5e66aed6f40d3a1da34e5e6a6b2388b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 18 Jan 2019 00:18:06 -0500 Subject: [PATCH] ootw: add earthquake --- ootw/Makefile | 11 +-- ootw/another_cave.png | Bin 603 -> 8466 bytes ootw/another_cave_shake.png | Bin 0 -> 8637 bytes ootw/gr_copy.s | 2 +- ootw/ootw.s | 4 ++ ootw/ootw_cavern.inc | 3 +- ootw/ootw_cavern.s | 134 ++++++++++++++++++++++++++++++++---- ootw/ootw_quake.inc | 44 ++++++++++++ ootw/physicist.s | 3 + ootw/random16.s | 119 ++++++++++++++++++++++++++++++++ ootw/zp.inc | 6 ++ 11 files changed, 306 insertions(+), 20 deletions(-) create mode 100644 ootw/another_cave_shake.png create mode 100644 ootw/ootw_quake.inc create mode 100644 ootw/random16.s diff --git a/ootw/Makefile b/ootw/Makefile index 5905b3c3..fbb2d976 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -8,17 +8,17 @@ all: ootw.dsk ootw.dsk: HELLO OOTW $(DOS33) -y ootw.dsk SAVE A HELLO - $(DOS33) -y ootw.dsk BSAVE -a 0x1000 OOTW + $(DOS33) -y ootw.dsk BSAVE -a 0x2000 OOTW #### OOTW: ootw.o - ld65 -o OOTW ootw.o -C ../linker_scripts/apple2_1000.inc + ld65 -o OOTW ootw.o -C ../linker_scripts/apple2_2000.inc ootw.o: ootw.s \ gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \ - ootw_pool.s ootw_cavern.s physicist.s \ - ootw_pool.inc ootw_cavern.inc ootw_sprites.inc + ootw_pool.s ootw_cavern.s physicist.s random16.s \ + ootw_pool.inc ootw_cavern.inc ootw_quake.inc ootw_sprites.inc ca65 -o ootw.o ootw.s -l ootw.lst #### @@ -34,6 +34,9 @@ ootw_pool.inc: $(PNG2RLE) another.png ootw_cavern.inc: $(PNG2RLE) another_cave.png $(PNG2RLE) asm another_cave.png cavern_rle > ootw_cavern.inc +ootw_quake.inc: $(PNG2RLE) another_cave_shake.png + $(PNG2RLE) asm another_cave_shake.png quake_rle > ootw_quake.inc + ##### clean: diff --git a/ootw/another_cave.png b/ootw/another_cave.png index d858ee5abf35ee26d2ff6e560bf3ad33bb344f8b..f4d9b9012cf296b341dc95c037adce74c193c091 100644 GIT binary patch delta 8382 zcmV;vAVJ^T1d>9KBYz&TdQ@0+Qek%>aB^>EX>4U6ba`-PAZ2)IW&i+q+SQv`b{sj9 zMgOsiUIOM}IT+9B9rW`1K6nI0id0r+SN*gok)ase0hrkv44~Qn^WVq(7k^4^)x=b4 zZaG{2#1@h_U|$zD{dJ+>Uw4kr|Hm^en_DfPr!ZgdKd;yC zGVssnTMWhLlwFB@kKUG&8;`5Ev9NCI4%9y@=i6%rzy065-|88Y-@ygTcdro!h96q! z_h;u{(R)JRaev}x=TUw}O0>MOg~#o^u7CaKuSRa(Lw|+*OGrN+{TAxhzDL^J1%1CI z{1&17@$<*$UHbLB`5e+4w@-J@`Sr;E_WW||%bed))4y|8J!e0&>oGIs{F>BziuV!k z8(OXVsmxd5U$Rw;t*^#cr6eYKv`DhS*L2N!!gySC%YSuu+`d1jn+!4f?TMrJe){01 z;mJxcnx8k!QD5%(Lf}`Zgn5zN~)=)oS&`+ zZ)TWrrkQ7%b+*};Utv+lE3dNZYO8OzNu?ck+Ig2Fvr{W;^5opH_uX>~W%-zgClycLTiKg|21iH%c3>obx^uc$P4@FRi+{#> zXBNY`^Wv6{z-xMalSuKzW|rN%q;|sCb06DJOM_fxYIW`clSsj&(ozcU)Y|igTsre+ zIdd7H8pznkG^KUQVb}94vGQ(y zk>LBFcfgj?Lft!z90ucRd7wt9p?}>+uW8IsDCpH|Gn-0{6ok*)OOFL+v-U_6tftP> zPPtNJs<5$ru8^%SRB|Tq7-H&o>`?YeJensGynRTDE!;mN?$#;6aYAZ#A8tVK*Km97 zlZaNG9VyHl`wGc|1ST$GnOx*=-Scy~L`s&VsbdUgxdYJPM=sXYHkq>9gnuQt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gz1y=GE?8Zj!`Yu z8#olv*^z=(8@cpvrCFPPi}4AH1t`_rwDeh~=I`<&@R>!7+jtVhm%j)L*;h4J46;^UpR^=mMmVh0cCkMWVPn-%jM zi+(5Oo|FERvTxp_@6(J?o2vL>3N>jd?wI&7^>=Cgoywvu+C2JA9rO2c^ZA|kEuK4= ze}0SSI`hwO@my#A`7NI7%s;=ybDjCaEee1A*tAdm>n=3kw&Bq6RXemL+@iLgcGk+9 zew%Izk?`CDzTkpwJZcJkZ^Za{ti(|Nj600G*G9fB*mh32;bRa{vGnuK)lOuK{D`j>7-|00(qQ zO+^Re0TKi=9+DY_rvLx|8FWQhbVF}#ZDnqB07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b z0hUQbK~zY`?Uu=|!ypVrQKSUa4gdeQFUS}VT%4rYyhX2+l*z|7LrU5nYF9%2=^Al3 z5v*1`Ha&wevYw){ADyV+nsx&y5r8hQ=%NP147^};nm#z2dNKyB3OdN|fY zppPL&b|9Nz;GEbRsUqZM;KtcO4CRofl$+V-gQp;dN{^evZOgefEzakd6!Xh^dU`t$1b%dRr03iMPIlZgIAOxgXzW|ac zgXSrC86jSz2f!JiQ>JZIl}Z`K;k zrzEkEs}7V1d5PvZ4S;G`Pg&oiEHFaOz<&F(7c;$yVkG+TEr9oKh+Nc%x8D!jibX)Q z^Q6m;NP0+g0(9@ni34gwdB<*U0N*OznXhY!W%8+h4>iE|paJ~pr+=V7+pb2~UX5|~ P00000NkvXXu0mjfRH98f literal 0 HcmV?d00001 diff --git a/ootw/gr_copy.s b/ootw/gr_copy.s index f03ed362..1211d0e8 100644 --- a/ootw/gr_copy.s +++ b/ootw/gr_copy.s @@ -4,7 +4,7 @@ ; copy 0xc00 to DRAW_PAGE ; ; 45 + 2 + 120*(8*9 + 5) -1 + 6 = 9292 -.align $100 +;.align $100 gr_copy_to_current: lda DRAW_PAGE ; 3 diff --git a/ootw/ootw.s b/ootw/ootw.s index 065fa905..01de826c 100644 --- a/ootw/ootw.s +++ b/ootw/ootw.s @@ -12,6 +12,8 @@ ootw: lda #0 sta GAME_OVER + sta EQUAKE_PROGRESS + sta EARTH_OFFSET lda #22 sta PHYSICIST_Y @@ -66,6 +68,8 @@ end_message: .include "gr_copy.s" .include "gr_putsprite.s" .include "gr_offsets.s" +.include "random16.s" .include "ootw_pool.inc" .include "ootw_cavern.inc" +.include "ootw_quake.inc" .include "ootw_sprites.inc" diff --git a/ootw/ootw_cavern.inc b/ootw/ootw_cavern.inc index bbd073ec..829c4cf8 100644 --- a/ootw/ootw_cavern.inc +++ b/ootw/ootw_cavern.inc @@ -39,6 +39,5 @@ cavern_rle: .byte $28 ; ysize=48 .byte $25, $85, $22,$22, $85,$85, $A3,$82, $A5,$88, $82 .byte $88,$88, $28, $88,$88, $28, $88,$88, $28, $88 .byte $28, $A3,$88, $82, $A5,$88, $82,$82, $AC,$88, $A8,$28 - .byte $A0,$1B,$88, $28,$28, $A6,$88, $28, $22, $28, $88 - .byte $A3,$82, $A0,$1E,$88, $A0,$78,$00 + .byte $A0,$1B,$88, $28,$28, $A3,$88, $A0,$A0,$00 .byte $A1 diff --git a/ootw/ootw_cavern.s b/ootw/ootw_cavern.s index d63771a8..00f9a4d4 100644 --- a/ootw/ootw_cavern.s +++ b/ootw/ootw_cavern.s @@ -1,7 +1,5 @@ ; Cavern scene (with the slugs) - - ootw_cavern: ;=========================== ; Enable graphics @@ -11,7 +9,6 @@ ootw_cavern: bit FULLGR - ;=========================== ; Clear both bottoms @@ -43,6 +40,21 @@ ootw_cavern: sta GBASL jsr load_rle_gr + ;============================= + ; Load quake background to $1000 + + lda #$10 + sta BASH + lda #$00 + sta BASL ; load image off-screen $c00 + + lda #>(quake_rle) + sta GBASH + lda #<(quake_rle) + sta GBASL + jsr load_rle_gr + + ;================================= ; copy to both pages $400/$800 @@ -53,21 +65,11 @@ ootw_cavern: ;================================= ; setup vars -; lda #22 -; sta PHYSICIST_Y -; lda #20 -; sta PHYSICIST_X - -; lda #1 -; sta DIRECTION lda #0 sta GAIT sta GAME_OVER - lda #30 - sta TENTACLE_PROGRESS - ;============================ ; Cavern Loop (not a palindrome) ;============================ @@ -77,10 +79,56 @@ cavern_loop: jsr handle_keypress_cavern + + ;========================== + ; check for earthquake + +earthquake_handler: + lda FRAMEH + and #3 + bne earth_mover + lda FRAMEL + cmp #$ff + bne earth_mover +earthquake_init: + lda #200 + sta EQUAKE_PROGRESS + +earth_mover: + lda EQUAKE_PROGRESS + beq earth_still + + and #$8 + bne earth_calm + + lda #2 + bne earth_decrement + +earth_calm: + lda #0 +earth_decrement: + sta EARTH_OFFSET + dec EQUAKE_PROGRESS + jmp earth_done + + +earth_still: + lda #0 + sta EARTH_OFFSET + +earth_done: + ;================================ ; copy background to current page + lda EARTH_OFFSET + bne shake_shake +no_shake: jsr gr_copy_to_current + jmp done_shake +shake_shake: + jsr gr_copy_to_current_40 +done_shake: ;=============== @@ -302,3 +350,63 @@ remove_slug: lda #0 sta slugg0_out rts + + + + + ;========================================================= + ; gr_copy_to_current, 40x48 version + ;========================================================= + ; copy 0x1000 to DRAW_PAGE + +gr_copy_to_current_40: + + lda DRAW_PAGE ; 3 + clc ; 2 + adc #$4 ; 2 + sta gr_copy_line_40+5 ; 4 + sta gr_copy_line_40+11 ; 4 + adc #$1 ; 2 + sta gr_copy_line_40+17 ; 4 + sta gr_copy_line_40+23 ; 4 + adc #$1 ; 2 + sta gr_copy_line_40+29 ; 4 + sta gr_copy_line_40+35 ; 4 + adc #$1 ; 2 + sta gr_copy_line_40+41 ; 4 + sta gr_copy_line_40+47 ; 4 + ;=========== + ; 45 + + ldy #119 ; for early ones, copy 120 bytes ; 2 + +gr_copy_line_40: + lda $1000,Y ; load a byte (self modified) ; 4 + sta $400,Y ; store a byte (self modified) ; 5 + + lda $1080,Y ; load a byte (self modified) ; 4 + sta $480,Y ; store a byte (self modified) ; 5 + + lda $1100,Y ; load a byte (self modified) ; 4 + sta $500,Y ; store a byte (self modified) ; 5 + + lda $1180,Y ; load a byte (self modified) ; 4 + sta $580,Y ; store a byte (self modified) ; 5 + + lda $1200,Y ; load a byte (self modified) ; 4 + sta $600,Y ; store a byte (self modified) ; 5 + + lda $1280,Y ; load a byte (self modified) ; 4 + sta $680,Y ; store a byte (self modified) ; 5 + + lda $1300,Y ; load a byte (self modified) ; 4 + sta $700,Y ; store a byte (self modified) ; 5 + + lda $1380,Y ; load a byte (self modified) ; 4 + sta $780,Y ; store a byte (self modified) ; 5 + + dey ; decrement pointer ; 2 + bpl gr_copy_line_40 ; ; 2nt/3 + + rts ; 6 + diff --git a/ootw/ootw_quake.inc b/ootw/ootw_quake.inc new file mode 100644 index 00000000..a47e9974 --- /dev/null +++ b/ootw/ootw_quake.inc @@ -0,0 +1,44 @@ +quake_rle: .byte $28 ; ysize=48 + .byte $A0,$11,$22, $A7,$62, $65, $A3,$55, $F5, $25, $A9,$22 + .byte $62, $22,$22, $62, $A6,$22, $62,$62, $A3,$22, $62 + .byte $AB,$66, $55, $6F, $FF, $F6, $66,$66, $62,$62 + .byte $A4,$22, $66,$66, $62, $66,$66, $62, $A3,$22, $62 + .byte $66, $6F,$6F, $F2, $22,$22, $AC,$66, $55, $66,$66 + .byte $6F, $FF, $F6, $A3,$66, $62, $66, $22 + .byte $A6,$66, $22,$22, $A6,$66, $22,$22, $6F, $F6,$F6, $AE,$66 + .byte $6F, $F6, $A4,$66, $22, $66,$66, $6F,$6F, $F6,$F6 + .byte $22,$22, $66, $26, $A4,$66, $22,$22, $A3,$66, $6F,$6F + .byte $F6,$F6, $AC,$66, $6F, $F6, $66,$66, $22, $A6,$66 + .byte $22,$22, $6F, $2F, $7A, $A3,$F6, $22,$22, $A7,$66 + .byte $6F,$6F, $F6,$F6, $AA,$66, $6F, $F6, $A3,$66, $26 + .byte $56, $76, $66, $22,$22, $26, $52, $57 + .byte $76,$76, $66, $22,$22, $A3,$6F, $A3,$F6, $A5,$66, $6F,$6F + .byte $F6,$F6, $A7,$66, $6F, $F6, $66,$66, $22, $A3,$55 + .byte $22,$22, $A4,$55, $27, $76, $22,$22, $66,$66, $26 + .byte $A3,$66, $A3,$6F, $A3,$F6, $A3,$66, $6F,$6F, $F6,$F6, $A5,$66 + .byte $6F, $F6, $22, $25, $55,$55, $22,$22, $A3,$55 + .byte $22, $55,$55, $22,$22, $56, $22, $77, $A0,$17,$66 + .byte $22,$22, $52, $55, $22,$22, $55,$55, $52, $A3,$55 + .byte $22,$22, $A4,$55, $76, $A0,$15,$66, $22, $25, $55,$55 + .byte $22,$22, $A6,$55, $22,$22, $55, $52, $22, $55 + .byte $77, $7F, $6F,$6F, $7F, $6F,$6F, $88, $A3,$6F + .byte $7F,$7F, $76, $77, $76, $A6,$66, $22, $55 + .byte $25, $55, $22,$22, $25, $A5,$55, $22,$22, $A5,$55 + .byte $77, $A5,$87, $88, $87, $88, $A3,$87, $A3,$77 + .byte $A6,$87, $22, $25, $22, $55, $A3,$22, $A5,$55 + .byte $22,$22, $55,$55, $25, $52, $A3,$57, $58,$58, $78 + .byte $58, $AA,$88, $58, $78, $A3,$88, $A4,$72, $A3,$22 + .byte $A5,$55, $22,$22, $55, $25, $22, $A8,$55, $58,$58 + .byte $88,$88, $22, $88,$88, $58,$58, $A4,$55, $58, $22 + .byte $55,$55, $75,$75, $A3,$22, $27, $55, $25, $55,$55 + .byte $A3,$22, $55, $57, $AC,$55, $22, $A4,$55, $25 + .byte $A4,$55, $22, $27, $57, $55, $A5,$22, $55 + .byte $22, $55, $25, $A4,$22, $25, $AC,$55, $22 + .byte $A3,$55, $25, $22, $A3,$55, $A3,$22, $25, $85 + .byte $A5,$22, $55, $A9,$22, $A7,$82, $A3,$85, $25, $22,$22 + .byte $25, $85, $22,$22, $85,$85, $A3,$82, $A5,$88, $82 + .byte $88,$88, $28, $88,$88, $28, $88,$88, $28, $88 + .byte $28, $A3,$88, $82, $A5,$88, $82,$82, $AC,$88, $A8,$28 + .byte $A0,$1B,$88, $28,$28, $A6,$88, $28, $22, $28, $88 + .byte $A3,$82, $A0,$1E,$88, $A0,$A0,$00 + .byte $A1 diff --git a/ootw/physicist.s b/ootw/physicist.s index b2137854..fec8652a 100644 --- a/ootw/physicist.s +++ b/ootw/physicist.s @@ -17,7 +17,10 @@ draw_physicist: lda PHYSICIST_X sta XPOS + lda PHYSICIST_Y + sec + sbc EARTH_OFFSET ; adjust for earthquakes sta YPOS lda DIRECTION diff --git a/ootw/random16.s b/ootw/random16.s new file mode 100644 index 00000000..44b45a79 --- /dev/null +++ b/ootw/random16.s @@ -0,0 +1,119 @@ +; 16-bit 6502 Random Number Generator (cycle-invariant version) + +; Linear feedback shift register PRNG by White Flame +; http://codebase64.org/doku.php?id=base:small_fast_16-bit_prng + +; The Apple II KEYIN routine increments SEEDL:SEEDH +; while waiting for keypress + +;SEEDL = $4E +;SEEDH = $4F + +XOR_MAGIC = $7657 ; "vW" + + ;============================= + ; random16 + ;============================= + ; takes: + ; not 0, cs = 6(r16)+12(lnz)+5(nop)+ 19(deo) = 42 + ; not 0, cc = 6(r16)+14(lnz)+2(nop)+ 20(neo) = 42 + + ; $0000 = 6(r16)+ 6(loz)+11nops+ 19(deo) = 42 + ; $8000 = 6(r16)+ 6(loz)+ 4(ceo) + 6nops+ 20(neo) = 42 + + ; $XX00 cc = 6(r16)+ 6(loz)+4(ceo)+2(cep) +4nops+ 20(neo) = 42 + ; $XX00 cs = 6(r16)+ 6(loz)+4(ceo)+4(cep) +3nops+ 19(deo) = 42* +random16: + + lda SEEDL ; 3 + beq low_zero ; $0000 and $8000 are special values ; 3 + ;========== + ; 6 +lownz: + ; -1 + asl SEEDL ; Do a normal shift ; 5 + lda SEEDH ; 3 + rol ; 2 + bcs five_cycle_do_eor ; 3 + ;=========== + ; 12 + + bcc two_cycle_no_eor ; 3 + ;========== + ; 12+3-1 = 14 + + +;=================================================================== + +eleven_cycle_do_eor: + nop ; 2 + nop ; 2 + nop ; 2 +five_cycle_do_eor: + nop ; 2 +three_cycle_do_eor: + sta SEEDH ; nop ; 3 + +do_eor: + ; high byte is in A + + eor #>XOR_MAGIC ; 2 + sta SEEDH ; 3 + lda SEEDL ; 3 + eor #