Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ------------------------------------------------------------------------------------------------
- Empty project
- ------------------------------------------------------------------------------------------------ */
- // here you put consts, vars etc.
- NumFLDLines: .byte 0
- BasicUpstart2(start)
- * = $3400 "Main Code"
- start:
- main:
- sei
- loop1:
- bit $d011 // Wait for new frame
- bpl loop1
- loop4:
- bit $d011
- bmi loop4
- lda #$1b // Set y-scroll to normal position (because we do FLD later on..)
- sta $d011
- jsr CalcNumLines // Call sinus substitute routine
- lda #$40 // Wait for position where we want FLD to start
- wait_fld_position:
- cmp $d012
- bne wait_fld_position
- ldx NumFLDLines
- beq loop1 // Skip if we want 0 lines FLD
- loop2:
- lda $d012 // Wait for beginning of next line
- loop3:
- cmp $d012
- beq loop3
- clc // Do one line of FLD
- lda $d011
- adc #1
- and #7
- ora #$18
- sta $d011
- dex // Decrease counter
- bne loop2 // Branch if counter not 0
- jmp loop1 // Next frame
- CalcNumLines:
- lda #0
- bpl *+4
- eor #$ff
- lsr
- lsr
- lsr
- sta NumFLDLines
- inc CalcNumLines+1
- rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement