commit 7bcc8de

zzo38  ·  2024-08-01 02:24:42 +0000 UTC
parent bd8b7bb
Add quick reference sheet file
1 files changed,  +119, -0
+119, -0
  1@@ -0,0 +1,119 @@
  2+% Quick reference sheet for uxn/varvara.
  3+% (public domain)
  4+
  5+% Data
  6+/Data [
  7+  [() 0 (Exp) 0 (wst) (rst) (Meta) 0 (Red) 0 (Green) 0 (Blue) 0 (Debug) (Quit)] %00
  8+  [(Vector) 0 (In) () 0 0 0 (Type) (Out) (Err) () 0 0 0 0 0] %10
  9+  [(Vector) 0 (Width) 0 (Height) 0 (Auto) () (X) 0 (Y) 0 (Address) 0 (Pixel) (Sprit)] %20
 10+  [(Vector) 0 (Position) 0 (Out) () 0 0 (ADSR) 0 (Length) 0 (Address) 0 (Vol) (Note)] %30
 11+  dup %40
 12+  dup %50
 13+  dup %60
 14+  [16 {0} repeat] %70
 15+  [(Vector) 0 (P1) (Key) () 0 (P2) (P3) (P4) () 0 0 0 0 0 0 0] %80
 16+  [(Vector) 0 (MouseX) 0 (MouseY) 0 (Buttons) 0 () 0 (ScrollX) 0 (ScrollY) 0 () 0 0] %90
 17+  [() 0 (Success) 0 (Stat) 0 (Del) (Apend) (Name) 0 (Length) 0 (Read) 0 (Write) 0] %a0
 18+  dup %b0
 19+  [(Year) 0 (Month) (Day) (Hour) (Min) (Sec) (Wday) (Yday) 0 (DST) () 0 0 0 0] %c0
 20+  [16 {0} repeat] %d0
 21+  dup %e0
 22+  dup %f0
 23+] def
 24+/BitsData [
 25+  [(Count-1) 0 0 0 () (Addr) (Y) (X)  (Auto)]
 26+  [(Fill) (Fore) (Corner) 0 () 0 (Color) 0  (Pixel)]
 27+  [(2bpp) (Fore) (Vflip) (Hflip) (Color) 0 0 0  (Sprit)]
 28+  [(/Loop) (MIDI_Note) 0 0 0 0 0 0  (Note)]
 29+  [(Right) (Left) (Down) (Up) (Start) (Sel) (B) (A)  (P1)]
 30+] def
 31+
 32+% Page setup
 33+<< /PageSize [792 612] /UseFastColor true >> setpagedevice
 34+/Courier 14 selectfont
 35+.75 setlinewidth
 36+0 setgray
 37+
 38+% Draw devices
 39+0 1 15 {
 40+  /I exch def
 41+  % Columns
 42+  newpath 39 I 45 mul add 593 moveto
 43+  I 16 (?) cvrs show
 44+  % Rows
 45+  newpath 14 570 I 18 mul sub moveto
 46+  gsave
 47+    0 3 rmoveto I 16 (?) cvrs show
 48+  grestore
 49+  20 0 rmoveto
 50+  720 0 rlineto 0 18 rlineto -720 0 rlineto 0 -18 rlineto
 51+  stroke
 52+  0 1 15 {
 53+    /J exch def
 54+    /D Data I get J get def
 55+    newpath 34 J 45 mul add 570 I 18 mul sub moveto
 56+    D 0 eq {
 57+      0 2 rlineto 0 14 rmoveto 0 2 rlineto
 58+      stroke
 59+    } {
 60+      gsave
 61+        0 18 rlineto stroke
 62+      grestore
 63+      2 3 rmoveto D show
 64+    } ifelse
 65+  } for
 66+} bind for
 67+
 68+% Bits
 69+0 1 7 {
 70+  /I exch def
 71+  newpath 15 I 60 mul add 266 moveto
 72+  16#80 I neg bitshift 16 (??) cvrs dup length 1 eq {(0) show} if show
 73+} bind for
 74+newpath 14 264 moveto
 75+gsave 480 0 rlineto stroke grestore
 76+BitsData {
 77+  /D exch def
 78+  gsave
 79+    0 -18 rlineto 480 0 rlineto 0 18 rlineto stroke
 80+  grestore
 81+  0 -18 rmoveto
 82+  gsave
 83+    D {
 84+      gsave
 85+      dup 0 eq {
 86+        pop
 87+        0 2 rlineto 0 14 rmoveto 0 2 rlineto
 88+        stroke
 89+      } {
 90+        gsave 2 3 rmoveto show grestore
 91+        0 18 rlineto stroke
 92+      } ifelse
 93+      grestore
 94+      60 0 rmoveto
 95+    } forall
 96+  grestore
 97+} bind forall
 98+
 99+% Colours of sprites
100+newpath 622 282 moveto
101+[
102+  (Color)
103+  (0123456789ABCDEF)
104+  (-0001-1122-2333-)
105+  (0123012301230123)
106+  (1231123112311231)
107+  (2312231223122312)
108+] {0 -16 rmoveto gsave show grestore} forall
109+/I (0) stringwidth pop 16 mul 4 add def
110+  -2 -2 rmoveto
111+  I 0 rlineto
112+  0 96 rlineto
113+  I neg 0 rlineto
114+  0 -96 rlineto
115+  0 64 rmoveto
116+  I 0 rlineto
117+stroke
118+
119+% Done
120+showpage quit