
bindings {
	keys {
		up gamepads.1.up
		down gamepads.1.down
		left gamepads.1.left
		right gamepads.1.right
		a gamepads.1.a
		b gamepads.1.b
		r gamepads.1.c
		y gamepads.1.y
		x gamepads.1.x
		l gamepads.1.z
		enter gamepads.1.start
		rshift gamepads.1.mode

		end ui.exit
	}
	pads {
		default {
			dpads {
				0 {
					up gamepads.n.up
					down gamepads.n.down
					left gamepads.n.left
					right gamepads.n.right
				}
			}
			buttons {
				a gamepads.n.a
				b gamepads.n.b
				rightshoulder gamepads.n.c
				x gamepads.n.x
				y gamepads.n.y
				leftshoulder gamepads.n.z
				back gamepads.n.mode
				start gamepads.n.start
				guide ui.exit
			}
			axes {
				lefty.positive gamepads.n.down
				lefty.negative gamepads.n.up
				leftx.positive gamepads.n.right
				leftx.negative gamepads.n.left
				lefttrigger gamepads.n.lt
				righttrigger gamepads.n.rt
			}
		}
	}
	mice {
		0 {
			motion mouse.1.motion
			buttons {
				1 mouse.1.left
				2 mouse.1.middle
				3 mouse.1.right
				4 mouse.1.start
			}
		}
		#having the second host mouse also mapped to the first emulated
		#mouse is useful for laptop users with an external mouse
		1 {
			motion mouse.1.motion
			buttons {
				1 mouse.1.left
				2 mouse.1.middle
				3 mouse.1.right
				4 mouse.1.start
			}
		}
	}
}

io {
	devices {
		1 gamepad6.1
		2 gamepad6.2
	}
}

video {
	#special value "stretch" will cause aspect to match window aspect ratio
	aspect original
	integer_scaling off
	width 640
	#height is normally calculated automatically from width using the aspect setting
	#if you would like to set it explicitly, uncomment the line below
	#height 480
	vertex_shader default.v.glsl
	fragment_shader default.f.glsl
	scanlines off
	vsync off
	fullscreen off
	#setting gl to off, will force use of the SDL2 fallback renderer
	#this is useful for those running on machines with Open GL 2.0 unavailable
	#so the warning doesn't display on startup
	gl on
	#scaling can be linear (for linear interpolation) or nearest (for nearest neighbor)
	scaling linear
	ntsc {
		overscan {
			#these values will result in square pixels in H40 mode
			#top 2
			#bottom 1
			#if you want to completely hide the border instead
			#comment out those two lines and uncomment these
			top 0
			bottom 0
			
			#these values will completely hide the horizontal border
			left 0
			right 0
		}
	}
	pal {
		overscan {
			#these values will produce the same size border in V30 mode
			#as the default NTSC settings will produce in V24 mode
			#this results in a slightly vertically squished picture
			#which is probably approximately correct on a properly calibrated TV
			#top 21
			#bottom 17
			#for square pixels and zero border in V30 mode
			#coment out those two lines and uncomment these
			top 0
			bottom 0
			
			#these values will completely hide the horizontal border
			left 0
			right 0
		}
	}
}

audio {
	rate 48000
	buffer 256
	lowpass_cutoff 3390
	fm_dac zero_offset
	alsa_device internal
	alsa_device_hdmi hw:0,1
	alsa_device_cobalt hw:1,0
	gain 6
}

clocks {
	m68k_divider 7
	max_cycles 27360
	speeds {
		0 100
		1 150
		2 200
		3 300
		4 400
		5 25
		6 50
		7 75
	}
}

ui {
	#specifies the ROM that implements the Menu UI
	rom menu.bin
	#starting path for ROM browsing, accepts special variables $HOME, $EXEDIR
	#and variables defined in the OS environment
	initial_path $HOME
	#if this is set to on, then the menu will remember the last path when visited
	#if it's set to off, initial_path will always be used on startup
	remember_path on
	#path for storing internal screenshots, accepts the same variables as initial_path
	screenshot_path $HOME
	#see strftime for the format specifiers valid in screenshot_template
	screenshot_template blastem_%Y%m%d_%H%M%S.png
	#path template for saving SRAM, EEPROM and savestates
	#accepts special variables $HOME, $EXEDIR, $USERDATA, $ROMNAME
	save_path $USERDATA/$ROMNAME
	#space delimited list of file extensions to filter against in menu
	extensions bin gen md smd sms gg zip gz
	#specifies the preferred save-state format, set to gst for Genecyst compatible states
	state_format native
	default_language en
}

system {
	#controls how the emulated system is synced to the host
	#video provides the smoothest experience when the host and emulated system have similar refresh rates
	#audio provides lower audio latency, especially when there is a refresh rate mismatch
	sync_source audio
	#set this to random to debug initialization bugs
	ram_init zero
	default_region U
	#controls whether MegaWiFi support is enabled or not
	#MegaWiFi allows ROMs to make connections to the internet
	#so it should only be enabled for ROMs you trust
	megawifi off
}


