Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2019-07-09 00:06:19

Revontuli
New member
Registered: 2019-07-08
Posts: 2

Best ways to check how much ROM you've used? (GBDK in particular)

I'm porting a game of mine to the Gameboy, and am curious as to the best ways to keep track of how big the compiled code is before being turning into the filled, completed ROM.  I'm hoping to fit the game into 32K - it originally was in that ballpark previously, but I'd also like keep track of how much space each particular section of code takes.

I'm currently using GBDK (I realize it has its problems, but I'm much more familiar with C, the game itself is relatively simple, and I've already implemented it on other retro platforms) - I'd be grateful for any tips or suggestions on keeping track of how much ROM I'm using/have left.

Thanks in advance!

Offline

 

#2 2019-07-09 03:04:22

Robbi_Blechdose
Member
Registered: 2017-12-10
Posts: 29

Re: Best ways to check how much ROM you've used? (GBDK in particular)

While it isn't per-section, this small tool by PinoBatch checks how much free space you have in your ROM (provided you use the correct fill value): https://github.com/pinobatch/240p-test- … /unused.py

Offline

 

#3 2019-07-09 14:34:37

DonaldHays
Member
From: Seattle
Registered: 2016-08-01
Posts: 36
Website

Re: Best ways to check how much ROM you've used? (GBDK in particular)

I'm using a more modern version of SDCC, so this might not apply to the version used in GBDK, but one of the build artifacts I get out of the compile process is a .map file. It's a text file, and you can look through the file to see information about the game, including the size of areas of your game, including ROM and RAM.

Offline

 

#4 2019-07-13 20:46:50

Revontuli
New member
Registered: 2019-07-08
Posts: 2

Re: Best ways to check how much ROM you've used? (GBDK in particular)

Thanks for the advice - with some of the tools, and looking at the .map file, I might have a better idea of how much space I'll have as I continue to translate my code.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson