Proxy wrote:
i mean look at it like this:
how would you get the CPU to do work while avoiding memory accesses, if the instructions required to do anything are located in memory? how would you get them from memory into the CPU if not through a memory access?
Im still thinking Harvard arch... to me, the Program Counter should be completely removed from memory access.
getting the next operation, should not be something that changes data addresses, however, this can complicate design by requiring two separate data and program busses. Opcodes should mostly come out of ROM, and Data should mostly be in RAM... to me at least
I have not worked at this low of level much and the old thrill of exploring a frontier again. some of this stuff is 'old hat' from everything else Ive done in computers and electronics, some of it truly mind-boggling to what they were thinking at the time. I understand von-neuman architecture and why it is used, it is just not easy to think in without a little adjustment to my process.
given the stack and zero page are 'low addresses' and vectors for reset and interrupts are on the 'high addresses', I may do some separation via RAM/ROM...
Quote:
that's the main problem with running a DMAC and CPU at the same time on the same bus.
one way around that is to seperate their busses (via a 74x245 for example) and give the CPU the ability to access the DMAC's bus, but not the other way around.
that way the DMAC can run while the CPU still has it's own private section of RAM/ROM and some IO to access, but would get blocked when trying to harass the active DMAC's section of the address space.
of course it's not an ideal solution as that means the DMAC cannot copy data from/to the private address section.
so another way is bus sharing, since the 6502 and 65C02 only use the second half of a clock cycle to actually access memory, you can use the first half for a DMAC. this allows both of them to run at the same time with no performance loss on either site, but of course it also requires much faster logic and memory (especially at higher speeds like +10MHz).
I see a good reason to separate the stack and/or zero page then. using it as local or "L1" cache.
in short only the 6502 should be able to access the zero page under most circumstances.
your mention of a DMAC and|or the '245 further makes me want to explore a little 4-bit micro slice processor and maybe some buss line latches... reading the 6522 makes me want an 8-bit latch or similar to control its Chip Select Lines and the 4-bit needed to cover 20-bit ISA/pc104/PCMCIA addressing. so 'down the line' this looks like a CPLD in some fashion, akin to what I see several people here developing for their SBCs and projects.
ultimately a DMAC is available in many forms, from dedicated chips to logic to CPLDs or as part of an MCU.
what I am after here is interoperability between the 6502 and 6522 to make working with RO/AM (because everything to a 6502 is just a memory address).
so to get back to interoperability between the 6502 and 6522 for moving bytes around quickly...
John West wrote:
cjs wrote:
using a 6522 to run DMA might be totally useless, but I'd love to see the design of the circuit and software that does it.)
The best I can come up with needs a 6526, as only one of the 6522's timers can take an external clock.
Map a 6526 into page zero somewhere. ....
not exactly like Im thinking, and Im not sure I can get one of those chips...
cjs wrote:
John West wrote:
Map a 6526 into page zero somewhere.... Then LDA (timerA) STA (timerB) as many times as you need.
That's a nice little insight. Though it might make sense just to use some up/down counters (e.g., 74LS191) instead. ...
this is basically what I want to use the 6522 to do
Quote:
Sadly, there are no huge speed gains here. It's 13 cycles per byte so for small (≤256 byte) copies it saves only a couple of cycles per byte for a DEX (and maybe one more during the entire copy if it crosses a page boundry), and not exactly a huge amount more if you're doing larger copies. That's far from even the 7 cycles per byte of a 65816, much less the 2 cycles per byte of a DMA engine.
I am seeing that as well, and "PHI1 DMA" might be a better choice overall
BigDumbDinosaur wrote:
cjs wrote:
BigDumbDinosaur wrote:
Using MVN/MVP has the limitation that the 65C816 doesn't have the handshake mechanism typically implemented by a true DMA controller.
Interesting. Can you tell me more about that?
An example: the 53CF94 ASIC in my POC unit’s SCSI host adapter is specifically designed for DMA transfers....noted, you have done a lot of amazing things and your 'CF94 chips is certainly one of the Custom Pretty Little Doohickeys that makes me want to build my own custom specific chip... for the moment, Im just focusing on the 6522/6502 as the 65816 is not going to have a lot of these problems. still it is good to know how you solve problems and what arises.
GARTHWILSON wrote:
[color=#000000]wayfarer, you might be interested in our topic "
The secret, hidden, transparent 6502 DMA channel." The idea is that the few dead bus cycles get used for DMA while the processor is doing an internal operation and not accessing the next byte in memory. This way, the processor is never paused or slowed down. The 65816 makes it extra easy to identify which bus cycles the processor is not using. The idea has intrigued me, but it's not high enough on the to-do list for me to actually get to it.
read it, and I see the similarity, however, I am not so much trying to do that, as just automate as much as I can with a 6522.
I will post more later today in my next post, I need to run an errand right quick and I wanted to cover the responses here before they got too many.
"PHI1 DMA" might be a good option, and this is not really DMA (Ill probavly use a PIC as a DMA as you yourself suggest in places), Im just trying to reduce operations used by utilizing the 6522 to its potential, which I see a thing that might work yet... Im just not certain it saves any trouble.
cjs wrote:
BigDumbDinosaur wrote:
...the 53CF94 ASIC in my POC unit’s SCSI host adapter is specifically designed for DMA transfers. The device has two handshake lines for the purpose: DREQ and /DACK....
Ah, I see. Thanks for the explanation...
speed is certainly a concern, mostly just getting a screen updated without tearing sans gpu...
I will post more on my design goals in a bit, I need to run an errand.