I would like to save the entire screen (all chars with the colors) very quickly in an bank.
and then again very quickly with the colors on the screen.
Thanks.
greeting
Code: Select all
%import textio
%import palette
%import bmx
%option no_sysinit
%zeropage basicsafe
%import syslib
%import math
%import gfx2
main {
ubyte x
ubyte y
ubyte x1
ubyte y1
ubyte col
ubyte new_direction
const uword VERA_CHARSET = $f000 ; $1f000
const uword VERA_TXTSCREEN = $b000 ; %1b000
sub start() {
txt.clear_screen()
makechar()
col=0
waitkey:
col=col+1
sys.waitvsync()
ubyte key=cbm.GETIN()
keypress(key)
goto waitkey
}
sub screen() {
for y1 in 0 to 60 {
cx16.vaddr_autoincr(1, VERA_TXTSCREEN + y1*$0100, 0, 2)
for x1 in 0 to 79 {
cx16.VERA_DATA0 = 32
}
}
}
sub links() {
x=x-1
if x == $ff
x=0
txt.plot(x,y)
txt.print("@")
txt.color(col)
}
sub rechts() {
x=x+1
if x > 79
x=79
txt.plot(x,y)
txt.print("@")
txt.color(col)
}
sub unten() {
y=y+1
if y > 58
y=58
txt.plot(x,y)
txt.print("@")
txt.color(col)
}
sub oben() {
y=y-1
if y == $ff
y=0
txt.plot(x,y)
txt.print("@")
txt.color(col)
}
sub keypress(ubyte key) {
when key {
'q' -> links()
'e' -> rechts()
'w' -> oben()
's' -> unten()
'r' -> screensave()
'r' -> screenload()
}
}
sub screensave() {
.....
.....
}
sub screenload() {
.....
.....
}
sub makechar() {
ubyte b
cx16.vaddr_autoincr(1, VERA_CHARSET, 0, 1)
b=255
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=255
cx16.VERA_DATA0 = b
b=131
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=255
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=255
cx16.VERA_DATA0 = b
b=128+64+2+1
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=129
cx16.VERA_DATA0 = b
b=255
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
b=24
cx16.VERA_DATA0 = b
}
}