Advertisement
Guest User

Untitled

a guest
Oct 18th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. You should store the data transposed in RAM, so you can access each column of playfield with the same Y value.
  2.  
  3. I did a little analysis of your kernel:
  4. [code]
  5.        LDY    $8E
  6. LF29C: STX    COLUPF
  7.        LDA    $00A0,Y  ;why
  8.        STA    PF0
  9.        INY             ;are
  10.        LDA    $00A0,Y  ;you
  11.        STA    PF1
  12.        INY             ;wasting
  13.        LDA    $00A0,Y  ;cycles
  14.        STA    PF2
  15.        INY             ;on
  16.        LDA    $00A0,Y  ;these
  17.        STA    PF0
  18.        INY             ;instructions
  19.        LDA    $00A0,Y  ;you
  20.        STA    PF1
  21.        INY             ;could
  22.        LDA    $00A0,Y  ;probably
  23.        STA    PF2
  24.        INY             ;fit this in one scanline
  25.        INX
  26.        STA    WSYNC    ;why?
  27.        LDA    #$00
  28.        STA    PF0
  29.        STA    PF1
  30.        STA    PF2
  31.        DEC    $8F
  32.        BEQ    LF2D9
  33.        TYA             ;this would be completely unnecessary
  34.        SEC
  35.        SBC    #$06
  36.        TAY
  37.        JMP    LF2DE
  38. LF2D9: LDA    #$0A
  39.        STA    $8F
  40.        NOP             ;wut
  41.        STA    WSYNC
  42.        CPX    #$C0
  43.        BNE    LF29C
  44. [/code]
  45.  
  46. Instead you should do something like:
  47. [code]
  48.  ldy #YRES-1
  49. LoopY
  50.  ldx #10       ;stretch factor
  51. LoopX
  52.  sta WSYNC
  53.  lda PF0DataL,Y
  54.  sta PF0
  55.  lda PF1DataL,Y
  56.  sta PF1
  57.  lda PF2DataL,Y
  58.  sta PF2
  59.  
  60.  ;do useful things, like set COLUPF
  61.  
  62.  lda PF0DataR,Y
  63.  sta PF0
  64.  lda PF1DataR,Y
  65.  sta PF1
  66.  lda PF2DataR,Y
  67.  sta PF2
  68.  
  69.  dex
  70.  bne LoopX
  71.  dey
  72.  bpl LoopY
  73. [/code]
  74. Something like the above should fit in one scanline.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement