Language…
12 users online: ageVerrly, brickblock369, Dark Mario Bros, Hans, jirok1, Klug, kurtistrydiz, lordkronos100, Maw, NerDose, random_box, underway - Guests: 41 - Bots: 206
Users: 55,591 (2,465 active)
Latest user: Amogus_men

"Scrollable" HDMA Gradients

UberASM Repository → "Scrollable" HDMA Gradients

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 sa-1
Comments: 17 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 8.17 KiB | 371 downloads

Screenshots

Comments (17)

Anas Link
Just so you know, I recently discovered that using this code in your levels will mess up one row of your BGs, and that's due to the free RAM used by the code! MFG himself told me this in a DM. Maybe use the OW event restore patch if you plan to use the code?

Edit: After applying it, go to 'ScrollHDMA.asm' and change '!FreeRAM_RG_Ptr' and '!FreeRAM_B_Ptr' to something like $7F0000 and $7F0007 respectively. No need to convert the addresses if using SA-1.

Edit 2: Apparently you don't need the OW event restore patch in this situation.
 Kevin Link
Tested with: Lunar Magic 3.11, UberASM Tool 1.4, SA-1 1.32, Snes9x 1.60, bsnes v115. Now the decompression works fine when enabling the SA1 boost, so accepted.
El Cuh Fermin Link
I hope this will not be rejected. Looks really good.

Edit: Finally this scrollable HDMA is accepted. Now I can use HDMA for layer 2. I’m so happy for this. 😃
Koop the Koopa From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients Link
Wont work on pipes.
It shows the gradient while the screen is black
until the music plays
NTI Productions From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients Link
Works as advertised, and the code is written in quite a flexible way. Thanks for sharing!
 MarioFanGamer Author From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients Link
Is this works on SA-1?
DTA450 From older version: "Scrollable" HDMA Gradients Link
Does it work with FG gradients?
 MarioFanGamer Author From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients Link
If scrolling HDMA is possible, would it be possible to do the same for other effects like oscillation and windowing?
Anas From older version: "Scrollable" HDMA Gradients Link
Thanks a lot!
 MarioFanGamer Author From older version: "Scrollable" HDMA Gradients 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 From older version: "Scrollable" HDMA Gradients Link
Right off the bat, I noticed ScrollHDMA.asm is missing, so I just took the one from the C3 release.