Jump to content
DirtyHairy

CDF Support in 6502.ts / Stellerator

Recommended Posts

I paired a Bluetooth stick to my iPhone 7 Plus.
It can pair as an iCade stick, or in other ways.

It is a Gen Game S3.
Link: https://www.gearbest.com/blog/how-to/how-to-connect-gen-game-s3-gamepad-to-android-ios-and-pc-1419

I tried all modes.
The most I could get out of Mobile Safari is Pause / Unpause works.
Also twice I had the menu screen selector moving up, but it was stuck in the up, and nothing would stop or change direction.
One time I had it up in the level selection, and it registered right, but again it was stuck on right, and nothing would stop or change it.

Also each mode has 2 selections. The other selection has the top / bottom buttons change volume, the right shoulder button start / stop iTunes music playback :), and the bottom start / select button exits the application.

 

Too bad; thanks for the effort, though ;) This sounds more like it is emulating keyboard presses (which all get stuck as the browser doesn't send proper keyup events). If you still feel like troubleshooting, please head over to the HTML5 gamepad test page I quoted in #21 and check whether you get any readings there.

Share this post


Link to post
Share on other sites

That works, though the sound's broken again on iOS.  Sound still works in Safari on the Mac.

 

 

Nice :) None of my changes did touch audio in any way; I assume that audio on iOS with the current code is just hit'n'miss and depends on which events are fired at which point in the interaction. I'll try to come up with a clean fix for that once I find time.

Share this post


Link to post
Share on other sites

I don't like the blurry look, so I turn smooth scaling off.  After doing that things like the stars will change thicknesses as you fly up/down, which looks odd.

 

 

 

A late follow-up: I am currently preparing the embedded version of Stellerator for release and, going over my scaling code again, realized that I can actually do better on HIDPI / Retina displays by taking the pixel ratio into account and increasing canvas resolution accordingly. I have changed the live build accordingly; to my eyes, the non-fullscreen image w/o smoothing has noticeably less aliasing now.

Edited by DirtyHairy

Share this post


Link to post
Share on other sites

Maybe some of this information will help?

I wanted to note that a paired Mac Bluetooth Keyboard to  my iPhone 7+ does this:

 

P pauses & unpauses

shift-R restarts the game

return makes it full screen

 

The rest doesn't work:

wasd v / shift does not give joystick / button. 

arrow keys move around in the browser

Page up Page down again move the browser

 

Things like F1 F2 dim / brighten screen F7 8 9 10 11 12 control iTunes music playback. So those have iOS control.

Command-Space Bar opens iOS search window.

 

command / option / control / shift modifiers and any other key or combination do not do anything running 6502.ts Atari 2600 web emulator.

 

Still amazing on laptop to run a 2600 in a browser window!

Share this post


Link to post
Share on other sites

Maybe some of this information will help?

I wanted to note that a paired Mac Bluetooth Keyboard to  my iPhone 7+ does this:

 

P pauses & unpauses

shift-R restarts the game

return makes it full screen

 

The rest doesn't work:

wasd v / shift does not give joystick / button. 

arrow keys move around in the browser

Page up Page down again move the browser

 

Things like F1 F2 dim / brighten screen F7 8 9 10 11 12 control iTunes music playback. So those have iOS control.

Command-Space Bar opens iOS search window.

 

command / option / control / shift modifiers and any other key or combination do not do anything running 6502.ts Atari 2600 web emulator.

 

Still amazing on laptop to run a 2600 in a browser window!

 

 

Thank for the feedback, iesposta. I suppose that something is wrong with the keyboard events sent by safari mobile. I got myself a shiny new iPad last week, and I'll try to get 6502.ts into a fully workable state on iDevices :) In particular, I want to add touch controls, proper support for running as a homescreen app (without the browser bar) and the capability to run offline. The end result should behave similar to a regular iOS app ;)

Edited by DirtyHairy

Share this post


Link to post
Share on other sites

This idea might help.

Since these emulators aready have touch screen, bluetooth support, and use Stella 5.1.1 and other

Open Source licences, the source code is there if you know or can follow how to build it in Xcode.

I never had anything successfully build in Xcode. Give me the command prompt.

 

The 2600.emu, PCE.emu, MSX.emu, NES.emu and others were cheap apps.

Cydia store stopped selling them directly, and my communication with the author ended

about 3 years ago. Although he continued to sell them and had updates to Android release AND iOS updates

that were not released.

The source code, per the open source license, is there, but building with a free developer account only

lets it run it 7 days, or until a hard shutdown. Then it needs re-signed and reloated.

A paid developer account lets your iOS code run on your device for 1 year before needing resigned and reinstalled.

 

His site shows he took a break for the last few years, but now his page shows fixes and new 

development, even for iOS 2600.emu using Stella 5.1.1!

There's no way to get a binary for iOS.

 

He uses the same "foundation and overlay" for every emulator that has touch screen or if a controller is 

there or bluetooth controller, you can choose to have the onscreen controls disappear.

Maybe you can learn from this, or use it directly? I don't know.

http://www.explusalpha.com/home/general-info/development

 

Share this post


Link to post
Share on other sites

The keyboard info shows "P"and "Shift-R"working.

Just the rest of the keys you want to use don't.

 

If "P" or "R"could be mapped to joystick button, or game start, at least iOS could get past the Title Screens and start.

Share this post


Link to post
Share on other sites

The keyboard info shows "P"and "Shift-R"working.

Just the rest of the keys you want to use don't.

 

If "P" or "R"could be mapped to joystick button, or game start, at least iOS could get past the Title Screens and start.

 

 

I remember the precise issue now: Safari mobile does not send the key code in "keyup" events. This is no issue for events that trigger on keydown (essentially pause, reset and fullscreen), but this breaks all emulated buttons; this is the reason why those don't work. So, I am afraid this is not a question of mapping.

 

However, I have added my first iteration of touch support  8)  I have not gone for a overlay, but for a multitouch scheme that partitions the video canvas into the for quadrants NW (top left), NE (top right), SE (bottom right), SW (bottom left):

  • NW: double tap toggles fullscreen, touch and hold to enable "alt" mode (see below)
  • SW: fire
  • NE / SE: touch and hold anywhere to enable a "virtual joystick". Move your finger from your initial touch point to drag the joystick in the different directions

In "alt" mode (while you are touching NW):

  • SW: pause
  • NE: select
  • SE: reset

I still want to do some tweaking and add some options to adjust (joystick sensitivity, left-handed mode, etc.), but I have successfully navigated a few games, including a few levels of Stay Frosty 2 and two levels of Draconian. Obviously, the scheme will not work well to all games under the sun (I can't imagine to play Thrust this way), but overall, it feels fine to me. So, if you find time, take it for a test drive and tell me what you think.

 

I also have added the necessary meta tag magic to remove the browser bar if you add and run the page to the home screen. However, at least on my iPad, moving the homescreen app to the background will reload the page once the app is reactivated, while a plain browser tab survives Safari moving into the background, so that's a bit of a bummer. There's nothing that can be done about it easily though, so I guess it is either Safari and browser bar or home screen and foreground-only ;) Again, I still have some tweaking to do (adding true offline capabilities and a proper icon), but it's a start.

 

Btw., thanks for the pointer on Ex Plus. I have some iOS development experience and access to a full-fledged developer account, so I'll definitely give it a spin and check out how touch is implemented there.

Edited by DirtyHairy

Share this post


Link to post
Share on other sites

I've added a few settings related to touch that allow to control the sensitivity of the virtual joystick and that can be used to switch the controls to left-handed mode (essentially mirrored horizontally). I've also made some adjustments to the virtual joystick to assign axes according to the angle of the finger in a circle around the initial touch point. The scheme now feels pretty decent to me, and most games that I tried play well --- I even managed to pull of a decent game of Draconian :)

 

Here are two drawings of the control scheme that should help to understand how it works (I am currently updating the documentation):

 

[attachment=568522:2600_touch.jpg]

[attachment=568523:2600_touch_alt.jpg]

 

EDIT: I forgot to post: some time around January, I also added a workaround to make iOS audio less quirky. Now, audio starts as soon as you touch the screen once the emulation has started running --- not perfect, but good enough imho ;)

Edited by DirtyHairy

Share this post


Link to post
Share on other sites

I have not seen it mentioned here (perhaps I overlooked it), but as an fyi I just tested the browser version on my iPad mini with a Gamevice controller and it works! So far though, the stand alone launched from the home screen doesnt see the Gamevice controller. I just havent figured how to make the browser version go full screen (havent figured out how to pull up the keyboard to hit the virtual touch screen 'enter' key).

Share this post


Link to post
Share on other sites

I have not seen it mentioned here (perhaps I overlooked it), but as an fyi I just tested the browser version on my iPad mini with a Gamevice controller and it works! So far though, the stand alone launched from the home screen doesnt see the Gamevice controller. I just havent figured how to make the browser version go full screen (havent figured out how to pull up the keyboard to hit the virtual touch screen 'enter' key).

 

 

Great, thanks a lot, good to know. To really debug what is going on, I‘d. have to get one of those things myself; however, they are pretty expensive. What you could do is to go to the HTML5 gameplay tester that I linked earlier on this thread, put it on the homescreen and check whether you get any readings there.

 

Unfortunately, it is not possible to get rid of the browser toolbar in Safari mobile as it does not support the HTML5 fullscreen spec, so there is no way to go „more fullscreen“ beyond double-tapping the upper left corner of the canvas.

Share this post


Link to post
Share on other sites

Been a while since I had a chance to get back to this but using a Gamevice with my iPhone 6 Plus works as well.

 

 

Cool, thanks a lot for the feedback ;) I am still planning to add support for remapping gameplay layouts in the GUI at some point, which would fix most other controllers with issues.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...