Sik wrote:Stef wrote:You access it a lot so disabling Z80 each time you need to access it is terrible for PCM playback :-/
You're saying that as if Sega had cared (look how much of a trainwreck PCM is).
Probably they didn't care at beginning but with time the bad reputation of the MD for voice reproduction was definitely hurting.
Mask of Destiny wrote:I'm pretty sure whatever issues there are with the VDP region are separate from the issues with the I/O region. From the Rex Sabio scans, the problem seems to be that the bus arbiter does not properly assert !WAIT to delay the Z80 until the 68K asserts !BGACK if the bus arbiter is currently servicing a request to the IO area from the 68K. This results in the read potentially returning garbage. If it's just PCM data, this is no big deal as you'll just corrupt a sample, but if the Z80 is instead reading code or some complicated data structure it can obviously be a bigger problem.
Yeah i exactly remember about this note, the only problem is that you could potentially obtained corrupted data.
In my PCM only drivers that is not an issue as corrupted data is PCM data only, with the XGM driver the story is different as i also fetch XGM/VGM music data from rom and having corrupted data can definitely crash the Z80 but to be honest i never experienced it (even on MD1 VA0). I heard this specific problem in fact happened only on some specifics MD2 revisions (can't remember which ones).
I don't see anything in the bulletins about bus requesting the Z80 during general VDP access, but I do see a note about bus requesting it during 68K->VDP DMA. Unfortunately, that one doesn't really go into detail why that is required; however
Again, i remember exactly the same... and as you said, they were not really specific about the potential issue with the DMA :-/
if I had to guess it's probably some kind of race condition in the bus mastering logic. Both the bus arbiter and VDP use the 68K's bus grant feature to steal the bus from the 68K. I'm guessing that one or the other can get confused and think it's being granted the bus when in fact it's the other component receiving the bus. Writing to the data port when the FIFO is full doesn't have this problem as it just uses !DTACK to delay the write which will also prevent the 68K from acknowledging any bus mastering requests until the request finishes.
Something i was thinking, about the first issue of getting corrupted data when 68K is doing IO accesses. I guess i can just do "safe read" by reading the value twice and "xoring" obtained values, if result is not 0 then i redo the read operation.
But the issue with the DMA is more obscure and i don't really know what happen maybe what you described... also it seems to be present only on first models (MD1 VA0).