Let's be honest: HDMA gradients are, due to their nature, static to the screen. But other games somehow manage to manage to make them scroll (well, give the illusion of scrolling as remember, they're static by nature) without using any background! Don't worry now, it's time to officially have that kind of code in SMW (at least a proper release since years)!
Foreground and background colour gradiends are the same thing (fixed colour HDMA) except every layer is set to be transparent towards the background colour. All you need to do is to put the following code either at the start or at the end of the init code:
LDA #$17 ;\ BG1, BG2, BG3, OBJ on main screen (TM)
STA $212C ; |
LDA #$00 ; | 0 on main screen should use windowing. (TMW)
STA $212E ;/
LDA #$00 ;\ 0 on sub screen (TS)
STA $212D ; |
LDA #$00 ; | 0 on sub screen should use windowing. (TSW)
STA $212F ;/
LDA #$37 ; BG1, BG2, BG3, OBJ, Backdrop for color math
STA $40 ;/ mirror of $2131
Originally posted by Hayashi Neru
Is this works on SA-1?
In theory, yes (the decompression code runs on the SNES so no need to change the decompression buffer and HDMA pointer table's addresses and all other RAM addresses are converted for SA-1) but I didn't test it on SA-1, hence the lack of a SA-1 tag.