Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: Grate_Oracle_Lewot on May 22, 2022, 07:15:08 PM

Title: pokecrystal build errors: "xor_a" and "xor_a_dec_a" not recognized
Post by: Grate_Oracle_Lewot on May 22, 2022, 07:15:08 PM
Trying to build a pokecrystal-based hack (https://github.com/hannabartpekopon/GrateCrystal) with Cygwin, and getting this:

error: main.asm(494) -> mobile/mobile_40.asm(1772): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(187): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(184): Unknown symbol "xor_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(175): Unknown symbol "xor_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(170): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(167): Unknown symbol "xor_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(161): Unknown symbol "xor_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(153): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(150): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(142): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(139): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(131): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(120): Unknown symbol "xor_a_dec_a"
error: main.asm(110) -> engine/menus/scrolling_menu.asm(114): Unknown symbol "xor_a_dec_a"


Looking at enginge/menus/scrolling_menu.asm (https://github.com/hannabartpekopon/GrateCrystal/blob/master/engine/menus/scrolling_menu.asm), I can see that the last commit is from December 2020, before I forked from the base pret/pokecrystal. So obviously I didn't do anything to mess with this stuff. I tried running "make clean", which I've been told helps to reveal the real source of errors, but it just ends with this:

find gfx \
     \( -name "*.[12]bpp" \
        -o -name "*.lz" \
        -o -name "*.gbcpal" \
        -o -name "*.sgb.tilemap" \) \
     -delete
find gfx/pokemon -mindepth 1 \
     ! -path "gfx/pokemon/unown/*" \
     \( -name "bitmask.asm" \
        -o -name "frames.asm" \
        -o -name "front.animated.tilemap" \
        -o -name "front.dimensions" \) \
     -delete


Something about Unown's graphics? It doesn't really indicate an actual problem.

I really have no idea what's going on here. Seems like I somehow must've deleted something that defined "xor_a" and "xor_a_dec_a", but I don't know what that would've been. Is anybody familiar with this?
Title: Re: pokecrystal build errors: "xor_a" and "xor_a_dec_a" not recognized
Post by: KingMike on May 23, 2022, 01:46:12 AM
It looks pretty likely that code like

jp z, xor_a_dec_a

Should branch to a nearby code labeled "xor_a_dec_a".
But there doesn't seem to be a label for that.

Unless I'm wrong in thinking a Z80 conditional jump (aka branch in other architectures) can only jump the usual -127 to +128 for 8-bit CPUs?
Title: Re: pokecrystal build errors: "xor_a" and "xor_a_dec_a" not recognized
Post by: Grate_Oracle_Lewot on May 23, 2022, 08:56:42 PM
Never mind, looks like I accidentally deleted their definitions under home/flag.asm (https://github.com/hannabartpekopon/GrateCrystal/blob/master/home/flag.asm). Well, I say accidentally, but I have no memory of doing it. Still, it's on me. :huh: