Jump to content
IGNORED

how to disassembler a 8K .bin


Recommended Posts

Who can help me to disassembler a 8K .bin?

 

I had cut it to two 4K .bin files,and disassembler them(May be I did not do it well).

But don not know how to put them togather.

 

I had read informations for it,

"AtariAge Forums - View topic - Disassembling 8k+ 2600 games__.htm"

"http://www.qotile.net/minidig/docs/sizes.txt"

 

but still can not do it.My English is too bad.I can not know some words even if using a dictionary.

IF who could do it for me,I'm very urgency.Very thanks....

Checkered.bin The 8K game which I want to disassembler.

1.bin the first 4K file cut from Checkered.bin

2.bin the second 4K file cut from Checkered.bin

1.asm disassembler from 1.bin

2.asm disassembler from 2.bin

try.asm try to put 1.asm and 2.asm togather,but lost.

1.zip

Link to comment
Share on other sites

You have the right idea by using ORG and RORG together...but that's not the problem. The problem is that the 2 disassemblies you created were made without using a configuration file that had the data seperated from the code correctly (notice up top where all of those labels are listed...if you've got Rom addresses listed there, it's almost certian to be due to a bad .cfg file). If data tables are misinterpreted to be program lines, the values in those tables will be treated as code...and even worse, data misinterpreted as branches will cause the disassembler to misinterpret areas of program code as well! This is a dilemma when working with bankswitched games, because program lines in the bankswitch will not be labelled at all without using a .cfg file...but without a .cfg file, you might just get endless lines of data without any program instructions.

 

Pretty much the only way to do it is to create .cfg files only -partially- with the aide of Distella. The rest must be examined "by hand" (and maybe a few guesses taken along the way) as to where the program lines exist and where it's just values (like graphics, etc.). As you might have guessed, it usually helps to know a bit of 6502 ;)

 

Hang on and I'll see if I can figure out some .cfg's for ya :)

Link to comment
Share on other sites

OK...here are 3 zipfiles. 1st.zip holds the config files that I worked out...and the assemblies that they created. It still wasn't perfect tho, since the Start vector in bank1 points to bank2's Start address, and address $F917 was assumed to be a table.

2nd.zip contains the merged assemblies...using ORG/RORG together to keep the binary size at $8192 bytes. Since Dasm will report errors if you try to declare a variable twice, I just replaced the equate table with my own (or you could just use include VCS.H if you choose).

But I didn't stop there...C_Flag.zip contains the merged file with a few edits of my own...such as adding spaces before the comments and putting labels on seperate lines (keeps everything uniform once you begin changing label names ;) ), editing the vector table, and eliminating $00 from .word addressing.

 

 

Here's the first file:

1st.zip

Link to comment
Share on other sites

OK,I had understood something~~And I have a question,In you code ,there is the "XXX".

.byte $FF ; |XXXXXXXX| $DB84

.byte $0F ; | XXXX| $DB85

.byte $07 ; | XXX| $DB86

.byte $07 ; | XXX| $DB87

.byte $03 ; | XX| $DB88

.byte $03 ; | XX| $DB89

.byte $03 ; | XX| $DB8A

.byte $03 ; | XX| $DB8B

LDB8C:

.byte $12 ; | X X | $DB8C

.byte $9E ; |X XXXX | $DB8D

.byte $52 ; | X X X | $DB8E

.byte $D2 ; |XX X X | $DB8F

.byte $00 ; | | $DB90

 

 

I don't think it is written.Is it done by a tool?A graphics tool?I just write % number by myself for my map,that is very hard.

So I had searched for some tools.And I find "Changing Atari VCS Graphics-The Easy Way by Adam Trionfo".But I cann't find the tools the said.

1 PC Atari emulator.I use z26,is it ok?

2 Distella 2.1 I got it,I use it for disassembler .bin file. Yes?

3 DASM 2.02 I got it.

4 Showgfx/Editgfx I cann't find it.

5 makewav 3.1 I had found and got it

6 space Invaders Binary ROM Image. I cann't find it.

 

I had searched a long time,but didn't find files 4 and 6.Do you know about them or other better tools or other better way to do graphics?

I had written some NES games.We can use some tools to debug NES program.And What tools can I use for debugging Atari 2600 program?

 

I want to write the game which I given it to you,and change its Graphics and some function.Just plan ~~~~It's hard to do...Yes?

Link to comment
Share on other sites

The ROM for Space Invaders can be found here:

www.atariage.com/2600/roms/SpaceInvaders.zip

 

As for #4, I'm not familiar with them. I would guess they are simple graphic hack programs. If that is the case, here's the link to two others that I've used: http://www.atariage.com/forums/viewtopic.p...light=bithacker

 

The second message in the thread has a link for Bithacker and the third message has a link to HackoMatic 2.0.

 

xian106:

I just write % number by myself for my map,that is very hard.

 

I'm not sure exactly what you mean here, but if you have a scientific calculator handy or on your computer it's not really hard... just time consuming. :)

 

-Jason

Link to comment
Share on other sites

The X's were put into the disassembly file by Distella for all of the addresses that were specified as "GFX" in the config files. This pattern is not used at all when assembling the program with Dasm, because they are just comments (anything following the semicolon character ";" in an assembly file is ignored by Dasm). It's OK to edit the lines to use the percent character "%" instead if you find them easier to work with. Your example...

LDB84:

      .byte $FF; |XXXXXXXX| $DB84

      .byte $0F; |    XXXX| $DB85

      .byte $07; |     XXX| $DB86

      .byte $07; |     XXX| $DB87

      .byte $03; |      XX| $DB88

      .byte $03; |      XX| $DB89

      .byte $03; |      XX| $DB8A

      .byte $03; |      XX| $DB8B

LDB8C:

      .byte $12; |   X  X | $DB8C

      .byte $9E; |X  XXXX | $DB8D

      .byte $52; | X X  X | $DB8E

      .byte $D2; |XX X  X | $DB8F

      .byte $00; |        | $DB90

 

...would be edited to be...

 

LDB84:

      .byte %11111111; |XXXXXXXX| $DB84

      .byte %00001111; |    XXXX| $DB85

      .byte %00000111; |     XXX| $DB86

      .byte %00000111; |     XXX| $DB87

      .byte %00000011; |      XX| $DB88

      .byte %00000011; |      XX| $DB89

      .byte %00000011; |      XX| $DB8A

      .byte %00000011; |      XX| $DB8B

LDB8C:

      .byte %00010010; |   X  X | $DB8C

      .byte %10011110; |X  XXXX | $DB8D

      .byte %01010010; | X X  X | $DB8E

      .byte %11010010; |XX X  X | $DB8F

      .byte %00000000; |        | $DB90

 

(space) = "0", X = "1"

 

Both examples will produce the same binary code.

 

 

 

1) Any emulator will suffice. I prefer to use Z26 since it's the most accurate one.

 

2) Yes...Distella should be used for any Atari 2600 rom image.

 

4) You can find the older graphics-editing tools SHOWGFX and EDITGFX here:

http://www.atarihq.com/danb/a2600.shtml#devsoftware

...but most people just use the point-and-click Hack-O-Matic instead. Keep in mind that none of those tools offer much if you want to attempt to hack the game program instructions themselves. In that case, the better option is still to use a disassembler.

 

5) You don't really need Makewav at all if you are testing your hack with an emulator (Makewav translates a binary file into audio tones compatable with the Starpath Supercharger).

Link to comment
Share on other sites

  • 2 weeks later...

Nukey Shay,

I had read "card-sizes.txt","2600_advanced_prog_guide.txt" and "2600bank.txt" carefully.I have trouble.

For example,in F8 bankswitching,the .txt files said we use "lda $1ff8" or "lda $1fff9" change banks.Basically, by reading a certain location in ROM switches banks.

But you help me to disassemble the 8K game using "sta",bye writing the location not reading.Why?

And I had a try to use "lda" instead of "sta",I found if i instead of the last "sta $fff8" in row 6263,the game will cann't work(just display the first map).If I instead of others except the last "sta $fff8",game will work well.

What's the difference between reading and writing $fff8?

1.zip

Link to comment
Share on other sites

  • 9 months later...
The X's were put into the disassembly file by Distella for all of the addresses that were specified as "GFX" in the config files.

 

I've seen this, and finally stumbled back into it re-reading all of my old posts. Is there a free web-based program that will split the file in half for you? The one Thomas refers to way back when no longer exists in it's old form. And if not, has anyone written their own they would be willing to share? Also, while I'm at it, how do you specify an address as GFX?

 

-JD

Link to comment
Share on other sites

The X's were put into the disassembly file by Distella for all of the addresses that were specified as "GFX" in the config files.

 

I've seen this, and finally stumbled back into it re-reading all of my old posts. Is there a free web-based program that will split the file in half for you? The one Thomas refers to way back when no longer exists in it's old form. And if not, has anyone written their own they would be willing to share? Also, while I'm at it, how do you specify an address as GFX?

 

-JD

1012329[/snapback]

 

I wrote a simple little QuickBASIC program to split 8K (or larger) ROMS into two (or more) 4K segments. If you have Windows or MS-DOS (i.e., if you can run QuickBASIC executables), I'd be happy to spruce it up a little and share it.

 

Michael Rideout

Link to comment
Share on other sites

I wrote a simple little QuickBASIC program to split 8K (or larger) ROMS into two (or more) 4K segments. If you have Windows or MS-DOS (i.e., if you can run QuickBASIC executables), I'd be happy to spruce it up a little and share it.

 

Michael Rideout

 

I have an XP upgrade. Pretty please, with sugar on top? I'd really like to see some of the code for these games without having to ask someone to disassemble a bunch of games for me. I'm gone for the weekend, but you can be sure it'll have a download early next week if it's ready. :D

 

Thanks,

-JD

Link to comment
Share on other sites

  • 2 weeks later...

I wrote a simple little QuickBASIC program to split 8K (or larger) ROMS into two (or more) 4K segments. If you have Windows or MS-DOS (i.e., if you can run QuickBASIC executables), I'd be happy to spruce it up a little and share it.

 

Michael Rideout

 

I have an XP upgrade. Pretty please, with sugar on top? I'd really like to see some of the code for these games without having to ask someone to disassemble a bunch of games for me. I'm gone for the weekend, but you can be sure it'll have a download early next week if it's ready. :D

 

Thanks,

-JD

1012516[/snapback]

 

Sorry for the delay! The original program was a QAD ("quick and dirty") hack that had the input and output filenames hardcoded (!) into the program, and I would just change the names and then run the program directly in QuickBASIC without even bothering to compile it. I had to totally rewrite it to be a true "command line" utility program, which is called "SplitFile." If you need help with it, you can just type "splitfile" at the command prompt and it will display a brief help guide, as so:

 

Nothing to do!

Usage: SPLITFILE [<path>]<filename> [<size>]

Where: [<path>] is optional path (e.g., C:\Atari\2600\ROMs\)

      <filename> is name of file to split (required)

      [<size>] is optional size of output files (e.g., 4K)

Notes: <size> may be 1K, 2K, or 4K (case insensitive)

      1K may be typed as 1K, 1KB, 1024, or 1024B

      2K may be typed as 2K, 2KB, 2048, or 2048B

      Anything else (including no size) is 4096

Output files will be named file_#.ext

where # is number of file, and .ext is original extension

 

As the preceding help guide states, the original input file can be split into one or more output files which are 1K, 2K, or 4K in size-- the reason being that (according to the bankswitching documentation by Kevin Horton) the various Atari 2600 bankswitching schemes can be grouped into three categories: (1) those that use banks which are 4K in size, (2) those that use banks which are 2K in size, and (3) those that use banks which are 1K in size. If no size is specified, then 4K will be assumed. Thus, if you know the bankswitching method used by a game, you can split the ROM into the individual banks, whether they are 1K, 2K, or 4K in size.

 

The output files will be placed in the same directory as the input file, and will have numbers appended to their names, preceded by an underline character (e.g., "_1," "_2," "_3," etc.). The original extension will be kept. If the input file is less than or equal to the stated bank size, then only one file will be output. And if the input file is not an integer multiple of the stated bank size, then the last output file will be however many bytes were left over.

 

For example, let's suppose that the SplitFile.exe program has been placed into the directory named C:\Atari\2600\Distella, and that a Burgertime.bin ROM file is in the directory named C:\Atari\2600\ROMs. The Burgertime ROM uses M-Network's bankswitching method ("E7"), which uses 2K bank sizes. So to split the Burgertime ROM into the appropriate 2K banks, you could type any of the following commands at the command prompt:

 

c:

cd \atari\2600\distella

splitfile ..\roms\burgertime.bin 2k

 

or

 

c:\atari\2600\distella\splitfile c:\atari\2600\roms\burgertime.bin 2048

 

or

 

c:

cd \atari\2600\roms

..\distella\splitfile burgertime.bin 2kb

 

and so forth. In each of these examples, the output files would be as follows:

 

c:\atari\2600\roms\burgertime_1.bin

c:\atari\2600\roms\burgertime_2.bin

c:\atari\2600\roms\burgertime_3.bin

c:\atari\2600\roms\burgertime_4.bin

c:\atari\2600\roms\burgertime_5.bin

c:\atari\2600\roms\burgertime_6.bin

c:\atari\2600\roms\burgertime_7.bin

c:\atari\2600\roms\burgertime_8.bin

 

The program is written in FreeBASIC, which is a free BASIC compiler that uses a BASIC language which is mostly compatible with QuickBASIC (except FreeBASIC has some additional commands, plus a few of the commands have been modified somewhat from their QuickBASIC counterparts). The source code is included, in case anyone wants to peruse it, modify it, or port it to some other language.

 

Michael Rideout

SplitFile.zip

Link to comment
Share on other sites

I had to totally rewrite it to be a true "command line" utility program, which is called "SplitFile." If you need help with it, you can just type "splitfile" at the command prompt and it will display a brief help guide, as so:

 

Nothing to do!

Usage: SPLITFILE [<path>]<filename> [<size>]

Where: [<path>] is optional path (e.g., C:\Atari\2600\ROMs\)

       <filename> is name of file to split (required)

       [<size>] is optional size of output files (e.g., 4K)

Notes: <size> may be 1K, 2K, or 4K (case insensitive)

       1K may be typed as 1K, 1KB, 1024, or 1024B

       2K may be typed as 2K, 2KB, 2048, or 2048B

       Anything else (including no size) is 4096

Output files will be named file_#.ext

where # is number of file, and .ext is original extension

 

Actually, I forgot that you can also just type "1," "2," or "4" for the size. And right now it might not like directory paths or file names that contain spaces-- I haven't tested that yet, it may work. I probably need to tinker it with it a bit more anyway, to add some kind of output messages, like trap error conditions and display some appropriate error messages, and especially output some kind of message when the program runs correctly, like showing a list of the output files that it wrote.

 

Michael Rideout

Link to comment
Share on other sites

Okay, here's an updated version. All I did was add some more text to the help guide, and add some output messages. I did confirm that including spaces in the directory path or file name is okay, as long as you put quotes around it so the program understands that it's all one parameter. The new help guide, and an example of the new output messages, are shown below.

 

Michael Rideout

 

C:\Atari\2600\Distella>splitfile

Nothing to do!

Usage: SPLITFILE [<path>]<filename> [<size>]

Where: [<path>] is optional path (e.g., C:\Atari\2600\ROMs\)

      <filename> is name of file to split (required)

      [<size>] is optional size of output files (e.g., 4K)

Notes: <size> may be 1K, 2K, or 4K (case insensitive)

      1K may be typed as 1, 1K, 1KB, 1024, or 1024B

      2K may be typed as 2, 2K, 2KB, 2048, or 2048B

      Anything else (including no size) will be read as 4096

Output files will be named file_#.ext

      where 'file' is original filename,

      '#' is number of output file,

      and '.ext' is original extension

If path or filename contains spaces,

      '\path\filename' must be in quotes

 

C:\Atari\2600\Distella>splitfile "..\ROMs\M-Network Burgertime.bin" 2

Reading 16384 bytes in ..\ROMs\M-Network Burgertime.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_1.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_2.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_3.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_4.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_5.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_6.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_7.bin

Writing 2048 bytes to ..\ROMs\M-Network Burgertime_8.bin

All done!

 

C:\Atari\2600\ROMs>dir M-N*

Volume in drive C has no label.

Volume Serial Number is xxxx-xxxx

 

Directory of C:\Atari\2600\ROMs

 

12/18/1999  05:23 PM            16,384 M-Network Burgertime.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_1.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_2.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_3.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_4.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_5.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_6.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_7.bin

02/15/2006  06:14 PM            2,048 M-Network Burgertime_8.bin

              9 File(s)        32,768 bytes

SplitFile.zip

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...