RobR Posted March 24, 2010 Share Posted March 24, 2010 (edited) I'm trying to learn how to use Distella and DASM. I'm using Combat to try it out. I disassembled it fine. I've looked at the .s file and it looks fine. I then tried DASM with the following command "DASM -OCOMBAT". The resulting .bin file doesn't run on Stella. I have a black screen with rapid beeping. What am I doing wrong? Edited March 24, 2010 by RobR Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted March 24, 2010 Share Posted March 24, 2010 I'm trying to learn how to use Distella and DASM. I'm using Combat to try it out. I disassembled it fine. I've looked at the .s file and it looks fine. I then tried DASM with the following command "DASM -OCOMBAT". The resulting .bin file doesn't run on Stella. I have a black screen with rapid beeping. What am I doing wrong? The commamd line should probably be something like DASM COMBAT.S -f3 -oCOMBAT.BIN I'm assuming your disassembly is called COMBAT.S, so change it in the command line as needed. The -f3 option is needed to get a "raw" binary file that works with the Atari or an emulator. Hope this helps! Michael Quote Link to comment Share on other sites More sharing options...
RobR Posted March 24, 2010 Author Share Posted March 24, 2010 I'm trying to learn how to use Distella and DASM. I'm using Combat to try it out. I disassembled it fine. I've looked at the .s file and it looks fine. I then tried DASM with the following command "DASM -OCOMBAT". The resulting .bin file doesn't run on Stella. I have a black screen with rapid beeping. What am I doing wrong? The commamd line should probably be something like DASM COMBAT.S -f3 -oCOMBAT.BIN I'm assuming your disassembly is called COMBAT.S, so change it in the command line as needed. The -f3 option is needed to get a "raw" binary file that works with the Atari or an emulator. Hope this helps! Michael Just so you know, I tried adding the .bin part first. I got a screen with green block scrolling and a BEEEEEEEEP BEEEEEEP. Then I added the -f3 switch and VOILA! It came up fine. Thanks, Michael. Now I can play....er....EXPERIMENT (better word) with the source file and see what does what. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted March 25, 2010 Share Posted March 25, 2010 Then I added the -f3 switch and VOILA! It came up fine. Thanks, Michael. You're welcome! The -f3 switch tells it to output a "raw" file, meaning it's just the compiled code, plus any "empty" space, between the address in the first ORG and the last address in the code. For example, if the first ORG starts the ROM at $F000, and the last address is $FFFF, that's 4K of ROM. If you leave off the -f switch, it defaults to -f1, which outputs two extra bytes in front of the ROM, to specify the starting address of the ROM in lo-byte/hi-byte order. So if the first ORG says to start at $F000, the first two bytes would be $00 and $F0, followed by the 4K ROM. Thus, the total size of the BIN would be 4098 bytes instead of 4096 bytes. Assuming the last six bytes all pointed to the same starting address, and assuming the emulator would read the first 4096 bytes and throw away the last two bytes, the start-up vector would still point to the same starting address, but all the code would be offset by two bytes, causing major problems. Michael 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.