Hi all!
First time poster, long time user here! (hopefully this is the right board for this)
Over the past few years I've been working on a very size-constrained game for TI83 using z88dk.
Wanting to make my game fit in under 8KB, I've had to do a lot of extreme size optimisations (which I might make a post about some other time). So I've had to spend a lot of time chasing bytes wherever possible and .map files helped a ton with this.
The one problem was that map files were hard to work with. I tried to see if someone had already made a tool to read them online but came up empty handed. So for lack of a better option I used to load .map files into Libreoffice Calc and (with a bit of effort) squeeze symbol sizes out of it which i would then reorder to find what functions needed to be optimised first. But as you can guess this got repetitive and tiring very fast, so after a while I ended up writing a little python3 script to do that for me!
I figured that some of you could also make use of it so I made an account here, if all goes well the script should be attached to this post
It's not exactly perfect but it was good enough for me so here's hoping it'll be good enough for you haha
To execute it, just run "python3 analyseSymbols.py <file>.map (> output.txt)".
The output.txt pipe is optional, I personally like to pipe the output into a file so i can read it more comfortably in my IDE.
Enjoy!
-Tara Colin (Targz)
Map file stats
Map file stats
You do not have the required permissions to view the files attached to this post.
Re: Map file stats
I've just had a chance to run the script - there's some interesting ways of viewing the data and makes me think of ways to make classification easier.
Your optimisation tricks would be really interesting read as well so I'm looking forward to that post.
Your optimisation tricks would be really interesting read as well so I'm looking forward to that post.
Re: Map file stats
hi,
I think that everyone who we have started a serious project with z88dk has needed some kind of tool to organize the info contained in the map files. Something similar happens about converting image files into sp1 data.
This is the mine https://github.com/fraespre/zmemmap
It's a command line program made in JS. The input is a z88dk map file, and it generates an Excel (xml).
Happy if it's useful to someone else.
I think that everyone who we have started a serious project with z88dk has needed some kind of tool to organize the info contained in the map files. Something similar happens about converting image files into sp1 data.
This is the mine https://github.com/fraespre/zmemmap
It's a command line program made in JS. The input is a z88dk map file, and it generates an Excel (xml).
Happy if it's useful to someone else.
Re: Map file stats
[ I hope you don't mind, Tara. I'm taking advantage of your thread to also share mine as well ]