| Home | Forums | What's new | Resources | |
| Fun with DTACK |
| cgfm2 - Aug 7, 2005 |
| Mask of Destiny | Aug 7, 2005 | ||||||
| 450ns? Ouch. Wouldn't it be easier to just gang two faster 8-bit parts together? You misunderstood what I meant. The /AS strobe and valid address occur at the same time, you then have 3 cycles before the 68K latches the data (for a read operation) or when the data bus becomes invalid (for a write). <!--QuoteBegin-c gfm2 When I try pulling /DTACK low and leaving it that way, the system is frozen - it doesn't lock up, but it just stays paused until I pull /DTACK high. So I'm sort of under the impression that I really do have to assert it only when needed.[/quote] I thought /DTACK low meant data is ready and /DTACK high means data is no ready? Either way, my point was that it doesn't normally manage /DTACK for external memories regardless of where in memory they sit and that it's held low so the 68K will default to a normal 4 cycle (3 useable cycles) read unless something pulls /DTACK high. Obviously if you're going to pull it high you'll need to only pull it up as long as needed. I bet the VDP uses /DTACK to freeze the 68K when the FIFO gets full. The VDP probably also needs to listen to /DTACK for DMA operations. | |||||||
| cgfm2 | Aug 7, 2005 | ||||||||||||
It would, but I'm doing this on a breadboard and don't have the room to spare. If I knew a bit more about PCB routing it would be nice to stick this kind of stuff on a custom cartridge PCB instead of having wires everywhere. Oops! I found the part in the 68K user's manual that describes this, so I see what you mean. However there's a distinction to be made: (using the read cycle as an example) S2 - 68000 drives /AS, /UDS, /LDS S3 - No-op S4 - /DTACK or /BERR accepted to terminate cycle; CPU inserts wait states *until* either one is asserted S5 - No-op S6 - Data bus latched So while there are 3 states between /AS valid and the data bus being latched, in reality state 4 is stretched indefinitely. (this is on page 5-4 BTW) I guess I had envisioned the opposite; /DTACK is normally held high (inactive) and driven low by other peripherals in the Genesis or external hardware, depending on the memory range. From what I've seen in some arcade games this is the kind of arrangement used. For example one system has several devices that have their DTACK outputs going through open-collector buffers of a 74LS07, and the resulting outputs are tied together, run through a pull-up resistor, and finally connected to /DTACK. So any device can pull /DTACK low, even multiple ones without causing a conflict, but otherwise it remains high. That's a really interesting point. I've never been able to fill the FIFO but if the 68000 was waiting for /DTACK during a full FIFO condition (assuming the VDP delays asserting it until it can flush part of the FIFO to VRAM) then the 'full' state in the status flags wouldn't be visible to the 68000. In the same way, there are warnings about reading VRAM too quickly after setting the command but in practice it's not possible to do that. You can deliberately send some weird commands to the VDP to screw up timing, but otherwise it may be that it delays /DTACK when reading the data port (or after sending a VRAM read command) until it has internally read and latched the data from VRAM. Just for the sake of testing I should look into any additional delays that are caused from VDP access. I can't think of any Genesis games with critical timing, though I know Monster World IV does some weird stuff with VRAM during H-Blank in it's intro sequence that doesn't work in any emulators. Glad you pointed this out. | |||||||||||||