mirror of
https://github.com/libretro/Mu.git
synced 2026-09-23 07:05:37 +00:00
Update tests, prepare to make changelog
This commit is contained in:
2
changelog.txt
Normal file
2
changelog.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
v0.7 to v0.9(Jul 30 2018 - Sept ** 2018)
|
||||
TODO
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,28 +16,34 @@
|
||||
|
||||
var testButtonInput(){
|
||||
static Boolean firstRun = true;
|
||||
/*
|
||||
static Boolean polaritySwap;
|
||||
static uint8_t frameCount;
|
||||
static uint8_t portDOriginalPolarity;
|
||||
*/
|
||||
uint16_t y = 0;
|
||||
|
||||
if(firstRun){
|
||||
debugSafeScreenClear(C_WHITE);
|
||||
/*
|
||||
polaritySwap = false;
|
||||
frameCount = 0;
|
||||
portDOriginalPolarity = readArbitraryMemory8(HW_REG_ADDR(PDPOL));
|
||||
*/
|
||||
firstRun = false;
|
||||
}
|
||||
|
||||
/*
|
||||
frameCount++;
|
||||
if(frameCount >= 30){
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PDPOL), ~readArbitraryMemory8(HW_REG_ADDR(PDPOL)) & 0x07);
|
||||
frameCount = 0;
|
||||
}
|
||||
*/
|
||||
|
||||
if(getButton(buttonUp) && !getButton(buttonDown)){
|
||||
firstRun = true;
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PDPOL), portDOriginalPolarity);
|
||||
/*writeArbitraryMemory8(HW_REG_ADDR(PDPOL), portDOriginalPolarity);*/
|
||||
exitSubprogram();
|
||||
}
|
||||
|
||||
@@ -697,63 +703,144 @@ var getIcrInversion(){
|
||||
return makeVar(LENGTH_0, TYPE_NULL, 0);
|
||||
}
|
||||
|
||||
var doesIrq2ClearChangePinValue(){
|
||||
var doesIsrClearChangePinValue(){
|
||||
static Boolean firstRun = true;
|
||||
|
||||
if(firstRun){
|
||||
uint16_t oldIcr;
|
||||
uint8_t oldPdirqeg;
|
||||
uint8_t oldPdirqen;
|
||||
uint16_t y = 0;
|
||||
Boolean testSd;
|
||||
|
||||
turnInterruptsOff();
|
||||
|
||||
debugSafeScreenClear(C_WHITE);
|
||||
|
||||
oldIcr = readArbitraryMemory16(HW_REG_ADDR(ICR));
|
||||
StrPrintF(sharedDataBuffer, "Select = Test SD");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "Back = Skip SD");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(true){
|
||||
testSd = readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x0C;
|
||||
if(testSd)
|
||||
break;
|
||||
}
|
||||
|
||||
if(!(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20)){
|
||||
StrPrintF(sharedDataBuffer, "Remove SD Card");
|
||||
/*test if SD pin is cleared on write to ICR*/
|
||||
if(testSd & 0x08){
|
||||
uint16_t oldIcr = readArbitraryMemory16(HW_REG_ADDR(ICR));
|
||||
|
||||
debugSafeScreenClear(C_WHITE);
|
||||
y = 0;
|
||||
|
||||
if(!(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20)){
|
||||
StrPrintF(sharedDataBuffer, "Remove SD Card");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(!(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20));/*SD is still inserted*/
|
||||
}
|
||||
|
||||
/*set to edge triggered mode and reset IRQ2, trigger on insert event*/
|
||||
writeArbitraryMemory16(HW_REG_ADDR(ICR), (oldIcr | 0x0400) & 0xBFFF);
|
||||
writeArbitraryMemory32(HW_REG_ADDR(ISR), 0x00020000);
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR IRQ2:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00020000) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(!(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20));/*SD is still inserted*/
|
||||
|
||||
StrPrintF(sharedDataBuffer, "Insert SD Card");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20);/*SD is not inserted*/
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR IRQ2:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00020000) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
|
||||
writeArbitraryMemory32(HW_REG_ADDR(ISR), 0x00020000);
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Cleared");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR IRQ2:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00020000) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
|
||||
StrPrintF(sharedDataBuffer, "Select = Continue");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(!(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08));
|
||||
|
||||
writeArbitraryMemory16(HW_REG_ADDR(ICR), oldIcr);
|
||||
}
|
||||
|
||||
/*set to edge triggered mode and reset IRQ2, trigger on insert event*/
|
||||
writeArbitraryMemory16(HW_REG_ADDR(ICR), (oldIcr | 0x0400) & 0xBFFF);
|
||||
writeArbitraryMemory32(HW_REG_ADDR(ISR), 0x00020000);
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR IRQ2:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00020000) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
/*test if Notes button pin is cleared on write to ICR*/
|
||||
debugSafeScreenClear(C_WHITE);
|
||||
y = 0;
|
||||
|
||||
StrPrintF(sharedDataBuffer, "Insert SD Card");
|
||||
oldPdirqeg = readArbitraryMemory8(HW_REG_ADDR(PDIRQEG));
|
||||
oldPdirqen = readArbitraryMemory8(HW_REG_ADDR(PDIRQEN));
|
||||
|
||||
if(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08){
|
||||
StrPrintF(sharedDataBuffer, "Release Select");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08);
|
||||
}
|
||||
|
||||
/*set to edge triggered mode and reset INT3, trigger on button down*/
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PDIRQEG), oldPdirqeg | 0x08);
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PDIRQEN), oldPdirqen | 0x0F);
|
||||
writeArbitraryMemory32(HW_REG_ADDR(ISR), 0x00000800);
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PKDATA), readArbitraryMemory8(HW_REG_ADDR(PKDATA)) & 0x1F);/*enable all button rows*/
|
||||
StrPrintF(sharedDataBuffer, "INT3 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20);/*SD is not inserted*/
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR IRQ2:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00020000) ? "true " : "false");
|
||||
StrPrintF(sharedDataBuffer, "IPR INT3:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00000800) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
|
||||
writeArbitraryMemory32(HW_REG_ADDR(ISR), 0x00020000);
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Cleared");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IRQ2 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x20) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR IRQ2:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00020000) ? "true " : "false");
|
||||
StrPrintF(sharedDataBuffer, "Press Select");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
forceFrameRedraw();
|
||||
while(!(readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08));
|
||||
StrPrintF(sharedDataBuffer, "INT3 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR INT3:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00000800) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
|
||||
writeArbitraryMemory16(HW_REG_ADDR(ICR), oldIcr);
|
||||
writeArbitraryMemory32(HW_REG_ADDR(ISR), 0x00000800);
|
||||
StrPrintF(sharedDataBuffer, "INT3 Cleared");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "INT3 Pin:%s", (readArbitraryMemory8(HW_REG_ADDR(PDDATA)) & 0x08) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
StrPrintF(sharedDataBuffer, "IPR INT3:%s", (readArbitraryMemory32(HW_REG_ADDR(IPR)) & 0x00000800) ? "true " : "false");
|
||||
UG_PutString(0, y, sharedDataBuffer);
|
||||
y += FONT_HEIGHT + 1;
|
||||
|
||||
forceFrameRedraw();
|
||||
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PDIRQEG), oldPdirqeg);
|
||||
writeArbitraryMemory8(HW_REG_ADDR(PDIRQEN), oldPdirqen);
|
||||
|
||||
turnInterruptsOn();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ var getDeviceInfo();
|
||||
var getCpuInfo();
|
||||
var getInterruptInfo();
|
||||
var getIcrInversion();
|
||||
var doesIrq2ClearChangePinValue();
|
||||
var doesIsrClearChangePinValue();
|
||||
var toggleBacklight();
|
||||
var toggleMotor();
|
||||
var toggleAlarmLed();
|
||||
|
||||
@@ -332,8 +332,8 @@ void resetFunctionViewer(){
|
||||
hwTests[totalHwTests].testFunction = getIcrInversion;
|
||||
totalHwTests++;
|
||||
|
||||
StrNCopy(hwTests[totalHwTests].name, "IRQ2 Clear Pin Change", TEST_NAME_LENGTH);
|
||||
hwTests[totalHwTests].testFunction = doesIrq2ClearChangePinValue;
|
||||
StrNCopy(hwTests[totalHwTests].name, "ISR Clear Pin Change", TEST_NAME_LENGTH);
|
||||
hwTests[totalHwTests].testFunction = doesIsrClearChangePinValue;
|
||||
totalHwTests++;
|
||||
|
||||
StrNCopy(hwTests[totalHwTests].name, "ADS7846 Read", TEST_NAME_LENGTH);
|
||||
|
||||
4096
powerButtonBug/beforePowerDownRegs.txt
Normal file
4096
powerButtonBug/beforePowerDownRegs.txt
Normal file
File diff suppressed because it is too large
Load Diff
4096
powerButtonBug/duringPowerDownRegs.txt
Normal file
4096
powerButtonBug/duringPowerDownRegs.txt
Normal file
File diff suppressed because it is too large
Load Diff
10
powerButtonBug/powerButtonBugCanidates.txt
Normal file
10
powerButtonBug/powerButtonBugCanidates.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
PrvWakeupIntHandler
|
||||
HwrSleep
|
||||
HwrDoze
|
||||
HwrWake
|
||||
PrvShutDownPLL
|
||||
PrvShutDownCPU
|
||||
|
||||
Innocent Functions:
|
||||
HwrAttnHalWakeShutoff(just turns timer 2(its use in the OS is not known), the alarm LED and vibrator motor off)
|
||||
PrvHwrLockout(just calls HwrAttnHalWakeShutoff and HwrSpiPortShutoff)
|
||||
@@ -6,7 +6,7 @@ Test what bits of IMR are writable
|
||||
CPU I/O:
|
||||
Peripheral Control Register, audio ppm mixing selection and timer cascade mode
|
||||
Port G SPI stuff
|
||||
Setting the battery dead bit(PDDATA 0x80) if the emulated battery percent gets too low(don't know how low this is)
|
||||
Setting the battery dead bit(PDDATA 0x80) if the emulated battery percent gets too low(don't know how low this is, a test will be slow and painful with how big the battery is on my device)
|
||||
DRAMC write enable
|
||||
pen input
|
||||
Port M Infrared shutdown (PMDATA 0x20)
|
||||
@@ -20,10 +20,11 @@ port g data bit 2 may need to be 0 to access ADS7846
|
||||
REFREQ clock frequency in RTCCTL should slow down the RTC when enabled
|
||||
Dont know if it possible to have the backlight on and the display off at the same time(theres no reason for it but it may be possible)
|
||||
SPI1 slave mode, should never be used
|
||||
Edge triggered IRQ* and INT* interrupt pins may actually read the value of the interrupt instead of the pin value(IRQ* reads the pin, INT* hasn't been tested yet)
|
||||
port d data register seems to have its data bits cleared when an edge triggered interrupt is cleared(according to MC68VZ328UM.pdf Page 10-15)
|
||||
port d data register INT* bits seem to have there data bits cleared when an edge triggered interrupt is cleared(according to MC68VZ328UM.pdf Page 10-15)(may be the cause of the power button issue)
|
||||
power button must be pushed twice to turn the CPU back on(when debugging it works the first time, then must be pushed twice to turn off instead of on)(this also occurs in the RetroArch build)
|
||||
RxOverflow on SPI1, don't know if back or front of FIFO is overwritten on overflow(currently losing oldest entry)
|
||||
ICR POL(1,2,3,6) may flip the pin value as well as the interrupt, POL5 does not flip the INT5 pin though, this was confirmed with a hardware test(it doesnt seem to but there is instability on the pin when the SD card is plugged in, this may have to do with card detect also being a data line on the SD pinout)
|
||||
edge triggered INT* don't clear on write to ISR when masked in IMR(at least that seems to be the reason)
|
||||
|
||||
Debug tools:
|
||||
missing home screen icons
|
||||
@@ -44,9 +45,11 @@ the ADS7846 is currently being reset every time the SPI is disabled and reenable
|
||||
verify chip select
|
||||
need to trigger a false PENIRQ interrupt on reading certain channels
|
||||
electrical noise on lines(conversions probably should have +-20 added to values)(probably no need for this, it works so theres no need to use less precise values)
|
||||
pulling chip select low when high state likely resets the ADS7846 bit stream(this is currently being done when the SPI bus is enabled)
|
||||
|
||||
|
||||
Fixed:
|
||||
Edge triggered IRQ* interrupt pins may actually read the value of the interrupt instead of the pin value(IRQ* reads the pin, INT* still hasn't been tested yet)
|
||||
ADS7846 channels are not implemented properly in the emulator(works now)
|
||||
ADS7846 Channels 3 and 4(they need to be scaled differently)(works now)
|
||||
CPU32 table lookup opcodes(there is no CPU32)
|
||||
@@ -69,7 +72,6 @@ on changing ICR all port d interrupts and IRQ5 need to be refreshed
|
||||
SD card can't be inserted or removed
|
||||
SD card has no error handling in save/load state
|
||||
there was what appeared to be memory corruption because a byte was incrementing and decrementing for loading and saving the same state but it was just the precision cast from uint64_t > double > uint64_t made it increment by 1
|
||||
power button must be pushed twice to turn the CPU back on(when debugging it works the first time, then must be pushed twice to turn off instead of on)(this also occurs in the RetroArch build)(this was not a bug, I was just pushing the power button too fast, when counting to 6 inbetween presses it worked fine)
|
||||
STOP opcode may be causing issues with the power button(it may be setting a separate CPU disable option)(not a bug)
|
||||
add 320*320 frame buffer silkscreen, 2xBRZ should be able to make 320*320 version of the 160*160 silkscreen(not hooked up but one has been created)
|
||||
Tango icons don't grow enough with a big window
|
||||
|
||||
Reference in New Issue
Block a user