Comments (24)
What about chrome ?
Firefox: π
Chrome: π
Safari: π
Safari also has problems running Javatari. I'm missing Steve so much πͺ.
BTW, are you using a real Competition Pro from back in the day with a retro adapter, or a fake Competition Pro USB? There seems to be a newer fake USB variant on Amazon (SL-650212) which is told to have better reaction times π€€. Unfortunately, I cannot find the information about the improved reaction time any more, but it was there... somewhere...
from virtualc64web.
Works like a charm. It's totally fluent in Safari in full screen mode π. Scramble was one of my favorite games. Loved it π.
from virtualc64web.
connected a good old competition pro to vC64web !! π
and added an reset button...
strangly when I go to the website I have to connect the gamepad after vc64web is loaded ... only then html5 sends me an connected event ... Maybe it is already there when it is already connected and therefore it sends me no "connected" event π€
from virtualc64web.
only then html5 sends me an connected event ...
I guess you need to
- either register as some kind of USB listener or
- poll the connected USB devices when virtualC64web launches
If I remember correctly, the first method is used in original VirtualC64. I forgot about the details, because talking to USB devices in macOS is π€’. It can be completely different in a browser though.
from virtualc64web.
houstonπ« I have a problem ... choplifter works fine but ... fort apocalypse which yesterday worked ... today makes troubles ... the game sends thousands of MSG_CHARSET messages which are written to the output of the HTML textarea and is slowing down the game ... once I deactivate the log output completely , the game runs fine with gamepad controllers
The question is why is the core sending me this message I bet yesterday it did not so ... other games do not so either ...
from virtualc64web.
Background: MSG_CHARSET informs the GUI that the C64 switches from lower case character mode to upper case character mode or vice versa. When this message arrives in original VirtualC64, the key caps on the virtual keyboard are updated. (Maybe it would be better to poll this bit. I didn't expect a program to switch it that frequently...)
case 0x18: // Memory address pointers
// Inform the GUI if the second bit changes. It switches between
// upper case or lower case mode.
if ((value & 0x02) != (memSelect & 0x02)) {
memSelect = value;
c64->putMessage(MSG_CHARSET);
return;
}
memSelect = value;
return;
Are you sure the game didn't send the messages yesterday? π€ If the game does work, I don't think it's a bug. Maybe it's best just to omit the output for this message in the debug function.
BTW, did you already check in the latest changes? I tried with the current code on the gamepad branch. It does recognize my USB competition Pro if I plug it in after VC64web has launched, but I cannot steer my fighter with it πͺ.
from virtualc64web.
MSG_CHARSET
ok I will ignore MSG_CHARSET then it works well
but I cannot steer my fighter with it
Do you see output in the debug textarea ?
It should write "1PULL_UP" or "2PRESS_FIRE"
from virtualc64web.
Do you see output in the debug textarea ?
I can see the messages in Firefox. But they don't show up in Safari.
from virtualc64web.
πonly tested in firefox .... does your gamepad show up in https://html5gamepad.com/ with safari are the axes changing when you move the joystick ?
from virtualc64web.
More observations (all actions are performed after VC64web has been launched)
Firefox:
Connecting joystick to USB port: Joystick does not show up in menu
Pressing button: Joystick does show up in the menu
Safari:
Connecting joystick to USB port: Joystick does show up in menu
Pressing button: Joystick does not show up in the menu
from virtualc64web.
Yes, it shows up:
from virtualc64web.
are the numbers of the axes changing in https://html5gamepad.com/ ?
from virtualc64web.
Yes, numbers are changing.
from virtualc64web.
Numbers vary from -1 to 1. Strange enough, idle is not 0, but 0.00392.
from virtualc64web.
then I do something wrong in safari π let me check on my machine...
But in firefox you can play right ?
from virtualc64web.
But in firefox you can play right ?
Yes, but only PRG files are working. T64 support is broken π€.
from virtualc64web.
gamepad: yes I on my safari (macos catalina) too. Same story. Strangely sometimes the webpage https://html5gamepad.com/ does not recognize them either or axis values are not changing πΆ...
T64 have not done it ...π later ... tomorrow π
from virtualc64web.
tomorrow π
π₯± Need to get some sleep, too. Tell Rambo to refuel the chopper. We'll need it tomorrow.
from virtualc64web.
I tested various other websites with gamepad support on safari. They all sometimes are not working. Safari even crashed several times... One showed the same behaviour as our vc64web constantly having PULL_UP and PULL_LEFT on. Upon several restarts of the safari ... switching the gamepad physically out of the usb port and reinserting it ... pressing some buttons all of them finally worked. And so is the vc64web ... it works somewhen occasionally like the other websites which use gamepads ... So I believe more and more it is the safari browser who has buggy gampad support. Or maybe it has problems with the Competition Pros circuits π³? Maybe better check other controllers ... Edit: checked another "noname" controller ... same unpredictable result ... mostly works ... sometimes not ...
Firefox shows consistent behaviour...
What about chrome ?
from virtualc64web.
the old ones and the "ugly A1000 mouse"π must have been trashed to garbage ... of course not by myself π.
from virtualc64web.
There are some gampad API wrappers ... I think we don't need them ... but they are a good place to spot problems ... one reports of change in API since chrome 78 where navigator.getGamePads() returns a list instead of an array ...
the fix is very easy see here
ArunMichaelDsouza/joypad.js#1
but unless this is really a problem I don't like to change the simple straightforwardness of our code...
which version of chrome did you test with ?
from virtualc64web.
I've got the exactly same Competition Pro USB model.
Chrome 80.0.3987.163 (wow, what a cool versioning scheme π)
from virtualc64web.
Came in yesterday. The new model seems to have much better reaction times... π€€
from virtualc64web.
The new USB joysticks have a design flaw I think. That is the two additional buttons in triangle shape... In heavy action .... I do press the left triangle accidently when steering to the right ... because my left hands thumb holds it just where that triangle button is... I will change that in the joystick event ... there I know exactly which button and I will let that button not trigger fire ...
from virtualc64web.
Related Issues (20)
- Running C64-Cursor on iPad/Safari HOT 5
- compiling errors HOT 3
- cannot start D64 when building with latest emsdk HOT 5
- stuck physical keyboard on certain key combinations HOT 2
- Set other ROMs as default? HOT 5
- Does not load basic programs properly HOT 13
- margin-bottom on virtual keyboard for modern iOS devices HOT 1
- Bruce Lee crashes (any version) after several levels HOT 27
- setting action buttons on top of nav bar HOT 1
- improve mapping of (short cut) keys HOT 2
- work on defining actions and keyboard mappings
- Touch controls in iPhone HOT 41
- How does one drag a link from csdb.dk into the drop zone? HOT 4
- Touch controls in iPhone Part2 HOT 12
- use HOT 1
- xbox wireless controllers axis sticks HOT 1
- Touch example crashes on touch devices HOT 3
- Unable to select c64 roms on iOS HOT 2
- reworked css based virtual keyboard HOT 3
- Datasette STOP and PLAY HOT 5
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 virtualc64web.