1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-20 16:16:34 +00:00

Transition to different memory format with all AUX pixels then all MEM pixels per scanline instead of interleaving them

This commit is contained in:
David Schmenk
2024-09-14 10:38:33 -07:00
parent 2a9eb9c55d
commit f9cd6cac29
3 changed files with 437 additions and 422 deletions
+12 -12
View File
@@ -28,18 +28,18 @@ import dcgrlib
predef dcgrPlotScr(x, y)#0
predef dcgrHLinScr(x1, x2, y)#0
predef dcgrVlinScr(y1, y2, x)#0
predef dcgrBitScr(x, y, w, h, bitptr)#0
predef dcgrPixScr(x, y, w, h, pixptr)#0
predef dcgrPlotMem(x, y, w, h, dstptr, dstspan)#0
predef dcgrHLinMem(x1, x2, y, dstptr, dstspan)#0
predef dcgrVLinMem(y1, y2, x, dstptr, dstspan)#0
predef dcgrBitMem(x, y, w, h, bitptr, dstw, dsth, dstptr, dstspan)#0
predef dcgrPixMem(x, y, w, h, pixptr, dstw, dsth, dstptr, dstspan)#0
predef dcgrScrBl7Mem(x7, y, w7, h, dstptr, dstspan)#0
predef dcgrMemBl7Scr(x7, y, w7, h, srcptr, srcspan)#0
predef dcgrMemBl7Mem(x7, y, w7, h, srcptr, srcspan, dstw7, dsth, dstptr, dstspan)#0
predef dcgrFillBl7Scr(x7, y, w7, h)#0
predef dcgrFillBl7Mem(x7, y, w7, h, dstptr, dstspan)#0
predef dcgrBitScr(x, y, bitw, bith, bitptr)#0
predef dcgrPixScr(x, y, pixw, pixh, pixptr)#0
predef dcgrPlotMem(x, y, memptr, memspan)#0
predef dcgrHLinMem(x1, x2, y, memptr, memspan)#0
predef dcgrVLinMem(y1, y2, x, memptr, memspan)#0
predef dcgrBitMem(x, y, bitw, bith, bitptr, memw, memh, memptr, memspan)#0
predef dcgrPixMem(x, y, pixw, pixh, pixptr, memw, memh, memptr, memspan)#0
predef dcgrScrBl7Mem(x7, y, w7, h, memptr, memspan)#0
predef dcgrMemBl7Scr(x7, y, w7, h, memptr, memspan)#0
predef dcgrMemBl7Mem(x7, y, srcw7, srch, srcptr, srcspan, dstw7, dsth, dstptr, dstspan)#0
predef dcgrClearBl7Scr(x7, y, w7, h)#0
predef dcgrClearBl7Mem(x7, y, w7, h, memptr, memspan)#0
predef dcgrVLB#0
predef dcgrOpScr(op)#0
predef dcgrOpMem(op)#0
File diff suppressed because it is too large Load Diff
+12 -12
View File
@@ -178,7 +178,7 @@ def dcgrBoldStrScr(x, y, strptr)#0
dcgrColor(DCLR_BLACK)
dcgrStrScr(x, y, strptr)
end
def dcgrFillMem(x, y, w, h, dstptr, dstspan)#0
def dcgrRectMem(x, y, w, h, dstptr, dstspan)#0
byte x2, y2, v
if x < 0; w = w + x; x = 0; fin
@@ -201,20 +201,20 @@ def compileSprite#0
byte i
for i = 0 to 6
dcgrOpMem(OP_SRC)
sprite7[i], sprite7span, sprite7width = dcgrAllocBl7Mem(16, 16)
sprite7mask[i], sprite7span, sprite7width = dcgrAllocBl7Mem(16, 16)
dcgrColor(DCLR_BLACK)
dcgrFillBl7Mem(0, 0, sprite7width, 16, sprite7[i], sprite7span)
dcgrClearBl7Mem(0, 0, sprite7width, 16, sprite7[i], sprite7span)
dcgrColor(DCLR_WHITE)
dcgrFillBl7Mem(0, 0, sprite7width, 16, sprite7mask[i], sprite7span)
dcgrOpMem(OP_SRC)
dcgrPixMem(i + 2, 0, 16, 16, @sprite, sprite7width * 7, 16, sprite7[i], sprite7span)
dcgrClearBl7Mem(0, 0, sprite7width, 16, sprite7mask[i], sprite7span)
dcgrPixMem(i + 2, 0, 16, 16, @sprite, sprite7width * 7, 16, sprite7[i], sprite7span)
dcgrPixMem(i + 2, 0, 16, 16, @sprite, sprite7width * 7, 16, sprite7mask[i], sprite7span)
dcgrOpMem(OP_XOR)
dcgrPixMem(i + 2, 0, 16, 16, @sprite, sprite7width * 7, 16, sprite7mask[i], sprite7span)
dcgrMemBl7Scr(0, i*16, sprite7width, 16, sprite7[i], sprite7span)
dcgrMemBl7Scr(3, i*16, sprite7width, 16, sprite7mask[i], sprite7span)
dcgrMemBl7Scr(4, i*16, sprite7width, 16, sprite7mask[i], sprite7span)
next
dcgrOpMem(OP_SRC)
end
@@ -224,7 +224,6 @@ def dcgrTest#0
word restrblk, restrspan, restrw7, restrw
byte mode
mode = 2
setlineplot(@dcgrPlotScr)
setlinespans(@dcgrHLinScr, @dcgrVLinScr)
for i = 0 to 191 step 2
@@ -236,7 +235,7 @@ def dcgrTest#0
linespans(0, 0, i, 191)
next
dcgrColor(DCLR_BLACK)
dcgrFillBl7Scr(21/7, 30, 100/7, 132)
dcgrClearBl7Scr(21/7, 30, 100/7, 132)
dcgrColor(DCLR_WHITE)
dcgrHLinScr((21/7)*7-1, (21/7)*7+(100/7)*7, 29)
dcgrHLinScr((21/7)*7-1, (21/7)*7+(100/7)*7, 29+133)
@@ -250,6 +249,7 @@ def dcgrTest#0
dcgrScrBl7Mem(0, 170, backw7, 16, backblk, backspan)
restrblk, restrspan, restrw7 = dcgrAllocBl7Mem(16, 16)
restrw = restrw7 * 7
mode = 8
while mode
if ^$C000 >= 128
mode = (^$C010 & $7F) - '0'
@@ -270,7 +270,7 @@ def dcgrTest#0
k7--
km7 = 7 + km7
fin
dcgrMemBl7Mem(0, 0, restrw7, 16, backblk + (k7 << 2), backspan, restrw7, 16, restrblk, restrspan)
dcgrMemBl7Mem(0, 0, restrw7, 16, backblk + (k7 << 1), backspan, restrw7, 16, restrblk, restrspan)
dcgrOpMem(OP_AND)
dcgrMemBl7Mem(0, 0, sprite7width, 16, sprite7mask[km7], sprite7span, restrw7, 16, restrblk, restrspan)
dcgrOpMem(OP_XOR)
@@ -281,16 +281,16 @@ def dcgrTest#0
is 3
dcgrPixScr(i, j, 16, 16, @sprite)
is 4
dcgrMemBl7Mem(0, 0, restrw7, 16, backblk + (k7 << 2), backspan, restrw7, 16, restrblk, restrspan)
dcgrMemBl7Mem(0, 0, restrw7, 16, backblk + (k7 << 1), backspan, restrw7, 16, restrblk, restrspan)
dcgrPixMem(km7 + 2, 0, 16, 16, @sprite, restrw, 16, restrblk, restrspan)
dcgrMemBl7Scr(k7, 170, restrw7, 16, restrblk, restrspan)
break
is 5
dcgrPixScr(i, j, 16, 16, @sprite)
is 6
dcgrMemBl7Mem(0, 0, restrw7, 16, backblk + (k7 << 2), backspan, restrw7, 16, restrblk, restrspan)
dcgrMemBl7Mem(0, 0, restrw7, 16, backblk + (k7 << 1), backspan, restrw7, 16, restrblk, restrspan)
dcgrColor(DCLR_BLACK)
dcgrFillMem(km7 + 2, 4, 14, 8, restrblk, restrspan)
dcgrRectMem(km7 + 2, 4, 14, 8, restrblk, restrspan)
dcgrColor(DCLR_WHITE)
dcgrStrMem(km7 + 2, 4, "DC", restrw, 16, restrblk, restrspan)
dcgrMemBl7Scr(k7, 170, restrw7, 16, restrblk, restrspan)