Ban compression of Wii images until it has been tested. All sorts of minor cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@669 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
284e3ec211
commit
e4785df7a2
|
@ -49,6 +49,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define fseek _fseeki64
|
||||||
|
#define ftell _ftelli64
|
||||||
|
#endif
|
||||||
|
|
||||||
#define POSIX 0
|
#define POSIX 0
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,8 @@ void CLogWindow::OnClear(wxCommandEvent& event)
|
||||||
|
|
||||||
void CLogWindow::OnEnableAll(wxCommandEvent& event)
|
void CLogWindow::OnEnableAll(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
if (!LogManager::m_Log[0])
|
||||||
|
return;
|
||||||
static bool enable = true;
|
static bool enable = true;
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
ini.Load("Dolphin.ini");
|
ini.Load("Dolphin.ini");
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "CompressedBlob.h"
|
#include "CompressedBlob.h"
|
||||||
|
#include "FileUtil.h"
|
||||||
#include "Hash.h"
|
#include "Hash.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -35,11 +36,6 @@
|
||||||
#include "../../../../Externals/zlib/zlib.h"
|
#include "../../../../Externals/zlib/zlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define fseek _fseeki64
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -163,6 +159,11 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
|
||||||
bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
|
bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
|
||||||
int block_size, CompressCB callback, void* arg)
|
int block_size, CompressCB callback, void* arg)
|
||||||
{
|
{
|
||||||
|
if (File::GetSize(infile) > 2000000000ULL) {
|
||||||
|
PanicAlert("Sorry - compressing Wii games not yet supported.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsCompressedBlob(infile))
|
if (IsCompressedBlob(infile))
|
||||||
{
|
{
|
||||||
PanicAlert("%s is already compressed! Cannot compress it further.", infile);
|
PanicAlert("%s is already compressed! Cannot compress it further.", infile);
|
||||||
|
|
|
@ -137,6 +137,7 @@ size_t CFileSystemGCWii::GetFileList(std::vector<const SFileInfo *> &_rFilenames
|
||||||
if (_rFilenames.size())
|
if (_rFilenames.size())
|
||||||
PanicAlert("GetFileList : input list has contents?");
|
PanicAlert("GetFileList : input list has contents?");
|
||||||
_rFilenames.clear();
|
_rFilenames.clear();
|
||||||
|
_rFilenames.reserve(m_FileInfoVector.size());
|
||||||
for (size_t i = 0; i < m_FileInfoVector.size(); i++)
|
for (size_t i = 0; i < m_FileInfoVector.size(); i++)
|
||||||
_rFilenames.push_back(&m_FileInfoVector[i]);
|
_rFilenames.push_back(&m_FileInfoVector[i]);
|
||||||
return m_FileInfoVector.size();
|
return m_FileInfoVector.size();
|
||||||
|
@ -182,9 +183,11 @@ bool CFileSystemGCWii::InitFileSystem()
|
||||||
|
|
||||||
if (Root.IsDirectory())
|
if (Root.IsDirectory())
|
||||||
{
|
{
|
||||||
m_FileInfoVector.clear();
|
if (m_FileInfoVector.size())
|
||||||
|
PanicAlert("Wtf?");
|
||||||
u64 NameTableOffset = FSTOffset;
|
u64 NameTableOffset = FSTOffset;
|
||||||
|
|
||||||
|
m_FileInfoVector.reserve(Root.m_FileSize);
|
||||||
for (u32 i = 0; i < Root.m_FileSize; i++)
|
for (u32 i = 0; i < Root.m_FileSize; i++)
|
||||||
{
|
{
|
||||||
SFileInfo sfi;
|
SFileInfo sfi;
|
||||||
|
@ -194,7 +197,6 @@ bool CFileSystemGCWii::InitFileSystem()
|
||||||
sfi.m_FileSize = Read32(Offset + 0x8);
|
sfi.m_FileSize = Read32(Offset + 0x8);
|
||||||
|
|
||||||
m_FileInfoVector.push_back(sfi);
|
m_FileInfoVector.push_back(sfi);
|
||||||
|
|
||||||
NameTableOffset += 0xC;
|
NameTableOffset += 0xC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename)
|
||||||
{
|
{
|
||||||
case DISC_TYPE_WII:
|
case DISC_TYPE_WII:
|
||||||
case DISC_TYPE_GC:
|
case DISC_TYPE_GC:
|
||||||
return(new CVolumeGC(pReader));
|
return new CVolumeGC(pReader);
|
||||||
|
|
||||||
case DISC_TYPE_WII_CONTAINER:
|
case DISC_TYPE_WII_CONTAINER:
|
||||||
{
|
{
|
||||||
|
|
|
@ -421,7 +421,7 @@ void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u
|
||||||
m_virtualDisk.insert(make_pair(dataOffset, entry.physicalName));
|
m_virtualDisk.insert(make_pair(dataOffset, entry.physicalName));
|
||||||
|
|
||||||
// 4 byte aligned
|
// 4 byte aligned
|
||||||
dataOffset = (dataOffset + entry.size + 3) & ~3;
|
dataOffset = (dataOffset + entry.size + 3) & ~3ULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#include <crtdbg.h>
|
||||||
#include "svnrev.h"
|
#include "svnrev.h"
|
||||||
#endif
|
#endif
|
||||||
#include "CPUDetect.h"
|
#include "CPUDetect.h"
|
||||||
|
@ -69,6 +70,13 @@ LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e) {
|
||||||
bool DolphinApp::OnInit()
|
bool DolphinApp::OnInit()
|
||||||
{
|
{
|
||||||
DetectCPU();
|
DetectCPU();
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
int tmpflag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||||
|
tmpflag |= _CRTDBG_DELAY_FREE_MEM_DF;
|
||||||
|
_CrtSetDbgFlag(tmpflag);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// RegisterPanicAlertHandler(&wxPanicAlert);
|
// RegisterPanicAlertHandler(&wxPanicAlert);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,10 +42,8 @@ CDSPHandler::~CDSPHandler()
|
||||||
void CDSPHandler::Update()
|
void CDSPHandler::Update()
|
||||||
{
|
{
|
||||||
if (m_pUCode != NULL)
|
if (m_pUCode != NULL)
|
||||||
{
|
|
||||||
m_pUCode->Update();
|
m_pUCode->Update();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsigned short CDSPHandler::WriteControlRegister(unsigned short _Value)
|
unsigned short CDSPHandler::WriteControlRegister(unsigned short _Value)
|
||||||
{
|
{
|
||||||
|
@ -64,32 +62,29 @@ unsigned short CDSPHandler::WriteControlRegister(unsigned short _Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_DSPControl.Hex = Temp.Hex;
|
m_DSPControl.Hex = Temp.Hex;
|
||||||
|
return m_DSPControl.Hex;
|
||||||
return(m_DSPControl.Hex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short CDSPHandler::ReadControlRegister()
|
unsigned short CDSPHandler::ReadControlRegister()
|
||||||
{
|
{
|
||||||
return(m_DSPControl.Hex);
|
return m_DSPControl.Hex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDSPHandler::SendMailToDSP(u32 _uMail)
|
void CDSPHandler::SendMailToDSP(u32 _uMail)
|
||||||
{
|
{
|
||||||
if (m_pUCode != NULL)
|
if (m_pUCode != NULL)
|
||||||
{
|
|
||||||
m_pUCode->HandleMail(_uMail);
|
m_pUCode->HandleMail(_uMail);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
IUCode* CDSPHandler::GetUCode()
|
IUCode* CDSPHandler::GetUCode()
|
||||||
{
|
{
|
||||||
return(m_pUCode);
|
return m_pUCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDSPHandler::SetUCode(u32 _crc)
|
void CDSPHandler::SetUCode(u32 _crc)
|
||||||
{
|
{
|
||||||
delete m_pUCode;
|
delete m_pUCode;
|
||||||
|
m_pUCode = NULL;
|
||||||
m_MailHandler.Clear();
|
m_MailHandler.Clear();
|
||||||
m_pUCode = UCodeFactory(_crc, m_MailHandler);
|
m_pUCode = UCodeFactory(_crc, m_MailHandler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,11 +32,11 @@ public:
|
||||||
IUCode* GetUCode();
|
IUCode* GetUCode();
|
||||||
void SetUCode(u32 _crc);
|
void SetUCode(u32 _crc);
|
||||||
|
|
||||||
CMailHandler& AccessMailHandler() {return(m_MailHandler);}
|
CMailHandler& AccessMailHandler() { return m_MailHandler; }
|
||||||
|
|
||||||
static CDSPHandler& GetInstance()
|
static CDSPHandler& GetInstance()
|
||||||
{
|
{
|
||||||
return(*m_pInstance);
|
return *m_pInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Destroy()
|
static void Destroy()
|
||||||
|
@ -48,11 +48,9 @@ public:
|
||||||
static CDSPHandler& CreateInstance()
|
static CDSPHandler& CreateInstance()
|
||||||
{
|
{
|
||||||
if (!m_pInstance)
|
if (!m_pInstance)
|
||||||
{
|
|
||||||
m_pInstance = new CDSPHandler();
|
m_pInstance = new CDSPHandler();
|
||||||
}
|
|
||||||
|
|
||||||
return(*m_pInstance);
|
return *m_pInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -18,7 +18,9 @@
|
||||||
#include "MailHandler.h"
|
#include "MailHandler.h"
|
||||||
|
|
||||||
CMailHandler::CMailHandler()
|
CMailHandler::CMailHandler()
|
||||||
{}
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CMailHandler::~CMailHandler()
|
CMailHandler::~CMailHandler()
|
||||||
{
|
{
|
||||||
|
@ -38,13 +40,11 @@ u16 CMailHandler::ReadDSPMailboxHigh()
|
||||||
if (!m_Mails.empty())
|
if (!m_Mails.empty())
|
||||||
{
|
{
|
||||||
u16 result = (m_Mails.front() >> 16) & 0xFFFF;
|
u16 result = (m_Mails.front() >> 16) & 0xFFFF;
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
|
return result;
|
||||||
return(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return(0x00);
|
return 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 CMailHandler::ReadDSPMailboxLow()
|
u16 CMailHandler::ReadDSPMailboxLow()
|
||||||
|
@ -60,20 +60,18 @@ u16 CMailHandler::ReadDSPMailboxLow()
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(0x00);
|
return 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMailHandler::Clear()
|
void CMailHandler::Clear()
|
||||||
{
|
{
|
||||||
while (!m_Mails.empty())
|
while (!m_Mails.empty())
|
||||||
{
|
|
||||||
m_Mails.pop();
|
m_Mails.pop();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool CMailHandler::IsEmpty()
|
bool CMailHandler::IsEmpty()
|
||||||
{
|
{
|
||||||
return(m_Mails.empty());
|
return m_Mails.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMailHandler::Halt(bool _Halt)
|
void CMailHandler::Halt(bool _Halt)
|
||||||
|
|
|
@ -29,10 +29,13 @@ CUCode_Zelda::CUCode_Zelda(CMailHandler& _rMailHandler)
|
||||||
: IUCode(_rMailHandler)
|
: IUCode(_rMailHandler)
|
||||||
, m_numSteps(0)
|
, m_numSteps(0)
|
||||||
, m_bListInProgress(false)
|
, m_bListInProgress(false)
|
||||||
|
, m_step(0)
|
||||||
|
, m_readOffset(0)
|
||||||
{
|
{
|
||||||
DebugLog("UCode_Zelda - add boot mails for handshake");
|
DebugLog("UCode_Zelda - add boot mails for handshake");
|
||||||
m_rMailHandler.PushMail(DSP_INIT);
|
m_rMailHandler.PushMail(DSP_INIT);
|
||||||
m_rMailHandler.PushMail(0x80000000); // handshake
|
m_rMailHandler.PushMail(0x80000000); // handshake
|
||||||
|
memset(m_Buffer, 0, sizeof(m_Buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,10 +49,8 @@ void CUCode_Zelda::Update()
|
||||||
{
|
{
|
||||||
// check if we have to sent something
|
// check if we have to sent something
|
||||||
if (!m_rMailHandler.IsEmpty())
|
if (!m_rMailHandler.IsEmpty())
|
||||||
{
|
|
||||||
g_dspInitialize.pGenerateDSPInterrupt();
|
g_dspInitialize.pGenerateDSPInterrupt();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_Zelda::HandleMail(u32 _uMail)
|
void CUCode_Zelda::HandleMail(u32 _uMail)
|
||||||
|
@ -62,6 +63,8 @@ void CUCode_Zelda::HandleMail(u32 _uMail)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (m_step < 0 || m_step >= sizeof(m_Buffer)/4)
|
||||||
|
PanicAlert("m_step out of range");
|
||||||
((u32*)m_Buffer)[m_step] = _uMail;
|
((u32*)m_Buffer)[m_step] = _uMail;
|
||||||
m_step++;
|
m_step++;
|
||||||
|
|
||||||
|
|
|
@ -45,21 +45,21 @@ private:
|
||||||
|
|
||||||
u8 Read8()
|
u8 Read8()
|
||||||
{
|
{
|
||||||
return(m_Buffer[m_readOffset++]);
|
return m_Buffer[m_readOffset++];
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 Read16()
|
u16 Read16()
|
||||||
{
|
{
|
||||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
||||||
m_readOffset += 2;
|
m_readOffset += 2;
|
||||||
return(res);
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 Read32()
|
u32 Read32()
|
||||||
{
|
{
|
||||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
||||||
m_readOffset += 4;
|
m_readOffset += 4;
|
||||||
return(res);
|
return res;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -32,20 +32,20 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||||
switch (_CRC)
|
switch (_CRC)
|
||||||
{
|
{
|
||||||
case UCODE_ROM:
|
case UCODE_ROM:
|
||||||
return(new CUCode_Rom(_rMailHandler));
|
return new CUCode_Rom(_rMailHandler);
|
||||||
|
|
||||||
case UCODE_INIT_AUDIO_SYSTEM:
|
case UCODE_INIT_AUDIO_SYSTEM:
|
||||||
return(new CUCode_InitAudioSystem(_rMailHandler));
|
return new CUCode_InitAudioSystem(_rMailHandler);
|
||||||
|
|
||||||
case 0x65d6cc6f: // CARD
|
case 0x65d6cc6f: // CARD
|
||||||
return(new CUCode_CARD(_rMailHandler));
|
return new CUCode_CARD(_rMailHandler);
|
||||||
|
|
||||||
case 0x088e38a5: // IPL - JAP
|
case 0x088e38a5: // IPL - JAP
|
||||||
case 0xd73338cf: // IPL
|
case 0xd73338cf: // IPL
|
||||||
case 0x42f64ac4: // Luigi (after fix)
|
case 0x42f64ac4: // Luigi (after fix)
|
||||||
case 0x4be6a5cb: // AC, Pikmin (after fix)
|
case 0x4be6a5cb: // AC, Pikmin (after fix)
|
||||||
DebugLog("JAC ucode chosen");
|
DebugLog("JAC ucode chosen");
|
||||||
return(new CUCode_Jac(_rMailHandler));
|
return new CUCode_Jac(_rMailHandler);
|
||||||
|
|
||||||
case 0x3ad3b7ac: // Naruto3
|
case 0x3ad3b7ac: // Naruto3
|
||||||
case 0x3daf59b9: // Alien Hominid
|
case 0x3daf59b9: // Alien Hominid
|
||||||
|
@ -57,31 +57,31 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||||
// Zelda:OOT, Tony hawk, viewtiful joe
|
// Zelda:OOT, Tony hawk, viewtiful joe
|
||||||
case 0xe2136399: // billy hatcher, dragonballz, mario party 5, TMNT, ava1080
|
case 0xe2136399: // billy hatcher, dragonballz, mario party 5, TMNT, ava1080
|
||||||
DebugLog("AX ucode chosen, yay!");
|
DebugLog("AX ucode chosen, yay!");
|
||||||
return(new CUCode_AX(_rMailHandler));
|
return new CUCode_AX(_rMailHandler);
|
||||||
|
|
||||||
case 0x6CA33A6D: // DK Jungle Beat
|
case 0x6CA33A6D: // DK Jungle Beat
|
||||||
case 0x86840740: // zelda
|
case 0x86840740: // zelda
|
||||||
case 0x56d36052: // mario
|
case 0x56d36052: // mario
|
||||||
case 0x2fcdf1ec: // mariokart, zelda 4 swords
|
case 0x2fcdf1ec: // mariokart, zelda 4 swords
|
||||||
DebugLog("Zelda ucode chosen");
|
DebugLog("Zelda ucode chosen");
|
||||||
return(new CUCode_Zelda(_rMailHandler));
|
return new CUCode_Zelda(_rMailHandler);
|
||||||
|
|
||||||
// WII CRCs
|
// WII CRCs
|
||||||
case 0x6c3f6f94: // zelda - PAL
|
case 0x6c3f6f94: // zelda - PAL
|
||||||
case 0xd643001f: // mario galaxy - PAL
|
case 0xd643001f: // mario galaxy - PAL
|
||||||
DebugLog("Zelda Wii ucode chosen");
|
DebugLog("Zelda Wii ucode chosen");
|
||||||
return(new CUCode_Zelda(_rMailHandler));
|
return new CUCode_Zelda(_rMailHandler);
|
||||||
|
|
||||||
case 0x347112ba: // raving rabbits
|
case 0x347112ba: // raving rabbits
|
||||||
DebugLog("Wii - AX chosen");
|
DebugLog("Wii - AX chosen");
|
||||||
return(new CUCode_AX(_rMailHandler, true));
|
return new CUCode_AX(_rMailHandler, true);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PanicAlert("Unknown ucode (CRC = %08x) - forcing AX", _CRC);
|
PanicAlert("Unknown ucode (CRC = %08x) - forcing AX", _CRC);
|
||||||
return(new CUCode_AX(_rMailHandler));
|
return new CUCode_AX(_rMailHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(NULL);
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#define UCODE_INIT_AUDIO_SYSTEM 0x0000001
|
#define UCODE_INIT_AUDIO_SYSTEM 0x0000001
|
||||||
|
|
||||||
class CMailHandler;
|
class CMailHandler;
|
||||||
|
|
||||||
class IUCode
|
class IUCode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -132,6 +132,12 @@ void DSP_Initialize(DSPInitialize _dspInitialize)
|
||||||
CDSPHandler::CreateInstance();
|
CDSPHandler::CreateInstance();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifdef _DEBUG
|
||||||
|
int tmpflag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||||
|
tmpflag |= _CRTDBG_DELAY_FREE_MEM_DF;
|
||||||
|
_CrtSetDbgFlag(tmpflag);
|
||||||
|
#endif
|
||||||
|
|
||||||
DSound::DSound_StartSound((HWND)g_dspInitialize.hWnd, 48000, Mixer);
|
DSound::DSound_StartSound((HWND)g_dspInitialize.hWnd, 48000, Mixer);
|
||||||
#else
|
#else
|
||||||
AOSound::AOSound_StartSound(48000, Mixer);
|
AOSound::AOSound_StartSound(48000, Mixer);
|
||||||
|
@ -157,11 +163,11 @@ unsigned short DSP_ReadMailboxHigh(bool _CPUMailbox)
|
||||||
{
|
{
|
||||||
if (_CPUMailbox)
|
if (_CPUMailbox)
|
||||||
{
|
{
|
||||||
return((g_dspState.CPUMailbox >> 16) & 0xFFFF);
|
return (g_dspState.CPUMailbox >> 16) & 0xFFFF;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return(CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxHigh());
|
return CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxHigh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,11 +175,11 @@ unsigned short DSP_ReadMailboxLow(bool _CPUMailbox)
|
||||||
{
|
{
|
||||||
if (_CPUMailbox)
|
if (_CPUMailbox)
|
||||||
{
|
{
|
||||||
return(g_dspState.CPUMailbox & 0xFFFF);
|
return g_dspState.CPUMailbox & 0xFFFF;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return(CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxLow());
|
return CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxLow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,5 +255,4 @@ void DSP_SendAIBuffer(unsigned int address, int sample_rate)
|
||||||
if ((counter & 255) == 0)
|
if ((counter & 255) == 0)
|
||||||
DSound::DSound_UpdateSound();
|
DSound::DSound_UpdateSound();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
//
|
//
|
||||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#define STRICT
|
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
#define DIRECTINPUT_VERSION 0x0800
|
||||||
|
|
||||||
#include <basetsd.h>
|
#include <basetsd.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -21,9 +20,6 @@
|
||||||
#include "MultiDI.h"
|
#include "MultiDI.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Name: CMultiplayerInputDeviceManager
|
// Name: CMultiplayerInputDeviceManager
|
||||||
// Desc: Constructor
|
// Desc: Constructor
|
||||||
|
|
|
@ -303,8 +303,8 @@ void SendReportCoreAccelIr12() {
|
||||||
|
|
||||||
RECT screenRect;
|
RECT screenRect;
|
||||||
POINT point;
|
POINT point;
|
||||||
_dbg_assert_(WIIMOTE, GetClipCursor(&screenRect));
|
GetClipCursor(&screenRect);
|
||||||
_dbg_assert_(WIIMOTE, GetCursorPos(&point));
|
GetCursorPos(&point);
|
||||||
y0 = y1 = (point.y * (screenRect.bottom - screenRect.top)) / (BOTTOM - TOP);
|
y0 = y1 = (point.y * (screenRect.bottom - screenRect.top)) / (BOTTOM - TOP);
|
||||||
int x = (point.x * (screenRect.right - screenRect.left)) / (RIGHT - LEFT);
|
int x = (point.x * (screenRect.right - screenRect.left)) / (RIGHT - LEFT);
|
||||||
x0 = x - SENSOR_BAR_RADIUS;
|
x0 = x - SENSOR_BAR_RADIUS;
|
||||||
|
|
Loading…
Reference in New Issue