picview.asm: improve documentation
This commit is contained in:
parent
d36cf2d14a
commit
15ba54eb77
@ -1,31 +0,0 @@
|
|||||||
XX format => text/bitmap color/multicolor / extended background mode
|
|
||||||
|
|
||||||
$D020, 15 octets :
|
|
||||||
BO BORDER
|
|
||||||
BA BACKGROUND
|
|
||||||
E1 Extra background color #1
|
|
||||||
E2 Extra background color #2
|
|
||||||
E3 Extra background color #3
|
|
||||||
SE1 sprite extra color #1
|
|
||||||
SE2 sprite extra color #2
|
|
||||||
S0 sprite #0
|
|
||||||
S1 sprite #1
|
|
||||||
S2 sprite #2
|
|
||||||
S3 sprite #3
|
|
||||||
S4 sprite #4
|
|
||||||
S5 sprite #5
|
|
||||||
S6 sprite #6
|
|
||||||
S7 sprite #7
|
|
||||||
|
|
||||||
TP
|
|
||||||
T = type
|
|
||||||
0 - end of file
|
|
||||||
1 - bitmap
|
|
||||||
2 - screen ram
|
|
||||||
3 - color ram
|
|
||||||
4 - border/background etc.
|
|
||||||
P = packing
|
|
||||||
0 - no packing
|
|
||||||
1 - RLE packing
|
|
||||||
2 - color ram RLE packing
|
|
||||||
|
|
||||||
49
misc/c64viewer/README.md
Normal file
49
misc/c64viewer/README.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# picview.asm (c) 2019 Thomas Bernard
|
||||||
|
|
||||||
|
This is a C64 image depacker and viewer designed to build self-displaying
|
||||||
|
.prg pictures files.
|
||||||
|
One has to concatenate the data to the viewer machine code to build a .prg
|
||||||
|
file.
|
||||||
|
|
||||||
|
## Data format
|
||||||
|
- 1 byte for mode
|
||||||
|
- then one or several blocks, composed of :
|
||||||
|
1. 1 byte TP header :
|
||||||
|
- upper nibble T is type
|
||||||
|
- lower nibble P is packing
|
||||||
|
2. n bytes data load, depending of type and packing
|
||||||
|
|
||||||
|
### Mode byte
|
||||||
|
0EBM0000 E=Extended Background mode. B=Bitmap Mode. M=Multicolor.
|
||||||
|
|
||||||
|
### TP byte
|
||||||
|
- T = type
|
||||||
|
- 0 - end of file
|
||||||
|
- 1 - bitmap 8000 bytes
|
||||||
|
- 2 - screen ram 1000 bytes
|
||||||
|
- 3 - color ram 1000 bytes at $D800
|
||||||
|
- 4 - border/background etc. 15 bytes at $D020
|
||||||
|
- P = packing
|
||||||
|
- 0 - no packing
|
||||||
|
- 1 - RLE packing
|
||||||
|
- 2 - color ram RLE packing
|
||||||
|
|
||||||
|
All other values are reserved.
|
||||||
|
|
||||||
|
|
||||||
|
## border/backgrounds at $D020, 15 bytes
|
||||||
|
- BO BORDER
|
||||||
|
- BA BACKGROUND
|
||||||
|
- E1 Extra background color #1
|
||||||
|
- E2 Extra background color #2
|
||||||
|
- E3 Extra background color #3
|
||||||
|
- SE1 sprite extra color #1
|
||||||
|
- SE2 sprite extra color #2
|
||||||
|
- S0 sprite #0
|
||||||
|
- S1 sprite #1
|
||||||
|
- S2 sprite #2
|
||||||
|
- S3 sprite #3
|
||||||
|
- S4 sprite #4
|
||||||
|
- S5 sprite #5
|
||||||
|
- S6 sprite #6
|
||||||
|
- S7 sprite #7
|
||||||
@ -5,6 +5,25 @@
|
|||||||
;
|
;
|
||||||
; This code is embedded in C64 images saved by GrafX2, it can be distributed
|
; This code is embedded in C64 images saved by GrafX2, it can be distributed
|
||||||
; and modified without any restrictions.
|
; and modified without any restrictions.
|
||||||
|
;
|
||||||
|
; Designed to be built with The Ophis Assembler :
|
||||||
|
; https://michaelcmartin.github.io/Ophis/
|
||||||
|
; C64 picture unpacker and viewer.
|
||||||
|
; - Supports all VIC-II modes, character or bitmap based.
|
||||||
|
; - Supports raw data, RLE packing and specific color RAM RLE packing
|
||||||
|
;
|
||||||
|
; Memory map :
|
||||||
|
; $0002 Low byte of count
|
||||||
|
; $00FC-$00FD Data pointer
|
||||||
|
; $0801-$080C Basic program : trampoline code
|
||||||
|
; $080D-$xxxx 6502 machine language code
|
||||||
|
; $xxxx-$xxxx (packed) picture data
|
||||||
|
; $C000-$C3E8 Screen RAM \
|
||||||
|
; $C3F0-$C3FF VIC-II $D020-$D02E backup )- Upper RAM area
|
||||||
|
; $C400-$C7FF Color RAM backup /
|
||||||
|
; $D000-$D02E VIC-II registers (writes from $D020 to $D02E)
|
||||||
|
; $D800-$DBFF Color RAM
|
||||||
|
; $E000-$FF40 Bitmap (behind KERNAL ROM)
|
||||||
.word $0801
|
.word $0801
|
||||||
.org $0801
|
.org $0801
|
||||||
.word next, 1911 ; next basic line and line number
|
.word next, 1911 ; next basic line and line number
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user