Page 1 of 2

ROM padding question

Posted: Thu Aug 17, 2017 9:04 am
by matteus
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

Re: ROM padding question

Posted: Thu Aug 17, 2017 9:24 am
by Stef
Using an hexa editor to see how much 0 filled space you have at the end ? :p

Re: ROM padding question

Posted: Thu Aug 17, 2017 9:28 am
by matteus
Stef... really now lol I'm crap at that stuff :D lol okay what hex editor should I use? :)

Re: ROM padding question

Posted: Thu Aug 17, 2017 10:12 am
by Stef
Whatever free hexa editor should do the job, myself i'm using FrHed :)

Re: ROM padding question

Posted: Thu Aug 17, 2017 1:39 pm
by matteus
From Address 003ee4e0 to 00effff0 its nothing but "00"

Re: ROM padding question

Posted: Thu Aug 17, 2017 7:22 pm
by Staffan
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.

Re: ROM padding question

Posted: Thu Aug 17, 2017 8:30 pm
by Sik
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

Re: ROM padding question

Posted: Thu Aug 17, 2017 8:40 pm
by HardWareMan
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.

Re: ROM padding question

Posted: Thu Aug 17, 2017 9:10 pm
by Sik
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.

Re: ROM padding question

Posted: Thu Aug 17, 2017 10:05 pm
by matteus
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

Re: ROM padding question

Posted: Thu Aug 17, 2017 10:13 pm
by matteus
Okay I was using the HEX editor in Notepad++ which clearly isn't that great! Now download Frhed :)

Re: ROM padding question

Posted: Fri Aug 18, 2017 6:49 am
by Manveru
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.

Re: ROM padding question

Posted: Fri Aug 18, 2017 11:28 am
by Stef
ROM padding is here for some reason though, unpadded ROM won't work on some flash cart.

Re: ROM padding question

Posted: Fri Aug 18, 2017 1:58 pm
by Manveru
yeah i know, but is a good way to know the real size of a game rom.

Re: ROM padding question

Posted: Fri Aug 18, 2017 5:59 pm
by cero
size -t *.o

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