how do i reinject a new save into the rom of a repro cart?

Dr_Dankenstein

Member
OP
Newcomer
Joined
Mar 25, 2020
Messages
17
Trophies
0
Age
29
Location
West Midlands, England
XP
90
Country
United Kingdom
hey all,
so yeah I basically have my old repros sitting around decided id dump the save as ive been playing emeral and lead green recently again,
I managed by using a gbxcart pro to get to the save by dumping the rom and using a save extractor tool which works in pkhex and I have made the changes to the save,
just wondering now how to inject the save back into the rom so I can rewrite it to the card?

I have used my gbxcart to write roms and such before anyways so writing it back wont be a problem its just the putting the modified save back into the rom I have no idea how to go about it


Any suggestions?
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,869
Trophies
2
XP
29,058
Country
United Kingdom
You'd have to write it back to the same location in the rom file as the previous save was extracted from. What save extractor tool did you use? Maybe it has the location info. If not, you could open the original save in a hex editor if you still have it, and open the rom file in the hex editor, and search the rom to find the matching save data, then overwrite it with the new save data.
 
  • Like
Reactions: Dr_Dankenstein

Dr_Dankenstein

Member
OP
Newcomer
Joined
Mar 25, 2020
Messages
17
Trophies
0
Age
29
Location
West Midlands, England
XP
90
Country
United Kingdom
You'd have to write it back to the same location in the rom file as the previous save was extracted from. What save extractor tool did you use? Maybe it has the location info. If not, you could open the original save in a hex editor if you still have it, and open the rom file in the hex editor, and search the rom to find the matching save data, then overwrite it with the new save data.
https://projectpokemon.org/home/files/file/4104-save-extractor-from-bootleg-pokémon-gba-games/
thats the one that I used to extract the save from the rom, i did notice the title for the extracted save seems to have this on the end 0xFC0000

not sure if that would be where it starts or ends or even if it is the save location, I did check HxD for that number 0xFC0000 and it did show some data but im lost with this sort of thing if im honest
 

metroid maniac

An idiot with an opinion
Member
Joined
May 16, 2009
Messages
2,086
Trophies
2
XP
2,626
Country
https://projectpokemon.org/home/files/file/4104-save-extractor-from-bootleg-pokémon-gba-games/
thats the one that I used to extract the save from the rom, i did notice the title for the extracted save seems to have this on the end 0xFC0000

not sure if that would be where it starts or ends or even if it is the save location, I did check HxD for that number 0xFC0000 and it did show some data but im lost with this sort of thing if im honest
FC0000 is a common offset for save data in batteryless Pokémon bootlegs so you're on the right track. Your save file should be 128KB meaning if you overwrite starting from that offset it will end at FDFFFF
 

wilvic

New Member
Newbie
Joined
Apr 14, 2021
Messages
1
Trophies
0
Age
35
XP
74
Country
Philippines
You can use this injector:

1684285375525.png

(It's an image because the system won't allow me to post the link)

I have tested this with a bootleg EMERALD and a save file from a legit cart.
 
  • Like
Reactions: hippy dave

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Least they got head in the end