Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → A problem with new Kanto areas and musics of wild pokémon and trainers

#1 2015-10-24 09:00:15

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 76/193

A problem with new Kanto areas and musics of wild pokémon and trainers

Always for my project of Silver, Gold and Crystal, if I fight with a trainer, or fish into the water (if you know also if for now I don't have wild data for the new maps I can however set a fishing index) the wild and trainers musics of the new areas (SAFARI ZONE, VIRIDIAN FOREST, POKéMON MANSION and CERULEAN CAVE) are the musics of JOHTO but is wrong, the only area that works fine is Seafom Islands, because was an area existing originally, also without the real Seafom cave. In the Pokégear I view the new areas on KANTO, but load the wrong musics. It's a problem of a second table to fix right? Where is? Can you help me to find it please?


The italian Pokémon Green creator.

Offline

#2 2015-10-24 22:20:38

Miksy91
Member
Registered: 2010-10-16
Post 2,194/2,305

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Here is documentation about how the music is determined in a battle - may it be against a trainer or a wild pokemon.
http://hax.iimarck.us/topic/855/

If you're somewhat familiar with reading asm code, you can see that the following part calls a routine from 24:694E which checks, which region you are in, and returns the result in register e (e == 00 --> Johto, e != 00 --> Kanto).

ld a,$24 ; check region
ld hl,$694E
rst $8
(continued by 'ld a, e')

So what you should probably do is to change that routine (at 24:694E) to recognize those areas you mentioned as part of Kanto instead of Johto.

Offline

#3 2015-10-24 22:31:58

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 77/193

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Nope, I don't know ASM, is possible do the fix via hex editing like the extended KANTO limits? However I have a question, the new areas that I've added are added after FAST SHIP area, overwriting bytes that were part of the names of New bark town and cherrygroove city (I have repointed the names to blank space), then now the game see the name and the position in the town map, but however are added after Kanto areas, after a fix of 1 byte I've forced Pokégear to load new areas after fast ship after extending of the Kanto limits. Then how the game could see the new areas like JOHTO areas for the musics? I can't understand this...


The italian Pokémon Green creator.

Offline

#4 2015-10-24 22:37:01

Miksy91
Member
Registered: 2010-10-16
Post 2,196/2,305

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

I'm not sure if I understood correctly or not, but did you mean that the new areas show right in Kanto town map after Fast Ship, but those areas still use Johto battle music in the game? Then I believe you're on the right track and added the new areas totally fine to Kanto map. The next thing you have to do is to make them use Kanto battle music and that can be done by hacking that asm routine starting at 24:694E.

But doing it should be quite simple. I could check it out and see if I can come up with a simple solution in a few minutes.

Offline

#5 2015-10-24 22:47:51

Miksy91
Member
Registered: 2010-10-16
Post 2,197/2,305

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

The way how this works is that it uses the Johto battle music for all the areas that are "after" FAST SHIP area (= that have a higher 'area byte' (> 0x5E)). How would you want it to be changed? Use Kanto music for all the areas after that?

Offline

#6 2015-10-24 22:50:19

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 78/193

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Yes, only POKéMON MANSION not is visible ecept if you are in 'cause IMHO was bettere 'cause couldn't exists normally in the POKéGEAR official map, 'cause the entrance is destroyed, you can reach it via TELEPORT o a special event ABRA. Then you'll can view it only if you are into the only room left, however is shown correctly in Kanto map. It's my last new area, I've only extended Kanto limits up to the area before the mansion for do this.


The italian Pokémon Green creator.

Offline

#7 2015-10-24 22:51:42

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 79/193

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Yes please, if can be possible and if can't affect other areas musics.


The italian Pokémon Green creator.

Offline

#8 2015-10-24 23:02:20

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 80/193

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Otherwise if can use KANTO MUSICS for the areas 5F, 60, 61, 62 and 63 that are my new areas. Maybe Game freak have made that start to FAST SHIP returns the JOHTO music 'cause in the fast ship are loaded them, I prefer to leave untouched this, if originally the FAST SHIP area was planned with the JHOTO battle music.

Last edited by Halfshadow (2015-10-24 23:09:05)


The italian Pokémon Green creator.

Offline

#9 2015-10-24 23:13:27

Miksy91
Member
Registered: 2010-10-16
Post 2,198/2,305

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Make a backup of your rom file and try doing this afterwards:

At 0x9296C write "C3 E0 7F 00 00 00 00 00". Make sure the next three bytes following that sequence of 5 '00' bytes are '1E 00 C9' (they should be).

Next, at 0x93FE0 (we're actually pointing here with those E0 7F there), write the following byte sequence:

FE 2E 38 14 FE 57 38 13 FE 5F 38 0C 18 0D 00 00 1E 00 C9 1E 01 C9

The last byte of that sequence (C9) should be then at address 0x93FF5.

That piece of hex code there is a simple asm routine making a few checks and choosing the music accordingly;

if (area-byte < 0x2E) --> use Johto music
if (area-byte < 0x57) --> use Kanto music
if (area-byte < 0x5F) --> use Johto music
else --> use Kanto music

In other words, it tells the game that if the byte telling the area you are on is smaller than 2E (2D = SILVER CAVE), use Johto music. If the area byte is at least 2E (= PALLET TOWN) and smaller than 57 (= VICTORY ROAD) use Kanto music. If area byte is at least 57 and smaller than 5F (= your first new area after FAST SHIP), use Johto music. Else (= area byte at least 58) use Kanto music.

If you check the code out, you can see those 2E, 57 and 5F mentioned there with each one having 'FE' in front of it. That 'FE' byte there is an asm instruction used for comparing a value of register a to the byte following it. After each 'FE xx' pair, there is '38 yy' where 38 tells to jump forward 'yy' bytes in code. After jumping 'yy' bytes forward, there is an asm instruction ''1E zz' following it (where zz is 00 or 01). Instruction '1E zz' loads value of zz into register e. After this the function ends with 'C9' (= kinda like in pksv scripting we have 'end').

So you see, the asm code I wrote is actually REALLY SIMPLE. Reading it in bytes like this is much more confusing than seeing it with an editor that can translate those bytes into instructions that have names - such as 'load' or 'compare'.

But yeah - if you write those bytes in the addresses I gave you it should work out just fine.

Offline

#10 2015-10-25 08:23:47

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 81/193

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Tha game crash. Are you sure that C3E07F was correct? the offset 93FE0 is on the bank 24, maybe is better 24E07F, I've tried in that way, but all trainers and wild pokémon appear with JOHTO music.


The italian Pokémon Green creator.

Offline

#11 2015-10-25 09:29:45

Miksy91
Member
Registered: 2010-10-16
Post 2,199/2,305

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

What I accidentally described wrong is that the remaining part of the code starting with FE 2E 38 14... etc. must be like this instead:

Put this starting at 0x93FE0 like you already have:
FE 2E 38 14 FE 57 38 13 FE 5F 38 0C 18 0D

But instead of leaving just two 00 bytes in between, leave 10 of them.
The 1E 00 C9 1E 01 C9 part should be at 0x93FF8 - 0x93FFD.

So in other words, the rom bank would end like this starting at 0x93FE0:

FE 2E 38 14 FE 57 38 13 FE 5F 38 0C 18 0D 00 00 00 00 00 00 00 00 00 00 1E 00 C9 1E 01 C9 00 00, where 1E 00 C9 1E 01 C9 starts at 0x93FF8.

It doesn't really matter whether you have 00 bytes in between or something else - they're not used in the code at all.

Offline

#12 2015-10-25 10:10:42

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 83/193

Re: A problem with new Kanto areas and musics of wild pokémon and trainers

Ok, thanks, now seems that works fine, also in the ship, in the italian rom too, except that I had to copy the new bytes in another bank 'cause the offset for the music instructions is a the bank 27 in the italian version and if not is in the same bank don't work. Thanks, now is better. Can I ask you another thing please? In Blaine's gym I've added 3 scientists, but in GSC the scientists maybe were only with the Team rocket and then if they see me starts the musics of Team rocket when they see. Is possible change the class music with the music of the Super nerd class that is more appropriate also if the scientists are with Team Rocket? where is the table of the trainers class? I think will be simple fix this detail.


-EDIT- Forget it, fixed, I have found the offset thread and I've fixed it. Thanks a lot.

Last edited by Halfshadow (2015-10-25 11:39:42)


The italian Pokémon Green creator.

Offline

  • Index
  • → Help/Question
  • → A problem with new Kanto areas and musics of wild pokémon and trainers

Board footer

Powered by FluxBB