Re: Arbitrary code execution in Red/Blue using the "8F" item
Posted by: Krys3000
Date: 2015-05-28 13:49:11
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
I'm currently trying to obtain the 8F Item using invlid encounter flags (because i have no event that takes an item away and I dont feel like playing the main story all over again…).
WRA1:D327 EA 61 D0 ld (d061),a
WRA1:D32A C9 ret
WRA1:D327 FA 24 D3 ld a,(D324)
WRA1:D32A 04 inc b
WRA1:D32B EA 5E D0 ld (D05E),a
WRA1:D32E C9 ret
WRA1:D327 EA 19 D7 ld (d719),a
WRA1:D32A C9 ret
WRA1:D327 EA 7D D0 ld (d07D),a
WRA1:D32A C9 ret
WRA1: D327 3E 01 ld a, 01
WRA1: D329 EA 5C D0 ld (D05C),a:
WRA1: D32C C9 ret
Big thanks for your help!
I would suggest to add that to the first post, it can make users unsure if they thing they need to have access to an event, when its also possible without it.
But well, I now got the item, experimented with it a bit and "ported" some codes to the european non-english versions of pokemon red/blue by just adding 5 to every immediate value in the asm code(I tested it on the german version only)
Adding 5 works if only ram adresses are modified, but how could one figure out what the call adresses in other languages of the games are? Is there like a "call adress map" in addition to the ram map, or is debugging while playing in an emulator needed?
Is it also possible to make a script that plays the final rival battle music or the credits music at the next battle instead of the gym leaders? that music is more fun to listen to :P
how could one figure out what the call adresses in other languages of the games are? Is there like a "call adress map" in addition to the ram map, or is debugging while playing in an emulator needed?
Is it also possible to make a script that plays the final rival battle music or the credits music at the next battle instead of the gym leaders? that music is more fun to listen to :P
ld a, xx - tune
ld c, yy - bank
call 23A1 - play music
ld a, 02 - a=02
dec a - a=01
dec a - a=00
dec b
ld (D323),a - item 3 quantity =a (00)
inc b
inc b
ld (D325),a - item 4 quantity =a (00)
ret
ld a, xx - tune
ld c, yy - bank
call 23A1 - play music
ld a, 02 - a=02
dec a - a=01
dec a - a=00
dec b
ld (D328),a - item 3 quantity =a (00)
inc b
ld l,2A - hl=D32A
inc b
ld (hl),a - item 4 quantity =a (00)
ret
And finally a code where you can modify the species and the level of the Pokemon you battle would be also nice (modified "CATCH 'EM ALL" SCRIPT) :)
Shina69:
Catching above L:12 might erase the move, unless you want to keep your current one.
Has anyone created a save state meant for this arbitrary code execution?
If not, I'll go with gamesharking my way through.
Good evening, guys.
First of all, you people are absolute unrecognized geniuses for coming up with such amazing programming tricks for the eyes of this humble gamer who spent his childhood exploring the neat forests of pokemon yellow, not regretting knowing so little as i did. Although times change and nostalgia grabs us once again to pick the old dusty cartridges and face our old childhood enemies… a magnificent team starts to assemble. Glitches were learned, stats analyzed, moves tactical duplicated in order to fulfill the needs, but… there's one thing that wasn't forgotten - i can't delete the HM moves.
So i went deep and deeper, cause transfer my beloved X_-_x, to a Gen 2+ wasn't an option, and i decided to come to you guys, as i got so fascinated with the wonders of arbitrary code execution.
Is there any way to come up with a move deleter for HM's or simply overwrite this annoying Flash move of X_-_x, on Pokemon Yellow European Version (English)? [size=8pt](i believe this is the proper version, i'm from Portugal and i will try to find that old box!)[/size]
Not sure if this is the proper topic to send my request, but i'm deeply thankful for the attention.
Keep mesmerizing us with new knowledge applied to old technologies, you guys rock!
ld a,xx
ld (D172),a
ret
3E xx
EA 72 D1
C9
Shina69:
Catching above L:12 might erase the move, unless you want to keep your current one.
Oh i also tried that, forgot to mention );
Managed to make ditto swords dance 3 times and actually got a L:13 one but the move was still there.
Some other guy got the same results as i read on a youtube video comment, that's why i run out of options :'(
(by the way, Flash is the 2nd move on the Fight list, if it helps :o)
Have the Pokemon to be altered be the first one in the PC. Have its move to be altered be put in first slot.8F
<any item>
X Accuracy x158 (changing this from 158 for first move to 161 for 4th move SHOULD change the move that's altered, though I have ONLY tested with the first move!)
Carbos x218
Max Revive x<MOVE ID>
Poke Ball x201
Where move ID obviously corresponds to the move's ID.
This will change the first move of the first Pokemon in your active box.