DMA interface for ZX Spectrum
http://velesoft.speccy.cz/data-gear.htm
This is internal DATA-GEAR interface for any 8-bit computer with Z80CPU.
Use Direct Memory Access and schematic is compatible with DMA in MB02+ interface. On ZX Spectrum is max. data transfer speed 874 kB/1s for MEM->MEM transfer (=17.48 kB per frame).
VELESOFT
This is internal DATA-GEAR interface for any 8-bit computer with Z80CPU.
Use Direct Memory Access and schematic is compatible with DMA in MB02+ interface. On ZX Spectrum is max. data transfer speed 874 kB/1s for MEM->MEM transfer (=17.48 kB per frame).
VELESOFT
Post edited by velesoft on
Comments
Now we need only some software which will benefit from that huge speed.
Simple calculation says that 25 fps is 6912x25 = some 175KB/sec.
Or maybe count with 50 fps? Then some tricks with flickering.
If DMA can be syncronised with V-blank (interrupt) maybe some effects...
Is possible use DMA demos and games for MB02 interface.
You can test it in REALSPECRUM emulator (set ZX128 + MB02).
DMA transfer 1 byte per 4T(is possible 4,5,6,7,8T mode).
Yes, is possible full screen (6912b) animations - 50 fps.
DMA support more transfer modes:
- memory to memory
- I/O to memory
- memory to I/O
- I/O to I/O
- search
- search + transfer
http://velesoft.speccy.cz/dma-demos.zip
(run REALSPECTRUM emulator, set ZX Spectrum + MB02 and load(F5) this demos)
VELESOFT
Could I use another emulator instead of RealSpectrum? Till this day I haven't been able to use it. It maybe my video card or some configuration problem, who knows.... :/
I would like to see those demos. :)
I mean: How does the interface handle it when both, DMA and ULA (not to mention the CPU) want to access the same memory block?
Or this is an interface not suitable for 48Ks?
Thanks for any enlightment :confused: ,
Marcelo.
Contended memory is not only by 48K machines.
But question is good: how will DMA chip know when ULA acesses lower 16K ?
If DMA access to contended memory, ULA stopped clock for CPU.
DMA clock is same as for CPU, thus DMA wait. On ZX 128+2A/+3
ula generate WAIT for CPU. DMA work on any ULA model. You
can change speed for read (source adress) and otherwise for
write(target adress). Max. speed is 2T for read byte and 2T
for write (=4T / 1 byte transfer).
VELESOFT
http://velesoft.speccy.cz/data-gear/dma-scr-rol.avi
This is example of DMA transfer with contended memory. DMA read and write to videoram (move 6143 bytes ftom 16385 to 16384). Transfer of 1 byte = 4T (2T for read byte + 2T for write byte). DMA acces time = green border area, white border = free time.
VELESOFT
HOLY S***!!! :o
Thanks,
Marcelo.
no chance of putting one to connect thru the atom lite disc conenctor?
r-type smooth scorlling ? pixel sprites? interlaced video 384x256 with tv 90degrees to right rotate
dma drvie ay8912 - can it play rtype audio from atari st was arcade perfect
what benefit is dma for vector 3d stuff? freescape?
No, sorry, but I don't have DMA interface.
No
Z80 DMA is usable only for fast transfer long linear data blocks. Is impossible use sprites with DMA. Also unusable for 3D graphic. DMA work only as fat LDIR and need long time for set parametters for DMA transfer.
For large mem copy operations it's great, but there is a minimum number of bytes you have to copy before you save cycles over those lost setting up the DMA hardware.
In theory, you could scroll a background horizontally but it would be on byte boundaries since the hardware doesn't know anything about bit shifting.
It can scroll vertically since it's just copying data from one address to another and incrementing the pointers in a loop till it's copied the number of bytes you want.
The CPU would also have to draw/erase sprites on it's own. One way I can think of this being useful is to have a copy of the screen somewhere in memory and use the DMA to copy the section of the screen from the back buffer over where you are animating and just redraw the sprites with the CPU.
A blitter would do a much better job since they typically have mode settings that tell them they are using a bitmask, shifting pixels, and have some awareness of screen format.
a further job that could be done by DMA is transfering a block of data from an external IO device as a fast A/D converter to the memory. This way one could use the Spectrum as an oscilloskop. There is a solution for the (Z80 compatible) gameboy. Without DMA it can measure frequencies up to 100kHz and an online software DFT (discrete fourier transformation) enables to see the frequency spectrum of the input signal and that is done for two independend measuring analog channels. I think that might be ?n interesting use for the ZX Spectrum with DMA.
Also the DMA could transfer data blocks from the memory to an external device as a D/A converter.
A further ?se for DMA might be to define different screen memory blocks inside the Spectrums memory (or in an external memory) and to copy the content of that (shaddow) screens to the plain screen memory. That way very fast change of the whole screen or a (vertical splitted) part of it might be possible.
Unfortunately I think such software will be only written if there is a big number of us?rs with a DMA containing interface to justify the effort.
Greets Ingo.
hi if it was 4tstates per byte trasnfer then the 4mhz dma woudl be able to trasnfer
4,000,000/ 4= 1,000,000 bytes per second
this is not the case it trasnfers 2mb with 4mhz clock - naturally this is some zilog ideal world no ram refresh and certainly no video ula ram contention to contend with mind you your 800kb for the speccy 128 is about right given a 1.792mhz processor - does it make a difference if it transfers from rom area to ram or for +2a rom area? could use external multiface or +d 8kb available but would need paging first
coudl make proportional font and push printing
so there is no push xh xl yh yl instrcutions on lg z80b?
dunno where they get the 1?mips from for 6mhz when 4mhz is only ?mip?
anyone get bdos to detect external 1-4mb of sam ram and networking please masterdos and masterbasic compatible please help
also retroX if anyone can help lcd convert retro X for sam coupe atom lite hdf compact flash ram cards please help him to convert pc avi files to sam scren$ the dma would come in very handy even for ntsc machines!
pity ula+ not sam compatible and still noone knows how to get hmpr bits 5&6 to add 16 colours to mode 3 screen what a shame they didnt add three more base addresses for another three 16 colour paletes for use in mode 4 screens!
dma to speccy buzzer port? dma to saa1099?