diff --git a/qtBuildSystem/Mu/Mu.pro b/qtBuildSystem/Mu/Mu.pro index b6a94cc..9b0c214 100644 --- a/qtBuildSystem/Mu/Mu.pro +++ b/qtBuildSystem/Mu/Mu.pro @@ -17,14 +17,14 @@ TEMPLATE = app # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS -CONFIG(debug, debug|release){ - DEFINES += EMU_DEBUG EMU_OPCODE_LEVEL_DEBUG -} - # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +CONFIG(debug, debug|release){ + DEFINES += EMU_DEBUG EMU_OPCODE_LEVEL_DEBUG EMU_LOG_REGISTER_ACCESS_UNKNOWN EMU_LOG_APIS +} INCLUDEPATH += $$PWD/qt-common/include @@ -72,7 +72,8 @@ HEADERS += \ src/silkscreen.h \ mainwindow.h \ touchscreen.h \ - src/sed1376RegisterNames.h + src/sed1376RegisterNames.h \ + src/sed1376Accessors.ch FORMS += \ mainwindow.ui diff --git a/qtBuildSystem/Mu/Mu.pro.user b/qtBuildSystem/Mu/Mu.pro.user index 275999c..0ec7224 100644 --- a/qtBuildSystem/Mu/Mu.pro.user +++ b/qtBuildSystem/Mu/Mu.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/src/emulator.c b/src/emulator.c index e8fa5ab..29ecc06 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -57,7 +57,9 @@ static inline bool allSdCardCallbacksPresent(){ static bool invalidBehaviorAbort; static char disassemblyBuffer[LOGGED_OPCODES][100];//store the opcode and program counter for the last 10 opcodes +#if defined(EMU_LOG_APIS) const char* lookupTrap(uint16_t trap); +#endif static char* takeStackDump(uint32_t bytes){ char* textBytes = malloc(bytes * 2); @@ -74,6 +76,20 @@ static char* takeStackDump(uint32_t bytes){ return textBytes; } +#if defined(EMU_LOG_APIS) +static bool spammingTrap(uint16_t trap){ + switch(trap){ + + case 0xA249://sysTrapHwrDelay + return true; + + default: + return false; + } + return false; +} +#endif + static void invalidBehaviorCheck(){ char opcodeName[100]; uint32_t lastProgramCounter = m68k_get_reg(NULL, M68K_REG_PPC); @@ -129,11 +145,15 @@ static void invalidBehaviorCheck(){ break; } +#if defined(EMU_LOG_APIS) if(instruction == 0x4E4F){ //Trap F/api call uint16_t trap = m68k_read_memory_16(lastProgramCounter + 2); - debugLog("Trap F API:%s, API number:0x%04X, PC:0x%08X\n", lookupTrap(trap), trap, lastProgramCounter); + if(!spammingTrap(trap)){ + debugLog("Trap F API:%s, API number:0x%04X, PC:0x%08X\n", lookupTrap(trap), trap, lastProgramCounter); + } } +#endif } #endif @@ -204,15 +224,6 @@ void emulatorInit(uint8_t* palmRomDump, uint8_t* palmBootDump, uint32_t specialF //start running m68k_pulse_reset(); - - /* - double test = 342553325.13436322; - uint64_t fixed3232 = getUint64FromDouble(test); - double rebuilt = getDoubleFromUint64(fixed3232); - debugLog("Original double:%f\n", test); - debugLog("Fixed 32.32:0x%08lX\n", fixed3232); - debugLog("Rebuilt double:%f\n", rebuilt); - */ } void emulatorExit(){ @@ -254,7 +265,7 @@ uint32_t emulatorGetStateSize(){ size += RAM_SIZE;//system RAM buffer size += REG_SIZE;//hardware registers size += SED1376_FB_SIZE;//SED1376 - size += SED1376_LUT_SIZE;//SED1376 + size += SED1376_LUT_SIZE * 3;//SED1376 r, g and b luts size += SED1376_REG_SIZE;//SED1376 size += TOTAL_MEMORY_BANKS;//bank handlers size += sizeof(uint32_t) * 4 * CHIP_END;//chip select states @@ -292,12 +303,6 @@ void emulatorSaveState(uint8_t* data){ offset += REG_SIZE; memcpy(data + offset, bankType, TOTAL_MEMORY_BANKS); offset += TOTAL_MEMORY_BANKS; - memcpy(data + offset, sed1376Registers, SED1376_REG_SIZE); - offset += SED1376_REG_SIZE; - memcpy(data + offset, sed1376Lut, SED1376_LUT_SIZE); - offset += SED1376_LUT_SIZE; - memcpy(data + offset, sed1376Framebuffer, SED1376_FB_SIZE); - offset += SED1376_FB_SIZE; for(uint32_t chip = CHIP_BEGIN; chip < CHIP_END; chip++){ writeStateValueBool(data + offset, chips[chip].enable); offset += sizeof(uint8_t); @@ -319,6 +324,18 @@ void emulatorSaveState(uint8_t* data){ offset += sizeof(uint32_t); } + //SED1376 + memcpy(data + offset, sed1376Registers, SED1376_REG_SIZE); + offset += SED1376_REG_SIZE; + memcpy(data + offset, sed1376RLut, SED1376_LUT_SIZE); + offset += SED1376_LUT_SIZE; + memcpy(data + offset, sed1376GLut, SED1376_LUT_SIZE); + offset += SED1376_LUT_SIZE; + memcpy(data + offset, sed1376BLut, SED1376_LUT_SIZE); + offset += SED1376_LUT_SIZE; + memcpy(data + offset, sed1376Framebuffer, SED1376_FB_SIZE); + offset += SED1376_FB_SIZE; + //sdcard //update sdcard struct and save sdcard data if(allSdCardCallbacksPresent() && palmSdCard.type != CARD_NONE){ @@ -395,12 +412,6 @@ void emulatorLoadState(uint8_t* data){ offset += REG_SIZE; memcpy(bankType, data + offset, TOTAL_MEMORY_BANKS); offset += TOTAL_MEMORY_BANKS; - memcpy(sed1376Registers, data + offset, SED1376_REG_SIZE); - offset += SED1376_REG_SIZE; - memcpy(sed1376Lut, data + offset, SED1376_LUT_SIZE); - offset += SED1376_LUT_SIZE; - memcpy(sed1376Framebuffer, data + offset, SED1376_FB_SIZE); - offset += SED1376_FB_SIZE; for(uint32_t chip = CHIP_BEGIN; chip < CHIP_END; chip++){ chips[chip].enable = readStateValueBool(data + offset); offset += sizeof(uint8_t); @@ -422,6 +433,19 @@ void emulatorLoadState(uint8_t* data){ offset += sizeof(uint32_t); } + //SED1376 + memcpy(sed1376Registers, data + offset, SED1376_REG_SIZE); + offset += SED1376_REG_SIZE; + memcpy(sed1376RLut, data + offset, SED1376_LUT_SIZE); + offset += SED1376_LUT_SIZE; + memcpy(sed1376GLut, data + offset, SED1376_LUT_SIZE); + offset += SED1376_LUT_SIZE; + memcpy(sed1376BLut, data + offset, SED1376_LUT_SIZE); + offset += SED1376_LUT_SIZE; + memcpy(sed1376Framebuffer, data + offset, SED1376_FB_SIZE); + offset += SED1376_FB_SIZE; + sed1376RefreshLut(); + //sdcard palmSdCard.sessionId = readStateValueUint64(data + offset); offset += sizeof(uint64_t); diff --git a/src/emulator.h b/src/emulator.h index cbd5d63..1344ed3 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -18,6 +18,7 @@ extern "C" { //to enable opcode level debugging define EMU_OPCODE_LEVEL_DEBUG //to log unknown register reads and writes define EMU_LOG_REGISTER_ACCESS_UNKNOWN //to log all register reads and writes define EMU_LOG_REGISTER_ACCESS_ALL +//to log all api calls define EMU_LOG_APIS //debug #if defined(EMU_DEBUG) diff --git a/src/hardwareRegisters.c b/src/hardwareRegisters.c index 77b046a..4260d68 100644 --- a/src/hardwareRegisters.c +++ b/src/hardwareRegisters.c @@ -199,10 +199,10 @@ static inline void setCsctrl1(uint16_t value){ void printUnknownHwAccess(unsigned int address, unsigned int value, unsigned int size, bool isWrite){ if(isWrite){ - debugLog("CPU Wrote %d bits of 0x%08X to register 0x%04X, PC 0x%08X.\n", size, value, address, m68k_get_reg(NULL, M68K_REG_PC)); + debugLog("CPU wrote %d bits of 0x%08X to register 0x%04X, PC 0x%08X.\n", size, value, address, m68k_get_reg(NULL, M68K_REG_PC)); } else{ - debugLog("CPU Read %d bits from register 0x%04X, PC 0x%08X.\n", size, address, m68k_get_reg(NULL, M68K_REG_PC)); + debugLog("CPU read %d bits from register 0x%04X, PC 0x%08X.\n", size, address, m68k_get_reg(NULL, M68K_REG_PC)); } } @@ -883,7 +883,7 @@ unsigned int getHwRegister8(unsigned int address){ case PKDATA: return getPortKValue(); - //i/o direction + //I/O direction case PDDIR: case PKDIR: @@ -1366,7 +1366,7 @@ void resetHwRegisters(){ //CPU id registerArrayWrite32(IDR, 0x56000000); - //i/o drive control //probably unused + //I/O drive control //probably unused registerArrayWrite16(IODCR, 0x1FFF); //chip selects @@ -1434,7 +1434,7 @@ void resetHwRegisters(){ registerArrayWrite16(TCMP1, 0xFFFF); registerArrayWrite16(TCMP2, 0xFFFF); - //serial i/o + //serial I/O registerArrayWrite16(UBAUD1, 0x0002); registerArrayWrite16(UBAUD2, 0x0002); registerArrayWrite16(HMARK, 0x0102); @@ -1459,7 +1459,7 @@ void resetHwRegisters(){ //SDRAM control, unused since RAM refresh is unemulated registerArrayWrite16(SDCTRL, 0x003C); - //add register settings to misc i/o + //add register settings to misc I/O updateAlarmLedStatus(); updateLcdStatus(); updateBacklightStatus(); diff --git a/src/sed1376.c b/src/sed1376.c index 7f727ec..2db103b 100644 --- a/src/sed1376.c +++ b/src/sed1376.c @@ -23,22 +23,53 @@ uint8_t sed1376Registers[SED1376_REG_SIZE]; -uint16_t sed1376Lut[SED1376_LUT_SIZE]; +uint8_t sed1376RLut[SED1376_LUT_SIZE]; +uint8_t sed1376GLut[SED1376_LUT_SIZE]; +uint8_t sed1376BLut[SED1376_LUT_SIZE]; uint8_t sed1376Framebuffer[SED1376_FB_SIZE]; +static uint16_t sed1376OutputLut[SED1376_LUT_SIZE];//used to speed up pixel conversion -static inline uint16_t makeRgb16FromRgb666(uint8_t r, uint8_t g, uint8_t b){ - uint16_t color = r << 10 & 0xF800; - color |= g << 5 & 0x07E0; - color |= b >> 1 & 0x008F; - return color; -} +#include "sed1376Accessors.ch" -static inline void makeRgb666FromRgb16(uint16_t color, uint8_t* r, uint8_t* g, uint8_t* b){ - *r = color >> 10 & 0x3E; - *g = color >> 5 & 0x3F; - *b = color << 1 & 0x3E; +/* +static inline uint32_t getBufferStartAddress(){ + uint32_t screenStartAddress = sed1376Registers[DISP_ADDR_2] << 16 | sed1376Registers[DISP_ADDR_1] << 8 | sed1376Registers[DISP_ADDR_0]; + switch(sed1376Registers[SPECIAL_EFFECT] & 0x03){ + + case 0x00: + //0 degrees + //desired byte address / 4. + screenStartAddress *= 4; + break; + + case 0x01: + //90 degrees + //((desired byte address + (panel height * bpp / 8)) / 4) - 1. + screenStartAddress += 1; + screenStartAddress *= 4; + //screenStartAddress - (panelHeight * bpp / 8); + break; + + case 0x02: + //180 degrees + //((desired byte address + (panel width * panel height * bpp / 8)) / 4) - 1. + screenStartAddress += 1; + screenStartAddress *= 4; + //screenStartAddress - (panelWidth * panelHeight * bpp / 8); + break; + + case 0x03: + //270 degrees + //(desired byte address + ((panel width - 1) * panel height * bpp / 8)) / 4. + screenStartAddress *= 4; + //screenStartAddress -= ((panelWidth - 1) * panelHeight * bpp / 8); + break; + } + + return screenStartAddress; } +*/ bool sed1376PowerSaveEnabled(){ @@ -49,10 +80,15 @@ unsigned int sed1376GetRegister(unsigned int address){ //returning 0x00 on power save mode is done in the sed1376ReadXX functions address -= chips[CHIP_B_SED].start; address &= 0x000000FF; +#if defined(EMU_DEBUG) && defined(EMU_LOG_REGISTER_ACCESS_ALL) + debugLog("SED1376 register read from 0x%02X.\n", address); +#endif switch(address){ default: - debugLog("SED1376 Register Read from 0x%02X.\n", address); +#if defined(EMU_DEBUG) && defined(EMU_LOG_REGISTER_ACCESS_UNKNOWN) && !defined(EMU_LOG_REGISTER_ACCESS_ALL) + debugLog("SED1376 register read from 0x%02X.\n", address); +#endif return 0x00; } return 0x00;//for compiler warnings @@ -61,9 +97,34 @@ unsigned int sed1376GetRegister(unsigned int address){ void sed1376SetRegister(unsigned int address, unsigned int value){ address -= chips[CHIP_B_SED].start; address &= 0x000000FF; +#if defined(EMU_DEBUG) && defined(EMU_LOG_REGISTER_ACCESS_ALL) + debugLog("SED1376 register write 0x%02X to 0x%02X.\n", value, address); +#endif switch(address){ case PWR_SAVE_CFG: + sed1376Registers[address] = value & 0x8E; + break; + + case DISP_MODE: + sed1376Registers[address] = value & 0xF7; + break; + + case SPECIAL_EFFECT: + sed1376Registers[address] = value & 0xD3; + break; + + case DISP_ADDR_2: + sed1376Registers[address] = value & 0x01; + break; + + case LINE_SIZE_1: + sed1376Registers[address] = value & 0x03; + break; + + case DISP_ADDR_0: + case DISP_ADDR_1: + case LINE_SIZE_0: case LUT_R_WRITE: case LUT_G_WRITE: case LUT_B_WRITE: @@ -72,32 +133,50 @@ void sed1376SetRegister(unsigned int address, unsigned int value){ break; case LUT_WRITE_LOC: - sed1376Lut[value] = makeRgb16FromRgb666(sed1376Registers[LUT_R_WRITE], sed1376Registers[LUT_G_WRITE], sed1376Registers[LUT_B_WRITE]); + sed1376RLut[value] = sed1376Registers[LUT_R_WRITE]; + sed1376GLut[value] = sed1376Registers[LUT_G_WRITE]; + sed1376BLut[value] = sed1376Registers[LUT_B_WRITE]; + sed1376OutputLut[value] = makeRgb16FromRgb666(sed1376Registers[LUT_R_WRITE], sed1376Registers[LUT_G_WRITE], sed1376Registers[LUT_B_WRITE]); + break; + + case LUT_READ_LOC: + sed1376Registers[LUT_R_READ] = sed1376RLut[value]; + sed1376Registers[LUT_G_READ] = sed1376GLut[value]; + sed1376Registers[LUT_B_READ] = sed1376BLut[value]; break; default: - debugLog("SED1376 Register write 0x%02X to 0x%02X.\n", value, address); +#if defined(EMU_DEBUG) && defined(EMU_LOG_REGISTER_ACCESS_UNKNOWN) && !defined(EMU_LOG_REGISTER_ACCESS_ALL) + debugLog("SED1376 register write 0x%02X to 0x%02X.\n", value, address); +#endif break; } } - void sed1376Reset(){ memset(sed1376Registers, 0x00, SED1376_REG_SIZE); - memset(sed1376Lut, 0x00, 0x100); + memset(sed1376OutputLut, 0x00, SED1376_LUT_SIZE * sizeof(uint16_t)); + memset(sed1376RLut, 0x00, SED1376_LUT_SIZE); + memset(sed1376GLut, 0x00, SED1376_LUT_SIZE); + memset(sed1376BLut, 0x00, SED1376_LUT_SIZE); memset(sed1376Framebuffer, 0x00, SED1376_FB_SIZE); - sed1376Registers[0x00] = 0x28;//revision code - sed1376Registers[0x01] = 0x14;//display buffer size - + sed1376Registers[REV_CODE] = 0x28; + sed1376Registers[DISP_BUFF_SIZE] = 0x14; +} + +void sed1376RefreshLut(){ + for(uint16_t count = 0; count < SED1376_LUT_SIZE; count++) + sed1376OutputLut[count] = makeRgb16FromRgb666(sed1376RLut[count], sed1376GLut[count], sed1376BLut[count]); } void sed1376Render(){ - if(palmMisc.lcdOn && palmMisc.backlightOn && cpuIsOn() && !sed1376PowerSaveEnabled()){ - //only render if LCD on and backlight on, SED1376 clock is provided by the CPU, if its off so is the SED + if(palmMisc.lcdOn && palmMisc.backlightOn && cpuIsOn() && !sed1376PowerSaveEnabled() && !(sed1376Registers[DISP_MODE] & 0x80)){ + //only render if LCD on, backlight on, CPU on, power save off, and force blank off, SED1376 clock is provided by the CPU, if its off so is the SED } else{ //black screen + memset(palmFramebuffer, 0x00, 160 * 160 * sizeof(uint16_t)); } } diff --git a/src/sed1376.h b/src/sed1376.h index e992c72..deb26e3 100644 --- a/src/sed1376.h +++ b/src/sed1376.h @@ -3,7 +3,9 @@ #include extern uint8_t sed1376Registers[]; -extern uint16_t sed1376Lut[]; +extern uint8_t sed1376RLut[]; +extern uint8_t sed1376GLut[]; +extern uint8_t sed1376BLut[]; extern uint8_t sed1376Framebuffer[]; bool sed1376PowerSaveEnabled(); @@ -12,5 +14,6 @@ unsigned int sed1376GetRegister(unsigned int address); void sed1376SetRegister(unsigned int address, unsigned int value); void sed1376Reset(); +void sed1376RefreshLut(); void sed1376Render(); diff --git a/src/sed1376Accessors.ch b/src/sed1376Accessors.ch new file mode 100644 index 0000000..3f09dee --- /dev/null +++ b/src/sed1376Accessors.ch @@ -0,0 +1,63 @@ +//data access +static inline uint32_t handlePanelDataSwaps(uint32_t address){ + if(sed1376Registers[SPECIAL_EFFECT] & 0x80){ + //word swap + address ^= 0x00000002; + } + if(sed1376Registers[SPECIAL_EFFECT] & 0x40){ + //byte swap + address ^= 0x00000001; + } + return address; +} + +//color conversion +static inline uint16_t makeRgb16FromRgb666(uint8_t r, uint8_t g, uint8_t b){ + uint16_t color = r << 10 & 0xF800; + color |= g << 5 & 0x07E0; + color |= b >> 1 & 0x008F; + return color; +} +static inline void makeRgb666FromRgb16(uint16_t color, uint8_t* r, uint8_t* g, uint8_t* b){ + *r = color >> 10 & 0x3E; + *g = color >> 5 & 0x3F; + *b = color << 1 & 0x3E; +} +static inline uint16_t lutMonochromeValue(uint8_t lutIndex){ + return makeRgb16FromRgb666(sed1376GLut[lutIndex], sed1376GLut[lutIndex], sed1376GLut[lutIndex]); +} + +//monochrome, 0 degrees rotation +static inline uint16_t get1BppMonochrome0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return lutMonochromeValue(sed1376Framebuffer[screenStartAddress + y * lineSize + x / 8] >> (7 - x % 8) & 0x01); +} +static inline uint16_t get2BppMonochrome0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return lutMonochromeValue(sed1376Framebuffer[screenStartAddress + y * lineSize + x / 4] >> (6 - x % 4 * 2) & 0x03); +} +static inline uint16_t get4BppMonochrome0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return lutMonochromeValue(sed1376Framebuffer[screenStartAddress + y * lineSize + x / 2] >> (4 - x % 2 * 4) & 0x0F); +} +static inline uint16_t get8BppMonochrome0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return lutMonochromeValue(sed1376Framebuffer[screenStartAddress + y * lineSize + x]); +} +static inline uint16_t get16BppMonochrome0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + uint16_t pixelValue = (sed1376Framebuffer[screenStartAddress + (y * lineSize + x) * 2] << 8 | sed1376Framebuffer[screenStartAddress + (y * lineSize + x) * 2 + 1]) >> 5 & 0x3F; + return makeRgb16FromRgb666(pixelValue, pixelValue, pixelValue); +} + +//color, 0 degrees rotation +static inline uint16_t get1BppColor0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return sed1376OutputLut[sed1376Framebuffer[screenStartAddress + y * lineSize + x / 8] >> (7 - x % 8) & 0x01]; +} +static inline uint16_t get2BppColor0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return sed1376OutputLut[sed1376Framebuffer[screenStartAddress + y * lineSize + x / 4] >> (6 - x % 4 * 2) & 0x03]; +} +static inline uint16_t get4BppColor0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return sed1376OutputLut[sed1376Framebuffer[screenStartAddress + y * lineSize + x / 2] >> (4 - x % 2 * 4) & 0x0F]; +} +static inline uint16_t get8BppColor0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return sed1376OutputLut[sed1376Framebuffer[screenStartAddress + y * lineSize + x]]; +} +static inline uint16_t get16BppColor0Degrees(uint32_t screenStartAddress, uint16_t lineSize, uint16_t x, uint16_t y){ + return sed1376Framebuffer[screenStartAddress + (y * lineSize + x) * 2] << 8 | sed1376Framebuffer[screenStartAddress + (y * lineSize + x) * 2 + 1]; +} diff --git a/src/sed1376RegisterNames.h b/src/sed1376RegisterNames.h index c136f54..5ed625a 100644 --- a/src/sed1376RegisterNames.h +++ b/src/sed1376RegisterNames.h @@ -19,8 +19,16 @@ #define LUT_READ_LOC 0x0F //Panel Configuration Registers +#define PANEL_TYPE 0x10 //Display Mode Registers +#define DISP_MODE 0x70 +#define SPECIAL_EFFECT 0x71 +#define DISP_ADDR_0 0x74 +#define DISP_ADDR_1 0x75 +#define DISP_ADDR_2 0x76 +#define LINE_SIZE_0 0x78 +#define LINE_SIZE_1 0x79 //Picture-in-Picture Plus (PIP+) Registers @@ -30,5 +38,9 @@ #define SCRATCH_1 0xA5 //General Purpose IO Pins Registers +#define GPIO_CONF_0 0xA8 +#define GPIO_CONF_1 0xA9 +#define GPIO_CONT_0 0xAC +#define GPIO_CONT_1 0xAD //PWM Clock and CV Pulse Configuration Registers diff --git a/src/trapNumToName.c b/src/trapNumToName.c index 16ce806..4e7eb0d 100644 --- a/src/trapNumToName.c +++ b/src/trapNumToName.c @@ -1,4 +1,6 @@ -#ifdef EMU_DEBUG +#include "emulator.h"//for EMU_* flags + +#if defined(EMU_DEBUG) && defined(EMU_OPCODE_LEVEL_DEBUG) && defined(EMU_LOG_APIS) #include #include //for NULL diff --git a/unimplementedFeatures.txt b/unimplementedFeatures.txt index 42d3497..ab08afb 100644 --- a/unimplementedFeatures.txt +++ b/unimplementedFeatures.txt @@ -1,21 +1,35 @@ -Timer capture events, I don't think there possible though with the Palms hardware -SED1376 register access +CPU: sysTrapPceNativeCall, ARM Emulator -cpu32 table lookup opcodes +CPU32 table lookup opcodes + +CPU I/O: +Timer capture events, I don't think there possible though with the Palms hardware Peripheral Control Register, audio ppm mixing selection All edge triggered interrupts(currently always level triggered) -(debug tools)missing icons Port G SPI stuff +Setting the battery dead bit(PDDATA 0x80) if the emulated battery percent gets too low DRAMC write enable All of DRAMMC -Setting the battery dead bit(PDDATA 0x80) if the emulated battery percent gets too low +pen input +Port M Infrared shutdown (PMDATA 0x20) +interrupt control register (ICR), POL5 and edge trigger selects + +Debug tools: +missing icons + +Memory: Sdcard can't be read or written to Sdcard can't be inserted or removed Sdcard has no error handling in save/load state -Port M Infrared shutdown (PMDATA 0x20) -interrupt control register (ICR), POL5 and edge trigger selects storage RAM protect(likely already done from fixing chip select bits) +SED1376: +register access +picture in picture SED1376 registers +swivelview register +byte and word swap bits + + Fixed: Palm OS usage of the "rte" instruction is incompatible with the 68020, switch to 68000 core System Control Register, 0xXXFFF000 all upper banks are registers mode @@ -30,4 +44,4 @@ All chip select registers The boot memory mapping where ROM starts at 0x00000000 and RAM is swapped in Bits 15 and 14 of the chip selects, currently only the upper 16 bits are taken into account Supervisor only chip select bits -RAM location and size setting, Dragonball VZ can set the page mapping SDCTRL(SDCTRL only sets external physical pins not RAM mapping) \ No newline at end of file +RAM location and size setting, Dragonball VZ can set the page mapping SDCTRL(SDCTRL only sets external physical pins not RAM mapping)