Jump to content
IGNORED

Convenient way to monitor the growth/size of my ROM?


gauauu

Recommended Posts

While playing with my first small 2600 project, I'm curious how big my project is, and how fast it's growing (I really have no frame of reference yet about how much I can pack into 2K, 4K, bankswitched 8K, etc).

 

I find that when after compiling with DASM, the output .bin file is always exactly 4K in size. If I load it up in a hex editor or stella debugger, I can scan through and see how much of that 4K I've actually used, but that's rather inconvenient. Is there an easier/more convenient way to track how your rom usage is growing?

 

The best way I thought of so far is to watch the symbol table, and visually scan through to find the symbol with the highest address in my main segment. I could write a simple script to automatically parse that out for me and report my ROM usage, but I didn't want to reinvent the wheel if there's already a standard method that people use to keep track of how much they've used?

 

Thanks!

Link to comment
Share on other sites

;===============================================================================
; free space check before End of Cartridge
;===============================================================================
echo "------", [$FFFA - *]d, "bytes free before End of Cartridge"

;===============================================================================
; Define End of Cartridge
;===============================================================================
ORG $FFFA ; set address to 6507 Interrupt Vectors
.WORD InitSystem ; NMI
.WORD InitSystem ; RESET
.WORD InitSystem ; IRQ
echo commands are output to the terminal (dos prompt if you're using Windows) when you run DASM.
Link to comment
Share on other sites

If you search dasm.txt (which should have come with dasm) for * you'll find only 8 instances of * in the file. The relevant information is:

Symbols:
<snip>
	.	-current program counter (as of the beginning of the
		 instruction).
<snip>
	*	-synonym for ., when not confused as an operator.
Link to comment
Share on other sites

Again, thanks!

 

Before posting, I had searched for the * in what turned out to be an outdated version of the dasm manual, which didn't include that snippet you posted. (Turns out that the first google result for "dasm manual" isn't what I want to be using, I guess!) Time to re-download and hold on to the up-to-date version. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...