//
// "Alpine" file loading
// Since the developers were coming after us with torches and pitchforks, we decided to
-// allow this kind of thing. ;-) But ONLY FOR THE DEVS, DAMMIT! O_O
+// allow this kind of thing. ;-) But ONLY FOR THE DEVS, DAMMIT! >:-U O_O
//
bool AlpineLoadFile(char * path)
{
//
static bool CheckExtension(const char * filename, const char * ext)
{
+ // Sanity checking...
+ if ((filename == NULL) || (ext == NULL))
+ return false;
+
const char * filenameExt = strrchr(filename, '.'); // Get the file's extension (if any)
+
+ if (filenameExt == NULL)
+ return false;
+
return (strcasecmp(filenameExt, ext) == 0 ? true : false);
}
JaguarDasm(0x89CA56, 0x200);
WriteLog("-------------------------------------------\n");
JaguarDasm(0x802B48, 0x200);
+ WriteLog("\n\nM68000 disassembly at $802000...\n");
+ JaguarDasm(0x802000, 6000);
+ WriteLog("\n");//*/
#endif
}
// This is bad--we're assuming that a bit is set in the last case. Might not be so!
// NOTE: values $7, B, D, & E are only legal ones for pad 0, (rows 3 to 0, in both cases)
// $E, D, B, & 7 are only legal ones for pad 1
-// So the following code is WRONG!
+// So the following code is WRONG! (now fixed! ;-)
+// Also: we should explicitly check for those bit patterns, as other patterns
+// are legal and yield other controllers... !!! FIX !!!
+#warning "!!! Need to explicitly check for the proper bit combinations! !!!"
if (!(pad0Index & 0x01))
pad0Index = 0;