Language…
7 users online: autisticsceptile1993, CrazyPencilDawg, Dan2point5, DanMario24YT, Gamet2004, Scags, Tomi P - Guests: 260 - Bots: 361
Users: 64,795 (2,378 active)
Latest user: mathew

"Scrollable" HDMA Gradients

UberASM Repository → "Scrollable" HDMA Gradients

This file is obsolete. The latest version is "Scrollable" HDMA Gradients. For other versions, check the version history.

Submission Details

Name: "Scrollable" HDMA Gradients
Author: MarioFanGamer
Added:
Version History: View
Type: Level
Includes GFX: No
Includes Hijack: No
Featured: No
Description: 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)!

Read the readme first.

Creation of compatible HDMA tables is done with Gradient Tool.
Tags: gradient hdma lorom
Comments: 14 (jump to comments)
Rating:
5.0 (1 rating)
No rating
Download 7.61 KiB | 131 downloads

Screenshots

Comments (14)

Koop the Koopa Link
Originally posted by MarioFanGamer
Originally posted by Koop the Koopa
Wont work on pipes.
It shows the gradient while the screen is black
until the music plays

That's a problem with HDMA gradients in general, not just specifically scrollable gradients, as SMW doesn't disable HDMA during level load.

OK! I just realised that.
 MarioFanGamer Author Link
Originally posted by Koop the Koopa
Wont work on pipes.
It shows the gradient while the screen is black
until the music plays

That's a problem with HDMA gradients in general, not just specifically scrollable gradients, as SMW doesn't disable HDMA during level load.
Koop the Koopa Link
Wont work on pipes.
It shows the gradient while the screen is black
until the music plays
NTI Productions Link
Really nice to have it finally!

I've been using this code since forever to give proper HDMA scrolling.

Never really understood why this wasn't a thing before. Thank you MFG!
 RussianMan Link
Tested with:
Lunar Magic 3.11
UberASM 1.4
SNES9X 1.60
Free $7F0000 (OW Event Restore) Patch with Asar 1.71

Very nice HDMA effect. If you've been bothered by how static HDMA usually is, this should satisfy.
Ragey Link
Works as advertised, and the code is written in quite a flexible way. Thanks for sharing!
 MarioFanGamer Author Link
Originally posted by DTA450
Does it work with FG gradients?

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:
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.
Hayashi Neru Link
Is this works on SA-1?
DTA450 Link
Does it work with FG gradients?
 MarioFanGamer Author Link
Originally posted by Kazzzy
If scrolling HDMA is possible, would it be possible to do the same for other effects like oscillation and windowing?

Technically, HDMA is static to the screen so no type of HDMA can actually "scroll". Whether you can give the illusion to scroll HDMA all depends on how you coded it.
Kazzzy Link
If scrolling HDMA is possible, would it be possible to do the same for other effects like oscillation and windowing?
Anas Link
Thanks a lot!
 MarioFanGamer Author Link
Originally posted by AnasMario130
Right off the bat, I noticed ScrollHDMA.asm is missing, so I just took the one from the C3 release.

What? Oh, no! Fixed!
Anas Link
Right off the bat, I noticed ScrollHDMA.asm is missing, so I just took the one from the C3 release.