From b25201a8ea39d77ed7bc26394b97ab74c577f882 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 13 Oct 2017 14:10:54 +0100 Subject: [PATCH] #18 DD game CIC corrected - DD Games now load as long as you change to the correct CIC from the menu --- inc/rom.h | 4 +++- src/main.c | 19 +++++++++++-------- src/sys.c | 7 ------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/inc/rom.h b/inc/rom.h index 46dff4d..5da9d16 100644 --- a/inc/rom.h +++ b/inc/rom.h @@ -151,9 +151,11 @@ #define CIC_6101 1 #define CIC_6102 2 #define CIC_6103 3 -#define CIC_6104 4 +#define CIC_5101 4 //aleck64 +//#define CIC_6104 6104 //Unused in any game so used for Aleck64 instead #define CIC_6105 5 #define CIC_6106 6 +#define CIC_5167 7 //64dd conv //void romFill(...); void pif_boot(); diff --git a/src/main.c b/src/main.c index 8023e26..9554b26 100644 --- a/src/main.c +++ b/src/main.c @@ -982,7 +982,7 @@ void romInfoScreen(display_context_t disp, u8 *buff, int silent) printText(save_type_str, 11, -1, disp); unsigned char cic_type_str[12]; - sprintf(cic_type_str, "CIC: CIC-610%i", cic); + sprintf(cic_type_str, "CIC: CIC-610%i", cic); //TODO: need to take into account DD and Aleck CIC if (silent != 1) printText(cic_type_str, 11, -1, disp); @@ -1121,7 +1121,7 @@ void loadmsx2rom(display_context_t disp, u8 *rom_path) resp = fatReadFile(buffer + 0x2df48, file.sec_available); dma_write_s(buffer, 0xb0000000, fsize); - boot_cic = 2; //cic 6102 + boot_cic = CIC_6102; boot_save = 0; //save off/cpak force_tv = 0; //no force cheats_on = 0; //cheats off @@ -1169,7 +1169,7 @@ void loadggrom(display_context_t disp, u8 *rom_path) resp = fatReadFile(buffer + 0x1b410, file.sec_available); dma_write_s(buffer, 0xb0000000, fsize); - boot_cic = 2; //cic 6102 + boot_cic = CIC_6102; boot_save = 0; //save off/cpak force_tv = 0; //no force cheats_on = 0; //cheats off @@ -1211,7 +1211,7 @@ void loadnesrom(display_context_t disp, u8 *rom_path) resp = fatOpenFileByName(rom_path, 0); //err if not found ^^ resp = diskRead(file.sector, (void *)0xb0200000, file.sec_available); - boot_cic = 2; //cic 6102 + boot_cic = CIC_6102; boot_save = 0; //save off/cpak force_tv = 0; //no force cheats_on = 0; //cheats off @@ -1328,7 +1328,7 @@ void loadrom(display_context_t disp, u8 *buff, int fast) if (gbload == 1) boot_save = 1; - else if (resp) //todo: if response is certain ones we should show the error and stop the boot... + else if (resp) //TODO: if response is certain ones we should show the error and stop the boot... { sprintf(tmp, "Response: %i", resp); printText(tmp, 3, -1, disp); @@ -2296,7 +2296,7 @@ void alterRomConfig(int type, int mode) //cic u8 min_cic = 0; - u8 max_cic = 5; + u8 max_cic = 6; //save u8 min_save = 0; @@ -2629,14 +2629,17 @@ void drawRomConfigBox(display_context_t disp, int line) printText(" CIC: 6103", 9, -1, disp); break; case 3: - printText(" CIC: 6104", 9, -1, disp); - break; //do i really need 6104 in that list? :D + printText(" CIC: 5101", 9, -1, disp); + break; case 4: printText(" CIC: 6105", 9, -1, disp); break; case 5: printText(" CIC: 6106", 9, -1, disp); break; + case 6: + printText(" CIC: 5167", 9, -1, disp); + break; default: break; } diff --git a/src/sys.c b/src/sys.c index f535aec..07dcc40 100644 --- a/src/sys.c +++ b/src/sys.c @@ -17,13 +17,6 @@ Options_st options; u32 native_tv_mode; -#define CIC_6101 1 -#define CIC_6102 2 -#define CIC_6103 3 -#define CIC_6104 4 -#define CIC_6105 5 -#define CIC_6106 6 - void dma_read_s(void * ram_address, unsigned long pi_address, unsigned long len) { u32 buff[256];