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

s3p2bin overlapping regions #32

Open
Awuwunya opened this issue Aug 27, 2020 · 5 comments
Open

s3p2bin overlapping regions #32

Awuwunya opened this issue Aug 27, 2020 · 5 comments

Comments

@Awuwunya
Copy link
Contributor

There seems to be strange issues with custom sound drivers. I am not sure on the specifics, but s3p2bin complains about overlapping regions, despite there actually being none. It seems that either some padding or the z80 init driver causes that kind of a problem. I think this used to be a problem with s2p2bin earlier too, but with some updates to s2disasm it was fixed. In fact, s2p2bin will still work with assembling this custom sound driver. I think there is some code in s2p2bin to work around this issue, but this code seems to not be present in s3p2bin. I am not familiar with the code for either of them, so someone who is, may they be able to look into this? I can provide files that caused that issue.

@flamewing
Copy link
Member

The overlapping regions message actually cannot be printed with the sound driver segments; it refers to the next non-z80 segment after. This can be either the (empty) one created in-between the two halves, or the one after the second part.

The code that prints that warning seems to be identical in both, except that it is not printed if !lastSegmentCompressed in s2p2bin, but is on s3p2bin.

It does seem like s3p2bin has a bug in that it uses lastLength instead of length to check if the compressed z80 segments will fit; this could be the root cause. Do you have an example sound driver I could test with?

@Awuwunya
Copy link
Contributor Author

I was using Dual PCM, practically in the same way as AMPS in Sonic 2 does it. I could also verify its still broken currently, and send it to you, if you can't recreate it.

@flamewing
Copy link
Member

flamewing commented Aug 30, 2020

If you have something that integrates it already, can you try with this version? (virus total)

@Awuwunya
Copy link
Contributor Author

Awuwunya commented Sep 4, 2020

Well it... builds? It seems to somehow break the kosinski compression in the ROM though and well, the ROM won't work. It complains about overlapping allocations in the commandline too.

@Clownacy
Copy link
Member

Clownacy commented Sep 2, 2023

Has this been fixed by the recent p2bin overhaul?

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