bunch of comments/unions in VI. No more UnknownVIRegs[0x1000]! :p some other misc stuff

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3302 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-06-01 02:58:35 +00:00
parent 39b16ffafa
commit 7b43951b7e
6 changed files with 767 additions and 242 deletions

View File

@ -69,12 +69,14 @@ void CBoot::EmulatedBIOS(bool _bDebug)
Memory::Write_U32(0x4c000064, 0x80000800); // write default FPU Handler: rfi
Memory::Write_U32(0x4c000064, 0x80000C00); // write default Syscall Handler: rfi
Memory::Write_U32(0xc2339f3d, 0x8000001C); // game disc
Memory::Write_U32(0x0D15EA5E, 0x80000020); // funny magic word for normal boot
Memory::Write_U32(0x0D15EA5E, 0x80000020); // booted from bootrom. 0xE5207C22 = booted from jtag
Memory::Write_U32(0x01800000, 0x80000028); // Physical Memory Size
// On any of the production boards, ikaruga fails to read the memcard the first time. It succeeds on the second time though.
// And (only sometimes?) with 0x00000003, the loading picture in the bottom right will become corrupt and
// the emu will slow to 7mhz...I don't think it ever actually progresses
// This seems to be caused by the initialization of the memcard going amiss (remember, this uses a dsp program!)
// so, probably some fault with dsp timing/emulation in general (endless dsp interrupts...)
Memory::Write_U32(0x10000006, 0x8000002C); // Console type - DevKit (retail ID == 0x00000003) see yagcd 4.2.1.1.2
Memory::Write_U32(((1 & 0x3f) << 26) | 2, 0x81300000); // HLE OSReport for Apploader
@ -83,7 +85,7 @@ void CBoot::EmulatedBIOS(bool _bDebug)
// but it seems like the size can be variable. Compare with yagcd chap 13.
//
PowerPC::ppcState.gpr[1] = 0x816ffff0; // StackPointer
u32 iAppLoaderOffset = 0x2440; // 0x1c40 (what is 0x1c40?)
u32 iAppLoaderOffset = 0x2440; // 0x1c40 - 2MB lower...perhaps used on early GCMs? MYSTERY OLD COMMENT
u32 iAppLoaderEntry = VolumeHandler::Read32(iAppLoaderOffset + 0x10);
u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14);
if ((iAppLoaderEntry == (u32)-1) || (iAppLoaderSize == (u32)-1))

View File

@ -381,7 +381,6 @@ THREAD_RETURN EmuThread(void *pArg)
VideoInitialize.pSysMessage = Host_SysMessage;
VideoInitialize.pRequestWindowSize = NULL; //Callback_VideoRequestWindowSize;
VideoInitialize.pCopiedToXFB = Callback_VideoCopiedToXFB;
VideoInitialize.pVIRegs = VideoInterface::m_UVIUnknownRegs;
VideoInitialize.pPeekMessages = NULL;
VideoInitialize.pUpdateFPSDisplay = NULL;
VideoInitialize.pCPFifo = (SCPFifoStruct*)&CommandProcessor::fifo;

View File

@ -131,7 +131,7 @@ union USIPoll
unsigned EN2 : 1; // does not affect communication RAM transfers
unsigned EN1 : 1;
unsigned EN0 : 1;
unsigned Y : 10; // Polls per frame
unsigned Y : 8; // Polls per frame
unsigned X : 10; // Polls per X lines. begins at vsync, min 7, max depends on video mode
unsigned : 6;
};
@ -396,6 +396,10 @@ void Write32(const u32 _iValue, const u32 _iAddress)
case SI_CHANNEL_3_IN_LO: g_Channel[3].m_InLo.Hex = _iValue; break;
case SI_POLL:
DEBUG_LOG(SERIALINTERFACE, "Poll: X=%03d Y=%03d %s%s%s%s%s%s%s%s",
g_Poll.X, g_Poll.Y,
g_Poll.EN0 ? "EN0 ":" ", g_Poll.EN1 ? "EN1 ":" ", g_Poll.EN2 ? "EN2 ":" ", g_Poll.EN3 ? "EN3 ":" ",
g_Poll.VBCPY0 ? "VBCPY0 ":" ", g_Poll.VBCPY1 ? "VBCPY1 ":" ", g_Poll.VBCPY2 ? "VBCPY2 ":" ", g_Poll.VBCPY3 ? "VBCPY3 ":" ");
g_Poll.Hex = _iValue;
break;

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,10 @@ namespace VideoInterface
INT_REG_3,
};
// For BIOS HLE
void PreInit(bool _bNTSC);
void SetRegionReg(char _region);
void Init();
void DoState(PointerWrap &p);
@ -41,28 +45,20 @@ namespace VideoInterface
void GenerateVIInterrupt(VIInterruptType _VIInterrupt);
// returns a pointer to the current visible framebuffer
u8* GetFrameBufferPointer();
// returns a pointer to the current visible xfb
u8* GetXFBPointerTop();
u8* GetXFBPointerBottom();
// pre init
void PreInit(bool _bNTSC);
void SetRegionReg(char _region);
// VI Unknown Regs
extern u8 m_UVIUnknownRegs[0x1000];
// ??????
// Update and draw framebuffer(s)
void Update();
// UpdateInterrupts: check if we have to generate a new VI Interrupt
void UpdateInterrupts();
// ??????
// Change values pertaining to video mode
void UpdateTiming();
};
#endif
#endif // _VIDEOINTERFACE_H

View File

@ -69,7 +69,6 @@ typedef struct
TKeyPressed pKeyPress;
SCPFifoStruct *pCPFifo;
unsigned char *pVIRegs;
void *pMemoryBase;
bool bWii;
bool bUseDualCore;