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:

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

Post by nicksen782 »

Thanks!
Artcfox wrote: Tue Sep 12, 2017 9:16 pm Would it be possible to brighten those up, and to get the Controller to show the changed button labels when you put it into UZEM keymappings?
I made them dim because I didn't want to distract from the game. I removed the extra dimming now although they are still a bit dim.

I don't know about changing the button labels on the controller. When you click a button, such as Debug I'm literally just sending the key for debug (F3) to the emulator. It is one-way communication. I could change the image, sure but hopefully a click wasn't missed and you are stuck with the wrong display. The "Display Controls" button still works.

Perhaps I could just remove the existing labels on the gamepad and put the actual button that it is supposed to represent (instead of the keyboard key.) I'd still need to keep track of what keymapping the user has toggled.

Jubation, is there a way to communicate with CUzeBox? I don't actually other than sending keypresses and I literally just dump whatever is in the iframe with each new load (clean slate each time.)

EDIT: (Also, I replaced my controller image with your new one. Thanks!)
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 »

I know that the console output and the window title change when the modes change. I'm not sure what access you have to those properties from JavaScript, but that would be my first thought.
User avatar
Jubatian
Posts: 1561
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

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

Post by Jubatian »

nicksen782 wrote: Tue Sep 12, 2017 9:47 pmJubation, is there a way to communicate with CUzeBox? I don't actually other than sending keypresses and I literally just dump whatever is in the iframe with each new load (clean slate each time.)
I dunno, I didn't really get into Emscripten beyond what was necessary to get the emulator small and running fast. I would go with Artcfox's suggestion: Do you have the console output somewhere? (Like you didn't turn it off during build?) You could interpret it to get the emulator's state. Otherwise with native SDL I really can't think of anything, likely in Emscripten it would require using some embedded JavaScript to run other means of communications.
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 »

I remember that at some point your original CUzeBox Emscripten build would output the console messages to a text box. What if CUzeBox could regularly output status messages? Since it would be going to a text box it would be accessible via Javascript and then I could just read it. Or, perhaps a new feature to CUzeBox where a key combo could be sent and that would trigger the status output? I could just poll it periodically.

I've also been considering the idea of downloading files out of the encapsulated Emscripten build. Emscripten keeps a filesystem and it can be added to, which is the main feature of the Online Player. I also know that files can be read from that filesystem as well. If CUzeBox would periodically write to this file and then it could be downloaded info could be read that way. Or, of course, a modified EEPROM or SD bin file could be downloaded.
User avatar
Jubatian
Posts: 1561
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

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

Post by Jubatian »

Which version you are using? By the layout, I think it should generate console output (although probably better upgrade it, there was at least a somewhat important half-carry behavior fix since then). If it doesn't, check your Make_config.mk flags: obviously FLAG_NOCONSOLE should be clear (zero), and FLAG_SELFCONT also clear. These are the defaults for these flags. This case the Emscripten build generates console output.
User avatar
Jubatian
Posts: 1561
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

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

Post by Jubatian »

I rather take it here, the issue about the Direct Link which got a little off-hand in Flight of a Dragon's topic.

I realize I mis-interpreted it, now I see that normally you wouldn't see that link if you selected a game on the Game Changer's interface, and that would be what the link is for (allowing you to reach games directly from external sources). Maybe you should just split up the string in the "href" manually, trimming the part on the right of the '?' character (if any, including the '?') and add the selection part to that. That way you could avoid the issue of missing origin (either in "window" or "window.location").

By the way in the Games and Demos list I don't mean you should supply the missing ROMs (here), just mentioned it as a last resort. I really hope at least a few of us would come and provide working most current versions of the affected games.
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 »

That's cool. I found that I had submarine.uze so I responded to that thread with a direct link to the file on my server.

New Javascript:

Code: Select all

var origin   = window.location.href.split(window.location.pathname)[0]; // "https://nicksen782.net"
var pathname = window.location.pathname;                                // "/a_demos/Emscripten_Uzebox_Gamechanger/CURRENT/"
var directLink1 = origin + pathname + "?gameid=" + gameid;
This seems to work. Why is window.location.origin not available for your browser?
User avatar
Jubatian
Posts: 1561
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

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

Post by Jubatian »

nicksen782 wrote: Mon Jan 15, 2018 7:03 pm That's cool. I found that I had submarine.uze so I responded to that thread with a direct link to the file on my server.

New Javascript:

Code: Select all

var origin   = window.location.href.split(window.location.pathname)[0]; // "https://nicksen782.net"
var pathname = window.location.pathname;                                // "/a_demos/Emscripten_Uzebox_Gamechanger/CURRENT/"
var directLink1 = origin + pathname + "?gameid=" + gameid;
This seems to work. Why is window.location.origin not available for your browser?
I dunno. It is Firefox ESR 52.5.2, which according to this will still stay around for a couple of months. If it doesn't have the window.location.origin property, then a relatively large group of people might not have it. There are issues about it, mostly concerning Internet Explorer, but seemingly it is rather recent anyway.

Tested, the current solution works for me.
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 »

Still a great find. Now I know to watch out for this in the future.
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 »

I've been updating the game database on the Online Player. There are a total of 129.

I have the UCC entries categorized correctly now. I actually uploaded fresh copies from the UCC forum threads and then deleted the old entries and gave the new entries the previous game ids. My goal was to make sure that I didn't break any existing links for direct play.

I went through the whole game list to make sure that I didn't break anything.

I found no binary for Smokey and the Bandit.
I didn't add Tornado 2000 due to the very large file size.
I found oldlolo.hex on http://uzebox.org/wiki/Adventures_Of_Lolo and no link for it on the Online Player. However, I have a different version of the same game (both by D3thAdd3r) but I didn't find it on the wiki. I'm not sure where I got it. Should I have both versions online?
Added Bomberman II (wip) to the online database.
Added Castlevania link
Added Escape From Dungeon 2 link
Added Kismet link
Added MegaBomber link
Added Moon Patrol link
Added Sonic link
Added Uze Mario link
Added Würgertime link
Added the Blue Knight Zelda 2 demo to the Online Player and provided a link on the wiki to it
Added Bitmap Demo link
Added Broken Screen link
Added Clay's Uzebox Demo link
Added Digital thermometer demo link
Added Dungeon Slash Demo link
Added Halloween '08 Demo link (it doesn't work with the Online Player.)
Added The Matrix Screen Saver link
Added Mode 9 Demo link
Added Music Demo link and to the Online Player
Added Race link
Added Redbull link
Added Shadowgate Music Demo link and to the Online Player
Added Sprite Engine V1 demo link
Added Sprite Engine V2 demo link
Added Tron Music demo link
Added Vector Demo link
Added Windows 8 link
Post Reply