alenppc wrote: 22 Jan 2019 19:23
It is a shame that this didn't work. I think the trick is figuring out how to disable the onboard CPU and not letting it interfere but I don't think anyone has released an open source version of this trick...
Yet ;)
We know for a fact that it is possible, and I bet all the pieces are out there to be found. Prepare for quite a long post. Here's what I've found so far:
The
StackExchange post I linked to earlier pointed to that the easy method of using the halt signal wouldn't work, and that you instead have to manage to let the new CPU take over as the bus master.
According to the
68000 User's manual there are two ways of doing this; 3-wire and 2-wire. The 2-wire one uses only Bus Request (_BR) and Bus Grant (_BG), while the 3-wire one uses Bus Grant Acknowledgement (_BGACK) as well. I'll focus on the 2-wire method here, as it's... simpler.
68000 bus arbitration 2-wire flowchart.png
Waiting for current cycle to complete should mean (guess) waiting for _AS and _DTACK going high, but I wonder if that's really necessary in this case, as I'm thinking of asserting _BR permanently. Granted, this documentation only applies to the CPU, and not to the Amiga as a whole, so there might be further steps that need to be taken, like asserting a system reset. I don't really know how much the other chips on the Amiga does on their own on startup.
majsta's blog posts on designing the Vampire 600 confirms that this should be a valid approach:
majsta wrote:Those are the stages:
1. First Finite State Machine started.
2. Complete system started with ALVC devices disabled.
3. Amiga system restarted using counters.
4. Finite State Machine who is dedicated for 3-wire bus arbitration enabled.
a) FSM check reset signal and count bus cycle.s
b) FSM asserts BR
c) FSM waits to current cycle is complete (AS and DTACK negated, BG asserted) and asserts BGACK
d) FSM release BR.
e) FSM activate reset signal who enables mini CPU who will write to color register.
4. First FSM check that reset is enabled.
5. ALVC devices are programmed to support Address Bus, AS, LDS, UDS and RW signals as output FPGA signals. In the same stage AS, LDS, UDS and RW pulled high.
6. Write dff180 to Address Bus (Amiga color register).
7.Pull AS low to indicate that valid address is placed and RW low indicating write cycle.
8.Set ALVC devices dedicated for Data Bus as output, check counter and regarding on state of counter write on Data Bus 0f00 for red and 000f for blue color enabling and disabling LED.
9. Pull UDS and LDS low to indicate that valid data is on the bus but if DTACK is low release AS, UDS, LDS and leave RW for another cycle.
10. Pull RW high and set ALVC devices dedicated for Data Bus for input FPGA signals. Restart counter and back to stage 6.
I don't know if I can pull this off, at least not on my own, but I'll sure give it a try. I really would like to solve it with 74-class logic so that the solution should be accessible to anyone. It will be easier implementing 74 logic in a CPLD at a later stage than the other way around.
The plan at the moment looks as follows:
1. Connect the A600 _BR to ground.
2. Hold the DIP64 _HLT and _RST lines low.
3. Power up.
4. Wait for A600 _BG to go high.
5. Release the DIP64 _HLT and _RST.
Dunno if it'll work :)
Edit: This is getting more advanced than a simple prototype for connecting the TF53x to the A600, but I'll keep posting stuff in this thread if it's ok with Stephen. It's somewhat terriblefire related, right? :)