ad_read

From ArchaicPixels: HuC and PCEAS Documentation

Jump to: navigation, search

ad_read(int ad_addr, char mode, int buf, int bytes);    [ 3.21+ ]


Read data from the adpcm buffer.

  ad_addr - address of the ADPMC Buffer
  mode - mode of oepration
  buf - offset depends on the mode being used
  bytes - number of bytes to read

Read 'bytes' bytes starting at offset 'ad_addr' in adpcm buffer.

The mode 'mode' determines the meaning of the 'buf' offset.

     Valid modes        Meaning of 'buf'
     ------------       -----------------
     0                  Offset in the mapped ram.
     2-6                Directly into memory mapped to MMR #'mode'
     0xFF               Offset in video ram.
    

Non-zero return values indicate errors.

Personal tools