config

package
v0.0.0-...-0e8e2e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FW_CLR_GRAY uint8 = iota
	FW_CLR_BROWN
	FW_CLR_RED
	FW_CLR_PINK
	FW_CLR_ORANGE
	FW_CLR_YELLOW
	FW_CLR_LIME_GREEN
	FW_CLR_GREEN
	FW_CLR_DARK_GREEN
	FW_CLR_SEA_GREEN
	FW_CLR_TURQUOISE
	FW_CLR_BLUE
	FW_CLR_DARK_BLUE
	FW_CLR_DARK_PURPLE
	FW_CLR_VIOLET
	FW_CLR_MAGENTA
)
View Source
const (
	FORMAT_OBJ = iota
	FORMAT_GLTF
)
View Source
const CONFIG_PATH = "./config.toml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Fullscreen       bool `toml:"fullscreen"`
	TomlBackdrop     int  `toml:"backdrop_color"`
	GamesPerRow      int  `toml:"games_per_row"`
	Backdrop         color.Color
	CancelAudioInit  bool             `toml:"cancel_audio_init"`
	Mouse            MouseConfig      `toml:"mouse"`
	Jit              Jit              `toml:"jit"`
	Gb               GbConfig         `toml:"gb"`
	Gba              GbaConfig        `toml:"gba"`
	Nds              NdsConfig        `toml:"nds"`
	KeyboardConfig   KeyboardConfig   `toml:"keyboard"`
	ControllerConfig ControllerConfig `toml:"controller"`
	VsyncDisabled    bool             `coml:"vsync_disabled"`
}
var Conf Config

func (*Config) Decode

func (c *Config) Decode()

type ControllerConfig

type ControllerConfig struct {
	Select     []int `toml:"select"`
	Mute       []int `toml:"mute"`
	Pause      []int `toml:"pause"`
	Left       []int `toml:"left"`
	Right      []int `toml:"right"`
	Up         []int `toml:"up"`
	Down       []int `toml:"down"`
	Fullscreen []int `toml:"fullscreen"`
	Quit       []int `toml:"quit"`
}

type EmulatorControllerConfig

type EmulatorControllerConfig struct {
	A      []int `toml:"a"`
	B      []int `toml:"b"`
	Select []int `toml:"select"`
	Start  []int `toml:"start"`
	Left   []int `toml:"left"`
	Right  []int `toml:"right"`
	Up     []int `toml:"up"`
	Down   []int `toml:"down"`
	R      []int `toml:"r"`
	L      []int `toml:"l"`
	X      []int `toml:"x"`
	Y      []int `toml:"y"`
	Hinge  []int `toml:"hinge"`
}

type EmulatorKeyboardConfig

type EmulatorKeyboardConfig struct {
	A      []string `toml:"a"`
	B      []string `toml:"b"`
	Select []string `toml:"select"`
	Start  []string `toml:"start"`
	Left   []string `toml:"left"`
	Right  []string `toml:"right"`
	Up     []string `toml:"up"`
	Down   []string `toml:"down"`
	R      []string `toml:"r"`
	L      []string `toml:"l"`
	X      []string `toml:"x"`
	Y      []string `toml:"y"`
	Hinge  []string `toml:"hinge"`
	Debug  []string `toml:"Debug"`

	LayoutToggle   []string `toml:"layout_toggle"`
	SizingToggle   []string `toml:"sizing_toggle"`
	RotationToggle []string `toml:"rotation_toggle"`
	ExportScene    []string `toml:"export_scene"`
}

type GbConfig

type GbConfig struct {
	TomlPalette      []int                    `toml:"dmg_palette"`
	KeyboardConfig   EmulatorKeyboardConfig   `toml:"keyboard"`
	ControllerConfig EmulatorControllerConfig `toml:"controller"`
	ConsoleType      string                   `toml:"type"`

	Palette  [][]uint8
	ForceDMG bool
	ForceGBC bool
}

type GbaConfig

type GbaConfig struct {
	KeyboardConfig   EmulatorKeyboardConfig   `toml:"keyboard"`
	ControllerConfig EmulatorControllerConfig `toml:"controller"`

	SkipHle                bool `toml:"skip_hle"`
	Threads                int  `toml:"threads"`
	IdleOptimize           bool `toml:"idle_optimize"`
	SoundClockUpdateCycles int  `toml:"sound_clock_update_cycles"`
	DisableSaves           bool `toml:"disable_saves"`
}

type Jit

type Jit struct {
	Enabled   bool   `toml:"enabled"`
	BatchInst uint32 `toml:"batch_inst"`

	LoopCnt   uint32 `toml:"loop_cnt"`
	BlockCnt  uint32 `toml:"block_cnt"`
	PageShift uint32 `toml:"page_shift"`

	BatchInstA9 uint32
	BatchInstA7 uint32
}

type KeyboardConfig

type KeyboardConfig struct {
	Select     []string `toml:"select"`
	Mute       []string `toml:"mute"`
	Pause      []string `toml:"pause"`
	Left       []string `toml:"left"`
	Right      []string `toml:"right"`
	Up         []string `toml:"up"`
	Down       []string `toml:"down"`
	Fullscreen []string `toml:"fullscreen"`
	Quit       []string `toml:"quit"`
	Unlimited  []string `toml:"unlimited"`
	Fps15      []string `toml:"fps15"`
	Fps30      []string `toml:"fps30"`
	Fps60      []string `toml:"fps60"`
	Fps120     []string `toml:"fps120"`
	Fps180     []string `toml:"fps180"`
	Fps240     []string `toml:"fps240"`
}

type MouseConfig

type MouseConfig struct {
	Fill            bool    `toml:"fill"`
	Stroke          bool    `toml:"stroke"`
	UnSelectedAlpha float32 `toml:"unselected_alpha"`
	CursorSize      int     `toml:"cursor_diameter"`
	StrokeSize      int     `toml:"stroke_width"`
	TomlFillColor   int     `toml:"fill_color"`
	TomlStrokeColor int     `toml:"stroke_color"`
	FillColor       []uint8
	StrokeColor     []uint8
}

type NdsBios

type NdsBios struct {
	Arm7Path string `toml:"arm7_path"`
	Arm9Path string `toml:"arm9_path"`
}

type NdsConfig

type NdsConfig struct {
	Screen           NdsScreen                `toml:"screen"`
	KeyboardConfig   EmulatorKeyboardConfig   `toml:"keyboard"`
	ControllerConfig EmulatorControllerConfig `toml:"controller"`
	Firmware         NdsFirmware              `toml:"firmware"`
	Rtc              NdsRtc                   `toml:"rtc"`
	Export           NdsExport                `toml:"export"`
	Threads          int                      `toml:"threads"`
	DisableSaves     bool                     `toml:"disable_saves"`
	FrameSkip        uint32                   `toml:"frame_skip"`
	DynamicFrameSkip bool                     `toml:"dynamic_frame_skip"`
	Bios             NdsBios                  `toml:"bios"`
}

type NdsExport

type NdsExport struct {
	Directory   string `toml:"directory"`
	FileType    string `toml:"file_type"`
	ShadowPolys bool   `toml:"shadow_polygons"`
	Format      int
}

type NdsFirmware

type NdsFirmware struct {
	FilePath      string `toml:"file_path"`
	Nickname      string `toml:"nickname"`
	Message       string `toml:"message"`
	FavoriteColor string `toml:"favorite_color"`
	BirthdayMonth uint8  `toml:"birthday_month"`
	BirthdayDay   uint8  `toml:"birthday_month"`
	Color         uint8
}

type NdsRtc

type NdsRtc struct {
	AdditionalHours int `toml:"additional_hours"`
}

type NdsScreen

type NdsScreen struct {
	ConfigLayout   string `toml:"layout"`
	ConfigSizing   string `toml:"sizing"`
	ConfigRotation int    `toml:"rotation"`

	OLayout   int
	OSizing   int
	ORotation int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL