Skip to content

About

BennuGD game runtime as a MiSTer core: Streets of Rage Remake 5.2 on the DE10-Nano (alpha)

Resources

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

BennuGD for MiSTer

Streets of Rage Remake title screen, captured from the MiSTer's HDMI output

Streets of Rage Remake 5.2 (and 5.1) on a MiSTer. The FPGA carries the video, audio and controller plumbing; the DE10-Nano's ARM side runs the BennuGD interpreter that the game was written for. It is one core, and any BennuGD 1.x game can ride on it, but SorR is the one that has been tested.

Status: beta. It plays well. Colours are right, video is vsynced with no tearing, pads map through the MiSTer OSD, sound holds steady through level transitions and saves work. The October speed work took most of the slowdown out of the busy stages, and testers say it plays great now. A really crowded scene can still drop the odd frame on the stock 800 MHz CPU. Some things are still untested: only one pad has been tried, only HDMI output has been checked, and other BennuGD games have not been tried at all. Version 5.1 of SorR has its own menu entry and plays, picture and sound as good as 5.2's; it has had a quarter of an hour of play so far, not a playthrough. Expect rough edges and please report what you find.

Main menu Stage 36, Dance Club Intro
Main menu Stage 36, Dance Club Intro

All captures are from the MiSTer over HDMI, through a capture card.

Installing Streets of Rage Remake 5.2 or 5.1

You need a MiSTer updated during 2026 (the launch mechanism relies on a Main_MiSTer from this year), a display on HDMI or on the analog output (the core produces a normal 240p picture, so the scaler, direct_video and the analog board all work), a way to put files on the SD card (the network share or a card reader), and your own copy of Streets of Rage Remake, version 5.2 or 5.1. Nothing from the game ships with this core.

1. Get the game onto the card. On a PC, SorR is a folder with SorR.exe, SorR.dat, mod, palettes and savegame in it. Create a folder on the card named after your version, SORRv52 for 5.2 or SORRv51 for 5.1, and copy these into it, exactly these names:

/media/fat/games/BennuGD/SORRv52/SorR.dat          (SORRv51/ for 5.1)
/media/fat/games/BennuGD/SORRv52/mod/              (whole folder)
/media/fat/games/BennuGD/SORRv52/palettes/         (whole folder)
/media/fat/games/BennuGD/SORRv52/savegame/         (whole folder, may be empty)

Leave the .exe and .dll files behind, they are Windows only. The folder name and the file name SorR.dat matter: each menu entry points at its own folder. Both versions can sit on the card side by side; each keeps its own savegame folder, and a save from one version does not work in the other.

These are the files that were tested. Check yours before going further; a different build or a modded .dat is untested here:

file size CRC32 MD5
SorR.dat (v5.2) 320,091,685 bytes 1b1d6221 bce446c9c5bd86cc345a01917967e404
SorR.dat (v5.1) 253,705,647 bytes 3a19d4c2 2e10aec879bdb9c398ffdab9e44433be

On the MiSTer over ssh: md5sum /media/fat/games/BennuGD/SORRv52/SorR.dat. On a PC, any checksum tool will do (7-Zip's CRC option, or certutil -hashfile SorR.dat MD5 on Windows).

2. Set the game's display mode (5.2 only). Open /media/fat/games/BennuGD/SORRv52/mod/system.txt in a text editor. Under the line // FULL SCREEN WIDE: AUTO, DESKTOP, BORDERLESS, BORDERLESS_SYNC make sure the value is

BORDERLESS_SYNC

This is the mode that renders at the game's native size. The others make the game upscale in software, which the ARM cannot afford. The 5.1 system.txt is an older format without this line (system = PC; and loading = POST;); leave it as it comes.

Installing 5.1 instead of 5.2. Same steps, with these differences. The folder is SORRv51 and step 2 does not apply. Before the first start, put the 5.1 starter save in place: download SORRv51_starter_save.zip from the Releases page (or take it from saves/SORRv51/ here) and copy its savegame.sor into /media/fat/games/BennuGD/SORRv51/savegame/. A 5.1 profile made from scratch only listens to the keyboard: its language screen ignores the pad, the pad only wakes up once the game's Controls screen has been visited, and its default pause button is one the OSD map cannot reach. The starter save is a clean profile with no progress, the pad bound to the MiSTer layout (A attack, B special, X special combo, Y jump, L series, R back attack, Select police, Start pause) and graphics mode 1x, which keeps the picture at the game's native 320x240 instead of a software-upscaled 640x480. Without it you need a USB keyboard for the first run: arrows and Enter through the language and profile screens, then Options, Controls, bind Start, and graphics mode 1x; then hold Start on the pad for three seconds so the game quits and writes the save. A save made with 5.2 does not work in 5.1 or the other way round. The 5.1 file that was tested is the second row of the table above (MD5 2e10aec879bdb9c398ffdab9e44433be).

3. Unpack the release. Download BennuGD_MiSTer_beta-<date>.zip (the newest one) from the Releases page and unzip it onto the root of the SD card. It creates:

/media/fat/bennugd/                     the ARM side and its installer
/media/fat/_Other/_BennuGD/             the core (.rbf) and the game entry (.mgl)
/media/fat/Scripts/BennuGD_install.sh   one-time setup, run from the OSD

4. Run the setup script once. On the MiSTer, open the OSD, go to Scripts, and run BennuGD_install. It adds a [BennuGD] section to MiSTer.ini, registers the small launcher daemon in /media/fat/linux/user-startup.sh, and starts it. Nothing else on the card is touched. (If you prefer ssh: sh /media/fat/bennugd/install.sh.)

5. Play. In the MiSTer menu go to Other, then BennuGD, then SoRR 5.2 or SoRR 5.1. The game takes a few seconds to load. Press F12 or the menu button on the pad to open the OSD and map your pad under "define buttons" (A B X Y L R Select Start). Inside the game's own options choose graphics mode 1x / normal (the MiSTer scaler does the upscaling) and widescreen as you like. To leave, hold Start on the pad for three seconds (or press Select+Start together): the frontend presses the game's own quit key for it, the game writes its save and the MiSTer menu comes back. Loading another core from the OSD also stops the game, but then the game does not get to write its save.

Saves go to the game's own savegame folder, as on a PC. Wait a moment after a save before powering off; the card is flushed when the game stops. To test the whole game without playing it through, saves/ has an everything-unlocked profile for 5.2 and the steps to install it (back up your own save first), and the 5.1 starter save described above.

Updating with update_all

The repository carries a db.json.zip for the MiSTer downloader. Add this to /media/fat/downloader.ini and run Update All:

[rossops/bennugd_mister]
db_url = https://raw.githubusercontent.com/rossops/BennuGD_MiSTer/main/db.json.zip

It places the core, the game entries and the ARM side on the card, the same files the release zip holds, and keeps them current. Your bennugd.cfg is left alone. The downloader cannot edit MiSTer.ini or user-startup.sh, so after the first update still run Scripts -> BennuGD_install once (step 4). The game itself is never part of it.

If something is wrong

Black picture over HDMI, sound playing. Cores before BennuGD_20260918.rbf had no picture of their own, so direct_video=1 (HDMI-to-VGA DACs) showed black. Update the core; with the current one the picture is a normal 240p signal and direct video, the analog board and the scaler all show it. Should the native picture ever misbehave, the OSD option "HDMI picture: HPS framebuffer" switches HDMI back to the old path where the scaler reads the frame from memory itself.

Choppy sound, game running slowly. First check the game's display mode: look in /media/fat/bennugd/bennugd.log for a line env: av info. It must say 416x240. If it says 832x480 the game is upscaling in software, which the ARM cannot keep up with; set BORDERLESS_SYNC in mod/system.txt as in step 2 and restart. Also choose graphics mode 1x / normal in the game's own options. The heaviest scenes still drop frames on the stock 800 MHz CPU; that is the known limit right now.

Sound lags behind the action. About a tenth of a second, by design: the frontend keeps 90 ms of sound queued so that a slow frame on a heavy level does not leave a gap. audio_ms=60 in /media/fat/bennugd/bennugd.cfg brings the sound 30 ms closer, at the price of a hiccup or two per few minutes on the busiest stages (measured: 2 in 200 s where 90 gives 1); audio_ms=50 takes another 10 ms and adds another hiccup. Restart the game after changing it.

The OSD's Core Volume does nothing. MiSTer applies it to the FPGA core's own audio, before the Linux audio is mixed in, so it cannot reach this game's sound. The frontend reads the value MiSTer saves and applies it itself, so it works, with a delay of a second or two. The master Volume (and the volume keys) work at once.

Nothing starts when picking the game. Check /media/fat/bennugd/launcherd.log. The daemon must be running (the setup script starts it, and user-startup.sh starts it at boot).

Reporting a problem. Attach bennugd.log and launcherd.log from /media/fat/bennugd/, the [MiSTer] and [BennuGD] sections of your MiSTer.ini, and the date of /media/fat/MiSTer. That is enough to tell most things apart.

Adding another BennuGD game is a folder under /media/fat/games/BennuGD/ plus a copy of SoRR 5.2.mgl in _Other/_BennuGD/ with the name and the path= changed. Nothing about SorR is hard-coded, but nothing else has been tried yet either.

How it works

MiSTer menu: Other -> BennuGD -> SoRR 5.2 (.mgl)
   Main_MiSTer loads BennuGD.rbf, mounts the game's .dat and records its
   path; a small daemon on the Linux side sees the core name and starts
   /media/fat/bennugd/bennugd on that game.

ARM (Linux)                                    FPGA (Template_MiSTer)
bennugd: a tiny libretro host around           reads the RGB565 frame back from
BennuGD_libretro, statically linked            DDR3 a row ahead of the beam and
  video  -> DDR3 via /dev/mem, page flip        outputs it as 240p / 15.7 kHz
  audio  -> ALSA default (alsa.sv in the FPGA)  video; a 64-byte control block
  input  <- hps_io joystick words (control      flips buffers at vblank and
            block) or evdev when run from ssh   carries the OSD-mapped pads

docs/DESIGN.md has the verified facts, the measurements and the dead ends, in the order they happened.

Building

ARM side, on a Mac or Linux box with zig 0.14.0 and cmake (profile-guided optimisation is opt-in, see hps/pgo/README.md; the committed profile made heavy stages slower):

hps/build.sh              # -> hps/out/bennugd

releases/bennugd is the committed copy of that binary for the downloader database; tools/make_db.py rebuilds db.json.zip from it and the release files. It applies the patches in hps/patches/ to the BennuGD_libretro submodule (an SDL shim fix, a scale fast path, a frame-rate cap, all explained in the patch files). FPGA side, with Quartus 17.0 Lite:

build.bat                 # -> releases/BennuGD_yyyymmdd.rbf

sys/ is Template_MiSTer as shipped. Do not edit it; replace it wholesale.

Credits

  • Bombergames (Bomber Link and team) made Streets of Rage Remake, on Sega's Streets of Rage series. Get it from them; it is not distributed here.
  • SplinterGU wrote BennuGD, the engine SorR runs on, out of Fenix.
  • diekleinekuh wrote BennuGD_libretro, the wrapper this core links. Three small fixes found on the way live in hps/patches/ and are meant to go back upstream.
  • Alexey Melnikov (sorgelig) and MiSTer-devel made the MiSTer framework, Main_MiSTer and the Menu core this core is built from.
  • freemchr's 240mp-mister and kimchiman52's 3s-mister-arm showed that a Linux program can be a MiSTer core, and how.
  • zlib-ng, libpng, LibreSSL, libogg and libvorbis, and byuu's libco are bundled by the core.
  • The code in this repository was written with Claude Code, measured on the hardware at every step, and steered by Ross Esposito.

Special thanks

jonlad1 and lucaslbds on GitHub tested this core from the first alpha on, on their own MiSTers and setups, and kept coming back with logs, numbers and patient answers to follow-up questions. The direct video fix, the network-share support and the frame-copy and audio work all started from what they reported. They made a real difference to how this core turned out, and they are still around helping. Thank you both.

GPL-2.0-or-later, like the framework and the engine.

About

BennuGD game runtime as a MiSTer core: Streets of Rage Remake 5.2 on the DE10-Nano (alpha)

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages