Open ff7man opened 11 months ago
Good idea, ENGE working on XBOX would be great. I will have a look.
I only tested one game, but it does load and the controller works. However after using the controller the window is locked to game control mode disabling the emulated mouse. Normally to exit this mode you would just hold down Start, but with the emulator it never disables game control mode. Not sure why. To get control of the console again I've been pressing the Xbox button and force closing the app. Maybe a click in on one of the sticks to disable to the gamepad would fix this?
Here's a video of it running on an xbox series x,
game controls can be disabled using a keyboard so no need for the fix only games < 350mB can be loaded due to memory constraints (edge crashes when more than 1gB of memory is used) To get around this we would have to stream files from the server as needed instead of all at once, I'm not sure how complicated that would be... Definitely beyond my abilities.
Button pressing doesn't always work either, so to have it autoload I added
loadFileFromURL("bios.bin")
loadFileFromURL("game.bin")
to the bottom of init() in index.js
games are hosted locally using python
#!/usr/bin/env python3
from http.server import HTTPServer, SimpleHTTPRequestHandler
import sys
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
if __name__ == '__main__':
host = '0.0.0.0' # Listen on all available network interfaces
port = 80 # Use port 80 (requires superuser privileges)
server_address = (host, port)
httpd = HTTPServer(server_address, CORSRequestHandler)
print(f"Serving on {host}:{port}")
httpd.serve_forever()
We can close this out, auto game loading wasn't terribly difficult to add with those lines above, and if you make a browser app for the xbox using the new webview2 https://learn.microsoft.com/en-us/microsoft-edge/webview2/get-started/winui2 it doesn't have strict memory limits and can load large games without a problem now
Loading from the filesystem is not an option on an Xbox Series X
To get around this I've made a few changes.
to index.js I've added
to index.js:init() I've added
and to index.html I've added