1 |
|
/* |
2 |
|
* C64.h - Put the pieces together |
3 |
|
* |
4 |
< |
* Frodo (C) 1994-1997,2002-2003 Christian Bauer |
4 |
> |
* Frodo Copyright (C) Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
23 |
|
|
24 |
|
#ifdef __BEOS__ |
25 |
|
#include <KernelKit.h> |
26 |
– |
#include <device/Joystick.h> |
26 |
|
#endif |
27 |
|
|
28 |
|
#ifdef AMIGA |
110 |
|
MOS6502_1541 *TheCPU1541; // 1541 |
111 |
|
Job1541 *TheJob1541; |
112 |
|
|
113 |
< |
#ifdef FRODO_SC |
115 |
< |
uint32 CycleCounter; |
116 |
< |
#endif |
113 |
> |
uint32 CycleCounter; // Cycle counter for Frodo SC |
114 |
|
|
115 |
|
private: |
116 |
|
void c64_ctor1(void); |
117 |
|
void c64_ctor2(void); |
118 |
|
void c64_dtor(void); |
119 |
< |
void open_close_joysticks(bool oldjoy1, bool oldjoy2, bool newjoy1, bool newjoy2); |
119 |
> |
void open_close_joysticks(int oldjoy1, int oldjoy2, int newjoy1, int newjoy2); |
120 |
|
uint8 poll_joystick(int port); |
121 |
|
void thread_func(void); |
122 |
|
|
124 |
|
bool quit_thyself; // Emulation thread shall quit |
125 |
|
bool have_a_break; // Emulation thread shall pause |
126 |
|
|
127 |
< |
int joy_minx, joy_maxx, joy_miny, joy_maxy; // For dynamic joystick calibration |
127 |
> |
int joy_minx[2], joy_maxx[2], joy_miny[2], joy_maxy[2]; // For dynamic joystick calibration |
128 |
|
uint8 joykey; // Joystick keyboard emulation mask value |
129 |
|
|
130 |
|
uint8 orig_kernal_1d84, // Original contents of kernal locations $1d84 and $1d85 |
136 |
|
|
137 |
|
private: |
138 |
|
static long thread_invoc(void *obj); |
139 |
+ |
void open_close_joystick(int port, int oldjoy, int newjoy); |
140 |
|
|
141 |
< |
BJoystick *joy[2]; // Joystick objects |
141 |
> |
void *joy[2]; // Joystick objects (BJoystick or BDigitalPort) |
142 |
> |
bool joy_geek_port[2]; // Flag: joystick on GeekPort? |
143 |
|
thread_id the_thread; |
144 |
|
sem_id pause_sem; |
145 |
|
sem_id sound_sync_sem; |
146 |
< |
double start_time; |
146 |
> |
bigtime_t start_time; |
147 |
|
#endif |
148 |
|
|
149 |
|
#ifdef AMIGA |
159 |
|
#endif |
160 |
|
|
161 |
|
#ifdef __unix |
162 |
< |
int joyfd[2]; // File descriptors for joysticks |
162 |
> |
void open_close_joystick(int port, int oldjoy, int newjoy); |
163 |
|
double speed_index; |
165 |
– |
public: |
166 |
– |
CmdPipe *gui; |
164 |
|
#endif |
165 |
|
|
166 |
|
#ifdef WIN32 |