Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → Crystal: Game Crashes If Change Text in main.asm or common texts .asm

#1 2015-01-31 21:53:38

walk_away21
Member
Registered: 2014-02-20
Post 51/69

Crystal: Game Crashes If Change Text in main.asm or common texts .asm

I'm using the Crystal Complete disassembly.

Anytime I try to change the intro text (in text/common_x.asm) or any text in main.asm (just decapitalizing things in the menu options) the game crashes. If I change common_x.asm the game crashes to a white screen when I click New Game. When I change main.asm the game crashes once the Unown intro part ends. In main, I have edited the in game trades and I added code to allow the updated Growth move code to work. I have tested both of these changes and they work fine. Once I changed menu options (such as decapitalizing NEW GAME on the main menu, or PACK on the in game menu screen) the game started this crashing. The rom compiles fine with no errors so I am not sure what is going on. Anyone know how to fix this crashing?

Last edited by walk_away21 (2015-02-04 19:00:59)

Offline

#2 2015-02-04 19:01:35

walk_away21
Member
Registered: 2014-02-20
Post 53/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Hate to bump but anyone know what could be the problem? If I had accidentally messed up some core syntax or something wouldn't the rom not compile due to an error?

Offline

#3 2015-02-04 22:35:46

comet
Member
Registered: 2012-04-09
Post 518/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

walk_away21 wrote:

I'm using the Crystal Complete disassembly.

There's your problem.

CrystalComplete is pretty outdated. Since it ended up being a music player it hasn't been merged with pokecrystal in a while.

Offline

#4 2015-02-04 22:36:50

comet
Member
Registered: 2012-04-09
Post 519/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Also nothing wrong with bumping or double posting.

Offline

#5 2015-02-05 05:31:48

walk_away21
Member
Registered: 2014-02-20
Post 54/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Ah crap. I'm pretty far in my hack. Could I just change out the main / commons of Crystal Complete with the Pokecrystal ones? Would that work? Also just curious, what is new in the Pokecrystal one? Isn't it already disassembled?

Offline

#6 2015-02-05 06:30:50

comet
Member
Registered: 2012-04-09
Post 520/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

It helps to know what change actually caused the problem. It probably doesn't have anything to do with text/common, so my best guess is you've changed the length of the name of one of the menu options, shifting everything in the rest of the bank. Since there are still parts not disassembled in full, they contain static references that don't realize there was a shift, and happily jump to the original address, and crash trying to execute garbage.

If you've shortened a name, great! Just pad it back to its original length.

If you've made one longer, just move MainMenuText to the end of the bank (and put padding where the old one used to be, i.e. "ds $49d60 - $49d24").

Last edited by comet (2015-02-05 06:31:07)

Offline

#7 2015-02-05 15:43:49

walk_away21
Member
Registered: 2014-02-20
Post 55/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Ah ok thanks. In Main I did add a couple Growth lines of code you helped with but I think that is pushed to a new bank already and the game was working with that code added. Otherwise, recently I only decapitalized a lot but maybe changing the starting name options might have screwed something up.

Offline

#8 2015-02-06 02:58:39

walk_away21
Member
Registered: 2014-02-20
Post 56/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

So I replaced the common texts with clean ones just to try my changes in main. I temp edited all name changes to take up the same characters as the originals and yet I still can't load the main menu. I ran a diff of my main with a clean main. The results are in the link below. Hopefully someone can help.

http://pastebin.com/LDrxHa65

Offline

#9 2015-02-06 03:53:22

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,969/3,474

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Well I can see a few places where you have unintentionally made strings longer.

You see, the "#" in some of those strings was the "POKé" character. By replacing that single-byte with "Poke" you have of course added an extra 3 bytes to the code length every time you did it. What you should have done was decapitalize the rest of the string following the "#" and then find the entry that defines "#" as "POKé" and change it to "Poké" instead. That's probably part of the problem, if not all of it.

Last edited by Mateo (2015-02-06 03:54:01)

Offline

#10 2015-02-06 04:30:11

walk_away21
Member
Registered: 2014-02-20
Post 57/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Mateo wrote:

Well I can see a few places where you have unintentionally made strings longer.

You see, the "#" in some of those strings was the "POKé" character. By replacing that single-byte with "Poke" you have of course added an extra 3 bytes to the code length every time you did it. What you should have done was decapitalize the rest of the string following the "#" and then find the entry that defines "#" as "POKé" and change it to "Poké" instead. That's probably part of the problem, if not all of it.

Ahh, I just assumed that # was created as a shortcut with the accent and didn't compress it down to 1 byte. Thanks for the reply. I'll test when I get the chance.

Offline

#11 2015-02-06 05:09:45

comet
Member
Registered: 2012-04-09
Post 521/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

also

91118c91118
<       db $0, "Od Egg", $4f
---
>       db $0, "ODD EGG", $4f

Offline

#12 2015-02-06 05:11:52

walk_away21
Member
Registered: 2014-02-20
Post 58/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Thanks. Do you happen to know where # is defined to mean "POKé"? I've been searching through the # in most files but if someone knows that would be a big time saver.

Offline

#13 2015-02-06 05:13:17

comet
Member
Registered: 2012-04-09
Post 522/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

I don't think "#" has been used in place of the compared value (it ought to). It's in home/text.asm.

Offline

#14 2015-02-06 05:19:19

walk_away21
Member
Registered: 2014-02-20
Post 59/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

It's lowercase here but not in game.

Char54Text:: ; 1288
db "Poké@"

Do I need to change one of these?

Char4AText:: ; 129c
db $e1, $e2, "@" ; PK MN
Char24Text:: ; 129f
db $70, $71, "@" ; PO KE

Offline

#15 2015-02-06 07:39:50

comet
Member
Registered: 2012-04-09
Post 523/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

walk_away21 wrote:

It's lowercase here but not in game.

are you sure

Offline

#16 2015-02-06 14:09:34

walk_away21
Member
Registered: 2014-02-20
Post 60/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

comet wrote:
walk_away21 wrote:

It's lowercase here but not in game.

are you sure

Yeah. I checked a couple Youtube vids to make sure. Like this one.

https://www.youtube.com/watch?v=9mVTjGfyEnw


EDIT: I just went through main and changed back my Poke to # and they show up as Poké in the game and it runs now. Whoever did the disassembly or maybe just Crystal Complete must have already made that lower case and I hadn't noticed since they didn't make anything lower case. Odd but it works now!

Last edited by walk_away21 (2015-02-06 14:17:41)

Offline

#17 2015-02-06 18:03:52

walk_away21
Member
Registered: 2014-02-20
Post 61/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Ok now I can play fine up until your mom gives you the Pokegear. When you set the day and time it crashes to the "This game is designed for a GameBoy Color" screen.

Offline

#18 2015-02-13 22:28:04

walk_away21
Member
Registered: 2014-02-20
Post 62/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

walk_away21 wrote:

Ok now I can play fine up until your mom gives you the Pokegear. When you set the day and time it crashes after asking if it is Daylight Savings to the "This game is designed for a GameBoy Color" screen.

Have some time to continue on game this weekend but this issue is still happening. I changed back most of the Poke to #, and I can see the next line of text start to scroll when the game resets. Is there an issue I'm missing here?

Offline

#19 2015-02-14 02:14:59

comet
Member
Registered: 2012-04-09
Post 527/674

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Tough to know. Another diff would help.

What features exactly drew you to CrystalComplete?

Offline

#20 2015-02-14 15:22:29

walk_away21
Member
Registered: 2014-02-20
Post 63/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

I used it for the physical / special split.

Offline

#21 2015-02-14 17:15:21

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,974/3,474

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

walk_away21 wrote:

I used it for the physical / special split.

Physical/Special split is actually a lot simpler than you think. The most tedious part in making it from scratch is defining each move as physical or special. I don't have the code for Crystal handy, but I could show you how I did it in Red if you had been hacking that. Shouldn't be hard to track down that routine in CrystalComplete and port it to normal Pokecrystal though.

Offline

#22 2015-11-12 21:13:35

walk_away21
Member
Registered: 2014-02-20
Post 64/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

diff RealKriss.asm FakeKriss.asm
243,244c243,244
<     db "neighbor, PROF.", $51
<     db "ELM, was looking", $4f
---
>     db "neighbor, Prof.", $51
>     db "Elm, was looking", $4f
250,251c250,251
<     db "got! Your #MON", $51
<     db "GEAR is back from", $4f
---
>     db "got! Your #mon-", $51
>     db "Gear is back from", $4f
257,258c257,258
<     db $0, "#MON GEAR, or", $4f
<     db "just #GEAR.", $51
---
>     db $0, "#mon Gear, or", $4f
>     db "just #Gear.", $51
280c280
<     db "the PHONE?", $57
---
>     db "the Phone?", $57
285c285
<     db "turn the #GEAR", $51
---
>     db "turn the #Gear", $51
287c287
<     db "PHONE icon?", $57
---
>     db "Phone icon?", $57
293c293
<     db "Turn the #GEAR", $4f
---
>     db "Turn the #Gear", $4f
295c295
<     db "PHONE icon.", $57
---
>     db "Phone icon.", $57
308c308
<     db $0, "PROF.ELM is wait-", $4f
---
>     db $0, "Prof.Elm is wait-", $4f
314,315c314,315
<     db $0, "So, what was PROF.", $4f
<     db "ELM's errand?", $51
---
>     db $0, "So, what was Prof.", $4f
>     db "Elm's errand?", $51
352,353c352,353
<     db "becoming PROF.", $4f
<     db "ELM's assistant.", $51
---
>     db "becoming Prof.", $4f
>     db "Elm's assistant.", $51
355c355
<     db "#MON!", $57
---
>     db "#mon!", $57
360,361c360,361
<     db "CINNABAR VOLCANO", $4f
<     db "BURGER!", $57
---
>     db "Cinnabar Volcano", $4f
>     db "Burger!", $57
373,374c373,374
<     db "FRESH WATER and", $4f
<     db "tasty LEMONADE!", $57
---
>     db "Fresh Water and", $4f
>     db "tasty Lemonade!", $57
378,383c378,383
<     db $0, "There's a movie on", $4f
<     db "TV: Stars dot the", $51
<     db "sky as two boys", $4f
<     db "ride on a train…", $51
<     db "I'd better get", $4f
<     db "rolling too!", $57
---
>     db $0, "There's a show on", $4f
>     db "TV: Olivia Pope", $51
>     db "must hide her", $4f
>     db "affair with the", $51
>     db "President while", $4f
>     db "on his staff!", $57

So I'm assuming the game is crashing because it is giving me the PokeGear in another file and something is screwed up in that routine?

Offline

#23 2015-11-13 03:05:40

walk_away21
Member
Registered: 2014-02-20
Post 65/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Ok I just replaced KrissHouse1F.asm with a clean file and now it doesn't crash when you set the time (it prints out 10 am or whatever time you picked), but it freezes (the music continues though). Not sure what is going on.

Offline

#24 2015-11-16 03:45:30

walk_away21
Member
Registered: 2014-02-20
Post 67/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

walk_away21 wrote:
diff RealKriss.asm FakeKriss.asm
243,244c243,244
<     db "neighbor, PROF.", $51
<     db "ELM, was looking", $4f
---
>     db "neighbor, Prof.", $51
>     db "Elm, was looking", $4f
250,251c250,251
<     db "got! Your #MON", $51
<     db "GEAR is back from", $4f
---
>     db "got! Your #mon-", $51
>     db "Gear is back from", $4f
257,258c257,258
<     db $0, "#MON GEAR, or", $4f
<     db "just #GEAR.", $51
---
>     db $0, "#mon Gear, or", $4f
>     db "just #Gear.", $51
280c280
<     db "the PHONE?", $57
---
>     db "the Phone?", $57
285c285
<     db "turn the #GEAR", $51
---
>     db "turn the #Gear", $51
287c287
<     db "PHONE icon?", $57
---
>     db "Phone icon?", $57
293c293
<     db "Turn the #GEAR", $4f
---
>     db "Turn the #Gear", $4f
295c295
<     db "PHONE icon.", $57
---
>     db "Phone icon.", $57
308c308
<     db $0, "PROF.ELM is wait-", $4f
---
>     db $0, "Prof.Elm is wait-", $4f
314,315c314,315
<     db $0, "So, what was PROF.", $4f
<     db "ELM's errand?", $51
---
>     db $0, "So, what was Prof.", $4f
>     db "Elm's errand?", $51
352,353c352,353
<     db "becoming PROF.", $4f
<     db "ELM's assistant.", $51
---
>     db "becoming Prof.", $4f
>     db "Elm's assistant.", $51
355c355
<     db "#MON!", $57
---
>     db "#mon!", $57
360,361c360,361
<     db "CINNABAR VOLCANO", $4f
<     db "BURGER!", $57
---
>     db "Cinnabar Volcano", $4f
>     db "Burger!", $57
373,374c373,374
<     db "FRESH WATER and", $4f
<     db "tasty LEMONADE!", $57
---
>     db "Fresh Water and", $4f
>     db "tasty Lemonade!", $57
378,383c378,383
<     db $0, "There's a movie on", $4f
<     db "TV: Stars dot the", $51
<     db "sky as two boys", $4f
<     db "ride on a train…", $51
<     db "I'd better get", $4f
<     db "rolling too!", $57
---
>     db $0, "There's a show on", $4f
>     db "TV: Olivia Pope", $51
>     db "must hide her", $4f
>     db "affair with the", $51
>     db "President while", $4f
>     db "on his staff!", $57

So I'm assuming the game is crashing because it is giving me the PokeGear in another file and something is screwed up in that routine?

Comet hears that diff you requested.

Offline

#25 2015-12-01 02:34:23

walk_away21
Member
Registered: 2014-02-20
Post 68/69

Re: Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Anyone able to help out? Is it because I added level up moves or something similar and the banks are getting misplaced? I have been keeping edited text to the same amount as before but I did add moves to movesets.

Offline

  • Index
  • → Help/Question
  • → Crystal: Game Crashes If Change Text in main.asm or common texts .asm

Board footer

Powered by FluxBB