diff --git a/samples/int/carrera3d.bas b/samples/int/carrera3d.bas index 8b08620..4c97a9d 100644 --- a/samples/int/carrera3d.bas +++ b/samples/int/carrera3d.bas @@ -85,9 +85,7 @@ if gbase&960 = 960 gbase = gbase+256 endif - next y - ' Moved here to optimize space, corresponds to the clearing of PM data - dpoke pmadr,0 + next y ' Adds display list first and last bytes to all DLs d = dlist @@ -104,8 +102,8 @@ d = d + 88 next curvature - ' Sets PM data (continued from above) - move pmadr, pmadr+1, 999 + ' Clears PM data + mset pmadr, 999, 0 ' Our car bitmap data for the PM 0 and 1 data pm1() byte = $18,$18,$18,$3C,$3C,$24,$24,$3C,$00,$18,$18,$3C,$7E,$7E,$00,$FF,$00,$7E,$7E diff --git a/samples/int/pmtest.bas b/samples/int/pmtest.bas index 47ff076..76483ef 100644 --- a/samples/int/pmtest.bas +++ b/samples/int/pmtest.bas @@ -9,7 +9,7 @@ poke RAMTOP, MemTop ' Activate and configure P/M data graphics 0 -poke P0Mem, 0 : move P0Mem, P0Mem+1, 127 : ' Clears Memory +mset P0Mem, 128, 0 ' Clears Memory poke PCOLR0, $1F poke SDMCTL, Peek(SDMCTL) ! 8 poke PMBASE, MemTop @@ -17,7 +17,6 @@ poke GRACTL, 2 ' P/M data and blank (to clear P/M) DATA PMdata() byte = $38,$44,$54,$44,$38 -DATA PMclear() byte = $00,$00,$00,$00,$00 ' Initial Conditions xPos = 6400 : yPos = 2560 @@ -35,22 +34,23 @@ repeat else if xPos < 6400 Then xSpd = -xSpd endif - exec MovePm : ' Move P/M Graphics + exec MovePm ' Move P/M Graphics until Key() ' Restore RAMTOP and SDMCTL poke GRACTL, 0 poke SDMCTL, Peek(SDMCTL) & 247 poke RAMTOP, MemTop + 4 +graphics 0 END proc MovePm x = xPos / 128 : y = P0Mem + yPos / 128 - poke $D01A,$74 : ' Change background color + poke $D01A,$74 ' Change background color pause 0 poke HPOSP0, x - move adr(PMclear), oldPos, 5 - move adr(PMdata), y, 5 + mset oldPos, 5, 0 + move adr(PMdata), y, 5 oldPos = y endproc