Re: [stella] Newbie Question Images in DASM

Subject: Re: [stella] Newbie Question Images in DASM
From: Erik Mooney <erik@xxxxxxxxxx>
Date: Thu, 11 Oct 2001 16:45:38 -0400
10/11/2001 4:02:21 PM, "Joel Park" <joelp@xxxxxxxxxxxxxxxxxx> wrote:

>I've noticed people store images two ways.
>
>  .byte %10000000
>  .byte %11000000
>  .byte %11100000
>  .byte %11110000
>  .byte %11111000
>  .byte %11111100
>  .byte %11111110
>  .byte %11111111
>
>  .byte $40 ; | X      | $F7DD
>  .byte $20 ; |  X     | $F7DE
>  .byte $10 ; |   X    | $F7DF
>  .byte $08 ; |    X   | $F7E0
>  .byte $04 ; |     X  | $F7E1
>  .byte $02 ; |      X | $F7E2
>  .byte $01 ; |       X| $F7E3
>
>
>The top is definately easier to read.   Will DASM allow me to save images in
>the two ways, or is one from a different compiler or something??
>
>Can anyone explain the differences and the advantages???

Remember that everything is just a byte.  DASM (and the 6502) doesn't know
or care whether they're images or code or tables or whatever.  Any source-code
mnemonic that represents a byte is legal.  Both of those methods are just ways
of listing several bytes.  Everything after the semicolons in the lines of the second
method is comments, of course.

For graphics data, the first method is definitely the easiest to read and most standard.
Note that objects are often stored upside-down, that is, top line of the image last,
to simplify the counter logic involved in displaying a graphic.


-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread