Giter Site home page Giter Site logo

Comments (24)

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024 1

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

Works like a charm. It's totally fluent in Safari in full screen mode 😎. Scramble was one of my favorite games. Loved it 😍.

Bildschirmfoto 2020-04-13 um 18 58 41

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

grafik

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

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.

mithrendal avatar mithrendal commented on May 27, 2024

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

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.

mithrendal avatar mithrendal commented on May 27, 2024

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

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.

mithrendal avatar mithrendal commented on May 27, 2024

😁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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

Yes, it shows up:

Bildschirmfoto 2020-04-13 um 22 47 27

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

are the numbers of the axes changing in https://html5gamepad.com/ ?

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

Yes, numbers are changing.

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

Numbers vary from -1 to 1. Strange enough, idle is not 0, but 0.00392.

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

then I do something wrong in safari πŸ™„ let me check on my machine...

But in firefox you can play right ?

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

But in firefox you can play right ?

Yes, but only PRG files are working. T64 support is broken 🀭.

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

tomorrow πŸ˜…

πŸ₯± Need to get some sleep, too. Tell Rambo to refuel the chopper. We'll need it tomorrow.

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

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.

mithrendal avatar mithrendal commented on May 27, 2024

A9D75EFD-2199-4ACB-A69D-B78792A7810D

D14851D8-CC13-47EA-8A8E-ACF9A023282D

the old ones and the "ugly A1000 mouse"πŸ™„ must have been trashed to garbage ... of course not by myself 😭.

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

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.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

I've got the exactly same Competition Pro USB model.

Chrome 80.0.3987.163 (wow, what a cool versioning scheme 😎)

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on May 27, 2024

Came in yesterday. The new model seems to have much better reaction times... 🀀

IMG_0924

from virtualc64web.

mithrendal avatar mithrendal commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.