Merge pull request #4 from digarok/fix-readme

Fix readme
This commit is contained in:
Jason Andersen 2023-07-09 15:53:47 -04:00 committed by GitHub
commit 9a8848f415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 6 deletions

View File

@ -33,12 +33,12 @@ File Offset | Data | Comment
4 | {FileLength} | (32-bit long) File length in bytes
8 | {VL} | Version Low - File format Minor version, `0` for now
9 | {VH} | Version High - Bits: ```%RVVV_VVVV_VVVV_VVVV```
| | | `V` is Major version #, `0` for now
| | | `R` is the MSB, `R = 0` no ring frame
| | | `R = 1`, there is a ring frame
| | | _Ring Frame_ is a frame that will delta from the last frame of the animation back to the first for smoother looping. If a ring frame exists, it's also in the frame count.
0xA | {Width} `0x00A0` | (16-bit word) Width in bytes, typically 320/2 == 160 == 0x00A0
0xC | {Height} `0x00C8` | (16-bit word) Height in bytes, typically 200 == 0x00C8
| | | `V` is Major version #, `0` for now
| | | `R` is the MSB, `R = 0` no ring frame
| | | `R = 1`, there is a ring frame
| | | _Ring Frame_ is a frame that will delta from the last frame of the animation back to the first for smoother looping. If a ring frame exists, it's also in the frame count.
0xA | {Width} `0x00A0` | (16-bit word) Width in bytes, typically 320/2 == 160 == 0x00A0
0xC | {Height} `0x00C8` | (16-bit word) Height in bytes, typically 200 == 0x00C8
0xE | {FrameLength} `0x8000` | (16-bit word) Frame size in bytes, since a "Frame" may contain more than just the width * height, worth of pixels. For now this is `$8000`, or 32768
0x10 | {FrameCount} | (32-bit long) Frame Count (total, including ring frame)
| | _HEADER END HERE_ |
@ -82,12 +82,20 @@ Command Word, encoded low-high, what the bits mean:
`xxx_xxxx_xxxx_xxx` is the number of bytes 1-16384 to follow (0 == 1 byte)
#### Copy Commands
`%0xxx_xxxx_xxxx_xxx1` - Copy Bytes - straight copy bytes
`%1xxx_xxxx_xxxx_xxx1` - Skip Bytes - skip bytes / move the cursor
`%1xxx_xxxx_xxxx_xxx0` - Dictionary Copy bytes from frame buffer to frame buffer
#### Control Commands
`%0000_0000_0000_0000` - Source Skip -> Source pointer skips to next bank of data
`%0000_0000_0000_0010` - End of Frame - end of frame
`%0000_0000_0000_0110` - End of Animation / End of File / No more frames
- other remaining codes, are reserved for future expansion