| |
awsm
Registered: Feb 2015 Posts: 13 |
Details of the SpritePad SPD format
Im currently working on a sprite tool that supports the Spritepad 2.x format.
I was hoping someone could help my understand the internal format better?
Bytes $00, $01, $02
always SPD
Byte $03
?? - What does this one do?
Byte $04
The number of sprites
Byte $05
?? - What does this one do?
Bytes $06, $07, $08
Transparent, multicolor 1, multicolor 2
Byte $09
Start of sprite data (63 bytes)
followed by the 64th byte with multicolor/singlecolor (high nibble) and sprite color (low nibble)
I figured that after the last sprite some more data follows, which I expect to contain the animation sequences?
Anything else I should know?
Thanks in advance! |
|
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
byte 3 is probably version number as per char pad format |
| |
Shine
Registered: Jul 2012 Posts: 349 |
Maybe Soci could help.
View64 V1.60
...
- Support for Spritepad SPD files
... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Do you now see why open sourcing the tools is a good idea, even if they're hacks in VB or something. :) |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
The CharPad format is documented with the release though, guess since the SpritePad is BETA they haven't.. |
| |
soci
Registered: Sep 2003 Posts: 479 |
I haven't checked 2.x much as it's not possible to run it on ReactOS (1.8.1 works ok).
Bit 4 is the sprite overlay flag in the last byte, rest is ok.
The animation stuff I haven't researched as it was out of scope for view64. Byte 5 might be related to it. |
| |
soci
Registered: Sep 2003 Posts: 479 |
I think this is it:
v1:
1 byte - 0-3 background
1 byte - 0-3 multicolour 1
1 byte - 0-3 multicolour 2
repeated for each sprite:
63 bytes - sprite data
1 byte - flags 0-3 colour, 4 overlay, 7 multi
v2:
3 bytes - magic "SPD"
1 byte - version (1)
1 byte - number of sprites - 1
1 byte - number of animations - 1
1 byte - 0-3 background
1 byte - 0-3 multicolour 1
1 byte - 0-3 multicolour 2
repeated for each sprite:
63 bytes - sprite data
1 byte - flags 0-3 colour, 4 overlay, 7 multi
animation settings split into 4 arrays:
n bytes - animation starts
n bytes - animation ends
n bytes - timers
n bytes - flags 4 ping-pong, 5 overlay, 7 valid
|
| |
awsm
Registered: Feb 2015 Posts: 13 |
Thank you soci for the analysis, this was very helpful. |