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

Apps smaller than 256 bytes are not signed correctly #80

Open
tari opened this issue Jun 12, 2024 · 4 comments
Open

Apps smaller than 256 bytes are not signed correctly #80

tari opened this issue Jun 12, 2024 · 4 comments

Comments

@tari
Copy link
Contributor

tari commented Jun 12, 2024

According to https://www.cemetech.net/forum/viewtopic.php?p=307300#307300, spasm generates incorrect signatures for apps that are smaller than 256 bytes.

@twisted-nematic57
Copy link

twisted-nematic57 commented Jun 13, 2024

It's worth noting that apparently, calculators with boot code <1.10 run such apps with bad signatures just fine.

On an emulated ROM dump of a calculator with boot 1.10 and OS 2.55MP, the app also gets verified and the bad signature is ignored; therefore it seems this issue is only present on physical calculators with boot code 1.10+.

I am unsure if the OS version plays any role in this.

@tari
Copy link
Contributor Author

tari commented Jun 13, 2024

In that case it's not really a bug in this tool, but a calculator bug. It would be nice to generate a warning in that case, to inform users that a small app may not work on all calculators.

@twisted-nematic57
Copy link

twisted-nematic57 commented Jun 13, 2024

I guess that would be sufficient as it would have saved me my headache.

"Warning: App size is <256B, please consider padding to ensure compatibility with all calculators"

@bxparks
Copy link

bxparks commented Jun 20, 2024

I reviewed my notes on spasm-ng problems, and I had misremembered the problem. I thought that spasm was barfing on flash pages < 256 bytes. It turns out that it was printing spurious warnings when the last flash page is < 1024. I filed a separate ticket for that problem in #81.

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

3 participants