Skip to content

Skarsnik/QUsb2snes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QUsb2snes

License: GPL v3 C/C++ CI C/C++ CI QUsb2Snes is a websocket server that provide an unified protocol for accessing hardware/software that act like a SNES (or are a SNES). A classic usage is to use the FileViewer client to upload roms to your SD2SNES. But it allows for more advanced usage like reading/writing the memory of the SNES.

Installation

If you want the full experience go Usb2Snes project. Otherwise, download the latest release of QUsb2Snes.

This repository only have QUsb2Snes and a file viewer application. You can also use the provided binaries from GitHub releases or compile QUsb2Snes yourself from source. On Linux, some distributions already ship qusb2snes (like arch AUR).

Installation via other means (homebrew, chocolatey, etc.) is not planned at the moment but may be provided in the future, if there is demand.


Usage

Configuration files

Logs are put in the standard path for application data if you use an installed version. It should be: $HOME/.local/share/QUsb2Snes on Linux. Otherwise, it will be in the directory where the executable is located.

Please note that the directory will be named after the binary file. If you create a symlink on Linux (e.g. qusb2snes.exe), the directory will change accordingly.

The settings file is located aside the executable on Windows or in $HOME/.config/skarsnik.nyo.fr/QUsb2Snes.conf on Linux.

Enabling/Disabling emulators

The GUI options are reflected in the configuration file.

For example, to enable the retroarchdevice, add or change the config under [General]:

[General]
retroarchdevice=true

Serial configuration (Linux)

If your device does not work out of the box, you can try the following command to set some tty settings

stty -F /dev/ttyACM0 0:0:cbd:0:3:1c:7f:15:4:5:40:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

Replace /dev/ttyACM0 with the correct device.

Emulator configuration

SD2Snes & FXpak Pro

The latest firmware already has the usb2snes support in it. Just choose or enable the Sd2snes support in QUsb2Snes. If you want to use an old firmware (< 1.11), you need to install the last Usb2Snes firmware by Redguyyy by following the instructions provided. Don't start usb2snes.exe since QUsb2snes do the same thing than the original software. Your SD2Snes device should show up on the Devices menu when connected.

SNES9x Rerecording & BSnes-AS

This is not supported anymore. Please refer to older QUsb2Snes releases. Emulators with Emulator Network Access support are recommended instead. For example, Snes9x-nwa, Bizhawk with the nwa tool or bsnes-plus-nwa

BizHawk (bsnes core recommended)

Download the Emulator Network Access plugin for bizhawk at https://github.com/Skarsnik/Bizhawk-nwa-tool/releases Enable or choose the Emulator Network Access support in QUsb2Snes. Copy the dll in the ExternalTools directory in your BizHawk folder (or create it if needed), then load the tool from the Tools->External Tools menu.

The Lua bridge method is not supported anymore. Please refer to older QUsb2Snes releases for instructions if you really need it

RetroArch with Snes9x core

You can use Snex9x (not recommended) or bsnes-mercury cores. You need to activate the network command support, either in the configuration menu of RetroArch or by editing your retroarch.cfg file (can be found in %appData%\RetroArch) to set network_cmd_enable = "true" (default is false). Then you need to activate the RetroArch virtual device in the devices menu. Any flavour of bsnes-mercury is preferred as we can access the ROM data.

Snex9x core: For software needing to patch the ROM (multitroid for example) you either need to patch the rom manually with the IPS file or put the IPS file along side the rom with the same name for retroarch to auto patch it.

You can connect to a remote RetroArch by adding a RetroArchHosts="remoteName=ip" in the config file. If you want to add multiple hosts, just add a ; between each host definition.

SNES classic (called also SNES mini)

If, for some reason, your SNES classic does not have the expected IP address (connected via wifi or something) you can add a SNESClassicIP=myip in the config.ini file.

Native emulator (canoe)

Mostly tested with Super Metroid.

Enable the SNES classic support on the device menu.

You need to 'hack' your SNES classic with the Hakchi2 CE version (https://github.com/TeamShinkansen/hakchi2/releases/), then remove the covershell mod if needed (as explained in https://github.com/TeamShinkansen/hakchi2/releases/tag/v3.4.0).

Install the serverstuff mod provided by QUsb2snes: copy the serverstuff.hmod to the user_mods directory on Hakchi2, then install the mod with Hakchi2

Start the game and check if the SNES classic appear on the Devices menu, it should display something like SNES classic : no client connected. If not, try restarting the game.

It will not work with the 'normal' Hakchi2 version as the Hakchi2 CE provide a more stable way to access the SNES Classic.

RetroArch

Enable the RetroArch support via the context menu, by changing the corresponding option in the config file to true, or by starting a NOGUI compiled version with the retroarch argument. Open Hakchi2 CE and in the menu go to 'tools -> open ftp client' it should open your default browser, copy paste the url it should look like ftp://169.254.13.37/ for the default ip, and paste in the file explorer to go to it (if it ask you for user/password, just put root as user, there is no password). Go into the /etc/libretro/ folder and copy the retroarch.cfg file somewhere. Open the copy with a text editor and search for the network_cmd_enable entry, replace false with true, save. Then now put your copy in place of the original one.

Command line options

Emulator choice

This is only available in conjunction with the -nogui option.

Only a non gui build version takes arguments. It still uses the config file, but you can use some arguments to enable the support you want.

  • -sd2snes : to activate the sd2snes support
  • -luabridge : for the lua bridge support
  • -retroarch : for the retroarch support
  • -snesclassic : for the snes classic support
  • -emunwaccess : for Emulator Network Access support

Compiling from source

See COMPILING.adoc.

Application Developers

If you want to develop an application, look at the docs/Protocol.md file to have a detailed view of the commands of the websocket protocol.

You can also 'register' your application by writing a JSON file in the 'shared application'/usb2snes-apps folder, IE: C:/Users/<USER>/AppData/Local/usb2snes-apps on Windows and ~/.local/share/usb2snes-apps on Linux.

The JSON file must look like this:

{
    "name" : "RA2Snes",
    "description" : "Application to track RetroAchievements progress in SNES games",
    "executable" : "C:/Users/scoli/Downloads/RA2Snes-windows-x64/RA2Snes.exe"
    "icon" : "path to your application icon, this is not mandatory on Windows"
    "desktoprc-file" : "If your application is installed on Linux, set its path"
}

Licence

QUsb2snes project follows the GPL version 3 licence, you can find the full version of the licence in the LICENCE file.

Icons

  • Flat style icons are from google https://material.io/tools/icons/?style=baseline and are under Apache Licence 2.0
  • Snes9x and RetroArch icon are from their respective project
  • QUsb2Snes icon is from TrenteR_TR on FrankerFaceZ with changed contrast/light.
  • Most pony icons are from FrankerFaceZ.

About

A Qt based webserver for usb2snes. Users: go check usb2snes.com

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 17