#floppyImage1 = ./disks/MoebiusIIA.dsk
#floppyImage2 = ./disks/MoebiusIIB.dsk
# Yes
-floppyImage1 = ./disks/wind_walker_1.dsk
+#floppyImage1 = ./disks/wind_walker_1.dsk
# Yes
#floppyImage1 = ./disks/dino_eggs.dsk
# ??? 1, yes; 2, no
#floppyImage2 = ./disks/u2player-jlh.dsk
# Yes
#floppyImage1 = ./disks/TheHeist.dsk
+# Yes
+#floppyImage1 = ./disks/ult31snd.dsk
+#floppyImage2 = ./disks/ult32snd.dsk
+# Yes (key repeat is too high)
+#floppyImage1 = ./disks/bandits.dsk
+# Yes
+#floppyImage1 = ./disks/SpareChange.dsk
+# Yes
+#floppyImage1 = ./disks/lode_runner.dsk
+# Yes
+floppyImage1 = ./disks/championship_lode_runner.dsk
-# OpenGL options: 1 - use OpenGL rendering, 0 - use old style rendering
-
-useOpenGL = 1
-
# OpenGL filtering type: 1 - blurry, 0 - sharp
glFilterType = 0
fullscreen = 0
-# Backend renderer (OpenGL dependent): 0 - regular, 1 - "TV" style
-
-#renderType = 0
-
-# NTSC/PAL options: 1 - NTSC, 0 - PAL
-
-hardwareTypeNTSC = 1
-
-# Framskip options: 0 - no skip, 1-N - draw every Nth frame
-# Note: Skipping frames may cause strange visual side effects--don't bother
-# reporting these unless they occur with a frameskip value of 0!
-
-frameSkip = 0
-
# Joystick options: 1 - use joystick, 0 - don't use
useJoystick = 0
//Kill the DOS ROM in slot 6 for now...
//not
memcpy(rom + 0xC600, diskROM, 0x100);
+// memcpy(rom + 0xC700, diskROM, 0x100); // Slot 7???
WriteLog("About to initialize video...\n");
+
if (!InitVideo())
{
std::cout << "Aborting!" << std::endl;
switch (event.type)
{
case SDL_TEXTINPUT:
-// if (event.key.keysym.unicode != 0)
-// {
//Need to do some key translation here, and screen out non-apple keys as well...
+//(really, could do it all in SDL_KEYDOWN, would just have to get symbols &
+// everything else done separately. this is slightly easier. :-P)
// if (event.key.keysym.sym == SDLK_TAB) // Prelim key screening...
if (event.edit.text[0] == '\t') // Prelim key screening...
break;
-// lastKeyPressed = event.key.keysym.unicode;
lastKeyPressed = event.edit.text[0];
keyDown = true;
+
//kludge: should have a caps lock thingy here...
//or all uppercase for ][+...
if (lastKeyPressed >= 'a' && lastKeyPressed <='z')
lastKeyPressed &= 0xDF; // Convert to upper case...
-// }
break;
case SDL_KEYDOWN:
else if (event.key.keysym.sym == SDLK_RETURN)
lastKeyPressed = 0x0D, keyDown = true;
+ // Fix CTRL+key combo...
+ if (event.key.keysym.mod & KMOD_CTRL)
+ {
+ if (event.key.keysym.sym >= SDLK_a && event.key.keysym.sym <= SDLK_z)
+// {
+ lastKeyPressed = (event.key.keysym.sym - SDLK_a) + 1;
+//printf("Key combo pressed: CTRL+%c\n", lastKeyPressed + 0x40);
+// }
+ }
+
// Use ALT+Q to exit, as well as the usual window decoration method
if (event.key.keysym.sym == SDLK_q && (event.key.keysym.mod & KMOD_ALT))
running = false;
#include <stdarg.h>
#include <stdint.h>
-#define MAX_LOG_SIZE 10000000 // Maximum size of log file (10 MB)
+// Maximum size of log file (10 MB ought to be enough for anybody)
+#define MAX_LOG_SIZE 10000000
static FILE * log_stream = NULL;
static uint32_t logSize = 0;
+static bool logDone = false;
+
bool InitLog(const char * path)
{
return true;
}
+
void LogDone(void)
{
if (log_stream)
fclose(log_stream);
}
+
//
// This logger is used mainly to ensure that text gets written to the log file
// even if the program crashes. The performance hit is acceptable in this case!
//
void WriteLog(const char * text, ...)
{
- if (!log_stream)
+ if (!log_stream || logDone)
return;
va_list arg;
{
fflush(log_stream);
fclose(log_stream);
- exit(1);
- }//*/
+ logDone = true;
+ }
va_end(arg);
fflush(log_stream); // Make sure that text is written!
}
+