Compilation fix for r4795

Nunchuck gravity fix for r4794 (as sanchez instructed)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4797 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2010-01-08 22:56:27 +00:00
parent 6575f9d03a
commit 81afdbe4f4
5 changed files with 13 additions and 11 deletions

View File

@ -218,6 +218,8 @@ bail:
u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena *arena)
{
u32 total_mem = 0;
int base_attempts = 0;
for (int i = 0; i < num_views; i++)
{
SKIP(flags, views[i].flags);
@ -243,9 +245,10 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena
// Try a whole range of possible bases. Return once we got a valid one.
u32 max_base_addr = 0x7FFF0000 - 0x31000000;
u8 *base = NULL;
int base_attempts = 1;
for (u32 base_addr = 0x40000; base_addr < max_base_addr; base_addr += 0x40000)
{
base_attempts++;
base = (u8 *)base_addr;
if (Memory_TryBase(base, views, num_views, flags, arena))
{
@ -253,7 +256,7 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena
base_attempts = 0;
break;
}
base_attempts++;
}
#else
// Linux32 is fine with the x64 method, although limited to 32-bit with no automirrors.

View File

@ -408,11 +408,11 @@ void Write16(const u16 _Value, const u32 _Address)
{
// Clear old BP and initiate new BP
Common::AtomicStore(fifo.bFF_Breakpoint, 0);
// AyuanX: The following is a hack
// AyuanX: The following is a hack for dual core
// There is definitely some initialization problem with Dolphin (not found exact location yet)
// Which prevents Metroid Prime 2 from first time booting (If you boot some other GC game first then MP2 can boot)
// But somehow this instant BP hack can make MP2 boot even at first time
UpdateInterrupts(true);
if (g_VideoInitialize.bOnThread) UpdateInterrupts(true);
}
INFO_LOG(COMMANDPROCESSOR,"\t write to CTRL_REGISTER : %04x", _Value);