commit bcda6dc
zzo38
·
2022-11-02 03:36:24 +0000 UTC
parent 365e406
Some improvements to varvara.doc
1 files changed,
+30,
-2
+30,
-2
1@@ -82,6 +82,10 @@ colours. If the foreground colour is zero then the background is displayed.
2
3 The vector is called during each video frame (60 frames per second).
4
5+Writing the width and height will change the window size if possible (some
6+implementations might not be able to do so), and should clear the screen.
7+(If you read back then you can find the actual width/height.)
8+
9 The auto port works as follows:
10 bit7-bit4 = One less than number of sprites to draw
11 bit3 = Unused (should be clear)
12@@ -102,6 +106,8 @@ are as follows:
13 bit4 = Horizontal flip
14 bit3-bit0 = Colour
15
16+(TODO: explain sprites better)
17+
18
19 === Audio ===
20
21@@ -110,7 +116,8 @@ are as follows:
22
23 === MIDI ===
24
25-(TODO)
26+This does not seem to be fully defined at this time (and the existing
27+design is not very good in my opinion).
28
29
30 === Keyboard/joypad ===
31@@ -147,6 +154,8 @@ The key is the ASCII code of the key pushed.
32 The vector is called when the mouse is moved or if any mouse buttons are
33 pushed or released.
34
35+The scroll amounts are signed 16-bit numbers.
36+
37
38 === Files ===
39
40@@ -164,7 +173,23 @@ then the device is reset and it remembers the file name (so the memory
41 used to store it can be reused afterward).
42
43 All other operations need the maximum length in that port, and then
44-write the address of the data to the stat/read/write port.
45+write the address of the data to the stat/read/write port. The 0xA2 port
46+(or 0xB2 for the second file) will then have the number of bytes which
47+have been successfully transferred, or zero if it is not successful.
48+
49+If there are multiple reads without other operations (including setting
50+the file name) in betwee, or multiple writes without other operations
51+(including setting the file name) in betwee, then it will continue from
52+where it left off in the file; otherwise it starts from the beginning.
53+
54+For the first write, it will truncate the file if the append byte is
55+zero, or will start writing at the end of the file if the append byte
56+is nonzero.
57+
58+Reading from either of the read ports will read a single byte from the
59+file (in this case, the address and max number of bytes is ignored). In
60+this case, you should write to both 0xAB and 0xAC if you want to do a
61+long read since if you write to only 0xAC then the address is undefined.
62
63 (TODO)
64
65@@ -181,3 +206,6 @@ C7 = Day of the week (0=Sunday)
66 C8 = Day of the year *
67 CA = Daylight saving time
68
69+Some programs use this device to seed a random number generator, and
70+will not work correctly if these values are all zero.
71+