one | Title | Function | Function name | No |
stm | :Stream handle |
buffer | :Transfer area |
nunit | : Transfer area size (transfer unit unit) |
unitsize | :Transfer unit size |
constant name | Transfer unit size |
---|---|
STM_UNIT_FORM1 | Mode1,Mode2 Form1 sector length (2048 bytes) |
STM_UNIT_FORM2 | Mode2, Form2 sector length (2324 bytes) |
STM_UNIT_WORD | Word unit (2 bytes) |
STM_UNIT_BYTE | Byte unit (1 byte) |
The default transfer mode is CPU.
If a transfer function is set, give priority to the transfer function.
For software transfers and CPU DMA transfers, place the transfer area on longword boundaries.
one | Title | Function | Function name | No |
stm | :Stream handle |
func | : Transfer function (STM_TR_NULLFUNC when canceling) |
obj | :Registered object |
The registration function has the following format:
Sint32 (*StmTrFunc)(void *obj, StmHn stm, Sint32 nsct)
obj | :Registered object |
stm | :Stream handle |
nsct | : Number of transferable sectors |
The registration object is passed to the first argument of the registration function.
The transfer function can transfer data up to nsct sectors.
The function value returns the number of sectors actually transferred.
If a transfer is in progress at the end of the transfer function due to DMA, etc., it is necessary to return (-1).
one | Title | Function | Function name | No |
File type | Value of change in transfer source address |
---|---|
CD-ROM file | 0 |
memory file, SCSI file | 1 |
volatile Uint32 *src; src = STM_StartTrans(stm, &dadr); for (i = 0; i< n; i++) { *dst = *src; src += dadr; dst++;
one | Title | Function | Function name | No |
stm | :Stream handle |
gate | : Transfer gate status |
constant name | Transfer gate status |
---|---|
STM_GATE_OPEN | open state |
STM_GATE_CLOSE | closed state |
one | Title | Function | Function name | No |
stm | :Stream handle |
tsct | : Maximum number of transferred sectors (STM_TR_ALL for all read sectors) |
Divide the data read into the CD buffer section into less than this number of sectors and transfer.
The default is 1 sector.
one | Title | Function | Function name | No |
stm | :Stream handle |
fad | : Transfer start FAD |
one | Title | Function | Function name | No |
stm | :Stream handle |
tmode | :Transfer mode |
constant name | Transfer method | Load on CPU |
---|---|---|
STM_TR_SCU | SCU DMA | If the transfer destination is on the B bus, the CPU operates completely independently. |
STM_TR_SDMA0 | CPU DMA channel 0 | CPU processing power decreases |
STM_TR_SDMA1 | CPU DMA channel 1 | CPU processing power decreases |
STM_TR_CPU | Software | CPU is occupied, but interrupt processing is possible |
one | Title | Function | Function name | No |