CPUWIZ Posted September 9, 2003 Share Posted September 9, 2003 Is there a PC based tool to convert .EXE files into .BIN files ? If not, does anyone know what needs to be stripped off to make it a .BIN file ? Thanks in advance. -R Quote Link to comment Share on other sites More sharing options...
DEBRO Posted September 9, 2003 Share Posted September 9, 2003 Is there a PC based tool to convert .EXE files into .BIN files ? If not' date=' does anyone know what needs to be stripped off to make it a .BIN file ?[/quote'] I don't know of a PC tool and I assume you mean EXE files from a disk image. The first 6 bytes would need to br stripped. Here are their meanings as I know them... $FF $FF <----- header word $xxxx <----- starting address of the program word $xxxx <------ ending address of the program Then you would need to add the following starting at location $BFFA word cartridge starting address byte $00 .byte xx <---D7 0=Not a Diagnostic Cart 1=Is a Diagnostic cart and control is given to cart before any OS is init. D2 0=Init but Do not Start Cart 1=Init and Start Cart D0 0=Do not boot disk 1=Boot Disk word cartridge init address I hope this helps Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted September 9, 2003 Author Share Posted September 9, 2003 Perfect, that is exactly the info I was after, thanks a lot. Now I can write a tool that turns EXE's into BIN's, wohooo. Quote Link to comment Share on other sites More sharing options...
Bryan Posted September 9, 2003 Share Posted September 9, 2003 You can only make cartridge ROM's if the program runs within $8000-BFFF (if so, it probably a cart to begin with - disk programs tend to start below $1000), otherwise it will have to be loaded into RAM. If it uses both low RAM and the area from $8000 up, this can get very tricky. -Bry Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted September 9, 2003 Author Share Posted September 9, 2003 It was a cart, I only need it for one game to do some research. It does indeed reside in the range of $8000-$BFFF. Quote Link to comment Share on other sites More sharing options...
Bryan Posted September 9, 2003 Share Posted September 9, 2003 FYI, here's the 800 OS-B's cartridge startup procedure: -First check for Diagnostic Cart: -This is done in the first few cycles of operation -To allow a diagnostic cart to take over before a flaky computer -crashes. Lda $BFFC -If it's zero, then test to see if it's a ROM: Bne - outta here Inc $BFFC Lda $BFFC -If it's still zero, then it must be ROM! Bne - outta here -Is this a "Diagnostic" cart (runs before OS initializes)? Lda $BFFD -Bit 7 is the Flag Bpl - outta here Jmp ($BFFE) -outta here: gets us to this point: -Cartridge was not Diagnostic, so hardware init has now run -RAM size is verified. Cartridges are only checked if RAM is not -found in their space. -Assuming RAM was not found in $8000-BFFF -Locations $9FFC and $BFFC are checked for 0 values. -If they are found, an Init routine in the cart is run. It is expected to end in an RTS. lda $9FFC bne - next test jsr ($9FFE) - (actually a JSR to a IND-JMP) -next test lda $BFFC bne - DOS test jsr ($BFFE) -DOS test -Now DOS is loaded if the cartridge so desires. -$BFFD and $9FFD are OR'ed (only cartridges that passed the above "zero" test are included). Bit 0 means Boot DOS. And #$01 Beq - No boot! -Otherwise, DOS is booted. -Now, if Cart A is present (passed the "zero" test), it can be run if the RUN flag is set: -No boot! Jumps to here Lda $BFFD And #$04 Beq -Try Cart B Jmp ($BFFA) -Try Cart B -If Cart B passed the "zero" test, then see if it wants to RUN. Lda $9FFD And #$04 Beq -All Done Jmp ($9FFA) - All Done, OS continues... Note that with a 16K cart ($8000-BFFF) a 0 value in $9FFC will cause an init routine to be run at $9FFE whether it exists or not! Make sure $9FFC is non-zero in a 16K image. If a cartridge is marked as executable ($9FFC or $BFFC=0) the Init address (xFFE) is always taken. You can point this to an RTS instruction, and then run at (xFFA), or you can simply never return from the Init call, or you can run as a diagnostic cart if you don't need the OS at all. $9FFA/BFFA - Run Address $9FFC/BFFC - Zero if cart is executable/Nonzero cart is ignored $9FFD/BFFD - Flags (if bit set) b7=Diagnostic, b2=Run, b0=Boot DOS $9FFE/BFFE - Init Address/Diagnostic Run Address Diagnostic cartridge is signalled at Cartridge A ($BFFD) only. -Bry Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted September 10, 2003 Author Share Posted September 10, 2003 Cool, thanks for the additional info. Quote Link to comment Share on other sites More sharing options...
Shannon Posted September 11, 2003 Share Posted September 11, 2003 It was a cart' date=' I only need it for one game to do some research. It does indeed reside in the range of $8000-$BFFF. [/quote'] And what, pray tell, is this research? We already know the game.. Quote Link to comment Share on other sites More sharing options...
Shannon Posted September 12, 2003 Share Posted September 12, 2003 Awww come on.... You can tell us. We promise to keep it secret. Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted September 12, 2003 Author Share Posted September 12, 2003 Quote Link to comment Share on other sites More sharing options...
Bryan Posted September 12, 2003 Share Posted September 12, 2003 You don't have to go to all this trouble, man. I'll loan you a PAC-MAN cart. -Bry Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted September 12, 2003 Author Share Posted September 12, 2003 Thanks but I prefer my Jumpman Jr. EPROM cart that has unlimited lives. Quote Link to comment Share on other sites More sharing options...
Shannon Posted September 13, 2003 Share Posted September 13, 2003 Awww come on.... Jumpman isn't that hard!! Your talking to the jumpman expert here!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.