rgbds
rgbds copied to clipboard
Two proposals for .map files
- Have a flag to omit outputting individual symbol names. This information is already available in the .sym file, and leaving it out would make it easier to see the section placements.
- Have a flag to output distinct chunks of slack space, instead of the total per bank. For example, compare this:
SRAM bank #0:
SECTION: $a000-$a55b ($055c bytes) ["PokeDB bank 1B"]
SECTION: $a55c-$a5c7 ($006c bytes) ["Link Battle Data"]
SECTION: $a5c8-$a5e8 ($0021 bytes) ["SRAM Battle Tower"]
SECTION: $a600-$abe1 ($05e2 bytes) ["SRAM Mail"]
SECTION: $abe2-$abf0 ($000f bytes) ["SRAM Bank 0"]
SECTION: $abf1-$b14c ($055c bytes) ["PokeDB bank 2B"]
SECTION: $b200-$bf0f ($0d10 bytes) ["Backup Save"]
SLACK: $01ba bytes
with this:
SRAM bank #0:
SECTION: $a000-$a55b ($055c bytes) ["PokeDB bank 1B"]
SECTION: $a55c-$a5c7 ($006c bytes) ["Link Battle Data"]
SECTION: $a5c8-$a5e8 ($0021 bytes) ["SRAM Battle Tower"]
SLACK: $0017 bytes
SECTION: $a600-$abe1 ($05e2 bytes) ["SRAM Mail"]
SECTION: $abe2-$abf0 ($000f bytes) ["SRAM Bank 0"]
SECTION: $abf1-$b14c ($055c bytes) ["PokeDB bank 2B"]
SLACK: $00b3 bytes
SECTION: $b200-$bf0f ($0d10 bytes) ["Backup Save"]
SLACK: $00f0 bytes
For slack vs. gaps, why not combine both?
SRAM bank #0:
SECTION: $a000-$a55b ($055c bytes) ["PokeDB bank 1B"]
SECTION: $a55c-$a5c7 ($006c bytes) ["Link Battle Data"]
SECTION: $a5c8-$a5e8 ($0021 bytes) ["SRAM Battle Tower"]
EMPTY: $a5e9-$a5ff ($0017 bytes)
SECTION: $a600-$abe1 ($05e2 bytes) ["SRAM Mail"]
SECTION: $abe2-$abf0 ($000f bytes) ["SRAM Bank 0"]
SECTION: $abf1-$b14c ($055c bytes) ["PokeDB bank 2B"]
EMPTY: $b14d-$b1ff ($00b3 bytes)
SECTION: $b200-$bf0f ($0d10 bytes) ["Backup Save"]
EMPTY: $b210-$bfff ($00f0 bytes)
SLACK: $01ba bytes
Bonus: with that change we can redefine the request as a single option that describes what components to output in a map file (sections, symbols, empty space, slack totals, whatever else we can come up with) that defaults to sections + symbols + slack.
As long as the individual and total unused space lines start with different text, as you did with EMPTY and SLACK, I'd be okay with that too.
How would you get empty space at the end of a bank?
The same way we get slack space to include space at the end of a bank, just not counting any prior chunks of empty space in-between sections.
No, I mean, if slack is unused space at the end of a bank, how do you get empty space at the end of a bank? Or is it supposed to stay a total, vs. EMPTY indicating the detail?
Right now SLACK is reported as maxsize[type] - used. Conceivably, this would track an empty total as well as used, and report SLACK as maxsize[type] - used - empty. Then EMPTY would be reported and empty would be incremented each time it advances to a next section whose start address is ahead of the previous section's end address.
What is EMPTY, though?
EMPTY is the portion of space currently reported as SLACK which exists between SECTIONs.
SECTION "A", ROM0[$0000]
ds $2000
SECTION "B", ROM0[$2800]
ds $1000
There are $1000 bytes of SLACK in ROM0, with $800 of them as EMPTY between "A" and "B", and $800 at the end of the bank.
ROM0 bank #0:
SECTION: $0000-$1fff ($2000 bytes) ["A"]
EMPTY: $2000-$27ff ($0800 bytes)
SECTION: $2800-$37ff ($1000 bytes) ["B"]
EMPTY: $3800-$3fff ($0800 bytes)
SLACK: $1000 bytes
There isn't a difference between empty space between sections or at the end, so having EMPTY be a break-down of empty space while keeping SLACK as a total is both more consistent and imo more useful.
There isn't a difference between empty space between sections or at the end, so having
EMPTYbe a break-down of empty space while keepingSLACKas a total is both more consistent and imo more useful.
I think we're all agreeing on this. :)