crazygrouptrio
Active member
Any chance of getting this to work on scrolling games? The tiles graphics get glitchy and changes palettes for me as the screen scrolls.
I wanted to bump this as maybe someone has an answer and i felt like this may have gotten passed up.crazygrouptrio said:Any chance of getting this to work on scrolling games? The tiles graphics get glitchy and changes palettes for me as the screen scrolls.
It can't be done unfortunately. I know that nowmouse spirit said:I wanted to bump this as maybe someone has an answer and i felt like this may have gotten passed up.crazygrouptrio said:Any chance of getting this to work on scrolling games? The tiles graphics get glitchy and changes palettes for me as the screen scrolls.
HandleGameTimer:
DEC gameTimer
BNE dontUpdateGameTimer
LDA gameTimerLo
CLC
ADC #$01
STA gameTimerLo
LDA gameTimerHi
ADC #$00
STA gameTimerHi
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; DO WHATEVER READS OF THE GAMETIMER YOU MIGHT WANT HERE.
JSR DoAlarm
;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA #DayNightSpeed
STA gameTimer
dontUpdateGameTimer:
RTS
DoAlarm:
;;; we're going to edge-load monsters one at a time if they are of edge type and are not active.
LDX #$00
doLoadMonsterOnTimerLoop:
LDA edgeLoaderInCue
BEQ noEdgeMonstersInCue
LDA currentBank
STA prevBank
LDY #$1C ;; data bank
JSR bankswitchY
JSR CreateTimedEdgeSpawner
DEC edgeLoaderInCue
LDY prevBank
JSR bankswitchY
noEdgeMonstersInCue
RTS
voltopt said:From Dale, this will compile -
Code:TYA STA bckPal+3,x ;; move pocket (y) to 3
instead of STY. By the way, how did you get this to load? I'm working on palette cycling in the game timer and having trouble with some of the new variables/instructions
;;; handle game timer.
JSR handlePaletteCycleTimer
LDA gameTimerTicks
CLC
ADC #$01 ;; change this to how fast you want the timer to run.
STA gameTimerTicks
LDA gameTimerLo
ADC #$00
STA gameTimerLo
LDA gameTimerHi
ADC #$00
STA gameTimerHi
JMP ++
handlePaletteCycleTimer:
;WE DONT USE SPECIAL SCREENS ANYMORE
;; Pal cycling on "Medium"-speed screens :
LDA screenSpeed
CMP #$01
BEQ doPaletteCycleTimer
;; another example, Pal cycling on screen type 255 screens :
;LDA screenType
;CMP #255
;BEQ doPaletteCycleTimer
JMP endPaletteCycleTimer
doPaletteCycleTimer:
;; from here, DO the palette cycle:
LDA palettesCycleTimer
BNE dontUpdatePaletteCycleTimer
JSR pickPaletteToCycle
LDA #$10 ;; HERE !!! the SPEED of the cycling
STA palettesCycleTimer
dontUpdatePaletteCycleTimer:
DEC palettesCycleTimer
endPaletteCycleTimer:
RTS
pickPaletteToCycle:
LDA #$02 ;; HERE !!! the "Sub 3" palette
ASL
ASL ;; these multiply your literal or variable with 4 so we can get the right offset for each palette in increments of 4.
TAX
LDY bckPal+1,x ;; pocket colour 1 in reg y
LDA bckPal+2,x
STA bckPal+1,x ;; move colour 2 to 1
LDA bckPal+3,x
STA bckPal+2,x ;; move colour 3 to 2
TYA
STA bckPal+3,x ;; move pocket (y) to 3
LDA #$01
STA updateScreenData ;; loading anything but zero into this value tells NESmaker it needs to update palettes.
RTS