notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fbdev: make sure color format is set
[picodrive.git]
/
platform
/
uiq3
/
Engine.cpp
diff --git
a/platform/uiq3/Engine.cpp
b/platform/uiq3/Engine.cpp
index
ee9b6a5
..
adb32b4
100644
(file)
--- a/
platform/uiq3/Engine.cpp
+++ b/
platform/uiq3/Engine.cpp
@@
-23,7
+23,7
@@
#include <string.h>
\r
\r
#include "version.h"
\r
#include <string.h>
\r
\r
#include "version.h"
\r
-#include <
Pico/PicoI
nt.h>
\r
+#include <
pico/pico_i
nt.h>
\r
#include "../common/emu.h"
\r
#include "engine/debug.h"
\r
#include "App.h"
\r
#include "../common/emu.h"
\r
#include "engine/debug.h"
\r
#include "App.h"
\r
@@
-37,7
+37,6
@@
extern const char *actionNames[];
RSemaphore initSemaphore;
\r
RSemaphore pauseSemaphore;
\r
RSemaphore loadWaitSemaphore;
\r
RSemaphore initSemaphore;
\r
RSemaphore pauseSemaphore;
\r
RSemaphore loadWaitSemaphore;
\r
-int pico_was_reset = 0;
\r
static CPicolAppView *appView = 0;
\r
\r
\r
static CPicolAppView *appView = 0;
\r
\r
\r
@@
-47,11
+46,11
@@
TInt CPicoGameSession::Do(const TPicoServRqst what, TAny *param)
{
\r
case PicoMsgLoadState:
\r
if(!rom_loaded) return -1; // no ROM
\r
{
\r
case PicoMsgLoadState:
\r
if(!rom_loaded) return -1; // no ROM
\r
- return emu_
SaveLoadG
ame(1, 0);
\r
+ return emu_
save_load_g
ame(1, 0);
\r
\r
case PicoMsgSaveState:
\r
if(!rom_loaded) return -1;
\r
\r
case PicoMsgSaveState:
\r
if(!rom_loaded) return -1;
\r
- return emu_
SaveLoadG
ame(0, 0);
\r
+ return emu_
save_load_g
ame(0, 0);
\r
\r
case PicoMsgLoadROM:
\r
return loadROM((TPtrC16 *)param);
\r
\r
case PicoMsgLoadROM:
\r
return loadROM((TPtrC16 *)param);
\r
@@
-65,9
+64,7
@@
TInt CPicoGameSession::Do(const TPicoServRqst what, TAny *param)
\r
case PicoMsgReset:
\r
if(rom_loaded) {
\r
\r
case PicoMsgReset:
\r
if(rom_loaded) {
\r
- PicoReset();
\r
- pico_was_reset = 1;
\r
- return ChangeRunState(PGS_Running);
\r
+ return ChangeRunState(PGS_Reset);
\r
}
\r
return 1;
\r
\r
}
\r
return 1;
\r
\r
@@
-182,15
+179,16
@@
TInt CPicoGameSession::loadROM(TPtrC16 *pptr)
// If successful, in will enter PGS_Running state by itself.
\r
loadrom_fname = (char *)writeBuf.PtrZ();
\r
loadrom_result = 0;
\r
// If successful, in will enter PGS_Running state by itself.
\r
loadrom_fname = (char *)writeBuf.PtrZ();
\r
loadrom_result = 0;
\r
+ loadWaitSemaphore.Wait(1); // make sure sem is not set
\r
ret = ChangeRunState(PGS_ReloadRom);
\r
if(ret) return ret;
\r
\r
ret = ChangeRunState(PGS_ReloadRom);
\r
if(ret) return ret;
\r
\r
- loadWaitSemaphore.Wait(
2
0*1000*1000);
\r
+ loadWaitSemaphore.Wait(
6
0*1000*1000);
\r
\r
if (loadrom_result == 0)
\r
\r
if (loadrom_result == 0)
\r
- return PicoErr
NotRom
;
\r
+ return PicoErr
RomOpenFailed
;
\r
\r
\r
- emu_get
GameN
ame(buff);
\r
+ emu_get
_game_n
ame(buff);
\r
TPtrC8 buff8((TUint8*) buff);
\r
iRomInternalName.Copy(buff8);
\r
\r
TPtrC8 buff8((TUint8*) buff);
\r
iRomInternalName.Copy(buff8);
\r
\r
@@
-198,11
+196,9
@@
TInt CPicoGameSession::loadROM(TPtrC16 *pptr)
\r
// debug
\r
#ifdef __DEBUG_PRINT
\r
\r
// debug
\r
#ifdef __DEBUG_PRINT
\r
- TInt cells = User::CountAllocCells();
\r
- TInt mem;
\r
+ TInt mem, cells = User::CountAllocCells();
\r
User::AllocSize(mem);
\r
DEBUGPRINT(_L("comm: cels=%d, size=%d KB"), cells, mem/1024);
\r
User::AllocSize(mem);
\r
DEBUGPRINT(_L("comm: cels=%d, size=%d KB"), cells, mem/1024);
\r
- ChangeRunState(PGS_DebugHeap, PGS_Running);
\r
#endif
\r
\r
return 0;
\r
#endif
\r
\r
return 0;
\r