Skip to content

Instantly share code, notes, and snippets.

@Gemba
Gemba / donutdodo_controller_mapping.py
Created June 30, 2023 10:50
Workaround to remap the Donut Dodo controller buttons to Retropie's Joypad definition.
#! /usr/bin/env python3
# Remaps the Donut Dodo Controller buttons to the values of Retropie's Joypad
# definition. cf. https://retropie.org.uk/forum/topic/34334/
# Usage:
#
# 1. Run Donut Dodo and in the "Remap Controller" Menu select Factory Reset
# once. This will create a
# /opt/retropie/configs/ports/donutdodo/controller_mapping.dat
@Gemba
Gemba / ednabreakout.sh
Created April 18, 2023 19:37
Edna & Harvey: The Breakout / Edna bricht Aus - RetroPie Scriptmodule
#!/usr/bin/env bash
# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution and
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
#
@Gemba
Gemba / # Head Over Heels README.md
Last active March 20, 2023 19:04
RetroPie Scriptmodule for Head Over Heels (2022 enhanced remake) - https://github.com/dougmencken/HeadOverHeels

The scriptmodule installs the Head Over Heels game at ~/RetroPie/roms/ports

  1. Deploy the scriptmodule from below at ~/RetroPie-Setup/ext/<somefolder>/scriptmodules/ports/headoverheels.sh
  2. Deploy the patch from below at ~/RetroPie-Setup/ext/<somefolder>/scriptmodules/ports/hoh/01-menu-intro-outro.patch
  3. Run sudo ~/RetroPie-Setup/retropie_packages.sh hoh
  4. Find and start the entry "Head over Heels" in the "Ports" System in EmulationStation.
  5. Set in your Runcommand menu on first game start the video resolution to 640x480.

Note for Raspberry Pi3 users: The menu can be quite slow and may miss keypresses, the gameplay may have issues as the liballeg5 implementation is work-in-progress / not optimized yet.

@Gemba
Gemba / # AppleWin libretro INSTALL.md
Last active April 13, 2024 07:23
Applewin libretro scriptmodule for RetroPie

INSTALLATION

On RetroPie shell as user pi:

cd RetroPie-Setup
mkdir -p ext/local/scriptmodules/libretrocores/lr-applewin
pushd ext/local/scriptmodules/libretrocores
wget -O lr-applewin.sh https://gist.githubusercontent.com/Gemba/9dff49492c3ad1d2d3fbb15bfb3ebc4a/raw/2d4edce7744be1fb1f610a52441b752a4f6f9931/lr-applewin.sh
popd
@Gemba
Gemba / bashwelcomeextra-README.md
Last active May 28, 2023 03:42
Bash Welcome Extra: Scriptmodule for RetroPie-Setup with additional versions output on bash start.

INSTALLATION

On RetroPie shell as user pi:

cd RetroPie-Setup
mkdir -p ext/local/scriptmodules/supplementary
pushd ext/local/scriptmodules/supplementary
wget -O bashwelcomeextra.sh https://gist.githubusercontent.com/Gemba/bc41f9b2570486b855d6bfa57b3cbdc5/raw/d03b9f101212a0acb37d8750f9006f8639fcc54e/bashwelcomeextra.sh
popd
# remove genuine scriptmodule and install this one
@Gemba
Gemba / make_collection_recently_added.py
Created August 31, 2022 15:30
Creates a custom collection of recently added games for RetroPie/EmulationStation.
#! /usr/bin/env python3
# Copyright (C) 2022 Gemba, https://github.com/Gemba
# Contains portions of crtime. Copyright (C) 2019 Pascal van Kooten,
# https://github.com/kootenpv/crtime
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@Gemba
Gemba / touche_savegame_patcher.py
Last active April 28, 2022 19:14
Modify 'Touché: The Adventures of the Fifth Musketeer' savegames to overcome unsolvable puzzles due to logic errors in the original game script. See also: https://wiki.scummvm.org/index.php?title=Touche/TODO
#! /usr/bin/env python3
# Modify 'Touché: The Adventures of the Fifth Musketeer' savegames to overcome
# unsolvable puzzles due to logic errors in the original game script.
#
# At some point you may be stuck, because:
# You can not take a flask any longer which is needed or you can not
# leave the castle to do some puzzle to get a specific item.
#
# If this does ring a bell you have found the right place.
@Gemba
Gemba / lab_copier.py
Last active January 5, 2022 08:38
lab_copier.py: Enhanched Implementation of LABcopy in Python for 'Grim Fandando' and 'Escape From Monkey Island'
#! /usr/bin/env python3
# lab_copier.py: Modern implementation of labcopy in Python
#
# Rewrites size-forged LAB files to represent their actual size.
# E.g., for usage and proper game detection in SCUMMVM.
#
# Primary use is for "Grim Fandango" LAB files, but does handle
# "Escape from Monkey Island" files too.
#
@Gemba
Gemba / README-patch.md
Last active March 19, 2023 16:18
I2C-Tiny-USB Digispark Reboot Patch

I2C-Tiny-USB Digispark Reboot Patch

  • Tested with I2C-Tiny-USB commit 0a8fa3d. Verified working on Raspberry Pi 3+4. Further test on different devices appreciated.
  • Digispark used with RESETDSBL = 0 (see Notes below). Fuses: H:0x5d, L:0xe1, E:0xfe.
  • All USB devices directly connected to the Raspberry Pi.
  • Apply with patch -l < ....

Notes

  1. The Digispark bootloader has been altered to switch into programming mode when PB5 is set to Gnd (Fuse: RESETDSBL =0) insttead of waiting ~3 seconds in programming mode. This repo contains the files needed for the change. (In a nutshell: Enable this line, prepare the "trampolin" with the new bootloader, use an external programmer to [set the fuses](https://github.com/Bluebie/micronucleus/blob/b220fc49f4beaf200cfbf088721c09823b274905/firmware
@Gemba
Gemba / lr-desmume2015-mouse-analogstick-rotate-for-upright-games.patch
Last active February 1, 2021 20:54
Adds an option to rotate mouse and analog stick input (90 degrees CCW) for upright / book mode games in lr-desmume2015, tested against d6128e6b commit. Workaround until https://github.com/libretro/desmume2015/issues/98 is fixed.
diff --git a/desmume/src/libretro/libretro.cpp b/desmume/src/libretro/libretro.cpp
index 4d32d238..04ead997 100644
--- a/desmume/src/libretro/libretro.cpp
+++ b/desmume/src/libretro/libretro.cpp
@@ -33,6 +33,7 @@ static int delay_timer = 0;
static bool quick_switch_enable = false;
static bool mouse_enable = false;
static double mouse_speed= 1.0;
+static bool mouse_rotate_90ccw = false;
static double mouse_x_delta = 0.0;