diff --git a/hwTestSuite/testSuite.c b/hwTestSuite/testSuite.c index c77f4de..1ef7e5d 100644 --- a/hwTestSuite/testSuite.c +++ b/hwTestSuite/testSuite.c @@ -249,7 +249,6 @@ static Boolean testerInit(){ lastSubprogramReturnValue = makeVar(LENGTH_0, TYPE_NULL, 0); subprogramArgs = makeVar(LENGTH_0, TYPE_NULL, 0); currentSubprogram = testPicker; - /*currentSubprogram = hexRamBrowser;*/ return true; } diff --git a/hwTestSuite/tests.c b/hwTestSuite/tests.c index 68790b7..20faf77 100644 --- a/hwTestSuite/tests.c +++ b/hwTestSuite/tests.c @@ -2,44 +2,47 @@ #include "viewer.h" #include "ugui.h" + var hexRamBrowser(){ static Boolean clearScreen = true; - static uint32_t column = 0;/*what column to change with up/down keys*/ - static uint32_t pointerValue = 0x00000000; + static uint32_t nibble = 0;/*what column to change with up/down keys*/ + static uint32_t pointerValue = UINT32_C(0x77777777);/*in the middle of everything*/ static char hexString[100]; - if(getButtonPressed(buttonUp)){ - pointerValue += 0x1 << (4 * (7 - column)); + pointerValue += 0x1 << (4 * (7 - nibble)); } if(getButtonPressed(buttonDown)){ - pointerValue -= 0x1 << (4 * (7 - column)); + pointerValue -= 0x1 << (4 * (7 - nibble)); } if(getButtonPressed(buttonLeft)){ - if(column > 0) - column--; + if(nibble > 0) + nibble--; } if(getButtonPressed(buttonRight)){ - if(column < 7) - column++; + if(nibble < 7) + nibble++; } if(getButtonPressed(buttonSelect)){ /*open hex viewer*/ + nibble = 0; clearScreen = true; setSubprogramArgs(makeVar(LENGTH_ANY, TYPE_PTR, pointerValue));/*length doesnt matter*/ execSubprogram(hexViewer); } if(getButtonPressed(buttonBack)){ + nibble = 0; clearScreen = true; exitSubprogram(); } - StrPrintF(hexString, "Open Hex Viewer At:\n0x%08X", pointerValue); + /*Palm OS sprintf only supports 16 bit ints*/ + StrPrintF(hexString, "Open Hex Viewer At:\n0x%04X%04X", (uint16_t)(pointerValue >> 16), (uint16_t)pointerValue); if(clearScreen){ UG_FillScreen(C_WHITE); diff --git a/hwTestSuite/viewer.c b/hwTestSuite/viewer.c index ed71112..0e4e921 100644 --- a/hwTestSuite/viewer.c +++ b/hwTestSuite/viewer.c @@ -28,8 +28,8 @@ /*tests*/ -static test_t hwTests[TESTS_AVAILABLE]; -static uint32_t totalHwTests; +static test_t hwTests[TESTS_AVAILABLE]; +static uint32_t totalHwTests; /*graphics*/ static UG_WINDOW fbWindow; @@ -38,13 +38,13 @@ static UG_TEXTBOX listEntrys[ITEM_LIST_ENTRYS]; static char textboxString[ITEM_LIST_ENTRYS][ITEM_STRING_SIZE]; /*list handler variables*/ -static uint32_t page = 0; -static uint32_t index = 0; -static uint32_t lastIndex = 0; -static uint32_t lastPage = 0; -static uint32_t listLength = 0; -static uint32_t selectedEntry = 0; -static Boolean forceListRefresh = true; +static uint32_t page; +static uint32_t index; +static uint32_t lastIndex; +static uint32_t lastPage; +static uint32_t listLength; +static uint32_t selectedEntry; +static Boolean forceListRefresh; static void (*listHandler)(uint32_t command); /*specific handler variables*/ @@ -163,6 +163,8 @@ static var listModeFrame(){ lastIndex = index; lastPage = page; + //forceTextEntryRefresh(0); + fbWindow.state |= WND_STATE_UPDATE; UG_Update(); UG_PutString(0, 50, "subprogram exec worked"); diff --git a/tests/hwTestSuiteVersions/TstSuite(starting to load subprograms).prc b/tests/hwTestSuiteVersions/TstSuite(starting to load subprograms).prc new file mode 100644 index 0000000..5a87924 Binary files /dev/null and b/tests/hwTestSuiteVersions/TstSuite(starting to load subprograms).prc differ