User Tools

Site Tools


general:guides:hxd_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
general:guides:hxd_guide [2024/10/18 22:02] felixwrightgeneral:guides:hxd_guide [2024/10/18 22:28] (current) – [Downloading HxD] felixwright
Line 15: Line 15:
 ===== Downloading HxD ===== ===== Downloading HxD =====
  
-HxD 2.0 RC can be downloaded from mh-nexus.+HxD 2.0 RC can be [[https://mh-nexus.de/en/downloads.php?product=HxD20|downloaded from mh-nexus.]]
  
 What is Hexadecimal? What is Hexadecimal?
Line 29: Line 29:
 More examples: More examples:
  
-DECIMAL  =  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 +    DECIMAL  =  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 
- +    HEX      =  0 1 2 3 4 5 6 7 8 9  A  B  C  D  E  F  10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
-    HEX  =  0 1 2 3 4 5 6 7 8 9 A  B  C  D  E  F  10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F+
  
 There are many online resources for converting hex to decimal, but in this tutorial I will explain how to convert hex to decimal and decimal to hex using windows calculator. Before we begin, run calc.exe and press Alt + 3. This will put the calculator in programming mode. There are many online resources for converting hex to decimal, but in this tutorial I will explain how to convert hex to decimal and decimal to hex using windows calculator. Before we begin, run calc.exe and press Alt + 3. This will put the calculator in programming mode.
Line 85: Line 84:
  
 WARNING: Changes in filesize could destroy your ROM if you're not careful! WARNING: Changes in filesize could destroy your ROM if you're not careful!
-Going to an offset+ 
 +===== Going to an offset =====
  
 Going forward, Let's say you want to disable the low energy alarm in Zero Mission. 0x52888 = 1D 2F to 14 E0 Going forward, Let's say you want to disable the low energy alarm in Zero Mission. 0x52888 = 1D 2F to 14 E0
Line 93: Line 93:
 As you can see, by default HxD assumes you want to put in a hex address, and the address above is hex so that is fine. If you run into a decimal or octal address though, you can select the dec or oct bubbles and then paste in the address. As you can see, by default HxD assumes you want to put in a hex address, and the address above is hex so that is fine. If you run into a decimal or octal address though, you can select the dec or oct bubbles and then paste in the address.
  
-Editing Hex Values+===== Editing Hex Values =====
  
 So we're at address 0x52888. The text cursor should be blinking to the left of 1D. Select 1D, and type 14. Your cursor should now be blinking to the left of 2F. Select 2F, and replace it with E0. Save your changes with Ctrl + S. You have just performed a hex tweak! Open your ROM in an emulator, and reduce samus' energy below 30. There should no longer be a low energy alarm. So we're at address 0x52888. The text cursor should be blinking to the left of 1D. Select 1D, and type 14. Your cursor should now be blinking to the left of 2F. Select 2F, and replace it with E0. Save your changes with Ctrl + S. You have just performed a hex tweak! Open your ROM in an emulator, and reduce samus' energy below 30. There should no longer be a low energy alarm.
  
-PC vs SNES addresses+===== PC vs SNES addresses =====
  
 SNES roms are divided into banks, which are $8000 bytes long (32,768 bytes in decimal). Super Metroid is of the rom type LoROM, so it can address banks from bank $80-$FF. Because HxD uses PC addresses, and the majority of documentation for SNES games is written with SNES addresses, it's important to know the distinction between the two. PC addresses start at $000000, while SNES addresses start at $80:8000. Every SNES bank starts at $XX:8000, where XX is the bank number. The game reads addresses in this LoROM format. In a LoROM address, the bank is number separated by a colon. SNES roms are divided into banks, which are $8000 bytes long (32,768 bytes in decimal). Super Metroid is of the rom type LoROM, so it can address banks from bank $80-$FF. Because HxD uses PC addresses, and the majority of documentation for SNES games is written with SNES addresses, it's important to know the distinction between the two. PC addresses start at $000000, while SNES addresses start at $80:8000. Every SNES bank starts at $XX:8000, where XX is the bank number. The game reads addresses in this LoROM format. In a LoROM address, the bank is number separated by a colon.
  
 Examples: Examples:
-PC address  SNES address + 
-$4000  $80:C000 +PC address SNES address ^ 
-$9500  $81:0500 +$4000  $80:C000 | 
-$791F8  $8F:91F8 +$9500  $81:0500 | 
-$7FFFF  $8F:FFFF+$791F8 $8F:91F8 | 
 +$7FFFF $8F:FFFF 
  
 Looking at the LoROM addresses, we can see these addresses are referring to locations in banks 80, 81, 8F, and 8F (again), respectively. Looking at the LoROM addresses, we can see these addresses are referring to locations in banks 80, 81, 8F, and 8F (again), respectively.
Line 117: Line 119:
 From the SMMM: From the SMMM:
  
 +<code>
 Bank $##        LoROM address          PC address        Bank description Bank $##        LoROM address          PC address        Bank description
 --------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------
Line 256: Line 259:
 Bank $FE      $FE:0000-$FE:7FFF      $3F0000-3F7FFF      Free space Bank $FE      $FE:0000-$FE:7FFF      $3F0000-3F7FFF      Free space
 Bank $FF      $FF:8000-$FF:FFFF      $3F8000-3FFFFF      Free space Bank $FF      $FF:8000-$FF:FFFF      $3F8000-3FFFFF      Free space
- +</code>
general/guides/hxd_guide.1729288933.txt.gz · Last modified: 2024/10/18 22:02 by felixwright