<article>
<title>sp65 Users Guide
-<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
+<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
<date>2012-03-11
<abstract>
Long options:
--convert-to fmt[,attrlist] Convert into target format
+ --dump-palette Dump palette as table
--help Help (this text)
--list-conversions List all possible conversions
--pop Restore the original loaded image
see section <ref id="conversions" name="Conversions">.
+ <label id="option--dump-palette">
+ <tag><tt>--dump-palette</tt></tag>
+
+ Dump palette as table.
+
+
<label id="option--help">
<tag><tt>-h, --help</tt></tag>
<sect1>Lynx sprite<p>
+Lynx can handle 1, 2, 3 and 4 bits per pixel indexed sprites. The maximum size
+of a sprite is roughly 508 pixels but in reality the Lynx screen is only 160 by
+102 pixels which makes very large sprites useless.
+
+The number per pixels is taken from the number of colors of the input bitmap.
+
+There are a few attributes that you can give to the conversion software.
+
+<descrip>
+
+ <tag/mode/
+ The first is what kind of encoding to use for the sprite. The attribute for
+ this is called "mode" and the possible values are "literal", "packed" or
+ "transparent". The default is "packed" if no mode is specified.
+
+ The "literal" is a totally literal mode with no packing. In this mode the
+ number of pixels per scanline will be a multiple of 8 both right and left from
+ the action point.
+
+ If the source bitmap edge ends with a color where the least significant bit is
+ one then there will be an extra 8 zero bits on that scan line.
+
+ So if you are using totally literal sprites and intend to change them at
+ runtime then please add a single pixel border far left and far right with
+ zeros in order to prevent graphical glitches in the game.
+
+ The standard encoding is called "packed". In this mode the sprite is packed
+ using run-length encoding and literal coding mixed for optimisation to
+ produce a small sprite.
+
+ The last encoding mode "transparent" is like packed. But here we know that
+ the index 0 will be transparent so we can clip off all 0 pixels from the left
+ and right edge of the sprite. This will produce the smallest sprite possible
+ on the Lynx. The sprite is not rectangular anymore.
+
+ <tag/ax/
+ The sprite is painted around the Anchor point. The anchor point x can be
+ between 0 and the width of the sprite - 1. If anchor point x is zero then
+ painting the sprite in location 10,20 will set the left edge of the sprite
+ 10 pixels from the left of the Lynx screen. When the sprite is scaled by
+ hardware the anchor point stays in place and the sprite grows or shrinks
+ around the anchor point. The default value is 0 (left).
+
+ <tag/ay/
+ The sprite is painted around the Anchor point. The anchor point y can be
+ between 0 and the height of the sprite - 1. If anchor point y is zero then
+ painting the sprite in location 10,20 will set the top of the sprite 20
+ pixels from the top of the Lynx screen. When the sprite is scaled by
+ hardware the anchor point stays in place and the sprite grows or shrinks
+ around the anchor point. The default value is 0 (top).
+
+</descrip>
<sect1>VIC2 sprite<p>
The value for this attribute specifies the number of bytes output in one
line of the assembler file. The default is 16.
- <tag/label/
- If specified, an assembler label is added in front of the data.
-
- <tag/segment/
- If specified, a <tt/.SEGMENT/ directive is used to place the data into
- the given segment.
+ <tag/ident/
+ This is an optional attribute. When given, the output processor will wrap
+ the data into a <tt/.PROC/ with the given name. In addition, three constants
+ are added as local symbols within the <tt/.PROC/: <tt/COLORS/, <tt/WIDTH/
+ and <tt/HEIGHT/.
</descrip>
line of the C source code. The default is 16.
<tag/ident/
- This mandatory specifies the identifier which is used as the name of the
- variable that holds the output data.
+ This is an optional attribute. When given, the output processor will wrap
+ the data into an array of unsigned char with the given name. In addition,
+ three <tt/#define/s are added for <tt/<ident>_COLORS/,
+ <tt/<ident>_WIDTH/ and <tt/<ident>_HEIGHT/.
</descrip>
-<sect>Bugs/Feedback<p>
-
-If you have problems using the assembler, if you find any bugs, or if
-you're doing something interesting with the assembler, I would be glad to
-hear from you. Feel free to contact me by email
-(<htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">).
-
-
-
<sect>Copyright<p>
sp65 (and all cc65 binutils) are (C) Copyright 1998-2012 Ullrich von Bassewitz