Jump to content
IGNORED

Trying to understand DMA on a 4A.


dhe

Recommended Posts


I'm trying to understand DMA in the 4A world.

 

I found this on wikipedia:
The processor can be paused with the address bus tri-stated for external direct memory access (DMA). Memory accesses are always 16 bits wide, with the CPU automatically performing read-before-write operations for byte-wide accesses.

 

The only card I know that claims to do DMA is the MyARC HFDC.

 

It's documented in the manual here:
CRU OFFSET RELATIVE ADDRESS    DEFINITION           ACTIVE
          >02             >04                 DMA in Progress      High

 

Do you get DMA for free on all reads and writes, or do you have to set it up in assembly?

 

Does it really buy you any real world performance as implemented on the HFDC?

 

People looking at the MyARC FDCC said it looks like a second iteration would have been setup for DMA....

Link to comment
Share on other sites

The HFDC does not do the DMA that you supposedly think of. The DMA is only done between the controller chip and the onboard RAM of the HFDC; this is a private business of the card. However, you can map the RAM into the main address space (at 5000, 5400, 5800, 5c00).

 

  • Thanks 1
Link to comment
Share on other sites

34 minutes ago, dhe said:

I found this on wikipedia:
The processor can be paused with the address bus tri-stated for external direct memory access (DMA). Memory accesses are always 16 bits wide, with the CPU automatically performing read-before-write operations for byte-wide accesses.

 

The first sentence is fine, the second makes absolutely no sense; the CPU is out of the picture when DMA is taking place (that's the whole purpose of DMA).

 

The 9900 has support for DMA via the #HOLD input and HOLDA output, however on the 99/4A #HOLD input pin is pulled high and not externally exposed.  So actual CPU-coordinated DMA is not possible on the 99/4A.

 

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

The OP's question was about DMA, and included an excerpt from WikiPedia about, presumably, the 9900 DMA interface.

 

In the context of DMA, stating how the CPU accesses memory is irrelevant, since the CPU is inactive, and the address bus and data bus are tri-stated as far as the CPU is concerned.  The way the CPU accesses memory has nothing to do with how a DMA device might access memory.

 

Maybe those two sentences are completely separate and make more sense in full context (I did not go read the WikiPedia page).

Link to comment
Share on other sites

Agree with Matthew. Once the CPU is off the bus, memory accesses can be 1, 2, 3, 8, 11, 12 whatever bits wide - it's none of the CPUs business. The read before write reference is clearly a reference to the CPUs architecture and of no relevance to DMA once the CPU is off the bus. Typical Wikipedia BS.

Link to comment
Share on other sites

Geez, it was one statement about DMA mixed in with other facts about the 9900.  
 

Dan was just asking what it meant. 
 

DMA has some overhead for stopping the 9900.

 

You might  design for it if dumping a lot of data fast were a benefit. Say 256 bytes from disk. At least,  the CPU doesn’t have to copy it from the DSR to itself and back to main memory.

 

Because a CPU in the peripheral is writing to memory, for the CPU to read later. 
 


 



 

 

  • Like 1
Link to comment
Share on other sites

I appreciate everyone's feedback, the core take away's for me:

1) no hold pin, no DMA transfers.

2) the reference to DMA in the MyARC HFDC manual is 'private' DMA on the board.

3) the wikipedia article is not perfect. 😃

 

Another design decision that made the 4a poorer than it needed to be.

 

One day, when I'm smarter, I need to revisit the Culp code to do data transfers to CPU memory, avoiding the double transfer from VDP buffers to CPU RAM. While this has nothing to do with DMA, if it works, it eliminates one step that doesn't add any value.

 

 

  • Like 4
Link to comment
Share on other sites

  • 4 weeks later...

Somewhat off-topic and unnecessary advertising of my ET-PEB project: it does DMA transfers from SD card to CPU RAM expansion. The onboard microcontroller handles moving of data back and forth between CPU RAM and SD card, and translating to the FAT32 filesystem in between. Although personally I think it's cool, it's sort of pointless since all TI-99/4A software expects disk buffers to reside in VDP memory. Of course it's a requirement for a non-expanded system, and would be too easy otherwise. So in the end the CPU copying is still needed, and probably in many cases the first thing the application code does is to copy the buffers back to CPU memory :) 

  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...