13 users online: B2De, DasFueller, Guleyan112, hh0962430, JinRokhZenobi, JustJacob, Knight of Time, LiamBLOL, Lizard_433,  MarkAlarm, mizounimax, Neuromancer, Will86 - Guests: 93 - Bots: 188
Users: 66,422 (2,329 active)
Latest user: gustavotono

HDMA Bugfixes

SMW Patches → HDMA Bugfixes

Submission Details

Name: HDMA Bugfixes
Author: Ice Man
Version History: View
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: Yes
Description: This patch prevents various problems that would normally occur in the vanilla SMW like pipe transitions or sprite priorities when HDMA is used.

The only thing you need to add priority on are the Map16 tiles for Pipes, ?-Blocks and Turn Blocks.

On top of that, you can enable/disable HDMA on each game mode. So please adjust to your needs. :)
Tags: hdma lorom sa-1
Comments: 11 (jump to comments)
Download 1.22 KiB | 1,192 downloads


View all

Comments (11)

Metal-Yoshi94 Link
Originally posted by Ice Man
You have to do that for all pipe colors in the Map16 Editor, just not for the green ones.

The tubes have been solved, the only thing left to do is to solve the powerup blocks. They are already in priority
Metal-Yoshi94 Link
Tested on a clean rom, even when I put the priority on the blocks and other elements, the sprites and Mario are still above them
Ice Man Author Link
You have to do that for all pipe colors in the Map16 Editor, just not for the green ones.
Ice Man Author Link
Originally posted by Hayashi Neru
If you don't want pipes and blocks to blind the player, you can use Disable HDMA During Transitions(UberASM).
Mine already takes care of it, check the 2nd screenshots (BEFORE/AFTER). The one you linked just disables HDMA on the game mode you put it in. Mine lets you control the single game modes and fixes various issues with sprite priorites. You just have to add priority to the pipes, etc. manually in the map 16 editor.
Hayashi Neru Link
If you don't want pipes and blocks to blind the player, you can use Disable HDMA During Transitions(UberASM).
 MarioFanGamer Link
Moderated with:
  • Lunar Magic v3.31
  • SA-1 Pack v1.40
  • Asar v1.81
  • UberASM v1.5
  • BSNES v115
Added screenshots to show three bugfixes.

Most of the patch is a collection of hex edits, the first collection which fixes all instances where HDMA disables all other HDMA channels (which, incidentally, is almost identical to the one from the newly added Tweaks section) and the second one which disables lower priority for most sprites which go behind the foreground (which is a colour maths issue, not an HDMA issue, hence the last two images taking place in level mode 1E, not in a "foreground" HDMA effect).
In addition, the code which fixes HDMA from running in the wrong game modes (the only hijack freespace, by the way), runs in NMI, though it still is an UberASM-less solution. It still would be cool to see a solution which disables HDMA after a fade-to finishes, though.
Keep in mind that the hex edit which removing the windowing parameter thing, affects the credits where the windowing affects the sprites and layer 3, not just layer 2.

Ultimately, I don't really like this patch and would go for alternatives instead. But that's just a personal opinion and doesn't affect moderation.
Xane123 From older version: HDMA v3.5 Link
It's said to use this if the gradients suddenly appear during transitions but then the comments here warn of things breaking and hacks being rejected from SMW Central, so there's risks to using this patch. Is it safe to use?
NGB From older version: HDMA v3.5 Link
The sa-1 version of this patch was borked for me.
I changed all instances of $7FXXXX to $41XXXX, that seems to do the trick, I am not sure if this messed up something else, feel free to try it, but make a backup!
 Erik From older version: HDMA v3.5 Link
more like fix your hack LOL
JP32 From older version: HDMA v3.5 Link
Do not use this, or the other HDMA patch by ice man. This one causes OW and sprites to mess-up after dying in level(it seems to do that only in specif levels(ones without any HDMA?), but its still huge issue) and only fix is to restart the game, and my hack got rejected because of it. The other HDMA patch causes problems with mushroom going behind foreground(such as bushes), fire flower flickering... Just do not use them as they mess more things up than fix them.
Vitor Vilela From older version: HDMA v3.5 Link
Added tags and SA-1 support.

Fun fact, this patch copies uses $7FFF00+ has a buffered HDMA table which gets loaded to the HDMA registers ($43x0, etc.), which is useful in case you're doing like double buffered HDMA or a HDMA that is synced with something so your effect won't get out of sync with the other things. If you're interested you may want to look the patch itself for figuring how it works.