News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Replacement for Hyrule Magic  (Read 1215 times)

redmagejoe

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Replacement for Hyrule Magic
« on: March 31, 2019, 02:36:25 pm »
So this may come off as a little presumptuous, especially since I haven't worked with the tool, but with the recent process of helping Eyeballkid fix up his v0.2 of Zelda3: Hyrule Explorer to v0.3, and trawling around the Zeldix Forums, it occurs to me that while HyruleMagic is a reliable old horse that's been around for many years and most Link to the Past hackers would swear by it, it suffers from a rather nasty problem under the hood. Hyrule Magic seems to rearrange and heavily modify data in ROM even when simply opening the file and not changing it, and while it (mostly) does exactly what people want it to do and probably isn't a problem for people doing massive, complete rework hacks that already heavily change the game data, this seems like a terribly messy, spaghetti-code way of modifying CHR data.

As an example, Hyrule Explorer is a very subtle, minimally-modified patch for Link to the Past, yet rather than changing a few addresses in ROM, it expands the size of the ROM and irreparably modifies large swaths of data that seem completely unrelated to changes being made. This would, in most cases, result in compatibility issues and (speaking from experience) makes hex-comparison in the hopes of fixing bugs a completely unfeasible nightmare. Maybe it's just the OCD dev mentality in me, but since it's been 13 years now, has anyone toyed with the idea of writing up a new tool to act as a modern replacement for Hyrule Magic? Or is this a non-issue for most hackers? Just floating the idea out there and eager to see how other people feel about the prospect of a less-invasive Link to the Past CHR editor.

Jorpho

  • Hero Member
  • *****
  • Posts: 4136
  • The cat screams with the voice of a man.
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #1 on: March 31, 2019, 03:58:56 pm »
it occurs to me that while HyruleMagic is a reliable old horse that's been around for many years and most Link to the Past hackers would swear by it
People call Hyrule Magic "reliable" ?  It was my understanding that it was in general almost hopelessly unusable, and that owing to the complexity of the ROM, there was little hope of anything better coming along.  Are people still actually making ROM hacks with it these days?
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FCandChill

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #2 on: March 31, 2019, 04:09:33 pm »
The current build of Hyrule Magic on Romhacking.net is outdated. MathOnNapkins released the source code for Hyrule Magic and is currently improving it:
https://bitbucket.org/MathOnNapkins/hmagic

The repo includes MANY bugfixes.

What prompted the release given years of keeping it private per Sephiroth3's wish? Because of a bad compiler, half the source code was included in the EXE of recent Hyrule Magic releases. MathOnNapkins decided he might as well make it public.

There's also ZScream by Zarby89. The program has been in development for roughly 8 years and is far from complete IIRC. The development for this one is scattered to say the least...
https://github.com/zarby89

it occurs to me that while HyruleMagic is a reliable old horse that's been around for many years and most Link to the Past hackers would swear by it, it suffers from a rather nasty problem under the hood.

Hyrule Magic corrupting ROMs was a common occurrence. It didn't care about data limits and will overwrite data. The worst part is that it hardly supported ROM expansion aside from dungeon headers... I can't speak for the current build though ... because it fixes a lot of issues.
« Last Edit: March 31, 2019, 07:57:10 pm by FCandChill »

eyeballkid

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #3 on: April 01, 2019, 03:26:13 am »
Are people still actually making ROM hacks with it these days?

Yes... I can assure you that they are.



There's also another improved version compared to what is on RHDN:
http://www.zeldix.net/t1017-sungodportal-s-hyrule-magic-hack

This is what I use(d)...



The current build of Hyrule Magic on Romhacking.net is outdated. MathOnNapkins released the source code for Hyrule Magic and is currently improving it:
https://bitbucket.org/MathOnNapkins/hmagic

The repo includes MANY bugfixes.

What prompted the release given years of keeping it private per Sephiroth3's wish? Because of a bad compiler, half the source code was included in the EXE of recent Hyrule Magic releases. MathOnNapkins decided he might as well make it public.

As you wrote, there wasn't the complete source code available at the start. Are you sure this is in a working state currently?



There's also ZScream by Zarby89. The program has been in development for roughly 8 years and is far from complete IIRC. The development for this one is scattered to say the least...
https://github.com/zarby89

Can you make sense of it, though? To my understanding, it contains 4 different tries on writing a new editor for ALttP...



There's also this:
https://github.com/superskuj/Zeldix-Magic

However, at least on the github page updates have stopped already 2 years ago, and they have restricted the access to the forum page of the project...


eyeballkid

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #4 on: April 01, 2019, 06:09:21 am »
PS: Since MathOnNapkins doesn't provide builds, here's the current code compiled:

https://we.tl/t-k5oZ5xAAr1

There are different branches. Some with more recent updates than the master branch:

https://bitbucket.org/MathOnNapkins/hmagic/branches/

master   2018-10-26
staging1 2018-12-03
staging2 2019-03-15
staging3 2019-02-18

I couldn't build staging2, since a file (hm-res.h) is missing. The others can be found in the archive above.


PPS: For anyone interested, what redmagejoe is referring to is a bug introduced by Hyrule Magic that needed Conn's excellent knowledge to be fixed. See here:

http://www.zeldix.net/t1287p25-zelda-iii-hyrule-explorer#30342

http://www.zeldix.net/t1287p50-zelda-iii-hyrule-explorer#30359
« Last Edit: April 02, 2019, 03:45:22 am by eyeballkid »

FCandChill

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #5 on: April 01, 2019, 07:00:55 pm »
PS: Since MathOnNapkins doesn't provide builds, here's the current code compiled:

You didn't provide a download link.

April 01, 2019, 07:25:47 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
There's also this:
https://github.com/superskuj/Zeldix-Magic

However, at least on the github page updates have stopped already 2 years ago, and they have restricted the access to the forum page of the project...

There's a more update-to-date repo for this project (last updated in 2018). It's basically dead at this point though...
https://bitbucket.org/clampsy/zeldix-magic

Can you make sense of it, though? To my understanding, it contains 4 different tries on writing a new editor for ALttP...
Not really. Zscream looks cool, but the code is bad. See this file for example...
https://github.com/Zarby89/ZScreamMagic-4/blob/master/ZScreamMagic/PaletteViewerMap.cs

There's a lot of copy-pasting.
« Last Edit: April 01, 2019, 07:25:47 pm by FCandChill »

eyeballkid

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #6 on: April 02, 2019, 03:43:03 am »
You didn't provide a download link.

Hmm, I think I did?! It's all in here:

https://we.tl/t-k5oZ5xAAr1

Just checked, it works for me...


Thanks for the updated Zeldix Magic link.


EDIT: I edited the previous post. I had ordered the text badly. That was probably the reason why you have been confused about the missing download link.

FCandChill

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #7 on: April 02, 2019, 05:46:44 pm »
Thanks for the updated Zeldix Magic link.

No problem. The program is far from complete, however, the source is relatively cleaner than Hyrule Magic's and Zscream's. It handles data structuring a lot better... Heck, I've used the dialogue editor code as a basis for my own editor.

A lot of the dungeon reading and writing looks complete. It's just the GUI for the dungeon editor that needs to be done.

EDIT: I edited the previous post. I had ordered the text badly. That was probably the reason why you have been confused about the missing download link.

Thanks!

eyeballkid

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Replacement for Hyrule Magic
« Reply #8 on: April 03, 2019, 07:48:30 am »
A lot of the dungeon reading and writing looks complete. It's just the GUI for the dungeon editor that needs to be done.

Hmm. It's strange: I feel that writing the code that deals with the ROM itself is the actual hard part. And writing the GUI code seems to be the part which actually many more people could achieve since more common coding skills are needed. Nevertheless, almost all projects suffer from a bad or missing GUI in the end...

I would actually be very much interested in contributing to any of these projects. But they are all locked into Windows / Visual Studio, which I don't use. If someone was up for an ALttP editor in Python, I'd be all over it. Alternatively, something C++ using open source / cross platform tools would be great as well.

I wonder how hard it would be to port Hyrule Magic from Win32 to Qt ...?!