2 An error in instruction size estimation for z80 resulted in an out-of-range relative jump.
8 #pragma disable_warning 85
11 #define PORT_A_KEY_UP 0x0001
12 #define PORT_A_KEY_DOWN 0x0002
13 #define PORT_A_KEY_LEFT 0x0004
14 #define PORT_A_KEY_RIGHT 0x0008
15 #define PORT_A_KEY_1 0x0010
16 #define PORT_A_KEY_2 0x0020
18 #define PORT_B_KEY_UP 0x0040
19 #define PORT_B_KEY_DOWN 0x0080
20 #define PORT_B_KEY_LEFT 0x0100
21 #define PORT_B_KEY_RIGHT 0x0200
22 #define PORT_B_KEY_1 0x0400
23 #define PORT_B_KEY_2 0x0800
25 void displayOn (void) {
29 void SMS_waitForVBlank (void) {
33 void PSGFrame (void) {
41 unsigned int filter_paddle (unsigned int i
) {
45 unsigned int SMS_getKeysPressed (void) {
49 void PSGPlay (void *p
) {
53 void *CH0_psgc
, *CH1_psgc
, *CH2_psgc
, *CH3_psgc
, *VolumeTest_psgc
;
63 kp
=filter_paddle(SMS_getKeysPressed());
64 if (kp
& (PORT_A_KEY_UP
|PORT_B_KEY_UP
))
66 if (kp
& (PORT_A_KEY_RIGHT
|PORT_B_KEY_RIGHT
))
68 if (kp
& (PORT_A_KEY_DOWN
|PORT_B_KEY_DOWN
))
70 if (kp
& (PORT_A_KEY_LEFT
|PORT_B_KEY_LEFT
))
72 if (kp
& (PORT_A_KEY_1
|PORT_B_KEY_1
))
73 PSGPlay(VolumeTest_psgc
);
74 if (kp
& (PORT_A_KEY_2
|PORT_B_KEY_2
))