Badwolf wrote: 09 May 2024 21:48
I pared the state machine down to the minimum needed to talk to the ST -- which was actually more than the Amiga, it seems Amiga asserts DTACK only when the data is ready but the ST asserts it up to half a cycle early knowing there's a minimum time before the 68k latches.
I don't think the ST has any DTACK control at all. I think basically just follows /AS. Unless the shifter cycle is happening in which case DTACK will be delayed a few clocks. I don't even know what file the state machine is in ? Though I would assume that checking DTACK is low 2x 8mhz clocks after /AS goes low is probably about the way to go.
If I had to hazard a guess as to where the problems lie, I would think it's probably not the state machine, but the support calls. Things like interrupt indication, the actual multiplexing and status polling. The latter running synchronously in one clock cycle which can be as short as 5ns.
Doesn't sound good in particular is the ST bus glitches all over the place to start with.
If I had the time -- which I don't -- I think I'd go back to basics and slow the protocol down looking for stability knowing we now have the backend performance we need at the end of the day.
Aside from lack of time I have no idea about the programming so cannot really help much in that respect unfortunately. Though I think starting with the diagnostic cartridge and just verifying basic stuff like memory test is stable and testing things out individually before letting it loose in TOS. I should be able to do that in a couple of weeks when I have my H5 back on my desk. But other than a bit of the usual shooting in the dark as to what the problem is, I'm not sure what else I can really do this project.
Regarding the 100%+ ST-RAM speeds, this is normally caused by the accelerator running the instructions faster for reasons of simple clock rate, cache or alt RAM & is a phenomenon seen with most accelerators I've built or worked on. Benchmarking stuff is hard.
Yep. The GB6 CPU routines are all coded in assembly, so it should not be affected by faster ROM calls for example. But the thing is, there is a couple of lines of basic code normally for routine "setup" which could potentially be affected by a faster CPU clock. This is basically why I prefer just to run all tests in STRAM, so we have a better foundation as to what we are referencing against.
My SEC booster is probably the only comparison running at 64MHz - 75MHz.
viewtopic.php?f=42&t=2703
But that was bottlenecked by effectively at 32MHz because of a physical ROM access. Useless trivia, is the next generation of sec booster has a lot of SRAM on board with the attempt to copy ROM to SRAM to solve that problem. But I haven't really had time or motivation to work on the project of late anyway.
Looks at this benchmark
viewtopic.php?p=114683#p114683 its hard to think what the actual pi CPU speed is. I mean if my SEC benchmark wasn't bottled necked on the ROM, the score could be a bit higher. I'd assume the PI CPU would effectively be around 100MHz. But anyway, really matter at this point anyway what the top speed is. But that in itself cause headaches. When I got around 50MHz other parts of the system started basically screwing up one by one which needed fixes doing in the code.
But anyway, I do tend to agree that the PI CPU should be clocked right down to effectively something more realistic like below 20Mhz for testing and debugging. There are simply too many things which can go wrong.