Upgraded to a 16550 UART - Disappointed

Hardware questions and modifications

Upgraded to a 16550 UART - Disappointed

Postby alanh » Sun Jan 19, 2014 4:22 pm

So while I was in a soldering happy mode, I pulled the 8250 off the JR motherboard and added a 40 pin socket with a 16550 in it. Even with hardware flow control on, ZModem and YModem have large enough windows that they keep overrunning the HW FIFO and causing time-outs and retries. The most reliable file transfer I can pull off atm is 38400 w/ HW flow control and XModem. Transfers top out at ~2KB/s with a null modem cable. I suspect that the lower than peak rate is due to the JR trying to turn around block acks. I'm starting to think that anything faster may be CPU bound by the JR unless the transfer protocol was hyper-optimized. At least this way I can start a huge zip file transfer tonight and let it run all night and get most of my HD contents over.

Just FYI. I'm using Procomm Plus 2.0x something.

-Alan
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: Upgraded to a 16550 UART - Disappointed

Postby Brutman » Sun Jan 19, 2014 4:51 pm

You know the baud rate divisor clock on the PCjr is different than on a PC. The BIOS handles the difference but anything that initializes the UART directly and assumes the PC's divisors is going to be broken, and the faster you go the worse the discrepancy is. If you can find the UART initialization code in Procomm you might be able to patch it to use the correct divisor. Or shell out of program and use a little bit of ASM to fix it after Procomm thinks it has done the initialization.

38400 is insanely fast for a machine of that vintage. Is this to a RAM disk or to the hard drive?
Brutman
Site Admin
 
Posts: 930
Joined: Sat Jun 21, 2008 5:03 pm

Re: Upgraded to a 16550 UART - Disappointed

Postby alanh » Sun Jan 19, 2014 8:41 pm

Ah thanks for the clarification. I didn't realize or notice that. Looking at the schematic now it seems they took the 14.31818 MHz clock and divided it by 4 to get a 1.79 MHz - about 3% off from the norm. Since it's slower, I bet the gap between the stop and start keeps less and less until the receiver can't catch it. I would think transmitting wouldn't have problems, but I haven't tested it.

I dead-bugged a 1.8432 MHz full can oscillator on top of the 16550 with the XIN pin bent out. XModem and YModem now work at 115,200, however YModem still caps out at about 3KB/s. I'm guessing because of the CRC overhead. ZModem keeps crapping out at 115,200. 50% better but not ideal.

You know Mike, you are pretty knowledgeable about Jr's. You should start some sort of Internet site and cache the knowledge! :)
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: Upgraded to a 16550 UART - Disappointed

Postby Brutman » Sun Jan 19, 2014 9:33 pm

Thanks. Even a blind squirrel finds a nut once in a while.

As for the 16550 I looked into it a few years ago and maybe even posted it somewhere. I had remembered reading that the baud rate divisor on the PCjr was different and I went digging into it. After I found the difference I found an IBMer who was there at the time and he told me it was a cost cutting move; they could save a few cents on the oscillator and hide the difference in the BIOS. Which was unfortunate because *nothing* uses the BIOS to initialize the UARTs. At the lower speeds things are sloppy enough where it doesn't matter.

Everything done on the PCjr was to make it cheap ...

Are you storing to a RAM disk or a real disk? It would be nice to know what the max throughput is vs. the real-world. 3KB a second is pathetic - I don't think the CRC is that hard. If you really want to sleaze out you can use just straight X-modem with 128 byte blocks; that will get you a checksum instead, but the 128 byte blocks will cause more dead time on the wire.

Do you know how the 16550 is being used - is Procomm getting interrupts or polling? If it is generating interrupts then the math would be an expensive hardware interrupt for every 16 bytes, assuming the FIFO is set that high. Polling might be faster because you can avoid that nasty interrupt. Another experiement to try would be to put a NEC V20 in there ... with the deeper instruction buffer it should go faster.
Brutman
Site Admin
 
Posts: 930
Joined: Sat Jun 21, 2008 5:03 pm

Re: Upgraded to a 16550 UART - Disappointed

Postby Eric » Sun Jan 19, 2014 9:58 pm

Strange coincidence. I was just thinking about replacing the UART with a 16550 and what would be involved to take advantage of it.

I'd mostly just do it for the excitment of soldering and having an upgrade I probably wouldn't use that much because I'm an insane fool who likes to fix things that aren't broken. (Too bad I'm more equal to what a script kiddie is to software to hardware. I understand how the mods I perform work, but all the cool ones are the work of someone else and pretty much anything I come up with isn't that noteworthy)


Anyway, I'd love to see what you make of this and how much you'll boost transfer speeds on your system and how you achieve it!
PCjr:
Eric
 
Posts: 126
Joined: Tue Aug 21, 2012 6:19 pm

Re: Upgraded to a 16550 UART - Disappointed

Postby alanh » Sun Jan 19, 2014 10:52 pm

I'm transferring to a KingSpec DoM in a mostly stock JR-IDE card (w/ 128K mem mod).

I tried swapping out a V20 w/ no clock mod. Didn't seem to help. I'm using Teraterm atm on a PC for the sender so it has limited transfer options. It seems anything beyond 256-XModem uses CRC including XModem-1K and YModem (which are basically the same). ZModem still craps out at most baud rates. 1K CRC modes top out at ~3KB/s. 256 XModem with it's shorter windows hits ~2.3 KB/s.
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA


Return to PCjr Hardware

Who is online

Users browsing this forum: Bing [Bot] and 1 guest