DMA

Page 1/2
| 2

By PingPong

Prophet (3793)

PingPong's picture

10-02-2010, 00:30

I'm guessing if thhere is the DMA tech used in some existing msx hw?

I think as some sort of circuitry that for example trasfer block of memory between z80 ram and some other internal ram.
some one know about it?

Login or register to post comments

By flyguille

Prophet (3028)

flyguille's picture

10-02-2010, 02:17

IIRC cartridges can't control the BUS. RD/ WR/ and/or others lines are outputs only IIRC.

also is no the same for every msx mother.

By Leo

Paragon (1236)

Leo's picture

10-02-2010, 06:09

no DMA on MSX!
the busreq / ack and not used on msx's
the address lines in cartridge port are output only.
the msx engine or whatever inside msx does not implement dma.
The closest "thing" to dma in msx are OTIR / INIR / LDIR 's instructions, also
the HMMC instructions for high speed transfer between vram and cpu ram
are "sort of" DMA.
...
But in the case of new hardware you can imagine two extensions "talking"
together while bypassing the CPU on a separate bus , not on the msx cartridge
port or bus.

Another way to implement "sort of DMA" is to include a 16kb RAM segment in an
extension cartridge and deal with DMA on this . In fact busreq/ack/busdir would
only be usefull to fill/read regular internal ram of MSX, if you provide the ram then
everything is possible : i think sunrise ide works like this , the z80 can switch banks
and "see" a RAM space that is used to exchange with IDE device.
...
So for new extension you can have almost DMA.
For VDP you have something close that is HMMC + OTIR/INIR
For other internal devices like printer port , joystick psg , pcm of turboR : no way !

By RetroTechie

Paragon (1563)

RetroTechie's picture

10-02-2010, 14:53

Z80 CPU supports DMA (using #BUSREQ signal), but MSX design doesn't. Technically it would be possible to implement, but would require HW modification (different depending on purpose & MSX model).

The closest "thing" to dma in msx are OTIR / INIR / LDIR 's instructions, also
the HMMC instructions for high speed transfer between vram and cpu ram
are "sort of" DMA. (..) i think sunrise ide works like this , the z80 can switch banks
and "see" a RAM space that is used to exchange with IDE device.
...
So for new extension you can have almost DMA.

Not even close... the whole point of DMA is that the hardware does a transfer, as opposed to the CPU. So that the CPU can do other things in that time. In all above examples, it's still the CPU doing the work (and unavailable for other tasks). So no DMA, not even "sort of".

It would probably be most useful for main mem -> VRAM transfers. Optimal would be if VRAM could somehow be mapped into Z80 address space, and a 'DMA engine' capable of doing transfers in the background, perhaps doing simple operations as well (like logical masking). Of course this could mean simultaneous memory access by both DMA controller and CPU. Which would further complicate the problem / reduce usefulness.

By Leo

Paragon (1236)

Leo's picture

10-02-2010, 15:43

Well simultaneous access could be done thanks to the use of slots/mapper , since Z80 accesses only 64kb at
the same time , there could be a 16kb page accessed by Z80 and then by VDP , not simultaneous but shared,
preferably it could be static ram that does not require refresh from Z80 or VDP. it might fit into the extended vram
between 128kb to 192kb.
...
You say that in the HMMC command it is not even close to DMA, well i disagree because the Z80 is not doing
100% of the job of RAM to VRAM transfer , the VDP has wardware to help it , just like DMA controller .
For instance the increments for adresses in VRAM and adresses jumps in the in the logical (x,y) destination box
is done by VDP , so Z80 gives the stream of data while VDP has some dedicated hardware for generating
adresses. that is why i see it as sort of DMA. That is a difference between msx1 and msx2, msx2 has RAM2VRAM
transfers "helped", it was mandatory since screen size were getting bigger.
Maybe you say that because this transfer speed is sluggish compared to other systems with DMA ,but this slow comes mainly from other design limitations : read below
...
Many people describe the Z80 + RAM and VDP+VRAM and lack of DMA as a design flaw of MSX as compared to
other 8 bit systems, but what makes it slow is : wait states and the fact that VDP is busy also reading VRAM for
display.
I think we should rather dig into that direction , because there is a lot to gain and also it would be compatible
with old software.

By PingPong

Prophet (3793)

PingPong's picture

10-02-2010, 19:56

ah thx to all. never figured that BUS** lines are output only. Because of this i'm asking myself the use of those lines. In none could support dma on msx, what the use to notify a ownership of the bus to a cartridge? useless i think.

By Leo

Paragon (1236)

Leo's picture

10-02-2010, 20:55

you mean what is the use of busdir , since it works only for data and not for addresses ?
i guess it can be usefull interrupt mode 2 IM2 , i read it somewhere not sure.

By Leo

Paragon (1236)

Leo's picture

17-02-2010, 17:22

zilog call themself the DMA like features like instruction of ez80 INIDRX OTIRX , etc :
see page 44 on :
http://www.datasheetarchive.com/eZ80-datasheet.html#

by the way these new instruction of the ez80 matches very well the HMMC instruction of VDP , just as if
they were made for msx !!

:P

By RetroTechie

Paragon (1563)

RetroTechie's picture

17-02-2010, 17:45

Because of this i'm asking myself the use of those lines. In none could support dma on msx, what the use to notify a ownership of the bus to a cartridge? useless i think.
Catridgeport #BUSDIR (not seen by Z80) is other signal than Z80 #BUSREQ (not on cartridgeport).

never figured that BUS** lines are output only.
No they're not. Both #BUSDIR (on cartridgeport) and #BUSREQ (Z80 pin) are inputs, but serve a different purpose. Really, you should just read the relevant docs, they're very clear (MSX Technical Data Book sections 1.5/1.6, pages 33-36).

By monant

Resident (48)

monant's picture

17-02-2010, 21:30

Smileit was not MSX ,but an example of implementation i can recall
was Arcade Box like donkey kong,Mario Bros,and others ( i still have the schematics)
the mainboard had a Z80 and a Z80DMA working togheter side by side
Smile

By Leo

Paragon (1236)

Leo's picture

19-02-2010, 11:38

it can see on wikipedia , japanese page , that r800 has MMU and DMA ( 2 channels ) not used for compatibility reasons .
* DMAコントローラ内蔵
o チャンネルは2つ(DMA0、DMA1)内蔵。
o メモリ to メモリ、I/O to メモリ、メモリ to I/O、I/O to I/Oの転送が可能。
o 転送アドレスは24ビットリニア指定可能。
o DMAアドレス自動インクリメント機能内蔵。
* LSIパッケージは100ピン0.65mmピッチQFP(フラットパッケージ)を採用。
translates into:
DMA Controller
o Two channels (DMA0, DMA1) chip.
o memory to memory, I / O to memory, memory to I / O, I / O to I / O transfer possible.
o The forwarding address can be specified 24-bit linear.
o DMA features built-in auto-increment address.
* LSI Package 100-pin 0.65mm-pitch QFP (flat package) is adopted.

Page 1/2
| 2