All Uzebox Games Online! (Cuzebox and Emscripten)

The Uzebox now have a fully functional emulator! Download and discuss it here.
Post Reply
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

All Uzebox Games Online! (Cuzebox and Emscripten)

Post by nicksen782 »

I know that Cuzebox and Uzem have been adapted to Emscripten for a while now. However, each new version of the game needed to have the game and the Emscripten build of the emulator in it. Long have I (and likely most of us) wanted a way to easily show off our games. Emscripten is a good answer to this and is already in use. I'm offering a new method of playing more than just one compiled game.

With this we can centralize the entire Uzebox game library, keep a database on all game files and allow for a playable online preview of any game. A download button could also be provided.

Current address:
http://www.nicksen782.net/a_demos/Emscr ... mechanger/

Youtube Video Demo:
https://youtu.be/ogGazXRQMj8 (2017-09-16)

Github:
https://github.com/nicksen782/OnlineUzeboxPlayer

You'll see that some games do not work. That is because they are missing the "UZEBOX" string in their headers. I'll be marking these in the file list in the future.
**EDIT: This is now automatically patched in RAM when the game loads.
Last edited by nicksen782 on Thu Jan 12, 2017 3:07 pm, edited 2 times in total.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Artcfox »

nicksen782 wrote:I know that Cuzebox and Uzem have been adapted to Emscripten for a while now. However, each new version of the game needed to have the game and the Emscripten build of the emulator in it. Long have I (and likely most of us) wanted a way to easily show off our games. Emscripten is a good answer to this and is already in use. I'm offering a new method of playing more than just one compiled game.

With this we can centralize the entire Uzebox game library, keep a database on all game files and allow for a playable online preview of any game. A download button could also be provided.

Current address:
http://www.nicksen782.net/a_demos/Emscr ... mechanger/

You'll see that some games do not work. That is because they are missing the "UZEBOX" string in their headers. I'll be marking these in the file list in the future.

I think I can also integrate Uzem as an emulator choice and I plan to as well.

Github link will arrive shortly.
Awesome! Any chance you can include Bugz (it doesn't require the SD card).

I also think it might be good to disable the debug display by default, what do other people think?
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by nicksen782 »

Include Bugz? Yes! Certainly. My goal is to load ALL Uzebox games, including Bugz. I'm working from a .zip file that Uze sent me a year ago.

SD support is important and I already know that I can do it. I'm writing a game database manager that will contain a complete game list. It will indicate available games and what files are required by those games (such as SD-based games.) I am also fairly certain that I can make it work with games provided by the user (I would use HTML 5 browser storage for that.)

I've added Bugz! I can add any .uze file by just copying it to the server (at this point in development.) So, if there are any more to add, please let me know. Actually, I need a complete list of .uze files. I would like author(s), titles, manuals, etc that I can include. They would be displayed on the emulator page based on which game you choose.

I'll figure out debug mode. I think that is configurable via a command-line argument, right?
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by D3thAdd3r »

Thanks for this!

I agree it would be better if it starts up in "player mode", without the debug stuff.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Artcfox »

Sweet! This is very awesome, and what I envisioned back when I first did the Emscripten port. Thanks for making it so much better!

Now we just need some graphic artists to design a frame around the Uzebox screen that looks like the cabinet for an arcade machine.
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by nicksen782 »

Or perhaps a custom frame for each game, and a default one for games that don't have it set? Think Super Gameboy. Some games had custom borders.
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by D3thAdd3r »

nicksen782 wrote:Or perhaps a custom frame for each game
Even better, that would be slick.
User avatar
Jubatian
Posts: 1564
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Jubatian »

nicksen782 wrote:I'll figure out debug mode. I think that is configurable via a command-line argument, right?
No, right now the emulator accepts no command line arguments apart from the game name itself. You can control the startup state by the Make configuration file. To remove the debug output, use FLAG_DISPLAY_GAMEONLY. You may also enable FLAG_NOCONSOLE, FLAG_NOGAMEFILE (to avoid checking for a gamefile.uze during the build and the insertion of its loading into the .js, saves some 5 kilobytes), and you may also disable FLAG_DISPLAY_FRAMEMERGE as probably all games in existence currently don't really require it.

I noticed that the emulator running in your environment is about 15% slower than my builds. However if I extract it from the iframe ("show only this frame"), it runs properly. There is something stealing a substantial amount of CPU time in the environment. Using the provided cuzebox_minimal.html file instead of the default Emscripten generated html might also make things running a few percents faster.
User avatar
Jubatian
Posts: 1564
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Jubatian »

A bit of obligatory performance rant...

On my system when I try to profile the Emscripten compiled emulator, I get 9ms on average for an 1/60th sec of AVR emulation, and 7ms on average for shovelling the pixels of a frame onto the display. One frame is about 480K AVR instructions and 640x560, so about 360K pixels. This means I get one AVR instruction emulated in 19 ns (wow!), and also 19 ns for one pixel transferred (not so wow...). This is ridiculous. One pixel is apparently such a burden for our modern day equipment like interpreting an AVR opcode by a code which itself was rammed through a C to JavaScript compiler and then a JIT compiler.

I am crying...
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by D3thAdd3r »

That is pretty crazy. I bet nearly all of that is latency to initially acess the frame buffer and the mere 350k pixels fly afterwards. Probably scales up better than it would appear...I would hope.

Do you guys have any specifications for the border graphics? I want to help, but I am out of my depth on this web stuff.
Post Reply