--- Frodo4/Src/C64.h 2003/07/01 17:51:17 1.2 +++ Frodo4/Src/C64.h 2010/04/21 21:59:11 1.8 @@ -1,7 +1,7 @@ /* * C64.h - Put the pieces together * - * Frodo (C) 1994-1997,2002-2003 Christian Bauer + * Frodo Copyright (C) Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +23,6 @@ #ifdef __BEOS__ #include -#include #endif #ifdef AMIGA @@ -37,6 +36,16 @@ #endif +// Sizes of memory areas +const int C64_RAM_SIZE = 0x10000; +const int COLOR_RAM_SIZE = 0x400; +const int BASIC_ROM_SIZE = 0x2000; +const int KERNAL_ROM_SIZE = 0x2000; +const int CHAR_ROM_SIZE = 0x1000; +const int DRIVE_RAM_SIZE = 0x800; +const int DRIVE_ROM_SIZE = 0x4000; + + // false: Frodo, true: FrodoSC extern bool IsFrodoSC; @@ -101,15 +110,13 @@ public: MOS6502_1541 *TheCPU1541; // 1541 Job1541 *TheJob1541; -#ifdef FRODO_SC - uint32 CycleCounter; -#endif + uint32 CycleCounter; // Cycle counter for Frodo SC private: void c64_ctor1(void); void c64_ctor2(void); void c64_dtor(void); - void open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2); + void open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2); uint8 poll_joystick(int port); void thread_func(void); @@ -117,7 +124,7 @@ private: bool quit_thyself; // Emulation thread shall quit bool have_a_break; // Emulation thread shall pause - int joy_minx, joy_maxx, joy_miny, joy_maxy; // For dynamic joystick calibration + int joy_minx[2], joy_maxx[2], joy_miny[2], joy_maxy[2]; // For dynamic joystick calibration uint8 joykey; // Joystick keyboard emulation mask value uint8 orig_kernal_1d84, // Original contents of kernal locations $1d84 and $1d85 @@ -129,12 +136,14 @@ public: private: static long thread_invoc(void *obj); + void open_close_joystick(int port, int oldjoy, int newjoy); - BJoystick *joy[2]; // Joystick objects + void *joy[2]; // Joystick objects (BJoystick or BDigitalPort) + bool joy_geek_port[2]; // Flag: joystick on GeekPort? thread_id the_thread; sem_id pause_sem; sem_id sound_sync_sem; - double start_time; + bigtime_t start_time; #endif #ifdef AMIGA @@ -150,10 +159,8 @@ private: #endif #ifdef __unix - int joyfd[2]; // File descriptors for joysticks + void open_close_joystick(int port, int oldjoy, int newjoy); double speed_index; -public: - CmdPipe *gui; #endif #ifdef WIN32