let Genode = env:DHALL_GENODE

let XML = Genode.Prelude.XML

let defaults = ./../../pkgDefaults.dhall

in  { indexInfo =
        "SNES emulator"
    , runtime =
          defaults.runtime
        ⫽ { roms =
              defaults.runtime.roms # [ "stdcxx.lib.so" ]
          , ram =
              Genode.units.MiB 24
          , caps =
              192
          , config =
              XML.text
              ''
              	<config>
              		<libc stdout="/dev/log" stderr="/dev/log"/>
              		<game/>
              		<vfs>
              			<fs/>
              			<dir name="dev"> <log label="core"/> </dir>
              		</vfs>
              		<default-controller port="0" device="1">
              			<map from="KEY_LEFT" to="LEFT"/>
              			<map from="KEY_RIGHT" to="RIGHT"/>
              			<map from="KEY_UP" to="UP"/>
              			<map from="KEY_DOWN" to="DOWN"/>
              
              			<map from="KEY_X" to="A"/>
              			<map from="KEY_Z" to="B"/>
              			<map from="KEY_S" to="X"/>
              			<map from="KEY_A" to="Y"/>
              			<map from="KEY_Q" to="L"/>
              			<map from="KEY_W" to="R"/>
              
              			<map from="KEY_ENTER" to="START"/>
              			<map from="KEY_RIGHTSHIFT" to="SELECT"/>
              		</default-controller>
              	</config>
                            ''
          }
    }
