Many codes for Yellow you have to deconstruct/analyze the code and modify the fourth digit of the address(es) involved -1, so for instance D059 (instant encounter) becomes D058; and it would involve changing an item or quantity. This excludes a few (usually lower?) addresses like CD38; so the same walk through walls code could be used between Red/Blue and Yellow, although I don't know the specifics sadly.
But with the gift Pokémon code it's different as it calls a routine and the locations of routines may differ between Red/Blue and Yellow. The best way to deal with it is often to use a hex editor and search for similar bytes from the routine.
Back into raw code using the Big List:
- Repel x index number of wanted Pokemon
- X Speed x14
- Ultra Ball x 64
- TM05 (Mega Kick) x72
- Lemonade x201
1e xx 43 0e 02 40 cd 48 3e c9
When you see a cd it means "call", and the code in bold is call 3e48.
Taking a look in BGB debugger, we can find the following code here:
Now, CF91 is one of the addresses that is reduced by 1 in Yellow; so if we search for 78 ea 90 cf [ld a,b ld (cf90),a ld a,c] in a hex editor (I like to use HxD
which is freeware) we can luckily find the beginning gift Pokémon routine in Yellow at 3E59.
So we need to change cd 48 3e to cd 59 3e
(59 3e because the call routine expects big endian, which may mean highest value comes first; sadly not sure but remember it's the often the opposite byte order you would find in a memory viewer)
Hence the only change you need to make is the x72 (hex:48) in TM05 to x89 (hex:59
), and the Lemonade (hex:3E
) remains unchanged and you're good to go
Hope that helps!