MEGA ST BLITTER PATCH - Discussion thread

General discussions or ideas about hardware.
atari030
Posts: 324
Joined: Mon Feb 12, 2018 12:43 pm

Re: MEGA ST BLITTER PATCH

Post by atari030 »

sporniket wrote: Wed Oct 05, 2022 1:36 pm
atari030 wrote: Wed Oct 05, 2022 12:29 pm Without drifting too far down river. How does the MegaSTE differ blitter wise? I've noticed (with some disappointment) that demo's like Sea of Colour will not work on MegaSTE's. DHS's blurb mention something about timing.
Maybe the MegaSTE has the blitter already combined in the MCU ? I know the STe can have external blitter with earlier MCU that have not that.
There are two variants, one is built into the MCU, the other isn't. The latter uses a standard blitter.
ijor
Posts: 439
Joined: Fri Nov 30, 2018 8:45 pm

Re: MEGA ST BLITTER PATCH

Post by ijor »

exxos wrote: Wed Oct 05, 2022 7:48 pm @ijor These are what I found so far. All show 0040.
Strange that you don't get $003F with any of the "ST" branded Blitters. On the AF thread, every ST Blitter except one gave a $3F result. Just for completeness, on which machine you performed the tests?
atari030 wrote: Wed Oct 05, 2022 12:29 pm Without drifting too far down river. How does the MegaSTE differ blitter wise? I've noticed (with some disappointment) that demo's like Sea of Colour will not work on MegaSTE's. DHS's blurb mention something about timing.
This has nothing to do with a different Blitter. It is the extra logic on the MSTE board that delays some of the bus acquisition (DMA) signals.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
User avatar
exxos
Site Admin
Site Admin
Posts: 24081
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: MEGA ST BLITTER PATCH

Post by exxos »

ijor wrote: Thu Oct 06, 2022 3:22 am Strange that you don't get $003F with any of the "ST" branded Blitters. On the AF thread, every ST Blitter except one gave a $3F result. Just for completeness, on which machine you performed the tests?
On a H5 rev C1.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
ijor
Posts: 439
Joined: Fri Nov 30, 2018 8:45 pm

Re: MEGA ST BLITTER PATCH

Post by ijor »

exxos wrote: Thu Oct 06, 2022 8:06 am
ijor wrote: Thu Oct 06, 2022 3:22 am Strange that you don't get $003F with any of the "ST" branded Blitters. On the AF thread, every ST Blitter except one gave a $3F result. Just for completeness, on which machine you performed the tests?
On a H5 rev C1.
If you can, it might be interesting to test on an "original" (not a REMAKE) computer, MST, STE, or ST with Blitter.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
User avatar
exxos
Site Admin
Site Admin
Posts: 24081
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: MEGA ST BLITTER PATCH

Post by exxos »

ijor wrote: Thu Oct 06, 2022 12:37 pm If you can, it might be interesting to test on an "original" (not a REMAKE) computer, MST, STE, or ST with Blitter.
I've tried a stock STE. One of the ST blitters shows 003F (the one with the red sticker, ive not tried them all again). I swapped to a HC CPU and went to 0040.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 24081
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: MEGA ST BLITTER PATCH

Post by exxos »

I did a little bit more poking around. Ironically with a V1 STE booster the value went back to 0038 despite having a HC CPU.

Long story short, it seems to be relating to the 8Mhz clock. As soon as there is a buffer in there it changes from 0040 to 0038. Probably is only something like 2ns delay.

I guess really someone would need to get a high-speed logic analyser on all the CPU control pins and see exactly what is changing. As it stands I would have to say that I have not seen any real differences between blitter brands or date codes. It just seems to be "more of the same" screwy faults between various machines as usual. Likely just tollerences on chips.

EDIT:

Maybe the NMOS CPU doesn't respond to BR fast enough ?, but the HC CPU can. As when the 8Mhz is delayed a few ns, BR will be slowed to the CPU enough to skip a few clocks :shrug:

EDIT2:

Assuming blitter is counting /AS pulses.. It would probably need some logic to keep /AS high on the blitter while /BR is low and /BGACK is high. So the cpu may, or may not do a bus cycle, but blitter does not see /AS low and doesn't count it. Then when it sees /BGACK , /AS is allowed to the blitter again. Not simple to fix really.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
Badwolf
Posts: 2288
Joined: Tue Nov 19, 2019 12:09 pm

Re: MEGA ST BLITTER PATCH

Post by Badwolf »

exxos wrote: Thu Oct 06, 2022 2:26 pm Assuming blitter is counting /AS pulses..
Would it not simply be counting clock cycles down from 512, or have I misunderstood the phenomenon?

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
exxos
Site Admin
Site Admin
Posts: 24081
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: MEGA ST BLITTER PATCH

Post by exxos »

Badwolf wrote: Thu Oct 06, 2022 5:19 pm Would it not simply be counting clock cycles down from 512, or have I misunderstood the phenomenon?
From what I understand , which could be wrong, the blitter does this counting internally. It's supposed to count 64 blitter cycles, but it's counting any bus cycle and ends up actually counting 63. Hence the 0040 & 003F results. The CPU finishes its current cycle ( or happens to start a new one ) which the blitter counts, when it shouldn't. Oddly it doesn't happen with the HC CPU. Unless the 8mhz clock is buffered and it screws the count up anyway.

My initial thought is what I said in my previous post. Likely BR and AS would have to be cut from the blitter and some logic in there to hold off ( I assume ) /AS from the blitter until the CPU set BGACK low. Basically stops the blitter from seeing any bus cycles until the CPU sets BGACK low. The blitter is then in control and can count bus cycles correctly.

EDIT: Actually, isn't BR a series arrangement ? Was thinking any bus master can request the bus hence cutting BR from the blitter probably no need / no point. Just cutting /AS from the blitter and add some logic to monitor BR and BGACK. But probably jumping ahead with this idea currently.

I guess the logic would be something like this:

BLITTER_AS = SYS_AS # (!BR & BGACK);

Probably need a buffer to allow blitter to set SYS_AS low as well.

Or maybe a bidirectional bus transceiver with a enable pin linked to BGACK might be enough. :shrug:
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
ijor
Posts: 439
Joined: Fri Nov 30, 2018 8:45 pm

Re: MEGA ST BLITTER PATCH

Post by ijor »

exxos wrote: Thu Oct 06, 2022 1:02 pm I've tried a stock STE. One of the ST blitters shows 003F (the one with the red sticker, ive not tried them all again). I swapped to a HC CPU and went to 0040.
Interesting. This confirms it is an analog issue.
As it stands I would have to say that I have not seen any real differences between blitter brands or date codes. It just seems to be "more of the same" screwy faults between various machines as usual. Likely just tollerences on chips.
Did you get $003F with the I60611 or the National branded Blitter, even on a plain STE (or MST) with an NMOS CPU?

At this point I believe it is a combination of both the Blitter part/brand and the CPU (plus other motherboard changes that might slightly alter the timing).
Maybe the NMOS CPU doesn't respond to BR fast enough ?, but the HC CPU can.
Not exactly, but sort of. From what I can infer is that some Blitter chips are a bit slower in processing some CPU signals and might react one cycle later. But if the CPU happens to be faster, faster in the sense that output control signals are updated slightly earlier (technically, a smaller Tco), then that same "slower" Blitter might still process them in time.
I guess really someone would need to get a high-speed logic analyser on all the CPU control pins and see exactly what is changing.
I believe a 4 channel scope might be good enough. If you have one are interested, scope 8MHZ,AS,BR,BG. We might even detect the issue with 2 channels, AS & BR.

Edit: If somebody want to try with a high frequency logic analyzer, then adding UDS and or RW might be helpful.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
ijor
Posts: 439
Joined: Fri Nov 30, 2018 8:45 pm

Re: MEGA ST BLITTER PATCH

Post by ijor »

exxos wrote: Thu Oct 06, 2022 5:37 pm
Badwolf wrote: Thu Oct 06, 2022 5:19 pm Would it not simply be counting clock cycles down from 512, or have I misunderstood the phenomenon?
From what I understand , which could be wrong, the blitter does this counting internally. Its supposed to count 64 blitter cycles, but its counting any bus cycle and ends up actually counting 63. Hence the 0040 & 003F results. The CPU finishes its current cycle ( or happens to start a new one ) which the blitter counts, when it shouldn't.
Yes, Blitter counts 64 bus cycles (counting 512 clock cycles would be incorrect and more expensive) to relinquish the bus in non-hog mode. But Blitter has a buglet, it counts every active edge on the AS signal once it requested the bus. It (wrongly) assumes that all AS pulses at this point are Blitter own pulses. But typically, the CPU would take one more bus cycles for himself before granting the bus.

Now, this is not by itself the issue here. This buglet (if you want to call it like that) is well known and it is then harmless. I don't think there is any need to "fix" this. The issue is that in some cases different Blitter parts might have different behavior. What my test does is to trigger Blitter with a special CPU sequence so that the CPU would (normally) grant the bus immediately. Then it reads how many words were actually blitted. That's why you get $40 (64) as a normal result in most cases. Except on some Blitter/CPU combination that miss one cycle and perform $3F bus cycles.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
Post Reply

Return to “HARDWARE DISCUSSIONS”