Nugget
Bare-metal libraries and examples for the original PlayStation
Loading...
Searching...
No Matches
Macros | Functions
spu-adsrsus.c File Reference
#include "common/hardware/dma.h"
#include "common/hardware/hwregs.h"
#include "common/hardware/pcsxhw.h"
#include "common/hardware/spu.h"
#include "common/syscalls/syscalls.h"
#include <stdint.h>
Include dependency graph for spu-adsrsus.c:

Macros

#define SPU_DELAY   (*(volatile uint32_t *)0xbf801014)
 
#define SPU_UPLOAD_ADDR   0x1080u
 
#define ATTACK(step, shift, exp)   ((((step) & 3) << 8) | (((shift) & 31) << 10) | (!!(exp) << 15))
 
#define DECAY(shift)   (((shift) & 15) << 4)
 
#define SUSTAIN(step, shift, level, direction, exp)
 
#define RELEASE(shift, exp)   ((((shift) & 31) << 16) | (!!(exp) << 21))
 
#define DRAIN_MAX_TICKS   16
 
#define ONSET_MAX_SPINS   2000000
 
#define NSAMP   32
 

Functions

 __attribute__ ((noinline))
 
int main ()
 

Macro Definition Documentation

◆ ATTACK

#define ATTACK (   step,
  shift,
  exp 
)    ((((step) & 3) << 8) | (((shift) & 31) << 10) | (!!(exp) << 15))

◆ DECAY

#define DECAY (   shift)    (((shift) & 15) << 4)

◆ DRAIN_MAX_TICKS

#define DRAIN_MAX_TICKS   16

◆ NSAMP

#define NSAMP   32

◆ ONSET_MAX_SPINS

#define ONSET_MAX_SPINS   2000000

◆ RELEASE

#define RELEASE (   shift,
  exp 
)    ((((shift) & 31) << 16) | (!!(exp) << 21))

◆ SPU_DELAY

#define SPU_DELAY   (*(volatile uint32_t *)0xbf801014)

◆ SPU_UPLOAD_ADDR

#define SPU_UPLOAD_ADDR   0x1080u

◆ SUSTAIN

#define SUSTAIN (   step,
  shift,
  level,
  direction,
  exp 
)
Value:
((((step) & 3) << 22) | (((shift) & 31) << 24) | (((level) & 15) << 0) | \
(!!(direction) << 30) | (!!(exp) << 31))

Function Documentation

◆ __attribute__()

__attribute__ ( (noinline)  )

◆ main()

int main ( void  )