Merging revisions 1314 to 1319 into release branch.

This commit is contained in:
yabause 2008-12-30 21:20:05 +00:00
parent 2ee306e67d
commit 61857f8b59
7 changed files with 22 additions and 21 deletions

View File

@ -1,6 +1,4 @@
#ifdef __GNUC__
__attribute__((packed))
#else
#ifndef __GNUC__
#pragma pack(push, 1)
#pragma warning(disable : 4103)
#endif

View File

@ -1,5 +1,3 @@
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
#pragma pack(pop)
#else
#endif

View File

@ -1437,7 +1437,6 @@ static void NOPARAMS(u32 val)
void gfx3d_sendCommandToFIFO(u32 val)
{
//INFO("3D command 0x%02X (full val = 0x%08X, val = 0x%08X, ind %i)\n", clCmd&0xFF, clCmd, val, clInd);
if (!clInd)
{
if (val == 0)
@ -1692,7 +1691,7 @@ void gfx3d_sendCommandToFIFO(u32 val)
clInd--;
break;
default:
INFO("Unknown 3D command 0x%02X in cmd=0x%02X\n", clCmd&0xFF, val);
LOG("Unknown FIFO 3D command 0x%02X in cmd=0x%02X\n", clCmd&0xFF, val);
clCmd >>= 8;
clInd--;
break;
@ -1839,7 +1838,7 @@ void gfx3d_sendCommand(u32 cmd, u32 param)
gfx3d_glVecTest(param);
break;
default:
INFO("Execute unknown 3D command %03X in param=0x%08X\n", cmd, param);
LOG("Execute direct Port 3D command %03X in param=0x%08X\n", cmd, param);
break;
}
}

View File

@ -387,7 +387,9 @@ static void FCEUI_LoadMovie(const char *fname, bool _read_only, bool tasedit, in
//LoadFM2(currMovieData, fp->stream, INT_MAX, false);
LoadFM2(currMovieData, &fstream(fname), INT_MAX, false);
fstream fs (fname);
LoadFM2(currMovieData, &fs, INT_MAX, false);
fs.close();
//TODO
//fully reload the game to reinitialize everything before playing any movie

View File

@ -8,6 +8,7 @@
#include "../../types.h"
#include "crc.h"
#include "header.h"
#include "decrypt.h"
const unsigned char encr_data[] =
{
@ -280,7 +281,7 @@ u32 global3_x00, global3_x04; // RTC value
u32 global3_rand1;
u32 global3_rand3;
u32 lookup(u32 *magic, u32 v)
static u32 lookup(u32 *magic, u32 v)
{
u32 a = (v >> 24) & 0xFF;
u32 b = (v >> 16) & 0xFF;
@ -295,7 +296,7 @@ u32 lookup(u32 *magic, u32 v)
return d + (c ^ (b + a));
}
void encrypt(u32 *magic, u32 *arg1, u32 *arg2)
static void encrypt(u32 *magic, u32 *arg1, u32 *arg2)
{
u32 a,b,c;
a = *arg1;
@ -310,7 +311,7 @@ void encrypt(u32 *magic, u32 *arg1, u32 *arg2)
*arg1 = b ^ magic[17];
}
void decrypt(u32 *magic, u32 *arg1, u32 *arg2)
static void decrypt(u32 *magic, u32 *arg1, u32 *arg2)
{
u32 a,b,c;
a = *arg1;
@ -325,17 +326,17 @@ void decrypt(u32 *magic, u32 *arg1, u32 *arg2)
*arg2 = a ^ magic[1];
}
void encrypt(u32 *magic, u64 &cmd)
static void encrypt(u32 *magic, u64 &cmd)
{
encrypt(magic, (u32 *)&cmd + 1, (u32 *)&cmd + 0);
}
void decrypt(u32 *magic, u64 &cmd)
static void decrypt(u32 *magic, u64 &cmd)
{
decrypt(magic, (u32 *)&cmd + 1, (u32 *)&cmd + 0);
}
void update_hashtable(u32* magic, u8 arg1[8])
static void update_hashtable(u32* magic, u8 arg1[8])
{
for (int j=0;j<18;j++)
{
@ -366,14 +367,14 @@ void update_hashtable(u32* magic, u8 arg1[8])
u32 arg2[3];
void init2(u32 *magic, u32 a[3])
static void init2(u32 *magic, u32 a[3])
{
encrypt(magic, a+2, a+1);
encrypt(magic, a+1, a+0);
update_hashtable(magic, (u8*)a);
}
void init1(u32 cardheader_gamecode)
static void init1(u32 cardheader_gamecode)
{
memcpy(card_hash, &encr_data, 4*(1024 + 18));
arg2[0] = *(u32 *)&cardheader_gamecode;
@ -383,7 +384,7 @@ void init1(u32 cardheader_gamecode)
init2(card_hash, arg2);
}
void init0(u32 cardheader_gamecode)
static void init0(u32 cardheader_gamecode)
{
init1(cardheader_gamecode);
encrypt(card_hash, (u32*)&global3_x04, (u32*)&global3_x00);
@ -399,7 +400,7 @@ void init0(u32 cardheader_gamecode)
/*
* decrypt_arm9
*/
void decrypt_arm9(u32 cardheader_gamecode, unsigned char *data)
static void decrypt_arm9(u32 cardheader_gamecode, unsigned char *data)
{
u32 *p = (u32*)data;
@ -442,8 +443,10 @@ void DecryptSecureArea(u8 *romdata, long romlen)
bool do_encrypt = (endecrypt_option == 'e') || (endecrypt_option == 'E');
unsigned int rounds_offsets = (endecrypt_option == 'E') ? 0x2000 : 0x1600;
unsigned int sbox_offsets = (endecrypt_option == 'E') ? 0x2400 : 0x2800;*/
#if 0
unsigned int rounds_offsets = 0x1600;
unsigned int sbox_offsets = 0x2800;
#endif
// check if ROM is already encrypted
if (romType == ROMTYPE_NDSDUMPED)

View File

@ -559,7 +559,7 @@ std::string mass_replace(const std::string &source, const std::string &victim, c
#include "ConvertUTF.h"
namespace UtfConverter
{
std::wstring FromUtf8(const std::string& utf8string)
static std::wstring FromUtf8(const std::string& utf8string)
{
size_t widesize = utf8string.length();
if (sizeof(wchar_t) == 2)
@ -605,7 +605,7 @@ namespace UtfConverter
return L"";
}
std::string ToUtf8(const std::wstring& widestring)
static std::string ToUtf8(const std::wstring& widestring)
{
size_t widesize = widestring.length();

View File

@ -5,6 +5,7 @@ EXTRA_DIST = DeSmuME.ico \
resources.rc
bin_PROGRAMS = desmume
desmume_SOURCES = \
afxres.h \
CWindow.cpp CWindow.h \
disView.cpp disView.h ginfo.cpp ginfo.h \
IORegView.cpp IORegView.h \