 +                addr[0] = debug_read_byte(space, memory_address_to_byte(space, 0x06064BF5), TRUE); // p1 State
 +                addr[1] = debug_read_word(space, memory_address_to_byte(space, 0x06064BBA), TRUE); // p1 Level
 +                addr[2] = debug_read_word(space, memory_address_to_byte(space, 0x06064BEA), TRUE); // p1 Timer
++                addr[3] = debug_read_byte(space, memory_address_to_byte(space, 0x06079378), TRUE); // Master-mode internal grade
++                addr[4] = debug_read_byte(space, memory_address_to_byte(space, 0x06079379), TRUE); // Master-mode internal grade points
 +
 +                /* printf("%d %d %d\n", buffer[0], buffer[1], buffer[2]); */
 +                break;

+
+const char* sharedMemKey = "tgm2p_data";
+int fd = 0;
+size_t vSize = sizeof(int) * 4;
+int* addr = NULL;
+
+void cleanupSharedMem()

 void cpuexec_timeslice(running_machine *machine)
 {
 	int call_debugger = ((machine->debug_flags & DEBUG_FLAG_ENABLED) != 0);
@@ -259,6 +279,55 @@ void cpuexec_timeslice(running_machine *machine)
 	cpuexec_private *global = machine->cpuexec_data;
 	int ran;
 
