-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScreenCapture.spin
More file actions
33 lines (27 loc) · 871 Bytes
/
ScreenCapture.spin
File metadata and controls
33 lines (27 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'' Screen Capture Tool
'' -------------------------------------------------
'' Author: Marko Lukat
'' Last modified: 2015/10/26
'' Version: 0.3
'' -------------------------------------------------
''
'' ### Usage
''
'' * Include the *ScreenCapture* object into your project
'' * Pass a screen buffer address to the Capture method
'' * Output is captured and converted with lscapture (host side).
''
'' *NOTE: you may also pass a 128x64 sprite as an address, if you skip the sprite header.*
OBJ
ser : "LameSerial"
VAR
long cog
PUB null
PUB Capture(addr)
ifnot cog
ifnot cog := ser.StartRxTx(31, 30, 0, 921600)
return
waitcnt(clkfreq*3 + cnt)
ser.Str(string($AA, $AA, $AA, $AA)) ' header
repeat 2048 ' 128x64x2/8
ser.Char(byte[addr++])