extern void pulse_joydat(int joy, int xy, int dir);
-extern void inputdevice_vsync (void);
-extern void inputdevice_hsync (bool);
-extern void inputdevice_reset (void);
+extern void inputdevice_vsync(void);
+extern void inputdevice_hsync(bool);
+extern void inputdevice_hsync_strobe(void);
+extern void inputdevice_reset(void);
extern void write_inputdevice_config (struct uae_prefs *p, struct zfile *f);
extern void read_inputdevice_config (struct uae_prefs *p, const TCHAR *option, TCHAR *value);
static int lightpen_port[NORMAL_JPORTS];
int cubo_enabled;
uae_u32 cubo_flag;
-#define POTDAT_DELAY_PAL 8
-#define POTDAT_DELAY_NTSC 7
+#define POTDAT_DELAY 8
static int use_joysticks[MAX_INPUT_DEVICES];
static int use_mice[MAX_INPUT_DEVICES];
static void cap_check(bool hsync)
{
- int joy, i;
-
- for (joy = 0; joy < 2; joy++) {
- for (i = 0; i < 2; i++) {
+ for (int joy = 0; joy < 2; joy++) {
+ for (int i = 0; i < 2; i++) {
bool cancharge = true;
int charge = 0, dong, joypot;
uae_u16 pdir = 0x0200 << (joy * 4 + i * 2); /* output enable */
if (pot_dat_act[joy][i] && hsync) {
pot_dat[joy][i]++;
}
- /* first 7 or 8 lines after potgo has been started = discharge cap */
+ /* first 8 lines after potgo has been started = discharge cap */
if (pot_dat_act[joy][i] == 1) {
- if (pot_dat[joy][i] < (currprefs.ntscmode ? POTDAT_DELAY_NTSC : POTDAT_DELAY_PAL)) {
+ if (pot_dat[joy][i] < POTDAT_DELAY) {
charge = -2; /* fast discharge delay */
cancharge = hsync;
} else {
handle_input_event(nr, state, max, (autofire ? HANDLE_IE_FLAG_AUTOFIRE : 0) | HANDLE_IE_FLAG_PLAYBACKEVENT);
}
-void inputdevice_hsync (bool forceread)
+// strobe slot is clock for pot counters
+void inputdevice_hsync_strobe(void)
{
cap_check(true);
+}
+
+void inputdevice_hsync(bool forceread)
+{
#ifdef CATWEASEL
catweasel_hsync ();