diff --git a/src/debug/sandbox.c b/src/debug/sandbox.c index fb0757a..696d9b9 100644 --- a/src/debug/sandbox.c +++ b/src/debug/sandbox.c @@ -403,7 +403,7 @@ static bool installResourceToDevice(buffer_t resourceBuffer){ error = callFunction(false, 0x00000000, DmCreateDatabaseFromImage, "w(p)", palmSideResourceData);//Err DmCreateDatabaseFromImage(MemPtr bufferP);//this looks best callFunction(false, 0x00000000, MemChunkFree, "w(p)", palmSideResourceData); - //dident install + //didnt install if(error != 0) return false; diff --git a/src/hardwareRegisters.c b/src/hardwareRegisters.c index 3df8712..f2a8e4c 100644 --- a/src/hardwareRegisters.c +++ b/src/hardwareRegisters.c @@ -4,6 +4,7 @@ #include "emulator.h" #include "specs/hardwareRegisterNames.h" +#include "specs/emuFeatureRegistersSpec.h" #include "hardwareRegisters.h" #include "memoryAccess.h" #include "m68328.h" @@ -1114,7 +1115,7 @@ void resetHwRegisters(){ registerArrayWrite8(SCR, 0x1C); //CPU ID - registerArrayWrite32(IDR, 0x56010000);//value of IDR in POSE + registerArrayWrite32(IDR, 0x57000000);//value of IDR on actual hardware //I/O drive control //probably unused registerArrayWrite16(IODCR, 0x1FFF); diff --git a/tools/palm/muExpansionDriver/arbitraryMemoryAccess.h b/tools/palm/muExpansionDriver/arbitraryMemoryAccess.h new file mode 100644 index 0000000..8cdcf9c --- /dev/null +++ b/tools/palm/muExpansionDriver/arbitraryMemoryAccess.h @@ -0,0 +1,13 @@ +#ifndef ARBITRARY_MEMORY_ACCESS_HEADER +#define ARBITRARY_MEMORY_ACCESS_HEADER + +#include + +#define readArbitraryMemory8(address) (*((volatile uint8_t*)(address))) +#define readArbitraryMemory16(address) (*((volatile uint16_t*)(address))) +#define readArbitraryMemory32(address) (*((volatile uint32_t*)(address))) +#define writeArbitraryMemory8(address, value) (*((volatile uint8_t*)(address)) = (value)) +#define writeArbitraryMemory16(address, value) (*((volatile uint16_t*)(address)) = (value)) +#define writeArbitraryMemory32(address, value) (*((volatile uint32_t*)(address)) = (value)) + +#endif diff --git a/tools/palm/muExpansionDriver/muExpDriver.c b/tools/palm/muExpansionDriver/muExpDriver.c index 17fde74..da1d153 100644 --- a/tools/palm/muExpansionDriver/muExpDriver.c +++ b/tools/palm/muExpansionDriver/muExpDriver.c @@ -14,11 +14,20 @@ void showGui(){ } +Boolean isDeviceCompatible(){ + +} + +Boolean isEnabled(){ + /*create a 1 byte database or check for its existance*/ +} + DWord PilotMain(Word cmd, Ptr cmdBPB, Word launchFlags){ if(cmd == sysAppLaunchCmdNormalLaunch) showGui(); else if(cmd == sysAppLaunchCmdSystemReset) - installTrapHandlers(); + if(isDeviceCompatible()) + installTrapHandlers(); return 0; } diff --git a/tools/palm/muExpansionDriver/specs b/tools/palm/muExpansionDriver/specs new file mode 120000 index 0000000..3d183f0 --- /dev/null +++ b/tools/palm/muExpansionDriver/specs @@ -0,0 +1 @@ +/Users/Hoppy/Desktop/projects/PalmEmuRedo/libretro-palmm515emu/specifications \ No newline at end of file