Additional PICO-8 initial setup

First try PICO-8 controller config
This commit is contained in:
icenine451 2023-06-09 13:43:45 -04:00
parent 93db40176b
commit 3020f057aa
4 changed files with 152 additions and 0 deletions

View file

@ -0,0 +1,145 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Configuration for pico-8
//
// config.txt is read on startup and saved on exit.
// To generate the default config.txt, delete this file.
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// :: Video Settings
window_size 0 0 // window width, height
screen_size 0 0 // screen width, height (stretched to window)
show_fps 0 // Draw frames per second in the corner
// :: Window Settings
windowed 0 // 1 to start up in windowed mode
window_position -1 -1 // x and y position of window (-1, -1 to let the window manager decide)
frameless 0 // 1 to use a window with no frame
fullscreen_method 1 // 0 maximized window (linux) 1 borderless desktop-sized window 2 hardware fullscreen (warning: erratic behaviour under some drivers)
blit_method 0 // 0 auto 1 software (slower but sometimes more reliable) 2 hardware (can do filtered scaling)
// :: System Settings
foreground_sleep_ms 2 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
background_sleep_ms 10 // number of milliseconds to sleep each frame when running in the background
sessions 1 // number of times program has been run
// (scancode) hold this key down and left-click to simulate right-click
rmb_key 0 // 0 for none 226 for LALT
// Desktop for saving screenshots etc. Defaults to $HOME/Desktop
desktop_path
// 1 to allow controller input even when application is in background
read_controllers_in_background 0
// :: Audio Settings (use "volume" for PICO-8)
sound_volume 256 // 0..256
music_volume 256 // 0..256
// :: usually 1024. Try 2048 if you get choppy sound
mix_buffer_size 1024
// :: map scancodes. Format: 44=47,80=89,.. (scancode a, scancode b -- when press a, generates b)
// run the program with -scancodes to determine which scancodes to use
map_scancodes
// :: pico-8
version 0.2.5g
// audio volume: 0..256
volume 256
// Location of pico-8's root folder
root_path /home/deck/.lexaloffle/pico-8/carts/
// Location of cartridge save data
cdata_path /home/deck/.lexaloffle/pico-8/cdata/
// Specify which player index joystick control begins at (0..7)
joystick_index 0
// Custom keyboard scancodes for buttons. player0 0..6, player1 0..5
button_keys 0 0 0 0 0 0 0 0 0 0 0 0 0
// Play notes as they are plotted in frequency mode
live_notes 0
// iff 1: when using keyboard cursor, snap to closest pixel / map cel
cursor_snap 0
// 0 default 1 dark blue background in code editor 2 black background in code editor 3 gray background in code editor
gui_theme 0
// scale of screenshots and gifs // 2 means 256x256
screenshot_scale 3
gif_scale 3
// maximum gif length in seconds (0..120; 0 means no gif recording)
gif_len 16
// when 1, reset the recording when pressing ctrl-9 (useful for creating a non-overlapping sequence)
gif_reset_mode 0
// 0 for off. 1 for auto. 2 to allow control of a cart's framerate due to host machine's cpu capacity
host_framerate_control 1
// filter splore cartridges
// 0 off 1 on (exclude cartridge tagged as 'mature' by community)
splore_filter 0
// tab display width (1 ~ 4 spaces)
tab_width 1
// 0 off 1 on: draw tab characters as small vertical lines
draw_tabs 0
// 0 off 1 on: record the current cartridge and editor view every 3 seconds (see [appdata]/activity.log.txt)
record_activity_log 1
// 0 off 1 on: allow F6..F9 (alternative: ctrl 6..9)
allow_function_keys 1
// 0 off 1 on: automatically check for a newer version of a BBS cart each time it is run.
check_for_cart_updates 1
// hide mouse cursor for n seconds when typing.
auto_hide_mouse_cursor 5
// 0 off 1 on: backup with a new timestamped filename on every run
// normally not needed -- was used for debugging crash-on-run
aggressive_backups 0
// back up cartridge in editor every n minutes when not idle (0 for no periodic backups)
periodic_backups 20
// global screen transformations:
// 129 flip horizontally
// 130 flip vertically
// 133 rotate CW 90 degrees
// 134 rotate CW 180 degrees
// 135 rotate CW 270 degrees
transform_screen 0
// 0 off > 1: colour to draw pixel grid in the gfx editor at zoom:8 and zoom:4 (16 for black)
gfx_grid_lines 0

View file

@ -0,0 +1,2 @@
// add SDL2 game controller mappings to this file
03000000de2800000512000010010000,Steam Deck,a:b3,b:b4,back:b11,dpdown:b17,dpleft:b18,dpright:b19,dpup:b16,guide:b13,leftshoulder:b7,leftstick:b14,lefttrigger:a9,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b15,righttrigger:a8,rightx:a2,righty:a3,start:b12,x:b5,y:b6,platform:Linux,

View file

@ -87,6 +87,7 @@ post_update() {
# - Disable ask-on-exit in existing Citra / Dolphin / Duckstation / Primehack installs for proper preset functionality # - Disable ask-on-exit in existing Citra / Dolphin / Duckstation / Primehack installs for proper preset functionality
# - Disable auto-load-state in existing PPSSPP installs for proper preset functionality # - Disable auto-load-state in existing PPSSPP installs for proper preset functionality
# - Init Cemu as it is a new emulator # - Init Cemu as it is a new emulator
# - Init PICO-8 as it has newly-shipped config files
update_rd_conf # Expand retrodeck.cfg to latest template update_rd_conf # Expand retrodeck.cfg to latest template
set_setting_value $rd_conf "screenshots_folder" "$rdhome/screenshots" set_setting_value $rd_conf "screenshots_folder" "$rdhome/screenshots"
@ -213,6 +214,8 @@ post_update() {
prepare_emulator "reset" "cemu" prepare_emulator "reset" "cemu"
prepare_emulator "reset" "pico8"
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, we are offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder AND REQUIRES A FULL RESET OF ALL EMULATORS, so we wanted your permission before proceeding.\nIf you decide to not install the profile now, it can always be done later through the Configurator.\n\nAny custom changes you have made to the emulator configurations will be reset if you choose to proceed!" configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, we are offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder AND REQUIRES A FULL RESET OF ALL EMULATORS, so we wanted your permission before proceeding.\nIf you decide to not install the profile now, it can always be done later through the Configurator.\n\nAny custom changes you have made to the emulator configurations will be reset if you choose to proceed!"
if [[ $(configurator_generic_question_dialog "RetroDECK Official Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then if [[ $(configurator_generic_question_dialog "RetroDECK Official Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then
install_retrodeck_controller_profile install_retrodeck_controller_profile

View file

@ -380,6 +380,8 @@ prepare_emulator() {
dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed
dir_prep "$roms_folder/pico8" "$bios_folder/pico-8/carts" # Symlink default game location to RD roms for cleanliness (this location is overridden anyway by the --root_path launch argument anyway) dir_prep "$roms_folder/pico8" "$bios_folder/pico-8/carts" # Symlink default game location to RD roms for cleanliness (this location is overridden anyway by the --root_path launch argument anyway)
dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder
cp -fv "$emuconfigs/pico-8/config.txt" "$bios_folder/pico-8/config.txt"
cp -fv "$emuconfigs/pico-8/sdl_controllers.txt" "$bios_folder/pico-8/sdl_controllers.txt"
fi fi
fi fi