Page 1 of 1

C64 modem connection speed is buffer-lagging

Posted: Mon Jul 19, 2021 9:53 pm
by jalbarracin
Hi, I am programming a BBS software (open source, soon to be added to github) and when I test it with VICE Emulator in UP9600 mode it works great, everything runs fast.

In Mister C64 Core with UP9600 when receiving data is almost comparable to VICE (probably faster than VICE) but the problem is when you type you username or any input required fields, it "stalls" and then bursts. Is like "something" is lagging in the ouput buffer. This only happens in Mister C64 Core.

Hope this info could help to try reproduce (It happen to me when connecting to any bbs, not only mine).

Best!

Re: C64 modem connection speed is buffer-lagging

Posted: Mon Jul 19, 2021 10:41 pm
by bbond007
jalbarracin wrote: Mon Jul 19, 2021 9:53 pm Hi, I am programming a BBS software (open source, soon to be added to github) and when I test it with VICE Emulator in UP9600 mode it works great, everything runs fast.
Same thing with 2400? I have not tried UP9600 yet.

Re: C64 modem connection speed is buffer-lagging

Posted: Mon Jul 19, 2021 10:56 pm
by jalbarracin
I will test 2400, but I think this is not related to baud rate. Will confim in a couple of hours.

Re: C64 modem connection speed is buffer-lagging

Posted: Tue Jul 20, 2021 1:22 am
by jalbarracin
Ok just tested 2400 speed and the experience is similar. Some times you are typing (this only happens when you are connected) and the characters keep stalled for 5 seconds. I did a complete reinstall to test this. I didnt remember this experience weeks ago, So I believe this is related to the latest core. I will test with older core to confirm.

Re: C64 modem connection speed is buffer-lagging

Posted: Tue Jul 20, 2021 1:28 am
by jalbarracin
Tested on C64_20210630.rbf : keyboard buffer improves a little (somewhat better) but still stalls from time to time. I tested also on 20210530.rbf and the issue still is there. --> I am starting to believe that the problem is on the MidiLink side (modem emulation).

Re: C64 modem connection speed is buffer-lagging

Posted: Wed Aug 04, 2021 5:44 pm
by jalbarracin
Still having this issue. When I write, for example 30 or 40 characters (typing a letter) it seems it hit a buffer issue and stop showing the characters in the screen. But the server receives what I am typing. After several seconds I get the characters in the screen. This behaviour only happens with C64 Core in Mister. VICE works OK and other PC terminals (like Syncterm in C64 mode) work OK also.

I am scratching my head.

Re: C64 modem connection speed is buffer-lagging

Posted: Thu Aug 05, 2021 5:27 pm
by bbond007
jalbarracin wrote: Wed Aug 04, 2021 5:44 pm I am scratching my head.
does it do it when you type ATHELP or does it happen only after you are connected?

Re: C64 modem connection speed is buffer-lagging

Posted: Thu Aug 05, 2021 5:34 pm
by rcade
I will try this and see if I experience the same thing. I've only played with CCGMS and connected to a portal on my computer and watched PETSCII "movies". This was receive-only, though. I gather you are only seeing this on sending...

You are connecting with wired ethernet (as opposed to wifi dongle) and this is a local host on your network it's talking to?

Re: C64 modem connection speed is buffer-lagging

Posted: Fri Aug 06, 2021 12:17 am
by bbond007
rcade wrote: Thu Aug 05, 2021 5:34 pm You are connecting with wired ethernet (as opposed to wifi dongle) and this is a local host on your network it's talking to?
Excellent question....

Also, are you calling the same BBS with ao486 that you are with C64?
jalbarracin wrote: Wed Aug 04, 2021 5:44 pm I am scratching my head.
I had not been able to get the TCP/Modem working with more recent builds. MidiLink was getting no data but something was echoing back whatever I typed. By comparing settings with NML32 we figured out it was Dolphin DOS ROM causing the issue. Might be a long shot... Maybe try the standard ROM if you are not using that...

Not experienced lag yet and the 9600 is indeed a nice boost! I would have loved to have a 9600 baud modem back in the day! I had a 300 BAUD Total-Telecommunications modem until I got my Amiga 500.

Re: C64 modem connection speed is buffer-lagging

Posted: Fri Aug 06, 2021 1:57 am
by jalbarracin
I am connecting through wi-fi dongle. It works OK when in AO486 mode (no issues in irc)
but I will test the ethernet mode to discard.
rcade wrote: Thu Aug 05, 2021 5:34 pm I will try this and see if I experience the same thing. I've only played with CCGMS and connected to a portal on my computer and watched PETSCII "movies". This was receive-only, though. I gather you are only seeing this on sending...

You are connecting with wired ethernet (as opposed to wifi dongle) and this is a local host on your network it's talking to?

Re: C64 modem connection speed is buffer-lagging

Posted: Fri Aug 06, 2021 5:55 pm
by rcade
I see also you mentioned this is with your own custom software. Do you experience the problem with just a terminal emulator connecting to a host on your LAN?

I tried it just now on my setup with CCGMS and typed long strings of text to a host on my network and had no lag.

Also, I was able to actually upload an entire file with Punter protocol - no errors. I would think that would fail if there was a buffering issue?

Re: C64 modem connection speed is buffer-lagging

Posted: Sat Aug 07, 2021 4:29 pm
by dot-bob
If it's over the network interface it almost sounds like a Nagle's algorithm issue. Long strings are sent quickly as the packet buffer is filled and sent right away but if it is only few bytes it will wait a timeout before sending trying to maximize the data in the packet. It may need to be disabled for the socket on the linux side.

Re: C64 modem connection speed is buffer-lagging

Posted: Sat Aug 07, 2021 4:39 pm
by bbond007
dot-bob wrote: Sat Aug 07, 2021 4:29 pm If it's over the network interface it almost sounds like a Nagle's algorithm issue. Long strings are sent quickly as the packet buffer is filled and sent right away but if it is only few bytes it will wait a timeout before sending trying to maximize the data in the packet. It may need to be disabled for the socket on the linux side.
Nagle was disabled 2 years ago:

https://github.com/MiSTer-devel/MidiLin ... e909b88d7e

Also the Nagle theory would effect the modem on the other cores too...

Re: C64 modem connection speed is buffer-lagging

Posted: Sun Dec 19, 2021 2:59 am
by jalbarracin
All problems fixed. I am sharing my repository here if someone wants to develop a C64 BBS in Python, I hope this can be a good starting point

https://github.com/jalbarracinv/python-cbm-bbs