It is currently Mon Dec 11, 2017 12:14 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jul 11, 2015 9:52 pm 
Offline

Joined: Fri Feb 14, 2014 11:16 pm
Posts: 30
Location: Linköping, Sweden
Ladies and gents!

I'm happy to announce em-fceux, an Emscripten port of FCEUX 2.2.2 for the web.

Play it here: https://tsone.kapsi.fi/em-fceux/

Simply drag and drop a game ROM on the em-fceux window to play. The games and save data is stored locally (using IndexedDB). Keyboard bindings can be customized (defaults to FCEUX SDL driver keys). Gamepads/joysticks should work.

Source code is here: https://bitbucket.org/tsone/em-fceux (also has some in-depth information) License is GPLv2 (as with FCEUX).

Attached are some screenshots of em-fceux running on Google Chrome.

Enjoy! :)


Attachments:
fceux08.jpg
fceux08.jpg [ 135.16 KiB | Viewed 2380 times ]
fceux06.jpg
fceux06.jpg [ 249.19 KiB | Viewed 2380 times ]
fceux03.jpg
fceux03.jpg [ 150.63 KiB | Viewed 2380 times ]
Top
 Profile  
 
PostPosted: Sat Jul 11, 2015 10:12 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2982
Location: Tampere, Finland
Nice one. If you want to include some ROMs besides 2048 in the cart stack by default, feel free to include STREEMERZ there.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Sat Jul 11, 2015 10:36 pm 
Offline

Joined: Fri Feb 14, 2014 11:16 pm
Posts: 30
Location: Linköping, Sweden
thefox wrote:
If you want to include some ROMs besides 2048 in the cart stack by default, feel free to include STREEMERZ there.


Thanks for the permission!


Top
 Profile  
 
PostPosted: Sun Jul 12, 2015 6:20 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19328
Location: NE Indiana, USA (NTSC)
It requires WebGL won't work on any GPU that supports only OpenGL 1.4. WebGL requires at least OpenGL 2.0, which shuts out the Intel GMA 3100 in my laptop. (My laptop is a Dell Inspiron mini 1012 with an Atom N450 CPU.) From Firefox's error console:
Code:
Error: WebGL: Refused to create native OpenGL context because of blacklisting. fceux.js:1:68822
Error: WebGL: WebGL creation failed. fceux.js:1:68822
TypeError: GLctx is undefined

Could em-fceux give a more visible diagnostic for this situation the way http://get.webgl.org/ does?

Make a 2D Canvas version and I'll grant permission for a couple more games.


Top
 Profile  
 
PostPosted: Mon Jul 13, 2015 11:34 pm 
Offline

Joined: Fri Feb 14, 2014 11:16 pm
Posts: 30
Location: Linköping, Sweden
tepples wrote:
It requires WebGL won't work on any GPU that supports only OpenGL 1.4. WebGL requires at least OpenGL 2.0, which shuts out the Intel GMA 3100 in my laptop. (My laptop is a Dell Inspiron mini 1012 with an Atom N450 CPU.) From Firefox's error console:
Code:
Error: WebGL: Refused to create native OpenGL context because of blacklisting. fceux.js:1:68822
Error: WebGL: WebGL creation failed. fceux.js:1:68822
TypeError: GLctx is undefined

You can try turning off the GPU blacklisting in Firefox. If you have issues after this, try to updating the GL driver (or try another driver). Unfortunately there are issues in both driver and WebGL implementations and not all GPUs may work.

tepples wrote:
Could em-fceux give a more visible diagnostic for this situation the way http://get.webgl.org/ does?

Well, at least there should be an error if a required browser feature is not supported.

tepples wrote:
Make a 2D Canvas version and I'll grant permission for a couple more games.

I have no plans to write support for 2D canvas. The NTSC signal and TV emulation effects use shaders and would not work with software canvas.


Top
 Profile  
 
PostPosted: Tue Jul 14, 2015 4:32 am 
Offline

Joined: Thu Jan 02, 2014 7:58 am
Posts: 87
Fun!

_________________
1. I am not a native speaker of English.If my expression is not right or has grammar errors or something, please correct me by PM or reply to my post directly.Thank you in advance.
2. About FC87.


Top
 Profile  
 
PostPosted: Tue Jul 14, 2015 6:44 pm 
Offline
User avatar

Joined: Sun Mar 06, 2011 2:49 pm
Posts: 9
This is very cool! I had actually discovered this earlier today while trying to see if someone had already made an emscripten port of FCEUX, and lo and behold, somebody did!

If it's not too hard to get going, I'd be interested in contributing / making a fork with the following features:
- more classic FCEU-style UI for with some menus at the top for familiarity, less collapsing sidebar menus.
- option to reset
- option to change the scale of the emulation, ala windowed FCEUX video settings
- option to use the same possible input types on both controller ports
- when key binding, don't also send the button presses to the game
- remove confirmation for selecting a new ROM.
- reduce prompt when deleting a ROM to a single confirmation.
- a file open window
- import/export tool for saves and save states
- option to use localStorage for battery saves instead of IndexedDB (yes, I know it's much smaller, but these are NES ROMs, and it's supported more widely)
- optional canvas rendering core (disables TV + NTSC emulation)
- debugger support so it's possible to view CHR and nametables, step through code, view RAM, etc
- (low priority) JS tool scripting interface via embind instead of Lua integration. Would definitely need some rewriting to register callbacks instead of doing polling loops in Lua for advancing the emulation state.
- a non-intrusive embedded mode that lets you remove 90% of the UI and just play a specific URL / binary blob with some default controls, an option to trigger fullscreen.

The last option is very important to me. I distribute try-in-browser versions of some of my ROMs... Like Hyper Cat which uses GameBoy-Online and Final Duck which is using Javatari.js. I also would like to make an lightweight HTML5 editor that can assemble 6502 code and run ROMs directly in the browser -- so that's another reason I'd really like debugger support + non-intrusive embedding.

(Looks like Hyper Cat is a little broken, the screen wasn't normally squashed like that... I wonder if a browser update deprecated something or caused a regression.)

Anyway these are just suggestions, I'd do them myself if I find myself motivated and merge if my contributions are wanted. Anyway, I am just rambling, looks cool!


Top
 Profile  
 
PostPosted: Tue Jul 14, 2015 7:41 pm 
Offline

Joined: Fri Feb 14, 2014 11:16 pm
Posts: 30
Location: Linköping, Sweden
Thanks!

Overkill wrote:
If it's not too hard to get going, I'd be interested in contributing / making a fork with the following features:

Certainly! Make a fork, pull request or submit bugs/feature requests in the bitbucket project issue tracker. There is a short guideline for submitting bugs/feature requests. NOTE: The site and the source code are under GPLv2 and modifications must be published.

Overkill wrote:
- option to reset

Press Ctrl+R to reset.


Top
 Profile  
 
PostPosted: Fri Jul 24, 2015 8:19 am 
Offline

Joined: Fri Feb 14, 2014 11:16 pm
Posts: 30
Location: Linköping, Sweden
Based on tepples and Overkill's feedback, I'm working on 2D canvas renderer support.

Public staging version is here: https://tsone.kapsi.fi/em-fceux-staging/ The 2D canvas/WebGL switch is in the settings tab.

If it doesn't work for you, please shout really loud so I can hear etc. :)

I'm also looking for someone to test this on OS X Safari. Anyone with a Mac?


Top
 Profile  
 
PostPosted: Fri Jul 24, 2015 4:49 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19328
Location: NE Indiana, USA (NTSC)
The 2D canvas version is surprisingly playable in Firefox on Linux, even on a dinky little Atom, for games that aren't heavy twitch games. I'm considering replacing the JSNES on my web site with this once it matures. Do you plan on releasing a package I can install to customize the games in the "stack" without having to install all of Emscripten?

Things I found in my first pass, some based on the last time I tried a JavaScript NES emulator:
  • Audio latency gets longer and longer over time. As I type this while running one of my own games, it's up to a second and a half.
  • Zap Ruder, Vaus Test, and Eighty don't do $#!+.
  • The mouse doesn't do anything in Thwaite.
  • Good: Because the Action 53 mapper (iNES #28) is supported, STREEMERZ, LAN Master, and Lawn Mower can be replaced with the first volume of Action 53 if space in the stack becomes limited.
  • The "ARE YOU REALLY SURE YOU WANT TO DELETE" modals are annoying. It'd be better to just have the X immediately move cartridges out of the stack into a trash can. Clicking the trash can would put all "trashed" ROMs back in the stack, and leaving trash alone for 5 minutes would delete them.
  • Same with "Do you want to run".
  • rgb121 is very sensitive to frameskip and can appear to lock up when the frameskip remains even for an extended period.
  • Good: Sprite Cans 2011 had occasional flicker. This is good because it's accurate.
  • BNTest: When a zipfile contains multiple ROMs, only one is added to the stack.
  • Good: DPCM Letterbox and Boing 2007 worked because they work in FCEUX.


Top
 Profile  
 
PostPosted: Sat Jul 25, 2015 7:43 am 
Offline

Joined: Fri Feb 14, 2014 11:16 pm
Posts: 30
Location: Linköping, Sweden
EDIT: Added mention of Overkill's request on confirm modals when deleting or starting a game.

EDIT: I overlooked the sentences with the thrash can idea for deleted games. I changed my comment to mean easier deletion and starting of games without so many intrusive modals -- not adopting the thrash can itself.

tepples wrote:
Do you plan on releasing a package I can install to customize the games in the "stack" without having to install all of Emscripten?

Extremely good point! I guess Overkill was also requesting this.

tepples wrote:
  • Audio latency gets longer and longer over time. As I type this while running one of my own games, it's up to a second and a half.

You mean on Linux Firefox, right? I know about this issue. Eventually the audio will just stop playing... This may be a bug in Mozilla's Web Audio implementation but I need to check. Webkit-based browsers do not have this problem.

tepples wrote:
  • Zap Ruder, Vaus Test, and Eighty don't do $#!+.

  • em-fceux doesn't use the new PPU in FCEUX as that's more computationally heavy. Do these work without problems with the old PPU in FCEUX 2.2.2?

    tepples wrote:
  • The mouse doesn't do anything in Thwaite.

  • I guess you mean Super NES Mouse, right? It's not supported as I didn't have time to add/enable the peripherals. Currently only Zapper is supported in addition to the regular game controllers.

    tepples wrote:
  • The "ARE YOU REALLY SURE YOU WANT TO DELETE" modals are annoying. It'd be better to just have the X immediately move cartridges out of the stack into a trash can. Clicking the trash can would put all "trashed" ROMs back in the stack, and leaving trash alone for 5 minutes would delete them.
  • Same with "Do you want to run".

  • Noted. I have to think about this -- I mean more direct deleting and starting a game, not the thrash can idea. Overkill requested something similar which now starts to make sense... The modals should be also replaced with something less intrusive to avoid audio stuttering.

    tepples wrote:
  • rgb121 is very sensitive to frameskip and can appear to lock up when the frameskip remains even for an extended period.

  • Browsers can't really guarantee a steady frame rate. Frameskipping happens all the time. Do you think that even-odd frameskipping pattern would be beneficial for other games as well? Is it worth the effort?

    tepples wrote:
  • BNTest: When a zipfile contains multiple ROMs, only one is added to the stack.
  • [/quote]
    In short: one dropped file = one game on stack... The .zip file is not decompressed when dropped on the window. Instead, it's stored in the persistent Emscripten IndexedDB file system in a directory reserved for game files. The game stack essentially lists all files from this directory (plus the built-in games). To load a game, path to a file is passed to the FCEUX game load function, and as FCEUX loads the first game it sees from the .zip, it appears the .zip only has one game while it may indeed have multiple.


    Last edited by tsone on Sat Jul 25, 2015 8:16 am, edited 2 times in total.

    Top
     Profile  
     
    PostPosted: Sat Jul 25, 2015 7:48 am 
    Offline
    User avatar

    Joined: Mon Jan 03, 2005 10:36 am
    Posts: 2982
    Location: Tampere, Finland
    tepples wrote:
    ...and leaving trash alone for 5 minutes would delete them.

    Not a fan of this idea. Just leave the trash there and have an option to empty the "trash can".

    _________________
    Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


    Top
     Profile  
     
    PostPosted: Sat Jul 25, 2015 7:59 am 
    Offline

    Joined: Fri Feb 14, 2014 11:16 pm
    Posts: 30
    Location: Linköping, Sweden
    Thanks to everyone for the bug reporting and feature requests so far! It's however getting hard to keep track of them, so I want to kindly remind of the project issue tracker. Issues can be added anonymously (doesn't require bitbucket account). When adding an issue, please follow the "no bullshit" guideline. Thanks for understanding! ;)


    Top
     Profile  
     
    PostPosted: Sat Jul 25, 2015 10:22 am 
    Offline
    User avatar

    Joined: Sun Jan 22, 2012 12:03 pm
    Posts: 5886
    Location: Canada
    thefox wrote:
    tepples wrote:
    ...and leaving trash alone for 5 minutes would delete them.

    Not a fan of this idea. Just leave the trash there and have an option to empty the "trash can".

    It's a bit bizarre to suggest the user wait for an essentially unpredictable, but relatively short delay for deletion. This really should be put explicitly under the user's control, a deliberate and predictable action.

    Maybe you're thinking about it like real world trash that gets taken away by the municipality on a regular basis? There are a thousand reasons why that is sensible for your real world garbage, but a thousand reasons why it is not sensible for organizing your virtual NES collection.


    Top
     Profile  
     
    PostPosted: Sat Jul 25, 2015 10:40 am 
    Offline

    Joined: Sun Sep 19, 2004 11:12 pm
    Posts: 19328
    Location: NE Indiana, USA (NTSC)
    tsone wrote:
    [Increasing latency] may be a bug in Mozilla's Web Audio implementation but I need to check. Webkit-based browsers do not have this problem.

    I wish you luck on this because "best viewed with Chrome; click here to download and install Chrome" is no better than "best viewed with FCEUX; click here to download and install native FCEUX".

    tsone wrote:
    tepples wrote:
    Zap Ruder, Vaus Test, and Eighty don't do $#!+.

    em-fceux doesn't use the new PPU in FCEUX as that's more computationally heavy. Do these work without problems with the old PPU in FCEUX 2.2.2?

    Yes. They just require Zapper, Arkanoid Controller, and Four Score support respectively. It wasn't obvious how to enable the Zapper.

    Quote:
    Do you think that even-odd frameskipping pattern would be beneficial for other games as well? Is it worth the effort?

    I don't know the intricacies of waiting for vblank and presenting the next frame on 2D canvas or WebGL. But given how many NES games use a 30 Hz flicker to indicate mercy invincibility, I'd recommend showing every third frame or every fifth frame if the machine isn't fast enough to show every frame.

    tepples wrote:
    FCEUX loads the first game it sees from the .zip

    Then perhaps one of us should request better handling of multi-ROM zipfiles on FCEUX's bug tracker.

    rainwarrior wrote:
    It's a bit bizarre to suggest the user wait for an essentially unpredictable, but relatively short delay for deletion.

    It's modeled after the "Undo Send" delay that Gmail users can enable on the basis that undo is better than confirmation.


    Top
     Profile  
     
    Display posts from previous:  Sort by  
    Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

    All times are UTC - 7 hours


    Who is online

    Users browsing this forum: No registered users and 11 guests


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum

    Search for:
    Jump to:  
    Powered by phpBB® Forum Software © phpBB Group