Better event logging

This commit is contained in:
meepingsnesroms
2019-09-12 12:56:05 -07:00
parent 64950ac431
commit 0bb3287d6d
3 changed files with 13 additions and 4 deletions

View File

@@ -84,8 +84,11 @@ void do_cp15_mcr(uint32_t insn)
error("Bad or unimplemented control register value: %x (unsupported: %x)\n", value, (value & 0xFFFF8CF8) ^ 0x00050078);
*/
arm.control = value;
if (change & 1) // MMU is being turned on or off
addr_cache_flush();
if (change & 1){
// MMU is being turned on or off
addr_cache_flush();
emuprintf("Turned MMU %s\n", value & 1 ? "on" : "off");
}
break;
}
case 0x020000: /* MCR p15, 0, <Rd>, c2, c0, 0: Translation Table Base Register */

View File

@@ -30,6 +30,6 @@ uint32_t pxa260GetRegister(uint8_t reg);//only for debugging
#define pxa260GetPc() pxa260GetRegister(15)//only for debugging
uint32_t pxa260GetCpsr(void);//only for debugging
uint32_t pxa260GetSpsr(void);//only for debugging
uint64_t pxa260ReadArbitraryMemory(uint32_t address, uint8_t size);//only for debugging
uint64_t pxa260ReadArbitraryMemory(uint32_t address, uint8_t size);//only for debugging, uses physical address not MMU mapped
#endif

View File

@@ -38,7 +38,7 @@ uint32_t pxa260UdcReadWord(uint32_t address){
switch(address){
case UDCCR:
//TODO: is incomplete
debugLog("Snoot boop, PC:0x%08X\n", pxa260GetPc());
debugLog("PXA260 UDC UDCCR read, PC:0x%08X\n", pxa260GetPc());
return pxa260UdcUdccr;
case UDCCS0:
@@ -70,6 +70,12 @@ void pxa260UdcWriteWord(uint32_t address, uint32_t value){
pxa260UdcUdccr = value & 0xFF;
return;
case UDCCS0:
pxa260UdcUdccs0 &= ~(value & 0x91);//clear clear on 1 bits
pxa260UdcUdccs0 |= value & 0x26;//set set on 1 bits
//TODO: need to update interrupts
return;
case UICR0:
pxa260UdcUicr0 = value & 0xFF;
//TODO: need to update interrupts