RP2040 replacement for IPC ?

Nagging hardware related question? Post here!
User avatar
janbredenbeek
Super Gold Card
Posts: 664
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands
Contact:

Re: RP2040 replacement for IPC ?

Post by janbredenbeek »

Peter wrote: Tue Oct 08, 2024 9:43 pm It would have been better to omit the IPC completely, attach keyboard and beeper the Spectrum way and save time-to-market, board space and costs. Just one serial port in that case, but a decent one.
If they would only have implemented a proper UART, not the bit-banging of the ZX Interface 1.
(The IPC would have been a great solution for serial input, if implemented properly, because of the buffering. The UART chips used at the time had only 1-byte buffers and the 16550 was too expensive, if available at all).


User avatar
tofro
Font of All Knowledge
Posts: 3008
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: RP2040 replacement for IPC ?

Post by tofro »

janbredenbeek wrote: Wed Oct 09, 2024 10:15 pm
Peter wrote: Tue Oct 08, 2024 9:43 pm It would have been better to omit the IPC completely, attach keyboard and beeper the Spectrum way and save time-to-market, board space and costs. Just one serial port in that case, but a decent one.
If they would only have implemented a proper UART, not the bit-banging of the ZX Interface 1.
(The IPC would have been a great solution for serial input, if implemented properly, because of the buffering. The UART chips used at the time had only 1-byte buffers and the 16550 was too expensive, if available at all).
The whole story was proven by the Hermes and SuperHermes chips that make the QL a reliable RS-232 handler. But I agree with Peter that loading the IPC with sound wasn't the most clever idea.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Peter
Font of All Knowledge
Posts: 2394
Joined: Sat Jan 22, 2011 8:47 am

Re: RP2040 replacement for IPC ?

Post by Peter »

janbredenbeek wrote: Wed Oct 09, 2024 10:15 pm The UART chips used at the time had only 1-byte buffers and the 16550 was too expensive, if available at all).
The first 16550 version with working FIFO came in 1987.
Without IPC, and reduction to one serial port, I still think that a reliable UART with just the ULA was possible.
The room no longer needed for IPC comms could all have been used for the UART, allowing double buffering and an overall decent implementation.


User avatar
Dave
SandySuperQDave
Posts: 2794
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: RP2040 replacement for IPC ?

Post by Dave »

Peter wrote: Fri Oct 11, 2024 1:00 pm The first 16550 version with working FIFO came in 1987.
I have tubes of later 16550-compatible ICs. I have never seen a QL driver to support them though - just the older and less useful 6850 that has an incompatible register structure.

An IPC replacement RP2350B is very achievable. If both the 8302 and 8049 were replaced by RP2350Bs, and had an alternate link method, a few improvements become desirable:

Firstly, the two serial port RX lines are simply joined together after level shifting, so the PCB only supports one serial port in use at a time. A single track cut and flying lead can completely resolve this. The OS is blind to this change.

Secondly, instead of implementing microdrive signaling, a QL-SD compatible or later revision option becomes desirable.

"Internal" memory could be reduced to just the IO area. Depending on an 8301 replacement, video could be considered slow "Internal" memory or fast "external" memory - the meaning of which becomes blurry when internal DRAM is ignored and all memory accesses would be faster.

Fixing the horrible /DTACK anticipation of the original ICs would make a lot more sense.

I have designed a fair few RP2040/2350A/B boards and would be happy to contribute layout skills to a group project.


User avatar
Peter
Font of All Knowledge
Posts: 2394
Joined: Sat Jan 22, 2011 8:47 am

Re: RP2040 replacement for IPC ?

Post by Peter »

Dave wrote: Tue Dec 31, 2024 7:37 pm I have tubes of later 16550-compatible ICs. I have never seen a QL driver to support them though - just the older and less useful 6850 that has an incompatible register structure.
The 16550 is supported by QDOS Classic and SMSQ/E drivers, well tested on Q40 and Q60.
Dave wrote: Tue Dec 31, 2024 7:37 pm I have designed a fair few RP2040/2350A/B boards and would be happy to contribute layout skills to a group project.
Is the RP2350 already available as chip for hobbyists? I just saw boards yet.

Personally, I prefer actual hardware solutions over software emulation in a microcontroller, but these are so cheap they're hard to avoid.


User avatar
Dave
SandySuperQDave
Posts: 2794
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: RP2040 replacement for IPC ?

Post by Dave »

A reel of 500x RP2350B is 80 cents per piece and is available now. This chip is "5v tolerant*" and has enough GPIO to replace any of the QL chips. It would be fairly simple to implement the Aurora or Q68 graphics in one - easier and cheaper than in an FPGA.

This does mean we might see a lot of exciting things happening in the coming year, given how active the scene is since I last popped in.

* 5V tolerant if it is powered up before any signals >4V appear n any GPIO pin.


User avatar
Popopo
Gold Card
Posts: 360
Joined: Wed Apr 07, 2021 10:37 am

Re: RP2040 replacement for IPC ?

Post by Popopo »

Dave wrote: Fri Jan 03, 2025 7:27 pm A reel of 500x RP2350B is 80 cents per piece and is available now. This chip is "5v tolerant*" and has enough GPIO to replace any of the QL chips. It would be fairly simple to implement the Aurora or Q68 graphics in one - easier and cheaper than in an FPGA.

This does mean we might see a lot of exciting things happening in the coming year, given how active the scene is since I last popped in.

* 5V tolerant if it is powered up before any signals >4V appear n any GPIO pin.
Amazing!
Sounds beautiful for my ears :)


Nasta
Gold Card
Posts: 454
Joined: Sun Feb 12, 2012 2:02 am
Location: Zapresic, Croatia

Re: RP2040 replacement for IPC ?

Post by Nasta »

Dave wrote: Fri Jan 03, 2025 7:27 pm A reel of 500x RP2350B is 80 cents per piece and is available now. This chip is "5v tolerant*" and has enough GPIO to replace any of the QL chips
...
* 5V tolerant if it is powered up before any signals >4V appear n any GPIO pin.
This should be fairly easy to mitigate with a few protection diode packages or appropriate series resistors. Many CMOS chips have a big problem with voltages larger than the power supply appearing on the inputs, which is often the case when the chip in question is powered from a different power supply that takes longer to ramp up than other ones that generate the inputs. The paradox is that it is often the protection circuits against that which are the cause of the problem :)


Nasta
Gold Card
Posts: 454
Joined: Sun Feb 12, 2012 2:02 am
Location: Zapresic, Croatia

Re: RP2040 replacement for IPC ?

Post by Nasta »

Dave wrote: Tue Dec 31, 2024 7:37 pm
Peter wrote: Fri Oct 11, 2024 1:00 pm The first 16550 version with working FIFO came in 1987.
I have tubes of later 16550-compatible ICs. I have never seen a QL driver to support them though - just the older and less useful 6850 that has an incompatible register structure.
The problem with even the original 16450 descendants like the 16550 with a working FIFO is that there still was no hardware handshake.
The FIFO would in a roundabout way solve this problem for receive but it is completely useless for transmit.
The 16550 is based on the host being able to react sufficiently quickly to an interrupt it generates when data is received, to either transfer the data from the chip to the host, or if some buffer is full, set the appropriate handshake lines in software, basically like writing new states to output pins.
When the FIFO is present, it buffers received data in hopes the host will be able to react before the FIFO becomes full and set handshake lines to prevent the transmitter sending the data so the FIFO will not overflow. With a big enough FIFO it can _almost_ be guaranteed (one could argue that if the host does not react to the interrupt then something is badly wrong so lost serial port data will be the least of the problem).
That being said, the transmit FIFO is basically useless because this time the host has to keep checking the handshake lines to see if it is even permitted to send the data, so not much use for it sitting in FIFO. The transmit FIFO can only be useful if one can guarantee there is another larger receive FIFO at the other end, but there is still no guarantee a situation will not arise for data loss to occur.

All that being said - FORTUNATELY the newest chips (with multiple channels and even larger FIFOs) have implemented hardware handshake, which actually makes the FIFOs very useful. In fact the implementation is clever enough to handle various edge cases, like what happens if the receiver receives bytes but the FIFO never fills to the point where an interrupt to the host is generated - after a timeout, an interrupt is still generated to have the host clear out the FIFO, as the bytes received may well be all the remaining bytes to be received in the first place.
Some of these chips also can use quite high baud rates (like 3Mbaud) which is useful if one wants to make a QL to PC comms bridge using an USB to serial adapter on the PC side, or communicate with an ESP32 module really fast.


User avatar
Peter
Font of All Knowledge
Posts: 2394
Joined: Sat Jan 22, 2011 8:47 am

Re: RP2040 replacement for IPC ?

Post by Peter »

Dave wrote: Fri Jan 03, 2025 7:27 pm It would be fairly simple to implement the Aurora or Q68 graphics in one - easier and cheaper than in an FPGA.
As for Q68 1024x768 highcolour graphics not only "not simple", but likely impossible. Certainly not enough on-chip RAM. Likely lack of bandwidth and too high latencies to an external CPU. Not even enough I/O pins for parallel CPU interface and VGA video DAC. As far as I see, only some relatively low bandwidth DVI stuff with the internal CPU.


Post Reply