Re: Boosting STFM: 16MHz bus, 64MHz Shifter
Posted: Wed Mar 07, 2018 10:07 pm
Alright, clocks synced on the falling edge. Current status is that it works pretty well - I have the Unicorn working in all three modes. There's something strange about why it doesn't boot sometimes, and even what looks like a wakeup mode in the "Stefan"-mode, I'm assuming the 2MHz is out of sync with the MMU/Shifter sometimes and sometimes not. I'm pondering whether to add RESET as an input to the GAL and try to get it into a known state (even though it always should be, considering the GAL has known input/output states .. but .. )
Curiously, with the clocks synced on the falling edge it now works well with the LA _not_ attached, but it only boots in "stock" mode with it attached In both the boosted modes it doesn't.
Since I'm confident this is close to the "final" GAL code for this (I might still add hardware overscan, it's simple) - I'm also attaching the CUPL code for those interested.
(If you look closely, you can see that all derived clocks sync their falling edge to the rising edge of the Shifter clock in doubleST and stock modes, but all - including the Shifter - sync to the falling edge in the "Stefan" mode. This is probably due to the use of MMUCLK in the combinatorial Shifter clock output in that mode.)
"doubleST"
64MHz Shifter, 32MHz MMU, 16MHz CPU. I have a modified Overscan-program that fixes the display and gives me 640*200*16, 1280*200*4 and 1280*400*2 resolutions:
(even at 400MHz the LA cannot accurately capture the 64MHz Shifter clock)
"Stefan 16MHz mod"
32MHz Shifter, 32MHz MMU, 16MHz CPU. Regular ST video modes.
"stock"
using the regular ST system clock and not the 64MHz. I've verified that my demo code shell which can detect between 8.01, 8.02 and 8.05MHz CPUs gets exactly what it expects so it really is stock
... and the point of this exercise compared to the old mod I made was that I wanted to be able to switch easily between these modes, of course. Additionally, the CUPL code might be of some use if there's ever a proper booster made from this by someone else
/Troed
caveat: In the doubleST mode I had several spontaneous machine resets with this mod that I can't remember I had with the previous. I think it's related to accessing the ACSI device, but I'm not sure. Might still need some work on the DMA timing then ..
Curiously, with the clocks synced on the falling edge it now works well with the LA _not_ attached, but it only boots in "stock" mode with it attached In both the boosted modes it doesn't.
Since I'm confident this is close to the "final" GAL code for this (I might still add hardware overscan, it's simple) - I'm also attaching the CUPL code for those interested.
(If you look closely, you can see that all derived clocks sync their falling edge to the rising edge of the Shifter clock in doubleST and stock modes, but all - including the Shifter - sync to the falling edge in the "Stefan" mode. This is probably due to the use of MMUCLK in the combinatorial Shifter clock output in that mode.)
"doubleST"
64MHz Shifter, 32MHz MMU, 16MHz CPU. I have a modified Overscan-program that fixes the display and gives me 640*200*16, 1280*200*4 and 1280*400*2 resolutions:
(even at 400MHz the LA cannot accurately capture the 64MHz Shifter clock)
"Stefan 16MHz mod"
32MHz Shifter, 32MHz MMU, 16MHz CPU. Regular ST video modes.
"stock"
using the regular ST system clock and not the 64MHz. I've verified that my demo code shell which can detect between 8.01, 8.02 and 8.05MHz CPUs gets exactly what it expects so it really is stock
... and the point of this exercise compared to the old mod I made was that I wanted to be able to switch easily between these modes, of course. Additionally, the CUPL code might be of some use if there's ever a proper booster made from this by someone else
/Troed
caveat: In the doubleST mode I had several spontaneous machine resets with this mod that I can't remember I had with the previous. I think it's related to accessing the ACSI device, but I'm not sure. Might still need some work on the DMA timing then ..