diff --git a/Cart_Reader/LEAP.ino b/Cart_Reader/LEAP.ino index 939eb6cf..8cc8ce5c 100644 --- a/Cart_Reader/LEAP.ino +++ b/Cart_Reader/LEAP.ino @@ -103,7 +103,7 @@ byte leapsize; byte newleapsize; byte tempbyte; -char tempword; +word tempword; word ptrword; word tempcheck; @@ -361,7 +361,7 @@ void checkStart_LEAP() OE_LOW; CE_LOW; BYTE_HIGH; - word tempword = read_rom_word_LEAP(0x0); + tempword = read_rom_word_LEAP(0x0); if ((LEAP[0] == ((tempword >> 0x8) & 0xFF)) && (LEAP[1] == (tempword & 0xFF))) { tempword = read_rom_word_LEAP(0x1); findTable_LEAP(0x4, 0xA2); @@ -383,7 +383,7 @@ void findTable_LEAP(unsigned long startAddr, unsigned long endAddr) delay(500); CE_LOW; for (unsigned long addr = startAddr; addr < endAddr; addr +=2) { - word tempword = read_rom_word_LEAP(addr); + tempword = read_rom_word_LEAP(addr); if ((TBL[0] == ((tempword >> 0x8) & 0xFF))&&(TBL[1] == (tempword & 0xFF))) { tempword = read_rom_word_LEAP(addr + 1); if ((TBL[2] == ((tempword >> 0x8) & 0xFF))&&(TBL[3] == (tempword & 0xFF))) { @@ -400,7 +400,7 @@ void readTable_LEAP(unsigned long startAddr, unsigned long endAddr) delay(500); CE_LOW; for (unsigned long addr = startAddr; addr < endAddr; addr++) { - word tempword = read_rom_word_LEAP(addr); + tempword = read_rom_word_LEAP(addr); if ((TXT[0] == ((tempword >> 0x8) & 0xFF))&&(TXT[1] == (tempword & 0xFF))) { tempword = read_rom_word_LEAP(addr + 1); if ((TXT[2] == ((tempword >> 0x8) & 0xFF))&&(TXT[3] == (tempword & 0xFF))) { // Text Block Marker Found @@ -465,7 +465,7 @@ void readROM_LEAP() for (unsigned long address = 0; address < 0x200000; address += 256) { // 4MB for (unsigned int x = 0; x < 256; x++) { - word tempword = read_rom_word_LEAP(address + x); + tempword = read_rom_word_LEAP(address + x); sdBuffer[x * 2] = (tempword >> 0x8) & 0xFF; sdBuffer[(x * 2) + 1] = tempword & 0xFF; } @@ -474,7 +474,7 @@ void readROM_LEAP() if (leapsize > 0) { for (unsigned long address = 0x200000; address < 0x400000; address += 256) { // +4MB = 8MB for (unsigned int x = 0; x < 256; x++) { - word tempword = read_rom_word_LEAP(address + x); + tempword = read_rom_word_LEAP(address + x); sdBuffer[x * 2] = (tempword >> 0x8) & 0xFF; sdBuffer[(x * 2) + 1] = tempword & 0xFF; } @@ -483,7 +483,7 @@ void readROM_LEAP() if (leapsize > 1) { for (unsigned long address = 0x400000; address < 0x800000; address += 256) { // +8MB = 16MB for (unsigned int x = 0; x < 256; x++) { - word tempword = read_rom_word_LEAP(address + x); + tempword = read_rom_word_LEAP(address + x); sdBuffer[x * 2] = (tempword >> 0x8) & 0xFF; sdBuffer[(x * 2) + 1] = tempword & 0xFF; }