5 users online: nlxt, RandyMarsh4108, Sarcose, shaoshao, Someone_8094 - Guests: 784 - Bots: 122
Users: 61,746 (2,250 active)
Latest user: toadygaming

Choppy HDMA problem

I'm trying to put in some HDMA. It looks fine in Effect Tool, but in game it looks extremely choppy.


The gif is full speed. It doesn't look like it.

Could anyone figure this out? Thanks!

Effect Tool is weirdly bad at handling vertical waves, and doesn't seem to properly parameters to the ASM file for some reason. Thankfully, it's not too difficult to fix them in the ASM file.

The main relevant lines are the LSR #x near the start of the MAIN, the AND #$yy shortly after the .Loop label, and the WaveTable at the bottom.

The LSR value determines how fast the wave animates. The value specified exponentially divides the speed; e.g. LSR #0 = full speed, #1 = half speed, #2 = quarter, #3 = eighth, etc.

The AND value determines how many entries are in the WaveTable, minus 1 (and it must be a power of 2, also minus 1; i.e. 01, 03, 07, 0F, 1F, 3F, 7F, or FF).
EffectTool for some reason determines this value from the width setting, and caps it at 0F, but higher values still work fine (just be sure to add the rows to the WaveTable too).

Finally, the WaveTable defines the actual animation, with each value in the table being an offset from the background's normal position for that frame. So a pattern like [00, 01, 02, 03, 04, 03, 02, 01] would be a simple wave across 8 frames.

EffectTool runs into issues because of the AND value, which causes it to cut the WaveTable short, hence the choppy animation. In your case, the wave table moves from 00 to 0E as normal, but there's not enough frames to get back down, so it jumps. To fix that easily, you can either:
- Add the second half of that table (but decrementing instead of increasing) and set the AND value to #$0F.
- Keep the original WaveTable size, but change the values so it fits within 8 frames (e.g. [00, 04, 08, 0C, 10, 0C, 08, 04]).

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer