...Jack, are you trying to create a somewhat-less-broken Asar Anti?
If yes, keep in mind these traps:
- autoclean writes data
- Patches could read3 whether they're inserted already, and if so, skip some steps (or even throw errors)
- Negative distance in skip
But it should be good enough for all plausible patches.
Well, $020000 to $021FFF is RAM, so I think we can safely assume it's not patched. $41E000 to $421FFF would be a better example.
Asar considers it an error to cross banks, so if you want it merged, you'd have to add code to merge it. And that's a waste of time.
Some of the SPC700 modes make the org command become base and take 16bit addresses. But there's a fairly easily found if statement in there, so you can just put that in the else clause and ignore the org-but-actually-bases.
I know Asar miscounts forward references - but only if it's LDA Table,x. I don't think BEQ would be miscounted.
And I thought it set the RATS tag size correctly, it just skips some actually-small-enough holes sometimes (so reinserting an unchanged patch would generally move it).
I don't think you can fix fhat one without adding a fourth pass, and that would be impopular.
How aout if there's some random shit appended to the ROM where you need the full norom 16MB range, but the first megabytes are lorom and you want Asar's native lorom handler? I think smkdan's lunar.sfc does that.
But lunar.sfc is 64MB, so Asar won't help anyways.
<blm> zsnes users are the flatearthers of emulation
If yes, keep in mind these traps:
- autoclean writes data
- Patches could read3 whether they're inserted already, and if so, skip some steps (or even throw errors)
- Negative distance in skip
But it should be good enough for all plausible patches.
Originally posted by RPG Hacker
Like, if some code or data goes from $01E000 to $01FFFF and some other code or data goes from $020000 to $021FFF
Well, $020000 to $021FFF is RAM, so I think we can safely assume it's not patched. $41E000 to $421FFF would be a better example.
Asar considers it an error to cross banks, so if you want it merged, you'd have to add code to merge it. And that's a waste of time.
Quote
or can other things (like switching architectures) affect the mapping mode as well?
Some of the SPC700 modes make the org command become base and take 16bit addresses. But there's a fairly easily found if statement in there, so you can just put that in the else clause and ignore the org-but-actually-bases.
Quote
Not really all that important, but asar has a bug where it treats forward jumps as +1 byte when calculating the RATS size.
I know Asar miscounts forward references - but only if it's LDA Table,x. I don't think BEQ would be miscounted.
And I thought it set the RATS tag size correctly, it just skips some actually-small-enough holes sometimes (so reinserting an unchanged patch would generally move it).
I don't think you can fix fhat one without adding a fourth pass, and that would be impopular.
Quote
changing the mapping mode multiple times or mid-ROM doesn't make much sense and can safely be treated as an error, right?
How aout if there's some random shit appended to the ROM where you need the full norom 16MB range, but the first megabytes are lorom and you want Asar's native lorom handler? I think smkdan's lunar.sfc does that.
But lunar.sfc is 64MB, so Asar won't help anyways.
<blm> zsnes users are the flatearthers of emulation