roelandjansen / pcmos386v501

PC-MOS/386 v5.01 and up, including cdrom driver sources.
GNU General Public License v3.0
417 stars 60 forks source link

TCP/IP? #78

Open leenooks opened 5 years ago

leenooks commented 5 years ago

Howdy, I've just discovered this and go it installed. Looks pretty cool :)

Is there a way to get TCP/IP running?

stsp commented 5 years ago

There is no "generic TCP/IP" for DOS. There are various TCP/IP stacks available, and they are usually not stand-alone, but rather embedded into a particular apps. And they are DOS-independent, because the packet driver API that they use, is not provided by DOS, but rather by the NIC driver.

So I don't think your question makes sense. Please try loading the NIC driver for DOS (is it available for your NIC?), then try running the TCP/IP-enabled app and see what happens.

Also as your nick-name suggests, you are probably using linux, in which case you have much more chances of getting TCP/IP under MOS, as in this case you don't need the DOSish NIC driver. There are dos emulators available for linux that provide the packet driver for your DOS app.

the-grue commented 5 years ago

Hey @leenooks! Welcome to the project!

As @stsp alluded to above, you'd need to provide some information about the platform you installed on and what ethernet card you are using. Then we might be able to provide some pointers to begin testing.

Just curious, are you using the v5.01 code from this repo or are you using my v5.02 release candidate? It shouldn't make much difference, but would be helpful to assist troubleshooting.

leenooks commented 5 years ago

@stsp fair point - I guess I should have asked is their a $TCPIP.SYS like there is a $NETBIOS.SYS to provide an IP stack - so that IP enabled apps can receive TCP/UDP connections.

My use case for this is to run my old 1995 DOS BBS - and I was looking at MOS so that I could run multiline. I've tried various combinations of DOSemu/DOSbox/QEMU on both a Raspberry Pi (QEMU) and ESX virtual machine with mixed success. The Pi is often too slow, that has issues with ZModem transfers (and timeouts), ESXi VM has issues because its faster (Borland Pascal Bug RTE200) and Serial Port Emulation with Carrier Detect.

There is a fossil that can receive an IP connection RLFOSSIL and emulate the COM port for the BBS software, so I thought I might try that route. Hence the IP stack question.

Oh, and I'm running from IMAGES/v501 which is running well (it is very responsive - but still RTE200 errors I need to get around). BTW: I did try the v5.01 from winworldpc, but it didnt boot into the installer, and I couldnt get it installed to a hard disk following the documentation here (DOCs/v4).

So if you have tips to get an IP stack running, I'd appreciate them (never played IP with DOS before), and any other tips to get more memory to a task - it seems I only get around 405K, which is bordering on too low.

Looking forward to see where you take this....

leenooks commented 5 years ago

Also, I've just realised that the images in IMAGES/v501 are 60 minute time bombs, is there a way to remove the timebomb, or should I use a different image?

stsp commented 5 years ago

I guess I should have asked is their a $TCPIP.SYS

No, there is no such thing, because there is no standardized interface of one. As I said, instead most apps just embed their own TCP stacks, that only use a packet driver. The packet driver API is the only standardized part of the OSI stack for DOS. There were some standardization attempts (trumpet for instance), but they have not became popular. There were also the DOS ports of some more recent TCP stack like TinyTCP. Some overview is here: http://wiki.freedos.org/wiki/index.php/TCP-IP But this info is almost useless for you unless you are writing the new app that will use these stacks.

like there is a $NETBIOS.SYS

A quick look suggests $NETBIOS.SYS implements the network FS access, but there is no redirector itself. It have to be installed separately. I am sure @andrewbird or @the-grue know more about $NETBIOS.SYS. I'd like to read some info about it too, to know what can MOS do with the remote filesystems.

There is a fossil that can receive an IP connection RLFOSSIL and emulate the COM port for the BBS software so I thought I might try that route. Hence the IP stack question.

Its up to you to discover the route you like, but my suggestion is that this route will lead you nowhere towards the target you outlined. Both dosbox and dosemu2 have the com port emulators over tcp/ip built-in. If you ask me, I would recommend you to ask for help from those emulator guys. Your problem is easily solvable with these tools, and in particular with dosemu2 you can even keep using MOS if you want to (with dosbox you'll stick to its built-in DOS).

the-grue commented 5 years ago

Oh, and I'm running from IMAGES/v501 which is running well (it is very responsive - but still RTE200 errors I need to get around). BTW: I did try the v5.01 from winworldpc, but it didnt boot into the installer, and I couldnt get it installed to a hard disk following the documentation here (DOCs/v4).

If you want to try my v5.02 rc, I have added a batch file that will register your MOS and remove the 60 minute timeout. It also adds the CDROM driver too. If you want to stick with the v5.01 release, I wrote up a method to register it. I believe instructions are linked in the wiki.

So if you have tips to get an IP stack running, I'd appreciate them (never played IP with DOS before), and any other tips to get more memory to a task - it seems I only get around 405K, which is bordering on too low.

I have found that if you run ACU and then lower the SMP setting to 16 it should free up a lot of memory, typically getting you over 500K to work with. Or you could just add this line manually to your config.sys

smpsize=16

Going lower than that might negatively impact your system as it won't provide enough SMP for the drivers to load.

You can also set extended memory settings with ACU. Just make sure you have a boot floppy, etc. available to get in if the changes you make hang your system. The memory manager for protected mode is kind of touchy and has a lot of parameters you can set.

This interests me as well, so please keep us posted if you find anything out. I'll do the same.

Might have to find my old Microsoft Network Client disks...

the-grue commented 5 years ago

Oh, I'll just add that I have had some good luck testing under VirtualBox and utilizing 4 virtual serial ports to proved a 5 user concurrent system. Let me know if that might be of interest to you.

I am not sure that MOS ever ran with a TCP/IP stack. Maybe @roelandjansen knows?

I was not aware of the Borland Pascal RTE200 problem. That might explain the strange error I see when I run help sometimes, because that is compiled using TP7. A quick google session might have provided a fix for that.

stsp commented 5 years ago

There is a fossil that can receive an IP connection RLFOSSIL

First link in google leads here: http://www.vcfed.org/forum/archive/index.php/t-26037.html Which says:

I was wondering if anybody was working on updateing RLfossil. Seemed to be the answer to my prayers
when it came to a fossil interface for my old bbs. Unfourtuntly, it requires a packet driver

Which is exactly what I was trying to say. You don't need tcp/ip - its already there. You need a packet driver for DOS. Will you find one for your NIC? No. Or you can try to. But modern emulators already provide the com port over tcp/ip, provide fossil API on top, provide a packet driver and whatever else you can think of. They just work.

roelandjansen commented 5 years ago

In the past I used KA9Q's TCP/IP stack -- AX25 --> serial --> hamradio transceiver

the-grue commented 5 years ago

@stsp seems to have a good solution for what you are trying to do. He also has a good point about finding a packet driver for your NIC. I know there is one out there for one of the emulated AMD adapter cards in VirtualBox, but not sure about any other platforms.

leenooks commented 5 years ago

So mixed success. I found a packet driver (I'm running PC-MOS as a ESXi guest) - for the AMD PCNet 32 card. In DOS6.22 it loads fine and works. For PC-MOS it doesnt load (I'm using the same arguments): PCNTPK INT=0x60 BUSTYPE=PCI IOADDR=0 and it returns "device not found". Any ideas?

leenooks commented 5 years ago

All good - got it to load. Found a utility called nicscan that identified the device, and I used the address 0x2000 and it loaded fine :) Now to see if RLFOSSIL will load ...

leenooks commented 5 years ago

Argh, cant get FrontDoor or Portal of Power running. Frontdoor doesnt detect the FOSSIL, POP does, but bombs - I think both might be memory constraints.