Help with DMA

Эмуляторы, поддерживающие TS-Conf

Postby chernandezba » Thu, 08.03.2018 22:54:32

Hi

Are the registers 1A to 1F (DMA related) incremented to the last dma operation? Or do they preserve the initial values?

Thanks
----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
chernandezba
 
Posts: 136
Joined: Wed, 28.06.2017 17:50:12

Postby TS-Labs » Fri, 09.03.2018 04:38:59

By the end of a transaction all registers related to DMA address store the value of next address calculated accordingly to the addressing mode used in transaction (linear/block addressing, source and destination separately).
This is made for convenience to be able to continue next transaction in sequential addresses.

For instance, you set mode:
Source:
- linear addressing (S_ALGN = 0),
Destination:
- block addressing (D_ALGN = 1),
- 256 bytes align (A_SZ = 0),
- burst length 16 bytes (DMALen = 7),
- number of bursts 4 (DMANum = 3),
- Source address is, hex, page:addr = 05:0000
- Dest address is 3A:1000.
After transaction address will be:
Src: 05:0040 - here is all linear and obvious, i.e. 16*4 bytes read,
Dst: 3A:0400 - here you have four lines written with 16 bytes each, aligned by 0x100, and pointer is finally set to 5th line.
User avatar
TS-Labs
 
Posts: 5398
Joined: Thu, 26.07.2012 01:29:56

Postby chernandezba » Fri, 09.03.2018 13:04:31

Thanks! So I have to store the src and dest at the end of the dma operation on registers 1A to 1F
----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
chernandezba
 
Posts: 136
Joined: Wed, 28.06.2017 17:50:12

Postby TS-Labs » Fri, 09.03.2018 16:20:29

Yes.
User avatar
TS-Labs
 
Posts: 5398
Joined: Thu, 26.07.2012 01:29:56

Postby chernandezba » Fri, 09.03.2018 22:52:50

Great! I have added it and now more demos/games are working well! :)
----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
chernandezba
 
Posts: 136
Joined: Wed, 28.06.2017 17:50:12


Return to Emulators

Who is online

Users browsing this forum: No registered users and 1 guest

x