22 users online:  BeeKaaaay, Coolmario, Daizo Dee Von,  Dippy, eric99333, ExONightZ, FedoraFriday, Infinity, JakkyShane, kamekku14, Koop the Koopa,  Koopster,  MarioFanGamer,  Ninja Boy, pakkie, Ralshi02,  Scrydan, SF - The Dark Warrior, SpoodahBro, Truxton, UTF, Wakana - Guests: 33 - Bots: 55 Users: 45,771 (3,374 active)
Latest user: Tily
Not logged in.
Details for "Scrollable" HDMA Gradients
UberASM Repository - "Scrollable" HDMA Gradients Show random
File Name: "Scrollable" HDMA Gradients
Added:
Authors: MarioFanGamer
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
Rating: 5.0 (Votes: 1)
Download: Download - 7.61 KiB
128 downloads
Screenshots
Image
Koop the Koopa
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.
Posted by: Koop the Koopa - | Link
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.
Posted by:  MarioFanGamer - | Link
Koop the Koopa
Wont work on pipes.
It shows the gradient while the screen is black
until the music plays
Posted by: Koop the Koopa - | Link
NTI Productions
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!
Posted by: NTI Productions - | Link
RussianMan
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.
Posted by:  RussianMan - | Link
Ragey
Works as advertised, and the code is written in quite a flexible way. Thanks for sharing!
Posted by: Ragey - | Link
MarioFanGamer
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.
Posted by:  MarioFanGamer - | Link
Hayashi Neru
Is this works on SA-1?
Posted by: Hayashi Neru - | Link
DTA450
Does it work with FG gradients?
Posted by: DTA450 - | Link
MarioFanGamer
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.
Posted by:  MarioFanGamer - | Link
Kazzzy
If scrolling HDMA is possible, would it be possible to do the same for other effects like oscillation and windowing?
Posted by: Kazzzy - | Link
AnasMario130
Thanks a lot!
Posted by: AnasMario130 - | Link
MarioFanGamer
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!
Posted by:  MarioFanGamer - | Link
AnasMario130
Right off the bat, I noticed ScrollHDMA.asm is missing, so I just took the one from the C3 release.
Posted by: AnasMario130 - | Link