One other thing -- regarding your Dynapro file typer -- it would be most appreciated if, on the Mac, you implemented the legacy 4-character Mac
type to denote the Apple II file type and aux type of files in the
Dynapro folder. (e.g. pxyy / x=FT yy=AT - Programmer's Reference for
[GS/OS] System 6.0 (page 335-336)). I realize that not many MacOS
programs still use the legacy type info, but it's still supported in the file system. And, I know Kelvin Sherlock's ShrinkFit-X and Andy
McFadden's nulib2 still read and write that info on MacOS.
I also say is WOW!
As an old user of KEGS on a few-years-old Intel i7 Dell laptop running Linux >Mint with more than 280 processes and all but the KEGS process sleeping. >Press F6 enough times to set the KEGS speed set to Unlimited, and the KEGS >process is under 50% of the CPU usage:
$ ps -C kegs -o pcpu
%CPU
32.8
I rarely look at those numbers, but look ...
When at the Applesoft prompt:
dfcyc: ~1280
sim MHz: ~9600
Eff NHz: ~4200
Limit: Unlimit
When running this test program:
*300:AD 57 C0 EA AD 56 C0 4C 0 3 N300G
dfcyc: ~460
sim MHz: ~28000
Eff NHz: ~4100
Limit: Unlimit
What do those numbers mean?
~mmphosis
ps. I also use the socket/serial port feature a lot but not for printing. >https://mmphosis.netlify.app/kegs/alias-t.html
Kent,
As a new user of KEGS on a brand new Intel i7 Mac, all I can say is WOW!
It absolutely flies. Tell me, while KEGS shows 500-600 MHz under GS/OS,
when I run the ProDOS 8 AppleWorks 5.1 it shows 4500 MHz. Is that even >possible? If so, Holy ZipChip, Batman!
Today was my first day of using KEGS on the Mac (though I still use the >KEGS-based GSPort on a Windows 10 machine) so I'm still getting a feel
for things.
Direct printing has always been big deal to me, so I'm going to set up
an ncat client-to-client relay that will run while KEGS is running to
funnel your 6501 socket output on the printer port to a networked
LaserJet printer's port 9100 (raw) and make sure that will work for me
in the Mac environment. (It does work with GSPort on Windows for both
PCL and PostScript jobs, so I imagine it will work here too).
I suppose a more direct approach would be for me to ask you to implement
an outgoing socket client (not the modem on telnet port) for the printer
port where the IP address and port # of the network printer server could
be specified, but that's down the road. The printer server disconnects
after a short idle period, so the outgoing client socket would need >automatically to reconnect periodically, which might complicate things,
I imagine.
One other thing -- regarding your Dynapro file typer -- it would be most >appreciated if, on the Mac, you implemented the legacy 4-character Mac
type to denote the Apple II file type and aux type of files in the
Dynapro folder. (e.g. pxyy / x=FT yy=AT - Programmer's Reference for
[GS/OS] System 6.0 (page 335-336)). I realize that not many MacOS
programs still use the legacy type info, but it's still supported in the
file system. And, I know Kelvin Sherlock's ShrinkFit-X and Andy
McFadden's nulib2 still read and write that info on MacOS.
In any case -- Really, thanks for this program. What a blast.
Hugh Hood
You want an option where the slot 1 port is set to auto-connect to, say, 10.0.0.10 port 1000 whenever there is outgoing traffic, right? I'll look into what this would take.
I am running version 1.23 on Linux. I can telnet in from the Terminal
I boot DOS 3.3, and the CATALOG command outputs fine to the Terminal. Can
you print something from BASIC?
?"HELLO
Maybe newer macos has a security setting blocking the port? Or maybe telnet needs something else set, it may be that it is simply echoing what you are typing in telnet but isn't receiving and/or outputting the incoming text.
You are correct — with KEGS version 1.27, the serial port stuff is not working. I forgot to do "make clean" before building version 1.27. I think this is why I was still using version 1.23.
There is a bit of output from telnet in the Terminal but it is garbled:
?S]CATALOG
VO*A 00 DE 04 TE TE*I00 Y. 0 UM 0 *A 27 T1 *A
One more thing -- I was out of town this past weekend and was unable to
do any more testing with my newly-installed KEGS on the Mac, but using a >telnet window to connect to KEGS' port 6501, and then typing PR#1 in
BASIC on the emulated Apple IIGS would indeed transfer any and all
keystrokes typed on the emulated Apple IIGS to the telnet window, but it >would not, for example, transfer the contents of the Catalog command
typed from the same prompt.
May I ask you to check that out on your machine?
BTW, thanks for the quick response, and the damn-quick emulator.
Hugh Hood
Yes, KEGS 1.27 had a new bug introduced with the "false read" change being done incorrectly, and it messed up accessing the SCC registers. The ROM would do "LDA $BFFD,Y", with Y=$3C, to try to access $C039. The "false read" should go to $BF39 (which does nothing), but the KEGS bug had it read $C039. The SCC clears state on reading this register, and so it broke the serial port operation. The fix was to make the false read go to $BF39 as intended.
KEGS 1.28 at kegs.sourceforge.net fixes this bug, and adds faster ZipGS speeds (up to 128MHz), along with other fixes.
Kent
Thank you, thank you, thank you. kegs 1.28 works like a charm. https://iili.io/HPcaRvp.png
On 6/22/2023 12:20 PM, mmphosis wrote:
Thank you, thank you, thank you. kegs 1.28 works like a charm. https://iili.io/HPcaRvp.png
Agreed.
Yes, with KEGS v1.28 I'm now able to print from the emulated IIGS to a network printer by running an ncat client-to-client relay between KEGS
Port 6501 and printer server Port 9100.
I have noticed one anomaly though, which I've tracked to a piece of code
in the scc_socket_driver.c file (which I don't fully understand the
workings of at this point).
After ncat makes its initial connection with Port 6501, KEGS sends out
the following 8-byte sequence, which of course the printer then prints
at the beginning of the first job.
That sequence is:
0xFB / 0x01 / 0xFD / 0x01 / 0xFB / 0x03 / 0xFD / 0x03
I'm pretty sure I can script the ncat connection script to discard this before it relays it to the printer server, but I'm curious -- what is
the purpose of sending this sequence?
Thanks.
Hugh Hood
# nc localhost 6501 > out.txt & sleep 1 && kill %1 && hexdump -vC out.txt && rm -f out.txtHow about a CR at the End!?
[1] 65816
00000000 4e 4f 20 43 41 52 52 49 45 52 0d 0a 0d 0a 3f 53 |NO
CARRIER....?S|
00000010 59 4e 54 41 58 20 45 52 52 4f 52 07 0d 0a 5d 0a |YNTAX
ERROR...].|
00000020 ff fb 01 ff fd 01 ff fb 03 ff fd 03 |............|
0000002c
[1]+ Terminated nc localhost 6501 > out.txt
Here's what I've found out so far ...
It's telnet protocol.
https://datatracker.ietf.org/doc/html/rfc854
When I've wanted to print from GSPort, I've opened the command line,
pasted this script, started GSPort, and then am able to 'print' from the emulated IIgs (both text/PCL in ProDOS 8, and PostScript in GS/OS).
On 6/22/2023 12:20 PM, mmphosis wrote:
Thank you, thank you, thank you. kegs 1.28 works like a charm.
https://iili.io/HPcaRvp.png
Agreed.
Yes, with KEGS v1.28 I'm now able to print from the emulated IIGS to a >network printer by running an ncat client-to-client relay between KEGS
Port 6501 and printer server Port 9100.
I have noticed one anomaly though, which I've tracked to a piece of code
in the scc_socket_driver.c file (which I don't fully understand the
workings of at this point).
After ncat makes its initial connection with Port 6501, KEGS sends out
the following 8-byte sequence, which of course the printer then prints
at the beginning of the first job.
That sequence is:
0xFB / 0x01 / 0xFD / 0x01 / 0xFB / 0x03 / 0xFD / 0x03
I'm pretty sure I can script the ncat connection script to discard this >before it relays it to the printer server, but I'm curious -- what is
the purpose of sending this sequence?
So, I have 3 options in KEGS:
1) Do nothing. Netcat will work poorly (it will see these Telnet escape
codes at startup) and telnet (if you can find it) will work like
it always did.
2) Remove the Telnet codes. Netcat will work as expected, but now Telnet
will not really work--you'll see extra chars and what you type
will only get sent to KEGS when you press return.
3) Someone give me some ideas on how to detect Telnet vs. Netcat connecting
to KEGS.
On 6/23/2023 7:27 AM, mmphosis wrote:
Here's what I've found out so far ...
It's telnet protocol.
https://datatracker.ietf.org/doc/html/rfc854
Agreed. You've hit the nail on it's head. Thanks.
FWIW - for those wondering what we're doing, here's the fast and
undeveloped looping script I've been using on the Windows command line
to funnel output from the GSPort variant of KEGS to my printer server on
my Windows machine:
GSport has the option of using the Marinetti+TreeHugger driver for port
9100 printing. It works well with my Color LaserJet 3700 and Harmonie drivers... in color! The LaserWriter driver is also an option, albeit in black and white only.
On 6/16/2023 12:24 PM, Kent Dickey wrote:
You want an option where the slot 1 port is set to auto-connect to, say,
10.0.0.10 port 1000 whenever there is outgoing traffic, right? I'll look
into what this would take.
Exactly.
For example, here is the test application -- most mid and upper end
networked laser printers support the PCL 5 and PostScript languages, and >their print servers will accept raw input over Port 9100. Most also will >auto-detect whether the language being sent for that job is PCL 5 or >PostScript.
In article <AYKdnQq9X6fxfA35nZ2dnZfqn_GdnZ2d@earthlink.com>,
Hugh Hood <hughhood@earthlink.net> wrote:
On 6/16/2023 12:24 PM, Kent Dickey wrote:
You want an option where the slot 1 port is set to auto-connect to, say, >>> 10.0.0.10 port 1000 whenever there is outgoing traffic, right? I'll look >>> into what this would take.
Exactly.
For example, here is the test application -- most mid and upper end
networked laser printers support the PCL 5 and PostScript languages, and
their print servers will accept raw input over Port 9100. Most also will
auto-detect whether the language being sent for that job is PCL 5 or
PostScript.
I didn't test it too much, but KEGS 1.29, available at kegs.sourceforge.net, implements the above. Press F4, "Serial Port Configuration", then under
Slot 1, "Main Setting", press right arrow to select "Use Remote IP below". Enter the IP or machine name on "Remote IP", and change "Remote Port"
to the port you want (I defaulted it to 9100).
I do not expect this to "just work", but if it doesn't work, try to report back how to reproduce the problem.
Kent
I didn't test it too much, but KEGS 1.29, available at kegs.sourceforge.net, implements the above. Press F4, "Serial Port Configuration", then under
Slot 1, "Main Setting", press right arrow to select "Use Remote IP below". Enter the IP or machine name on "Remote IP", and change "Remote Port"
to the port you want (I defaulted it to 9100).
I do not expect this to "just work", but if it doesn't work, try to report back how to reproduce the problem.
Kent
Anyway, of course there is ONE issue, which I hope you can resolve.
Most network printers contain a Port 9100 printer server. Once a client
makes a connection (as KEGS now does when an emulated SCC port is
accessed), the server receives any job that is sent, and once there has
been no traffic/idle for (typically) 90 seconds, the server forces a >disconnect from that client. This enables the print server to accept
jobs from other clients on the network.
Well, KEGS makes the initial connection and sends the job, as the KEGS >console shows:
Connecting to 192.168.1.170, port:9100
SCC port 0 is now outgoing to
Provided the idle time limit (in this case 90 seconds) is not reached, I
can continue to send print jobs and they will be printed.
If, however, I wait over 90 seconds between jobs, the print server will >disconnect the KEGS client.
As a result, when I attempt to print again, the job is not sent, and the
KEGS console shows:
socket write failed, resuming modem mode
socket_close: rdwrfd=3cc, closing
socket_close: sockfd=3cc, closing
port 0 is closed, cur_state:-2
port 0 is closed, cur_state:-2
So, I suppose I would ask that if a socket write failed, that KEGS would >re-establish the connection to the server and then send the job.
Please let me know if I can provide anything else for you to
troubleshoot this, and again, thanks for implementing this great feature.
Hugh Hood
I've put a fix for this in KEGS 1.30 at https://kegs.sourceforge.net/
where it should try to reconnect if the port closed due to inactivity.
If it closes during activity, then it will still closed. You can get KEGS
to reopen by changing the serial type from Remote IP to another setting,
and then back to Remote IP.
Kent
On 9/23/2023 10:16 PM, Kent Dickey wrote:
I've put a fix for this in KEGS 1.30 at https://kegs.sourceforge.net/
where it should try to reconnect if the port closed due to inactivity.
If it closes during activity, then it will still closed. You can get KEGS >> to reopen by changing the serial type from Remote IP to another setting,
and then back to Remote IP.
Kent
Kent,
You've implemented your new remote IP mode for SCC comm in KEGS 1.30
very, very well. Thank you so much.
I've put your remote IP mode improvement through every test I can think
of, in both MacOS and in Windows 10, and it passed every one.
1. Printing to network printer from 8-bit AppleWorks 5.1. - Passed
2. Printing to network printer from 8-bit AppleWorks 5.1 after the
printer's server closed the connection for inactivity. - Passed
3. Printing to network printer from GS/OS Desktop applications using the >Direct Connect PostScript printer driver and Apple's 'Printer' port
driver. - Passed
4. Doing the same after the printer's server closed the connection for >inactivity. - Passed
5. Printing from the emulated IIgs (in both 8-bit AppleWorks and GS/OS >Desktop applications) with a subsequent trip to the host's web browser
to print a document to the same network printer, and then returning to
the emulated IIgs to print another document. - Passed
and, (in order to test the 2-way bidirectional capability of your remote
IP mode)
6. Entered online terminal mode in ProTERM 3.1 and issued PostScript
commands to the network printer's PostScript interpreter and received
back (with no character loss at all) the results of those PostScript >commands.
Again, really nice job.
Given the capabilities of your remote IP mode, I'm going to see if I can >access the bash shell on the host machine from the emulated IIgs, though
I'll probably need first to instruct ncat to bind a port and start
/bin/bash.
Finally, (for those who will be using the new KEGS remote IP feature to
print directly to a network printer from KEGS), here is a brief note
about the selection of 'port driver' from the emulated IIgs with GS/OS >Desktop applications.
Apple's port driver maximum rate is 19,200 bps (even though we're not
doing real serial comm) and that limits the speed at which the print job
is sent to the printer, although it is still very fast.
Becky Heinemann's 'Printer57.6' port driver, which was released as
freeware years ago and included with both SHS' 'Independence' printer
driver package, and Vitesse's 'Harmonie' printer driver package,
accelerates page printing from GS/OS Desktop applications from within
KEGS by a factor of 3X. {As previously noted by David Schmidt in his
GSPort docs, BTW}.
For example, I printed a typical 3-page document from Ewen Wannop's
BrkDown disassembler. With Apple's port driver, the printer ejected the
first page in 9 seconds. With Heinemann's port driver, that first page
was out in 3 seconds.
The only caveat is this -- when you use Heinemann's driver, KEGS will
throw a Code Red condition, although I can't detect that it causes any >problems whatsoever with my remaining session in KEGS. When I get better
with the KEGS debugger, I hope to find out what is causing this and
perhaps patch the port driver.
Hugh Hood
Becky Heinemann's 'Printer57.6' port driver, which was released as
freeware years ago and included with both SHS' 'Independence' printer
driver package, and Vitesse's 'Harmonie' printer driver package,
accelerates page printing from GS/OS Desktop applications from within
KEGS by a factor of 3X. {As previously noted by David Schmidt in his
GSPort docs, BTW}.
For example, I printed a typical 3-page document from Ewen Wannop's
BrkDown disassembler. With Apple's port driver, the printer ejected the first page in 9 seconds. With Heinemann's port driver, that first page
was out in 3 seconds.
In article <CKacnW7UG9Tw_o_4nZ2dnZfqn_ednZ2d@earthlink.com>,
Hugh Hood <hughhood@earthlink.net> wrote:
The only caveat is this -- when you use Heineman's driver, KEGS will
throw a Code Red condition, although I can't detect that it causes any
problems whatsoever with my remaining session in KEGS. When I get better
with the KEGS debugger, I hope to find out what is causing this and
perhaps patch the port driver.
Hugh Hood
If you can make a disk image that can reproduce the problem, I can debug it. You can email it to me. Try to make it less than 10MB. Make it as easy
on me as possible.
Kent
Hi There,
Where is the PHB at $213 balanced?
The PHA PHK at $23C is balanced by PLA PLB at $241
Antoine
Hi There,
Where is the PHB at $213 balanced?
The PHA PHK at $23C is balanced by PLA PLB at $241
Antoine
Again, really nice job.
Given the capabilities of your remote IP mode, I'm going to see if I can access the bash shell on the host machine from the emulated IIgs, though
I'll probably need first to instruct ncat to bind a port and start
/bin/bash.
Antoine,
May I ask you to confirm that we are both looking at the same revision
of the 'Printer57.6' port driver?
The one I now have disassembled in Ewen's BrkDown is 1518 bytes in
length, has a creation date of 10-Jan-91 and a modification date of >20-Feb-93. It's from the Harmonie v2.11b printer driver disk.
I ask because my offsets seem to differ from yours.
FWIW, although I suspect Kent will determine why using this port driver
gives a RED condition with KEGS, and perhaps he will suggest a patch for
it, I'm thinking of adding a little extra code to access an additional
SCC Write Register or two (this driver AS-IS just accesses WR 12 {lower
byte of baud rate generator time constant} to set 57,600 baud) in order
to make this a 115,200 baud port driver.
Thanks.
Short answer: should be fixed.
I would like to put together a collection of freely available files,
like this Printer57.6 driver, on the KEGS SAMPLE.DISK, with directions on
how to use it and how to install it. Can you help with this? Printing
from GS/OS is very complex with a direct-connect printer, so putting something together would be helpful.
Kent
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 468 |
Nodes: | 16 (2 / 14) |
Uptime: | 17:13:46 |
Calls: | 9,440 |
Calls today: | 3 |
Files: | 13,594 |
Messages: | 6,109,629 |