• New KEGS Mac User - Most Impressed

    From Hugh Hood@21:1/5 to All on Wed Jun 14 23:10:20 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From fadden@21:1/5 to Hugh Hood on Thu Jun 15 07:55:58 2023
    On Wednesday, June 14, 2023 at 9:10:31 PM UTC-7, Hugh Hood wrote:
    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.

    Code for the file type conversion can be found here:

    https://github.com/fadden/CiderPress2/blob/984958b4deaf827ab0ff1e7c6e9885f1b5ceb9c4/DiskArc/FileAttribs.cs#L210

    The cp2 command-line tool will use the HFS+ type/creator fields (and resource forks) when adding and extracting files, roughly the same way NuLib2 does.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Thu Jun 15 21:58:57 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to mmphosis@macgui.com on Fri Jun 16 04:52:31 2023
    In article <mmphosis-1686866335@macgui.com>,
    mmphosis <mmphosis@macgui.com> wrote:
    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

    KEGS always slows down to 1MHz for accessing softswitches, like the
    keyboard at $C000, or $C057, etc. Outside of that, KEGS tries to run as
    fast as possible in Unlimited mode. So if the host machine runs fast
    enough that the softswitch operation being requested can be done more
    than 1 million times per second, then the KEGS speed effectively becomes infinite--it did the 1 million accesses to the softswitch in a second,
    had time left over, so it is basically dividing by 0 to get the "sim
    MHz" and "eff MHz".

    KEGS on Windows also has a bug I haven't chased down yet where it doesn't run as fast as it could for some reason, it's confused about time on Windows
    and puts itself to sleep when it does not need to, unrelated to this one-million-softswitch accesses per second limit. This seems to be about
    a 30-40% slowdown, but it doesn't always happen. So Windows users are
    less likely to get "infinite" MHz numbers, since KEGS has other issues there.

    KEGS is fast enough that the keyboard reading at most prompts (reading
    $C000 from BASIC) can be done more than 1 million times per second, so
    the speed KEGS shows at most prompts is not meaningful. Note lots of
    other instructions are being run, maybe 100 65816 instructions per read of $C000, but since KEGS is fast enough, it can do those in the "spare" time.

    I guess I should consider changing KEGS to NOT slow down for softswitches
    when running at Unlimited speed.

    KEGS's real speed can be seen doing something, such as:

    10 A=SIN(A) + 1
    20 GOTO 10
    RUN

    (If KEGS begins to run faster than 3GHz, even BASIC will get caught by
    the read to $C000 checking for Ctrl-C between each statement, and then even running BASIC the speed will be "infinite", but really around 3GHz. This
    will not be a problem anytime soon, KEGS runs at 1GHz max now on Apple M1,
    and around 750-850MHz on Intel/AMD chips)

    When running at 1MHz and 2.8MHz, KEGS also slows down to 1MHz for writes to shadowed video memory (hires, lores, text, whatever, even if it's not
    being displayed currently). But at 8MHz and Unlimited, it does not,
    basically to avoid this "infinite MHz" speed issue when accessing video
    memory.

    What the fields mean: dfcyc is counting simulated seconds (which should
    match real seconds, ignoring times when you halted KEGS). "sim MHz"
    is the time KEGS spent just running CPU instructions and how fast it was,
    not counting overhead for drawing video or playing sounds. "eff MHz" takes
    the overhead into account, and is a truer score. So "sim MHz" should be
    higher than "eff MHz", a lot higher if there's a lot of graphics or sound
    going on. Both are affected by the one-million-softswitch accesses per
    second limit, and so can scale too high when code is reading softswitches aggressively.

    Kent

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Fri Jun 16 17:24:56 2023
    In article <olKdnfqmfPKwEhf5nZ2dnZfqnPWdnZ2d@earthlink.com>,
    Hugh Hood <hughhood@earthlink.net> wrote:
    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!

    As I posted later in this thread, the 4500MHz is not real. The emulated
    system is reading the keyboard too often with nothing else, and KEGS is
    not able to calculate the speed properly.

    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.

    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.

    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.

    As I understand it, you want KEGS to support native Mac Creator types--which are stored in a weird way on a Mac (either hidden, or in .MACOS_X directories or xattr or whatever, this is a huge giant mess of complexity which I do not understand). I am not planning on doing that. Dynapro uses ,tbin,a$2000 extensions, and supports Cadius's #062000 extension as well. I'd be happy
    to support anythin else that is portable to Linux and Windows, but the
    Mac "hidden" filetype stuff is not.

    In any case -- Really, thanks for this program. What a blast.




    Hugh Hood

    Thank you for the nice words.

    Kent

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Mon Jun 19 18:14:52 2023
    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.

    So, from GS/OS applications one would select the Direct Connect
    PostScript driver and be able to print directly from GS/OS within KEGS
    to the networked printer on the host (Mac/Windows/etc) machine.

    And, from ProDOS 8 applications, one would print from BASIC and like text-output programs because PCL 5 accepts plain ASCII as its input even without attaching any PCL 5 specific language commands to it.

    Moreover, from programs like AppleWorks 5 that have a built-in PCL 5
    driver, one could print directly from AppleWorks 5 under ProDOS 8 within
    KEGS straight to the networked printer, and use all the PCL features
    such as font size selection, bold/non-bold, italic/non-italic, etc.

    I currently do this very thing on my Windows 10 machine from the GSPort
    variant of your KEGS, but I have to start an ncat client-to-client relay bridging Port 6501 (from KEGS) and Port 9100 (on the printer) and keep
    it looping in the background, because the Port 9100 server on the
    printer will disconnect after a period of inactivity. It would be nice
    not to have to do that.

    So, in a nutshell, that is my reason for requesting this feature addition.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Tue Jun 20 18:30:27 2023
    Hi Hugh,

    I am running version 1.23 on Linux. I can telnet in from the Terminal program/Application on both Linux and Mac OS X. I don't have a "modern" Mac
    to test the latest version of KEGS on, but it all works on KEGS 0.91 on Mac
    OS X 10.5.8 as well.

    From Linux locally:

    telnet localhost 6501

    From the PowerPC Mac remotely:

    telnet 10.0.0.101 6501

    On the KEGS side:

    KEGS Configuration F4

    ↲ Serial Port Configuration

    Serial Ports = Only use sockets 6501-6502
    Serial Output = Mask off high bit
    √ Modem on port 0 (slot 1) = Simple socket emulation mode

    for both input and output, I type:

    IN#1
    PR#1

    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. I used to set mode character from telnet, but it doesn't seem necessary. When
    in telnet, press control+] to get to the telnet prompt:

    telnet> mode character


    ~mmphosis
    https://mmphosis.netlify.app/kegs/alias-t.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to mmphosis on Tue Jun 20 13:53:17 2023
    On 6/20/23 1:30 PM, mmphosis wrote:

    Thanks for the input. I'm still getting my feet wet with this.


    I am running version 1.23 on Linux. I can telnet in from the Terminal


    This is KEGS version 1.27 on MacOS 10.14.6 (Mojave).


    I boot DOS 3.3, and the CATALOG command outputs fine to the Terminal. Can
    you print something from BASIC?

    ?"HELLO


    All I can get from BASIC are the keystrokes typed while PR#1 is active.
    I get no output from the CATALOG command nor the LIST command nor can I
    print from BASIC (or AppleWorks for that matter).

    My serial port settings are the same as yours.

    OTOH, I can fire up GSPort with the same (as on my KEGS Mac) serial port settings and Telnet command on a Windows 10 machine and everything comes through with flying colors -- output of CATALOG, LIST, BASIC and even AppleWorks.



    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.


    That's a good thought. Thanks. I'll continue to experiment with this
    until either Kent says something's wrong or I figure it out. I really
    like this emulator.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Tue Jun 20 19:29:25 2023
    I just checked my security settings in Mac OS X 10.5.8. They've moved things and changed things around a bit in the newer macos, but there should be a
    way:

    System Preferences > Security > Firewall (tab) > Set access for specific
    services and applications >
    KEGSMAC Allow incoming connections

    Turn this on if you are behind another firewall/router between your Mac and
    the Internet, or better yet temporarily disconnect your Mac from the
    Internet. You don't want someone telnetting in and typing INIT HELLO. I
    would advise reverting this security setting when not using it.

    I also downloaded version 1.27 and ran it on Linux and the telnet stuff
    works. Are you using telnet from the Terminal Application, or are you using
    a different Telnet Application altogether?

    I really like being able to Command+C and Command+V between a
    Text/Programming Editor and the Terminal connected to KEGS via telnet. ~mmphosis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Tue Jun 20 20:03:43 2023
    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

    This is the output from running kegs in the Terminal:

    scc socket close being called from socket_open_out
    In scc_socket_close, 0, 0, 00000180c9170000
    sockfd ret: a
    SCC port 0 is at unix port 6501
    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1
    Set port[0].rdwrfd = b
    Telnet reqwill and reqdo's initialized
    In modem_do_ring, ringing at 000001bda7b40000
    Telnet reqwill 1
    Telnet reqdo 1
    Telnet reqwill 3
    Telnet reqdo 3
    Send telnet reqs

    and lots of ...

    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1
    tx_dcycs < 1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to mmphosis on Tue Jun 20 16:01:38 2023
    On 6/20/23 3:03 PM, mmphosis wrote:
    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


    Thank you, thank you, thank you. That output from the CATALOG command
    was *exactly* what I was seeing.

    FWIW, I downloaded the older (and slower) GSPort and serial output is
    working as it should.

    The solution is nigh, methinks.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Wed Jun 21 01:03:02 2023
    Here's more of the output from kegs version 1.27 in the terminal:

    Speaker at rest
    GRIND GRIND GRIND
    c7_fd == -1!
    Failure reading boot disk in s7d1!
    Pausing sound
    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!
    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!
    scc socket close being called from socket_open_out
    In scc_socket_close, 0, 0, 0000008773070000
    sockfd ret: aWr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!
    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!

    SCC port 0 is at unix port 6501
    tx_dcycs 0.28 < 1 1 0
    tx_dcycs 0.28 < 1 1 0
    Set port[0].rdwrfd = b
    Telnet reqwill and reqdo's initialized
    In modem_do_ring, ringing at 000000b3d23a0000
    Telnet reqwill 1
    Telnet reqdo 1
    Telnet reqwill 3
    Telnet reqdo 3
    Send telnet reqs
    tx_dcycs 0.28 < 1 19 18
    tx_dcycs 0.28 < 1 19 18
    tx_dcycs 0.28 < 1 19 18
    tx_dcycs 0.28 < 1 19 18
    tx_dcycs 0.28 < 1 19 18
    tx_dcycs 0.28 < 1 19 18
    tx_dcycs 0.28 < 1 19 18

    I modified scc.c to get a little more information:

    /* do just one char, then get out */
    //printf("tx_dcycs < 1\n");
    printf("tx_dcycs %g < 1 %d %d\n", scc_ptr->tx_dcycs, out_wrptr, out_rdptr); return;

    I am not too familiar with this socket code, but these lines don't appear in kegs version 1.23:

    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!
    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!

    Here's the output from kegs 1.23 that works:

    Writing config.kegs file to config.kegs
    GRIND GRIND GRIND
    c7_fd == -1!
    Failure reading boot disk in s7d1!
    Partition error: No driver descriptor map found
    Inserting disk dos33.dsk ((null) or -1) in slot 6, drive: 0, dyna_blocks:0 Writing config.kegs file to config.kegs
    Toggling g_limit_speed to 1...1.024MHz!
    Pausing sound
    scc socket close being called from socket_open_out
    In scc_socket_close, 0, 0, 000000a872730000
    sockfd ret: 10
    SCC port 0 is at unix port 6501
    Set port[0].rdwrfd = 11
    Telnet reqwill and reqdo's initialized
    In modem_do_ring, ringing at 000000ed3fe70000
    Telnet reqwill 1
    Telnet reqdo 1
    Telnet reqwill 3
    Telnet reqdo 3
    Send telnet reqs, rdwrfd=11

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Wed Jun 21 18:05:35 2023
    There is a comment at the top of scc.c

    /* scc port 0 == channel A = slot 1 = c039/c03b */
    /* port 1 == channel B = slot 2 = c038/c03a */

    I am using slot 1, so I am not sure why c038 is being accessed when using
    kegs 1.27:

    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!
    Wr c038 to wr0 of 44!
    Wr c038 to wr0 of 62, bad cmd cd:4!
    Wr c038 to wr0 of 62!
    Wr c038 to wr0 of 6a!

    I don't get these "Wr c038" messages in kegs 1.23.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Thu Jun 22 02:23:51 2023
    In article <AYKdnQq9X6fxfA35nZ2dnZfqn_GdnZ2d@earthlink.com>,
    Hugh Hood <hughhood@earthlink.net> wrote:
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Wed Jun 21 23:10:04 2023
    On 6/21/2023 9:23 PM, Kent Dickey wrote:

    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, Kent. Can't wait to use it.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Thu Jun 22 17:20:46 2023
    Thank you, thank you, thank you. kegs 1.28 works like a charm. https://iili.io/HPcaRvp.png

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to mmphosis on Fri Jun 23 00:00:31 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Fri Jun 23 12:27:27 2023
    Here's what I've found out so far ...

    It's telnet protocol.
    https://datatracker.ietf.org/doc/html/rfc854

    Telnet options. https://www.iana.org/assignments/telnet-options/telnet-options.xhtml

    1 Echo
    https://www.rfc-editor.org/rfc/rfc857.html

    3 Suppress Go Ahead
    https://www.rfc-editor.org/rfc/rfc858.html

    ----- Depending on the telnet command(s), I believe those bytes are escaped with 0xFF:
    "Interpret as Command" (IAC) escape character 255

    ### convert to decimal
    # for i in FB 01 FD 01 FB 03 FD 03; do printf "$((16#$i)) "; done | xargs
    251 1 253 1 251 3 253 3

    ----- That sequence is:
    $FB $01 $FD $01 $FB $03 $FD $03
    251 1 253 1 251 3 253 3
    will echo do echo will SGA do SUPPRESS-GO-AHEAD

    It's some negotiation that we don't see when using the telnet program:

    WILL ECHO

    DO ECHO

    WILL SUPPRESS-GO-AHEAD

    DO SUPPRESS-GO-AHEAD

    ----- All this time, I've been using the telnet program

    # man telnet | tail -n4
    BUGS
    The source code is not comprehensible.

    Linux NetKit (0.17) August 15, 1999 Linux NetKit
    (0.17)

    ----- I am also starting to mess around with netcat

    ### from the /dev/pts/1 terminal
    # nc localhost 6501

    ### to adjust the terminal settings of /dev/pts/1 from another terminal
    # sudo stty -F /dev/pts/1 -echo -ignbrk -brkint -ignpar -parmrk -inpck
    -istrip -inlcr -igncr -icrnl -ixon -ixoff -icanon -opost -isig -iuclc -ixany -imaxbel -xcase min 1 time 0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Hall@21:1/5 to Hugh Hood on Fri Jun 23 11:33:08 2023
    On Thursday, June 22, 2023 at 10:00:41 p.m. UTC-7, Hugh Hood wrote:
    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

    Could it just be <SEND A CR> ? at the start.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mmphosis@21:1/5 to All on Fri Jun 23 21:39:37 2023
    # nc localhost 6501 > out.txt & sleep 1 && kill %1 && hexdump -vC out.txt &&
    rm -f out.txt
    [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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Hall@21:1/5 to mmphosis on Fri Jun 23 19:07:20 2023
    On Friday, June 23, 2023 at 2:39:38 p.m. UTC-7, mmphosis wrote:
    # nc localhost 6501 > out.txt & sleep 1 && kill %1 && hexdump -vC out.txt && rm -f out.txt
    [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
    How about a CR at the End!?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to mmphosis on Sat Jun 24 13:45:04 2023
    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:

    **************

    rem
    rem Test Script for keeping ncat client-to-client relay
    rem open;

    echo off
    :begin
    ncat 127.0.0.1 6501 -c "ncat 192.168.1.170 9100"
    goto begin

    **************

    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).

    After I've quit GSPort, I just send a ctrl-C to the command line and exit.

    It's not pretty or elegant, but hey it works.

    I plan to do something much better on my Mac with KEGS (barring an
    update from Kent enabling the feature I requested he consider) using a
    bash (or AppleScript) script that would:

    1. start KEGS;
    2. start the ncat client-to-client relay (i.e. ncat 127.0.0.1 6501 -c
    "ncat 192.168.1.170 9100");
    and,
    3. keep the relay looping until it detects that KEGS is no longer running.


    Of course, if someone enterprising writes it for me before I 'get to
    it', all the better. In the meantime, I'll just use the Mac Terminal to
    enable printing from KEGS.





    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Hugh Hood on Sat Jun 24 21:59:12 2023
    On 6/24/2023 1:45 PM, Hugh Hood wrote:

    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).


    Let me correct myself. I don't paste that script. Rather, I've got it
    saved as a .bat (batch) file and I just double-click it.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Mon Jun 26 02:49:48 2023
    In article <hROdnat_nspyuwj5nZ2dnZfqnPWdnZ2d@earthlink.com>,
    Hugh Hood <hughhood@earthlink.net> wrote:
    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?

    Since the 90's, KEGS has supported you doing "telnet localhost 6501" to
    connect to the slot 1 serial port. Telnet is not a "transparent" protocol, KEGS HAS to do some things to get character echo turned off and immediate sending of characters to work. So it sends these Telnet commands.

    Everyone knew telnet was insecure, but then someone seemed to think they
    just discovered a new problem with telnet, and got it defeatured. And
    then it seems netcat was born (or found, I never heard of it before about
    10 years ago though).

    And netcat has a problem--it doesn't know about the Telnet protocol and
    so just ignores it. So then it passes these weird escape codes on to
    whatever you connect netcat to.

    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.

    Kent

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Sun Jun 25 23:18:50 2023
    On 6/25/2023 9:49 PM, Kent Dickey wrote:

    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.


    Kent,

    I suggest you do nothing. Besides, ncat (a successor to NetCat) has a
    Telnet option as follows:

    -t, --telnet (Answer Telnet negotiations)
    Handle DO/DONT WILL/WONT Telnet negotiations. This makes it possible
    to script Telnet sessions with Ncat.


    My only concern would be that unless Telnet is put in binary mode (and
    I'm not sure if the KEGS Telnet server supports that) it would not be
    adequate to say send 8-bit graphic data to a printer over ncat. That's
    all. {And, I don't foresee a need to do that}.

    I do send 8-bit characters to my network printer via the same method,
    but they are in the printable 191 characters of the ISO 8859 Latin code
    page, and as I understand it, Telnet must allow transmission of those
    191 characters even when not in binary mode.

    Tomorrow I'll try ncat with the -t option and see if it suppresses the forwarding of the Telnet negotiation codes sent by KEGS.

    Even if it doesn't, I'm pretty sure I can script to discard them.

    Thanks for looking into this. Again, I wouldn't change anything.





    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christopher G. Mason@21:1/5 to Hugh Hood on Mon Jun 26 16:13:56 2023
    On 6/24/2023 2:45 PM, Hugh Hood wrote:
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Christopher G. Mason on Mon Jun 26 20:55:30 2023
    On 6/26/2023 3:13 PM, Christopher G. Mason wrote:

    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.

    True. I used GSPort to test ethernet printing to a Port 9100 PostScript
    printer after modifying the LaserWriter driver to become the Direct
    Connect PostScript Printer driver.

    The advantage, however, of using the serial-to-Port 6501 socket comms
    and ncat (whether with KEGS or GSPort) is that ProDOS 8 programs get to
    play too. And the GS/OS stuff also works, whether PostScript or Harmonie.

    It's really the best of both worlds, I think.





    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Wed Sep 6 00:53:46 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Tue Sep 5 21:41:24 2023
    Kent,

    Thanks a MEG for doing this. I'll try it tomorrow on my work Mac.

    I've been silent on my Ncat method of printing from KEGS (that I
    previously had mentioned) on my new Mac for forwarding KEGS' local port
    6501 to port 9100 on the printer because I've been getting some
    weirdness with Ncat under MacOS that doesn't occur using Ncat on my
    Windows machine.

    So, provided your new addition eventually works out, I'll happily leave
    that headache behind.

    Regards,




    Hugh Hood


    On 9/5/2023 7:53 PM, Kent Dickey wrote:
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Wed Sep 6 23:01:54 2023
    On 9/5/2023 7:53 PM, Kent Dickey wrote:

    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

    Kent,

    I've been able to test your new Kegs 1.29 serial port to Remote IP
    feature in both Windows 10 and in MacOS and it works extremely well to
    send print jobs from the emulated IIgs directly to a network printer.

    I had success with the following type of print jobs:

    1. Listing of a BASIC program from the BASIC prompt {KEGS set to mask
    off high bit};

    2. Printing from 8-bit AppleWorks 5.1 using the built-in PCL 5 (DeskJet/LaserJet) printer driver {KEGS set to pass all 8 bits};

    3. Printing from GS/OS application 'BrkDown' using the Direct Connect PostScript Driver and the Printer port driver {KEGS set to pass all 8 bits}.


    All three jobs printed exactly as they should, and did so speedily. Both
    test machines (Windows and Mac) were used with a networked HP LaserJet
    printer that is connected to a network router. This printer understands
    both PCL 5 (which includes the plain text subset) and PostScript.

    Again, thank you so much for taking the time to add this feature. There probably aren't many people who still do 'real work' with an Apple IIgs (although I do on a daily basis), but having the ability easily to print directly to a modern printer really increases the usefulness of your
    emulator, at least to me.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Sun Sep 24 03:16:30 2023
    In article <1lGdnRTYHeqv1mT5nZ2dnZfqnPWdnZ2d@earthlink.com>,
    Hugh Hood <hughhood@earthlink.net> wrote:
    [snip]
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Mon Sep 25 23:51:57 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Tue Sep 26 15:56:19 2023
    In article <CKacnW7UG9Tw_o_4nZ2dnZfqn_ednZ2d@earthlink.com>,
    Hugh Hood <hughhood@earthlink.net> wrote:
    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

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christopher G. Mason@21:1/5 to Hugh Hood on Tue Sep 26 16:21:30 2023
    On 9/26/2023 12:51 AM, Hugh Hood wrote:
    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 emulated ImageWriter in GSPort can print much MUCH faster with some
    changes to the SCC emulation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Wed Sep 27 07:50:55 2023
    On 9/26/2023 10:56 AM, Kent Dickey wrote:
    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


    Kent,

    Disk image sent. Thank you.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antoine Vignau@21:1/5 to All on Thu Sep 28 05:33:17 2023
    Hi There,
    Where is the PHB at $213 balanced?
    The PHA PHK at $23C is balanced by PLA PLB at $241

    Antoine

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Antoine Vignau on Thu Sep 28 22:01:04 2023
    On 9/28/2023 7:33 AM, Antoine Vignau wrote:
    Hi There,
    Where is the PHB at $213 balanced?
    The PHA PHK at $23C is balanced by PLA PLB at $241

    Antoine


    Antoine,

    You're ahead of me on this. I'm still working with a quick disassembly
    from ChewBagger and digesting the concept of using the FWEntry Tool
    ($2403) to access the extended Pascal protocol for dealing with the
    serial ports, and I suppose the SetSCC hardware control call to access
    the SCC write registers for setting 57,600 baud.

    At least, that what I *think* Heineman is doing.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Antoine Vignau on Wed Oct 4 21:45:06 2023
    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.





    Hugh Hood


    On 9/28/2023 7:33 AM, Antoine Vignau wrote:
    Hi There,
    Where is the PHB at $213 balanced?
    The PHA PHK at $23C is balanced by PLA PLB at $241

    Antoine

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Hugh Hood on Wed Oct 18 22:57:22 2023
    On 9/25/2023 11:51 PM, Hugh Hood wrote:

    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.


    OK. Using Kent's new serial to IP feature in KEGS 1.30, I've been able
    to use VT100 emulation in ProTERM 3.1 (and I'm certain Spectrum would do
    so as well) to log into the host KEGS machine's (in this case MacOS)
    bash shell and issue shell commands to my heart's content.

    I've also been able to do a Zmodem send from ProTERM within the emulated
    IIgs and have the file show up on the Mac. {I'm still working out a
    small problem I have in *receiving* a Zmodem transfer}.

    Of course, most would ask the question, and it's a good one, why anyone
    would do that from the emulated IIgs when they could just use the
    Terminal App in MacOS.

    In my case, I've got an application in mind for that, but I'll leave
    that for another time. In the meantime, I suppose the answer is -- just
    because you can.

    FWIW, I used this excellent technique detailed by Blake Patterson to set
    up a socat daemon on the Mac that allows for the username/password login
    to the bash shell.

    <https://bytecellar.com/2022/11/28/configure-your-mac-to-allow-vintage-computers-to-dial-in/>

    Obviously, my use is a variation on his, and I may need to tweak a few
    of the socat settings he used, but this does the trick nicely, and I'm
    grateful that Blake shared it.




    Hugh Hood

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kent Dickey@21:1/5 to hughhood@earthlink.net on Sun Nov 5 01:38:45 2023
    In article <Gbudnaqvce6uvoP4nZ2dnZfqnPednZ2d@earthlink.com>,
    Hugh Hood <hughhood@earthlink.net> wrote:
    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.

    Some other things got in the way, but I finally release KEGS.1.31 which
    fixes this Code RED bug with the Printer57.6 driver. During init, it
    was setting baud to max, and setting some bits to enable baud rate interrupts, which would need to create an interrupt faster than every CPU clock cycle.
    KEGS thought this looked wrong and threw a Code RED. But in debugging
    it, the Printer57.6 driver has the Master Interrupt Enable in the SCC off, which prevents interrupts, so KEGS needed a qualifier to ignore these
    events happening super fast in this case.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Hood@21:1/5 to Kent Dickey on Mon Nov 6 11:04:38 2023
    Kent,

    Thanks for taking the time to track down exactly why the Printer57.6
    port driver was causing the code Red condition.

    After reading your explanation, I realize that I never would have found
    the reason. 😉

    I'd be happy to submit a few printer-related files along with an
    explanation.

    If there is time, however, I would first like to take a stab at
    modifying Heineman's Printer57.6 port driver to run at 115,200 baud, and
    then test it for speed and reliability.

    That driver uses an interesting technique -- in a 'hybrid' approach, it accesses both the Printer Port firmware and the SCC registers through
    the extended Pascal protocol.

    It currently only accesses SCC WR12, but I'm going to add access to
    WR11, WR14 and WR4 to set the baud at 115,200.

    This is based on the assumption that with KEGS the sole reason that
    Apple's standard 19,200 baud driver is 3 times slower than Heineman's
    57,600 baud driver is the baud rate. If I'm off-base on that, and the performance increase is due solely to a more streamlined programming, I
    won't bother to include it.

    Regards,





    Hugh Hood



    On 11/4/23 8:38 PM, Kent Dickey wrote:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)