mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
fixed joypad bits
This commit is contained in:
parent
3119be2a1e
commit
e77060458a
@ -80,8 +80,8 @@
|
|||||||
extern void pce_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
extern void pce_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
|
||||||
|
|
||||||
#define JOY_FIRE_B 5
|
#define JOY_FIRE_B 5
|
||||||
#define JOY_START 6
|
#define JOY_SELECT 6
|
||||||
#define JOY_SELECT 7
|
#define JOY_RUN 7
|
||||||
|
|
||||||
void waitvblank (void);
|
void waitvblank (void);
|
||||||
/* Wait for the vertical blanking */
|
/* Wait for the vertical blanking */
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
.byte $40 ; JOY_DOWN
|
.byte $40 ; JOY_DOWN
|
||||||
.byte $80 ; JOY_LEFT
|
.byte $80 ; JOY_LEFT
|
||||||
.byte $20 ; JOY_RIGHT
|
.byte $20 ; JOY_RIGHT
|
||||||
.byte $02 ; JOY_FIRE A ; FIXME: is this correct?
|
.byte $01 ; JOY_FIRE_A
|
||||||
.byte $01 ; JOY_FIRE B ; FIXME: is this correct?
|
.byte $02 ; JOY_FIRE_B
|
||||||
.byte $04 ; JOY_START ; FIXME: is this correct?
|
.byte $04 ; JOY_SELECT
|
||||||
.byte $08 ; JOY_SELECT ; FIXME: is this correct?
|
.byte $08 ; JOY_RUN
|
||||||
|
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@ PC-Engine (PCE) target support for cc65. this is still work in progress and
|
|||||||
a couple of things need to be fixed:
|
a couple of things need to be fixed:
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
joystick support should get verified on real hw
|
- 6 button gamepads are different and need slightly different code
|
||||||
- the masks for buttons may be wrong.
|
|
||||||
- 6 button gamepads are different and need slightly different code
|
|
||||||
|
|
||||||
interruptor support in crt0 (and cfg) is missing
|
interruptor support in crt0 (and cfg) is missing
|
||||||
- clock() should be hooked to a VBL interrupt
|
- clock() should be hooked to a VBL interrupt
|
||||||
|
@ -95,14 +95,16 @@ void main(void)
|
|||||||
{
|
{
|
||||||
gotoxy(0, 12 + i);
|
gotoxy(0, 12 + i);
|
||||||
j = joy_read (i);
|
j = joy_read (i);
|
||||||
cprintf ("pad %d: %02x %-6s%-6s%-6s%-6s%-6s%-6s",
|
cprintf ("pad %d: %02x %-6s%-6s%-6s%-6s%-6s%-6s%-6s%-6s",
|
||||||
i, j,
|
i, j,
|
||||||
(j & joy_masks[JOY_UP])? " up " : " ---- ",
|
(j & joy_masks[JOY_UP])? " up " : " ---- ",
|
||||||
(j & joy_masks[JOY_DOWN])? " down " : " ---- ",
|
(j & joy_masks[JOY_DOWN])? " down " : " ---- ",
|
||||||
(j & joy_masks[JOY_LEFT])? " left " : " ---- ",
|
(j & joy_masks[JOY_LEFT])? " left " : " ---- ",
|
||||||
(j & joy_masks[JOY_RIGHT])? "right " : " ---- ",
|
(j & joy_masks[JOY_RIGHT])? "right " : " ---- ",
|
||||||
(j & joy_masks[JOY_FIRE])? " fire " : " ---- ",
|
(j & joy_masks[JOY_FIRE])? " fire " : " ---- ",
|
||||||
(j & joy_masks[JOY_FIRE2])? "fire2 " : " ---- ");
|
(j & joy_masks[JOY_FIRE2])? "fire2 " : " ---- ",
|
||||||
|
(j & joy_masks[JOY_SELECT])? "select" : " ---- ",
|
||||||
|
(j & joy_masks[JOY_RUN])? " run " : " ---- ");
|
||||||
}
|
}
|
||||||
|
|
||||||
gotoxy(xsize - 10, 3);
|
gotoxy(xsize - 10, 3);
|
||||||
|
Loading…
Reference in New Issue
Block a user