It is currently Thu Nov 23, 2017 5:15 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Mar 11, 2014 4:18 am 
Offline

Joined: Wed May 15, 2013 9:33 am
Posts: 9
...Of course, I'm not gonna spend all those code waiting for the HBlank.
I'm trying to make the scroll look like a wave. Assume that the first page and the second page are exactly the same.
The following code is my code, and some graphical glitches appear at the right edge of the screen when running on FCEUX.

I_CW6_0:
;note that IRQControl is #$03

LDA IRQCount
BEQ I_CW6_0_1 ;First IRQ
CMP #$12
BEQ UsualIRQ ;Last IRQ
STA IRQAcknowledge
;IRQLatch or IRQControl doesn't need to be changed

INC IRQCount
LDA FrameCounter
LSR
LSR
CLC
ADC IRQCount
AND #$0F
TAY

LDA IRQScroll
CLC
ADC IRQWaveDif, Y

STA PPU_SCROLL_REG
STA PPU_SCROLL_REG
;LDA IRQPage
;ADC IRQWavePageDif, Y
;AND #$01
;ORA IRQPPU
;STA PPU_CTRL_REG1

RTS

IRQWaveDif:
.DB 0,$FE,$FC,$FB,$FA,$FB,$FC,$FE,0,2,4,5,6,5,4,2
IRQWavePageDif:
.DB 0,$FF,$FF,$FF,$FF,$FF,$FF,$FF,0,0,0,0,0,0,0,0


If the commented code are turned into actual code, there are more graphical glitches.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group