’Cause all games were better on the GBC

You are not logged in.

#1 2019-04-06 22:55:50

New member
From: Funny Land
Registered: 2019-04-05
Post 1/6

Modified ROM crashes after intro

(This was copy-and-pasted from an issue from the pokecrystal Github after two days without a response, if it seems formatted weird that's why)

I'm gonna be honest, despite my last issue, I don't really know a whole lot about debugging. I'm also new to Pokemon hacking in general; what I'm creating right now is my first Pokemon hack that does something other then changing the graphics and text.

To start off the hack I modified four maps and changed their tilesets a bit, though I did not change any of the events in the maps, only the warp events. After changing the warp events in them to link them together, I built the rom successfully with no errors. All went well until after the Oak intro played, at which point the game froze. Upon launching BGB's debugger and enabling animate, I found that the debugger loops between the lines  `Init.wait: (0142)` and `00:01A6` in an endless loop while the game is frozen. Again, I don't know much about debugging so I'm not sure what I've done wrong here or what's happening. Attached to this post is a patch I created of the compiled ROM, made with Lipx, along with the .blk and .asm files for the maps I modified; I also modified their tilesets, but I don't consider that too important since it's unlikely they're causing anything.

Addition: here's the output of "git diff" which was also attached to the post:

Last edited by IoI_xD (2019-04-06 23:41:44)


#2 2019-04-07 17:18:43

Danny-E 33
Registered: 2012-06-09
Post 1,134/1,205

Re: Modified ROM crashes after intro

The only obvious mistake I can find in your diff is you forgot to correct the number of warps in the maps you edited.

For example, in maps/NewBarkTown.asm:

db 4 ; warp events
-    warp_event  6,  3, ELMS_LAB, 1
-    warp_event 13,  5, PLAYERS_HOUSE_1F, 1
-    warp_event  3, 11, PLAYERS_NEIGHBORS_HOUSE, 1
-    warp_event 11, 13, ELMS_HOUSE, 1
+    warp_event  10,  0, VIRIDIAN_CITY, 3
+    warp_event  6,  0, VIRIDIAN_CITY, 3
+    warp_event  7,  0, SAFFRON_CITY, 2
+    warp_event  8,  0, SAFFRON_CITY, 2
+    warp_event  9,  0, SAFFRON_CITY, 2
+    warp_event  10,  0, SAFFRON_CITY, 2
+    warp_event  11,  0, SAFFRON_CITY, 2
+    warp_event  12,  0, SAFFRON_CITY, 2
+    warp_event  13,  0, SAFFRON_CITY, 2

You changed the number of warps from 4 to 9, but didn't update the first line that declares the number of warps.

You also need to fix maps/PlayersHouse2F.asm, maps/SaffronCity.asm, and maps/ViridianCity.asm


#3 2019-04-08 02:53:09

New member
From: Funny Land
Registered: 2019-04-05
Post 4/6

Re: Modified ROM crashes after intro

Danny-E 33 wrote:

you forgot to correct the number of warps in the maps you edited.

That was the problem. Thanks!


Board footer

Powered by FluxBB