Avoid a demonstrated CMOC -O2 removed-index-reload error with independent calibration and position pointers. Keep established joystick readiness across menus, stabilize shared fire/keyboard scans, and protect input sampling from IRQ interference. Ship pristine QUADPSL04.DSK. Native right-port emulated analog/button checks pass for both directions, four lasting T-piece turns, and steering after keyboard resume. Host input/store/rules/video regressions and unchanged memory guards pass. Preserve personal score disks and record physical/128 KB/audio limits.
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
#ifndef QUAD_TEST_COCO_H
|
|
#define QUAD_TEST_COCO_H
|
|
#include <string.h>
|
|
typedef unsigned char byte;
|
|
typedef unsigned short word;
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
extern byte isCoCo3;
|
|
void rgb(void);
|
|
void paletteRGB(byte slot,byte r,byte g,byte b);
|
|
byte hscreen(byte mode);
|
|
void enableInterrupts(void);
|
|
void resetPalette(byte reset);
|
|
void width(byte columns);
|
|
void setHighSpeed(byte speed);
|
|
word getTimer(void);
|
|
byte hset(word x,word y,byte color);
|
|
|
|
/* Public coco.h key coordinates used by the real keyboard adapter. */
|
|
enum {
|
|
KEY_PROBE_LEFT=0xDF, KEY_BIT_LEFT=0x08,
|
|
KEY_PROBE_RIGHT=0xBF, KEY_BIT_RIGHT=0x08,
|
|
KEY_PROBE_UP=0xF7, KEY_BIT_UP=0x08,
|
|
KEY_PROBE_DOWN=0xEF, KEY_BIT_DOWN=0x08,
|
|
KEY_PROBE_ENTER=0xFE, KEY_BIT_ENTER=0x40,
|
|
KEY_PROBE_BREAK=0xFB, KEY_BIT_BREAK=0x40,
|
|
KEY_PROBE_A=0xFD, KEY_BIT_A=0x01,
|
|
KEY_PROBE_D=0xEF, KEY_BIT_D=0x01,
|
|
KEY_PROBE_W=0x7F, KEY_BIT_W=0x04,
|
|
KEY_PROBE_S=0xEF, KEY_BIT_S=0x04,
|
|
KEY_PROBE_Q=0xFD, KEY_BIT_Q=0x04,
|
|
KEY_PROBE_E=0xDF, KEY_BIT_E=0x01,
|
|
KEY_PROBE_SPACE=0x7F, KEY_BIT_SPACE=0x08,
|
|
KEY_PROBE_H=0xFE, KEY_BIT_H=0x02,
|
|
KEY_PROBE_P=0xFE, KEY_BIT_P=0x04
|
|
};
|
|
byte isKeyPressed(byte probe,byte bit);
|
|
byte readJoystickButtons(void);
|
|
#endif
|