base:fli_floffy
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | base:fli_floffy [2015-04-17 04:31] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== FLI Floffy ====== | ||
+ | |||
+ | {{flifloffy.png|}} | ||
+ | |||
+ | |||
+ | ===== Concept ===== | ||
+ | A FLI logo is sine-waved first on the Y axis (DYPP) and then on the X axis (tech-tech.) | ||
+ | The most tricky part of this is that in FLI, the colors and bitmap are interconnected in every 8x1 byte, as well as in every char. | ||
+ | So it's hard to shift single rows of pixels up' | ||
+ | And even if the graphics was designed to avoid this, the process would be rather cumbersome rastertime exhaustive. | ||
+ | |||
+ | To get around these problems, the precision of the DYPP has been lowered to every 2nd multicolor pixel, and the maximum difference for the Y-position of each of these segments has been set to 1 pixel. So for each char, there is only 3 cases - up, straight or down. | ||
+ | The graphics has then been designed to be able to handle these cases without color clashes. | ||
+ | Storing the DYPP' | ||
+ | |||
+ | ===== Sourcecode ===== | ||
+ | |||
+ | < | ||
+ | ; | ||
+ | ; FLI Fluffy | ||
+ | ; | ||
+ | ; Coded by Cruzer/ | ||
+ | ; Asm'ed with mxass | ||
+ | ; | ||
+ | |||
+ | ; | ||
+ | |||
+ | .la gfxadrs | ||
+ | .la coladrs | ||
+ | .la segment | ||
+ | .la cnt = $e1 ;1 | ||
+ | .la techpoint = $e2 ;2 | ||
+ | .la dypppoint = $e4 ;2 | ||
+ | .la generate | ||
+ | .la char = $e7 ;1 | ||
+ | |||
+ | ;memory... | ||
+ | |||
+ | ;0340-07ff ysiner | ||
+ | ;0801-08ff basic | ||
+ | ;0900-0aff tech-tech sine | ||
+ | ;0b00-0fff shower | ||
+ | ;1000-15ff noise | ||
+ | ;1600-28ff main | ||
+ | ;29c0-c4ff dypper | ||
+ | ;c500-cc7f fli-bitmap | ||
+ | ;ce00-d3ff dypper pointers | ||
+ | ;d400-dfff logo source | ||
+ | ;e000-ffff fli colors + other stuff like... | ||
+ | ; e000-e6ff tech-techer | ||
+ | ; e700-eaff zpmover | ||
+ | ; eb00-ebff temp | ||
+ | ; ee00-eeff lut | ||
+ | ; ef00-efff zp-initer | ||
+ | ; f000-f7ff font | ||
+ | ; f800-fbff text-screen | ||
+ | ; fe00-ffff dypp sine | ||
+ | |||
+ | .la ysiner | ||
+ | ;la basic = $0801 | ||
+ | .la loadersrc1 | ||
+ | .la techsine | ||
+ | .la shower | ||
+ | .la loadersrc2 | ||
+ | ;la music = $1000 | ||
+ | .la main = $1600 | ||
+ | .la loadersrc3 | ||
+ | .la dypper | ||
+ | .la bitmap | ||
+ | .la dypppnt | ||
+ | .la logosrc | ||
+ | ;la screens | ||
+ | .la techtecher | ||
+ | .la zpmover | ||
+ | .la temp = $eb00 | ||
+ | .la dypppp | ||
+ | .la zpiniter | ||
+ | ;la font = $f000 | ||
+ | ;la textscreen | ||
+ | .la dyppsine | ||
+ | |||
+ | .ba main | ||
+ | .la border=$d020 | ||
+ | |||
+ | ; | ||
+ | jmp start | ||
+ | |||
+ | |||
+ | d011 .by $78, | ||
+ | .by $78, | ||
+ | d018 .by $a0, | ||
+ | |||
+ | fadein .by 0 | ||
+ | fadeout .by 0 | ||
+ | fadepnt .by 0 | ||
+ | |||
+ | fxs .wo fx1, | ||
+ | fx .by $ff | ||
+ | numfx .by 14 | ||
+ | |||
+ | thisfx | ||
+ | techspread .by $00,$00 | ||
+ | techspeed | ||
+ | techoffset .by $00,$00 | ||
+ | dyppspread .by $00,$00 | ||
+ | dyppspeed | ||
+ | dyppoffset .by $00,$00 | ||
+ | updatetype .by 0 ; 0=each frame 1=jumps | ||
+ | fxtimer | ||
+ | |||
+ | fx1 | ||
+ | .by $00,$00 ;techspread | ||
+ | .by $00,$00 ;techspeed | ||
+ | .by $00,$00 ;techoffset | ||
+ | .by $00,$00 ;dyppspread | ||
+ | .by $00,$00 ;dyppspeed | ||
+ | .by $00,$00 ;dyppoffset | ||
+ | .by 0 ; | ||
+ | .wo $300 ;fxtimer | ||
+ | |||
+ | fx2 | ||
+ | .by $03, | ||
+ | .by $02, | ||
+ | .by $00, | ||
+ | .by $04, | ||
+ | .by $02, | ||
+ | .by $00, | ||
+ | .by 0 ; | ||
+ | .wo $1aa ; | ||
+ | |||
+ | |||
+ | fx3 | ||
+ | +techspread .by $06,$06 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $05,$05 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx4 | ||
+ | +techspread .by $03,$05 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $04,$04 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx5 | ||
+ | +techspread .by $08,$08 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $04,$04 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx6 | ||
+ | +techspread .by $04,$04 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $00,$00 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx7 | ||
+ | +techspread .by $06,$09 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $08,$07 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx8 | ||
+ | +techspread .by $06,$06 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $05,$05 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx9 | ||
+ | +techspread .by $84,$05 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $04,$04 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx10 | ||
+ | +techspread .by $04,$fb | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $03,$03 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx11 | ||
+ | +techspread .by $06,$06 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $05,$05 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 1 | ||
+ | +fxtimer | ||
+ | |||
+ | fx12 | ||
+ | +techspread .by $01,$01 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $02,$02 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx13 | ||
+ | +techspread .by $12,$06 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $06,$06 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | fx14 | ||
+ | +techspread .by $06,$06 | ||
+ | +techspeed | ||
+ | +techoffset .by $00,$00 | ||
+ | +dyppspread .by $05,$05 | ||
+ | +dyppspeed | ||
+ | +dyppoffset .by $00,$00 | ||
+ | +updatetype .by 0 | ||
+ | +fxtimer | ||
+ | |||
+ | ;fx15 | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; | ||
+ | start | ||
+ | |||
+ | sei | ||
+ | lda #< | ||
+ | sta $0314 | ||
+ | lda #> | ||
+ | sta $0315 | ||
+ | asl $d019 | ||
+ | lda #$7b | ||
+ | sta $dc0d | ||
+ | lda #$81 | ||
+ | sta $d01a | ||
+ | lda #$1b | ||
+ | sta $d011 | ||
+ | lda #$58 | ||
+ | sta $d012 | ||
+ | |||
+ | lda #$00 | ||
+ | sta $d020 | ||
+ | sta $d021 | ||
+ | |||
+ | jsr init | ||
+ | |||
+ | lda #$00 | ||
+ | jsr $1000 | ||
+ | |||
+ | ; | ||
+ | cli | ||
+ | |||
+ | - lda generate | ||
+ | beq - | ||
+ | |||
+ | jsr clear | ||
+ | jsr maketechtecher | ||
+ | jsr makeysiner | ||
+ | |||
+ | lda #0 | ||
+ | sta generate | ||
+ | sta fadepnt | ||
+ | lda #1 | ||
+ | sta fadein | ||
+ | |||
+ | jmp - | ||
+ | |||
+ | ; | ||
+ | |||
+ | startirq | ||
+ | |||
+ | inc border | ||
+ | |||
+ | ldx #$77 | ||
+ | - | ||
+ | dex | ||
+ | bne - | ||
+ | |||
+ | dec border | ||
+ | |||
+ | lda #< | ||
+ | sta $0314 | ||
+ | lda #> | ||
+ | sta $0315 | ||
+ | |||
+ | jmp ri | ||
+ | |||
+ | mainirq | ||
+ | |||
+ | inc border | ||
+ | |||
+ | lda #$94 | ||
+ | sta $dd00 | ||
+ | |||
+ | ldx #4 | ||
+ | - dex | ||
+ | bne - | ||
+ | |||
+ | jsr shower | ||
+ | |||
+ | ldx #$33 | ||
+ | - dex | ||
+ | bne - | ||
+ | |||
+ | lda #$1f | ||
+ | sta $d011 | ||
+ | lda #$c8 | ||
+ | sta $d016 | ||
+ | lda #$ec | ||
+ | sta $d018 | ||
+ | |||
+ | |||
+ | inc border | ||
+ | jsr $1003 | ||
+ | |||
+ | lda generate | ||
+ | bne +skip | ||
+ | |||
+ | inc border | ||
+ | jsr techtech | ||
+ | |||
+ | inc border | ||
+ | jsr fluffy | ||
+ | |||
+ | inc border | ||
+ | jsr fade | ||
+ | jsr update | ||
+ | jsr textcontrol | ||
+ | |||
+ | jmp +skip2 | ||
+ | +skip | ||
+ | |||
+ | lda #$e0 | ||
+ | - cmp $d012 | ||
+ | bne - | ||
+ | lda #$ee | ||
+ | sta $d018 | ||
+ | |||
+ | +skip2 | ||
+ | |||
+ | jsr spacecontrol | ||
+ | |||
+ | lda #$05 | ||
+ | sta border | ||
+ | |||
+ | ri | ||
+ | asl $d019 | ||
+ | pla | ||
+ | tay | ||
+ | pla | ||
+ | tax | ||
+ | pla | ||
+ | rti | ||
+ | |||
+ | |||
+ | |||
+ | fadeoutirq | ||
+ | |||
+ | ldx cnt | ||
+ | lda fadecolz,x | ||
+ | sta $d020 | ||
+ | lda cnt | ||
+ | cmp #9 | ||
+ | beq +loadnext | ||
+ | inc cnt | ||
+ | jmp ri | ||
+ | |||
+ | fadecolz .by $0, | ||
+ | |||
+ | |||
+ | +loadnext | ||
+ | |||
+ | sei | ||
+ | lda #$00 | ||
+ | sta $d01a | ||
+ | lda #$08 | ||
+ | sta $2e | ||
+ | lda #$03 | ||
+ | sta $2f | ||
+ | |||
+ | ldx #$00 | ||
+ | - | ||
+ | lda loadersrc1, | ||
+ | sta $c000,x | ||
+ | lda loadersrc2, | ||
+ | sta $c0c0,x | ||
+ | lda loadersrc3, | ||
+ | sta $c180,x | ||
+ | inx | ||
+ | cpx #$c0 | ||
+ | bne - | ||
+ | |||
+ | jmp $c1f0 | ||
+ | |||
+ | |||
+ | ; | ||
+ | spacecontrol | ||
+ | |||
+ | lda $dc01 | ||
+ | cmp #$ef | ||
+ | bne +r | ||
+ | |||
+ | +space | ||
+ | |||
+ | lda #< | ||
+ | sta $0314 | ||
+ | lda #> | ||
+ | sta $0315 | ||
+ | lda #$00 | ||
+ | sta $d012 | ||
+ | sta cnt | ||
+ | |||
+ | sta $d418 | ||
+ | lda #$60 | ||
+ | sta $d011 | ||
+ | |||
+ | +r rts | ||
+ | |||
+ | |||
+ | ; | ||
+ | textcontrol | ||
+ | |||
+ | lda msgtimer | ||
+ | beq + | ||
+ | dec msgtimer | ||
+ | rts | ||
+ | + | ||
+ | lda msg | ||
+ | asl | ||
+ | tax | ||
+ | lda mul20,x | ||
+ | sta +l+1 | ||
+ | lda mul20+1,x | ||
+ | sta +l+2 | ||
+ | |||
+ | ldx charx | ||
+ | +l lda messages,x | ||
+ | sta char | ||
+ | jsr writechar | ||
+ | inc charx | ||
+ | lda charx | ||
+ | cmp #20 | ||
+ | bne +b | ||
+ | lda #0 | ||
+ | sta charx | ||
+ | lda msg | ||
+ | clc | ||
+ | adc #$01 | ||
+ | cmp #40 | ||
+ | bne + | ||
+ | lda #$00 | ||
+ | + sta msg | ||
+ | lda #$55 | ||
+ | sta msgtimer | ||
+ | +b | ||
+ | |||
+ | rts | ||
+ | |||
+ | |||
+ | writechar | ||
+ | |||
+ | |||
+ | lda charx | ||
+ | asl | ||
+ | clc | ||
+ | adc #$30 | ||
+ | sta $f8 | ||
+ | lda #$fa | ||
+ | sta $f9 | ||
+ | |||
+ | lda char | ||
+ | sec | ||
+ | sbc #$60 | ||
+ | bcs + | ||
+ | lda char | ||
+ | + tax | ||
+ | lda chars,x | ||
+ | asl | ||
+ | asl | ||
+ | ldy #$00 | ||
+ | sta ($f8),y | ||
+ | ldy #$28 | ||
+ | clc | ||
+ | adc #1 | ||
+ | sta ($f8),y | ||
+ | ldy #$01 | ||
+ | adc #1 | ||
+ | sta ($f8),y | ||
+ | ldy #$29 | ||
+ | adc #1 | ||
+ | sta ($f8),y | ||
+ | |||
+ | rts | ||
+ | |||
+ | |||
+ | charx .by 0 | ||
+ | |||
+ | |||
+ | chars | ||
+ | .by 0,1,2,3, 4,5,13,14, 15, | ||
+ | .by 0,0,0,0, 0, | ||
+ | .by 0,0, 0,56,0,57 | ||
+ | |||
+ | msg .by 0 | ||
+ | msgtimer .by 0 | ||
+ | |||
+ | ;.text "***** abcdefghijklmnopqrstuvwxyz0123456789!" | ||
+ | |||
+ | messages | ||
+ | |||
+ | msg01 .text " | ||
+ | msg02 .text " | ||
+ | msg03 .text " | ||
+ | msg04 .text " that says " | ||
+ | msg05 .text "guess that only can " | ||
+ | msg06 .text " | ||
+ | ; | ||
+ | msg08 .text " | ||
+ | |||
+ | msg09 .text " | ||
+ | msg10 .text " an oldskool dream " | ||
+ | msg11 .text " finally cums true " | ||
+ | msg12 .text " | ||
+ | msg13 .text " | ||
+ | msg14 .text " | ||
+ | msg15 .text "of cruzer slash cml!" | ||
+ | ; | ||
+ | |||
+ | msg17 .text " | ||
+ | msg18 .text " | ||
+ | msg19 .text " | ||
+ | msg20 .text " | ||
+ | msg21 .text " quality ingredients" | ||
+ | msg22 .text " like fli each line " | ||
+ | msg23 .text " double sine dyppin'" | ||
+ | msg24 .text " | ||
+ | |||
+ | msg25 .text " all upd8in' | ||
+ | msg26 .text " 50 frames per 2nd! " | ||
+ | ; | ||
+ | msg28 .text " | ||
+ | msg29 .text " | ||
+ | ; | ||
+ | msg31 .text " | ||
+ | msg32 .text " | ||
+ | msg33 .text " | ||
+ | ; | ||
+ | msg35 .text " | ||
+ | msg36 .text " | ||
+ | msg37 .text " | ||
+ | msg38 .text " aah yeah, like ya " | ||
+ | msg39 .text " | ||
+ | ; | ||
+ | |||
+ | ;.text " | ||
+ | ;.text " | ||
+ | |||
+ | |||
+ | mul20 | ||
+ | .wo msg01, | ||
+ | .wo msg11, | ||
+ | .wo msg21, | ||
+ | .wo msg31, | ||
+ | |||
+ | mul80 .wo 0, | ||
+ | |||
+ | ; | ||
+ | fade | ||
+ | lda fadein | ||
+ | bne +in | ||
+ | lda fadeout | ||
+ | bne +out | ||
+ | rts | ||
+ | +in | ||
+ | ldx fadepnt | ||
+ | lda d011,x | ||
+ | and #$3f | ||
+ | sta d011,x | ||
+ | inx | ||
+ | stx fadepnt | ||
+ | cpx #8 | ||
+ | bne + | ||
+ | lda #0 | ||
+ | sta fadein | ||
+ | + | ||
+ | rts | ||
+ | +out | ||
+ | ldx fadepnt | ||
+ | lda d011,x | ||
+ | ora #$70 | ||
+ | sta d011,x | ||
+ | inx | ||
+ | stx fadepnt | ||
+ | cpx #8 | ||
+ | bne + | ||
+ | lda #0 | ||
+ | sta fadeout | ||
+ | jmp newfx | ||
+ | + | ||
+ | rts | ||
+ | |||
+ | ; | ||
+ | update | ||
+ | |||
+ | inc cnt | ||
+ | |||
+ | lda updatetype | ||
+ | beq + | ||
+ | lda cnt | ||
+ | and #$04 | ||
+ | bne +skip | ||
+ | + | ||
+ | lda techpoint+0 | ||
+ | clc | ||
+ | tadd1 adc #$00 ; | ||
+ | sta techpoint+0 | ||
+ | lda techpoint+1 | ||
+ | clc | ||
+ | tadd2 adc #$00 ; | ||
+ | sta techpoint+1 | ||
+ | |||
+ | lda dypppoint+0 | ||
+ | clc | ||
+ | dadd1 adc #$00 ; | ||
+ | sta dypppoint+0 | ||
+ | lda dypppoint+1 | ||
+ | clc | ||
+ | dadd2 adc #$00 ; | ||
+ | sta dypppoint+1 | ||
+ | |||
+ | |||
+ | +skip | ||
+ | lda fadeout | ||
+ | beq + | ||
+ | rts | ||
+ | + | ||
+ | lda fxtimer | ||
+ | sec | ||
+ | sbc #1 | ||
+ | sta fxtimer | ||
+ | lda fxtimer+1 | ||
+ | sbc #0 | ||
+ | sta fxtimer+1 | ||
+ | bmi + | ||
+ | rts | ||
+ | + | ||
+ | lda #1 | ||
+ | sta fadeout | ||
+ | lda #0 | ||
+ | sta fadepnt | ||
+ | rts | ||
+ | |||
+ | |||
+ | ; | ||
+ | newfx | ||
+ | |||
+ | lda #1 | ||
+ | sta generate | ||
+ | |||
+ | ldx fx | ||
+ | inx | ||
+ | cpx numfx | ||
+ | bne + | ||
+ | ldx #1 | ||
+ | + stx fx | ||
+ | |||
+ | txa | ||
+ | asl | ||
+ | tax | ||
+ | lda fxs,x | ||
+ | sta +l+1 | ||
+ | lda fxs+1,x | ||
+ | sta +l+2 | ||
+ | |||
+ | ldx #0 | ||
+ | - | ||
+ | +l lda fx1,x | ||
+ | sta thisfx,x | ||
+ | inx | ||
+ | cpx #15 | ||
+ | bne - | ||
+ | |||
+ | lda techoffset+0 | ||
+ | sta techpoint+0 | ||
+ | lda techoffset+1 | ||
+ | sta techpoint+1 | ||
+ | lda dyppoffset+0 | ||
+ | sta dypppoint+0 | ||
+ | lda dyppoffset+1 | ||
+ | sta dypppoint+1 | ||
+ | |||
+ | lda techspeed+0 | ||
+ | sta tadd1+1 | ||
+ | lda techspeed+1 | ||
+ | sta tadd2+1 | ||
+ | lda dyppspeed+0 | ||
+ | sta dadd1+1 | ||
+ | lda dyppspeed+1 | ||
+ | sta dadd2+1 | ||
+ | |||
+ | rts | ||
+ | |||
+ | ; | ||
+ | |||
+ | fluffy | ||
+ | |||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | clc | ||
+ | jsr zpiniter | ||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | inc border | ||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | |||
+ | ldx dypppoint+0 | ||
+ | ldy dypppoint+1 | ||
+ | jsr ysiner | ||
+ | |||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | inc border | ||
+ | lda #$ee | ||
+ | sta $d018 | ||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | lda #0 | ||
+ | sta segment | ||
+ | -loop | ||
+ | |||
+ | jsr dyppcontrol2 | ||
+ | |||
+ | inc segment | ||
+ | lda segment | ||
+ | cmp #3 | ||
+ | beq + | ||
+ | |||
+ | ;jmp + | ||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | inc border | ||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | ;move zp-adrs 1 char up... | ||
+ | jsr zpmover | ||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | dec border | ||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | jmp -loop | ||
+ | + | ||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | |||
+ | rts | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | dyppcontrol2 | ||
+ | |||
+ | ;uses pointer-tables instead of dypperjumpvec | ||
+ | |||
+ | |||
+ | |||
+ | ;recycle.by 0, | ||
+ | ;orig .by 1, | ||
+ | |||
+ | |||
+ | ;-16 | ||
+ | |||
+ | ldx segment | ||
+ | |||
+ | cpydisp cpx #$00 ;ydisp+0 | ||
+ | bne + | ||
+ | ldys lda #$00 ;ys+0 | ||
+ | and #$07 | ||
+ | tax | ||
+ | ldp1 lda dypppnt+$00, | ||
+ | sta +j+1 | ||
+ | ldp2 lda dypppnt+$08, | ||
+ | sta +j+2 | ||
+ | ldy #$00+24 | ||
+ | ldx #$00+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+2 | ||
+ | bne + | ||
+ | lda #$00 ;ys+2 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$10, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$18, | ||
+ | sta +j+2 | ||
+ | ldy #$08+24 | ||
+ | ldx #$01+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+2 | ||
+ | bne + | ||
+ | lda #$00 ;ys+2 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$20, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$28, | ||
+ | sta +j+2 | ||
+ | ldy #$10+24 | ||
+ | ldx #$02+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+6 | ||
+ | bne + | ||
+ | lda #$00 ;ys+6 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$30, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$38, | ||
+ | sta +j+2 | ||
+ | ldy #$18+24 | ||
+ | ldx #$03+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+8 | ||
+ | bne + | ||
+ | lda #$00 ;ys+8 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$40, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$48, | ||
+ | sta +j+2 | ||
+ | ldy #$20+24 | ||
+ | ldx #$04+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+10 | ||
+ | bne + | ||
+ | lda #$00 ;ys+10 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$50, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$58, | ||
+ | sta +j+2 | ||
+ | ldy #$28+24 | ||
+ | ldx #$05+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+12 | ||
+ | bne + | ||
+ | lda #$00 ;ys+12 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$60, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$68, | ||
+ | sta +j+2 | ||
+ | ldy #$30+24 | ||
+ | ldx #$06+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+14 | ||
+ | bne + | ||
+ | lda #$00 ;ys+14 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$70, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$78, | ||
+ | sta +j+2 | ||
+ | ldy #$38+24 | ||
+ | ldx #$07+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+16 | ||
+ | bne + | ||
+ | lda #$00 ;ys+16 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$80, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$88, | ||
+ | sta +j+2 | ||
+ | ldy #$40+24 | ||
+ | ldx #$08+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+18 | ||
+ | bne + | ||
+ | lda #$00 ;ys+18 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$50, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$58, | ||
+ | sta +j+2 | ||
+ | ldy #$48+24 | ||
+ | ldx #$09+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+20 | ||
+ | bne + | ||
+ | lda #$00 ;ys+20 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$a0, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$a8, | ||
+ | sta +j+2 | ||
+ | ldy #$50+24 | ||
+ | ldx #$0a+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+22 | ||
+ | bne + | ||
+ | lda #$00 ;ys+22 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$b0, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$b8, | ||
+ | sta +j+2 | ||
+ | ldy #$58+24 | ||
+ | ldx #$0b+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+24 | ||
+ | bne + | ||
+ | lda #$00 ;ys+24 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$c0, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$c8, | ||
+ | sta +j+2 | ||
+ | ldy #$60+24 | ||
+ | ldx #$0c+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+26 | ||
+ | bne + | ||
+ | lda #$00 ;ys+26 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$10, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$18, | ||
+ | sta +j+2 | ||
+ | ldy #$68+24 | ||
+ | ldx #$0d+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+28 | ||
+ | bne + | ||
+ | lda #$00 ;ys+28 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$20, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$28, | ||
+ | sta +j+2 | ||
+ | ldy #$70+24 | ||
+ | ldx #$0e+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+30 | ||
+ | bne + | ||
+ | lda #$00 ;ys+30 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$30, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$38, | ||
+ | sta +j+2 | ||
+ | ldy #$78+24 | ||
+ | ldx #$0f+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+16 | ||
+ | bne + | ||
+ | lda #$00 ;ys+16 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$40, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$48, | ||
+ | sta +j+2 | ||
+ | ldy #$80+24 | ||
+ | ldx #$10+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+34 | ||
+ | bne + | ||
+ | lda #$00 ;ys+34 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$10, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$18, | ||
+ | sta +j+2 | ||
+ | ldy #$88+24 | ||
+ | ldx #$11+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+36 | ||
+ | bne + | ||
+ | lda #$00 ;ys+36 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$20, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$28, | ||
+ | sta +j+2 | ||
+ | ldy #$90+24 | ||
+ | ldx #$12+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+38 | ||
+ | bne + | ||
+ | lda #$00 ;ys+38 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$30, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$38, | ||
+ | sta +j+2 | ||
+ | ldy #$98+24 | ||
+ | ldx #$13+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+40 | ||
+ | bne + | ||
+ | lda #$00 ;ys+40 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$40, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$48, | ||
+ | sta +j+2 | ||
+ | ldy #$a0+24 | ||
+ | ldx #$14+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+42 | ||
+ | bne + | ||
+ | lda #$00 ;ys+42 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$0150, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$0158, | ||
+ | sta +j+2 | ||
+ | ldy #$a8+24 | ||
+ | ldx #$15+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+44 | ||
+ | bne + | ||
+ | lda #$00 ;ys+44 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$0160, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$0168, | ||
+ | sta +j+2 | ||
+ | ldy #$b0+24 | ||
+ | ldx #$16+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+46 | ||
+ | bne + | ||
+ | lda #$00 ;ys+46 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$0170, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$0178, | ||
+ | sta +j+2 | ||
+ | ldy #$b8+24 | ||
+ | ldx #$17+3 | ||
+ | +j jsr dypper | ||
+ | ldx segment | ||
+ | + | ||
+ | cpx #$00 ;ydisp+48 | ||
+ | bne + | ||
+ | lda #$00 ;ys+48 | ||
+ | and #$07 | ||
+ | tax | ||
+ | lda dypppnt+$0180, | ||
+ | sta +j+1 | ||
+ | lda dypppnt+$0188, | ||
+ | sta +j+2 | ||
+ | lda dypppnt+$00, | ||
+ | sta +j2+1 | ||
+ | lda dypppnt+$08, | ||
+ | sta +j2+2 | ||
+ | ldy #$c0+24 | ||
+ | ldx #$18+3 | ||
+ | +j jsr dypper | ||
+ | |||
+ | ldy #$c8+24 | ||
+ | ldx #$19+3 | ||
+ | +j2 jsr dypper | ||
+ | |||
+ | + | ||
+ | rts | ||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | techtech | ||
+ | |||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | ldx techpoint+0 | ||
+ | ldy techpoint+1 | ||
+ | |||
+ | clc | ||
+ | jsr techtecher | ||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | |||
+ | rts | ||
+ | |||
+ | ; | ||
+ | |||
+ | init | ||
+ | |||
+ | lda #$36 | ||
+ | sta $01 | ||
+ | |||
+ | jsr vicinit | ||
+ | jsr clear | ||
+ | jsr newfx | ||
+ | jsr makeluts | ||
+ | jsr makedypper | ||
+ | jsr makeshower | ||
+ | jsr makezpiniter | ||
+ | jsr makezpmover | ||
+ | jsr maketechtecher | ||
+ | jsr makeysiner | ||
+ | |||
+ | lda #0 | ||
+ | sta generate | ||
+ | lda #1 | ||
+ | sta fadein | ||
+ | |||
+ | lda #$0b | ||
+ | sta $d011 | ||
+ | jsr colorinit2 | ||
+ | |||
+ | |||
+ | rts | ||
+ | |||
+ | ; | ||
+ | vicinit | ||
+ | |||
+ | lda #$94 | ||
+ | sta $dd00 | ||
+ | lda #$ee | ||
+ | sta $d018 | ||
+ | lda #$c8 | ||
+ | sta $d016 | ||
+ | lda #$1b | ||
+ | sta $d011 | ||
+ | lda #$00 | ||
+ | sta $d015 | ||
+ | |||
+ | |||
+ | ldx #0 | ||
+ | txa | ||
+ | - | ||
+ | sta $d800,x | ||
+ | sta $d900,x | ||
+ | sta $da00,x | ||
+ | sta $db00,x | ||
+ | inx | ||
+ | bne - | ||
+ | - | ||
+ | lda #$05 | ||
+ | sta $d800,x | ||
+ | lda #$01 | ||
+ | sta $d9c0,x | ||
+ | inx | ||
+ | cpx #$c0 | ||
+ | bne - | ||
+ | |||
+ | |||
+ | ldx #0 | ||
+ | lda #$00 | ||
+ | - | ||
+ | sta $fa30,x | ||
+ | inx | ||
+ | cpx #$50 | ||
+ | bne - | ||
+ | |||
+ | rts | ||
+ | |||
+ | |||
+ | ; | ||
+ | colorinit2 | ||
+ | |||
+ | |||
+ | lda #$00 | ||
+ | ldx #$80 | ||
+ | - | ||
+ | sta $d800,x | ||
+ | dex | ||
+ | bne - | ||
+ | |||
+ | ldx #0 | ||
+ | lda #$04 | ||
+ | - | ||
+ | sta $d8c8,x | ||
+ | inx | ||
+ | cpx #$f0 | ||
+ | bne - | ||
+ | |||
+ | rts | ||
+ | |||
+ | ; | ||
+ | clear | ||
+ | |||
+ | |||
+ | lda #0 | ||
+ | tax | ||
+ | - | ||
+ | sta bitmap+$0640, | ||
+ | sta bitmap+$0700, | ||
+ | sta bitmap+$0800, | ||
+ | sta bitmap+$0900, | ||
+ | sta bitmap+$0a00, | ||
+ | sta bitmap+$0b00, | ||
+ | sta bitmap+$0c00, | ||
+ | sta bitmap+$0d00, | ||
+ | inx | ||
+ | bne - | ||
+ | |||
+ | rts | ||
+ | |||
+ | ; | ||
+ | makeluts | ||
+ | |||
+ | |||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | |||
+ | |||
+ | ;make dypppp (used to determine which of the 3 dypp " | ||
+ | |||
+ | lda #> | ||
+ | sta dypppp | ||
+ | |||
+ | ldx #1 | ||
+ | - | ||
+ | txa | ||
+ | bmi + | ||
+ | lda #> | ||
+ | jmp +j | ||
+ | + lda #> | ||
+ | +j sta dypppp,x | ||
+ | inx | ||
+ | bne - | ||
+ | |||
+ | |||
+ | jmp +notest | ||
+ | ;test... | ||
+ | lda #> | ||
+ | ldx #0 | ||
+ | - | ||
+ | sta dypppp,x | ||
+ | inx | ||
+ | bne - | ||
+ | |||
+ | +notest | ||
+ | |||
+ | |||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | |||
+ | rts | ||
+ | |||
+ | ; | ||
+ | makedypper | ||
+ | |||
+ | |||
+ | .la height=26 | ||
+ | |||
+ | sei | ||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | |||
+ | lda #<dypper | ||
+ | sta $fe | ||
+ | lda #>dypper | ||
+ | sta $ff | ||
+ | |||
+ | |||
+ | lda #0 | ||
+ | sta +version | ||
+ | |||
+ | -loop4 | ||
+ | |||
+ | lda #0 | ||
+ | sta +x | ||
+ | |||
+ | |||
+ | |||
+ | -loop3 | ||
+ | |||
+ | |||
+ | ;if not original, skip it... | ||
+ | |||
+ | ldx +x | ||
+ | lda orig,x | ||
+ | bne + | ||
+ | jmp +skipit | ||
+ | + | ||
+ | |||
+ | ;fetch gfx/cols... | ||
+ | |||
+ | ldx +x | ||
+ | lda recycle,x | ||
+ | beq +black | ||
+ | sec | ||
+ | sbc #1 | ||
+ | pha | ||
+ | sta $f8 | ||
+ | lda #0 | ||
+ | sta $f9 | ||
+ | ;*18... | ||
+ | asl $f8 | ||
+ | rol $f9 | ||
+ | asl $f8 | ||
+ | rol $f9 | ||
+ | asl $f8 | ||
+ | rol $f9 | ||
+ | asl $f8 | ||
+ | rol $f9 | ||
+ | pla | ||
+ | asl | ||
+ | clc | ||
+ | adc $f8 | ||
+ | sta $f8 | ||
+ | lda #0 | ||
+ | adc $f9 | ||
+ | sta $f9 | ||
+ | |||
+ | lda $f8 | ||
+ | sta $fa | ||
+ | |||
+ | lda +version | ||
+ | asl | ||
+ | asl | ||
+ | clc | ||
+ | adc $f9 | ||
+ | adc #> | ||
+ | sta $f9 | ||
+ | adc #$02 | ||
+ | sta $fb | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda ($f8),y | ||
+ | sta dyppergfx+4, | ||
+ | lda ($fa),y | ||
+ | sta dyppercols+4, | ||
+ | iny | ||
+ | cpy #18 | ||
+ | bne - | ||
+ | |||
+ | jmp + | ||
+ | |||
+ | +black | ||
+ | |||
+ | ldy #0 | ||
+ | tya | ||
+ | - | ||
+ | sta dyppergfx+3, | ||
+ | sta dyppercols+3, | ||
+ | iny | ||
+ | cpy #18 | ||
+ | bne - | ||
+ | |||
+ | + | ||
+ | |||
+ | |||
+ | lda #0 | ||
+ | sta +ydisp | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | -loop2 | ||
+ | |||
+ | |||
+ | |||
+ | ldy #0 | ||
+ | tya | ||
+ | - | ||
+ | sta gfxused,y | ||
+ | sta colused,y | ||
+ | iny | ||
+ | cpy #height | ||
+ | bne - | ||
+ | |||
+ | |||
+ | ;skip upper/lower bytes, depending which way it points... | ||
+ | lda +version | ||
+ | cmp #0 | ||
+ | bne + | ||
+ | ; | ||
+ | lda #1 | ||
+ | ;sta gfxused+0 | ||
+ | ;sta colused+0 | ||
+ | jmp +j | ||
+ | + | ||
+ | cmp #1 | ||
+ | bne + | ||
+ | ; | ||
+ | lda #1 | ||
+ | sta gfxused+0 | ||
+ | sta colused+0 | ||
+ | sta gfxused+height-1 | ||
+ | sta colused+height-1 | ||
+ | jmp +j | ||
+ | + | ||
+ | ; | ||
+ | lda #1 | ||
+ | ;sta gfxused+height-1 | ||
+ | ;sta colused+height-1 | ||
+ | +j | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;store dypper-pointers (replaces jumpers)... | ||
+ | lda +x | ||
+ | sta $f0 | ||
+ | lda #$00 | ||
+ | sta $f1 | ||
+ | asl $f0 | ||
+ | rol $f1 | ||
+ | asl $f0 | ||
+ | rol $f1 | ||
+ | asl $f0 | ||
+ | rol $f1 | ||
+ | asl $f0 | ||
+ | rol $f1 | ||
+ | lda +version | ||
+ | asl | ||
+ | clc | ||
+ | adc $f1 | ||
+ | adc #> | ||
+ | sta $f1 | ||
+ | ldy +ydisp | ||
+ | lda $fe | ||
+ | sta ($f0),y | ||
+ | tya | ||
+ | ora #$08 | ||
+ | tay | ||
+ | lda $ff | ||
+ | sta ($f0),y | ||
+ | |||
+ | |||
+ | |||
+ | ;make gfx-dypper... | ||
+ | |||
+ | |||
+ | lda +ydisp | ||
+ | asl | ||
+ | clc | ||
+ | adc #$02 | ||
+ | sta +s1+1 | ||
+ | |||
+ | lda #0 | ||
+ | sta +y | ||
+ | |||
+ | -loop | ||
+ | |||
+ | ldy +y | ||
+ | lda gfxused,y | ||
+ | bne +skip | ||
+ | lda dyppergfx,y | ||
+ | sta +l1+1 | ||
+ | |||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda dyppersrc,y | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #4 | ||
+ | bne - | ||
+ | |||
+ | jsr yaddfe | ||
+ | |||
+ | |||
+ | ldx +y | ||
+ | lda #1 | ||
+ | sta gfxused,x | ||
+ | |||
+ | ;check for other similar bytes... | ||
+ | |||
+ | ldy +s1+1 | ||
+ | iny | ||
+ | iny | ||
+ | sty +s2+1 | ||
+ | |||
+ | inx | ||
+ | cpx #height | ||
+ | beq +skip | ||
+ | -check | ||
+ | lda +l1+1 | ||
+ | cmp dyppergfx,x | ||
+ | beq +found | ||
+ | -cont | ||
+ | inc +s2+1 | ||
+ | inc +s2+1 | ||
+ | inx | ||
+ | cpx #height | ||
+ | bne -check | ||
+ | jmp +skip | ||
+ | +found | ||
+ | lda gfxused,x | ||
+ | bne -cont | ||
+ | lda #1 | ||
+ | sta gfxused,x | ||
+ | ldy #0 | ||
+ | lda dyppersrc2+0 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda dyppersrc2+1 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | jsr yaddfe | ||
+ | jmp -cont | ||
+ | |||
+ | |||
+ | +skip | ||
+ | |||
+ | |||
+ | inc +s1+1 | ||
+ | inc +s1+1 | ||
+ | |||
+ | inc +y | ||
+ | lda +y | ||
+ | cmp #height | ||
+ | bne -loop | ||
+ | |||
+ | |||
+ | +end | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;make color-dypper... | ||
+ | |||
+ | |||
+ | lda +ydisp | ||
+ | asl | ||
+ | clc | ||
+ | adc #$72 | ||
+ | sta +s1+1 | ||
+ | |||
+ | lda #0 | ||
+ | sta +y | ||
+ | sta +txycop | ||
+ | -loop | ||
+ | |||
+ | ldy +y | ||
+ | lda colused,y | ||
+ | beq + | ||
+ | jmp +skip ;if color is allready drawn, skip it | ||
+ | + | ||
+ | lda dyppercols, | ||
+ | sta +l1+1 | ||
+ | bne + | ||
+ | jmp +skip ;if byte=black, skip color | ||
+ | + | ||
+ | |||
+ | ;copy txa,tay for 1st byte... | ||
+ | lda +txycop | ||
+ | bne + | ||
+ | ldy #0 | ||
+ | lda +txysrc | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda +txysrc+1 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | jsr yaddfe | ||
+ | lda #1 | ||
+ | sta +txycop | ||
+ | + | ||
+ | |||
+ | jsr singlecolorcheck | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda dyppersrc,y | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #4 | ||
+ | bne - | ||
+ | |||
+ | jsr yaddfe | ||
+ | |||
+ | |||
+ | |||
+ | ldx +y | ||
+ | lda #1 | ||
+ | sta colused,x | ||
+ | |||
+ | ;check for other similar bytes... | ||
+ | |||
+ | ldy +s1+1 | ||
+ | iny | ||
+ | iny | ||
+ | sty +s2+1 | ||
+ | |||
+ | inx | ||
+ | cpx #height | ||
+ | beq +skip | ||
+ | -check | ||
+ | ;check for same color... | ||
+ | lda +l1+1 | ||
+ | cmp dyppercols, | ||
+ | beq +found | ||
+ | |||
+ | ;check for singlecolors with same color in left nybble... | ||
+ | lda +l1+1 | ||
+ | and #$f0 | ||
+ | cmp dyppercols, | ||
+ | beq +found | ||
+ | |||
+ | ; | ||
+ | |||
+ | -cont | ||
+ | inc +s2+1 | ||
+ | inc +s2+1 | ||
+ | inx | ||
+ | cpx #height | ||
+ | bne -check | ||
+ | jmp +skip | ||
+ | +found | ||
+ | lda colused,x | ||
+ | bne -cont | ||
+ | lda #1 | ||
+ | sta colused,x | ||
+ | ldy #0 | ||
+ | lda dyppersrc2+0 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda dyppersrc2+1 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | jsr yaddfe | ||
+ | jmp -cont | ||
+ | |||
+ | |||
+ | +skip | ||
+ | |||
+ | |||
+ | inc +s1+1 | ||
+ | inc +s1+1 | ||
+ | |||
+ | inc +y | ||
+ | lda +y | ||
+ | cmp #height | ||
+ | beq +end | ||
+ | jmp -loop | ||
+ | |||
+ | |||
+ | +end | ||
+ | |||
+ | ldy #0 | ||
+ | lda #$60 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | jsr yaddfe | ||
+ | |||
+ | +skippy | ||
+ | |||
+ | inc +ydisp | ||
+ | lda +ydisp | ||
+ | cmp #8 | ||
+ | beq + | ||
+ | jmp -loop2 | ||
+ | |||
+ | + | ||
+ | |||
+ | |||
+ | +skipit | ||
+ | |||
+ | |||
+ | inc +x | ||
+ | lda +x | ||
+ | cmp #26 | ||
+ | beq + | ||
+ | |||
+ | jmp -loop3 | ||
+ | |||
+ | + | ||
+ | |||
+ | inc +version | ||
+ | lda +version | ||
+ | cmp #3 | ||
+ | beq + | ||
+ | jmp -loop4 | ||
+ | + | ||
+ | |||
+ | |||
+ | lda #$36 | ||
+ | sta $01 | ||
+ | |||
+ | rts | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | singlecolorcheck | ||
+ | |||
+ | ; | ||
+ | ;if(match found) color is corrected from singlecolor to the matching " | ||
+ | ;and it will be found later, hopefully | ||
+ | |||
+ | lda +l1+1 | ||
+ | and #$0f | ||
+ | beq + | ||
+ | rts | ||
+ | + | ||
+ | ldx +y | ||
+ | inx | ||
+ | cpx #height | ||
+ | beq +end | ||
+ | -loop | ||
+ | lda dyppercols, | ||
+ | and #$f0 | ||
+ | cmp +l1+1 | ||
+ | bne + | ||
+ | |||
+ | ;match found! | ||
+ | lda dyppercols, | ||
+ | sta +l1+1 | ||
+ | rts | ||
+ | + | ||
+ | inx | ||
+ | cpx #height | ||
+ | bne -loop | ||
+ | |||
+ | +end | ||
+ | rts | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | +x .by 0 | ||
+ | +y .by 0 | ||
+ | +ydisp .by 0 | ||
+ | +version .by 0 | ||
+ | |||
+ | +txycop .by 0 | ||
+ | +txysrc | ||
+ | txa | ||
+ | tay | ||
+ | |||
+ | dyppersrc | ||
+ | |||
+ | +l1 lda #%00000000 | ||
+ | +s1 sta ($02),y | ||
+ | |||
+ | dyppersrc2 | ||
+ | |||
+ | +s2 sta ($02),y | ||
+ | |||
+ | |||
+ | +last .by 0 | ||
+ | |||
+ | dyppergfx | ||
+ | |||
+ | .by 0, | ||
+ | |||
+ | |||
+ | dyppercols | ||
+ | |||
+ | .by 0, | ||
+ | |||
+ | |||
+ | |||
+ | gfxused .text " | ||
+ | colused .text " | ||
+ | |||
+ | recycle .by 0, | ||
+ | orig .by 1, | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | makeshower | ||
+ | |||
+ | lda #<shower | ||
+ | sta $fe | ||
+ | lda #>shower | ||
+ | sta $ff | ||
+ | |||
+ | lda #0 | ||
+ | sta +y | ||
+ | |||
+ | -loop | ||
+ | lda +y | ||
+ | and #$07 | ||
+ | tay | ||
+ | clc | ||
+ | adc #<d011 | ||
+ | sta +l1+1 | ||
+ | |||
+ | lda +y | ||
+ | sec | ||
+ | sbc #7 | ||
+ | bcs + | ||
+ | lda +l1+1 | ||
+ | clc | ||
+ | adc #$08 | ||
+ | sta +l1+1 | ||
+ | + | ||
+ | lda d018,y | ||
+ | sta +l2+1 | ||
+ | ;lda +l3+1 | ||
+ | ;clc | ||
+ | ;adc #1 | ||
+ | ;sta +l3+1 | ||
+ | ;lda +l3+2 | ||
+ | ;adc #0 | ||
+ | ;sta +l3+2 | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda showersrc,y | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #20 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | inc +y | ||
+ | lda +y | ||
+ | cmp #$34 | ||
+ | bne -loop | ||
+ | |||
+ | lda #$60 | ||
+ | ldy #0 | ||
+ | sta ($fe),y | ||
+ | |||
+ | rts | ||
+ | |||
+ | +y .by 0 | ||
+ | |||
+ | showersrc | ||
+ | |||
+ | +l1 lda d011 | ||
+ | sta $d011 | ||
+ | +l2 lda #$00 | ||
+ | sta $d018 | ||
+ | lda #$00 | ||
+ | and #$07 | ||
+ | ora #$d8 | ||
+ | sta $d016 | ||
+ | nop | ||
+ | ;nop | ||
+ | |||
+ | |||
+ | ; | ||
+ | makezpmover | ||
+ | |||
+ | lda #< | ||
+ | sta $fe | ||
+ | lda #> | ||
+ | sta $ff | ||
+ | |||
+ | lda #0 | ||
+ | sta +y | ||
+ | |||
+ | -loop | ||
+ | |||
+ | ;check adr for splitting... | ||
+ | |||
+ | lda $fe | ||
+ | sec | ||
+ | sbc #$c0 | ||
+ | bcc + | ||
+ | lda $ff | ||
+ | and #$03 | ||
+ | bne + | ||
+ | |||
+ | ldy #$00 | ||
+ | lda #$4c | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda #$e0 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda $ff | ||
+ | clc | ||
+ | adc #$01 | ||
+ | sta ($fe),y | ||
+ | |||
+ | sta $ff | ||
+ | lda #$e0 | ||
+ | sta $fe | ||
+ | + | ||
+ | |||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda zpmoversrc, | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #8 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | inc +l1+1 | ||
+ | inc +s1+1 | ||
+ | inc +l2+1 | ||
+ | inc +s2+1 | ||
+ | |||
+ | inc +y | ||
+ | lda +y | ||
+ | cmp #$50 | ||
+ | bne -loop | ||
+ | |||
+ | lda #$60 | ||
+ | ldy #0 | ||
+ | sta ($fe),y | ||
+ | |||
+ | rts | ||
+ | |||
+ | +y .by 0 | ||
+ | |||
+ | zpmoversrc | ||
+ | |||
+ | +l1 lda $12 | ||
+ | +s1 sta $02 | ||
+ | +l2 lda $82 | ||
+ | +s2 sta $72 | ||
+ | |||
+ | |||
+ | ; | ||
+ | makezpiniter | ||
+ | |||
+ | |||
+ | |||
+ | lda #$34 | ||
+ | sta $01 | ||
+ | |||
+ | ;calc gfx-adrs... | ||
+ | |||
+ | lda #$40 | ||
+ | sta +adr | ||
+ | lda #$c6 | ||
+ | sta +adr+1 | ||
+ | |||
+ | ldy #$00 | ||
+ | ldx #$00 | ||
+ | - | ||
+ | lda +adr | ||
+ | sta temp+$02,y | ||
+ | lda +adr+1 | ||
+ | sta temp+$03,y | ||
+ | |||
+ | inc +adr | ||
+ | |||
+ | inx | ||
+ | iny | ||
+ | iny | ||
+ | tya | ||
+ | and #$0f | ||
+ | bne + | ||
+ | |||
+ | lda +adr | ||
+ | clc | ||
+ | adc #$38 | ||
+ | sta +adr | ||
+ | lda +adr+1 | ||
+ | adc #$01 | ||
+ | sta +adr+1 | ||
+ | + | ||
+ | cpy #$60 | ||
+ | bne - | ||
+ | |||
+ | |||
+ | |||
+ | ;calc color-adrs... | ||
+ | |||
+ | lda #$c8 | ||
+ | sta +adr | ||
+ | lda #$e0 | ||
+ | sta +adr+1 | ||
+ | |||
+ | ldy #$00 | ||
+ | ldx #$00 | ||
+ | - | ||
+ | lda +adr | ||
+ | sta temp+$72,y | ||
+ | lda +adr+1 | ||
+ | sta temp+$73,y | ||
+ | |||
+ | lda +adr+1 | ||
+ | clc | ||
+ | adc #$04 | ||
+ | sta +adr+1 | ||
+ | |||
+ | inx | ||
+ | iny | ||
+ | iny | ||
+ | tya | ||
+ | and #$0f | ||
+ | bne + | ||
+ | |||
+ | lda +adr+1 | ||
+ | and #$03 | ||
+ | ora #$e0 | ||
+ | sta +adr+1 | ||
+ | |||
+ | lda +adr | ||
+ | clc | ||
+ | adc #$28 | ||
+ | sta +adr | ||
+ | lda +adr+1 | ||
+ | adc #$00 | ||
+ | sta +adr+1 | ||
+ | + | ||
+ | cpy #$60 | ||
+ | bne - | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | lda #< | ||
+ | sta $fe | ||
+ | lda #> | ||
+ | sta $ff | ||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | |||
+ | ldx #0 | ||
+ | -loop1 | ||
+ | |||
+ | lda temp+$03,x | ||
+ | sta +l2+1 | ||
+ | |||
+ | txa | ||
+ | and #$0f | ||
+ | beq +ldasta | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda zpinitersrc+2, | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #2 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | jmp + | ||
+ | |||
+ | +ldasta | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda zpinitersrc, | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #4 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | + | ||
+ | inc +s2+1 | ||
+ | inc +s2+1 | ||
+ | |||
+ | inx | ||
+ | inx | ||
+ | cpx #$60 | ||
+ | bne -loop1 | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | |||
+ | |||
+ | ldx #0 | ||
+ | -loop2 | ||
+ | |||
+ | lda temp+$73,x | ||
+ | beq +skip | ||
+ | sta +l2+1 | ||
+ | |||
+ | txa | ||
+ | clc | ||
+ | adc #$73 | ||
+ | sta +s2+1 | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda zpinitersrc, | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #4 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | |||
+ | ;search for similar bytes... | ||
+ | |||
+ | cpx #$60-2 | ||
+ | beq +end | ||
+ | |||
+ | txa | ||
+ | pha | ||
+ | |||
+ | -search | ||
+ | inx | ||
+ | inx | ||
+ | cpx #$60 | ||
+ | beq +done | ||
+ | |||
+ | lda temp+$73,x | ||
+ | cmp +l2+1 | ||
+ | bne -search | ||
+ | |||
+ | txa | ||
+ | clc | ||
+ | adc #$73 | ||
+ | sta +s2+1 | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda zpinitersrc+2, | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #2 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | lda #0 | ||
+ | sta temp+$73,x | ||
+ | jmp -search | ||
+ | +done | ||
+ | pla | ||
+ | tax | ||
+ | +skip | ||
+ | inx | ||
+ | inx | ||
+ | cpx #$60 | ||
+ | bne -loop2 | ||
+ | +end | ||
+ | |||
+ | lda #$60 | ||
+ | ldy #0 | ||
+ | sta ($fe),y | ||
+ | |||
+ | |||
+ | lda #$37 | ||
+ | sta $01 | ||
+ | |||
+ | rts | ||
+ | |||
+ | |||
+ | zpinitersrc | ||
+ | |||
+ | +l2 lda #$00 | ||
+ | +s2 sta $03 | ||
+ | |||
+ | |||
+ | +adr .wo $c640 | ||
+ | |||
+ | |||
+ | ; | ||
+ | maketechtecher | ||
+ | |||
+ | |||
+ | lda #< | ||
+ | sta $fe | ||
+ | lda #> | ||
+ | sta $ff | ||
+ | |||
+ | lda #0 | ||
+ | sta +y | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda techtechersrc_, | ||
+ | sta techtechersrc, | ||
+ | iny | ||
+ | cpy #25 | ||
+ | bne - | ||
+ | |||
+ | -loop | ||
+ | |||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda techtechersrc, | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #25 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | |||
+ | ;check adr for splitting... | ||
+ | |||
+ | lda $fe | ||
+ | sec | ||
+ | sbc #$c0 | ||
+ | bcc + | ||
+ | lda $ff | ||
+ | and #$03 | ||
+ | bne + | ||
+ | |||
+ | ldy #$00 | ||
+ | lda #$4c | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda #$e0 | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | lda $ff | ||
+ | clc | ||
+ | adc #$01 | ||
+ | sta ($fe),y | ||
+ | |||
+ | sta $ff | ||
+ | lda #$e0 | ||
+ | sta $fe | ||
+ | + | ||
+ | |||
+ | |||
+ | lda +l1+1 | ||
+ | clc | ||
+ | adc techspread+0 ;#$04 | ||
+ | sta +l1+1 | ||
+ | |||
+ | lda +l2+1 | ||
+ | clc | ||
+ | adc techspread+1 ;#$07 | ||
+ | sta +l2+1 | ||
+ | |||
+ | lda +s1+1 | ||
+ | clc | ||
+ | adc #20 | ||
+ | sta +s1+1 | ||
+ | lda +s1+2 | ||
+ | adc #$00 | ||
+ | sta +s1+2 | ||
+ | |||
+ | lda +s2+1 | ||
+ | clc | ||
+ | adc #$02 | ||
+ | sta +s2+1 | ||
+ | |||
+ | lda +o1+1 | ||
+ | clc | ||
+ | adc #$01 | ||
+ | sta +o1+1 | ||
+ | and #$07 | ||
+ | bne + | ||
+ | lda +o1+1 | ||
+ | and #$c0 | ||
+ | clc | ||
+ | adc #$40 | ||
+ | sta +o1+1 | ||
+ | lda +o2+1 | ||
+ | clc | ||
+ | adc #$28 | ||
+ | sta +o2+1 | ||
+ | + | ||
+ | lda +s3+1 | ||
+ | clc | ||
+ | adc #$02 | ||
+ | sta +s3+1 | ||
+ | |||
+ | inc +y | ||
+ | lda +y | ||
+ | cmp #$30 | ||
+ | beq + | ||
+ | jmp -loop | ||
+ | + | ||
+ | |||
+ | lda #$60 | ||
+ | ldy #0 | ||
+ | sta ($fe),y | ||
+ | |||
+ | rts | ||
+ | |||
+ | +y .by 0 | ||
+ | |||
+ | techtechersrc | ||
+ | |||
+ | ;********* COPIED FROM BELOW!!! *********** | ||
+ | |||
+ | +l1 lda techsine,x | ||
+ | +l2 adc techsine,y | ||
+ | lsr | ||
+ | +s1 sta shower+132 ;(20*6+12) | ||
+ | and #$38 | ||
+ | +o1 ora #$40 | ||
+ | +s2 sta $02 | ||
+ | and #$38 | ||
+ | lsr | ||
+ | lsr | ||
+ | lsr | ||
+ | +o2 ora #$c8 | ||
+ | +s3 sta $72 | ||
+ | |||
+ | ;********* COPIED FROM BELOW!!! *********** | ||
+ | |||
+ | |||
+ | techtechersrc_ | ||
+ | |||
+ | +l1 lda techsine,x | ||
+ | +l2 adc techsine,y | ||
+ | lsr | ||
+ | +s1 sta shower+132 ;(20*6+12) | ||
+ | and #$38 | ||
+ | +o1 ora #$40 | ||
+ | +s2 sta $02 | ||
+ | and #$38 | ||
+ | lsr | ||
+ | lsr | ||
+ | lsr | ||
+ | +o2 ora #$c8 | ||
+ | +s3 sta $72 | ||
+ | |||
+ | |||
+ | ; | ||
+ | |||
+ | .la cpydisp_=cpydisp+1 | ||
+ | .la ldys_=ldys+1 | ||
+ | .la subys_=0; subys+1 | ||
+ | |||
+ | |||
+ | makeysiner | ||
+ | |||
+ | lda #<ysiner | ||
+ | sta $fe | ||
+ | lda #>ysiner | ||
+ | sta $ff | ||
+ | |||
+ | lda #0 | ||
+ | sta +x | ||
+ | |||
+ | lda #$00 | ||
+ | sta +l1+1 | ||
+ | sta +a1+1 | ||
+ | lda dyppspread+0 | ||
+ | sta +l2+1 | ||
+ | lda dyppspread+1 | ||
+ | sta +a2+1 | ||
+ | |||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda ysinersrc_, | ||
+ | sta ysinersrc,y | ||
+ | iny | ||
+ | cpy #43 | ||
+ | bne - | ||
+ | |||
+ | |||
+ | |||
+ | -loop | ||
+ | |||
+ | ldx +x | ||
+ | lda +os,x | ||
+ | sta +o+1 | ||
+ | |||
+ | ldy #0 | ||
+ | - | ||
+ | lda ysinersrc,y | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | cpy #35 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | ;skip copying " | ||
+ | |||
+ | ;ldx #0 | ||
+ | lda +o+1 | ||
+ | eor #1 | ||
+ | asl | ||
+ | tax | ||
+ | ldy #0 | ||
+ | - | ||
+ | lda +o,x ; | ||
+ | sta ($fe),y | ||
+ | iny | ||
+ | inx | ||
+ | cpx #8 | ||
+ | bne - | ||
+ | jsr yaddfe | ||
+ | |||
+ | lda +l1+1 | ||
+ | clc | ||
+ | adc dyppspread+0 | ||
+ | clc | ||
+ | adc dyppspread+0 | ||
+ | sta +l1+1 | ||
+ | clc | ||
+ | adc dyppspread+0 | ||
+ | sta +l2+1 | ||
+ | |||
+ | lda +a1+1 | ||
+ | clc | ||
+ | adc dyppspread+1 | ||
+ | clc | ||
+ | adc dyppspread+1 | ||
+ | sta +a1+1 | ||
+ | clc | ||
+ | adc dyppspread+1 | ||
+ | sta +a2+1 | ||
+ | |||
+ | |||
+ | lda +s1+1 | ||
+ | clc | ||
+ | adc #30 | ||
+ | sta +s1+1 | ||
+ | sta +sub1+1 | ||
+ | lda +s1+2 | ||
+ | adc #0 | ||
+ | sta +s1+2 | ||
+ | sta +sub1+2 | ||
+ | |||
+ | lda +s2+1 | ||
+ | clc | ||
+ | adc #30 | ||
+ | sta +s2+1 | ||
+ | lda +s2+2 | ||
+ | adc #0 | ||
+ | sta +s2+2 | ||
+ | |||
+ | ;lda #43 | ||
+ | lda +o+1 | ||
+ | asl | ||
+ | clc | ||
+ | adc #41 | ||
+ | clc | ||
+ | adc +s3+1 | ||
+ | sta +s3+1 | ||
+ | lda +s3+2 | ||
+ | adc #0 | ||
+ | sta +s3+2 | ||
+ | |||
+ | lda +s4+1 | ||
+ | clc | ||
+ | adc #30 | ||
+ | sta +s4+1 | ||
+ | lda +s4+2 | ||
+ | adc #0 | ||
+ | sta +s4+2 | ||
+ | |||
+ | lda +s5+1 | ||
+ | clc | ||
+ | adc #30 | ||
+ | sta +s5+1 | ||
+ | lda +s5+2 | ||
+ | adc #0 | ||
+ | sta +s5+2 | ||
+ | |||
+ | |||
+ | inc +x | ||
+ | lda +x | ||
+ | cmp #26-1 | ||
+ | beq + | ||
+ | jmp -loop | ||
+ | + | ||
+ | lda #$60 | ||
+ | ldy #0 | ||
+ | sta ($fe),y | ||
+ | |||
+ | rts | ||
+ | |||
+ | +x .by 0 | ||
+ | |||
+ | |||
+ | +os .by 0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 1,1,1,1, 0 | ||
+ | |||
+ | ysinersrc | ||
+ | |||
+ | ; ****** copied from ysinersrc_! ******* | ||
+ | |||
+ | +l1 lda dyppsine,x | ||
+ | clc | ||
+ | +a1 adc dyppsine,y | ||
+ | lsr | ||
+ | +s1 sta ldys_ ;ys | ||
+ | lsr | ||
+ | lsr | ||
+ | lsr | ||
+ | +s2 sta cpydisp_ ;ydisp | ||
+ | +l2 lda dyppsine+4, | ||
+ | clc | ||
+ | +a2 adc dyppsine+4, | ||
+ | lsr | ||
+ | sec | ||
+ | +sub1 sbc ldys_ | ||
+ | +s3 sta ysiner+33; +smc+1 | ||
+ | +smc lda dypppp | ||
+ | +o ora #$00 | ||
+ | +s4 sta ldp1+2 | ||
+ | +s5 sta ldp2+2 | ||
+ | |||
+ | ; ****** copied from ysinersrc_! ******* | ||
+ | |||
+ | |||
+ | ysinersrc_ | ||
+ | |||
+ | |||
+ | +l1 lda dyppsine,x | ||
+ | clc | ||
+ | +a1 adc dyppsine,y | ||
+ | lsr | ||
+ | +s1 sta ldys_ ;ys | ||
+ | lsr | ||
+ | lsr | ||
+ | lsr | ||
+ | +s2 sta cpydisp_ ;ydisp | ||
+ | +l2 lda dyppsine+4, | ||
+ | clc | ||
+ | +a2 adc dyppsine+4, | ||
+ | lsr | ||
+ | sec | ||
+ | +sub1 sbc ldys_ | ||
+ | +s3 sta ysiner+33; +smc+1 | ||
+ | +smc lda dypppp | ||
+ | +o ora #$00 | ||
+ | +s4 sta ldp1+2 | ||
+ | +s5 sta ldp2+2 | ||
+ | |||
+ | ;43 bytes | ||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | |||
+ | yaddfe | ||
+ | tya | ||
+ | clc | ||
+ | adc $fe | ||
+ | sta $fe | ||
+ | lda #0 | ||
+ | adc $ff | ||
+ | sta $ff | ||
+ | rts | ||
+ | ; | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
base/fli_floffy.txt · Last modified: 2015-04-17 04:31 by 127.0.0.1