Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You should store the data transposed in RAM, so you can access each column of playfield with the same Y value.
- I did a little analysis of your kernel:
- [code]
- LDY $8E
- LF29C: STX COLUPF
- LDA $00A0,Y ;why
- STA PF0
- INY ;are
- LDA $00A0,Y ;you
- STA PF1
- INY ;wasting
- LDA $00A0,Y ;cycles
- STA PF2
- INY ;on
- LDA $00A0,Y ;these
- STA PF0
- INY ;instructions
- LDA $00A0,Y ;you
- STA PF1
- INY ;could
- LDA $00A0,Y ;probably
- STA PF2
- INY ;fit this in one scanline
- INX
- STA WSYNC ;why?
- LDA #$00
- STA PF0
- STA PF1
- STA PF2
- DEC $8F
- BEQ LF2D9
- TYA ;this would be completely unnecessary
- SEC
- SBC #$06
- TAY
- JMP LF2DE
- LF2D9: LDA #$0A
- STA $8F
- NOP ;wut
- STA WSYNC
- CPX #$C0
- BNE LF29C
- [/code]
- Instead you should do something like:
- [code]
- ldy #YRES-1
- LoopY
- ldx #10 ;stretch factor
- LoopX
- sta WSYNC
- lda PF0DataL,Y
- sta PF0
- lda PF1DataL,Y
- sta PF1
- lda PF2DataL,Y
- sta PF2
- ;do useful things, like set COLUPF
- lda PF0DataR,Y
- sta PF0
- lda PF1DataR,Y
- sta PF1
- lda PF2DataR,Y
- sta PF2
- dex
- bne LoopX
- dey
- bpl LoopY
- [/code]
- Something like the above should fit in one scanline.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement