Skip to content

Instantly share code, notes, and snippets.

@cmitu
cmitu / 8BitDo M30 gamepad.cfg
Last active April 29, 2024 05:06
8BitDo M30 config
# 8BitDo v2.00 firmware
input_device = "8BitDo M30 gamepad"
input_device_name = "8BitDO M30"
input_driver = "udev"
input_vendor_id = "11720"
input_product_id = "1617"
input_left_axis = "-0"
input_right_axis = "+0"
@cmitu
cmitu / rpi-kernel.md
Last active February 21, 2024 04:45
RPI Kernel versions (Bookworm)
Version Applies to bits/arch
6.1.0-rpi4-rpi-v6 Pi 0/1/0W 32bit, armhf
6.1.0-rpi4-rpi-v7 Pi 2/3/3+/Zero 2W 32bit, armhf
6.1.0-rpi4-rpi-v7l Pi 4/400/CM4 32bit, armhf
6.1.0-rpi4-rpi-v8 Pi 3/3+/4/400/5/Zero 2 W/CM3/CM3+/CM4 64bit, arm64
6.1.0-rpi4-rpi-2712 Pi 5 64bit, arm64, with 16K memory pages
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" indent="yes" method="text" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:for-each select="//machine">
<xsl:value-of select="@name"/>
<xsl:text>;</xsl:text>
<xsl:value-of select="description" disable-output-escaping="yes" />
<xsl:text>
</xsl:text>
@cmitu
cmitu / system_videos.sh
Created April 16, 2019 17:29
Gamelist video parser
#!/usr/bin/env bash
system=$1
echo Analyzing `echo $system | tr [a-z] [A-Z]`...
if [ -f "$HOME/RetroPie/roms/$system/gamelist.xml" ]; then
echo "* found gamelist in ROM folder"
gamelist="$HOME/RetroPie/roms/$system/gamelist.xml"
else
echo "* found gamelist in default location"
@cmitu
cmitu / sdlvlc.cxx
Last active February 7, 2021 19:55
LibVLC playing video in a SDL window
// libSDL and libVLC sample code.
// License: [http://en.wikipedia.org/wiki/WTFPL WTFPL]
//
// Compile with: g++ -o sdlvlc dlvlc.cxx $(pkg-config --cflags --libs libvlc sdl2)
// Execute with: ./sdlvlc <video>.mp4
#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
#include "SDL_mutex.h"
@cmitu
cmitu / export_one.py
Created March 17, 2018 09:49
Exports one gamelist xml file to Excel.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Script to export one gamelist.xml file to an Excel spreadsheet.
Without arguments
* it searches for a `gamelist.xml` file in the running dir
* outputs a `gamelist.xlsx` file in the running dir
'''
import xml.etree.ElementTree as et
@cmitu
cmitu / gamelist.py
Last active March 14, 2023 17:08
Python script to export Emulationstation's game list to an Excel (xlsx) file.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xml.etree.ElementTree as et
import logging as log
import os.path
import fnmatch
import argparse
import xlsxwriter
from datetime import datetime as dt