ROM Hack [GB(C)] Injection with the New Generation of VC

Deleted member 370283

Well-Known Member
Member
Joined
Aug 19, 2015
Messages
496
Trophies
0
Age
22
XP
1,021
Country
United States
Haven't been able to look into it quite yet, but maybe you could try to use Mode4 to fix some of the palette problems?
I have no idea how exactly it is supposed to be used (I suspect it uses Conditions) but it apparently deals with patching palettes. There is even a function that apparently takes in 5-bit color values.
;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31)
 
  • Like
Reactions: froggestspirit

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
Haven't been able to look into it quite yet, but maybe you could try to use Mode4 to fix some of the palette problems?
I have no idea how exactly it is supposed to be used (I suspect it uses Conditions) but it apparently deals with patching palettes. There is even a function that apparently takes in 5-bit color values.
I could possibly fix this if we know how it works, it might be possible to rig up to the actual pallete color register.

I looked a bit into the disassembly, and noticed this:
[fight_ret]
Mode = 1
Address = 0x3EEB8
Fixcode = 0xC9

[fight_ret_c]
Mode = 2
Address = 0x3EEB8
Type = 98
Originally, this code is a "ret c" which returns if the carry flag is set. the first part patches it to be "ret" which always returns.
I'm not sure why there would be a second piece of code on the same address, but it probably leads to another routine programmed in the emulator?
That piece of code though deals with random number generation in link battles
 

kohu

Active Member
Newcomer
Joined
Apr 19, 2007
Messages
38
Trophies
0
XP
273
Country
United States
Some people were saying that the palletes can flash the correct colors when fading, is this true?

I was one of those people. It's true in the sense that entering and exiting a room seems to "fix" the colors for a fraction of a second. I'm not sure if its simply the reloading of the pallets themselves or the act of changing maps that does this. So yes, I would say when they do the fade effect through changing maps the colors seem to be working as intended.
 

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
I think that leaves it up to us figuring out the palette command in the patch file
Edit: I got the re-injecting to work, and I can confirm wario land 3 also has palletes 4 and 5 washed out. Trying a few hacky things to try and fix that
Edit2: colors are now working apparently, but not 100%. they flicker when you walk... hmm
JrBwIS7.jpg

Edit3: I'm pretty much at a loss here, it seems that there is still flickering when moving, and when textboxes are present. Basically I got this far by having a routine branch after updating the palettes, and re-setting the palette index counter to 0x18 (not sure if this value matters, but it's the start of palette 4)
 
Last edited by froggestspirit,

kohu

Active Member
Newcomer
Joined
Apr 19, 2007
Messages
38
Trophies
0
XP
273
Country
United States
Are you modifying the ROM, patches or something else to get them slightly working? Glad to know you are making progress with it as the point we are at now is beyond most of my current abilities :)
 

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,951
Country
United States
So is there now a way to patch the pallets correctly? My exterior walls are still white out. xD and it's awesome that we have a little more progress now.
 
  • Like
Reactions: XRaidersP

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
It's all ASM editing in the Rom so far, but I'm sure I could translate it to the patch format.
I'll try messing with it some more, but I'll probably release the patch anyways since it's better than nothing.
Maybe nintendo will eventually release G/S/C and fix it for us lol

Edit: @Bortz or @Cyan are we allowed to post the text patch files here if we modify them?
 
Last edited by froggestspirit,

izy

Advanced Tech Pleb
Member
Joined
Sep 17, 2010
Messages
2,311
Trophies
2
XP
4,025
Country
United Kingdom
It's all ASM editing in the Rom so far, but I'm sure I could translate it to the patch format.
I'll try messing with it some more, but I'll probably release the patch anyways since it's better than nothing.
Maybe nintendo will eventually release G/S/C and fix it for us lol

Edit: @Bortz are we allowed to post the text patch files here if we modify them?
well i dont see why not they are not licensed they are literally just lines that set parameters in certain hex parts of the rom file.
its not like you are uploading the rom or actual game assets
 

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
Here's my patch for pokemon red full color. This will only work for red (with the color hack already applied), and with the original sprites (sorry, no gen 2 sprites, and don't ask me to do it).
If this is against the rules in any way, have a moderator please remove the attachment.
Also, the rom needs to have the same name as the patch, so name the rom "redcolor.gbc", and remove the ".txt" from the file so it's just "redcolor.gbc.patch"

I forgot to mention that even though people said wireless and stuff already worked, I went through and corrected all the patches, so this should work even better. the only patch I didn't correct was dream eater I believe, so it's commented out

And please, no miiverse posts screenshots. Let's be modest here.
 

Attachments

  • redcolor.gbc.patch.txt
    17.4 KB · Views: 293
Last edited by froggestspirit,

izy

Advanced Tech Pleb
Member
Joined
Sep 17, 2010
Messages
2,311
Trophies
2
XP
4,025
Country
United Kingdom
so we should be fine naming it the same as the ROM file Dmgapae0.e69.patch in the extracted folder?

welp time to test guess i will inject the English red with the German Exheader so i can have 2 reads and keep my save

@froggestspirit any reason why it wont work with blue or? just having same old trouble unpacking roms lol and dont wanna lose my red save
 
Last edited by izy,

Elgrosp

Well-Known Member
Newcomer
Joined
Nov 12, 2014
Messages
56
Trophies
0
Location
Annecy
XP
160
Country
France
Hi guys.

Since only pokemon blue is available in french, I was wondering, If I inject a french Yellow ROM inside an English Yellow (new) VC, do you think trades will work?
The games are basically the same, so the trade patch should apply correctly, am I wrong?
 

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
Hi guys.

Since only pokemon blue is available in french, I was wondering, If I inject a french Yellow ROM inside an English Yellow (new) VC, do you think trades will work?
The games are basically the same, so the trade patch should apply correctly, am I wrong?
theres no telling. patches can be misaligned, but you can try

@squee666 as long as it's the same name as the rom with the added ".patch" at the end
 

izy

Advanced Tech Pleb
Member
Joined
Sep 17, 2010
Messages
2,311
Trophies
2
XP
4,025
Country
United Kingdom
@froggestspirit strangely enough red uses the .e69 extension and the corresponding patch file you supplied is also matching up (aside from additonal data)

how ever the .e68 file blue uses doenst match up, it still has the all the exact patch files as red so the e69.patch is the one i will have to copy the contents too it seems.

I think both roms reference the same files regardless of extension as long as it says the roms name then .patch
 

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
@froggestspirit strangely enough red uses the .e69 extension and the corresponding patch file you supplied is also matching up (aside from additonal data)

how ever the .e68 file blue uses doenst match up, it still has the all the exact patch files as red so the e69.patch is the one i will have to copy the contents too it seems.

I think both roms reference the same files regardless of extension as long as it says the roms name then .patch
The rom needs to have the same name as the patch, that's all.
I would be greatful if a CIA of Pokemon Red with @froggestspirit 's patch already applied happened to end up on "that iso site" ;)
We're working on it.
Dont credit me :P
 

Giodude

GBAtemp's official rock
Member
Joined
May 17, 2015
Messages
5,094
Trophies
1
Age
23
Location
New York
XP
2,761
Country
United States
so i decrypted the romfs.bin, where does the rom go exactly? The new pokemon roms are different from the regular ones.

EDIT: there's a Dmgapee0.e68 file in the rom folder. Should i rename my rom this and overwrite?
 
Last edited by Giodude,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=n3QqHZ7KauU