ijor wrote: 31 Jan 2019 14:10
n the case or ROM access, GLUE uses combinatorial logic to assert DTACK. So GLUE would deassert DTACK on S7 right after the CPU deasserts AS.
That doesn't actually happen though with ROM access. I documented it a long time ago, I think TF even noticed the same.. That Based on normal 8MHz timings, GLUE DTACK stays low right up until S2 of the next bus cycle. There is about 20-40ns difference between DTACK going high and /AS going low in the next bus cycle. That time is only there with 1K pull ups on DTACK. Pretty much DTACK can been seen as staying constantly low during all ROM access.
OTHO, I believe the STE sets DTACK HI about 40ns after /AS goes high. But the STFM chipset doesn't. This is why I am forced to isolate /AS when using faster ROM access for TOS104, because GLUE's DTACK control would cause to many issues. Another issue is GLUE sets DTACK low right after /AS , maybe 20ns..
ijor wrote: 31 Jan 2019 14:10
But when accessing the sound chip, GLUE uses synchronous logic. This is done on purpose for inserting wait states because the sound chip is not that fast. But then DTACK pulse would extend much more than S7 and S0 (let alone the slow raising time for being open drain). And this indeed can be a problem if the CPU is running at a faster clock.
The CPU still waits for DTACK, so even if DTACK arrived 20 clocks later, it wouldn't cause the CPU to do anything to fast. But the assumption is DTACK arrives in reasonably the right place.. In fact in terms of RAM access, DTACK is actually asserted a little bit faster than when data is actually ready. So I have to add in some delays there to compensate
ijor wrote: 31 Jan 2019 14:10
So you definitely need to decode, at the very least, for I/O access and take proper action. Note that MFP and MMU handle their own DTACK. Chip selection is still performed by GLUE.
MFP DTACK seems to behave reasonably well.. Similar with MMU DTACK.
At the moment, I just cannot see it being a DTACK related issue. I've got that many delays and waits everywhere machine is running slower now than a stock machine and it hasn't made any difference.
I have even been very careful around the bus grant stuff and added in safeguards and delays there as well.
I don't really understand why EMUTOS dies when accessing the YM registers.. The diagnostic cartridge passes sound test fine and I even hear the audio, so is not like there is even a error in that part of the design..
I am just assuming at this point that whatever was accessed before the sound registers in EMUTOS is actually the issue and is then causing the sound register to malfunction after that cycle.