mirror of
https://github.com/libretro/Mu.git
synced 2026-04-29 17:52:39 +00:00
Fix clearing the status register on debug read
This commit is contained in:
12
disassemblyNotes.txt
Normal file
12
disassemblyNotes.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
IVR = 0x18
|
||||
interrupt vector start = 0x60
|
||||
|
||||
vectors starting at level 0(no interrupt) to level 7
|
||||
0x00000060:0x00000000 (no interrupt, never called)
|
||||
0x00000064:0x101904BE
|
||||
0x00000068:0x101904EC
|
||||
0x0000006C:0x1019051A
|
||||
0x00000070:0x10190548 (level 4, hardware buttons)
|
||||
0x00000074:0x10190576 (level 5, seems to be touchscreen)
|
||||
0x00000078:0x101905A4
|
||||
0x0000007C:0x10015F34 (level 7, debugging IRQ, not used)
|
||||
@@ -213,6 +213,7 @@ QPixmap EmuWrapper::getFramebuffer(){
|
||||
}
|
||||
|
||||
uint64_t EmuWrapper::getEmulatorMemory(uint32_t address, uint8_t size){
|
||||
uint64_t data = UINT64_MAX;//invalid access
|
||||
//until SPI and UART destructive reads are implemented all reads to mapped addresses are safe, SPI is now implemented, this needs to be fixed
|
||||
if(bankType[START_BANK(address)] != CHIP_NONE){
|
||||
uint16_t m68kSr = m68k_get_reg(NULL, M68K_REG_SR);
|
||||
@@ -220,16 +221,19 @@ uint64_t EmuWrapper::getEmulatorMemory(uint32_t address, uint8_t size){
|
||||
switch(size){
|
||||
|
||||
case 8:
|
||||
return m68k_read_memory_8(address);
|
||||
data = m68k_read_memory_8(address);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
return m68k_read_memory_16(address);
|
||||
data = m68k_read_memory_16(address);
|
||||
break;
|
||||
|
||||
case 32:
|
||||
return m68k_read_memory_32(address);
|
||||
data = m68k_read_memory_32(address);
|
||||
break;
|
||||
}
|
||||
m68k_set_reg(M68K_REG_SR, m68kSr);
|
||||
}
|
||||
|
||||
return UINT64_MAX;//unsafe access
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "emulator.h"
|
||||
#include "portability.h"
|
||||
|
||||
|
||||
uint8_t ads7846InputBitsLeft;
|
||||
@@ -36,51 +37,51 @@ void ads7846SendBit(bool bit){
|
||||
|
||||
case 0x00:
|
||||
//temperature 1, unemulated for now
|
||||
value = 1;
|
||||
rangeMax = 1;
|
||||
value = 1;
|
||||
break;
|
||||
|
||||
case 0x10:
|
||||
//touchscreen y
|
||||
rangeMax = 160;
|
||||
if(palmInput.touchscreenTouched)
|
||||
value = palmInput.touchscreenY;
|
||||
else
|
||||
value = 160;
|
||||
rangeMax = 160;
|
||||
break;
|
||||
|
||||
case 0x20:
|
||||
//battery
|
||||
value = palmMisc.batteryLevel;
|
||||
rangeMax = 100;
|
||||
value = palmMisc.batteryLevel;
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
case 0x40:
|
||||
//empty slots
|
||||
value = 1;
|
||||
rangeMax = 1;
|
||||
value = 1;
|
||||
break;
|
||||
|
||||
case 0x50:
|
||||
//touchscreen x
|
||||
rangeMax = 160;
|
||||
if(palmInput.touchscreenTouched)
|
||||
value = palmInput.touchscreenX;
|
||||
else
|
||||
value = 160;
|
||||
rangeMax = 160;
|
||||
break;
|
||||
|
||||
case 0x60:
|
||||
//dock, unemulated for now
|
||||
value = 1;
|
||||
rangeMax = 1;
|
||||
value = 1;
|
||||
break;
|
||||
|
||||
case 0x70:
|
||||
//temperature 2, unemulated for now
|
||||
value = 1;
|
||||
rangeMax = 1;
|
||||
value = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -386,6 +386,9 @@ uint8_t getHwRegister8(uint32_t address){
|
||||
//LCD functions
|
||||
case LCKCON:
|
||||
|
||||
//interrupt vector start address
|
||||
case IVR:
|
||||
|
||||
//port d special functions
|
||||
case PDPOL:
|
||||
case PDIRQEN:
|
||||
|
||||
Reference in New Issue
Block a user