GioMgr.h 1.32 KB

#ifndef _AE_GioMgr_h
#define _AE_GioMgr_h

#include <ulocks.h>
#include "n64.h"
#include "AeErr.h"


class AeN64Config;


class GioMgr
{
  public:
                GioMgr (void);
                ~GioMgr (void);

    AeErr    	LoadCode(void);

    AeErr    	InitAudio (AeN64Config *, int * pFxParams, int nFxParams,
			   u8 **bmemStart, u8 **bmemEnd, u8 **smemStart);
    AeErr    	StartAudio (void);
    AeErr    	StopAudio (void);
    AeErr    	SetBank (char *bnkfaddr, int bankNum);

    AeErr    	LoadMidi (CommPckt *commPckt);
    AeErr    	LoadBlock (u8 *addr, u8 *data, u32 nBytes);
    AeErr    	LoadChar (u8 *addr, u8 data);
    AeErr    	LoadWord (u8 *addr, u16 data);
    AeErr    	LoadLong (u8 *addr, u32 data);
    AeErr    	LoadSamples (u8 *addr, char *data,int nBytes);
    AeErr    	LoadFXParam (int paramID, int paramVal);
    AeErr    	LoadFXSectionParams (int paramID, int * params);

  protected:
    AeErr   	initFx (AeN64Config *, int * pFxParams, int nFxParams, int * pFxSize);

    AeErr    	readValue (int *valPtr);
    AeErr    	writeBlock (u8 *addr, u8 *data, u32 nBytes);
    AeErr  	writePacket (CommPckt *);
    AeErr	writePacketAndData (CommPckt *, u8 * pData, u32 nData);

    int      	fU64fd;
    usema_t *	fGiosema;
    usptr_t *	fGioarena;

    u8 *	fCodeEnd;
    u8 *	fBootRomEnd;
    u8 *	fRdramEnd;
};


#endif