12-10-2024, 02:33 AM
Just as my example above for a graphic screen, I'd simply do this the exact same way for a SCREEN 0 screen, as illustrated below:
Code: (Select All)
Dim Shared As Long Display, Widescreen
Display = _NewImage(120, 30, 0)
Widescreen = _NewImage(360, 90, 0) '3 times the display size.
Screen Display
_Dest Widescreen
'Fill the widescreen with some text
For xframe = 0 To 2
For yframe = 0 To 2
c = c + 1
For y = 1 To 30
Color 15 - c, c
Locate yframe * 30 + y, xframe * 120 + 1
p$ = Str$(y) + ") LINE NUMBER #" + Str$(y) + Space$(120)
p$ = Left$(p$, 120)
Print p$;
Next
Next
Next
xstart = 1: ystart = 1
Do
While _MouseInput: Wend
If _MouseX <= 3 Then xstart = xstart - 1
If _MouseX >= 118 Then xstart = xstart + 1
If _MouseY <= 3 Then ystart = ystart - 1
If _MouseY >= 28 Then ystart = ystart + 1
If xstart < 1 Then xstart = 1
If ystart < 1 Then ystart = 1
If xstart > 241 Then xstart = 241
If ystart > 61 Then ystart = 61
PutZero xstart, ystart
_Limit 30
Loop Until _KeyHit
Sub PutZero (xstart, ystart)
Dim As _MEM m(1)
m(0) = _MemImage(Display)
m(1) = _MemImage(Widescreen)
Dim As _Integer64 yOffset, xOffset, y
yOffset = (ystart - 1) * 720
xOffset = (xstart - 1) * 2
Dim temp As String * 240
For y = 0 To 29
_MemGet m(1), m(1).OFFSET + yOffset + y * 720 + xOffset, temp
_MemPut m(0), m(0).OFFSET + y * 240, temp
Next
_MemFree m(0)
_MemFree m(1)
End Sub