audiotest.h 2.46 KB

/*---------------------------------------------------------------------*
        Copyright (C) 1998 Nintendo. (Originated by SGI)
        
        $RCSfile: audiotest.h,v $
        $Revision: 1.1.1.1 $
        $Date: 2002/05/02 03:27:08 $
 *---------------------------------------------------------------------*/
/*  audiotest.h */

#ifndef __audiotest__
#define __audiotest__


/* these defines will be used by makerom when building the rom */

#define STACKSIZE               0x2000
#define PROFILE

#define STATIC_SEGMENT          1
#define DYNAMIC_SEGMENT         2


#ifdef _LANGUAGE_C /* these defines will only be used by compiler */

#include <ultra64.h>
#include "gfx.h"

#if defined( _HW_VERSION_1 )
#define PRINTF  rmonPrintf
#else
#define PRINTF  osSyncPrintf
#endif

#define IDLE_PRIORITY           0
#define INIT_PRIORITY           10
#define GAME_PRIORITY           11
#define AUDIO_PRIORITY          12
#define SCHEDULER_PRIORITY      13

#define MAX_MESGS               8
#define DMA_QUEUE_SIZE          200
#define NUM_FIELDS              1       /* 1 = 60 Hz video interrupts, 2 = 30 Hz, etc */

#define SCHED_CONTROLLER_MSG        (OS_SC_LAST_MSG+1)


typedef void *	TRetraceData;
typedef void (*testInit)(u32 subTestNum);
typedef void (*testStop)(u32 subTestNum);
typedef void (*testButton)(u16 oldButton, u16 newButton);
typedef void (*testRetrace)(TRetraceData retraceData);

typedef struct {
    testInit       	InitTest;
    testStop       	StopTest;
    testButton		buttonProc;
    testRetrace    	retraceProc;
    TRetraceData	retraceData;
    u32            	numSubTests;
} test_cntrl;

extern char _yieldSegmentEnd[];
extern char _staticSegmentRomStart[], _staticSegmentRomEnd[];
extern char _miditableSegmentRomStart[], _miditableSegmentRomEnd[];
extern char _seqSegmentRomStart[], _seqSegmentRomEnd[];
extern char _testseqSegmentRomStart[], _testseqSegmentRomEnd[];
extern char _midibankSegmentRomStart[], _midibankSegmentRomEnd[];
extern char _sfxbankSegmentRomStart[], _sfxbankSegmentRomEnd[];
extern char _sfxtableSegmentRomStart[], _sfxtableSegmentRomEnd[];

extern int verbose;
extern OSPiHandle	*handler;

void     initAudio(u32 testNum);
void     initGFX(void);
void     initCntrl(void);
void     romCopy(char *src, char *dest, int len);
void     createGfxTask(GFXInfo *i);
void     handleGfxDone(void);
void     UpdateController(test_cntrl *test);
void     StopAudio(u32 testNum);

void	 TestDone(void);		/* sct 12/20/95 */


#endif /* _LANGUAGE_C */


#endif /* __audiotest__ */