Super Boss Gaiden run scenario for the SNES
https://superbossgaiden.superfamicom.org/ Fix #52
This commit is contained in:
committed by
Norman Feske
parent
54b0e1b23c
commit
bcda357a1e
194
run/superbossgaiden.run
Normal file
194
run/superbossgaiden.run
Normal file
@@ -0,0 +1,194 @@
|
||||
# setting environment variable FORCE_QEMU permits running netperf in qemu
|
||||
set force_qemu [info exists ::env(FORCE_QEMU)]
|
||||
|
||||
if {[expr [have_include "power_on/qemu"] && !$force_qemu]} {
|
||||
puts "\Game emulation on Qemu is not recommended.\n"
|
||||
exit
|
||||
}
|
||||
|
||||
#
|
||||
# Check used commands
|
||||
#
|
||||
set wget [check_installed wget]
|
||||
set unzip [check_installed unzip]
|
||||
|
||||
set build_components {
|
||||
core init
|
||||
app/retro_frontend
|
||||
drivers/framebuffer
|
||||
drivers/input
|
||||
drivers/timer
|
||||
libretro/snes9x
|
||||
server/fb_upscale
|
||||
server/input_remap
|
||||
}
|
||||
|
||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||
# override default platform driver policy
|
||||
proc platform_drv_policy {} {
|
||||
return {
|
||||
<policy label_prefix="ps2_drv"> <device name="PS2"/> </policy>
|
||||
<policy label_prefix="usb_drv"> <pci class="USB"/> </policy>
|
||||
<policy label_prefix="fb_drv"> <pci class="VGA"/> </policy>}
|
||||
}
|
||||
|
||||
append_platform_drv_build_components
|
||||
|
||||
build $build_components
|
||||
|
||||
create_boot_directory
|
||||
|
||||
#
|
||||
# Generate config
|
||||
#
|
||||
|
||||
append config {
|
||||
<config verbose="yes">
|
||||
<parent-provides>
|
||||
<service name="CPU"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="LOG"/>
|
||||
<service name="PD"/>
|
||||
<service name="RAM"/>
|
||||
<service name="RM"/>
|
||||
<service name="ROM"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>}
|
||||
|
||||
append_if [have_spec sdl] config {
|
||||
<start name="fb_sdl">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides>
|
||||
<service name="Input"/>
|
||||
<service name="Framebuffer"/>
|
||||
</provides>
|
||||
<config width="640" height="480"/>
|
||||
</start>
|
||||
<alias name="input_drv" child="fb_sdl"/>
|
||||
<alias name="fb_drv" child="fb_sdl"/>}
|
||||
|
||||
append_platform_drv_config
|
||||
|
||||
append_if [have_spec vesa] config {
|
||||
<start name="fb_drv">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides><service name="Framebuffer"/></provides>
|
||||
<config buffered="yes"> </config>
|
||||
<config width="300" height="200"/>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec pl11x] config {
|
||||
<start name="fb_drv">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides><service name="Framebuffer"/></provides>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec ps2] config {
|
||||
<start name="ps2_drv">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
</start>
|
||||
<alias name="input_drv" child="ps2_drv"/>}
|
||||
|
||||
append config {
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
</start>
|
||||
<start name="fb_upscale">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides> <service name="Framebuffer"/> </provides>
|
||||
<route>
|
||||
<service name="Framebuffer">
|
||||
<child name="fb_drv"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
<start name="input_remap">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides> <service name="Input"/> </provides>
|
||||
<config>
|
||||
<map from="KEY_A" to="BTN_A"/>
|
||||
<map from="KEY_S" to="BTN_B"/>
|
||||
<map from="KEY_D" to="BTN_Y"/>
|
||||
<map from="KEY_LEFTCTRL" to="BTN_A"/>
|
||||
<map from="KEY_LEFTALT" to="BTN_B"/>
|
||||
<map from="KEY_LEFTMETA" to="BTN_Y"/>
|
||||
<map from="KEY_ENTER" to="BTN_START"/>
|
||||
<map from="KEY_RIGHTSHIFT" to="BTN_SELECT"/>
|
||||
<map from="KEY_LEFT" to="BTN_LEFT"/>
|
||||
<map from="KEY_RIGHT" to="BTN_RIGHT"/>
|
||||
<map from="KEY_UP" to="BTN_FORWARD"/>
|
||||
<map from="KEY_DOWN" to="BTN_BACK"/>
|
||||
</config>
|
||||
<route>
|
||||
<service name="Input">
|
||||
<child name="input_drv"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
<start name="retro_frontend">
|
||||
<resource name="RAM" quantum="64M"/>
|
||||
<config core="snes9x_libretro.lib.so">
|
||||
<game rom="superbossgaiden.sfc"/>
|
||||
<libc stdout="/log" stderr="/log">
|
||||
<vfs> <log/> </vfs>
|
||||
</libc>
|
||||
</config>
|
||||
<route>
|
||||
<service name="Framebuffer">
|
||||
<child name="fb_upscale"/> </service>
|
||||
<service name="Input">
|
||||
<child name="input_remap"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
</config>}
|
||||
|
||||
install_config $config
|
||||
|
||||
#
|
||||
# Download and extract a test ROM
|
||||
#
|
||||
if {![file exist bin/superbossgaiden.zip]} {
|
||||
set zip_url "https://superbossgaiden.superfamicom.org/Super%20Boss%20Gaiden%20(J).zip"
|
||||
catch { exec $wget $zip_url -O bin/superbossgaiden.zip }
|
||||
}
|
||||
if {![file exist "bin/superbossgaiden.sfc"]} {
|
||||
catch {
|
||||
exec $unzip -o bin/superbossgaiden.zip -d bin
|
||||
exec mv "bin/ROM-Version/Super Boss Gaiden (J) (V1.0).sfc" "bin/superbossgaiden.sfc"
|
||||
}
|
||||
}
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init ld.lib.so
|
||||
fb_upscale
|
||||
input_remap
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
retro_frontend
|
||||
stdcxx.lib.so
|
||||
snes9x_libretro.lib.so
|
||||
superbossgaiden.sfc
|
||||
timer
|
||||
}
|
||||
|
||||
# platform-specific modules
|
||||
lappend_if [have_spec linux] boot_modules fb_sdl
|
||||
lappend_if [have_spec vesa] boot_modules fb_drv
|
||||
lappend_if [have_spec ps2] boot_modules ps2_drv
|
||||
lappend_if [have_spec pl11x] boot_modules fb_drv
|
||||
|
||||
append_platform_drv_boot_modules
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
append qemu_args " -m 256 -soundhw es1370 "
|
||||
|
||||
run_genode_until forever
|
||||
Reference in New Issue
Block a user