tweak sound & cleanup & rocket

This commit is contained in:
Dagen Brock
2012-12-14 01:03:01 -06:00
parent e4f7d39adc
commit 88b67b2e6b
2 changed files with 123 additions and 67 deletions

View File

@@ -114,28 +114,29 @@ HandleGreetScroll
ldx #23 ldx #23
ldy #21 ldy #21
lda #$30 lda #$30
jsr DrawStringXYWait jsr DrawStringXYWait ; draw woz slowly
lda #$30 lda #$30
jsr SimplerWait jsr SimplerWait ; extra delay
:loop jsr ScrollRightUp :loop jsr VBlank
jsr ScrollRightUp ; scroll right side of screen
inc _creditScrollCounter inc _creditScrollCounter
lda #26 lda #26
jsr SimplerWait jsr SimplerWait
lda _creditScrollTick lda _creditScrollTick
cmp #01 cmp #_creditSkipLines ; see if we've flipped line counter
beq :next beq :next
inc _creditScrollTick inc _creditScrollTick
lda #$13 lda #$13 ; we skip a line
jsr SimplerWait jsr SimplerWait ; with a shorter wait tho
bra :loop bra :loop
:next stz _creditScrollTick :next stz _creditScrollTick ; reset
lda _creditStringIdx lda _creditStringIdx
asl asl
tax tax
lda _creditStringsTable+1,x lda _creditStringsTable+1,x ; we know if the high byte is 0,
beq :noStrings beq :noStrings ; then we hit the terminator
sta srcPtr+1 sta srcPtr+1
lda _creditStringsTable,x lda _creditStringsTable,x
sta srcPtr sta srcPtr
@@ -152,14 +153,45 @@ HandleGreetScroll
jsr SimplerWait jsr SimplerWait
:skipWait lda _creditScrollCounter :skipWait lda _creditScrollCounter
cmp #80 cmp #80
beq :done beq :rocket
bra :loop bra :loop
:rocket stz _creditScrollCounter
stz _creditStringIdx
:rocketLoop inc _creditScrollCounter
jsr VBlank
jsr ScrollRightUp
lda _creditStringIdx
asl
tax
lda _rocketStringsTable+1,x ; we know if the high byte is 0,
beq :noStrings2 ; then we hit the terminator
sta srcPtr+1 ; otherwise set screen pointer
lda _rocketStringsTable,x
sta srcPtr
inc _creditStringIdx ; line++
ldx #23
ldy #23
jsr DrawStringXY : write line
:noStrings2 lda #25
jsr SimplerWait
lda _creditScrollCounter
cmp #40
beq :done
bra :rocketLoop
:done jmp DemoNext :done jmp DemoNext
_creditScrollTick db #$00 _creditScrollTick db #$00
_creditScrollCounter db #$00 _creditScrollCounter db #$00
_creditStringIdx db #$00 _creditStringIdx db #$00
_creditSkipLines equ #$01
HandleMapScroll HandleMapScroll
@@ -176,15 +208,15 @@ HandleMapScroll
plx plx
dex dex
bne :scrollLoop bne :scrollLoop
ldx #5 ldx #9
:blinkenLoop phx :blinkenLoop phx
lda #NoteG0 lda #10
ldx #$10 ldx #$10
jsr SEplayNote jsr SENoteAX
jsr VBlank jsr VBlank
lda #" " lda #" "
sta Lo07+16 sta Lo07+16
lda #$10 lda #20
jsr SimplerWait jsr SimplerWait
jsr VBlank jsr VBlank
lda #"*" lda #"*"
@@ -332,7 +364,7 @@ _defaultStarSpeed equ #$10
pla pla
inc inc
inc inc
cmp #$28 cmp #$2c ; adjusting this shifts where song ends
bne :slowDownAgain ; i take my varibls srs bne :slowDownAgain ; i take my varibls srs
lda #$25 lda #$25
jsr SimplerWait jsr SimplerWait
@@ -387,7 +419,7 @@ HandleFireStateK
lda #$20 lda #$20
:loop ldx #_sprData_K :loop ldx #_sprData_K
ldy #>_sprData_K ldy #>_sprData_K
jsr FirePass2 ; preserves A,X,Y jsr FirePassSprite ; preserves A,X,Y
dec dec
bne :loop bne :loop
jmp DemoNext jmp DemoNext
@@ -396,7 +428,7 @@ HandleFireStateF
lda #$20 lda #$20
:loop ldx #_sprData_F :loop ldx #_sprData_F
ldy #>_sprData_F ldy #>_sprData_F
jsr FirePass2 ; preserves A,X,Y jsr FirePassSprite ; preserves A,X,Y
dec dec
bne :loop bne :loop
jmp DemoNext jmp DemoNext
@@ -405,7 +437,7 @@ HandleFireStateE
lda #$20 lda #$20
:loop ldx #_sprData_E :loop ldx #_sprData_E
ldy #>_sprData_E ldy #>_sprData_E
jsr FirePass2 ; preserves A,X,Y jsr FirePassSprite ; preserves A,X,Y
dec dec
bne :loop bne :loop
jmp DemoNext jmp DemoNext
@@ -415,7 +447,7 @@ HandleFireStateS
lda #$20 lda #$20
:loop ldx #_sprData_S :loop ldx #_sprData_S
ldy #>_sprData_S ldy #>_sprData_S
jsr FirePass2 ; preserves A,X,Y jsr FirePassSprite ; preserves A,X,Y
dec dec
bne :loop bne :loop
jmp DemoNext jmp DemoNext
@@ -424,7 +456,7 @@ HandleFireStateT
lda #$20 lda #$20
:loop ldx #_sprData_T :loop ldx #_sprData_T
ldy #>_sprData_T ldy #>_sprData_T
jsr FirePass2 ; preserves A,X,Y jsr FirePassSprite ; preserves A,X,Y
dec dec
bne :loop bne :loop
jmp DemoNext jmp DemoNext
@@ -445,7 +477,7 @@ HandleFireStateYear
lda #$20 lda #$20
:loop ldx #_sprData_YEAR :loop ldx #_sprData_YEAR
ldy #>_sprData_YEAR ldy #>_sprData_YEAR
jsr FirePass3 ; preserves A,X,Y jsr FirePassSpriteBig ; preserves A,X,Y
dec dec
bne :loop bne :loop
jmp DemoNext jmp DemoNext
@@ -457,10 +489,12 @@ RandPop jsr GetRandHot
* A = count X=lowbyte Y=hibyte * A = count X=lowbyte Y=hibyte
FirePass2 FirePassSprite
pha pha
phx phx
phy phy
ldy #4
jsr SErandStaticBit
jsr MakeHeat jsr MakeHeat
jsr Scroll8 jsr Scroll8
jsr RandPop jsr RandPop
@@ -474,10 +508,12 @@ FirePass2
rts rts
* A = count X=lowbyte Y=hibyte * A = count X=lowbyte Y=hibyte
FirePass3 FirePassSpriteBig
pha pha
phx phx
phy phy
ldy #6
jsr SErandStaticBit
jsr MakeHeat jsr MakeHeat
jsr Scroll8 jsr Scroll8
jsr RandPop jsr RandPop
@@ -1230,8 +1266,6 @@ HandleProdrop
bra ]nextAnimChar bra ]nextAnimChar
]charFinished ]charFinished
lda #1 ; SET SOUND ANY TIME NEW CHAR DROPS
sta _prodropSound
lda #0 lda #0
sta (srcPtr) sta (srcPtr)
bra ]nextAnimChar bra ]nextAnimChar
@@ -1242,6 +1276,9 @@ HandleProdrop
and #%01111111 ; clear high bit and #%01111111 ; clear high bit
sta (srcPtr),y sta (srcPtr),y
lda #1 ; SET SOUND ANY TIME NEW CHAR DROPS
sta _prodropSound
]nextAnimChar ]nextAnimChar
lda srcPtr lda srcPtr
clc clc
@@ -1279,14 +1316,15 @@ _prodropScanLine db 0 ; starts scanning at line 0
_prodropState db 0 ; starts with 0, which is scan mode _prodropState db 0 ; starts with 0, which is scan mode
_prodropSound db 0 ; determine if we should call sound engine _prodropSound db 0 ; determine if we should call sound engine
soundDownReset lda #10 _soundDownTopFreq db 2
soundDownReset lda #_soundDownTopFreq
sta _sndFreq sta _sndFreq
rts rts
_sndFreq db 10 _sndFreq db #_soundDownTopFreq
_sndInt db 0 _sndInt db 0
soundDown pha ;interval soundDown pha ;interval
ldx #6 ldx #3
lda _sndFreq lda _sndFreq
jsr SENoteAX jsr SENoteAX
pla pla
@@ -1458,7 +1496,7 @@ HandleAppleDraw
bge :noBlack bge :noBlack
lda #0 lda #0
bra :noMagic bra :noMagic
:noBlack cmp #$FA ; had to add in a way to keep it from :noBlack cmp #$F2 ; had to add in a way to keep it from
blt :noMagic ; getting stuck so now it occasionally puts blt :noMagic ; getting stuck so now it occasionally puts
lda (srcPtr),y ; the right pixel even when it wasn't lda (srcPtr),y ; the right pixel even when it wasn't
:noMagic sta (dstPtr),y ; found by getrand. (because it's only pseudorandom) :noMagic sta (dstPtr),y ; found by getrand. (because it's only pseudorandom)

View File

@@ -20,52 +20,70 @@ _digawriteString asc " an intro by DiGAROK ",00
_cwoz asc "Woz",00 _cwoz asc "Woz",00
_c2 asc "Brutal Deluxe",00 _c01 asc "Brutal Deluxe",00
_c3 asc "Belgo",00 _c02 asc "Belgo",00
_c4 asc "BLuRry",00 _c03 asc "BLuRry",00
_c5 asc "krUe",00 _c04 asc "MJM",00
_c6 asc "Ninjaforce",00 _c05 asc "krUe",00
_c7 asc "FTA",00 _c06 asc "Ninjaforce",00
_c8 asc "RedHot ;)",00 _c07 asc "FTA",00
_c9 asc "ECC",00 _c08 asc "RedHot ;)",00
_c10 asc "antoine",00 _c09 asc "ECC",00
_c11 asc "MJM",00 _c10 asc "A2Central",00
_c11 asc "R&D Automation",00
_c12 asc "Gamebits/JuicedGS",00 _c12 asc "Gamebits/JuicedGS",00
_c13 asc "R&D Automation",00 _c13 asc "KFest Organizers",00
_c14 asc "KFest Organizers",00 _c14 asc " Presenters",00
_c15 asc " Presenters",00 _c15 asc " Attendees",00
_c16 asc " Attendees",00 _c16 asc " AND YOU!",00
_c17 asc " AND YOU!",00 _c17 asc "THANKS",00
_c18 asc "THANKS",00 _c18 asc " FOR",00
_c19 asc " FOR",00 _c19 asc " WATCHING",00
_c20 asc " WATCHING",00 _sblank asc "",00
_cblank asc "",00 _r02 asc " /\",00
_r03 asc " .' '.",00
_r04 asc " /======\",00
_r05 asc " ;:. _ ;",00
_r06 asc " |:. (_) |",00
_r07 asc " |:. _ |",00
_r08 asc " |:. (_) |",00
_r09 asc " ;:. ;",00
_r10 asc " .' \:. / `.",00
_r11 asc " / .-'':._.'`-. \",00
_r12 asc " |/ /||\ \|",00
_creditStringsTable _creditStringsTable
da _c2,_c3,_c4,_c5,_c6,_c7,_c8,_c9,_c10 da _c01,_c02,_c03,_c04,_c05,_c06,_c07,_c08
da _c11,_c12,_cblank,_c13,_c14,_c15,_c16,_cblank da _c09,_c10,_c11,_c12,_sblank,_sblank,_c13
da _c17,_cblank,_cblank,_c18,_c19,_c20 da _c14,_c15,_sblank,_c16,_sblank,_sblank
da _cblank,_cblank,_cblank,_cblank,_cblank da _c17,_sblank,_c18,_sblank,_c19
da _sblank,_sblank,_sblank,_sblank,_sblank
da _sblank,_sblank,_sblank,_sblank,_sblank
dw 0000
_rocketStringsTable
da _r02,_r03,_r04,_r05,_r06
da _r07,_r06,_r07,_r06,_r07,_r08,_r09,_r10,_r11,_r12
dw 0000 dw 0000
FinalText asc "",00 FinalText asc " ______________________________________ ",00
asc " KFest is the world's only annual",00 asc "| |",00
asc " convention dedicated to the Apple II",00 asc "| KFest is the world's only annual |",00
asc " and it's the largest gathering of ",00 asc "| convention dedicated to the Apple II |",00
asc " active Apple II users you'll ever see!",00 asc "| and the largest gathering of active |",00
asc "",00 asc "| Apple II users you'll ever see! |",00
asc " The next KFest is July 23-28, 2013.",00 asc "| |",00
asc "",00 asc "| The next KFest is July 23-28, 2013. |",00
asc " You can get more info on their site *",00 asc "| Get more info on their site * |",00
asc " www.kansasfest.org",00 asc "| www.kansasfest.org |",00
asc "",00 asc "|______________________________________|",00
asc "",00 asc "",00
asc " * I'm not affiliated with KansasFest.",00 asc " * I'm not affiliated with KansasFest.",00
asc " I was just looking for an excuse to",00 asc " I've just been wanting to put out",00
asc " write and release some code.",00 asc " some assembly code for a while.",00
asc "",00 asc "",00
asc " Download the demo source online!",00 asc " Download the demo source online!",00
asc " -> github.com/festro",00 asc " -> https://github.com/digarok/festro",00
asc "",00 asc "",00
asc "",00 asc "",00
asc " The End?",00 asc " The End?",00