General Category > LisaList2

TCP for MacWorks

<< < (2/5) > >>

compu_85:

--- Quote from: rayarachelian on January 28, 2021, 10:41:09 pm ---

but would love to see this ported to LOS.

--- End quote ---

Same here! There are so few Office System apps, ones which can make the system talk to the modern world would be extra interesting.

D.Finni:

--- Quote from: compu_85 on January 31, 2021, 02:41:21 pm ---
--- Quote from: rayarachelian on January 28, 2021, 10:41:09 pm ---

but would love to see this ported to LOS.

--- End quote ---

Same here! There are so few Office System apps, ones which can make the system talk to the modern world would be extra interesting.

--- End quote ---
Given documentation on LOS, porting the core TCP/IP probably wouldn't take more than a month's effort. There are almost no Toolbox calls. Really the only Mac-ism is using register A5 as an application globals pointer. The other big code dependency is the ROM-based serial driver.

rayarachelian:

--- Quote from: D.Finni on January 31, 2021, 11:35:50 pm ---Given documentation on LOS, porting the core TCP/IP probably wouldn't take more than a month's effort. There are almost no Toolbox calls. Really the only Mac-ism is using register A5 as an application globals pointer. The other big code dependency is the ROM-based serial driver.

--- End quote ---

I suppose you could ignore the A5 code completely and instead call Lisa A-Line traps where equivalent, etc. not sure if the LOS serial driver is going to be good enough at higher speeds, (at least assuming from baud rate limitations in LisaTerminal) but you could try and see. I'm guessing your code is likely modular so you'd only replace the pieces that interface with the serial driver. Not sure if handles are a thing in LOS as well, since it has an MMU so it has less of a need to reorder the address spaces.

From what little I know of LOS programming, the serial ports behave mostly like files, so that's a nice copied unix-ism, (though I suppose that's similar to opening a driver on the mac side too) but ofc setting the parameters requires a different set of calls than in the Mac System.

Hmmm, I suppose it might be useful to have a Mac vs LOS programming guide to help port stuff back from Mac System X programming to the Lisa. Maybe stuff like Alice could be reverse engineered and re-ported to run on LOS, etc.

D.Finni:
Yes, I took a fairly responsible approach to code design, and the serial interface is a separate module which could be replaced.

But I'm using all the advanced features of the Mac's serial driver: I use asynchronous I/O, a completion routine, and a VBL task. At 57600 baud, the serial driver's private buffer has to be at least 800 to 900 bytes to avoid over-runs.

The VBL task is timed to fire every 1/16th of a second, and reads up to 200 bytes from the serial driver's private buffer, and decodes the PPP framing. Then it copies the decoded data to a PPP reassembly buffer, and when a complete IP datagram is assembled, it is passed to the IP handler. This gives me almost the best possible serial performance, without writing my own custom interrupt handler for the SCC (which I came close to doing this summer), while also allowing for interactivity (reading only up to 200 bytes at a time ensures the CPU isn't monopolized).

But anything is possible. If Lisa doesn't have the same support infrastructure that the Mac does, the code could be modified to make do, but with a loss of performance. Unless I wrote a custom interrupt handler for the SCC! If so, then we're back in business!  8)

rayarachelian:

--- Quote from: D.Finni on February 01, 2021, 11:14:32 pm ---Yes, I took a fairly responsible approach to code design, and the serial interface is a separate module which could be replaced.
...

--- End quote ---

Yeah, I don't know how good the LOS SCC driver is, it may turn out it needs to be replaced, or patched in many ways. I know things worked well with ZTerm on MacOS <6.0.3 on top of MacWorks, or with LocalTalk. I had a 25ft serial cable between my 1st Lisa and a PC back in the early 90s, and also had a PC Localtalk parallel port adapter with some custom software and they could talk to each other, but LOS might or might not need extra help there.

I didn't have LOS in those early days. At first I used the Lisa as a MacPlus replacement, and then eventually I built a IIcx hackintosh in a PC case and then used the Lisa only for Xenix as I was getting into unix at the time.

There is source for the UniPlus kernel and its drivers on bitsavers, so we can at least tell if it does enough of the right things for getting PPP going instead of UUCP by reading.

From reading the LOS Device Driver manual I recall that it might be necessary to have two drivers, like with the parallel port, one driver for the port itself and other for the PPP code. (In the case of the parallel port, the 2nd driver is for the ProFile/Widget driver.) I think that manual contains info about building drivers, and there's a dump of a driver, but not sure how much useful details it has - I don't know if there's a sample LOS driver on the LPW disks, for example. So there may be lots of gaps to back fill.

As Tom pointed out, LisaTerminal works well at high speeds when *software* handshaking is used. This won't be viable for PPP, but not sure if that's a driver or app issue. My experiments with trying to get the serial port going for LisaEm wound up showing that if new data comes into the port after it sends a ^S is that the bytes are read, but completely discarded, which is really bad design. Again, I couldn't tell if the driver did that or LisaTerminal. But that was the behavior.

And it behaved better at higher speeds than at lower speeds, which indicates that it likely allocates a larger buffer at higher speeds. Some context, in the emulator, the baud rate means absolutely nothing. Whether you choose 300bps or 19200, LisaEm will send bytes as quickly as it can, generating IRQs as soon as there is data, and it will buffer all the data internally so nothing gets lost (upto 32K, though I could make it much higher). However either LOS or LisaTerminal freaks out and discards bytes if it gets them faster than some rate it's expecting.

Hopefully that's just LisaTerminal behaving badly and not the driver, otherwise, the driver will need to be disassembled and rewritten to do the right stuff. and then that gets into the question of how does one write a driver installer disk for LOS as well - there is one example which is the 800k floppy driver for LOS here: https://macintoshgarden.org/apps/lisa-office-system-800k-driver which could be useful for that effort.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version