News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Custom HUD

Started by interdpth, April 20, 2020, 09:56:44 PM

Previous topic - Next topic

interdpth

Hello,

I wanted to modify the HUD a bit for ALIE
https://www.youtube.com/watch?v=F0YSN6MTjD4

So I've been working on that a bit but I wanted to get the code out to the community.
The way sprites are drawn is in Fusion, there is a copy of OAM data before it gets copied to the actual region.
The game handles drawing sprites with a variable called NextOAMSlot.

The HUD is drawn every frame, at the end of a "Draw" a function called BlankNextOAM is called which clears out OAM from NextOAMSlot to 127.

For this hack I originally wanted to be natural and use the NextOAMSlot, but I ended up not. Instead I have a variable to help keep track.

For this hack I hijacked the huddraw to call my custom draw code, and I hijacked BlankNextOAM as I am drawing to the end of OAM memory. So I need it to not clear out the last entry.
I hope to see new custom huds!
Target GFX done by McCad, thanks to Kazuto for some testing.

Metroid Violinist

Hey, that's pretty damn neato- Although I don't quite see the use for it.  :neutral:

|Shadow|

Quote from: interdpth on April 20, 2020, 09:56:44 PM
Hello,

I wanted to modify the HUD a bit for ALIE
So I've been working on that a bit but I wanted to get the code out to the community.
The way sprites are drawn is in Fusion, there is a copy of OAM data before it gets copied to the actual region.
The game handles drawing sprites with a variable called NextOAMSlot.

The HUD is drawn every frame, at the end of a "Draw" a function called BlankNextOAM is called which clears out OAM from NextOAMSlot to 127.

For this hack I originally wanted to be natural and use the NextOAMSlot, but I ended up not. Instead I have a variable to help keep track.

For this hack I hijacked the huddraw to call my custom draw code, and I hijacked BlankNextOAM as I am drawing to the end of OAM memory. So I need it to not clear out the last entry.
I hope to see new custom huds!
Target GFX done by McCad, thanks to Kazuto for some testing.

Um how to i patch the rom with this?

interdpth

You use ARMIPS to assemble the code.