You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
See here for more information viewtopic.php?f=20&t=7296
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
Help to compile a source file
Re: Help to compile a source file
The software reads the video address at $ffff8207 and $ffff8209 ("d2d3"), performs magic tricks, then reads the registers again ("d4d5") and substracts them to get the result
I will display all intermediate values in a single program tomorrow hopefully
I will display all intermediate values in a single program tomorrow hopefully
Re: Help to compile a source file
OK it's past midnight, here it is 
- Attachments
-
- WS4.zip
- (796 Bytes) Downloaded 174 times
Re: Help to compile a source file
Yeah almost 1am
Thanks.
Some new results to ponder...
I still mostly get WS?,WS1,WS2. mostly not WS2 much at all.
Re: Help to compile a source file
Here is the source code: https://github.com/beel1/WSDETECT/blob/ ... WSDETECT.S
Re: Help to compile a source file
How about tackling this issue from a pure HW perspective, for a change? Another way to determine the wake state is measuring the delay between DE getting high and the first pulse on LOAD. The attached scope shots show examples for WS1 (750 ns, 6 cycles) and WS4 (500 ns, 4 cycles). See http://www.atari-wiki.com/index.php/ST_ ... _Wakestate for the full mapping. Another thing to compare between your MMU reimplementation and an original MMU is the timing between DE being deasserted and the last LOAD pulse.
After you got both of these things sorted out for normal operation at every power-up, you can still check whether additional fixes are needed for the special timings on DE that Troed's WSDETECT program creates.
After you got both of these things sorted out for normal operation at every power-up, you can still check whether additional fixes are needed for the special timings on DE that Troed's WSDETECT program creates.
Re: Help to compile a source file
Thanks, see I don't know whats going on with hardware either.. but now I know about phase between DE & LOAD I can scope that out. The cycle delay per WS doesn't make sense as its not in order? In effect I probably have WS?,WS0, WS1,WS2. So if the cycle delay is 3,4,5,6, then I either have 1,2 cycles, or 7,8 cycles.. eitherway suska is "outside" what is documented, other than it mostly going into WS1 and sometimes WS2. But I dont see how it ends up jumping from 3 cycles (WS1) to 6 cycles (WS2). But also cycles of what 8MHz clock ? 16MHz clock ? 2MHz clock ?
Looking at the results (0x80A0) there doesn't seem to be any delay (or difference) in the numbers.. If @Icky is back home, maybe you can measure the timing difference ? I would assume the cycle delay is zero. If so I may route the GLUE to MMU signals via a GAL to slow them down to the FPGA to simulate the timings you posted.
Looking at the results (0x80A0) there doesn't seem to be any delay (or difference) in the numbers.. If @Icky is back home, maybe you can measure the timing difference ? I would assume the cycle delay is zero. If so I may route the GLUE to MMU signals via a GAL to slow them down to the FPGA to simulate the timings you posted.
Re: Help to compile a source file
The important thing is that with an original MCU in the ST you can only ever have 3, 4, 5 or 6 cycles (@ 8 MHz clock = 125 ns) delay between DE and LOAD. Yes, the mapping of delay to the numbers WSn of the wake states is not logical, but it's like it is. In the end, the WSn designators are only arbitrary names; Troed could have numbered/called them however he wanted.
Re: Help to compile a source file
I wonder if 500ns delay is down to ram setup time. Data has to be valid to load the shifter. So there would need to be a delay. Though with no reset on the MMU , a flipflop delay chain could be easily half , 250ns. So it would need more flip flops to help combat a delay which is to short.
Yeah I know ram is more like 120ns but the logic in the MMU and much older slower ram might have just lead to a typical 500ns figure. But be because those flip flops can't be reset, Atari might have just doubled the amount of them which means there will be different load times to the shifter. Ordinarily it probably wouldn't have mattered if the load time was delayed ( more than 500ns)
Even so, based on flip flops, load to the shifter would glitch until ( assuming ) DE is clocked directly into the delay chain. Unless Atari ANDed every flipflop to combat that issue that is..
I'm just thinking out load trying to understand this random wakeup time...
EDIT:
I guess they could have used DE to reset the flip flops, unless it used more gates in the chip and they were really trying to keep things down..but even so, having a reset on 2 flip flops and having a fixed delay would just make more sense I think if that was the case.
EDIT2:
Also possible that since the GLUE is basically out of sync with the MMU regarding DE.. The shifter load could just be simply held off because the MMU is doing ram refresh cycles or something and it has to wait. So there could be a fixed 2 clock delay on load, plus the delay of finishing ram refresh or something.
Yeah I know ram is more like 120ns but the logic in the MMU and much older slower ram might have just lead to a typical 500ns figure. But be because those flip flops can't be reset, Atari might have just doubled the amount of them which means there will be different load times to the shifter. Ordinarily it probably wouldn't have mattered if the load time was delayed ( more than 500ns)
Even so, based on flip flops, load to the shifter would glitch until ( assuming ) DE is clocked directly into the delay chain. Unless Atari ANDed every flipflop to combat that issue that is..
I'm just thinking out load trying to understand this random wakeup time...
EDIT:
I guess they could have used DE to reset the flip flops, unless it used more gates in the chip and they were really trying to keep things down..but even so, having a reset on 2 flip flops and having a fixed delay would just make more sense I think if that was the case.
EDIT2:
Also possible that since the GLUE is basically out of sync with the MMU regarding DE.. The shifter load could just be simply held off because the MMU is doing ram refresh cycles or something and it has to wait. So there could be a fixed 2 clock delay on load, plus the delay of finishing ram refresh or something.
- stephen_usher
- Site sponsor

- Posts: 7148
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: Help to compile a source file
It's probably more due to a (mathematically) chaotic behaviour of a feedback in the system within the chip. The final state being determined by which specific transistors etc. came on-line first.
This would be similar to many (all?) modern processors which, depending upon the initial internal power-up sequence, can vary in speed by up to a few percent from power cycle to power cycle.
This would be similar to many (all?) modern processors which, depending upon the initial internal power-up sequence, can vary in speed by up to a few percent from power cycle to power cycle.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: Help to compile a source file
MMU loads data into the Shifter every 4 cycles (= 500 ns). There's no mechanism to synchronize Glue to the MMU's internal cycles.¹ Therefore, there are four different possible timings of Glue-generated signals (such as DE) in relation to the MMU-generated signals (such as LOAD). Troed et al. explained it really well, please go look up their work if you're interested in more details.
Footnote 1: The CPU on the other hand is synchronized to the MMU's cycles as soon as it accesses RAM.
Footnote 1: The CPU on the other hand is synchronized to the MMU's cycles as soon as it accesses RAM.
