CEL2_ CEL_ OEL_ and RWL_ moved to Atmega1284 Port C PIN_PC7 PIN_PC6 PIN_PC5 PIN_4

Port PD2 and PD3 used for Interrupts to count the Busy signals.
BusyFaultCount and ShadowFaultCount commands added to display the number
interrupts since the last Atmega1284 reboot.
BusyFault is counted when the live game RAM issues a busy to the Pinball 6802.
BusyFault would indicate a potential game crash.
ShadowFaultCount is recorded to get an idea how often the shadow memory might be
getting out of step with the game RAM.
The Shadow memory is updated with every read or write by the 6802.
The Shadow memory is not updated by a read or write to the game RAM from the memory port left side
Left side memory ports are for the ATMEGA 1284.
This commit is contained in:
Tim Gopaul
2023-02-19 14:01:08 -07:00
parent b56f142ac7
commit 79c30b9d0f
2 changed files with 76 additions and 4 deletions
+22 -1
View File
@@ -1,4 +1,5 @@
/*****************************************************************************
2023-01-18 Tim Gopaul add command BusyFaultCount to report how many Busy interrupts were generated since last reboot
2023-01-11/12 Tim Gopaul Removed getHexLineFromSerialPort.. use the main parsing code get command
2023-01-11 Tim Gopaul added call to make commands case insensitive.
2023-01-08 Tim Gopaul - add load command to read in Hex format string and place in RAM memory
@@ -95,7 +96,8 @@
#include <errno.h> // https://stackoverflow.com/questions/26080829/detecting-strtol-failure when strtol fails it returns zero and an errno
#include <limits.h> // used to find LONG_MIN and LONG_MAX
extern volatile unsigned int BusyFaultCount;
extern volatile unsigned int ShadowFaultCount;
//Function Prototypes from .ino file
void writeAddress(unsigned int address, byte dataByte);
@@ -152,6 +154,9 @@ const char *gameReadCommandToken = "gameread"; // read address ignore
const char *gameWriteCommandToken = "gamewrite"; // write address byte
const char *gameDumpCommandToken = "gameDump"; // Dumps game memory from starting address with byte count
const char *BusyFaultCountToken = "busyfaultcount"; // displays the accumulative count of the busy interrupts
const char *ShadowFaultCountToken = "shadowfaultcount"; // displays the accumulative count of the busy interrupts
/*************************************************************************************************************
getCommandLineFromSerialPort()
Return the string of the next command. Commands are delimited by return"
@@ -373,6 +378,13 @@ int gameDumpCommand() {
return addrStart;
}
void busyFaultCountCommand(){
Serial.printf("> Cumlative fault count since last Atmega1284 reboot: %d\n", BusyFaultCount );
}
void shadowFaultCountCommand(){
Serial.printf("> Cumlative fault count since last Atmega1284 reboot: %d\n", ShadowFaultCount );
}
// ***** testMemmory *****
int testMemoryCommand(){
@@ -527,6 +539,15 @@ DoMyCommand(char * commandLine) {
else if (strcasecmp(ptrToCommandName, testMemoryCommandToken) == 0) { //Modify here
result = testMemoryCommand();
}
else if (strcasecmp(ptrToCommandName, BusyFaultCountToken) == 0) { //Modify here
busyFaultCountCommand();
}
else if (strcasecmp(ptrToCommandName, ShadowFaultCountToken) == 0) { //Modify here
shadowFaultCountCommand();
}
else {
nullCommand(ptrToCommandName);
}