mirror of
https://github.com/libretro/Mu.git
synced 2026-09-23 07:05:37 +00:00
Fix cutting off the 6MB of ROM at the end and SIGSEGV on reset
This commit is contained in:
@@ -67,7 +67,7 @@ translation_next_enter:
|
||||
ldr w23, [x23]
|
||||
cbnz w23, save_return // if(cpu_events) goto save_return;
|
||||
|
||||
mov x21, #65*1024*1024
|
||||
mov x21, #80*1024*1024
|
||||
ldr w21, [x0, x21] // w21 = RAM_FLAGS(x0)
|
||||
tbz w21, #5, save_return // if((RAM_FLAGS(x0) & RF_CODE_TRANSLATED) == 0) goto save_return;
|
||||
lsr w21, w21, #9 // w21 = w21 >> RFS_TRANSLATION_INDEX
|
||||
|
||||
@@ -91,7 +91,7 @@ translation_enter: .global translation_enter
|
||||
|
||||
mov r0, r4
|
||||
|
||||
add r1, r0, #65*1024*1024 // r1 = &(RAM_FLAGS(r0))
|
||||
add r1, r0, #80*1024*1024 // r1 = &(RAM_FLAGS(r0))
|
||||
ldr r1, [r1]
|
||||
|
||||
loadsym r10, arm // r10 is a pointer to the global arm_state
|
||||
@@ -111,7 +111,7 @@ translation_next: .global translation_next
|
||||
beq save_return
|
||||
|
||||
translation_jmp_ptr: .global translation_jmp_ptr
|
||||
add r1, r0, #65*1024*1024 // r1 = &(RAM_FLAGS(r0))
|
||||
add r1, r0, #80*1024*1024 // r1 = &(RAM_FLAGS(r0))
|
||||
ldr r1, [r1]
|
||||
tst r1, #RF_CODE_TRANSLATED
|
||||
beq save_return // not translated
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define TRANS_JUMP_TABLE 4
|
||||
#define TRANS_END_PTR 12
|
||||
|
||||
#define RAM_FLAGS (70*1024*1024) // = MEM_MAXSIZE
|
||||
#define RAM_FLAGS (80*1024*1024) // = MEM_MAXSIZE
|
||||
#define RF_READ_BREAKPOINT 1
|
||||
#define RF_WRITE_BREAKPOINT 2
|
||||
#define RF_EXEC_BREAKPOINT 4
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define TRANS_END_PTR 0x18
|
||||
|
||||
// RAM_FLAGS used to have "// = MEM_MAXSIZE" at the end but the clang assembler copys the "//" into the macro, commenting out the arguments of the opcodes that use it
|
||||
#define RAM_FLAGS (70*1024*1024)
|
||||
#define RAM_FLAGS (80*1024*1024)
|
||||
#define RF_READ_BREAKPOINT 1
|
||||
#define RF_WRITE_BREAKPOINT 2
|
||||
#define RF_EXEC_BREAKPOINT 4
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MEM_MAXSIZE (70*1024*1024) // also defined as RAM_FLAGS in asmcode.S
|
||||
#define MEM_MAXSIZE (80*1024*1024) // also defined as RAM_FLAGS in asmcode.S
|
||||
|
||||
extern uint8_t (*read_byte_map[64])(uint32_t addr);
|
||||
extern uint16_t (*read_half_map[64])(uint32_t addr);
|
||||
|
||||
@@ -131,6 +131,7 @@ uint32_t emulatorInit(uint8_t* palmRomData, uint32_t palmRomSize, uint8_t* palmB
|
||||
palmFramebufferHeight = 480;
|
||||
palmMisc.batteryLevel = 100;
|
||||
palmCycleCounter = 0.0;
|
||||
palmClockMultiplier = 1.00 - TUNGSTEN_T3_CPU_PERCENT_WAITING;
|
||||
|
||||
//initialize components, I dont think theres much in a Tungsten T3
|
||||
pxa260Framebuffer = palmFramebuffer;
|
||||
@@ -179,6 +180,7 @@ uint32_t emulatorInit(uint8_t* palmRomData, uint32_t palmRomSize, uint8_t* palmB
|
||||
palmFramebufferHeight = 220;
|
||||
palmMisc.batteryLevel = 100;
|
||||
palmCycleCounter = 0.0;
|
||||
palmClockMultiplier = 1.00 - DBVZ_CPU_PERCENT_WAITING;
|
||||
sed1376Framebuffer = palmFramebuffer;
|
||||
|
||||
//initialize components
|
||||
@@ -244,7 +246,6 @@ void emulatorSoftReset(void){
|
||||
//equivalent to pushing the reset button on the back of the device
|
||||
#if defined(EMU_SUPPORT_PALM_OS5)
|
||||
if(palmEmulatingTungstenT3){
|
||||
palmClockMultiplier = 1.00 - TUNGSTEN_T3_CPU_PERCENT_WAITING;
|
||||
pxa260Reset();
|
||||
tps65010Reset();
|
||||
tsc2101Reset(true);
|
||||
@@ -253,7 +254,6 @@ void emulatorSoftReset(void){
|
||||
}
|
||||
else{
|
||||
#endif
|
||||
palmClockMultiplier = 1.00 - DBVZ_CPU_PERCENT_WAITING;
|
||||
sed1376Reset();
|
||||
ads7846Reset();
|
||||
pdiUsbD12Reset();
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "../armv5te/cpu.h"
|
||||
#include "../armv5te/emu.h"
|
||||
#include "../armv5te/mem.h"
|
||||
#include "../armv5te/mmu.h"
|
||||
#include "../armv5te/os/os.h"
|
||||
#include "../armv5te/translate.h"
|
||||
#include "../tungstenT3Bus.h"
|
||||
@@ -197,6 +198,7 @@ void pxa260Reset(void){
|
||||
cycle_count_delta = 0;
|
||||
cpu_events = 0;
|
||||
//cpu_events &= EVENT_DEBUG_STEP;
|
||||
addr_cache_flush();//SIGSEGVs on reset without this because the MMU needs to be turned off
|
||||
|
||||
//PC starts at 0x00000000, the first opcode for Palm OS 5 is a jump
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define TUNGSTEN_T3_W86L488_START_ADDRESS 0x08000000
|
||||
#define PXA260_PCMCIA0_START_ADDRESS 0x20000000
|
||||
#define PXA260_PCMCIA1_START_ADDRESS 0x30000000
|
||||
#define TUNGSTEN_T3_ROM_SIZE (10 * 0x100000)//10mb ROM
|
||||
#define TUNGSTEN_T3_ROM_SIZE (16 * 0x100000)//16mb ROM
|
||||
#define TUNGSTEN_T3_RAM_SIZE (64 * 0x100000)//64mb RAM
|
||||
#define TUNGSTEN_T3_W86L488_SIZE 0x04000000
|
||||
#define PXA260_PCMCIA0_SIZE 0x10000000
|
||||
|
||||
Reference in New Issue
Block a user