Fightcade 2 - juniorterin/fliperOS GitHub Wiki

Fightcade 2 (online arcade and console matches, with rollback) is closed-source freeware with no clear permission to redistribute — it isn't in the image or in the repository. In Setup > Games > Frontend it shows as Fightcade 2 (not installed): when chosen, the Setup downloads the official Linux package from its website (about 160 MB, https://www.fightcade.com/download/linux), with a progress bar, to /opt/fliperos/fightcade — a user-owned folder, because Fightcade updates itself by writing there. In the sessions table the package column is fetch:fliperos-fightcade (a program downloaded from its website, not a .deb), and the line's "binary", /opt/fliperos/fightcade/fightcade, only exists after the download. Once installed it can be the boot launcher and shows in Games > Fightcade 2 in LXDE. /opt/fliperos/bin/fliperos-fightcade fetch downloads it again on top (repair): the ROMs and settings stay.

  • ROMs in ~/roms/fightcade, one folder per emulator it uses: fbneo (the .zip files of FBNeo 0.2.97.44, with neogeo.zip; console games in subfolders megadrive, nes, sms...), flycast (Naomi, Atomiswave, Dreamcast), snes9x and fc1 (the Fightcade 1 games, FB Alpha 0.2.96.74 romset). The ROMs folders inside Fightcade become links to them (config/fliperos-roms); the folders exist even before installing. RetroArch's FBNeo core shares the fbneo folder while its own (~/roms/retroarch/fbneo) has no games. The romsets are the ones each emulator asks for, not those of the current MAME.
  • Lobby screen: the lobby is a desktop page (a 1280x800 window) and doesn't fit in 240 lines, so it is the only program in the modes table that opens interlaced at 15 kHz: 512x448 (fightcade 512x448@60 in /etc/fliperos/emulator-modes.conf; wider pixels than 640x480 for bigger text, and an interlaced 15 kHz mode can't have much fewer lines), with the page scaled down in proportion to the height (--force-device-scale-factor, 100% at 600 lines, 0.75 at 448; FIGHTCADE_SCALE sets another value, and Text > Zoom In/Out, Ctrl+= and Ctrl+-, adjusts it on the fly).
  • Matches in the game's native resolution: on a 15 kHz tube, every FBNeo and FBA (Fightcade 1) game plays in its own original resolution, like GroovyMAME does in GroovyArcade — Street Fighter II (CPS) at 384x224 at 59.637 Hz, Neo Geo at 320x224, and so on — with a modeline made for it by Switchres. Nothing is scaled: each pixel of the board is one pixel on the tube, with no stretching to 320 or 640 and no 16:9 window. How it works: when FBNeo or FBA opens, fliperos-fightcade pauses it (before Wine reads its settings), takes the game's size and refresh from GroovyMAME's -listxml (the romset names are the same; the answer is cached in ~/.cache/fliperos/fightcade-modes), adds the mode to the output with Switchres and turns on the emulator's ArcadeRes option (bVidArcaderesHor in fcadefbneo.ini, bVidArcaderes in FBA's); then it lets the emulator go on, and Wine switches the screen to the game's mode. It works the same in an online match and in Test game. Vertical games, games GroovyMAME doesn't know and widths the modeline can't make exact use the table's mode instead (fightcade-fbneo and fightcade-fc1, 320x240), at the game's own refresh rate when GroovyMAME knows it. The screen and the emulator run at the same rate: the emulators run each game at its original speed (bForce60Hz 0, which FliperOS sets once in FBA, where it comes turned on), and the output keeps only one mode of each size, because the emulators ask Wine for a size, not for a refresh rate (CPS2 and CPS3 are both 384x224, at 59.637 and 59.599 Hz). FIGHTCADE_NATIVE=0 turns it off.
  • The other emulators also open in their native modes from the table: SNES9x at 256x224 at 60.0988 Hz (the console's own mode, fightcade-snes9x) and Flycast at 640x240, stretched to 200% like the system Flycast (fightcade-flycast). fliperos-fightcade checks every second whether one of its emulators is open: if so, Switchres computes the modeline and xrandr switches the screen to its mode; when it closes, it goes back to the lobby's. For each emulator to fill the mode, its file (created from the package's default) gets full screen at that size on each launch, following the table, and, only the first time (whatever is changed later in the emulator itself stays), the game already in full screen (bVidAutoSwitchFull 1, fullscreen = yes, SNES9x's EmulateFullscreen) and, on a tube, a 4:3 monitor instead of the package's 16:9. On the other monitors (25/31 kHz, LCD) the matches stay in the lobby's mode.
  • Pure picture: scanlines, bilinear filtering, shaders, motion blur, hardware gamma and SNES9x's hi-res blending are turned off once (each emulator keeps what you change later), with VSync on.
  • Keys: it needs a keyboard and mouse (the login, the lobby). Ctrl+W (Window > Close) closes Fightcade and returns to the menu; Alt+Tab switches between the lobby and the match's emulator and Alt+F4 closes the front window (config/openbox-fightcade.xml).
  • Wine: the FBNeo, SNES9x and FBA emulators are 32-bit Windows programs; they run in Wine, which isn't in the image: downloading Fightcade through the Setup installs it first (or Setup > System > Extras), with a prefix of their own (~/.local/share/fliperos/wine-fightcade), without the Mono/Gecko window. 32-bit Wine's Direct3D draws through 32-bit OpenGL (libgl1:i386, libgl1-mesa-dri:i386, libglx-mesa0:i386, installed together with Wine): without it FBNeo stops at "Couldn't initialise DirectX9 Alternate video output". The prefix is created the first time the lobby opens (about 15 s), not on the first match. Fightcade's Flycast (Flycast Dojo) is native, but ships as an AppImage, which asks for FUSE: the launcher exports APPIMAGE_EXTRACT_AND_RUN=1, and it extracts itself to /tmp on each launch and runs from there. Every time the lobby opens, Dojo receives the system Flycast's options (~/.config/flycast/emu.cfg): the image without linear interpolation, per-pixel transparency (pvr.rend) and both controllers on ports A and B. Whatever you change in those options in the system Flycast also applies to Dojo. The Button mapping buttons already went to both.

Checked on a virtual screen with package 2.1.45: download, repair, the lobby open, FBNeo opening in Wine, Alt+Tab and Ctrl+W; and, on an Xorg that accepts new modes, the mode switch — a game requested through Fightcade's own fcade:// takes the screen to 320x240 in 1 s, Flycast to 640x240 in full screen, and the lobby comes back on close. On the cabinet's 15 kHz tube, a CPS game in FBNeo opened in its native 384x224, pixel for pixel. Not checked: an online match (needs an account).