Language…
14 users online: alex0023, ASMagician Maks, crowhander, cyber47509, Fostelif, Hayashi Neru, Henry James Segura, IkeSMB, JackBooWow248, LiamBLOL, lo fang 123, PeachGulosaRodada, RaymanFan1995, SuperMarioDs64 - Guests: 66 - Bots: 186
Users: 66,463 (2,358 active)
Latest user: Goober mcgee

My Own HDMA Tools

Other

Some of you may have noticed that I released quite a few HDMA resources. Ultimately, I decided to open up this thread so my work can are in some way united while still separate for releases.

Fading Brightness HDMA



That's the first non-generic HDMA code I ever released. Previously, brightness HDMA had the disadvantage that it overwrote the fading. It's one of the many things in SMW hacking which bothered me since quite some time and once I learned on how to use indirect HDMA, I decided to fix it.
What it does is to put the individual brightness states to RAM using an HDMA table which points to these states and by referencing these in the HDMA table, brightness HDMA finally fade with the level fades! This is a quite simple library, I was (and still am) surprised it wasn't fixed for this long.

Download Page

Scrollable HDMA Gradients



Flashback to C3 Winter 2020 (I'm surprised it has been only two years!): By default, HDMA is static to the screen. In fact, it is only static since it lacks. Nonetheless, you still can simulate scroll the gradient itself by using certain tricks.
This idea isn't entirely new since  Ersanio managed to figure this out at one point (his HDMA Gradient Ripper supports these, for example) but the code seems to be lost in time and also results in large, uncompressed tables (i.e. five bytes per scanline which can fill up ROM pretty fast). Inspired by this,  imamelia created a decompression algortithm so the gradient is much smaller and a modification also has been in use for ExoticMatter's GradientTool.
Normally, what would have been all good but there still is room for improvement: Yoshi's Island also manages to make HDMA gradients scrollable. The way it does is to use indirect continuous HDMA (these who coded with windowing know something similar) which easily allows it to create a pure data table. The result: I implied this for SMW and ended up with a scrollable HDMA gradient where each scanline takes three bytes instead of five.

Download Page

Parallax HDMA Toolkit



That one wasn't directly released in a C3 but it was used for my a new update to Yoshi's Island's layer 3 sunset graphics which I posted for C3 Summer 2020.
That's the code which is the most inspired by Yoshi's Island where I use an HDMA buffer (i.e. different values for each scanline, compare windowing HDMA in SMW) to store the offsets and also uses a somewhat similar system for the HDAM table (i.e. the total Y position where the scrolling is applied, the scroll factor as a 16-bit value as well as potentially waves with parameters).

Unlike the other two codes, I'm trying to create an update at some point by using a more optimised multiplication for SNES code (assuming I can find one, of course), allow the option to use autoscrolling, gradual scrolling and using macros as well as being able to customise the data table address in code (which in turn allows you to double buffer the data table with some knowledge).

Download Page

Waves HDMA Toolkit





That was originally shown in the same C3 (thread) as a somewhat of a joke submission (but legitimely showcasing on how to improve the waves) and it finally got revamped (particularly for speed) and updated for C3 Winter 2022 (thread).
It uses a similar technology. Furthermore, most tools work by using waves only in a triangular pattern but mine uses sine waves and allows for alternating waves (see the fog).
In addition, this code also allows you to cover the waves partially as seen in the two GIFs with the tide, either statically or dynamically.

Download Page

HDMA Gradient Ripper (name pending)


That one isn't an HDMA library but rather a tool which functions as an alternative to the aforementioned HDMA Gradient Ripper. The goal is to create one which supports not only modern scrollable gradients (i.e. compressed tables) but also allow you to set the in- and output parameters (i.e. horizontal position, start and finish points in input and output height).

The only downside is that it doesn't allow you to modify the source image (e.g. grayscale but also colour channel limitations) and requires the use of the command line since I haven't yet figured out to write a GUI program in Rust (or at least write the GUI in a different language and link it with the Rust code).
My goal is to include them at some point but right now, I have to write some tests for the tool and test out various scenarios before I can properly release it (let's just say, I planned these options for version 1.1).

Downloaf link

GitHub Link


In addition, I also provide a link for the three major HDMA libraries (i.e. gradients, parallax and waves). You can find them all here.
For the gradient ripper, the source code can be instead found here.

License


Unless noted otherwise, all of the HDMA libraries are released under CC0 which means you can freely distribute and use them and you don't have to credit me and don't have to include the license in your work (naturally, after all, thinks would get complicated really fast if I'd use a different license) but you aren't able to claim this as yours and it doesn't include any liability and warranty.
The HDMA Gradient Ripper, on the other hand, is released under the GPLv3 license with the exception of the example codes which are released under CC0. That license allows you to freely use and distribute the tool but you must provide the source code of the tool as well as the GPLv3 license and it doesn't include any liability and warranty. Moreover, any derivate must be licensed under the GPLv3 which includes but not is not limited to linking the code.
Really love what you've done so far. Heads up!

Can't wait to see an updated version of your parallax HDMA with auto scrolling and more. :D Because that would save quite a lot of bytes from the current tables (hopefully). :P

Also, will the HDMA Gradient Ripper have a GUI at some point or just command line based? I mean it's easy to use already and everything is explained, just wondering.

On another note: What's actually the max height of the scrollable gradients and waves/parallax? Is it 448 or 480?
Nice to see a compilation of all the HDMA codes you made! However, I think you forgot this. Also, in the link to your HDMA ripper, ‘download’ is misspelled. Just saying, though not a big deal.
My Mode 0 guide.

My Discord server. It has a lot of archived ASM stuff, so check that out!

Downloaf?
Check out my DKC rips!

Other