• Please review our updated Terms and Rules here

Switching between two 8088 CPUs

n0p

Experienced Member
Joined
Oct 17, 2023
Messages
161
Location
Kyiv, Ukraine
Let's say i want to connect two 8088 CPU to the board, NEC V20 and cycle-exact 8088-clone.
All lines, except 5V Vcc, are connected to both.
Will supplying Vcc to only one work? I mean won't second CPU internals mess with it?
 
That would be an extreme form of tri-state!
But switching from one CPU to the other would be extremely complicated, at the end it would be much simpler to buffer all input and output pins of both CPUs with a logic circuit that you have to invent (and the software that goes with it).
A much simpler circuit is shared memories.
 
  • Like
Reactions: n0p
The problem is that merely disconnecting Vcc still leaves all of the shared signals tied to GND through internal circuitry. And tied to each other through internal circuitry. This unpowered circuitry results in loads on and cross-coupling between the signal lines of the powered CPU. Unless all of those signal lines are tri-stated in both CPUs and the tri-state signals are appropriately managed (both CPUs being powered) connecting two CPUs in parallel is highly unlikely to work under any conditions unless the CPU is designed for that possibility.
 
I guess i need to start connecting lines to second floating CPU, and find out how many TMUX1119 i might actually need for this idea.
Thanks!
 
I mean won't second CPU internals mess with it?
You would have to connect and power both, buffer the signals and have the inactive one in halt state. That's e.g. how Amiga turbo cards work as well.

You can't just connect them in parallel and only power one.
 
  • Like
Reactions: n0p
You would have to connect and power both, buffer the signals and have the inactive one in halt state. That's e.g. how Amiga turbo cards work as well.

You can't just connect them in parallel and only power one.
I'm at work and cannot get to schematics but one thing is sure: the Commodore SuperPET was a CBM 8032 with an extra board that contained a 6502 and a 6809. The 6502 was replaced with a socket + cable that was connected with this board. To get the 6809 running, the 6502 was simply powered off and the 6809 was tri-stated when the 6502 was running.
In short: it is be doable but with the 8088 or V20, I don't know.

But what about using the HOLD lines? It causes the CPU to float various lines, check the datasheet for more info.
 
  • Like
Reactions: n0p
But what about using the HOLD lines? It causes the CPU to float various lines, check the datasheet for more info.

The PC uses the 8088 in “Maximum Mode”, which means the minimum-mode /HOLD line turns into /RQ. The datasheet explains how to use it; the TL;DR is using this mechanism correctly would basically let you have the two CPUs wired up in parallel, but using it is more complicated than just putting a toggle switch between them and holding this line down, you’d need a small state machine to send the correct sequence to the “spare” CPU to sleep it on startup. This same pin is used by the DMA controller so whatever you stick in there also needs to pass through its activity to the right CPU.
 
As Ruud stated, the SuperPET just switched the power to the 6502. I always thought that was ugh!

However, you still have to manage the switch from one processor to another.

In the case of a CPU change on the SuperPET this resulted in the selected CPU being reset when you changed over.

If you power off one 8088 (say in your design), when you power it up again it is going to start off in an effective reset state - if it starts up at all without a reset!

Most modern CPUs have 'dynamic registers' meaning that there is a minimum clock speed required to sustain the register contents. Powering off a CPU of this type will cause the register contents to evaporate - hence the necessity for a reset on a power up condition.

It can be done. There are pins on an 8088 for request/grant to share the bus with a coprocessor. These pins can be used to acquire and release the local bus from another processor.

Dave
 
  • Like
Reactions: n0p
Thanks guys!

TBH, i first thought about making this thingie: board with both CPUs and ZIF socket, so i could easily rotate the board / switch CPU when i need to, while keeping both in one place.
Now i guess i'm off to some studying :)
 

Attachments

  • P_20240322_185209.jpg
    P_20240322_185209.jpg
    194.9 KB · Views: 8
The PC uses the 8088 in “Maximum Mode”, which means the minimum-mode /HOLD line turns into /RQ. The datasheet explains how to use it; the TL;DR is using this mechanism correctly would basically let you have the two CPUs wired up in parallel, but using it is more complicated than just putting a toggle switch between them and holding this line down, you’d need a small state machine to send the correct sequence to the “spare” CPU to sleep it on startup. This same pin is used by the DMA controller so whatever you stick in there also needs to pass through its activity to the right CPU.
The DMA controller on the PC and XT doesn't use RQ/GT protocol... Instead, when there's a DMA request, the wait logic generates wait states, isolates the CPU from the bus, and lets the DMA do its business.
Some clones, particularly chipset based ones, such as FE2010A, PT8010AF, 82C100 do use RQ/GT protocol for DMA.

I don't exactly know that's the purpose of this project and at how the CPU switchover is going to be controlled.
It will be difficult to have both CPUs running.
It also will be difficult to switch the CPUs on the fly: the CPUs have their internal state - registers and instruction queue that would need to be synchronized somehow.
For example:
- A predefined memory location to store all the registers
- Hardware to switch between CPUs, e.g., an I/O port that will select the active CPU and reset the CPU on demand
- BIOS modifications or a TSR to store the state and initiate the switchover
- BIOS modifications to POST that instead of booting the system will initialize the CPU with the stored state

If the goal is to simply switch between CPUs while the computer is powered off, putting some buffers/transceiver on most I/O signals should be enough. It is not a good practice to drive pins while the power is disconnected. In the best case it wouldn't work, in the worst - will damage the ICs.
 
The purpose is really simple:
I have two CPUs - 8088 and V20. I switch those quite often. I'd love to have some way of doing that without popping them every time.
 
Install a ZIF socket :->.

I did think of it in the first place. But i would like to have even more convenient way, that would not require opening case, like a simple switch.
Right now i'm reading if multiplexers will help me with this, so i could keep unused cpu powered down and don't implement any additional logic.
 
If the goal is to simply switch between CPUs while the computer is powered off, putting some buffers/transceiver on most I/O signals should be enough. It is not a good practice to drive pins while the power is disconnected. In the best case it wouldn't work, in the worst - will damage the ICs.

And vcc is not an on/off power switch. depending on the IC interesting things can occur even with it disconnected...
 
The purpose is really simple:
I have two CPUs - 8088 and V20. I switch those quite often. I'd love to have some way of doing that without popping them every time.
Then what about using the RQ lines plus a small circuit that resets the system after turning the switch? No buffers needed IMHO. Only some gates to make sure that the switch tri-states the right CPU.
 
  • Like
Reactions: n0p
Then what about using the RQ lines plus a small circuit that resets the system after turning the switch? No buffers needed IMHO. Only some gates to make sure that the switch tri-states the right CPU.

I'm still reading about that, so far it's not clear to me if that would work on system start at all and/or will keep CPU in disconnected state.
Having a hardware-like switch is just much simpler to my understanding.
 
The basic idea: a toggle switch either enables the 8088 or the V20. Use the change in signal to trigger a circuit that resets the PC. Or use a DPDT toggle switch and use the second switch to trigger the reset in one or another way.
 
Back
Top