ad_write

From ArchaicPixels: HuC and PCEAS Documentation

Jump to: navigation, search

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

Write data into the ADPCM buffer.

  ad_addr - ADPCM address to write to
  mode - (see below)
  buf - (see below)
  bytes - number of bytes to write

Write '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