X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=fds.c;h=e5e4d5bc8d81fbc6e029515de454710be75dcbad;hp=41b3a5d7553aea5d98cd8b4c0596c3dee8da66a1;hb=e5f8a1a92df07167d0b17dfa41cc3e9e8fa73339;hpb=e1591a12a775a600572ffccb2d6f8f4d6343b7dd diff --git a/fds.c b/fds.c index 41b3a5d..e5e4d5b 100644 --- a/fds.c +++ b/fds.c @@ -85,12 +85,13 @@ static uint8 SelectDisk,InDisk; #define DC_INC 1 -void FDSGI(int h) +void FDSGI(int h, void *param) { switch(h) { case GI_CLOSE: FDSClose();break; case GI_POWER: FDSInit();break; + case GI_INFOSTRING: sprintf(param, "FDS, Sides: %d", TotalSides);break; } } @@ -150,9 +151,9 @@ static void FDSInit(void) int page; // asm code needs pages to be set again.. for (page=12; page<28; page++) // 0x6000-0xdfff 32K RAM - Page[page]=FDSRAM - (page<<11) + ((page-12)<<11); + Page[page]=FDSRAM - (12<<11); for (; page<32; page++) // 0xe000-0xffff 8K BIOS - Page[page]=FDSBIOS - (page<<11) + ((page-28)<<11); + Page[page]=FDSBIOS - (28<<11); } #endif } @@ -819,6 +820,7 @@ int FDSLoad(const char *name, int fp) FCEU_PrintError("FDS BIOS ROM image missing!"); FreeFDSMemory(); free(fn); + LoadGameLastError = 10; return 0; } @@ -829,6 +831,7 @@ int FDSLoad(const char *name, int fp) fclose(zp); FreeFDSMemory(); FCEU_PrintError("Error reading FDS BIOS ROM image."); + LoadGameLastError = 10; return 0; } @@ -853,6 +856,7 @@ int FDSLoad(const char *name, int fp) { FCEU_PrintError("Error reading auxillary FDS file."); free(fn); + LoadGameLastError = 11; return(0); } FCEU_fclose(tp);