Blake Stone - BStone source port
-
Just saw this and super happy. Loved this when younger, always felt under appreciated. Had a boot disk I'd use to play this quite often. I played a lot of Doom, but also this always stuck with me. The sound effects still ring true in my mind. Thanks,
-
@moltke44 Good to hear that i am able to make others gaming experience even better by sharing with the RetroPie community. As it works good enough, I still think the Blake Stone experience could be even better by improving it.
-
@tpo1990
Is it correct that the game not started without startx?
/dev/shm/runcommand.logBStone Log ========== Version: 1.1.13 CRITICAL: Failed to initialize SDL: No available video device
And then if I start the game with startx keyboard is not working! Therefore I start it with --vid_windowed option. Then Keybord is working!
/opt/retropie/configs/ports/bstone/emulators.cfg
bstone = "startx /opt/retropie/ports/bstone/bstone --aog --no_screens --vid_windowed --vid_mode 1920 1080 --data_dir /home/pi/RetroPie/roms/ports/bstone/aog --" default = "bstone"
But my X360 Gamepad is not working (also with sudo startx). What is the trick?
/dev/shm/runcommand.log
Parameters: Executing: startx /opt/retropie/ports/bstone/bstone --aog --no_screens --vid_windowed --vid_mode 1920 1080 --data_dir /home/pi/RetroPie/roms/ports/bstone/aog -- -- vt1 -keeptty X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian Current Operating System: Linux tomgamez 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M video=HDMI-A-1:1920x1080@60 smsc95xx.macaddr=DC:A6:32:27:FF:59 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 consol e=tty1 root=PARTUUID=fe01d7db-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait Build Date: 05 June 2019 12:49:54PM xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support) Current version of pixman: 0.36.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Sat Nov 9 16:40:17 2019 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (II) modeset(0): Initializing kms color map for depth 24, 8 bpc. BStone Log ========== Version: 1.1.14 Data path: "/home/pi/RetroPie/roms/ports/bstone/aog/" Mod path: "" Profile path: "/home/pi/.local/share/bibendovsky/bstone/" Forcing "Aliens of Gold (full)"... Found "Aliens of Gold (full)" v2.0. VID: Initializing a system... VID: Creating a window... VID: Initializing a renderer... VID: Available renderer drivers: 1. opengl 2. opengles2 3. opengles 4. software VID: Using VSync... VID: Creating a renderer... VID: Quering renderer for info... VID: Current renderer: "opengl". VID: Looking up for a texture pixel format... VID: Allocating a texture pixel format... VID: Initializing textures... VID: Creating a screen texture... VID: Creating an UI texture... VID: Creating a screen texture... ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred xinit: connection to X server lost waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
-
@tomybyte Startx is only used to start up the X11 window or Raspbian desktop if you have that installed on your RetroPie system. The port should be able to run under framebuffer or command line as well as Emulationstation with it's own runcommand file by default.
From looking at your runcommand.log it seems like the game has failed to run SDL. Do you have same the error with running other ports?
Your Bstone
emulators.cfg
file should look like this:bstone = "/opt/retropie/ports/bstone/bstone --data_dir $romdir/ports/bstone/aog" default = "bstone"
Keyboard should work directly after installing the port.
If you want to use your X360 Gamepad with Bstone port you will have to use the
xboxdrv
package since the port can only use a keyboard. -
@tpo1990 thanks for Your feedback!
if I start bstone without startx in emulators.cfg then I get the error:
CRITICAL: Failed to initialize SDL: No available video device
Your port Return to Castle Wolfenstein I also start with startx but my X360 Gamepad works fine in it
/opt/retropie/configs/ports/rtcw-sp/emulators.cfg rtcw = "startx /opt/retropie/ports/rtcw/iowolfsp.arm" default = "rtcw"
The xboxdrv package is installed in Retropie.
How can I configure xboxdrv to map the Bstone keyboard keys?Thanks a lot!
Sincerely
-
@tomybyte Appreciated.
Using the trigger
startx
should not be required to launch Bstone source port or any other given port as far as i know. What version of RetroPie and Raspberry Pi board are you using?Were you able to run Bstone directly after the first time that you downloaded the scriptmodule and installed it through RetroPie setup?
Did you try reinstalling Bstone from RetroPie setup to see if it fixes the
SDL
error?Xboxdrv guide for RetroPie is here. I suggest looking through the docs first before use. If you have trouble with getting it to work, then i may be able to share some more information on how to use it. Also it is noted that you should only be using xboxdrv if the source port/game does not natively support a gamepad.
-
@tpo1990 thank You for Your feedback again!
I use the Pi4/4GB with Unofficial RetroPie Buster (Pi4) beta 5 by monkaBlyat
The xboxdrv Documentation I know, but is more generic. So I had hoped You have an bstone adapted script ;)
But anyway, many thanks I will try to map the needed keys and share the result here...Sincerely
-
@tomybyte Your welcome. :-)
Ah i see, then that's why it is not working correctly since you are using a Pi4. As RetroPie has not been officially released for the Pi4 yet it is uncertain to say if the existing source ports that i created a scriptmodule for will work or not.
That is because xboxdrv is able to map keyboard input to any gamepad and people are using different gamepads for their own RetroPie project. I don't have an adapted xboxdrv script for Bstone, but i could probably share my xboxdrv configuration for my own Zeroplus PS4 controller from the Doom Legacy port.
You will have to install xboxdrv from
RetroPie-Setup
and know whatbuttons
your X360 gamepad is using in order to get a proper workingxboxdrv config
for Bstone. You could then manually edit that specific config file that i created to get it to work with your X360 controller for Bstone. Let me know if you want this.Until the Pi4 get's an official RetroPie release i can not help you any further than this.
What i can say is that i will probably get a Pi4 soon with the 4 gb RAM.
Sincerely
-
@tpo1990 it would be a pleasure if You can share Your xboxdrv script!
The Pi4 is a rocket! Your Return to Castle Wolfenstein run perfect smoothly! I love him ;)
Sincerely -
@tpo1990 so this is a working xboxdrv configuration in my Blake Stone - Aliens of Gold.sh
#!/bin/bash sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --detach-kernel-driver \ --silent \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --trigger-as-button \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \ --ui-axismap X1=KEY_A:KEY_D,Y1=KEY_S:KEY_W,X2=KEY_A:KEY_D,Y2=KEY_UP:KEY_DOWN \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start,BTN_TRIGGER_HAPPY3=du,BTN_TRIGGER_HAPPY4=dd,BTN_TRIGGER_HAPPY1=dl,BTN_TRIGGER _HAPPY2=dr \ --evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --ui-buttonmap du=KEY_W,dd=KEY_S,dl=KEY_LEFT,dr=KEY_RIGHT,a=KEY_LEFTCTRL,b=KEY_SPACE,y=KEY_Y,lb=KEY_A,rb=KEY_D,start=KEY_ENTER,x=KEY_ESC \ & "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "bstone" ""
The only problem is if I exit the game and go back to retropie interface the retropie controls are lost. Also if I kill the xboxdrv after game again with sudo killall > /dev/null 2>&1 xboxdrv
-
@tomybyte Good to hear that RTCW runs great on a Pi4. I haven't had any other tests other than on my Pi3B. :-)
It seems like you have already figured out the xboxdrv configuration. What is your xboxdrv configuration file called and where did you put it?
Xboxdrv should only start once a port or emulator is running on your RetroPie system and then after you exit that same port, it you should stop xboxdrv so than you can control as normal.
-
@tomybyte You can add to the
killall
command on a new line in your script.Below is the script I use to launch Abuse in DOSBox using xboxdrv for mouse emulation:
#!/bin/bash sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --config /opt/retropie/configs/xboxdrv/abuse.xboxdrv >/dev/null & /opt/retropie/emulators/dosbox/bin/dosbox -c "mount c /home/pi/RetroPie/roms/pc-data" -c "c:" -c "cd ABUSE" -c "ABUSE.EXE" -c "exit" sudo killall >/dev/null xboxdrv sleep 1
I'm not sure if the
sleep 1
command is actually required but I keep it so that there's a one second delay between the xboxdrv process being stopped and ES launching and the two processes shouldn't coincide. -
@tpo1990
If I start xboxdrv configuration upper the retropie menu does not work, because the retropie mappings are overwritten.
But withsudo killall > /dev/null 2>&1
in the last line ALL xboxdrv processes will be killed.
Then the retropie menu also does not work any more.
I can not find a solution for that at the moment...Sincerely
-
@tomybyte Did you try @dudleydes 's solution?
It should only be necessary to kill xboxdrv service and then the RetroPie mappings should work as normal again.
Let me check my stop command for xboxdrv and get back to you later.
-
Hi @tpo1990
so I found the solution for my Pi4...
To reuse xboxdrv You have to start it on boot:
RetroPie Setup > Configuration / Tools > xboxdrv - XBox / XBox360 gamepad driver > Enable xboxdrv
after that You have two configurations:
/opt/retropie/configs/all/retroarch-joypads
Xbox 360 Wireless Receiver (XBOX).cfg > with disabled xboxdrv
Xbox Gamepad (userspace driver).cfg > with enabled xboxdrv
Then You can kill it and start it again and again!e.g. Blake Stone - Planet Strike.sh
#!/bin/bash sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --detach-kernel-driver \ --silent \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --trigger-as-button \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \ --ui-axismap X1=KEY_A:KEY_D,Y1=KEY_S:KEY_W,X2=KEY_A:KEY_D,Y2=KEY_UP:KEY_DOWN \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start,BTN_TRIGGER_HAPPY3=du,BTN_TRIGGER_HAPPY4=dd,BTN_TRIGGER_HAPPY1=dl,BTN_TRIGGER_HAPPY2=dr \ --evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --ui-buttonmap du=KEY_W,dd=KEY_S,dl=KEY_LEFT,dr=KEY_RIGHT,a=KEY_LEFTCTRL,b=KEY_SPACE,y=KEY_Y,lb=KEY_A,rb=KEY_D,start=KEY_ENTER,x=KEY_ESC \ & "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "bstone_ps" "" sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --daemon --detach --dbus disabled --detach-kernel-driver --id 0 --led 2 --deadzone 4000 --silent --trigger-as-button --next-controller --id 1 --led 3 --deadzone 4000 --silent --trigger-as-button
Sincerely
-
@tomybyte That would probably work, but i think it is better to have a specific config file to include all your xboxdrv configurations for the ports or emulators that you have installed on your RetroPie system. If I update the
scriptmodule
for Bstone, it may just replace yourBlake Stone.sh
file in yourPorts
folder. In this way you will probably need to manually keep a backup of your changes. -
@tpo1990
letting you know that something is up with blake stone.
i cant get it to load anymore on both my pi3 running 4.5, and my pi4 running 4.6here is the error
[VID] Applying texture upscale. /opt/retropie/supplementary/runcommand/runcommand.sh: line 1255: 1832 Bus error /opt/retropie/ports/bstone/bstone --data_dir /home/pi/RetroPie/roms/ports/bstone/aog
here is the whole list
Parameters: Executing: SDL_VIDEO_KMSDRM_CRTCID=49 SDL_VIDEO_KMSDRM_MODEID=39 /opt/retropie/ports/bstone/bstone --data_dir /home/pi/RetroPie/roms/ports/bstone/aog BStone v1.2.6 ========== Looking for game content. Found "Blake Stone: Aliens Of Gold (shareware)" v3.0. Content source: custom dir Data path: "/home/pi/RetroPie/roms/ports/bstone/aog/" Mod path: "" Profile path: "/home/pi/.local/share/bibendovsky/bstone/" [SND] Initializing audio [SND] ------------------ [SND] Channel count: 2 [SND] Sample rate: 44100 Hz [SND] Mix size: 40 ms [SND] Effects volume: 10 / 20 [SND] Music volume: 5 / 20 [SND] OPL3 type: DosBox DBOPL [SND] Resampling interpolation: Linear [SND] Resampling low-pass filter: On [VID] Initializing hardware accelerated video system. [VID] Initializing task manager. [VID] Creating renderer manager. [VID] Getting display mode. [VID] -------------------- [VID] Common configuration [VID] -------------------- [VID] Renderer: auto-detect [VID] Is windowed: true [VID] Window positioned: false [VID] Windowed x: 0 [VID] Windowed y: 0 [VID] Windowed width: 640 [VID] Windowed height: 480 [VID] UI stretched: false [VID] Widescreen: true [VID] 2D texture filter: nearest [VID] 3D texture image filter: nearest [VID] 3D texture mipmap filter: nearest [VID] Texture anisotropy: 1 [VID] Texture upscale filter: none [VID] Texture upscale xBRZ factor: 0 [VID] Anti-aliasing kind: none [VID] Anti-aliasing value: 1 [VID] -------------------- [VID] Initializing 3D renderer. [VID] Trying to initialize "OpenGL 3.2 core". ERROR: [VID] [REN_3D_GL_UTL_MK_CTX_INIT] Failed. [VID] Trying to initialize "OpenGL 2.0". [VID] Device features [VID] =============== [VID] V-Sync: true [VID] V-Sync requires restart: false [VID] Texture max dimension: 4096 [VID] Viewport max width: 4096 [VID] Viewport max height: 4096 [VID] Anisotropy: false [VID] Anisotropy max degree: 1 [VID] Non-power-of-two textures: true [VID] Mipmap auto-generation: true [VID] Samplers: true [VID] MSAA: true [VID] MSAA (render-to-window): false [VID] MSAA requires restart: false [VID] MSAA max degree: 4 [VID] Vertex input max locations: 16 [VID] Initializing shader program. [VID] Initializing shader variables. [VID] Creating texture manager. [VID] Initializing 2D resources. [VID] Creating UI index buffer. [VID] Creating UI vertex buffer. [VID] Creating UI vertex input. [VID] Creating 2D filler index buffer. [VID] Creating 2D filler vertex buffer. [VID] Creating 2D filler vertex input. [VID] Creating UI texture. [VID] Creating 2D 1x1 black texture. [VID] Creating 2D 1x1 white texture. [VID] Creating 2D 1x1 fade texture. [VID] Initializing 3D flooring. [VID] Creating 3D flooring index buffer. [VID] Creating 3D flooring vertex buffer. [VID] Creating 3D flooring vertex input. [VID] Creating 3D flooring 1x1 solid texture. [VID] Initializing 3D ceiling. [VID] Creating 3D ceiling index buffer. [VID] Creating 3D ceiling vertex buffer. [VID] Creating 3D ceiling vertex input. [VID] Initializing 3D fade. [VID] Creating 3D fade index buffer. [VID] Creating 3D fade vertex buffer. [VID] Creating 3D fade vertex input. [VID] Create 3D fade texture. [VID] Initializing player's weapon. [VID] Creating player's weapon index buffer. [VID] Creating player's weapon vertex buffer. [VID] Creating player's weapon vertex input. [VID] Creating player's weapon sampler. [VID] Initializing command buffers. [VID] Creating common command buffer. [VID] Creating 3D command buffer. [VID] Creating 2D command buffer. [VID] Initializing command buffers. [VID] Initializing samplers. [VID] Creating UI sampler. [VID] Creating sprite sampler. [VID] Creating wall side sampler. [VID] Creating fade sampler. [VID] Applying texture upscale. /opt/retropie/supplementary/runcommand/runcommand.sh: line 1255: 5134 Bus error SDL_VIDEO_KMSDRM_CRTCID=49 SDL_VIDEO_KMSDRM_MODEID=39 /opt/retropie/ports/bstone/bstone --data_dir /home/pi/RetroPie/roms/ports/bstone/aog
not sure whats going on here
-
@tpo1990 ok so i did find the problem. bibendovsky has now got OPENGL in his build. and it does not play nice with the Pi either the Pi3 or Pi4. i am talking with him but we just started so no answer yet. and for some reason we it will not swtich to the software mode to lunch even though it does have a auto detect.
so the only work around i have found is to build from a older version. 1.1.16 is the last version that only uses
software
.once i get a better answer ill update here
-
I'd like to try to recompile the 1.1.16 source code to try on the RPI4. Is there a location I can go to?
-
@RussellB https://github.com/bibendovsky/bstone/releases?after=v1.2.0-beta.6
1.1.16 will be a little down the page
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.