Hacking GBA Retroblaster

thefrontbottoms

Member
Newcomer
Joined
Jul 21, 2021
Messages
7
Reaction score
10
Trophies
0
Age
25
XP
77
Country
United States
Has anyone that's used the Retroblaster for writing .gba files onto a rewritable cart ever gotten the error that the file isn't divisible by 1024?

Downloaded a youtube vid, converted to an avi file and then into a gba file to put on the cart, if that helps to know.
 
I take it, you used that Meteo video converter ?

I don't know anything about that writer, but maybe it has a "/1024" Requirement ?

There exist other "writer" options for NDS systems with gbaslot.
Maybe try these ?
(Then again.. DS already has tunaVIDs, mp4 player and dpg available, so I suppose you don't have one)

These guys n gals are the pros of 'gba video':
https://www.js4.red/r/gbatmw/comments/mkgjxn/hello_where_to_find_dpg_movies/
If in doubt, also ask them.


#I still consider that "site" my second internet-home right next to gbatemp
Considering this is a gba topic, @FAST6191 might come around.
He probably knows something.

Oh and: Welcome to GBATEMP
 
Last edited by Deleted member 514389,
GBATMW still exists in some form? Did not see that one coming.

Anyway yeah sounds like the writer has a basic requirement for length of file, and knowing the various conversion tools they don't pad things out. I have not used this one though so don't know much more on the specifics for it.

General principle.
When you have data chips storing things you don't just finish at a random point and start over at the very next byte. Each chip will want to be filled up so you can start at a more sensible location. If you have ever heard the term bankswitching then this is related to that, though you might have also heard pages, LBA and sectors on your hard drive as it is all notable variations on the same basic theme. Or if you prefer there is a reason untrimmed GBA ROMs will be some power of 2 in size (4, 8, 16, 32,64,128,256 megabits).

Anyway in this case it seems it uses blocks 1024 I guess that is bytes long, anything that is not some multiple of 1024 will cause issues and it seems it is not smart enough to pad it out with 00 of FF or something.
The way it likely checks is it will divide the file size by 1024. If it gets a whole number as a result then it knows it is a multiple of 1024, if it gets a fractional answer then not that. Hence the divisible by 1024 thing.
You then want to make it a suitable size. Two main approaches people use when doing this (untrimming ROMs and converting saves to go between various emulators and flash carts mostly).
1) You append a whole bunch of data to a file and trim it back off to a suitable length.
2) You open the file up in a hex editor and insert enough data at the end for it to become a suitable length.

For 1) then you can use the windows command line.
"copy /b file1.gba+blankfile.file newfile.file"
This will take a file called file1.gba, a file called blankfile.file , put all the data from blankfile.file at the end of the data and spit out a whole separate file called "newfile.file".
Replace names as appropriate.
Making a file filled with blanks is easier said than done for some, however if you have a hex editor it will do.
Hex is the way computers stack up four binary numbers (computers only understand on and off, represented as 1 and 0 for most purposes) to make them more readable for humans (0001001110101100 is tedious to say and prone to misreading, 13AC on the other hand is quite nice to say/read/enter into something). However as 2 to the power of 4 (2 x 2 x 2 x 2 combinations) is 16 then boring old 0 through 9 does not cut it and to make up the difference 10 decimal becomes A in hexadecimal and we go up through F before starting round again.

00 and FF (two hex digits make a byte) then corresponding to all 0 binary and all 1 binary respectively and either of those (or sometimes alternating) is what is traditionally used to add junk to the end of files to make them hit a file size requirement, certainly is for the GBA.

Chop it back down with something like https://web.archive.org/web/20170218180937/http://min.midco.net/cracker/filecutter.zip
or a hex editor.
For simple file manipulation purposes for free then I tend to suggest
https://mh-nexus.de/en/hxd/ and if you plan to get into ROM hacking flank that with
https://sourceforge.net/projects/hexplorer/ https://www.softpedia.com/get/Others/Miscellaneous/tiny-hexer.shtml http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
Hex editors might have something of a scary reputation but actually they are very basic.
There are three sections and a few extras depending.
On the left for most hex editors is the location in the file, typically in hex. Your 1024 multiple will likely be a nice one of these.
In the middle for most hex editors is the data the file/memory location/hard drive location contains in hexadecimal form which we just covered.
On the right for most hex editors is some form of decode of the data, usually into ASCII ( https://www.asciitable.com/ ) which is an old format but still very popular and the basis for most things today. Games however are one of the big exceptions and their text often does its own thing completely but we are not teaching ROM hacking right now.

For 2) I just told you what padding is, type in enough to hit a whole number multiple of 1024 (by the way not a coincidence that 1024 in decimal is 10000000000 in binary, and why you get stats in games top out at 1023 which is one less) or have the hex editor insert enough if it has a nice insert bytes function (make sure the selection is at the end of the file).
 

Site & Scene News

Popular threads in this forum