Jump to content
LaunchBox Community Forums

{c}Guy123

Members
  • Posts

    5
  • Joined

  • Last visited

{c}Guy123's Achievements

4-Bit Adder

4-Bit Adder (2/7)

1

Reputation

  1. For anyone looking to do this, here's a Bash script that does this exact task. Place it in the directory with your Redump zip's and it'll unzip them and convert the iso to xiso format and place the new iso file up one folder. Enjoy! #!/usr/bin/env bash set -euo pipefail # === CONFIG === # Directory to search for .zip files (default: current directory) SRC_DIR="${1:-.}" # === REQUIREMENTS CHECK === command -v unzip >/dev/null 2>&1 || { echo "Error: unzip is required."; exit 1; } command -v dd >/dev/null 2>&1 || { echo "Error: dd is required."; exit 1; } # === MAIN === # Find all .zip files (case-insensitive), process each find "$SRC_DIR" -type f -iname '*.zip' -print0 | while IFS= read -r -d '' zip_path; do zip_dir="$(dirname "$zip_path")" zip_file="$(basename "$zip_path")" echo "==> Processing: $zip_path" # List entries that end with .iso (case-insensitive) inside the zip # We'll capture their relative paths (could include subfolders). mapfile -t iso_entries < <(unzip -Z1 "$zip_path" | awk 'BEGIN{IGNORECASE=1} /\.iso$/') # Unzip into the same directory as the .zip file echo "Unzipping into: $zip_dir" unzip -o -qq "$zip_path" -d "$zip_dir" if ((${#iso_entries[@]} == 0)); then echo "No .iso files found inside: $zip_file" continue fi # For each ISO that was in the zip, run dd as requested for rel_iso in "${iso_entries[@]}"; do iso_path="$zip_dir/$rel_iso" if [[ ! -f "$iso_path" ]]; then echo "Warning: expected ISO not found after unzip: $iso_path" >&2 continue fi iso_name="$(basename "$iso_path")" iso_stem="${iso_name%.*}" # Output ISO placed in the parent of the directory containing the ISO out_dir="$(dirname "$iso_path")/.." out_path="$out_dir/$iso_stem.iso" echo "Running dd on: $iso_path" echo "Output will be: $out_path" # Perform the dd with the exact parameters you specified dd if="$iso_path" of="$out_path" skip=387 bs=1M status=progress echo "Done: $out_path" done done echo "All done."
  2. Here's a bash script that finds all .zip files in a folder, then converts them to xiso format, placing them in the folder above where the zip files are. Just put this script into the folder where you're iso's that need converting are and run it. It'll unzip them, convert them and put the completed xiso's up one folder. Enjoy! #!/usr/bin/env bash set -euo pipefail # === CONFIG === # Directory to search for .zip files (default: current directory) SRC_DIR="${1:-.}" # === REQUIREMENTS CHECK === command -v unzip >/dev/null 2>&1 || { echo "Error: unzip is required."; exit 1; } command -v dd >/dev/null 2>&1 || { echo "Error: dd is required."; exit 1; } # === MAIN === # Find all .zip files (case-insensitive), process each find "$SRC_DIR" -type f -iname '*.zip' -print0 | while IFS= read -r -d '' zip_path; do zip_dir="$(dirname "$zip_path")" zip_file="$(basename "$zip_path")" echo "==> Processing: $zip_path" # List entries that end with .iso (case-insensitive) inside the zip # We'll capture their relative paths (could include subfolders). mapfile -t iso_entries < <(unzip -Z1 "$zip_path" | awk 'BEGIN{IGNORECASE=1} /\.iso$/') # Unzip into the same directory as the .zip file echo "Unzipping into: $zip_dir" unzip -o -qq "$zip_path" -d "$zip_dir" if ((${#iso_entries[@]} == 0)); then echo "No .iso files found inside: $zip_file" continue fi # For each ISO that was in the zip, run dd as requested for rel_iso in "${iso_entries[@]}"; do iso_path="$zip_dir/$rel_iso" if [[ ! -f "$iso_path" ]]; then echo "Warning: expected ISO not found after unzip: $iso_path" >&2 continue fi iso_name="$(basename "$iso_path")" iso_stem="${iso_name%.*}" # Output ISO placed in the parent of the directory containing the ISO out_dir="$(dirname "$iso_path")/.." out_path="$out_dir/$iso_stem.iso" echo "Running dd on: $iso_path" echo "Output will be: $out_path" # Perform the dd with the exact parameters you specified dd if="$iso_path" of="$out_path" skip=387 bs=1M status=progress echo "Done: $out_path" done done echo "All done."
  3. For anyone looking to exit any emulator using their xbox controller, I've written a AHK script that does two important things. the Back + LB combo presses alt f4 on the keyboard, exiting just about any emulator out there. The Back + RB combo brings BigBox back into focus using a class definition - which it monitors every few seconds. I've found this to be a VERY reliable way to get the focus back when sometimes it looses focus. Hope this helps others: ; ====================================================== ; Xbox One Controller (XInput) — BigBox Simple Focus ; - Back + LB → Alt+F4 (with safety hold) ; - Back + RB → Activate BigBox (auto-detects changing window class) ; AHK v1.1 compatible ; ====================================================== #NoEnv #SingleInstance, Force #Persistent SetBatchLines, -1 Process, Priority,, High SendMode, Event SetKeyDelay, 50, 50 ; -------- Config -------- userIndex := 0 ; 0 = first controller (try 1/2/3 if needed) pollMs := 20 ; controller poll interval (ms) closeHoldMs := 350 ; hold time for Back+LB before Alt+F4 fires (safety) classRefreshMs := 1000 ; how often to update BigBox's class (ms) bigBoxExe := "BigBox.exe" ; the process name to look for ; XInput button bitmasks XINPUT_GAMEPAD_BACK := 0x0020 XINPUT_GAMEPAD_LEFT_SHOULDER := 0x0100 ; LB XINPUT_GAMEPAD_RIGHT_SHOULDER := 0x0200 ; RB ; -------- State -------- comboCloseArmed := true comboActivateArmed := true closeHoldStart := 0 bigBoxClass := "" ; auto-detected class (changes each launch) lastClassUpdate := 0 ; Start timers SetTimer, PollPad, %pollMs% SetTimer, UpdateBigBoxClass, %classRefreshMs% return ; -------- Controller polling -------- PollPad: buttons := XInput_GetButtons(userIndex) if (buttons = -1) return lbDown := (buttons & XINPUT_GAMEPAD_LEFT_SHOULDER) ? 1 : 0 rbDown := (buttons & XINPUT_GAMEPAD_RIGHT_SHOULDER) ? 1 : 0 backDown := (buttons & XINPUT_GAMEPAD_BACK) ? 1 : 0 ; --- Back + LB → Alt+F4 (with safety hold) --- if (backDown && lbDown) { if (!closeHoldStart) closeHoldStart := A_TickCount if (comboCloseArmed && (A_TickCount - closeHoldStart >= closeHoldMs)) { SendEvent, {Alt down} Sleep, 60 SendEvent, {F4} Sleep, 100 SendEvent, {Alt up} comboCloseArmed := false } } else { closeHoldStart := 0 if (!backDown && !lbDown) comboCloseArmed := true } ; --- Back + RB → Activate BigBox (uses auto-detected class) --- if (backDown && rbDown && comboActivateArmed) { ActivateBigBox() comboActivateArmed := false } if (!backDown && !rbDown) comboActivateArmed := true return ; -------- BigBox class updater (runs periodically) -------- UpdateBigBoxClass: DetectHiddenWindows, Off SetTitleMatchMode, 2 crit := "ahk_exe " . bigBoxExe WinGet, cnt, List, %crit% if (cnt >= 1) { ; Find a visible, non-tool window for BigBox and grab its class Loop, %cnt% { h := cnt%A_Index% WinGet, style, Style, ahk_id %h% WinGet, ex, ExStyle, ahk_id %h% if !(style & 0x10000000) ; WS_VISIBLE continue if (ex & 0x00000080) ; WS_EX_TOOLWINDOW continue WinGetClass, cls, ahk_id %h% if (cls != "") { if (cls != bigBoxClass) { bigBoxClass := cls lastClassUpdate := A_TickCount ; Optional: uncomment for debug ; TrayTip, BigBox, Class updated: %bigBoxClass%, 1000, 1 } break } } } else { ; Not running: clear class so we don’t target a stale one bigBoxClass := "" } return ; -------- Activate BigBox using the freshest class (or exe as fallback) -------- ActivateBigBox() { global bigBoxClass, bigBoxExe DetectHiddenWindows, Off SetTitleMatchMode, 2 crit := (bigBoxClass != "") ? ("ahk_class " . bigBoxClass) : ("ahk_exe " . bigBoxExe) if !WinExist(crit) return WinGet, h, ID, %crit% WinActivate, ahk_id %h% WinWaitActive, ahk_id %h%,, 1 } ; ---- Debug: show current class (Ctrl+Alt+I) ---- ^!i:: msg := "BigBox class: " . (bigBoxClass != "" ? bigBoxClass : "<not detected>") . "`n" msg .= "Last update: " . (lastClassUpdate ? (A_TickCount - lastClassUpdate) . " ms ago" : "n/a") MsgBox, 64, BigBox Info, %msg% return ; ---- Quit (Ctrl+Alt+Q) ---- ^!q::ExitApp ; ====================================================== ; XInput helper (v1.1-safe) ; ====================================================== XInput_GetButtons(userIdx) { static dll := "" if (dll = "") { if (DllCall("LoadLibrary", "Str", "xinput1_4.dll", "Ptr")) dll := "xinput1_4.dll" else if (DllCall("LoadLibrary", "Str", "xinput1_3.dll", "Ptr")) dll := "xinput1_3.dll" else if (DllCall("LoadLibrary", "Str", "xinput9_1_0.dll", "Ptr")) dll := "xinput9_1_0.dll" else if (DllCall("LoadLibrary", "Str", "xinput1_2.dll", "Ptr")) dll := "xinput1_2.dll" else if (DllCall("LoadLibrary", "Str", "xinput1_1.dll", "Ptr")) dll := "xinput1_1.dll" else return -1 } VarSetCapacity(state, 16, 0) r := DllCall(dll . "\XInputGetState", "UInt", userIdx, "Ptr", &state, "UInt") if (r != 0) return -1 return NumGet(state, 4, "UShort") ; wButtons } Xbox_Controller_Launchbox_v2.ahk
  4. I'm having this exact same problem. I've configured Dolphin ( that resides in the Launchbox/Emulators/Dolphin folder - which launchbox downloaded for me and configured when I imported Wii games. Launching manually, and my controllers work, but launching from within Launchbox, and they do not. What Gives? I've checked the command line Launchbox generates and I can't see any problems. Help!
  5. This seems like a stupid question, but is there a controller key combo to quit a game? Ive looked over this thread and watched the video and there's no mention of this. I don't want to break anything by adding it directly to mame in the ui, so thought I'd ask first. Thanks in advance to anyone who can answer this.
×
×
  • Create New...