Comments (2)
This is an interesting issue since technically this is by design. When Asar allocates the ROM it allocates the full 16MB region and all unused regions are 00s. This happens before even a single line of ASM is parsed, so there isn't a way to control this from the ASM level.
There are two possible solutions here:
- CLI flag for the uninitialized byte
- When ROM expansion is handled use the pad byte to reset the memory between the current romlen and future romlen.
Option 1 will in general lead to consistent results, where option 2 allows for different expansion regions to have different padding bytes. Option 2 could lead to unexpected situations where freespace is "lost" due to unexpected padding and other tools having more rigid definitions of what free space is. Option 2 also has a side effect that org based writes will not update anything in between to the pad byte.
memset(const_cast<unsigned char*>(romdata)+romlen, 0x00, (size_t)(16*1024*1024-romlen));
Thats the source of the issue, this is called in openrom.
There isn't really a great work around for this in the meantime.
from asar.
A command line option would work well for my use case. It could even use the same value as the default for when the freespace byte isn't specified in the command.
from asar.
Related Issues (20)
- Namescaped incsrc
- Patching to multiple ROMS/files at once
- A command to push/pull/reset all global state
- How to calculate string size? HOT 4
- INC with "non-static" label HOT 9
- Bugs that only troublemakers will find HOT 3
- petition to ban if+endwhile HOT 1
- Segfault on asar_patch when using as a static library HOT 1
- relative branch out of bounds is not checked for SPC700 bbs/bbc commands HOT 1
- `optimize address mirrors` does not handle bank 7E optimization like `ram` does
- org Label in freespace yields too small rats tags HOT 1
- datasize fails when used in assert or print before label is defined HOT 6
- Allow branches to take full addresses HOT 4
- asar_getlabelval throws C++ exception for missing label
- Please document deprecation of features HOT 4
- Segfault with invalid syntax in an assert HOT 2
- defining a label on the same line as an `if` statement is sometimes broken HOT 3
- allow math in labels HOT 15
- arch superfx is haunted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asar.