Commit Graph
60 Commits
Author SHA1 Message Date
Claude 4c5deed79b gfxtest: images overpainted in the terminal's own palette
With mix O the image test diffuses the picture (Floyd-Steinberg) to the
colors in the terminal's Graphic Color query reply (B4) - IBM Personal
Communications has 16, orange, purple, the dark shades and grey among
them - a bitmap a color, black left as the background; without the reply,
the 8 base colors.  The preview draws in the same palette.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-15 21:58:26 +00:00
Claude c3cb342f1a Vector graphics by the Summary reply; gfxtest: overpainted images, Query List
IBM Personal Communications lists the Segment reply (B0) and the other
graphics replies in its Summary but does not send them for a Query, so
SupportsVectorGraphics said no to a terminal that draws them.  It now
takes B0 in the Summary too.

gfxtest: with mix O the image test sends a bitmap per colour, each pel in
one, overpainted (no exclusive or); test 9 sends a Query List for the
replies the Summary lists that did not come; the trace logs telnet
commands on their own rather than as the start of the next record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-15 21:48:59 +00:00
Claude 0248a683b0 gfxtest: -preview writes each picture as a PNG; the image test says what it decoded
The image test's caption and the log give the file's decoded size,
format and length and the size drawn, and -preview DIR writes what the
terminal should show (the planes XOR'd, or overpainted) to compare with
what it does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-15 21:41:52 +00:00
Claude 64d1f6bd78 gfxtest: a TN3270 server for debugging vector graphics on an emulator
Shows the terminal's query replies, draws Object Picture test pictures
(test pattern, colour bars as XOR planes or bitmaps, corner markers, a
dithered image) with the origin, position, size, mix and order as
settings, sends structured fields typed in hex, and logs every record
both ways with the graphics orders and inbound replies decoded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-15 21:23:33 +00:00
Claude 750b72ee6b IND$FILE file transfer (DFT), the host's side
ParseIndFile reads the "IND$FILE GET|PUT name [(] options" an emulator
types (TSO and VM/CMS forms).  SendFileDFT (GET) and ReceiveFileDFT
(PUT) run the transfer with Data Transfer structured fields: open,
insert or set cursor and get, close, with the request layouts of a real
TSO IND$FILE (x3270's s3270/Test/ft_dft.trc); DFTMessage ends it with
IND$FILE's message.  DFTBufferSize reads the terminal's DFT buffer from
its DDM query reply (0 when it has no DFT).  ReadRecord reads one
inbound record, which the screen functions cannot (the AID is 0x88).

Tested with s3270 through bbs-sec: binary and ASCII CRLF files both
ways, and a GET of a file that is not there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-10 18:08:04 +00:00
Claude e50b7be809 Keep the query replies; programmed symbols and vector images
NegotiateTelnet keeps every query reply the client sends, and DevInfo
gives them out: QueryReply, QueryCodes, CellSize (from Usable Area),
SymbolSets (the Character Sets reply: GE, Load PS support, formats,
slot size, the sets and their RWS and LCID) and SupportsVectorGraphics
(the Segment reply).

LoadPS builds the Load Programmed Symbols structured field (formats 1
and 3, basic or extended) from Symbol bitmaps; WriteStructuredFields
sends structured fields; Field.CharSet (SFE type 0x43) and Field.Raw
show the symbols.  ImagePicture builds an Object Picture structured
field drawing bitmaps with native vector graphics (experimental).

Fixes: a query reply shorter than 4 bytes made NegotiateTelnet panic
(slice of negative length, index out of range), which any client could
send; the replies a client may send are limited to 16 KB; encoded field
text is telnet-escaped, so a character a code page maps to 0xFF cannot
end the record or start a telnet command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-10 17:20:04 +00:00
Matthew R. Wilson 3b374a1955 Add PositionOnly field attribute v0.9.13 2026-01-02 14:45:25 -08:00
Matthew R. Wilson bdc1d714d2 Add DevInfo.SupportsGE() function v0.9.12 2025-12-15 15:36:18 -08:00
Matthew R. Wilson 6c0b3b038a Add AttributeOnly fields to generate SA (Set Attribute) orders v0.9.11 2025-12-11 17:29:59 -08:00
Matthew R. Wilson 83e1a68bb0 Hack to fix VM telnet client shortcomings v0.9.10 2025-12-01 14:13:23 -08:00
Matthew R. Wilson 595fd63676 Fix example1 to persist codepage display value 2025-12-01 14:12:36 -08:00
Matthew R. Wilson 2c10f7f34d Add more code pages 2025-11-27 03:15:59 -08:00
Matthew R. Wilson ab58ba7a87 Handle out-of-order charset descriptors
The ZOC emulator returns the primary character set descriptor after the
alternate descriptor. Need to pick the right one based on searching for ID 0.
2025-11-27 00:27:40 -08:00
Matthew R. Wilson 7b7d375e91 Per-client codepage detection and handling v0.9.9 2025-11-25 16:31:09 -08:00
Matthew R. Wilson 1859568369 Add additional EBCDIC code pages v0.9.8 2025-11-15 01:40:56 -08:00
Matthew R. Wilson 2f96d51ac3 Groundwork for multi codepage support 2025-11-14 23:54:11 -08:00
Matthew R. Wilson c0ad185cd7 Fix bug in dynamic terminal size query v0.9.7 2025-11-10 20:41:22 -08:00
Matthew R. Wilson 1eee614349 Add link to Moshix' Minesweeper example application 2025-11-10 12:54:12 -08:00
Matthew R. Wilson e6838c397c Add support for graphic escape character set v0.9.6 2025-11-06 12:51:19 -08:00
Matthew R. Wilson 904699bf1e Fix broken EBCDIC conversions. Fully switch to CP1047<->UTF-8. v0.9.5 2025-10-25 16:06:14 -07:00
Matthew R. Wilson 86d2a23adf Add timeout for dynamic terminal size detection v0.9.4 2025-10-04 12:17:59 -07:00
Matthew R. Wilson c6be50cec6 Improve telnet negotiation compatbility
Respond to client "do" requests during the negotiation. This prevents the
negotiation from failing when connecting from the z/VM and CSI z/VSE telnet
clients.

Also don't treat unknown terminal device type as an error, just fall back on
assuming a 24x80 terminal. This shouldn't affect z/VM / z/VSE clients, which
identify correctly, but will return to the original go3270 behavior of not
caring about specific client device type.
v0.9.3
2025-08-07 23:00:22 -07:00
Matthew R. Wilson f71d36fd9e Loosen terminal model name checking v0.9.2 2025-07-01 13:19:55 -07:00
Matthew R. Wilson b3f6fa398d Add support for 3279-4 model v0.9.1 2025-07-01 10:38:40 -07:00
Matthew R. Wilson 936206c28c Documentation updates 2025-07-01 10:38:27 -07:00
Matthew R. Wilson b6fa48f37f Alternate screen size support.
This is a relatively big new feature, which introduces small breaking changes
to the API:

 * NegotiateTelnet() now returns (DevInfo, error) instead of just error.  The
   function signature for the Tx type now has one additional DevInfo parameter.
 * RunTransactions() requires one additional parameter, the DevInfo (which is
   allowed to be nil).

Otherwise, existing behavior continues to work as-is and everything still
defaults to operating on the default 24x80 terminal size.

See example5 for a larger-terminal-aware application.

Pending some time to make sure no new bugs cropped up in this release and that
the alternate screen size support works in the wild, I anticipate this will
become the v1.0.0 release of go3270.
v0.9.0
2025-06-29 12:58:18 -07:00
Matthew R. Wilson 3a38ce6e4a bugfix: Correct Response row and col values (swap them) 2025-06-07 14:04:21 -07:00
Matthew R. Wilson 38b0999238 Don't reset MDT when not clearing screen 2025-05-26 20:00:38 -07:00
Matthew R. Wilson 72db0fdc0e Add optional callback function to ScreenOpts 2025-05-23 14:01:20 -07:00
Matthew R. Wilson 78aaf72e84 Add RunTransactions() approach to application design 2025-04-13 22:04:54 -07:00
Matthew R. Wilson 7b5603eb11 Revert the whitespace "fix"
There was already a feature, Field.KeepSpaces, for the programmer to control
this. The new strip-only-trailing-spaces behavior was inconsistent with the
original design.
2025-04-12 16:57:42 -07:00
Matthew R. Wilson 5f2d7355e4 Non-screen-clearing update support
New ShowScreenOpts() function, which takes a new ScreenOpts struct, to control
various aspects of the ShowScreen behavior. This should now be used in favor of
the deprecated ShowScreen() and ShowScreenNoResponse() functions, and allows
for the additional of future options without needing to continue making new
functions or breaking the public API.
2025-04-12 16:56:24 -07:00
Matthew R. Wilson 19c6001a38 Preserve leading spaces in response fields 2025-04-08 15:36:47 -07:00
Matthew R. Wilson 276144f363 Add ShowScreenNoResponse() function 2025-04-06 16:22:57 -07:00
Matthew R. Wilson 21f273b327 Merge branch 'downarowiczd-master' 2023-11-11 15:03:20 -08:00
Matthew R. Wilson efb8f9edf9 Update numeric validation patch and round out example1 2023-11-11 15:02:02 -08:00
Dominik Downarowicz 54e3008e26 Add numeric-only validation support on fields 2023-10-26 18:08:40 +02:00
Matthew R. Wilson d39b10e79d Add auto-skip support to protected fields 2023-10-19 10:02:16 -07:00
Matthew R. Wilson b6d2a09532 #6: fix exclamation mark mapping 2021-02-04 17:36:06 -08:00
Matthew R. Wilson c72f89f1d7 Strip spaces from responses, unless caller wants them 2020-12-30 19:41:02 -08:00
Matthew R. Wilson cb57796dfc Issue #4: actually make it work 2020-12-30 17:27:57 -08:00
Matthew R. Wilson cfa06ec4bc Issue #4: add and use telnetRead() function 2020-12-30 15:55:31 -08:00
Matthew R. Wilson f01cf72d6d Add logging code for out-of-bounds buffer addresses 2020-12-27 01:31:20 -08:00
Matthew R. Wilson 123df70716 Add telnet options reference to readme 2020-12-26 02:02:58 -08:00
Matthew R. Wilson eddc39723a Add UnNegotiateTelnet() function 2020-12-26 01:42:53 -08:00
Matthew R. Wilson 8f57ca182b Update telnet code; add flushConnection() 2020-12-26 01:27:15 -08:00
Matthew R. Wilson 6c0f8b25fe Lower required Go version to 1.13 2020-12-23 19:39:52 -08:00
Matthew R. Wilson 7a7e8165dd Update README to reflect the 2 examples 2020-12-07 02:00:48 -08:00
Matthew R. Wilson fee74affa2 #1: Add HandleScreen() function as a higher-level interface to ShowScreen() 2020-12-07 01:59:04 -08:00
Matthew R. Wilson 1e6ae603e7 Issue #2: handle PA keys like Clear 2020-11-05 13:28:22 -08:00