Banner
Views: 838,275,668
Time:
16 users online: BrownBuddy, buggy789, Eminus, HaruMKT, Hat Kid, Ice Man, idealiter, mario90, Mau, ModernKiwi, PokerFace, SimFan96, StarWolf3000,  Telinc1, TheBiob, TheInsanity115 - Guests: 67 - Bots: 70 Users: 45,869 (3,416 active)
Latest: nonomannn
Summer C3 2020 Content Spotlight
Darolac's "Of Jumps and Platforms" Hack Release!
Not logged in.
What do you mean HDMA doesn't scroll?
Forum Index - Sunken Ghost Ship - C3 Museum - Winter 2020 - What do you mean HDMA doesn't scroll?
Tags:
Pages: « 1 »

Yup, the gradient scrolls is not bound to any layer but is the background colour itself which means it's an HDMA gradient which can actually scroll with the background!

I have teased them a long time ago (it was... one year or so, when I investigated Yoshi's Island's code which also features scrollable HDMA) but I never released them. Now I stopped being lazy and released them for real! Actually, all I wanted is to release something for C3 because I'm working on something else but have some inexplainable trouble with it.

Enjoy a rushed version of the UberASM code!

Do note that the tables take lots of RAM (three bytes per scanline + 14 for the indirect table). I use OW Event Restore to get enough RAM for the table (pretty sure the table wouldn't fit in the general freeRAM area). And keep in mind that only Gradient Tool can create the proper tables. You have to set the mode to Scrollable Gradient and set a reasonable amount of scanlines (the example is 416 scanlines which is initial layer 2 position 0xC0 + 0xE0 lines for the screen).

--------------------
Okay, my layout looks ugly.
I still remember the YI project where you teased this effect. It's great to see that this is implementable in SMW now, even if the amount of RAM it uses makes it unusable for my current hack. However i am sure this can be kinda useful.
Thank you for releasing this resource #smw{:peace:}

--------------------
ah this is good. it always irked me that hdma didn't scroll well vertically and i definately need to use this. thank you MFG!
You're a bit late; I was using scrollable HDMA gradients over 8 years ago. I suppose it's good to have an official public release of some code for it, though.
This is a nice, neat release. The same methodology can also be used for parallax scrolling (EffectTool does handle that iirc but I think it's possible to have an even more optimized and flexible code).

--------------------
MK2TDS
I attempted to use the scroll HDMA patch into my hack. Asar told me there's a missing org or freespace command. It told me if I should inserted the patch. I selected no.
Edit: I inserted ScrollHDMA.asm with UberASM tool, but now I have trouble with Day.asm. It tells me that ScrollHDMA_DecompressGradient wasn't found. Any fix here?

--------------------
My hack has been cancelled.
Neat! HDMA being constant to the screen has always bothered me a bit, so this is a nice change. Is it possible to alter the speed of the scrolling too, like how layer 2 & 3 have Slow/Slow 2/Variable and such? Definitely can see a lot of use in this.

--------------------
bunny extraordinaire
Nice job. I'm guessing it's now compatible with LM3.0, right? (iirc gradienttool wasn't)

--------------------

Userbar by Green Jerry

Also a Fortaleza Reznor user. If you... digo, si hablas español, hackeas, buscas ayuda, o simplemente se te da conocer gente, únete, somos puerta abierta.
Originally posted by imamelia
You're a bit late; I was using scrollable HDMA gradients over 8 years ago. I suppose it's good to have an official public release of some code for it, though.

Hey, if it weren't for you, gradient tool never would have support for scroll HDMA. #ab{:P} Though it also is more optimised since it uses indirect continuous HDMA which means you need three bytes per scanline (+ six for the pointer table) instead of five bytes per scanline.

Originally posted by Rykon-V73
I attempted to use the scroll HDMA patch into my hack. Asar told me there's a missing org or freespace command. It told me if I should inserted the patch. I selected no.
Edit: I inserted ScrollHDMA.asm with UberASM tool, but now I have trouble with Day.asm. It tells me that ScrollHDMA_DecompressGradient wasn't found. Any fix here?

ScrollHDMA.asm is a library which is why UberASM failed. Put it in the library folder and try again!

Originally posted by Meirdent
Neat! HDMA being constant to the screen has always bothered me a bit, so this is a nice change. Is it possible to alter the speed of the scrolling too, like how layer 2 & 3 have Slow/Slow 2/Variable and such? Definitely can see a lot of use in this.

You are an ASMer, you should be able to change the speed. #ab{:P} When I release it for proper, I will add an easier way to change the speed, though.

--------------------
Okay, my layout looks ugly.
Actually, wouldn't an indirect HDMA table only require 6 bytes? There could be a scanline count and pointer for the first 0x80 lines, then a scanline count and pointer for the other 0x60 (or two groups of 0x70 lines), and one would simply need to change the pointers depending on the Y position of the screen. For a background gradient, it would take up 12 + 3x bytes of RAM, where x is the total number of scanlines in the gradient. (End bytes shouldn't be necessary, since the HDMA already covers the entire screen.) That's how I was planning on handling HDMA in my homebrew, though I don't think I've ported such code over to SMW yet.
Goddamn MarioFanGamer, this is some good HDMA stuff!

I just wish Gradient Tool was updated to have a bunch more features and gave us all an easier time editing gradients. For example, why do I have to make a new gradient from scratch instead of having the ability to load previously-made ones and edit it from there? And why is there no option to make your gradient scrollable or not?
Come help save Super Mario World Central Production 2 here!
Originally posted by Falconpunch
And why is there no option to make your gradient scrollable or not?

Hey, if Gradient Tool didn't support scrollable gradients, I woudln't have made the code in the first place! So your last sentence is bogus. (Saving the gradient somewhere is a good idea, though.)

Originally posted by imamelia
Actually, wouldn't an indirect HDMA table only require 6 bytes? There could be a scanline count and pointer for the first 0x80 lines, then a scanline count and pointer for the other 0x60 (or two groups of 0x70 lines), and one would simply need to change the pointers depending on the Y position of the screen. For a background gradient, it would take up 12 + 3x bytes of RAM, where x is the total number of scanlines in the gradient. (End bytes shouldn't be necessary, since the HDMA already covers the entire screen.) That's how I was planning on handling HDMA in my homebrew, though I don't think I've ported such code over to SMW yet.

There is some miscount in which I forgot to double the indirect HDMA table (there are two used HDMA channels, not one). Other then that, my HDMA code works in the way how you described (though you can't have 0x80 continuous scanlines because the scanline count is first decreased before it's checked whether it's negative so you're forced with 0x70-0x70 scanlines) with the exception of the end byte since I didn't count on that one.

--------------------
Okay, my layout looks ugly.
Your suggestion worked, but when I test the level, the HMDA has been replaced with a grey to white color.

--------------------
My hack has been cancelled.
Nice job on finally bringing this back! #smw{:TUP:}
I remember Ersanio doing something like this waaaaay back then, but somehow nothing came of it? At least I don't remember anyone every really using it afterwards. Hope this attempt will be more successful and people will actually make use of this in their hacks going forward! It's actually such a simple thing, but makes everything look so much more authentic.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
Nice job on finally bringing this back! #smw{:TUP:}
I remember Ersanio doing something like this waaaaay back then, but somehow nothing came of it? At least I don't remember anyone every really using it afterwards. Hope this attempt will be more successful and people will actually make use of this in their hacks going forward! It's actually such a simple thing, but makes everything look so much more authentic.

Possibly because only one tool ever supported scroll HDMA back then and the tables were very big. But even with a more user-friendly tool the insertion still wasn't too easy (at least I never were able to make the included code work). My goal is to have a more user-friendly approach (also thanks to UberASM Tool) alongside reduction of RAM usage.

--------------------
Okay, my layout looks ugly.
Pages: « 1 »
Forum Index - Sunken Ghost Ship - C3 Museum - Winter 2020 - What do you mean HDMA doesn't scroll?

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy