Misc cleanups

This commit is contained in:
meepingsnesroms
2018-10-05 20:03:31 -07:00
parent 71be0617c8
commit 6847540583
5 changed files with 27 additions and 3 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -0,0 +1,13 @@
#ifndef ARBITRARY_MEMORY_ACCESS_HEADER
#define ARBITRARY_MEMORY_ACCESS_HEADER
#include <stdint.h>
#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

View File

@@ -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;
}

View File

@@ -0,0 +1 @@
/Users/Hoppy/Desktop/projects/PalmEmuRedo/libretro-palmm515emu/specifications