Register - Login
Views: 94251116
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
08-17-18 06:39:50 PM

Jul - General Game/ROM Hacking - G/S/C the glitch pokemons aren't loaded in VRAM, help me to fix New poll - New thread - New reply
Next newer thread | Next older thread
CruisnEma
Member
Level: 21


Posts: 85/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-19-18 09:26:26 AM (last edited by CruisnEma at 02-19-18 09:26:50 AM) Link | Quote
I found 0xFC ????? pic pointers in Crystal, is between Celebi and the egg:



But the problem is that it's sprite isn't loaded in VRAM when a battle starts or when the pic is called from the pokepic script. The VRAM keep the land tileset resources or the charmap if you before had read a text message, checked with a debugger.

And the same thing happen to the next ????? forms, 0xFE and 0xFF and 0x00. The 0x00 Missingno called ????? like the previous is the last in the mons's names table, then the 0x00 is the pokémon number 256. I found their base stats structure after the end of the pokémons names.

There is a way to force the game to load in VRAM an assigned pic like indicated in the pointers? If I assign FFFFFF pointer to a Celebi load a glitched pic, but however load a pic:



If I set something else to the MissingN°. pointer instead don't update the VRAM, is the reason why load the land tilemap resources when a ????? have to appear.

There is a way to fix this? I found the pointer... Then is missing only the pic loading in VRAM... Please help me!
Sanqui
1730
🦉
Level: 77


Posts: 1691/1733
EXP: 4057088
For next: 134041

Since: 12-20-09

Pronouns: any
From: Czechia (NEW!)

Since last post: 12 days
Last activity: 3 days

Posted on 02-19-18 01:55:06 PM (last edited by Sanqui at 02-19-18 01:57:38 PM) Link | Quote
Basically, the routine GetMonFrontpic calls IsAPokemon which quickly determines that the Pokémon species values isn't valid, so it never loads the pic. The easiest fix if you're actually implementing these Pokémon is to replace the IsAPokemon routine with simply and a; ret.
CruisnEma
Member
Level: 21


Posts: 86/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-19-18 02:20:44 PM (last edited by CruisnEma at 02-19-18 02:41:30 PM) Link | Quote
Originally posted by Sanqui
Basically, the routine GetMonFrontpic calls IsAPokemon which quickly determines that the Pokémon species values isn't valid, so it never loads the pic. The easiest fix if you're actually implementing these Pokémon is to replace the IsAPokemon routine with simply and a; ret.
Oh thank you.

And is the same thing also for the loading in the pokepic script to see a pokemon pic via script (like when you choose a pokemon in the lab clicking to the ball you can see it's image in grayscale) and then I have only to change it to GetMonFrontPic. Thank you, Now I try to search it to the rom, I need to do the hack via HEX editing 'cause the project is almost finished, I can't use the assembly for this.

-EDIT- Incredible, works! Thank you, I tried for years to fix this, very thanks! I have only a last question... Unfortunately I need of 2 slots and I have to use also the next bytes after the egg, I don't know what are the next, can you tell me what I go to overwrite and maybe if can be repointed?
Sanqui
1730
🦉
Level: 77


Posts: 1692/1733
EXP: 4057088
For next: 134041

Since: 12-20-09

Pronouns: any
From: Czechia (NEW!)

Since last post: 12 days
Last activity: 3 days

Posted on 02-19-18 03:42:43 PM (last edited by Sanqui at 02-19-18 03:43:35 PM) Link | Quote
Originally posted by CruisnEma
-EDIT- Incredible, works! Thank you, I tried for years to fix this, very thanks! I have only a last question... Unfortunately I need of 2 slots and I have to use also the next bytes after the egg, I don't know what are the next, can you tell me what I go to overwrite and maybe if can be repointed?


You're welcome. Actually, immediately following the pic pointer table is the first section with compressed Pokémon sprites - pics[1], so just make sure the first pic (which is Ho-Oh's frontpic in the Pokémon Crystal ROM[2]) is not in the way.
CruisnEma
Member
Level: 21


Posts: 87/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-19-18 03:55:58 PM (last edited by CruisnEma at 02-19-18 04:38:32 PM) Link | Quote
Originally posted by Sanqui
Originally posted by CruisnEma
-EDIT- Incredible, works! Thank you, I tried for years to fix this, very thanks! I have only a last question... Unfortunately I need of 2 slots and I have to use also the next bytes after the egg, I don't know what are the next, can you tell me what I go to overwrite and maybe if can be repointed?


You're welcome. Actually, immediately following the pic pointer table is the first section with compressed Pokémon sprites - pics[1], so just make sure the first pic (which is Ho-Oh's frontpic in the Pokémon Crystal ROM[2]) is not in the way.
Ok, thank you, I found free space starting from 0x1669e0 where repoint Ho-oh frontpic and where I can add the fossils sprite, I have a last problem... Unfortunately after the fix read the structure of the glitch pokemons after Celebi, then when starts the names (from Bulbasaur) and they need to have a structure to set the pic aspect ratio. Can you please tell me where is the pointer to move the pokemon names data please? I can't find it...
Sanqui
1730
🦉
Level: 77


Posts: 1693/1733
EXP: 4057088
For next: 134041

Since: 12-20-09

Pronouns: any
From: Czechia (NEW!)

Since last post: 12 days
Last activity: 3 days

Posted on 02-19-18 04:45:16 PM Link | Quote
Originally posted by CruisnEma
Ok, thank you, I found free space starting from 0x1669e0 where repoint Ho-oh frontpic and where I can add the fossils sprite, I have a last problem... Unfortunately after the fix read the structure of the glitch pokemons after Celebi, then when starts the names (from Bulbasaur) and they need to have a structure to set the pic aspect ratio. Can you please tell me where is the pointer to move the pokemon names data please? I can't find it...

PokemonNames is primarily referenced in GetPokemonName, luckily both the bank and pointer.

It's also referenced in the InitList routine but I don't really know how that's used.
CruisnEma
Member
Level: 21


Posts: 88/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-19-18 05:04:22 PM (last edited by CruisnEma at 02-19-18 05:30:52 PM) Link | Quote
Originally posted by Sanqui
Originally posted by CruisnEma
Ok, thank you, I found free space starting from 0x1669e0 where repoint Ho-oh frontpic and where I can add the fossils sprite, I have a last problem... Unfortunately after the fix read the structure of the glitch pokemons after Celebi, then when starts the names (from Bulbasaur) and they need to have a structure to set the pic aspect ratio. Can you please tell me where is the pointer to move the pokemon names data please? I can't find it...

PokemonNames is primarily referenced in GetPokemonName, luckily both the bank and pointer.

It's also referenced in the InitList routine but I don't really know how that's used.
Ok, now I try, thanks a lot, I added at least 1 pic:



Thanks a lot!

I have only problems with the second fossil 'cause the structure still loads from the pokemon names, but at least the Aerodactyl fossil were restored!


CruisnEma
Member
Level: 21


Posts: 89/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-19-18 07:06:36 PM Link | Quote
Solved, I found the pointer and I moved by 20 hex without change the bank and now I have full working fossils in the museum in Crystal! Thank you very much!

I want only to do it also in Gold and Silver, in Gold and Silver can you please tell me where is the same IsAPokemon routine? Where I can find it?
Sanqui
1730
🦉
Level: 77


Posts: 1694/1733
EXP: 4057088
For next: 134041

Since: 12-20-09

Pronouns: any
From: Czechia (NEW!)

Since last post: 12 days
Last activity: 3 days

Posted on 02-20-18 12:48:50 AM Link | Quote
Originally posted by CruisnEma
Solved, I found the pointer and I moved by 20 hex without change the bank and now I have full working fossils in the museum in Crystal! Thank you very much!

I want only to do it also in Gold and Silver, in Gold and Silver can you please tell me where is the same IsAPokemon routine? Where I can find it?

In Gold and Silver the bit of code is included straight in the PrepMonFrontpic routine[1].

Just remove (or nop out) this bit:

ld a, [wd004]
and a
jr z, .not_pokemon
cp EGG
jr z, .egg
cp NUM_POKEMON + 1
jr nc, .not_pokemon
.egg
CruisnEma
Member
Level: 21


Posts: 90/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-20-18 07:22:03 AM Link | Quote
Darn, don't work for me, I tried to fill these bytes with simple 00 or FF and however if I try ti battle a ????? continues to load the land graphic... Why?
Sanqui
1730
🦉
Level: 77


Posts: 1695/1733
EXP: 4057088
For next: 134041

Since: 12-20-09

Pronouns: any
From: Czechia (NEW!)

Since last post: 12 days
Last activity: 3 days

Posted on 02-20-18 11:40:56 AM Link | Quote
Originally posted by CruisnEma
Darn, don't work for me, I tried to fill these bytes with simple 00 or FF and however if I try ti battle a ????? continues to load the land graphic... Why?

Oh, I'm sorry, you need to actually keep the ld a, [wd004] line. The rest you can nop out (with 00), but not FF out!
CruisnEma
Member
Level: 21


Posts: 91/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-20-18 11:44:43 AM (last edited by CruisnEma at 02-20-18 02:46:11 PM) Link | Quote
Don't work however... I don't understand... Perhaps Gold and Silver have another routine for the invalid pokémons? I tried also to change the instructions to go to .egg in all three cases instead of .not_pokemon but nothing change...
CruisnEma
Member
Level: 21


Posts: 92/95
EXP: 45257
For next: 4686

Since: 02-01-12


Since last post: 72 days
Last activity: 4 days

Posted on 02-24-18 12:44:20 PM Link | Quote
Maybe someone else want to help me to find the right routine to erase in Gold and Silver? Please...
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - G/S/C the glitch pokemons aren't loaded in VRAM, help me to fix New poll - New thread - New reply




Rusted Logic

Acmlmboard - commit 5d36857 [2018-03-03]
©2000-2018 Acmlm, Xkeeper, Inuyasha, et al.

28 database queries, 7 query cache hits.
Query execution time: 0.147782 seconds
Script execution time: 0.024917 seconds
Total render time: 0.172699 seconds
Memory used: 1310720