mirror of https://github.com/PCSX2/pcsx2.git
Removed a VU0 memory allocation hack that wasn't needed anymore (real problem ended up being something else and I forgot to remove the hack later), and moved some header defines around to alleviate compilation woes.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@489 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
2d95e58bba
commit
243dcfedc8
|
@ -341,9 +341,6 @@ static __forceinline u8* dmaGetAddr(u32 mem)
|
|||
|
||||
#else
|
||||
|
||||
extern u8 *psS; //0.015 mb, scratch pad
|
||||
extern uptr *memLUTR;
|
||||
|
||||
|
||||
static __forceinline void *dmaGetAddr(u32 addr) {
|
||||
u8 *ptr;
|
||||
|
@ -356,7 +353,7 @@ static __forceinline void *dmaGetAddr(u32 addr) {
|
|||
|
||||
ptr = (u8*)vtlb_GetPhyPtr(addr&0x1FFFFFF0);
|
||||
if (ptr == NULL) {
|
||||
SysPrintf("*PCSX2*: DMA error: %8.8x\n", addr);
|
||||
Console::Error("*PCSX2*: DMA error: %8.8x", addr);
|
||||
return NULL;
|
||||
}
|
||||
return ptr;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Misc.h"
|
||||
#include "PsxCommon.h"
|
||||
#include "Mdec.h"
|
||||
|
||||
|
@ -405,10 +406,10 @@ void yuv2rgb24(int *blk,unsigned char *image) {
|
|||
}
|
||||
}
|
||||
|
||||
int mdecFreeze(gzFile f, int Mode) {
|
||||
gzfreeze(&mdec, sizeof(mdec));
|
||||
gzfreezel(iq_y);
|
||||
gzfreezel(iq_uv);
|
||||
int SaveState::mdecFreeze() {
|
||||
Freeze(mdec);
|
||||
Freeze(iq_y);
|
||||
Freeze(iq_uv);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -87,7 +87,6 @@ void CombinePaths( char* dest, const char* srcPath, const char* srcFile );
|
|||
// <<--- END Path Utilities [PathUtil.c]
|
||||
|
||||
#define PCSX2_GSMULTITHREAD 1 // uses multithreaded gs
|
||||
//#define PCSX2_DUALCORE 2 // speed up for dual cores
|
||||
#define PCSX2_FRAMELIMIT 4 // limits frames to normal speeds
|
||||
#define PCSX2_EEREC 0x10
|
||||
#define PCSX2_VU0REC 0x20
|
||||
|
@ -101,7 +100,6 @@ void CombinePaths( char* dest, const char* srcPath, const char* srcFile );
|
|||
#define PCSX2_FRAMELIMIT_VUSKIP 0xc00
|
||||
|
||||
#define CHECK_MULTIGS (Config.Options&PCSX2_GSMULTITHREAD)
|
||||
//#define CHECK_DUALCORE (Config.Options&PCSX2_DUALCORE)
|
||||
#define CHECK_EEREC (Config.Options&PCSX2_EEREC)
|
||||
#define CHECK_COP2REC (Config.Options&PCSX2_COP2REC) // goes with ee option
|
||||
//------------ SPEED/MISC HACKS!!! ---------------
|
||||
|
|
|
@ -50,12 +50,6 @@
|
|||
|
||||
#include "PS2Etypes.h"
|
||||
|
||||
#ifdef __LINUX__
|
||||
#define CALLBACK
|
||||
#else
|
||||
#define CALLBACK __stdcall
|
||||
#endif
|
||||
|
||||
|
||||
/* common defines */
|
||||
#ifndef C_ASSERT
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
#define ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
#ifdef __LINUX__
|
||||
#define CALLBACK
|
||||
#else
|
||||
#define CALLBACK __stdcall
|
||||
#endif
|
||||
|
||||
|
||||
// jASSUME - give hints to the optimizer
|
||||
// This is primarily useful for the default case switch optimizer, which enables VC to
|
||||
// generate more compact switches.
|
||||
|
|
|
@ -130,11 +130,10 @@ void vu0Shutdown()
|
|||
|
||||
#ifdef PCSX2_VIRTUAL_MEM
|
||||
if( !SysMapUserPhysicalPages(VU0.Mem, 16, NULL, 0) )
|
||||
SysPrintf("err releasing vu0 mem %d\n", GetLastError());
|
||||
Console::Error("Error releasing vu0 memory %d\n", GetLastError());
|
||||
|
||||
// note: this function *always* fails! (in XP at least)
|
||||
if( VirtualFree(VU0.Mem, 0, MEM_RELEASE) == 0 )
|
||||
SysPrintf("err freeing vu0 %d\n", GetLastError());
|
||||
Console::Error("Error freeing vu0 memory %d\n", GetLastError());
|
||||
#else
|
||||
safe_aligned_free(VU0.Mem);
|
||||
safe_aligned_free(VU0.Micro);
|
||||
|
|
|
@ -806,6 +806,8 @@ void RunGui() {
|
|||
void RunGuiAndReturn() {
|
||||
MSG msg;
|
||||
|
||||
SetFocus( gApp.hWnd );
|
||||
|
||||
m_ReturnToGame = false;
|
||||
while( !m_ReturnToGame ) {
|
||||
if(PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) {
|
||||
|
|
|
@ -338,17 +338,13 @@ void SuperVUInit(int vuindex)
|
|||
{
|
||||
if( vuindex < 0 ) {
|
||||
|
||||
// upper 4 bits cannot be nonzero!
|
||||
uptr baseaddr = 0x0c000000;
|
||||
while( baseaddr < 0x7a000000 && ( s_recVUMem == NULL || ((uptr)s_recVUMem > 0x80000000) ) )
|
||||
{
|
||||
s_recVUMem = (u8*)SysMmap( baseaddr, VU_EXESIZE);
|
||||
baseaddr += 0x100000;
|
||||
}
|
||||
// upper 4 bits cannot be nonzero! <-- double negatives are bad english
|
||||
// .. and how comes we only check for the uppermost bit (sign bit)... ?
|
||||
s_recVUMem = (u8*)SysMmap( 0x0c000000, VU_EXESIZE);
|
||||
|
||||
if( s_recVUMem == NULL || ((uptr)s_recVUMem > 0x80000000) )
|
||||
{
|
||||
Console::Error( "Error > SuperVU failed to allocate recompiler memory (addr: 0x%x)", (u32)s_recVUMem );
|
||||
Console::Error( "SuperVU Error > failed to allocate recompiler memory (addr: 0x%x)", (u32)s_recVUMem );
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue