ROM padding question

SGDK only sub forum

Moderator: Stef

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

ROM padding question

Post by matteus » Thu Aug 17, 2017 9:04 am

My Sonic Mania FMV ROM is 4,096KB. I removed 10 216x120 images of black from the ROM and the size was still 4,096KB is there any way of knowing what the true size is and how much space I have left? I'd like to try and squeeze a VGM file in if I can :D

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: ROM padding question

Post by Stef » Thu Aug 17, 2017 9:24 am

Using an hexa editor to see how much 0 filled space you have at the end ? :p

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: ROM padding question

Post by matteus » Thu Aug 17, 2017 9:28 am

Stef... really now lol I'm crap at that stuff :D lol okay what hex editor should I use? :)

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: ROM padding question

Post by Stef » Thu Aug 17, 2017 10:12 am

Whatever free hexa editor should do the job, myself i'm using FrHed :)

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: ROM padding question

Post by matteus » Thu Aug 17, 2017 1:39 pm

From Address 003ee4e0 to 00effff0 its nothing but "00"

Staffan
Very interested
Posts: 57
Joined: Wed Jun 14, 2017 2:33 pm

Re: ROM padding question

Post by Staffan » Thu Aug 17, 2017 7:22 pm

Just google "html5 hex editor", and you get a browser version. I used it to reverse engineer the old ansi bbs image protocol. 🙂. You can just drag the file you want to open to your browser.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: ROM padding question

Post by Sik » Thu Aug 17, 2017 8:30 pm

matteus wrote:
Thu Aug 17, 2017 1:39 pm
From Address 003ee4e0 to 00effff0 its nothing but "00"
The end of the ROM should be 003FFFFF =P
Sik is pronounced as "seek", not as "sick".

HardWareMan
Very interested
Posts: 750
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Re: ROM padding question

Post by HardWareMan » Thu Aug 17, 2017 8:40 pm

Sik wrote:
Thu Aug 17, 2017 8:30 pm
matteus wrote:
Thu Aug 17, 2017 1:39 pm
From Address 003ee4e0 to 00effff0 its nothing but "00"
The end of the ROM should be 003FFFFF =P
The ROM windows should be $000000-$3FFFFF, but ROM itself not required to be up to $3FFFFF.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: ROM padding question

Post by Sik » Thu Aug 17, 2017 9:10 pm

It's a padded ROM. And the issue was going up to $EFFFFF which is definitely way beyond ROM area. Something went wrong there.

I'm assuming the actual padding is from $3EE4E0 to $3FFFFF.
Sik is pronounced as "seek", not as "sick".

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: ROM padding question

Post by matteus » Thu Aug 17, 2017 10:05 pm

Sorry TYPO! last address in the ROM file is 003ffff0. I know zero about hex and ROM addresses so feel free to give me a bit of an education in them!

So addresses $3EE80 to $3FFFF0

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: ROM padding question

Post by matteus » Thu Aug 17, 2017 10:13 pm

Okay I was using the HEX editor in Notepad++ which clearly isn't that great! Now download Frhed :)

Manveru
Very interested
Posts: 85
Joined: Wed Sep 05, 2012 3:30 pm

Re: ROM padding question

Post by Manveru » Fri Aug 18, 2017 6:49 am

In the makefile the rom is aligned according to a value.
SGDK size is 128kb: out/rom.bin -sizealign 131072
You can remove that alignment or reduce it to see where you are.
The man who moves a mountain begins by carrying away small stones. Confucius, 551-479 BC

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: ROM padding question

Post by Stef » Fri Aug 18, 2017 11:28 am

ROM padding is here for some reason though, unpadded ROM won't work on some flash cart.

Manveru
Very interested
Posts: 85
Joined: Wed Sep 05, 2012 3:30 pm

Re: ROM padding question

Post by Manveru » Fri Aug 18, 2017 1:58 pm

yeah i know, but is a good way to know the real size of a game rom.
The man who moves a mountain begins by carrying away small stones. Confucius, 551-479 BC

cero
Very interested
Posts: 340
Joined: Mon Nov 30, 2015 1:55 pm

Re: ROM padding question

Post by cero » Fri Aug 18, 2017 5:59 pm

size -t *.o

The totals dec field will be very close to the used ROM size.

Post Reply