Jump to content
IGNORED

Some early DASM help please. :)


 Share

Recommended Posts

I have DASM set up on my Mac enough to complain at me. :P

 

I have dasm in the "bin" folder. Simply stating "dasm" just brings up a unrecognized file.

"open dasm" brings up the list of commands and works, till I try to do a command string, then it just breaks.

 

So I have dasm and the source.asm in the same "bin" directory. I drag dasm into terminal, then I drag the assembly code into terminal, then I type what I believe you should type after that -f3 (format 2600 I presume) then -name.bin for a output binary.

 

And I get this. Can someone help me on what is happening or needs to happen?

 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Doctors-Air:bin doctorclu$ /Applications/Atari/DASM/bin/dasm /Applications/Atar
i/DASM/bin/JOUST5JU.asm -f3 -joust.bin
DASM 2.20.11 20140304
Copyright © 1988-2008 by various authors (see file AUTHORS).
License GPLv2+: GNU GPL version 2 or later (see file COPYING).
DASM is free software: you are free to change and redistribute it.
There is ABSOLUTELY NO WARRANTY, to the extent permitted by law.

Usage: dasm sourcefile [options]

-f# output format 1-3 (default 1)
-oname output file name (else a.out)
-lname list file name (else none generated)
-Lname list file, containing all passes
-sname symbol dump file name (else none generated)
-v# verboseness 0-4 (default 0)
-d debug mode (for developers)
-Dsymbol define symbol, set to 0
-Dsymbol=expression define symbol, set to expression
-Msymbol=expression define symbol using EQM (same as -D)
-Idir search directory for INCLUDE and INCBIN
-p# maximum number of passes
-P# maximum number of passes, with fewer checks
-T# symbol table sorting (default 0 = alphabetical, 1 = address/value)
-E# error format (default 0 = MS, 1 = Dillon, 2 = GNU)

Report bugs to dasm-dillon-discuss@lists.sf.net please!


Fatal assembly error: Check command-line format.
Doctors-Air:bin doctorclu$

Edited by doctorclu
Link to comment
Share on other sites

Doctors-Air:bin doctorclu$ dasm boing26.asm -f3

Complete.

 

:)

 

-=-=-=-=-=-=-=-=-

 

Fine! Just output it as "a.out". I'll just rename the stink'in file manually. Whatever... :P

 

Binary compile worked.

Edited by doctorclu
Link to comment
Share on other sites

Ok, here is a new wrinkle now that I have successfully compiled a 4K image for the first time. Trying to assemble a 8K game

 

-=-=-=-=-=-=-=-=-=-=-=-=-

Doctors-Air:bin doctorclu$ dasm joust5ju.asm -f3
segment: Bank0 1000 eqm vs current org: e004

Aborting assembly
joust5ju.asm (350): error: Origin Reverse-indexed.
=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Was trying to assemble the assembly code here:

Joust (07-05-1983) (Atari - GCC, Mike Feinstein, Kevin Osborn) (CX2691) (Prototype).zip

 

But also found this source as well:

VCS_Joust_source.zip

Edited by doctorclu
Link to comment
Share on other sites

Well on a cool note, I have successfully ran frogs and flies (4K) through DISTELLA, into the decompile, and then recompiled it with DASM.

 

Cool! :D

 

Now if someone could give some pointers on the Joust code I'd appreciate it.

Edited by doctorclu
Link to comment
Share on other sites

Use the file in the first zip...the tags and directives have already been fixed by Thomas to work with Dasm. Only 1 issue...the ORG for the "development system" is still getting in the way. So cut the IF ORIGINAL text and paste it a bit higher between the SEG and ORG lines:

          SEG     Bank0
  IF ORIGINAL
          ORG     $E000
E000      dc      0                      ;STORE 80 IN HERE TO FREEZE
E001      dc      0                      ;SLOWDOWN SPEED
E002      dc      0                      ;TEMP
E003      dc      0                      ;WHEN FROZEN, NUMBER OF FRAMES TO
                                         ;ADVANCE BEFORE STOPPING.  THE SPEED
                                         ;OF ADVANCEMENT IS SET IN E001
;  IF ORIGINAL
          ORG     $E100

Assembles just fine now when ORIGINAL = 0

Edited by Nukey Shay
  • Like 1
Link to comment
Share on other sites

That worked!! :D What exactly was going wrong there aside from this being out of order?

 

Here is another one I tried out, the Warlords Disassmeble from Spice Ware:

Warlords_Source.zip

 

Looks like it is trying to access other files.

 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Doctors-Air:bin doctorclu$ dasm warlords.asm -f3
Warning: Unable to open 'vcs.h'
Warning: Unable to open 'graphics.h'
Warning: Unable to open 'vcs.h'
Warning: Unable to open 'graphics.h'
Warning: Unable to open 'vcs.h'
Warning: Unable to open 'graphics.h'
--- Unresolved Symbol List
zzXXX___XX 0000 ???? (R )
zzX_____XX 0000 ???? (R )
zz_X____XX 0000 ???? (R )
zz______XX 0000 ???? (R )
zzXX____XX 0000 ???? (R )
NUSIZ0 0000 ???? (R )
NUSIZ1 0000 ???? (R )
zz_X____X_ 0000 ???? (R )
zz______X_ 0000 ???? (R )
zzXXX_____ 0000 ???? (R )
zzXX______ 0000 ???? (R )
zzX_______ 0000 ???? (R )
zz_X______ 0000 ???? (R )
zz________ 0000 ???? (R )
COLUBK 0000 ???? (R )
zzXXX____X 0000 ???? (R )
zzXX_____X 0000 ???? (R )
zzX______X 0000 ???? (R )
zz_X_____X 0000 ???? (R )
zz_______X 0000 ???? (R )
COLUP0 0000 ???? (R )
COLUP1 0000 ???? (R )
PF0 0000 ???? (R )
PF1 0000 ???? (R )
PF2 0000 ???? (R )
CXCLR 0000 ???? (R )
COLUPF 0000 ???? (R )
zz__X__X__ 0000 ???? (R )
VBLANK 0000 ???? (R )
zzXX___XXX 0000 ???? (R )
zzX____XXX 0000 ???? (R )
zz_X___XXX 0000 ???? (R )
zz_____XXX 0000 ???? (R )
zz_XX__XX_ 0000 ???? (R )
CXM1FB 0000 ???? (R )
CXM0FB 0000 ???? (R )
AUDF0 0000 ???? (R )
AUDF1 0000 ???? (R )
AUDC0 0000 ???? (R )
AUDC1 0000 ???? (R )
CXBLPF 0000 ???? (R )
CTRLPF 0000 ???? (R )
SELECT_MASK 0000 ???? (R )
AUDV0 0000 ???? (R )
AUDV1 0000 ???? (R )
GRP0 0000 ???? (R )
GRP1 0000 ???? (R )
zz____XX__ 0000 ???? (R )
TIM64T 0000 ???? (R )
zzXX__X___ 0000 ???? (R )
ZZX___X___ 0000 ???? (R )
zz_X__X___ 0000 ???? (R )
zz____X___ 0000 ???? (R )
HMCLR 0000 ???? (R )
VSYNC 0000 ???? (R )
CXP1FB 0000 ???? (R )
CXP0FB 0000 ???? (R )
zzXXXXXX__ 0000 ???? (R )
zz_XXXXX__ 0000 ???? (R )
zz__XXXX__ 0000 ???? (R )
INTIM 0000 ???? (R )
HMOVE 0000 ???? (R )
zz__XXXXXX 0000 ???? (R )
zzXXXXXXXX 0000 ???? (R )
zz___XXXXX 0000 ???? (R )
zz___XXXX_ 0000 ???? (R )
zz__XXXXX_ 0000 ???? (R )
zz_XXXXXX_ 0000 ???? (R )
zz_X_XX_X_ 0000 ???? (R )
zzXXXXX___ 0000 ???? (R )
zz___XX___ 0000 ???? (R )
INPT0 0000 ???? (R )
RESP0 0000 ???? (R )
RESP1 0000 ???? (R )
zz__XX____ 0000 ???? (R )
WSYNC 0000 ???? (R )
RESBL 0000 ???? (R )
RESM0 0000 ???? (R )
RESM1 0000 ???? (R )
SWCHA 0000 ???? (R )
SWCHB 0000 ???? (R )
ENAM0 0000 ???? (R )
HMBL 0000 ???? (R )
ENAM1 0000 ???? (R )
HMP0 0000 ???? (R )
HMP1 0000 ???? (R )
ENABL 0000 ???? (R )
HMM0 0000 ???? (R )
HMM1 0000 ???? (R )
--- 89 Unresolved Symbols



Fatal assembly error: Source is not resolvable.

Link to comment
Share on other sites

The readme.txt in all the source archives from my Collect tutorial explains compiling with dasm:

 

Collect is a simple Atari 2600 game where the objective is
to collect randomly positioned boxes.
 
Use dasm to compile the program.  Dasm can be found here:
http://dasm-dillon.sourceforge.net
 
The command used to compile is:
dasm collect.asm -f3 -v0 -scollect.sym -lcollect.lst -ocollect.bin
 
 
the options after the source file are:
    -f3 sets output format to 3, RAW.
 
    -v0 sets verboseness.  Values are 0-4, see dasm documentation.
 
    -s requests a symbol dump, saved to specified file.  Stella uses the symbol
       dump in order to show your variable names in Stella’s debugger.  The
       *.sym filename must match the *.bin filename for this to work.
 
    -l requests a detailed listing, saved to specified file.
 
    -o specifies the output file.  If not specified, the output file will be a.out
 
Besides the source file, only option -f3 is required to build a Atari 2600 program.

vcs.h contains the standard definitions for GRP0, WSYNC, etc. while macro.h contains commonly used macro routines like the one for SLEEP. They're included with the source for dasm in the subdirectory machines/atari2600/.

 

 

graphics.h is something I don't use anymore. I originally used it because I found it significantly easier to see the graphics within the code when represented like this:

 

ShieldGfxRight:
       .byte zz__XXXX__ ; $3C
       .byte zz___XXXXX ; $1F
       .byte zz___XXXXX ; $1F
       .byte zz___XXXXX ; $1F
       .byte zz__XXXX__ ; $3C
       .byte zz________ ; $00
       .byte zz________ ; $00
       .byte zz________ ; $00

vs when represented like this:

ShieldGf1Right:
       .byte %00111100 ; $3C
       .byte %00011111 ; $1F
       .byte %00011111 ; $1F
       .byte %00011111 ; $1F
       .byte %00111100 ; $3C
       .byte %00000000 ; $00
       .byte %00000000 ; $00
       .byte %00000000 ; $00

I no longer do that because I figured out how to have jEdit colorize the binary values so the graphics pop like this:

post-3056-0-82302600-1487521803_thumb.png


You can either download graphics.h, or do a find/replace of zz/% _/0 and X/1 to convert all of those to standard binary representation. Only do the find/replace for the byte values though, not the entire file as things like LDX would become LD1 and cause all sorts of compile time errors :)

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...
 Share

  • Recently Browsing   0 members

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