commit c0e5610

zzo38  ·  2024-08-01 18:18:35 +0000 UTC
parent 7bcc8de
Changes to extended text input extension.
1 files changed,  +26, -5
+26, -5
 1@@ -58,8 +58,12 @@ Other bits are currently unused.
 2 
 3 (DRAFT)
 4 
 5-This extension is used for extended text input with TRON character codes.
 6-The current version number is 1.
 7+This extension is used for extended text input with TRON character codes
 8+and/or extended IBM code pages. The current version number is 1.
 9+
10+(I am not sure how useful this actually is (since it is not needed for
11+output, nor to implement IME in ordinary uxn code), so it might be removed
12+in future, or might never end up being implemented.)
13 
14 The ports are:
15 
16@@ -69,9 +73,12 @@ x3 - TRON plane
17 x4 - TRON code *
18 x6 - Intended mode
19 x7 - Effective mode
20+x8 - Code page (hi) *
21+xA - Code page (lo) *
22 
23-The vector and intended mode should be set by the program, and the emulator
24-will set the other fields to be read by the program.
25+The vector and intended mode (and possibly the code page, if applicable)
26+should be set by the program, and the emulator will set the other fields
27+to be read by the program.
28 
29 The mode flags are:
30 
31@@ -88,9 +95,13 @@ this event will (or did) trigger this device, which it does if a TRON
32 character input is available.
33 
34 * bit2 = Bracketed paste. Setting it in the intended mode enables this
35-feature. In the effective mode,this bit will be set if it is currently
36+feature. In the effective mode, this bit will be set if it is currently
37 doing a bracketed paste.
38 
39+* bit3 = Code page. This means to use the specified code page with the
40+normal keyboard input. It is set in the effective mode if the keyboard
41+event is using the specified code page.
42+
43 The initial value for the intended mode is 0x01. Note that bit0 and bit1
44 are not mutually exclusive; if both are set, then it is possible (but not
45 necessarily) that a keyboard event will trigger both devices. If neither
46@@ -98,6 +109,16 @@ bit is set, then text input is not requested (some implementations might
47 use this to hide the on-screen keyboard). Also, the effective mode is set
48 for both kinds of input events, regardless of the intended mode.
49 
50+The code page is an extended IBM code page number; an implementation may
51+have a default value (and if it does, might set the intended mode to 0x09).
52+It also might be limited as to what code pages it supports (possibly only
53+one or possibly none at all), in which case it only has those values; the
54+emulator may automatically change them to the supported values when setting
55+them to an unsupported values, so the program may wish to read them back.
56+(The code pages SHOULD be an extension of ASCII; you SHOULD NOT use EBCDIC
57+code pages, please. The emulator MUST NOT automatically set the code page
58+to any non-ASCII code page.)
59+
60 
61 === c7e5d57e-1201-11ee-bee4-002618745416 (Sequencer) ===
62