Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name field, incorrect behavior #53

Open
Zeda opened this issue Jul 10, 2018 · 4 comments
Open

Name field, incorrect behavior #53

Zeda opened this issue Jul 10, 2018 · 4 comments

Comments

@Zeda
Copy link

Zeda commented Jul 10, 2018

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!

@alberthdev
Copy link
Owner

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

@Zeda
Copy link
Author

Zeda commented Jul 12, 2018

Yes, it works! Thanks a bunch!

NonstickAtom785 added a commit to NonstickAtom785/spasm-ng that referenced this issue Jan 24, 2020
Tentative fix for issue alberthdev#53 - allow variable length app names
@alberthdev
Copy link
Owner

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.

@Zeda
Copy link
Author

Zeda commented Jul 26, 2020

Awesome, thanks! I personally appreciate this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants