Importing Bitmap Graphics into Assembly Source Code with BMP7800

From 8BitDev.org - Atari 7800 Development Wiki
Revision as of 00:59, 24 May 2016 by MSaarna (talk | contribs) (Created page with "==BMP7800 Overview== BMP7800 is a Windows Command-Line utility written by Bob DeCrescenzo. It's designed to import standard Windows bitmap graphics (sprite sheets) and output...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

BMP7800 Overview

BMP7800 is a Windows Command-Line utility written by Bob DeCrescenzo. It's designed to import standard Windows bitmap graphics (sprite sheets) and output assembly language source code, suitable for the DASM assembler.

You can download the utility via it's AtariAge release thread

Using BMP7800 for basic sprite-sheets

Here's a basic example of converting a 160A mode sprite sheet bitmap, specifying the color index order and zone-height...

BMP7800 -I:CHARMODE.BMP -O:CHARMODE.S -C1,2,3 -M:160A -Z16


Using BMP7800 to combine different mode graphics together

The idea here is to take multiple passes over different parts of the bitmap file(s), combining them all into a single output file. The -A flag turns on append mode, and we use -F to signify the final pass. -S and -E control the clipping window.

DEL CHARMODE320.S

BMP7800 -I:CHARMODE320.BMP -O:CHARMODE320.S -A -C8,9,13,6,10,14,1,2,16,4,17,18 -M:320A -Z8 -S0,0 -E127,47

BMP7800 -I:CHARMODE320.BMP -O:CHARMODE320.S -A -C8,9,13,6,10,14,1,2,16,4,17,18 -M:160A -Z16 -S0,48 -E127,95

BMP7800 -I:CHARMODE320.BMP -O:CHARMODE320.S -A -C8,9,13,6,10,14,1,2,16,4,17,18 -M:160B -Z16 -S0,96 -E127,111 -F


Command-Line Usage

bmp7800 -i:(name) -o:(name) [-c(color list)] [-m:(display mode)] [-z(scan lines per zone)] [-s(starting x,y point)] [-e(ending x,y point)] [-a] [-f]


Options

  • -i: The absolute path/filename of the input bitmap file (e.g. -i:C:\DEV\7800\CHARMODE.BMP) - Required
  • -o: The absolute path/filename of the output assembly file (e.g. -o:C:\DEV\7800\CHARMODE.S) - Required
  • -c Specify the color palette index order, separated by commas (e.g. -c219,4,173) - Optional, order is by discovery if not specified.
  • -m: Display mode, valid values are (-m:160a, -m:160b, -m:320a, -m:320b, -m:320c*, -m:320d*) - Optional, default is 160a if not specified.
  • -z Number of scan lines per zone, valid values are 1-16 - Optional, default is 16 if not specified
  • -s Starting x,y point. This specifies the upper-left corner of the graphics within the bitmap you are trying to convert. This option is usually (but not always) used when working with a mixed mode bitmap. - Optional, default is 0,0 if not specified
  • -e Ending x,y point. This specifies the lower-right corner of the graphics within the bitmap you are trying to convert. This option is also usually (but not always) used when working with a mixed mode bitmap. - Optional, default is the end of the bitmap if not specified
  • -a Append mode. This option is used when working with a mixed mode bitmap. It tells the utility to a) append the data to the Output file, and b) don't pad the bytes out to a page length. You would use this option for every pass of the utility (including the final one - see example) - Optional
  • -f Final mode. This option is used with the '-a' option above. It allows append mode to add the data to the output file, but additionally pads the bytes out to a page length. It also allows the final preparation for DASM. (see example below) - Optional
*320c and 320d modes are not supported, yet.