diff --git a/run/driar.run b/run/driar.run new file mode 100644 index 0000000..6bbf95f --- /dev/null +++ b/run/driar.run @@ -0,0 +1,200 @@ +# 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/fceumm + 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 { + + + } +} + +append_platform_drv_build_components + +build $build_components + +create_boot_directory + +# +# Generate config +# + +append config { + + + + + + + + + + + + + + + } + +append_if [have_spec sdl] config { + + + + + + + + + + } + +append_platform_drv_config + +append_if [have_spec vesa] config { + + + + + + } + +append_if [have_spec pl11x] config { + + + + } + +append_if [have_spec ps2] config { + + + + + } + +append config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +install_config $config + +# +# Download and extract a test ROM +# +if {![file exist bin/driar.zip]} { + set zip_url "http://driar.se/driar/driar.zip" + catch { exec $wget $zip_url -O bin/driar.zip } +} +if {![file exist bin/Driar.nes]} { + catch { exec $unzip -o bin/driar.zip -d bin } +} + +# 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 + fceumm_libretro.lib.so + timer + zlib.lib.so + + Driar.nes +} + +# 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 " + +puts "\n################\n" +set txt [open "bin/Driar.txt" r] +puts [read $txt] +close $txt +puts "\n################\n" + +run_genode_until forever