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

Author Topic: (alttp) Is setting torches into bg2 impossible?  (Read 2340 times)

Jandazekon

  • Full Member
  • ***
  • Posts: 130
    • View Profile
(alttp) Is setting torches into bg2 impossible?
« on: February 08, 2014, 09:50:41 am »
Is it only a limitation of hyrule magic?

puzzledude

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
Re: (alttp) Is setting torches into bg2 impossible?
« Reply #1 on: February 08, 2014, 12:22:21 pm »
I've just decoded this:

The pointers for torch data are at 3 locations
1. 15B16, 6A F3 04 = 04 F3 6A = 2736A (block 80)
2. 15B1D, EA F3 04 = 04 F3 EA = 273EA (block 80)
3. 15B24, 6A F4 04 = 04 F4 6A = 2746A (block 20, max 80)

Torch data starts at 2736A in hex (if the rom has no header).

From the hex study of torches
*Code (example)
43 00, AA 03, B6 03, AA 09, B6 09, FF FF

43 00 = room 67,
AA is x, 03 is y for the first torch
B6 is x, 03 is y for the second torch etc
FF FF is end.

IF YOU WANT THE TORCHES ON BG2, INCREAS THE Y COORDINATE FOR 20 IN HEX. Can be done with HEX editor only.

Example: one torch in the room
43 00, 10 05, FF FF
43 00 in hex is room 67 in dec, FF FF is end of code for this torch. The 10 is X coordinate in hex, but it will match with the HM X coordinate if devided by 2. So the HM coordinate is 10:2 (hex) is 08.

The y must be multiplied by 2 to get the HM y value. The y 05 in hex is 0A in HM; but on bg1.

Increase this by 20 in hex= 05+20 (hex) is 25 in hex, which is 0A coordinate in HM, but on bg2!

Do not tuch this torch in HM, because if you move it, it will jump to bg1 automatically. Then the process must be repeated in hex, to get it to bg2 again.


New code for the torch on bg2 (in room 67),
on HM coordinates x=08, y=0A is
43 00, 10 25, FF FF



Example of 4 torches in room 67= 43 in hex
43 00, AA 03, B6 03, AA 19, B6 19, FF FF

All 4 on bg2
43 00, AA 23, B6 23, AA 39, B6 39, FF FF

Jandazekon

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: (alttp) Is setting torches into bg2 impossible?
« Reply #2 on: February 08, 2014, 02:51:24 pm »
It would be better to have this in hyrule magic.

puzzledude

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
Re: (alttp) Is setting torches into bg2 impossible?
« Reply #3 on: February 08, 2014, 04:18:52 pm »
Not possible to edit this in Hyrule Magic, the program will put it to bg1 automatically.


The same with lots of other things.

If you edit the monologue, Hyrule Magic will most likey destroy the camera shake, which you can fix only in hex.

If you define an entrance as a dungeon (not a cave), you can not bring it back, unless you use hex, since Hyrule Magic will make a false byte FE instead of FF. Again only editable in hex.

If you edit room0 and mess with those special torches, Hyrule magic will bug the room, so Ganon can not be defeated. This can be fixed in hex only.

If you use the effect: remove all overworld exits, Hyrule magic will destroy the exits needed for ending sequence (can be fixed in HM), but it will destroy the exit from room 0 to triforce shrine. This is again only editable in hex.


You must learn hex in order to hack/debug Alttp.


Once you make the hex edits, you can open the rom with Hyrule Magic and continue normally, and the torch will be on bg2, just don't touch this torch anymore. The same goes for other debugs as well.

Jandazekon

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: (alttp) Is setting torches into bg2 impossible?
« Reply #4 on: February 09, 2014, 05:57:36 am »
You must learn hex in order to hack/debug Alttp.
Can't i skip through editing and have my romhack finished?