sudo vim /boot/firmware/cmdline.txt
video=HDMI-A-1:1600x900@60
from evdev import InputDevice, UInput, ecodes
import subprocess
import threading
import time
GAMEPAD = "/dev/input/by-id/usb-Logitech_Logitech_Dual_Action_DF5CB332-event-joystick"
device = InputDevice(GAMEPAD)
# Virtual keyboard
ui = UInput({
ecodes.EV_KEY: [
ecodes.KEY_LEFTCTRL,
ecodes.KEY_C,
ecodes.KEY_V,
]
}, name="Gamepad Virtual Keyboard")
button_292 = False
button_293 = False
shutdown_timer = None
lock = threading.Lock()
def ctrl_key(key):
print(f"Sending Ctrl+{key}", flush=True)
ui.write(ecodes.EV_KEY, ecodes.KEY_LEFTCTRL, 1)
ui.write(ecodes.EV_KEY, key, 1)
ui.write(ecodes.EV_KEY, key, 0)
ui.write(ecodes.EV_KEY, ecodes.KEY_LEFTCTRL, 0)
ui.syn()
def shutdown():
time.sleep(1)
with lock:
if button_292 and button_293:
print("\nBoth buttons held for 1 second — SHUTTING DOWN!", flush=True)
subprocess.run(["systemctl", "poweroff"])
print(f"Gamepad: {device.name}", flush=True)
print("291 = Ctrl+C", flush=True)
print("290 = Ctrl+V", flush=True)
print("292 + 293 for 1 second = Shutdown", flush=True)
print("Waiting for input...\n", flush=True)
for event in device.read_loop():
if event.type != ecodes.EV_KEY:
continue
with lock:
# BTN_TOP = 291 -> Ctrl+C
if event.code == 291 and event.value == 1:
print("291: Ctrl+C", flush=True)
ctrl_key(ecodes.KEY_C)
# BTN_THUMB2 = 290 -> Ctrl+V
elif event.code == 290 and event.value == 1:
print("290: Ctrl+V", flush=True)
ctrl_key(ecodes.KEY_V)
# BTN_TOP2 = 292
elif event.code == 292:
button_292 = event.value == 1
print(
f"292: {'PRESSED' if button_292 else 'RELEASED'}",
flush=True
)
# BTN_PINKIE = 293
elif event.code == 293:
button_293 = event.value == 1
print(
f"293: {'PRESSED' if button_293 else 'RELEASED'}",
flush=True
)
# Start shutdown timer
if button_292 and button_293 and shutdown_timer is None:
print("Both shoulder buttons held — 1 second timer started.", flush=True)
shutdown_timer = threading.Thread(
target=shutdown,
daemon=True
)
shutdown_timer.start()
# Cancel shutdown
elif not (button_292 and button_293):
shutdown_timer = None
retroarch -L
// if installed on linux mint using
// sudo apt install libretro-gambatte
// then it will probably be at:
/usr/lib/x86_64-linux-gnu/libretro/gambatte_libretro.so
// full command for me:
retroarch -L /usr/lib/x86_64-linux-gnu/libretro/gambatte_libretro.so /home/bweew/Documents/Syncthing/Lsdj/lsdj.gb
f for full screen f1 for settings like changing the key maps
You can make it a bash script
#!/bin/bash
retroarch -L /usr/lib/x86_64-linux-gnu/libretro/gambatte_libretro.so "$HOME/Documents/Syncthing/Lsdj/lsdj.gb"
chmod +x ~/lsdj.sh
//on raspberry pi 3 64 bit os
#!/bin/bash
retroarch -L /usr/lib/aarch64-linux-gnu/libretro/gambatte_libretro.so lsdj.gb
1 4 b5 b7
1 b9 4 5
1 3 b5 7
1 2 5 b6
1 3 b5 7
1 2 5 b6
1 4 b5 b7
1 b9 4 5
python scripts to build gba roms, emulators not included
the music export is the most useful.
says it can do .mod and .uge but its not working for me
the gif and video exports work in sameboy but not on my flashcart or in gearboy
pcm samplerate settings:
9198 hz -GBVP2 parity yeilds best quality
DMG gives clearer images than colour it seems to mangle the image with blocky pixels
to
use that with gameboy slideshow generator instead of that because it screws up the audio
making gb and gbc videos worked better flashed directly with gb flasher to a perfect dark cart instead of on the superchis gba sd cart also sameboy and bgb are more accurate usually but goomba breaks
i=1; for f in *.png *.jpg *.jpeg; do [ -f "$f" ] || continue; mv -- "$f" "$i.${f##*.}"; ((i++)); done
tommitytom, the maker of retroplug made this web player that lets you view all the screens of lsdj at once.
update has a standalone, vst2, vst3, clap and commandline version
also works with nes
use retroplug-cli lsdj-rom --split channels flag foroutput
might need to chmod after moving
the github mainpage for more infoflags for different cli options
renoise2mod song.xrns --type xm
renoise2mod song.xrns --type mod --ptmode hardware --ntsc
renoise2mod --help
I wanted to be able to switch layers or something to map keys in a different localization to be able to use extra shortcuts.
--renoise doesn't detect f13 - 24 making this whole thing useless for my case. but its still a nice key remapper
git clone https://github.com/rvaiya/keyd
cd keyd
make && sudo make install
sudo systemctl enable --now keyd
keyd monitor
keyd list-keys
sudo vim /etc/keyd/default.conf
sudo keyd reload
backspace+escape+enter
GB Studio: Advanced Custom Waveform Design for GBT Player
for making custom waves lsdj or hugetracker
sine: 79 bc de ef ff ee dc b9 75 43 21 10 00 11 23 45
tri: fe dc ba 98 76 54 32 10 01 23 45 67 89 ab cd ef
doesn't have every game but still cool
sudo apt install bsdiff on linux
the syntax:
bspatch YOURGAME.gbc OUTPUT.GBC THEPATCH.bsdiff
for f in *.7z *.zip; do [ -e "$f" ] && 7z x "$f" && rm "$f"; done
couldn't get in pogoshell
heres my bash script using sox to convert mp3s to wav and then open the converter
#!/bin/bash
for file in "$@"; do
output="${file%.*}.wav"
sox "$file" -r 22050 -c 1 -e gsm-full-rate "$output"
wine "ps2gsm_linker.exe"
done
for f in *.mod; do wine dcmp.exe "$f" "${f%.mod}.mdz" && rm -- "$f"; done
that uses dcmp from the tools dir to convert .mod to .mdz to save space but it sometimes screws them up really bad lol
player for .nsf files on gbc
nsf player got it working on linux using wine
deflemask nes exports arent working but nsfs from games work
makes gbc roms out of the music files