mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
set svn:eol-style=native for **.h
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1438 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,99 +1,99 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _DSPHANDLER_H
|
||||
#define _DSPHANDLER_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "MailHandler.h"
|
||||
#include "UCodes/UCodes.h"
|
||||
|
||||
class CDSPHandler
|
||||
{
|
||||
public:
|
||||
void Update();
|
||||
unsigned short WriteControlRegister(unsigned short _Value);
|
||||
unsigned short ReadControlRegister();
|
||||
void SendMailToDSP(u32 _uMail);
|
||||
IUCode* GetUCode();
|
||||
void SetUCode(u32 _crc);
|
||||
|
||||
CMailHandler& AccessMailHandler() { return m_MailHandler; }
|
||||
|
||||
static CDSPHandler& GetInstance()
|
||||
{
|
||||
return *m_pInstance;
|
||||
}
|
||||
|
||||
static void Destroy()
|
||||
{
|
||||
delete m_pInstance;
|
||||
m_pInstance = NULL;
|
||||
}
|
||||
|
||||
static CDSPHandler& CreateInstance()
|
||||
{
|
||||
if (!m_pInstance)
|
||||
m_pInstance = new CDSPHandler();
|
||||
|
||||
return *m_pInstance;
|
||||
}
|
||||
|
||||
private:
|
||||
CDSPHandler();
|
||||
~CDSPHandler();
|
||||
|
||||
// UDSPControl
|
||||
union UDSPControl
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
{
|
||||
unsigned DSPReset : 1; // Write 1 to reset and waits for 0
|
||||
unsigned DSPAssertInt : 1;
|
||||
unsigned DSPHalt : 1;
|
||||
|
||||
unsigned AI : 1;
|
||||
unsigned AI_mask : 1;
|
||||
unsigned ARAM : 1;
|
||||
unsigned ARAM_mask : 1;
|
||||
unsigned DSP : 1;
|
||||
unsigned DSP_mask : 1;
|
||||
|
||||
unsigned ARAM_DMAState : 1; // DSPGetDMAStatus() uses this flag
|
||||
unsigned DSPInitCode : 1;
|
||||
unsigned DSPInit : 1; // DSPInit() writes to this flag
|
||||
unsigned pad : 4;
|
||||
};
|
||||
|
||||
UDSPControl(u16 _Hex = 0)
|
||||
: Hex(_Hex)
|
||||
{}
|
||||
};
|
||||
|
||||
// singleton instance
|
||||
static CDSPHandler* m_pInstance;
|
||||
|
||||
IUCode* m_pUCode;
|
||||
UDSPControl m_DSPControl;
|
||||
CMailHandler m_MailHandler;
|
||||
|
||||
bool m_bHalt;
|
||||
bool m_bAssertInt;
|
||||
};
|
||||
|
||||
#endif
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _DSPHANDLER_H
|
||||
#define _DSPHANDLER_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "MailHandler.h"
|
||||
#include "UCodes/UCodes.h"
|
||||
|
||||
class CDSPHandler
|
||||
{
|
||||
public:
|
||||
void Update();
|
||||
unsigned short WriteControlRegister(unsigned short _Value);
|
||||
unsigned short ReadControlRegister();
|
||||
void SendMailToDSP(u32 _uMail);
|
||||
IUCode* GetUCode();
|
||||
void SetUCode(u32 _crc);
|
||||
|
||||
CMailHandler& AccessMailHandler() { return m_MailHandler; }
|
||||
|
||||
static CDSPHandler& GetInstance()
|
||||
{
|
||||
return *m_pInstance;
|
||||
}
|
||||
|
||||
static void Destroy()
|
||||
{
|
||||
delete m_pInstance;
|
||||
m_pInstance = NULL;
|
||||
}
|
||||
|
||||
static CDSPHandler& CreateInstance()
|
||||
{
|
||||
if (!m_pInstance)
|
||||
m_pInstance = new CDSPHandler();
|
||||
|
||||
return *m_pInstance;
|
||||
}
|
||||
|
||||
private:
|
||||
CDSPHandler();
|
||||
~CDSPHandler();
|
||||
|
||||
// UDSPControl
|
||||
union UDSPControl
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
{
|
||||
unsigned DSPReset : 1; // Write 1 to reset and waits for 0
|
||||
unsigned DSPAssertInt : 1;
|
||||
unsigned DSPHalt : 1;
|
||||
|
||||
unsigned AI : 1;
|
||||
unsigned AI_mask : 1;
|
||||
unsigned ARAM : 1;
|
||||
unsigned ARAM_mask : 1;
|
||||
unsigned DSP : 1;
|
||||
unsigned DSP_mask : 1;
|
||||
|
||||
unsigned ARAM_DMAState : 1; // DSPGetDMAStatus() uses this flag
|
||||
unsigned DSPInitCode : 1;
|
||||
unsigned DSPInit : 1; // DSPInit() writes to this flag
|
||||
unsigned pad : 4;
|
||||
};
|
||||
|
||||
UDSPControl(u16 _Hex = 0)
|
||||
: Hex(_Hex)
|
||||
{}
|
||||
};
|
||||
|
||||
// singleton instance
|
||||
static CDSPHandler* m_pInstance;
|
||||
|
||||
IUCode* m_pUCode;
|
||||
UDSPControl m_DSPControl;
|
||||
CMailHandler m_MailHandler;
|
||||
|
||||
bool m_bHalt;
|
||||
bool m_bAssertInt;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,46 +1,46 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _MAILHANDLER_H
|
||||
#define _MAILHANDLER_H
|
||||
|
||||
#include <queue>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
class CMailHandler
|
||||
{
|
||||
public:
|
||||
CMailHandler();
|
||||
~CMailHandler();
|
||||
|
||||
void PushMail(u32 _Mail);
|
||||
void Clear();
|
||||
void Halt(bool _Halt);
|
||||
bool IsEmpty();
|
||||
|
||||
u16 ReadDSPMailboxHigh();
|
||||
u16 ReadDSPMailboxLow();
|
||||
void Update();
|
||||
|
||||
private:
|
||||
// mail handler
|
||||
std::queue<u32> m_Mails;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _MAILHANDLER_H
|
||||
#define _MAILHANDLER_H
|
||||
|
||||
#include <queue>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
class CMailHandler
|
||||
{
|
||||
public:
|
||||
CMailHandler();
|
||||
~CMailHandler();
|
||||
|
||||
void PushMail(u32 _Mail);
|
||||
void Clear();
|
||||
void Halt(bool _Halt);
|
||||
bool IsEmpty();
|
||||
|
||||
u16 ReadDSPMailboxHigh();
|
||||
u16 ReadDSPMailboxLow();
|
||||
void Update();
|
||||
|
||||
private:
|
||||
// mail handler
|
||||
std::queue<u32> m_Mails;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,67 +1,67 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_AX
|
||||
#define _UCODE_AX
|
||||
|
||||
#include "UCode_AXStructs.h"
|
||||
|
||||
class CUCode_AX : public IUCode
|
||||
{
|
||||
public:
|
||||
CUCode_AX(CMailHandler& _rMailHandler, bool wii = false);
|
||||
virtual ~CUCode_AX();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void MixAdd(short* _pBuffer, int _iSize);
|
||||
void Update();
|
||||
|
||||
private:
|
||||
|
||||
enum
|
||||
{
|
||||
NUMBER_OF_PBS = 64
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MAIL_AX_ALIST = 0xBABE0000,
|
||||
AXLIST_STUDIOADDR = 0x0000,
|
||||
AXLIST_PBADDR = 0x0002,
|
||||
AXLIST_SBUFFER = 0x0007,
|
||||
AXLIST_COMPRESSORTABLE = 0x000A,
|
||||
AXLIST_END = 0x000F
|
||||
};
|
||||
|
||||
// PBs
|
||||
u32 m_addressPBs;
|
||||
|
||||
int *templbuffer;
|
||||
int *temprbuffer;
|
||||
|
||||
bool wii_mode;
|
||||
|
||||
// ax task message handler
|
||||
bool AXTask(u32& _uMail);
|
||||
|
||||
void SendMail(u32 _uMail);
|
||||
int ReadOutPBs(AXParamBlock *_pPBs, int _num);
|
||||
void WriteBackPBs(AXParamBlock *_pPBs, int _num);
|
||||
s16 ADPCM_Step(AXParamBlock& pb, u32& samplePos, u32 newSamplePos, u16 frac);
|
||||
};
|
||||
|
||||
#endif // _UCODE_AX
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_AX
|
||||
#define _UCODE_AX
|
||||
|
||||
#include "UCode_AXStructs.h"
|
||||
|
||||
class CUCode_AX : public IUCode
|
||||
{
|
||||
public:
|
||||
CUCode_AX(CMailHandler& _rMailHandler, bool wii = false);
|
||||
virtual ~CUCode_AX();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void MixAdd(short* _pBuffer, int _iSize);
|
||||
void Update();
|
||||
|
||||
private:
|
||||
|
||||
enum
|
||||
{
|
||||
NUMBER_OF_PBS = 64
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MAIL_AX_ALIST = 0xBABE0000,
|
||||
AXLIST_STUDIOADDR = 0x0000,
|
||||
AXLIST_PBADDR = 0x0002,
|
||||
AXLIST_SBUFFER = 0x0007,
|
||||
AXLIST_COMPRESSORTABLE = 0x000A,
|
||||
AXLIST_END = 0x000F
|
||||
};
|
||||
|
||||
// PBs
|
||||
u32 m_addressPBs;
|
||||
|
||||
int *templbuffer;
|
||||
int *temprbuffer;
|
||||
|
||||
bool wii_mode;
|
||||
|
||||
// ax task message handler
|
||||
bool AXTask(u32& _uMail);
|
||||
|
||||
void SendMail(u32 _uMail);
|
||||
int ReadOutPBs(AXParamBlock *_pPBs, int _num);
|
||||
void WriteBackPBs(AXParamBlock *_pPBs, int _num);
|
||||
s16 ADPCM_Step(AXParamBlock& pb, u32& samplePos, u32 newSamplePos, u16 frac);
|
||||
};
|
||||
|
||||
#endif // _UCODE_AX
|
||||
|
@ -1,141 +1,141 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef UCODE_AX_STRUCTS
|
||||
#define UCODE_AX_STRUCTS
|
||||
|
||||
struct PBMixer
|
||||
{
|
||||
u16 volume_left;
|
||||
u16 unknown;
|
||||
u16 volume_right;
|
||||
u16 unknown2;
|
||||
|
||||
u16 unknown3[8];
|
||||
u16 unknown4[6];
|
||||
};
|
||||
|
||||
struct PBInitialTimeDelay
|
||||
{
|
||||
u16 unknown[7];
|
||||
};
|
||||
|
||||
// Update data - read these each 1ms subframe and use them!
|
||||
// It seems that to provide higher time precisions for MIDI events, some games
|
||||
// use this thing to update the parameter blocks per 1ms sub-block (a block is 5ms).
|
||||
// Using this data should fix games that are missing MIDI notes.
|
||||
struct PBUpdates
|
||||
{
|
||||
u16 num_updates[5];
|
||||
u16 data_hi; // These point to main RAM. Not sure about the structure of the data.
|
||||
u16 data_lo;
|
||||
};
|
||||
|
||||
struct PBUnknown
|
||||
{
|
||||
s16 unknown[9];
|
||||
};
|
||||
|
||||
struct PBVolumeEnvelope
|
||||
{
|
||||
u16 cur_volume;
|
||||
s16 cur_volume_delta;
|
||||
};
|
||||
|
||||
struct PBUnknown2
|
||||
{
|
||||
u16 unknown_reserved[3];
|
||||
};
|
||||
|
||||
struct PBAudioAddr
|
||||
{
|
||||
u16 looping;
|
||||
u16 sample_format;
|
||||
u16 loop_addr_hi; // Start of loop (this will point to a shared "zero" buffer if one-shot mode is active)
|
||||
u16 loop_addr_lo;
|
||||
u16 end_addr_hi; // End of sample (and loop), inclusive
|
||||
u16 end_addr_lo;
|
||||
u16 cur_addr_hi;
|
||||
u16 cur_addr_lo;
|
||||
};
|
||||
|
||||
struct PBADPCMInfo
|
||||
{
|
||||
s16 coefs[16];
|
||||
u16 unknown;
|
||||
u16 pred_scale;
|
||||
s16 yn1;
|
||||
s16 yn2;
|
||||
};
|
||||
|
||||
struct PBSampleRateConverter
|
||||
{
|
||||
u16 ratio_hi;
|
||||
u16 ratio_lo;
|
||||
u16 cur_addr_frac;
|
||||
u16 last_samples[4];
|
||||
};
|
||||
|
||||
struct PBADPCMLoopInfo
|
||||
{
|
||||
u16 pred_scale;
|
||||
u16 yn1;
|
||||
u16 yn2;
|
||||
};
|
||||
|
||||
struct AXParamBlock
|
||||
{
|
||||
u16 next_pb_hi;
|
||||
u16 next_pb_lo;
|
||||
|
||||
u16 this_pb_hi;
|
||||
u16 this_pb_lo;
|
||||
|
||||
u16 src_type; // Type of sample rate converter (none, ?, linear)
|
||||
u16 unknown1;
|
||||
|
||||
u16 mixer_control;
|
||||
u16 running; // 1=RUN 0=STOP
|
||||
u16 is_stream; // 1 = stream, 0 = one shot
|
||||
|
||||
PBMixer mixer;
|
||||
PBInitialTimeDelay initial_time_delay;
|
||||
PBUpdates updates;
|
||||
PBUnknown unknown2;
|
||||
PBVolumeEnvelope vol_env;
|
||||
PBUnknown2 unknown3;
|
||||
PBAudioAddr audio_addr;
|
||||
PBADPCMInfo adpcm;
|
||||
PBSampleRateConverter src;
|
||||
PBADPCMLoopInfo adpcm_loop_info;
|
||||
u16 unknown_maybe_padding[3];
|
||||
};
|
||||
|
||||
enum {
|
||||
AUDIOFORMAT_ADPCM = 0,
|
||||
AUDIOFORMAT_PCM8 = 0x19,
|
||||
AUDIOFORMAT_PCM16 = 0xA,
|
||||
};
|
||||
|
||||
enum {
|
||||
SRCTYPE_LINEAR = 1,
|
||||
SRCTYPE_NEAREST = 2,
|
||||
MIXCONTROL_RAMPING = 8,
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef UCODE_AX_STRUCTS
|
||||
#define UCODE_AX_STRUCTS
|
||||
|
||||
struct PBMixer
|
||||
{
|
||||
u16 volume_left;
|
||||
u16 unknown;
|
||||
u16 volume_right;
|
||||
u16 unknown2;
|
||||
|
||||
u16 unknown3[8];
|
||||
u16 unknown4[6];
|
||||
};
|
||||
|
||||
struct PBInitialTimeDelay
|
||||
{
|
||||
u16 unknown[7];
|
||||
};
|
||||
|
||||
// Update data - read these each 1ms subframe and use them!
|
||||
// It seems that to provide higher time precisions for MIDI events, some games
|
||||
// use this thing to update the parameter blocks per 1ms sub-block (a block is 5ms).
|
||||
// Using this data should fix games that are missing MIDI notes.
|
||||
struct PBUpdates
|
||||
{
|
||||
u16 num_updates[5];
|
||||
u16 data_hi; // These point to main RAM. Not sure about the structure of the data.
|
||||
u16 data_lo;
|
||||
};
|
||||
|
||||
struct PBUnknown
|
||||
{
|
||||
s16 unknown[9];
|
||||
};
|
||||
|
||||
struct PBVolumeEnvelope
|
||||
{
|
||||
u16 cur_volume;
|
||||
s16 cur_volume_delta;
|
||||
};
|
||||
|
||||
struct PBUnknown2
|
||||
{
|
||||
u16 unknown_reserved[3];
|
||||
};
|
||||
|
||||
struct PBAudioAddr
|
||||
{
|
||||
u16 looping;
|
||||
u16 sample_format;
|
||||
u16 loop_addr_hi; // Start of loop (this will point to a shared "zero" buffer if one-shot mode is active)
|
||||
u16 loop_addr_lo;
|
||||
u16 end_addr_hi; // End of sample (and loop), inclusive
|
||||
u16 end_addr_lo;
|
||||
u16 cur_addr_hi;
|
||||
u16 cur_addr_lo;
|
||||
};
|
||||
|
||||
struct PBADPCMInfo
|
||||
{
|
||||
s16 coefs[16];
|
||||
u16 unknown;
|
||||
u16 pred_scale;
|
||||
s16 yn1;
|
||||
s16 yn2;
|
||||
};
|
||||
|
||||
struct PBSampleRateConverter
|
||||
{
|
||||
u16 ratio_hi;
|
||||
u16 ratio_lo;
|
||||
u16 cur_addr_frac;
|
||||
u16 last_samples[4];
|
||||
};
|
||||
|
||||
struct PBADPCMLoopInfo
|
||||
{
|
||||
u16 pred_scale;
|
||||
u16 yn1;
|
||||
u16 yn2;
|
||||
};
|
||||
|
||||
struct AXParamBlock
|
||||
{
|
||||
u16 next_pb_hi;
|
||||
u16 next_pb_lo;
|
||||
|
||||
u16 this_pb_hi;
|
||||
u16 this_pb_lo;
|
||||
|
||||
u16 src_type; // Type of sample rate converter (none, ?, linear)
|
||||
u16 unknown1;
|
||||
|
||||
u16 mixer_control;
|
||||
u16 running; // 1=RUN 0=STOP
|
||||
u16 is_stream; // 1 = stream, 0 = one shot
|
||||
|
||||
PBMixer mixer;
|
||||
PBInitialTimeDelay initial_time_delay;
|
||||
PBUpdates updates;
|
||||
PBUnknown unknown2;
|
||||
PBVolumeEnvelope vol_env;
|
||||
PBUnknown2 unknown3;
|
||||
PBAudioAddr audio_addr;
|
||||
PBADPCMInfo adpcm;
|
||||
PBSampleRateConverter src;
|
||||
PBADPCMLoopInfo adpcm_loop_info;
|
||||
u16 unknown_maybe_padding[3];
|
||||
};
|
||||
|
||||
enum {
|
||||
AUDIOFORMAT_ADPCM = 0,
|
||||
AUDIOFORMAT_PCM8 = 0x19,
|
||||
AUDIOFORMAT_PCM16 = 0xA,
|
||||
};
|
||||
|
||||
enum {
|
||||
SRCTYPE_LINEAR = 1,
|
||||
SRCTYPE_NEAREST = 2,
|
||||
MIXCONTROL_RAMPING = 8,
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,45 +1,45 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_CARD_H
|
||||
#define _UCODE_CARD_H
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_CARD : public IUCode
|
||||
{
|
||||
private:
|
||||
enum EDSP_Codes
|
||||
{
|
||||
DSP_INIT = 0xDCD10000,
|
||||
DSP_RESUME = 0xDCD10001,
|
||||
DSP_YIELD = 0xDCD10002,
|
||||
DSP_DONE = 0xDCD10003,
|
||||
DSP_SYNC = 0xDCD10004,
|
||||
DSP_UNKN = 0xDCD10005,
|
||||
};
|
||||
|
||||
public:
|
||||
CUCode_CARD(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_CARD();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_CARD_H
|
||||
#define _UCODE_CARD_H
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_CARD : public IUCode
|
||||
{
|
||||
private:
|
||||
enum EDSP_Codes
|
||||
{
|
||||
DSP_INIT = 0xDCD10000,
|
||||
DSP_RESUME = 0xDCD10001,
|
||||
DSP_YIELD = 0xDCD10002,
|
||||
DSP_DONE = 0xDCD10003,
|
||||
DSP_SYNC = 0xDCD10004,
|
||||
DSP_UNKN = 0xDCD10005,
|
||||
};
|
||||
|
||||
public:
|
||||
CUCode_CARD(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_CARD();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,54 +1,54 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_INITAUDIOSYSTEM
|
||||
#define _UCODE_INITAUDIOSYSTEM
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_InitAudioSystem : public IUCode
|
||||
{
|
||||
public:
|
||||
CUCode_InitAudioSystem(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_InitAudioSystem();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
void Init();
|
||||
|
||||
private:
|
||||
struct SUCode
|
||||
{
|
||||
u32 m_RAMAddress;
|
||||
u32 m_Length;
|
||||
u32 m_IMEMAddress;
|
||||
u32 m_Unk;
|
||||
u32 m_StartPC;
|
||||
};
|
||||
|
||||
SUCode m_CurrentUCode;
|
||||
int m_BootTask_numSteps;
|
||||
|
||||
u32 m_NextParameter;
|
||||
|
||||
bool IsInitialized;
|
||||
|
||||
void BootUCode();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_INITAUDIOSYSTEM
|
||||
#define _UCODE_INITAUDIOSYSTEM
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_InitAudioSystem : public IUCode
|
||||
{
|
||||
public:
|
||||
CUCode_InitAudioSystem(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_InitAudioSystem();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
void Init();
|
||||
|
||||
private:
|
||||
struct SUCode
|
||||
{
|
||||
u32 m_RAMAddress;
|
||||
u32 m_Length;
|
||||
u32 m_IMEMAddress;
|
||||
u32 m_Unk;
|
||||
u32 m_StartPC;
|
||||
};
|
||||
|
||||
SUCode m_CurrentUCode;
|
||||
int m_BootTask_numSteps;
|
||||
|
||||
u32 m_NextParameter;
|
||||
|
||||
bool IsInitialized;
|
||||
|
||||
void BootUCode();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,74 +1,74 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_JAC
|
||||
#define _UCODE_JAC
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_Jac : public IUCode
|
||||
{
|
||||
private:
|
||||
|
||||
enum EDSP_Codes
|
||||
{
|
||||
DSP_INIT = 0xDCD10000,
|
||||
DSP_RESUME = 0xDCD10001,
|
||||
DSP_YIELD = 0xDCD10002,
|
||||
DSP_DONE = 0xDCD10003,
|
||||
DSP_SYNC = 0xDCD10004,
|
||||
DSP_UNKN = 0xDCD10005,
|
||||
};
|
||||
|
||||
bool m_bListInProgress;
|
||||
int m_numSteps;
|
||||
int m_step;
|
||||
u8 m_Buffer[1024];
|
||||
void ExecuteList();
|
||||
|
||||
u32 m_readOffset;
|
||||
|
||||
u8 Read8()
|
||||
{
|
||||
return(m_Buffer[m_readOffset++]);
|
||||
}
|
||||
|
||||
// Hmm, don't these need bswaps?
|
||||
u16 Read16()
|
||||
{
|
||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 2;
|
||||
return(res);
|
||||
}
|
||||
|
||||
u32 Read32()
|
||||
{
|
||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 4;
|
||||
return(res);
|
||||
}
|
||||
|
||||
public:
|
||||
CUCode_Jac(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_Jac();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_JAC
|
||||
#define _UCODE_JAC
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_Jac : public IUCode
|
||||
{
|
||||
private:
|
||||
|
||||
enum EDSP_Codes
|
||||
{
|
||||
DSP_INIT = 0xDCD10000,
|
||||
DSP_RESUME = 0xDCD10001,
|
||||
DSP_YIELD = 0xDCD10002,
|
||||
DSP_DONE = 0xDCD10003,
|
||||
DSP_SYNC = 0xDCD10004,
|
||||
DSP_UNKN = 0xDCD10005,
|
||||
};
|
||||
|
||||
bool m_bListInProgress;
|
||||
int m_numSteps;
|
||||
int m_step;
|
||||
u8 m_Buffer[1024];
|
||||
void ExecuteList();
|
||||
|
||||
u32 m_readOffset;
|
||||
|
||||
u8 Read8()
|
||||
{
|
||||
return(m_Buffer[m_readOffset++]);
|
||||
}
|
||||
|
||||
// Hmm, don't these need bswaps?
|
||||
u16 Read16()
|
||||
{
|
||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 2;
|
||||
return(res);
|
||||
}
|
||||
|
||||
u32 Read32()
|
||||
{
|
||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 4;
|
||||
return(res);
|
||||
}
|
||||
|
||||
public:
|
||||
CUCode_Jac(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_Jac();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,51 +1,51 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_ROM
|
||||
#define _UCODE_ROM
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_Rom : public IUCode
|
||||
{
|
||||
public:
|
||||
CUCode_Rom(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_Rom();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
|
||||
private:
|
||||
struct SUCode
|
||||
{
|
||||
u32 m_RAMAddress;
|
||||
u32 m_Length;
|
||||
u32 m_IMEMAddress;
|
||||
u32 m_Unk;
|
||||
u32 m_StartPC;
|
||||
};
|
||||
|
||||
SUCode m_CurrentUCode;
|
||||
int m_BootTask_numSteps;
|
||||
|
||||
u32 m_NextParameter;
|
||||
|
||||
void BootUCode();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_ROM
|
||||
#define _UCODE_ROM
|
||||
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_Rom : public IUCode
|
||||
{
|
||||
public:
|
||||
CUCode_Rom(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_Rom();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
|
||||
private:
|
||||
struct SUCode
|
||||
{
|
||||
u32 m_RAMAddress;
|
||||
u32 m_Length;
|
||||
u32 m_IMEMAddress;
|
||||
u32 m_Unk;
|
||||
u32 m_StartPC;
|
||||
};
|
||||
|
||||
SUCode m_CurrentUCode;
|
||||
int m_BootTask_numSteps;
|
||||
|
||||
u32 m_NextParameter;
|
||||
|
||||
void BootUCode();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,74 +1,74 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_ZELDA_H
|
||||
#define _UCODE_ZELDA_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_Zelda : public IUCode
|
||||
{
|
||||
private:
|
||||
enum EDSP_Codes
|
||||
{
|
||||
DSP_INIT = 0xDCD10000,
|
||||
DSP_RESUME = 0xDCD10001,
|
||||
DSP_YIELD = 0xDCD10002,
|
||||
DSP_DONE = 0xDCD10003,
|
||||
DSP_SYNC = 0xDCD10004,
|
||||
DSP_UNKN = 0xDCD10005,
|
||||
};
|
||||
|
||||
// List in progress
|
||||
u32 m_numSteps;
|
||||
bool m_bListInProgress;
|
||||
u32 m_step;
|
||||
u8 m_Buffer[1024];
|
||||
void ExecuteList();
|
||||
|
||||
u32 m_readOffset;
|
||||
|
||||
u8 Read8()
|
||||
{
|
||||
return m_Buffer[m_readOffset++];
|
||||
}
|
||||
|
||||
u16 Read16()
|
||||
{
|
||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 2;
|
||||
return res;
|
||||
}
|
||||
|
||||
u32 Read32()
|
||||
{
|
||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 4;
|
||||
return res;
|
||||
}
|
||||
public:
|
||||
|
||||
CUCode_Zelda(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_Zelda();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODE_ZELDA_H
|
||||
#define _UCODE_ZELDA_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "UCodes.h"
|
||||
|
||||
class CUCode_Zelda : public IUCode
|
||||
{
|
||||
private:
|
||||
enum EDSP_Codes
|
||||
{
|
||||
DSP_INIT = 0xDCD10000,
|
||||
DSP_RESUME = 0xDCD10001,
|
||||
DSP_YIELD = 0xDCD10002,
|
||||
DSP_DONE = 0xDCD10003,
|
||||
DSP_SYNC = 0xDCD10004,
|
||||
DSP_UNKN = 0xDCD10005,
|
||||
};
|
||||
|
||||
// List in progress
|
||||
u32 m_numSteps;
|
||||
bool m_bListInProgress;
|
||||
u32 m_step;
|
||||
u8 m_Buffer[1024];
|
||||
void ExecuteList();
|
||||
|
||||
u32 m_readOffset;
|
||||
|
||||
u8 Read8()
|
||||
{
|
||||
return m_Buffer[m_readOffset++];
|
||||
}
|
||||
|
||||
u16 Read16()
|
||||
{
|
||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 2;
|
||||
return res;
|
||||
}
|
||||
|
||||
u32 Read32()
|
||||
{
|
||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
||||
m_readOffset += 4;
|
||||
return res;
|
||||
}
|
||||
public:
|
||||
|
||||
CUCode_Zelda(CMailHandler& _rMailHandler);
|
||||
virtual ~CUCode_Zelda();
|
||||
|
||||
void HandleMail(u32 _uMail);
|
||||
void Update();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,48 +1,48 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODES_H
|
||||
#define _UCODES_H
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#define UCODE_ROM 0x0000000
|
||||
#define UCODE_INIT_AUDIO_SYSTEM 0x0000001
|
||||
|
||||
class CMailHandler;
|
||||
|
||||
class IUCode
|
||||
{
|
||||
public:
|
||||
IUCode(CMailHandler& _rMailHandler)
|
||||
: m_rMailHandler(_rMailHandler)
|
||||
{}
|
||||
|
||||
virtual ~IUCode()
|
||||
{}
|
||||
|
||||
virtual void HandleMail(u32 _uMail) = 0;
|
||||
virtual void Update(void) = 0;
|
||||
virtual void MixAdd(short* buffer, int size) {}
|
||||
|
||||
protected:
|
||||
CMailHandler& m_rMailHandler;
|
||||
};
|
||||
|
||||
extern IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler);
|
||||
|
||||
#endif
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _UCODES_H
|
||||
#define _UCODES_H
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#define UCODE_ROM 0x0000000
|
||||
#define UCODE_INIT_AUDIO_SYSTEM 0x0000001
|
||||
|
||||
class CMailHandler;
|
||||
|
||||
class IUCode
|
||||
{
|
||||
public:
|
||||
IUCode(CMailHandler& _rMailHandler)
|
||||
: m_rMailHandler(_rMailHandler)
|
||||
{}
|
||||
|
||||
virtual ~IUCode()
|
||||
{}
|
||||
|
||||
virtual void HandleMail(u32 _uMail) = 0;
|
||||
virtual void Update(void) = 0;
|
||||
virtual void MixAdd(short* buffer, int size) {}
|
||||
|
||||
protected:
|
||||
CMailHandler& m_rMailHandler;
|
||||
};
|
||||
|
||||
extern IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user