Hello everyone. I'm just a new member, and I read lost of posts.
I need your help about method, I know how to do, but I don't know what is the most optimized method.
It's just about drawing one row per NMI event, that's for begin able to do scrolling.
For the moment, I use a Buffer of 30 bytes in RAM which represents 30 tiles of a PAL row.
This is part of my code :
I have seen in the SBM sources at ROOMHACKING, and I expected it use vectors for drawing ? (I'm not sure of this, because I think I saw CHR data in RAM)
Also I see our great post : Scrollin'
My problem is regarding using vector or PPUADDR addressing like you do. (I think it will be useless, because it keep free lots of RAM spaces)
But how clear a row? Or how clear parts where there is nothing ?
With buffer it is easy to do it (just clear the buffer).
But with addressing, for an already written row, how you do it ?
Maybe I can use 1 NMI event for clear the entire row, and 1 NMI event to draw my CHRs datas (using addressing).
Thanks for you Helps, I will continue my search.
I need your help about method, I know how to do, but I don't know what is the most optimized method.
It's just about drawing one row per NMI event, that's for begin able to do scrolling.
For the moment, I use a Buffer of 30 bytes in RAM which represents 30 tiles of a PAL row.
This is part of my code :
Code:
DrawPPURow:
lda PPU_DoDrawBuffer ; Need to Draw a Row ?
beq Return_DrawPPURow ; If PPU_DoDrawBuffer=0 dont draw a row and goto Return_DrawPPURow
lda #$20
sta PPUADDR
lda #$00
sta PPUADDR
sta $FF ; DEBUG = just for read write at $FF to know when execute this
ldx #00
-
lda Buffer_Data,x
sta $2007
inx
cpx #30
bne -
dec PPU_DoDrawBuffer ; Drawing is made
Return_DrawPPURow:
lda PPU_DoDrawBuffer ; Need to Draw a Row ?
beq Return_DrawPPURow ; If PPU_DoDrawBuffer=0 dont draw a row and goto Return_DrawPPURow
lda #$20
sta PPUADDR
lda #$00
sta PPUADDR
sta $FF ; DEBUG = just for read write at $FF to know when execute this
ldx #00
-
lda Buffer_Data,x
sta $2007
inx
cpx #30
bne -
dec PPU_DoDrawBuffer ; Drawing is made
Return_DrawPPURow:
I have seen in the SBM sources at ROOMHACKING, and I expected it use vectors for drawing ? (I'm not sure of this, because I think I saw CHR data in RAM)
Also I see our great post : Scrollin'
My problem is regarding using vector or PPUADDR addressing like you do. (I think it will be useless, because it keep free lots of RAM spaces)
But how clear a row? Or how clear parts where there is nothing ?
With buffer it is easy to do it (just clear the buffer).
But with addressing, for an already written row, how you do it ?
Maybe I can use 1 NMI event for clear the entire row, and 1 NMI event to draw my CHRs datas (using addressing).
Thanks for you Helps, I will continue my search.