Short documentation for sceDMA: (Translated by psx_kai / Dok. Vers. 1.1) 1. Register Map: DMA: Channel 0: 10008000 VIF0 (included in Reset yes) Channel 1: 10009000 VIF1 (included in Reset yes) Channel 2: 1000A000 GIF (included in Reset yes) Channel 3: 1000B000 fromIPU (included in Reset yes) Channel 4: 1000B400 toIPU (included in Reset yes) Channel 5: 1000C000 SIF0 (included in Reset no) Channel 6: 1000C400 SIF1 (included in Reset no) Channel 7: 1000C800 SIF2 (included in Reset no) Channel 8: 1000D000 from SPR (included in Reset yes) Channel 9: 1000D400 toSPR (included in Reset yes) CommonReg: 1000E000 DMA Channel Registers: CHCR 00 (DIR 001 / STR 100) MADR 10 QWC 20 TADR 30 ASR0 40 ASR1 50 SADR 80 DMA Common Registers: CTRL 1000E000 STAT 1000E010 PCR 1000E020 SQWC 1000E030 RBSR 1000E040 RBOR 1000E050 STADR 1000E060 ENABLEW HW: 10000000 HW-Base 10003020 GIF-STAT 2. Functions sceDMAReset: This functions performs all full reset of the DMA-Channels. After reset you can use them all. 1. step: It writes per Channel: CH ..80 = 0 CH ..00 = 0 CH ..30 = 0 CH ..10 = 0 CH ..50 = 0 CH ..40 = 0 2. step: 1000E010 = 0000FF1F 1000E010 = (1000E010) AND FF1F0000 3. step: Call memclr with a0=sp and a1=20 (Set 20 Byte on stack to 0) RC = -1 if a0=0, otherwise RC = 0. RC will not be uses in sceDmaReset!!! 4. step: Call sceDmaPutEnv with a0=sp On base of the environment pointed to by sp (Bytes 0(sp)-17(sp)) the DMA Common Registers will be set. The following Adresses will be written: 1000E000 1000E020 1000E030 1000E050 1000E040 Afterwards the environment will be copied to Adress sceDmaCurrEnv. The first for Bytes of the environment will be checked to be lower 10 (the perhaps are DMA-Channel-numbers). If they are, the returncode is as follows: 1. Byte>=10 => RC -1 2. Byte>=10 => RC -2 3. Byte>=10 => RC -3 4. Byte>=10 => RC -4 RC will not be uses in sceDmaReset!!! Based on the values of those first 4 Bytes the value to be written to 1000E000 is calculated. The additional Bytes of the environment are halfwords and are calculated for setting the other Command Registers. 5. step: If Parameter a0=1, then after Reset of Bit 0 in 1000E000 it will be set to 1. 6. step: The return code is the value of Bit 0 from 1000E000 sceDmaGetChan: sceDmaGetChan fetches as returncode the DMA-baseaddress for the in a0 specified dma-channel. RC = 0 if a0 >= 10. psx_kai 04/2001 psx_kai@yahoo.de