Comments (2)
Yeah that's the case when the "keyboard joystick emulation" is active (which is enabled by calling cpc_set_joystick_type(cpc, CPC_JOYSTICK_DIGITAL)
which allows to feed joystick input throught the host machine's keyboard), in that case the space key is the joystick's fire button, and the keyboard arrow keys are the directions.
The "routing" happens here in cpc_key_down()
and cpc_key_up()
:
Lines 663 to 695 in c011ef1
...the idea of this "either / or routing" is that pressing the space or arrow keys shouldn't feed both keyboard and joystick input on the same keys.
There's a second way to feed joystick input into the emulator via the cpc_joystick()
function (not the best name tbh):
Lines 707 to 710 in c011ef1
...normally this is intended for the case the there's an actual joystick or gamepad attached to the host machine.
But in general: you should just disable/ignore the "keyboard joystick emulation" by not setting the joystick type via cpc_set_joystick_type()
, and instead provide the joystick input via the function cpc_joystick()
.
PS: I realize now that all those function names could be a bit more intuitive ;)
from chips.
I get it know, thanks for the detailed explanation.
from chips.
Related Issues (20)
- Reminder: potential bug in m6502 for NMI detection HOT 3
- Known Issues: CPC
- Are you interested in 8086? HOT 2
- Z80 Chip doesn't handle LD A,(IX+n) correctly HOT 4
- Z80 BUSACK/BUSREQ/RESET pins HOT 2
- z80: fetch opcode timing HOT 1
- surprising behaviour of cycle-stepped z80 after PC reset HOT 2
- Z80 wait state handling incorrect? HOT 1
- m6502 doesn't clear D on BRK HOT 1
- Q: page-cross behaviour on 6502 SHY opcode HOT 3
- Cycle-stepped Motorola 68K HOT 2
- m6569: c accesses half a cycle too late? HOT 2
- Caps Shift doesn't work on ZX Spectrum
- Z80: having _wait() before _mwrite(addr, data) looks incorrect. HOT 3
- Z80 XOR Malfunction HOT 12
- Glitch after snapshot save and load HOT 1
- CPC: Implement Version 3 Snapshots
- [c1541] State of 1541 emulation? HOT 1
- Please consider adding the i8259 interrupt controller HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chips.