barotto / IBMulator

The IBM PS/1 emulator.
https://barotto.github.io/IBMulator
GNU General Public License v3.0
112 stars 4 forks source link

Modem connection to a BBS #72

Closed mdscott19 closed 1 year ago

mdscott19 commented 1 year ago

I think the answer is no, but I wanted to ask, just in case: Is there a way to map a serial port on the host computer to a serial port on the emulated PS/1? Similar to the capability in VirtualBox - where you can take a host computer's serial port, share it with a virtual machine (enable serial port = Y, port mode=host device), and have the guest operating system use the port like it was attached natively?

Here's why I ask. There's a device made by Arcanebyte (called the RS232 Wifi wireless modem) that plugs into a (real, physical) serial port and emulates a Hayes-compatible modem. After you connect the device to your wifi network, you can "dial" out with a command like: ATDT bermudatrianglebbs.com. You (obviously) can use it to connect to the many telnet-accessible BBS's that hobbyists are running today.

If there was a way to make a device like this work with the PS/1 emulator, I could waste hundreds of hours downloading shareware that's mostly too sluggish to run - which is exactly how I used my real model 2011 back in the 90s!

barotto commented 1 year ago

Alas no, you can't use a serial port on the host. The main problem is I don't have a serial port anymore so I can't test and debug for it. Also I think a guest->host serial mapping would be an extremely niche use case for this project, which I can't justify dev time for.

Nonetheless connecting to a BBS from the guest is an intriguing idea and I think it could be done without the need of a host serial port. Right now IBMulator can emulate a serial -> TCP/IP connection, so I can think of implementing a virtual modem integrating DosBox's code.

Unfortunately I know nothing about BBS's and how to connect to them. What DOS program would you use on the PS/1? Other than bermudatrianglebbs.com, can you suggest me any modern BBS to try?

mdscott19 commented 1 year ago

First, I would say you're absolutely correct -- my use case is very specific, and if there isn't something already there to make it work, I wouldn't ask you to spend any time on it.

But, if you ever need to add a serial port, StarTech makes a USB(A)->RS232 adapter. It requires a Windows driver, and so I'm not sure if it works under Linux. But at least under Windows, it'll give you a real COM port that you can use a real modem with.

Although there were many dialup terminal emulators of the era, Telix was probably the easiest to use, and thusly, the most popular. I've attached a version from 1992, which you can also find at the Internet Archive:

https://archive.org/details/TelixCommunications_1020

As far as modern BBS's go, there are currently over 1,000 of them in the telnet BBS database. Some of them have lots of users and little software; others are the opposite, and some just focus on (door) games. Part of the wonder of BBSing back in the day was exploring, and never knowing exactly what you'd find. This is still true today.

The full list is here: https://www.telnetbbsguide.com/

I personally ran a BBS myself on one of my two PS/1s, using a variety of software that you can still find today -- like Wildcat, Renegade, Telegard, WWIV, and Roboboard/FX. If initiating a TCP connection from the host to the IBMulator will (virtually) raise DSR/DCD on the simulated rs232 port, it's possible that BBS software would work too. You could just telnet into them, and they'd think it's a modem connection.

That said, setting up Telix (to dial out) is super easy. Creating a BBS is a little more involved, and I might play with that if I can figure out the TCP->serial port stuff in IBMulator. (I wasn't quite sure what that was.)

Fun stuff! telix351.zip

barotto commented 1 year ago

Thanks for the info! I missed the BBS era back in the day as when I was old enough to own (and use) a modem the Internet was already the only way to go online. This being a hobby project, I tend to implement those features for which I have a personal interest and/or memory.

According to what you say, IBMulator should already have all the ingredients necessary to make the connection work. What's really missing is a usable user interface. The net-client serial configuration in ibmulator.ini is tested for the only use case of connecting to another instance of IBMulator or DosBox emulating a null-modem link. It should be enough but the connection is established when IBMulator launches and to a predetermined address. So it's not very convenient for connecting to BBS's... The net-server option was tested for the same use case to accept incoming connections, except it can establish a connection at any moment without a restart.

The idea of calling a modern BBS from the PS/1 as if it was 1990 has piqued my interest. I will test and see what's missing from a technical standpoint and what's left to do to make IBMulator really usable for this.

mdscott19 commented 1 year ago

I recently learned there's also an effort underway to re-create Prodigy. In fact, I actually have the PS/1 version of Prodigy working in dosbox-staging. Currently, you have to run the content delivery server yourself (in docker-compose) - but if you do, you can create yourself an ID, log in and see the Highlights page.

Successfully running the client requires dosbox-staging's modem emulation, ala:

[serial] serial1 = modem listenport:5000 baudrate:2400 phonebookfile = phones.txt

with a phones.txt file: 5551212 localhost:25234

(the 'localhost' assumes you're running the docker on your local machine, of course)

Anyway, if there was a way for IBMulator to offer dosbox-staging's modem emulation capability, I think Prodigy would work - straight off the four quadrants menu.

You can check out Phil Heller's "Prodigy Reloaded" effort:

https://www.prodigyreloaded.com/ https://discord.gg/7QRBASeJNs https://github.com/ProdigyReloaded

barotto commented 1 year ago

Anyway, if there was a way for IBMulator to offer dosbox-staging's modem emulation capability, I think Prodigy would work - straight off the four quadrants menu.

That would be neat.

I came across the Prodigy service recreation efforts last year, but didn't know about the current state and the availability of a working server. Thanks for the tip.

EDIT: it was actually in december 2021 via this post https://www.vintagecomputing.com/index.php/archives/3064/reverse-engineering-prodigy-part-2 that someone linked in a tweet. The Marco that commented in that post is me :)

pheller commented 1 year ago

Would definitely love to see the Hayes modem emulation integrated. One key, for Prodigy at least, is to have a configurable connect speed reported. (Older clients would accept CONNECT 2400 at most).

What would be amazing is if you integrated this and ported to wasm with emscripten. Someone built dosbox with SDLnet some years ago, so it's doable if tedious.

This would require the modem connection be over websocket due to same-origin policy. The emscripten build I mention above used some websocket proxy. Prodigy Reloaded could handle terminating the websocket directly, absent a proxy.

barotto commented 1 year ago

Hello @pheller , I'm working on the modem emulation and testing with Prodigy Reloaded, but at the moment I'm having some difficulties making it work properly.

The connection starts fine but after exchanging some data the Prodigy client (6.03.17) resets the modem with ATZ and returns an error. I'm having this problem with both my emulator and the latest version of dosbox-staging.

This is the dosbox's log:

2023-03-17 18:48:10.032 | SERIAL: Port 1 command sent to modem: ->ATZ<-
2023-03-17 18:48:10.032 | SERIAL: Port 1 modem could not open port 23.
2023-03-17 18:48:10.032 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:48:13.078 | SERIAL: Port 1 command sent to modem: ->ATE0V1Q0X1 S6=3 S7=30 <-
2023-03-17 18:48:13.078 | SERIAL: Port 1 unhandled modem command: X1.
2023-03-17 18:48:13.078 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:48:14.370 | SERIAL: Port 1 command sent to modem: ->AT&C1&D1 S10=32 <-
2023-03-17 18:48:14.370 | SERIAL: Port 1 unhandled modem command: &C1.
2023-03-17 18:48:14.370 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:48:15.638 | SERIAL: Port 1 command sent to modem: ->ATI0<-
2023-03-17 18:48:15.638 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:48:16.966 | SERIAL: Port 1 command sent to modem: ->ATS0=0<-
2023-03-17 18:48:16.966 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:48:17.323 | DISPLAY: EGA 640x350 16 color (mode 10h) at 70.086 Hz VFR, scaled to 1213x910 with 1.372 pixel aspect ratio
2023-03-17 18:48:46.426 | SERIAL: Port 1 command sent to modem: ->ATDT5551212<-
2023-03-17 18:48:46.426 | SERIAL: Port 1 connecting to host 192.168.2.12 port 25234.
2023-03-17 18:48:46.426 | SERIAL: Port 1 modem response: CONNECT 2400.
2023-03-17 18:48:57.331 | SERIAL: Port 1 modem entering command mode (escape sequence).
2023-03-17 18:48:57.331 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:48:58.641 | SERIAL: Port 1 command sent to modem: ->ATZ<-
2023-03-17 18:48:58.641 | SERIAL: Port 1 modem response: NO CARRIER.
2023-03-17 18:48:58.641 | SDLNET: Closed client TCP listening socket
2023-03-17 18:48:58.641 | SERIAL: Port 1 modem could not open port 23.
2023-03-17 18:48:58.641 | SERIAL: Port 1 modem response: OK.
2023-03-17 18:49:05.232 | SERIAL: Port 1 command sent to modem: ->ATZ<-
2023-03-17 18:49:05.232 | SERIAL: Port 1 modem could not open port 23.
2023-03-17 18:49:05.232 | SERIAL: Port 1 modem response: OK.

This is the Delivery System log on the terminal:

root@devel:~/prodigy/delivery-system# docker compose up
[+] Running 2/0
 ⠿ Container prodigy-db-1      Created                                                                                                                                                                                                                                                                                                        0.0s
 ⠿ Container prodigy-server-1  Created                                                                                                                                                                                                                                                                                                        0.0s
Attaching to prodigy-db-1, prodigy-server-1
prodigy-db-1      | 
prodigy-db-1      | PostgreSQL Database directory appears to contain a database; Skipping initialization
prodigy-db-1      | 
prodigy-db-1      | 2023-03-17 17:39:49.965 UTC [1] LOG:  starting PostgreSQL 15.2 (Debian 15.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
prodigy-db-1      | 2023-03-17 17:39:49.980 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
prodigy-db-1      | 2023-03-17 17:39:49.980 UTC [1] LOG:  listening on IPv6 address "::", port 5432
prodigy-db-1      | 2023-03-17 17:39:49.981 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
prodigy-db-1      | 2023-03-17 17:39:49.983 UTC [29] LOG:  database system was shut down at 2023-03-12 20:25:52 UTC
prodigy-db-1      | 2023-03-17 17:39:49.995 UTC [1] LOG:  database system is ready to accept connections
prodigy-server-1  | 17:39:51.095 [info] Starting Prodigy Server
prodigy-db-1      | 2023-03-17 17:44:50.083 UTC [27] LOG:  checkpoint starting: time
prodigy-db-1      | 2023-03-17 17:44:50.085 UTC [27] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.003 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB
prodigy-server-1  | 17:48:48.463 [info] User EVTQ98A logged on (Enroll Subscriber)
prodigy-server-1  | 17:48:52.068 [notice] User requested id: 'TLPEADDSPGM\0x0\0xC' client_version: 0x1F0E, but it is newer than the database version (0x1F03)
prodigy-server-1  | 17:48:53.195 [warning] CMC received message in unknown format: <<0x45, 0x56, 0x54, 0x51, 0x39, 0x38, 0x41, 0x20, 0x20, 0x54, 0x50, 0x43, 0x4D, 0x30, 0x31, 0x31, 0x38, 0x45, 0x20, 0x30, 0x30, 0x31, 0x20, 0xA0, 0xC, 0x93, 0x6, 0xF4, 0x0, 0x70, 0x0, 0xA0, 0xC, 0x93, 0x6, 0xF4, 0x0, 0x30, 0x30, 0x30, 0x31, 0x33, 0x30, 0x30, 0x32, 0x39, 0x36, 0x32, 0x39, 0x36, 0x30, 0x35, 0x2E, 0x30, 0x30, 0x36, 0x2E, 0x30, 0x33, 0x2E, 0x31, 0x37, 0x20, 0x4E, 0x4F, 0x57, 0x49, 0x4E, 0x44, 0x4F, 0x57, 0x49, 0x44, 0x58, 0x30, 0x30, 0x30, 0x30, 0x4E, 0x4F, 0x53, 0x45, 0x4C, 0x45, 0x43, 0x54, 0x4F, 0x52, 0x58, 0x30, 0x30, 0x30, 0x30, 0x54, 0x4C, 0x4F, 0x54, 0x30, 0x30, 0x31, 0x30, 0x50, 0x47, 0x20, 0x30, 0x31, 0x30, 0x34, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20>>
prodigy-server-1  | 17:48:57.473 [info] User EVTQ98A logged off (abnormal)

And finally this is the client's error message: 2023-03-17_18-50

I haven't called 1-800-759-8000 yet.

I tried reinstalling the Prodigy client a couple of times from the orignal floppy image, same result.

I think I followed the delivery-system's install instructions correctly...

Any ideas?

pheller commented 1 year ago

Yes, I left a step or two out of the instructions for the 6.03.17 client... I think you have two options:

  1. Use this client instead. It is RS version 6.03.10, which was the retail version for generic Prodigy users.
  2. The version you installed is RS 6.03.17, which was specifically for IBM PS1 User's Club, and it requested an object we have not yet replicated. Edit C:\PRODIGY\CONFIG.SM and change OBJECT:XTG00000.PG1; to OBJECT:TLOT0010.PG1; and the client will request the same object that the retail version would.

Let me know if that works.

barotto commented 1 year ago

Followed option 2. Thanks!

2023-03-17_19-38

pheller commented 1 year ago

Very cool! If you get IBMulator to build with SDLnet under emscripten and add websocket as a transport, let me know and I'll add the corresponding bits into the Prodigy Reloaded Delivery System.

I'm imagining that you'd send the ATDT argument as the first message over the web socket and expect back some call progress indicator you'd translate to the modem response message.

Anyways, hope to see an emscripten port someday if it aligns with your goals.

barotto commented 1 year ago

I would call it a success!

https://user-images.githubusercontent.com/5670600/226093120-02923fb4-2e96-40fd-bc94-8afc5f9946b5.mp4 (audio on)

As for an emscripten port, that will have to wait for now. I have no experience with emscripten but after a cursory read of its docs I'm afraid it would require a bit of work to successfully compile and run IBMulator with it.

pheller commented 1 year ago

Look great and nice touch with the modem sounds!

emscripten certainly is an adventure.

pheller commented 1 year ago

@barotto Do you mind if I crop and use your video from 2 comments above on the prodigy reloaded website?

barotto commented 1 year ago

Sure. But I have a better version of that. Tomorrow I'll post it here.

Il mar 4 apr 2023, 16:32 Phillip Heller @.***> ha scritto:

@barotto https://github.com/barotto Do you mind if I crop and use your video from 2 comments above on the prodigy reloaded website?

— Reply to this email directly, view it on GitHub https://github.com/barotto/IBMulator/issues/72#issuecomment-1496080638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLINSBRGGD6MCB5L542KYDW7QWITANCNFSM6AAAAAAT7RZJG4 . You are receiving this because you were mentioned.Message ID: @.***>

barotto commented 1 year ago

Here it is: https://user-images.githubusercontent.com/5670600/230100258-fcfd50c6-db10-4c82-8d1a-61242b17ad29.mp4

The same video on YT: https://youtu.be/zR63VmJoXHY

Do whatever you want with it.

pheller commented 1 year ago

Thanks!Sent from my iPadOn Apr 5, 2023, at 7:50 AM, barotto @.***> wrote: Here it is: https://user-images.githubusercontent.com/5670600/230100258-fcfd50c6-db10-4c82-8d1a-61242b17ad29.mp4 The same video on YT: https://youtu.be/zR63VmJoXHY Do whatever you want with it.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>