mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-05 03:37:43 +00:00
Clean up dhgrPlot
This commit is contained in:
parent
2f7c1b3e59
commit
f5c562eafb
Binary file not shown.
@ -49,65 +49,98 @@ word = $2350,$2750,$2B50,$2F50,$3350,$3750,$3B50,$3F50
|
||||
word = $23D0,$27D0,$2BD0,$2FD0,$33D0,$37D0,$3BD0,$3FD0
|
||||
//
|
||||
// Pixel masks for 7 contiguous pixels
|
||||
//
|
||||
byte masks[] = $0F, $00, $00, $00 // $78, $00, $00, $00
|
||||
byte = $70, $01, $00, $00 // $03, $40, $00, $00
|
||||
byte = $00, $1E ,$00, $00 // $00, $3C, $00, $00
|
||||
byte = $00, $60, $03, $00 // $00, $03, $60, $00
|
||||
byte = $00, $00, $3C, $00 // $00, $00, $1E, $00
|
||||
byte = $00, $00, $40, $07 // $00, $00, $01, $70
|
||||
byte = $00, $00, $00, $78 // $00, $00, $00, $0F
|
||||
// AUXL AUXH MEML MEMH
|
||||
byte masks[] = $0F, $00, $00, $00
|
||||
byte = $70, $00, $01, $00
|
||||
byte = $00, $00, $1E ,$00
|
||||
byte = $00, $03, $60, $00
|
||||
byte = $00, $3C, $00, $00
|
||||
byte = $00, $40, $00, $07
|
||||
byte = $00, $00, $00, $78
|
||||
//
|
||||
// Solid colors
|
||||
//
|
||||
// AUXL AUXH MEML MEMH
|
||||
byte colors[] = $00, $00, $00, $00 // black
|
||||
byte = $08, $11, $22, $44 // magenta
|
||||
byte = $44, $08, $11, $22 // brown
|
||||
byte = $4C, $19, $33, $66 // orange
|
||||
byte = $22, $44, $08, $11 // dark green
|
||||
byte = $2A, $55, $2A, $55 // gray 1
|
||||
byte = $66, $4C, $19, $33 // green
|
||||
byte = $6E, $5D, $3B, $77 // yellow
|
||||
byte = $11, $22, $44, $08 // dark blue
|
||||
byte = $19, $33, $66, $4C // purple
|
||||
byte = $55, $2A, $55, $2A // gray 2
|
||||
byte = $5D, $3B, $77, $6E // pink
|
||||
byte = $33, $66, $4C, $19 // medium blue
|
||||
byte = $3B, $77, $6E, $5D // light blue
|
||||
byte = $77, $6E, $5D, $3B // aqua
|
||||
byte = $08, $22, $11, $44 // magenta
|
||||
byte = $44, $11, $08, $22 // brown
|
||||
byte = $4C, $33, $19, $66 // orange
|
||||
byte = $22, $08, $44, $11 // dark green
|
||||
byte = $2A, $2A, $55, $55 // gray 1
|
||||
byte = $66, $19, $4C, $33 // green
|
||||
byte = $6E, $3B, $5D, $77 // yellow
|
||||
byte = $11, $44, $22, $08 // dark blue
|
||||
byte = $19, $66, $33, $4C // purple
|
||||
byte = $55, $55, $2A, $2A // gray 2
|
||||
byte = $5D, $77, $3B, $6E // pink
|
||||
byte = $33, $4C, $66, $19 // medium blue
|
||||
byte = $3B, $6E, $77, $5D // light blue
|
||||
byte = $77, $5D, $6E, $3B // aqua
|
||||
byte = $7F, $7F, $7F, $7F // white
|
||||
word clr = @colors
|
||||
//
|
||||
// Modulo 7
|
||||
//
|
||||
byte mod7[] = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
byte = 0, 1, 2, 3, 4, 5, 6
|
||||
//
|
||||
// Divide 7
|
||||
//
|
||||
byte div7[] = 0, 0, 0, 0, 0, 0, 0
|
||||
byte = 1, 1, 1, 1, 1, 1, 1
|
||||
byte = 2, 2, 2, 2, 2, 2, 2
|
||||
byte = 3, 3, 3, 3, 3, 3, 3
|
||||
byte = 4, 4, 4, 4, 4, 4, 4
|
||||
byte = 5, 5, 5, 5, 5, 5, 5
|
||||
byte = 6, 6, 6, 6, 6, 6, 6
|
||||
byte = 7, 7, 7, 7, 7, 7, 7
|
||||
byte = 8, 8, 8, 8, 8, 8, 8
|
||||
byte = 9, 9, 9, 9, 9, 9, 9
|
||||
byte =10,10,10,10,10,10,10
|
||||
byte =11,11,11,11,11,11,11
|
||||
byte =12,12,12,12,12,12,12
|
||||
byte =13,13,13,13,13,13,13
|
||||
byte =14,14,14,14,14,14,14
|
||||
byte =15,15,15,15,15,15,15
|
||||
byte =16,16,16,16,16,16,16
|
||||
byte =17,17,17,17,17,17,17
|
||||
byte =18,18,18,18,18,18,18
|
||||
byte =19,19,19,19,19,19,19
|
||||
|
||||
def dhgrcolor(c)#0
|
||||
clr = @colors + ((c & $0F) << 2)
|
||||
end
|
||||
def dhgrplot(x, y)#0
|
||||
word scanaddr, maskblk
|
||||
byte pixblk, pixofst, pixbyte
|
||||
word pixaddr, maskblk, mask
|
||||
|
||||
pixblk, pixofst = divmod(x, 7)
|
||||
maskblk = @masks + pixofst * 4
|
||||
scanaddr = hgrscan[y] + pixblk * 2
|
||||
if ^maskblk
|
||||
pixaddr = hgrscan[y] + div7[x] * 2
|
||||
maskblk = @masks + mod7[x] * 4
|
||||
mask = *maskblk
|
||||
if mask
|
||||
^page1x
|
||||
pixbyte = ^scanaddr & ~(^maskblk)
|
||||
^scanaddr = pixbyte | (^maskblk & ^clr)
|
||||
*pixaddr = (*pixaddr & ~mask) | (mask & *clr)
|
||||
fin
|
||||
if ^(maskblk + 1)
|
||||
mask = *(maskblk + 2)
|
||||
if mask
|
||||
^page1m
|
||||
pixbyte = ^scanaddr & ~(^(maskblk + 1))
|
||||
^scanaddr = pixbyte | (^(maskblk + 1) & ^(clr + 1))
|
||||
fin
|
||||
scanaddr++
|
||||
if ^(maskblk + 2)
|
||||
^page1x
|
||||
pixbyte = ^scanaddr & ~(^(maskblk + 2))
|
||||
^scanaddr = pixbyte | (^(maskblk + 2) & ^(clr + 2))
|
||||
fin
|
||||
if ^(maskblk + 3)
|
||||
^page1m
|
||||
pixbyte = ^scanaddr & ~(^(maskblk + 3))
|
||||
^scanaddr = pixbyte | (^(maskblk + 3) & ^(clr + 3))
|
||||
*pixaddr = (*pixaddr & ~mask) | (mask & *(clr + 2))
|
||||
fin
|
||||
end
|
||||
def dhgrmode(mode)
|
||||
|
@ -152,6 +152,8 @@ cp samplesrc/fppow.pla prodos/bld/samples/FPPOW.PLA.TXT
|
||||
cp utilsrc/apple/mon.pla prodos/bld/samples/MON.PLA.TXT
|
||||
cp utilsrc/apple/zipchip.pla prodos/bld/samples/ZIPCHIP.PLA.TXT
|
||||
|
||||
cp libsrc/apple/dhgrlib.pla prodos/bld/DHGR.PLA.TXT
|
||||
|
||||
mkdir prodos/bld/scripts
|
||||
cp scripts/rod.4th prodos/bld/scripts/ROD.4TH.TXT
|
||||
cp scripts/bounce.4th prodos/bld/scripts/BOUNCE.4TH.TXT
|
||||
|
Loading…
x
Reference in New Issue
Block a user