spasm-ng icon indicating copy to clipboard operation
spasm-ng copied to clipboard

Name field, incorrect behavior

Open Zeda opened this issue 7 years ago • 4 comments

It seems that when trying to compile an app with a minimal (but valid) header, it can trip up the exporter. As an example, my minimal header has a name field of: .db $80,$46, "Batlib This is a valid field-- just the first byte and upper nibble define this field ($80,$4x). However, I get exporter: error SE504: Name field missing. When I change it to $48 and pad the name with two bytes, it compiles just fine.

On a previous build, I forgot to include app signing functionality so I had to manually use rabbitsign in conjunction with spasm and consequently, I did not have this problem. Thanks!

Zeda avatar Jul 10 '18 21:07 Zeda

Somewhat curious... does the original spasm exhibit this sort of behavior? It looks like export.cpp line 267 seems to imply that they really want 8 characters...

That said... according to the magical wiki, the 0x48 that export.cpp looks for can in fact be a 0x43 or some variant of 0x4N (assuming N>0). So because this is a strict assumption for 8 bytes, it will fail.

Did some tweaking to the source, try this branch out and see if it helps! https://github.com/alberthdev/spasm-ng/tree/feature/app-name-var-size

alberthdev avatar Jul 11 '18 04:07 alberthdev

Yes, it works! Thanks a bunch!

Zeda avatar Jul 12 '18 13:07 Zeda

Finally merged, thanks to @tari for the reminder! Sometime later this week if I can remember to do so, I'll make a new spasm-ng release to pick this change up. Leaving this open until said release is made.

alberthdev avatar Jul 26 '20 01:07 alberthdev

Awesome, thanks! I personally appreciate this :)

Zeda avatar Jul 26 '20 01:07 Zeda