TM/HM Expansion I'm a Japanese hacker. Because English is very bad, so it may be difficult to read sentences.
There are several threads and posts related to the TM/HM expansion in this forum, but there are some flaws and it will not behave exactly like the vanilla FR's TM. (Disk image and animation of TM after 51st are wrong)
In addition, as a specification from vanilla FR, the item ID used for TM/HM had to be continuous.
So, I changed the TM/HM related routines considerably, I worked like a vanilla FR and created an expanded TM/HM that can freely assign item IDs.
Because many routines have changed, code cant be written directly to threads because of readability issues, but the source code is included in the attachment.
This thread explains how to expand TM/HM using the attached patch.
I'm quoting part of the thread of ghoulslash's.
Step 1 : Patch "TM.ips" to Fire Red
Download the attached file, decompress it, patch the included "TM.ips" to Fire Red.
This patch doesn't use free space.
Step 2 : Create a table for linking the TM/HM index and item ID
Please create a table in free space, Put the pointer at 0x114100.
The attached "Table_example.bin" is the same setting as that of vanilla FR.
[TM and HM threshold (2bytes)][Item ID (2bytes)] ~ [Item ID (2bytes)] FF FF
Step 3 : TM/HM compatibility and move table
For expanded TM, the new comparability requires 0x10 bytes per entry.
Please create a new comparability table in free space of (Pokemon number * 0x10) bytes.
You also need to extend the move ID table.(In vanilla FR, the table is at 0x45a80c.)
Create a table in free space of (Total number of TM/HM * 2) bytes.
Step 4 : Bag expansion
If you are already expanding the bag, this step is not necessary.
Assemble this code and insert it into 0x99e44.
.equ freeRAM, 0x0203cXXX
.equ NumMainPocketItems, XX
.equ NumKeyItems, XX
.equ NumPokeballs, XX
.equ NumTMs, XX
.equ NumBerries, XX
ldr r1, =0x0203988c
ldr r0, =freeRAM
ldr r2, =Numlist+0x08099e44
ldrb r3, [r2]
cmp r3, #0x0
str r0, [r1]
strb r3, [r1, #0x4]
add r1, #0x8
add r2, #0x1
lsl r3, #0x2
add r0, r3
.byte NumMainPocketItems, NumKeyItems, NumPokeballs, NumTMs, NumBerries
I'm not sure if this issue only happens to me. When I do all the steps for expanding TM I'm gettings errors with the items lying in the ground. The items with the MSG_FIND commands instead of saying "player found POTION" it actually says "player found POTION It contains " like if I was picking a TM. Additional to this all the TM/HM are not showing their names when opening TM Case, it only shows the TM number but blank names.
In addition, I would like to know exactly what every routine is supposed to do. The ASM codes are labeled by their address, but I have no idea exactly what those routines are changing since there is no even comments about these modifications.