mirror of
https://github.com/libretro/beetle-pce-fast-libretro.git
synced 2024-11-23 07:50:03 +00:00
(PSX) sane framebuffer sizes + other changes
This commit is contained in:
parent
d93af13d51
commit
1e8a31ae51
@ -41,7 +41,7 @@ static Deinterlacer deint;
|
||||
#define MEDNAFEN_CORE_GEOMETRY_MAX_W 640
|
||||
#define MEDNAFEN_CORE_GEOMETRY_MAX_H 480
|
||||
#define MEDNAFEN_CORE_GEOMETRY_ASPECT_RATIO (4.0 / 3.0)
|
||||
#define FB_WIDTH 680
|
||||
#define FB_WIDTH 640
|
||||
#define FB_HEIGHT 576
|
||||
|
||||
#elif defined(WANT_PCE_FAST_EMU)
|
||||
|
@ -211,8 +211,6 @@ void FrontIO::SetAMCT(bool enabled)
|
||||
|
||||
void FrontIO::SetCrosshairsColor(unsigned port, uint32 color)
|
||||
{
|
||||
assert(port >= 0 && port < 8);
|
||||
|
||||
chair_colors[port] = color;
|
||||
Devices[port]->SetCrosshairsColor(color);
|
||||
}
|
||||
@ -327,8 +325,6 @@ INLINE void FrontIO::DoDSRIRQ(void)
|
||||
|
||||
void FrontIO::Write(pscpu_timestamp_t timestamp, uint32 A, uint32 V)
|
||||
{
|
||||
assert(!(A & 0x1));
|
||||
|
||||
//PSX_FIODBGINFO("[FIO] Write: %08x %08x", A, V);
|
||||
|
||||
Update(timestamp);
|
||||
@ -430,8 +426,6 @@ uint32 FrontIO::Read(pscpu_timestamp_t timestamp, uint32 A)
|
||||
{
|
||||
uint32 ret = 0;
|
||||
|
||||
assert(!(A & 0x1));
|
||||
|
||||
Update(timestamp);
|
||||
|
||||
switch(A & 0xF)
|
||||
@ -710,15 +704,11 @@ void FrontIO::SetInput(unsigned int port, const char *type, void *ptr)
|
||||
|
||||
uint64 FrontIO::GetMemcardDirtyCount(unsigned int which)
|
||||
{
|
||||
assert(which < 8);
|
||||
|
||||
return(DevicesMC[which]->GetNVDirtyCount());
|
||||
}
|
||||
|
||||
void FrontIO::LoadMemcard(unsigned int which, const char *path)
|
||||
{
|
||||
assert(which < 8);
|
||||
|
||||
try
|
||||
{
|
||||
if(DevicesMC[which]->GetNVSize())
|
||||
@ -746,8 +736,6 @@ void FrontIO::LoadMemcard(unsigned int which, const char *path)
|
||||
|
||||
void FrontIO::SaveMemcard(unsigned int which, const char *path)
|
||||
{
|
||||
assert(which < 8);
|
||||
|
||||
if(DevicesMC[which]->GetNVSize() && DevicesMC[which]->GetNVDirtyCount())
|
||||
{
|
||||
FileWrapper mf(path, FileWrapper::MODE_WRITE); // TODO: MODE_WRITE_ATOMIC_OVERWRITE
|
||||
|
@ -154,7 +154,6 @@ static void RebaseTS(const pscpu_timestamp_t timestamp)
|
||||
if(i == PSX_EVENT__SYNFIRST || i == PSX_EVENT__SYNLAST)
|
||||
continue;
|
||||
|
||||
assert(events[i].event_time > timestamp);
|
||||
events[i].event_time -= timestamp;
|
||||
}
|
||||
|
||||
@ -163,7 +162,6 @@ static void RebaseTS(const pscpu_timestamp_t timestamp)
|
||||
|
||||
void PSX_SetEventNT(const int type, const pscpu_timestamp_t next_timestamp)
|
||||
{
|
||||
assert(type > PSX_EVENT__SYNFIRST && type < PSX_EVENT__SYNLAST);
|
||||
event_list_entry *e = &events[type];
|
||||
|
||||
if(next_timestamp < e->event_time)
|
||||
@ -970,16 +968,11 @@ static void Emulate(EmulateSpecStruct *espec)
|
||||
{
|
||||
pscpu_timestamp_t timestamp = 0;
|
||||
|
||||
if(FIO->RequireNoFrameskip())
|
||||
{
|
||||
//puts("MEOW");
|
||||
espec->skip = false; //TODO: Save here, and restore at end of Emulate() ?
|
||||
}
|
||||
|
||||
MDFNGameInfo->mouse_sensitivity = MDFN_GetSettingF("psx.input.mouse_sensitivity");
|
||||
|
||||
#ifdef WANT_CHEATS
|
||||
MDFNMP_ApplyPeriodicCheats();
|
||||
|
||||
#endif
|
||||
|
||||
espec->MasterCycles = 0;
|
||||
espec->SoundBufSize = 0;
|
||||
@ -991,15 +984,7 @@ static void Emulate(EmulateSpecStruct *espec)
|
||||
Running = -1;
|
||||
timestamp = CPU->Run(timestamp, false);
|
||||
|
||||
assert(timestamp);
|
||||
|
||||
ForceEventUpdates(timestamp);
|
||||
#if 0
|
||||
if(GPU->GetScanlineNum() < 100)
|
||||
printf("[BUUUUUUUG] Frame timing end glitch; scanline=%u, st=%u\n", GPU->GetScanlineNum(), timestamp);
|
||||
#endif
|
||||
|
||||
//printf("scanline=%u, st=%u\n", GPU->GetScanlineNum(), timestamp);
|
||||
|
||||
espec->SoundBufSize = SPU->EndFrame(espec->SoundBuf);
|
||||
|
||||
@ -1029,25 +1014,11 @@ static void Emulate(EmulateSpecStruct *espec)
|
||||
Memcard_SaveDelay[i] += timestamp;
|
||||
if(Memcard_SaveDelay[i] >= (33868800 * 2)) // Wait until about 2 seconds of no new writes.
|
||||
{
|
||||
//fprintf(stderr, "Saving memcard %d...\n", i);
|
||||
/*
|
||||
try
|
||||
{
|
||||
*/
|
||||
char ext[64];
|
||||
trio_snprintf(ext, sizeof(ext), "%d.mcr", i);
|
||||
snprintf(ext, sizeof(ext), "%d.mcr", i);
|
||||
FIO->SaveMemcard(i, MDFN_MakeFName(MDFNMKF_SAV, 0, ext).c_str());
|
||||
Memcard_SaveDelay[i] = -1;
|
||||
Memcard_PrevDC[i] = 0;
|
||||
/*
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
MDFN_PrintError("Memcard %d save error: %s", i, e.what());
|
||||
MDFN_DispMessage("Memcard %d save error: %s", i, e.what());
|
||||
}
|
||||
//MDFN_DispMessage("Memcard %d saved.", i);
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1116,7 +1087,6 @@ static const char *CalcDiscSCEx_BySYSTEMCNF(CDIF *c, unsigned *rr)
|
||||
|
||||
//if(toc.first_track > 1 || toc.
|
||||
|
||||
try
|
||||
{
|
||||
uint8 pvd[2048];
|
||||
unsigned pvd_search_count = 0;
|
||||
@ -1219,14 +1189,6 @@ static const char *CalcDiscSCEx_BySYSTEMCNF(CDIF *c, unsigned *rr)
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
//puts(e.what());
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Breakout:
|
||||
if(fp != NULL)
|
||||
@ -1379,18 +1341,18 @@ static bool InitCommon(std::vector<CDIF *> *CDInterfaces, const bool EmulateMemc
|
||||
EmulatedPSX.nominal_width = 367; // Dunno. :(
|
||||
EmulatedPSX.nominal_height = 288;
|
||||
|
||||
EmulatedPSX.fb_width = 768;
|
||||
EmulatedPSX.fb_width = 640;
|
||||
EmulatedPSX.fb_height = 576;
|
||||
}
|
||||
else
|
||||
{
|
||||
EmulatedPSX.lcm_width = 2720;
|
||||
EmulatedPSX.lcm_width = 640;
|
||||
EmulatedPSX.lcm_height = 480;
|
||||
|
||||
EmulatedPSX.nominal_width = 310;
|
||||
EmulatedPSX.nominal_width = 320;
|
||||
EmulatedPSX.nominal_height = 240;
|
||||
|
||||
EmulatedPSX.fb_width = 768;
|
||||
EmulatedPSX.fb_width = 640;
|
||||
EmulatedPSX.fb_height = 480;
|
||||
}
|
||||
|
||||
@ -1662,16 +1624,7 @@ static int Load(const char *name, MDFNFILE *fp)
|
||||
|
||||
TextMem.resize(0);
|
||||
|
||||
try
|
||||
{
|
||||
LoadEXE(fp->data, fp->size);
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
MDFND_PrintError(e.what());
|
||||
Cleanup();
|
||||
return 0;
|
||||
}
|
||||
LoadEXE(fp->data, fp->size);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user