Site Map | Contact Info | Home  
  
 Home
 Products
 ROMHACK Toolbox
 Ordering Info
 Code Disassembly
 My Gameroom
 Links

 

 
   
Working with ROM Files    BIN2HEX converts BIN files to HEX files 
HEX2BIN converts HEX files to BIN files
HEXED hex editor

A Quick Look at Binary files, HEX files, and Object files
ROM files are binary files. They are made up of series of different values, or bytes. ROM binary files are not recognizable by their extension because they often carry the name of the EPROM that they are from, like "MAPPY.U1". If you've ever tried to open a ROM binary file in a text editor (like NOTEPAD), then you probably saw a bunch of odd, unrelated garbage characters. This is because the bytes aren't ASCII text. You still may see an occasional text message embedded using ASCII, like "INSERT COIN" or "PLAYER 1".

Here is where HEX editors come in. A HEX editor allows you to see the value of the byte display as HEX. Good HEX editors will also display the byte as an ASCII character too. The best way to learn how to use a HEX editor is to just get in and start playing with it. A common program I use is HEXED, listed in the tools section above.

Of course you can view binary files using a text editor if you convert them into HEX files. BIN2HEX and HEX2BIN tools allow you to convert binary files to HEX files and vise-versa.

Object files are binary files that are output from assemblers. Object files may have extensions .O or .OBJ.

Splitting Files into Individual ROM files
If your assembler spits out one big binary file, you may need to break it up into individual files in order to programming EEPROMs. There's probably a lot of ways to do this, but I usually use BIN2HEX and HEX2BIN. Here's an example of how to split up one large OBJ file into individual 4K files.


bin2hex kanga.obj temp /L4096 /I0
hex2bin temp TVG_75.0
bin2hex kanga.obj temp /L4096 /I4096
hex2bin temp TVG_76.1
bin2hex kanga.obj temp /L4096 /I8192
hex2bin temp TVG_77.2
bin2hex kanga.obj temp /L4096 /I12288
hex2bin temp TVG_78.3
bin2hex kanga.obj temp /L4096 /I16384
hex2bin temp TVG_79.4
bin2hex kanga.obj temp /L4096 /I20480
hex2bin temp TVG_80.5
 


Combining ROMs can be accomplished through DOS using the copy command. Separate each file name with a plus sign. Here is an example:

copy /b tvg_75.0+tvg_76.1+tvg_77.2+tvg_78.3+tvg_79.4+tvg_80.5 kanga.bin
 

HOME  

 ROMHACK 2009