From 4569a3697b4ae4a1164ce02240cae8fae10dcd9b Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 17 Dec 2014 10:50:20 +0000 Subject: [PATCH] psx - tidy and comments --- BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs | 7 +++++++ psx/octoshock/emuware/emuware.h | 2 +- psx/octoshock/psx/psx.cpp | 10 +++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index 63e8e02229..cb86eb7dd3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -3,6 +3,13 @@ //TODO Disc.Structure.Sessions[0].length_aba was 0 //TODO mednafen 0.9.37 changed some disc region detection heuristics. analyze and apply in c# side. also the SCEX id handling changed, maybe simplified +//TODO - ok, think about this. we MUST load a state with the CDC completely intact. no quickly changing discs. thats madness. +//well, I could savestate the disc index and validate the disc collection when loading a state. +//the big problem is, it's completely at odds with the slider-based disc changing model. +//but, maybe it can be reconciled with that model by using the disc ejection to our advantage. +//perhaps moving the slider is meaningless if the disc is ejected--it only affects what disc is inserted when the disc gets inserted!! yeah! this might could save us! +//not exactly user friendly but maybe we can build it from there with a custom UI.. a disk-changer? dunno if that would help + using System; using System.ComponentModel; using System.Runtime.InteropServices; diff --git a/psx/octoshock/emuware/emuware.h b/psx/octoshock/emuware/emuware.h index 4357bacffe..99b9d5a21b 100644 --- a/psx/octoshock/emuware/emuware.h +++ b/psx/octoshock/emuware/emuware.h @@ -4,7 +4,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _MSC_VER typedef __int64 s64; typedef __int32 s32; typedef __int16 s16; diff --git a/psx/octoshock/psx/psx.cpp b/psx/octoshock/psx/psx.cpp index 4ca95c5396..64b1036629 100644 --- a/psx/octoshock/psx/psx.cpp +++ b/psx/octoshock/psx/psx.cpp @@ -1362,6 +1362,11 @@ EW_EXPORT s32 shock_Step(void* psx, eShockStep step) s_FramebufferNormalized = false; s_FramebufferCurrent = 0; s_FramebufferCurrentWidth = FB_WIDTH; + + //just in case we debug printed or something like that + fflush(stdout); + fflush(stderr); + return SHOCK_OK; } @@ -2419,9 +2424,12 @@ SYNCFUNC(PSX) IRQ_SyncState(isReader,ns); ns->ExitSection("IRQ"); - //zero: this is probably OK if(isReader) { + //the purpose of this is to restore the sorting of the event list + //event updates are programmed to have no effect if the time step is 0 + //and at this point, the time base timestamp will be 0 (it always is after a frame advance) + //so the event updaters just run, do nothing, and restore themselves in the list ForceEventUpdates(0); // FIXME to work with debugger step mode. } }