Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ab4b3bf
Tippy tappy typoooos
LouDnl Jan 29, 2026
e029120
Windows fix schmix.. yuck
LouDnl Jan 30, 2026
7ee855e
What are you, blind? 😶‍🌫️
LouDnl Jan 30, 2026
774b705
Fix upload download in release
LouDnl Jan 30, 2026
0a4d574
Update libwinpthread-1.dll for config tool (was outdated)
LouDnl Jan 30, 2026
7486996
Add custom naming parameter to build scripts
LouDnl Feb 1, 2026
9fc11c1
Update buildscript
LouDnl Feb 1, 2026
c6ed5d0
Update tools buildscript, add MacOs
LouDnl Feb 1, 2026
d0b964e
Remove dependency installation for MacOs since these are all already …
LouDnl Feb 1, 2026
50ba6b7
Add optional custom paths in build script for emulator and sidplayer
LouDnl Feb 1, 2026
6f7bdb4
Cleanup and add docstrings
LouDnl Feb 4, 2026
0e559eb
PIO cleanup and documentations
LouDnl Feb 4, 2026
d7b6d40
Remove unused PHI2 pio
LouDnl Feb 4, 2026
5c0aa86
Missed a rename
LouDnl Feb 4, 2026
2fc98fd
Missed a rename
LouDnl Feb 4, 2026
2c88ad7
Housekeeping
LouDnl Feb 4, 2026
c0df3de
Fix `clockcycle_delay` for rp2040 by chaining two DMA channels togeth…
LouDnl Feb 4, 2026
cfdb7bc
Update reset registers with simulated real world delay cycles
LouDnl Feb 4, 2026
57099b0
Housekeeping
LouDnl Feb 4, 2026
d8bcce7
Re introduce an ASID buffer (uses PIO and IRQ) for `write_ordered` AS…
LouDnl Feb 4, 2026
3c4003f
Add `set_asid_env` for ASID to change the USBSID clockrate and enable…
LouDnl Feb 4, 2026
b84b5f5
Add config option for single SID in socket two
LouDnl Feb 4, 2026
c768d68
Add single SID socket 2 config option
LouDnl Feb 4, 2026
78f05ea
Fix concurrency groups
LouDnl Feb 4, 2026
e84996e
Add shortcuts to command line arguments
LouDnl Feb 4, 2026
49f0668
Fix possible overflow issue
LouDnl Feb 5, 2026
ebf4ea5
Housekeeping
LouDnl Feb 5, 2026
54c7b3b
Housekeeping
LouDnl Feb 5, 2026
c1855fb
Logging overhaul
LouDnl Feb 8, 2026
e577cd3
Fix regression in boot sequence where an rp2350 would freeze forever …
LouDnl Feb 8, 2026
955e4c9
ASID overhaul
LouDnl Feb 8, 2026
15f8093
Missed log change
LouDnl Feb 8, 2026
abe8d20
That should have been removed
LouDnl Feb 8, 2026
e6dfa8d
Whoops
LouDnl Feb 8, 2026
18bc1ac
🙄
LouDnl Feb 8, 2026
eccd98d
Fix hardfault/lockup on rp2350 when toggling the mono/stereo pin
LouDnl Feb 11, 2026
e0080ae
Documentation date update
LouDnl Feb 11, 2026
971a8b5
Fix date
LouDnl Feb 11, 2026
6ac7f9d
Syntax fix
LouDnl Feb 11, 2026
d7ce5c1
Also reset the writeorder when midi/asid is no longer mounted
LouDnl Feb 11, 2026
45b54f0
Bump version for next release
LouDnl Feb 11, 2026
39fdc8e
Fix logging issue in cfg buffer printing
LouDnl Feb 11, 2026
9ba9c24
Add config option to flip sockets at runtime 1 <--> 2
LouDnl Feb 11, 2026
558c7b5
What is it with Windows that it always has to %#$%#$^$@%^&
LouDnl Feb 11, 2026
b2f97c4
🤬
LouDnl Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
# Allows you to run this workflow manually from the Actions tab when needed
workflow_dispatch:

concurrency:
group: dev-firmware-build
cancel-in-progress: true

jobs:
build:
name: Build
Expand Down
36 changes: 27 additions & 9 deletions .github/workflows/buildtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ env:
on:
push:
paths:
- "src/examples/config-tool/**"
- "src/examples/send_sid/**"
- "examples/config-tool/**"
- "examples/send_sid/**"
- ".github/workflows/buildtools.yml"
# Only run on dev branch
branches: [dev]
Expand All @@ -21,6 +21,10 @@ on:
type: boolean
default: false

concurrency:
group: dev-tools-build
cancel-in-progress: true

jobs:
build-tools:
name: Tools
Expand All @@ -38,10 +42,18 @@ jobs:
directory: config-tool, buildname: cfg_usbsid }
- { os: ubuntu-latest, shell: bash,
directory: send_sid, buildname: send_sid }
- { os: windows-2022, shell: 'msys2 {0}',
directory: config-tool, buildname: cfg_usbsid.exe }
- { os: windows-2022, shell: 'msys2 {0}',
directory: send_sid, buildname: send_sid.exe }
- { os: windows-2022, shell: 'msys2 {0}',
directory: config-tool, buildname: cfg_usbsid }
- { os: windows-2022, shell: 'msys2 {0}',
directory: send_sid, buildname: send_sid }
- { os: macos-14, shell: 'bash',
directory: config-tool, buildname: cfg_usbsid_macos14 }
- { os: macos-14, shell: 'bash',
directory: send_sid, buildname: send_sid_macos14 }
- { os: macos-15-intel, shell: 'bash',
directory: config-tool, buildname: cfg_usbsid_macos15intel }
- { os: macos-15-intel, shell: 'bash',
directory: send_sid, buildname: send_sid_macos15intel }
defaults:
run:
shell: ${{ matrix.shell }}
Expand Down Expand Up @@ -74,6 +86,12 @@ jobs:
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-ninja

# - name: Install dependencies (MacOs)
# if: matrix.os == 'macos-14' || matrix.os == 'macos-15-intel'
# run: |
# brew update
# brew install pkg-config cmake ninja libusb

- name: Remove pre-built binaries
run: |
pushd repo/examples/${{ matrix.directory }}
Expand All @@ -84,15 +102,15 @@ jobs:
- name: Configure and build ${{ matrix.buildname }}
run: |
pushd repo/examples/${{ matrix.directory }}
cmake -S . -B build && cmake --build build -j$(nproc)
cmake -S . -B build -DEXECUTABLE=${{ matrix.buildname }} && cmake --build build -j$(nproc)
ls -lhai
popd

- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.buildname }}-${{ matrix.os }}
name: tools-${{ matrix.buildname }}-${{ matrix.os }}
path: |
repo/examples/${{ matrix.directory }}/${{ matrix.buildname }}
${{ matrix.os == 'windows-2022' && format('repo/examples/{0}/{1}.exe', matrix.directory, matrix.buildname) || format('repo/examples/{0}/{1}', matrix.directory, matrix.buildname) }}
${{ matrix.os == 'windows-2022' && format('repo/examples/{0}/*.dll', matrix.directory) || '' }}
if-no-files-found: ignore
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
tag: ${{ env.SOURCE_TAG }}
name: ${{ env.SOURCE_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "release/*.uf2"
artifacts: "release/*.uf2,release/*.zip"
prerelease: false
removeArtifacts: true
generateReleaseNotes: true
Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
- name: Download Tools Artifacts
uses: actions/download-artifact@v4
with:
pattern: '*'
pattern: 'tools-*'
path: tools-output
merge-multiple: true

Expand Down
37 changes: 30 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set(PROJECT_NAME usbsidpico)
set(PROJECT_MANUFACTURER "LouD")
set(PRODUCT_STRING "USBSID-Pico")
string(TIMESTAMP MAGIC_SMOKE "%Y%m%d") # Auto generate dated version
set(PROJECT_VERSION "0.6.0-BETA.${MAGIC_SMOKE}") # Generate compile version
set(PROJECT_VERSION "0.6.1-BETA.${MAGIC_SMOKE}") # Generate compile version

### Want a cookie?
# NOTICE: ENABLING THESE DEBUGGING DEFINITIONS WILL HAVE SIGNIFICANT IMPACT AND WILL DELAY PLAYING!
Expand All @@ -40,12 +40,15 @@ if(NOT DEFINED $ENV{DISABLE_DEBUGGING}) # MATCHES
set(USBSID_DEBUGGING 1) # Enable debugging ~ mandatory enable for all other logging types
set(UART_DEBUGGING 1) # Enable debugging over uart pins ~ USBCDC must be 0!
set(USBCDC_DEBUGGING 0) # Enable debugging over cdc port 2 ~ UART must be 0!
set(FILENAME_LOGGING 0) # Enable logging of source filename
set(BOOT_LOGGING 0) # Enable bootlog in usbsid.c
set(DEFAULT_DEBUGGING 1) # Enable debugging in usbsid.c
set(CONFIG_DEBUGGING 1) # Enable debugging in config.c
set(USBIO_DEBUGGING 0) # Enable debugging in usbsid.c
set(GPIOBUS_DEBUGGING 0) # Enable debugging in gpio.c
set(MIDI_DEBUGGING 0) # Enable debugging in midi.c
set(MIDIVOICE_DEBUGGING 0) # Enable debugging in midi.c
set(ASID_DEBUGGING 0) # Enable debugging in acid.c and asid_buffer.c
set(MEMORY_LOGGING 0) # Enable memory map of SID 1 voices printing
set(SIDWRITES_DEBUGGING 0) # Enable logging of SID writes one core 2
set(EMULATOR_DEBUGGING 0) # Enable debugging in emulator
Expand Down Expand Up @@ -338,6 +341,7 @@ set(SOURCEFILES
${CMAKE_CURRENT_LIST_DIR}/src/midi.c
${CMAKE_CURRENT_LIST_DIR}/src/midi_handler.c
${CMAKE_CURRENT_LIST_DIR}/src/asid.c
${CMAKE_CURRENT_LIST_DIR}/src/asid_buffer.c
${CMAKE_CURRENT_LIST_DIR}/src/sysex.c
${CMAKE_CURRENT_LIST_DIR}/src/sid.c
${CMAKE_CURRENT_LIST_DIR}/src/sid_cloneconfig.c
Expand All @@ -360,7 +364,12 @@ if(ONBOARD_SIDPLAYER EQUAL 1)
# NOTICE: SIDPLAYER REQUIRES FULL OPTIMIZATIONS!!
set(COMPILE_OPTS ${COMPILE_OPTS} -O3)
## Set sidplayer list directory
set(USPLAYER_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/usbsid-player)
if(NOT ${EMUDIR} STREQUAL "")
set(USPLAYER_LIST_DIR ${EMUDIR})
else()
set(USPLAYER_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/usbsid-player)
endif()
message(DEBUG "USPLAYER_LIST_DIR is set to ${USPLAYER_LIST_DIR}")

### Adjust filenames for user interpretation
foreach(FILENAME ${FILENAMES})
Expand Down Expand Up @@ -423,7 +432,12 @@ if(ONBOARD_EMULATOR EQUAL 1)
set(COMPILE_OPTS ${COMPILE_OPTS} -DEMBEDDED=1)
add_compile_definitions(ONBOARD_EMULATOR=1)
set(EMULATOR_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/emulator)
set(EMUDORE_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/emudore-embedded)
if(NOT ${EMUDIR} STREQUAL "")
set(EMUDORE_LIST_DIR ${EMUDIR})
else()
set(EMUDORE_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/emudore-embedded)
endif()
message(DEBUG "EMUDORE_LIST_DIR is set to ${EMUDORE_LIST_DIR}")

### Adjust filenames for user interpretation
foreach(FILENAME ${FILENAMES})
Expand Down Expand Up @@ -503,7 +517,7 @@ set(PIO_BUS ${CMAKE_CURRENT_LIST_DIR}/src/pio/bus_control.pio)
set(PIO_CLOCK ${CMAKE_CURRENT_LIST_DIR}/src/pio/clock.pio)
set(PIO_VU ${CMAKE_CURRENT_LIST_DIR}/src/pio/vu.pio)
set(PIO_RGB ${CMAKE_CURRENT_LIST_DIR}/src/pio/vu_rgb.pio)
set(PIO_COUNTER ${CMAKE_CURRENT_LIST_DIR}/src/pio/clock_counter.pio)
set(PIO_COUNTER ${CMAKE_CURRENT_LIST_DIR}/src/pio/cycle_counter.pio)
if(USE_PIO_UART EQUAL 1)
set(PIO_UART ${CMAKE_CURRENT_LIST_DIR}/src/pio/uart_rx.pio)
endif()
Expand Down Expand Up @@ -538,15 +552,21 @@ if(USBSID_DEBUGGING EQUAL 1)
if(DEFAULT_DEBUGGING EQUAL 1)
add_compile_definitions(USBSID_DEBUG=1)
endif()
if(FILENAME_LOGGING EQUAL 1)
add_compile_definitions(LOG_FILENAME=1)
endif()
if(BOOT_LOGGING EQUAL 1)
add_compile_definitions(USBSID_BOOTLOG=1)
endif()
if(CONFIG_DEBUGGING EQUAL 1)
add_compile_definitions(CONFIG_DEBUG=1)
endif()
if(MEMORY_LOGGING EQUAL 1)
add_compile_definitions(MEM_DEBUG=1)
endif()
if(SIDWRITES_DEBUGGING EQUAL 1)
add_compile_definitions(WRITE_DEBUG=1)
endif()
if(CONFIG_DEBUGGING EQUAL 1)
add_compile_definitions(CONFIG_DEBUG=1)
endif()
if(USBIO_DEBUGGING EQUAL 1)
add_compile_definitions(USBIO_DEBUG=1)
endif()
Expand All @@ -556,6 +576,9 @@ if(USBSID_DEBUGGING EQUAL 1)
if(MIDIVOICE_DEBUGGING EQUAL 1)
add_compile_definitions(MIDIVOICE_DEBUG=1)
endif()
if(ASID_DEBUGGING EQUAL 1)
add_compile_definitions(ASID_DEBUG=1)
endif()
if(GPIOBUS_DEBUGGING EQUAL 1)
add_compile_definitions(USBSIDGPIO_DEBUG=1)
endif()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ Any code in this repository that is not written by me automatically falls under
For for more information about this license please read the LICENSE document in the root of the USBSID-Pico repository.

### USBSID-Pico v1.3 PCB Hardware License ~ Creative Commons
<a href="https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.3">USBSID-Pico v1.3 PCB</a> © 2025 by <a href="https://github.com/LouDnl">LouD</a> is licensed under <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International</a><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/nc.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/nd.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;">
<a href="https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.3">USBSID-Pico v1.3 PCB</a> © 2025-2026 by <a href="https://github.com/LouDnl">LouD</a> is licensed under <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International</a><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/nc.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/nd.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;">

### USBSID-Pico v1.0 PCB Hardware License ~ Creative Commons
<a href="https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.0">USBSID-Pico v1.0 PCB</a> © 2024 by <a href="https://github.com/LouDnl">LouD</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;">
<a href="https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.0">USBSID-Pico v1.0 PCB</a> © 2024-2026 by <a href="https://github.com/LouDnl">LouD</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;"><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt="" width="20em" style="max-width: 1em;max-height:1em;margin-left: .2em;">

# Certification
### USBSID-Pico v1.0 PCB OSHWA certification
Expand Down
Binary file modified doc/USBSID-Pico-Cynthcart-manual.pdf
Binary file not shown.
Binary file modified doc/USBSID-Pico-PCBv1.0-manual.pdf
Binary file not shown.
Binary file modified doc/USBSID-Pico-PCBv1.3-manual.pdf
Binary file not shown.
Binary file modified doc/USBSID-Pico-firmware-manual.pdf
Binary file not shown.
Binary file modified doc/USBSID-Pico-software-manual.pdf
Binary file not shown.
Binary file modified doc/USBSID-Player-manual.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions doc/license-hardware.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== USBSID-Pico v1.3 PCB Hardware License ~ Creative Commons
https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.3[USBSID-Pico v1.3 PCB] © 2025 by
https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.3[USBSID-Pico v1.3 PCB] © 2025-2026 by
https://github.com/LouDnl[LouD] is licensed under +
https://creativecommons.org/licenses/by-nc-nd/4.0/[Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International] +
image:https://mirrors.creativecommons.org/presskit/icons/cc.svg[link="https://creativecommons.org/licenses/by-nc-nd/4.0/"]image:https://mirrors.creativecommons.org/presskit/icons/by.svg[link="https://creativecommons.org/licenses/by-nc-nd/4.0/"]image:https://mirrors.creativecommons.org/presskit/icons/nc.svg[link="https://creativecommons.org/licenses/by-nc-nd/4.0/"]image:https://mirrors.creativecommons.org/presskit/icons/nd.svg[link="https://creativecommons.org/licenses/by-nc-nd/4.0/"]

=== USBSID-Pico v1.0 PCB Hardware License ~ Creative Commons
https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.0[USBSID-Pico v1.0 PCB] © 2024 by
https://github.com/LouDnl/USBSID-Pico/tree/master/hardware/USBSID-Pico-v1.0[USBSID-Pico v1.0 PCB] © 2024-2026 by
https://github.com/LouDnl[LouD] is licensed under +
https://creativecommons.org/licenses/by-sa/4.0/[Creative Commons Attribution-ShareAlike 4.0 International] +
image:https://mirrors.creativecommons.org/presskit/icons/cc.svg[link="https://creativecommons.org/licenses/by-sa/4.0/"]image:https://mirrors.creativecommons.org/presskit/icons/by.svg[link="https://creativecommons.org/licenses/by-sa/4.0/"]image:https://mirrors.creativecommons.org/presskit/icons/sa.svg[link="https://creativecommons.org/licenses/by-sa/4.0/"]
17 changes: 9 additions & 8 deletions examples/config-tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ cmake_minimum_required(VERSION 3.17)

### Project magic sprinkles
set(PROJECT_NAME cfg_usbsid)
set(EXECUTABLE ${PROJECT_NAME} CACHE STRING "EXECUTABLE")

### Project type
project(${PROJECT_NAME} C ASM)
Expand Down Expand Up @@ -73,18 +74,18 @@ set(TARGET_INCLUDE_DIRS PRIVATE
)

### Compile time
add_executable(${PROJECT_NAME} ${SOURCEFILES})
add_executable(${EXECUTABLE} ${SOURCEFILES})
### Copy build output to main directory
add_custom_command(TARGET
${PROJECT_NAME}
${EXECUTABLE}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> ${CMAKE_CURRENT_LIST_DIR})
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${EXECUTABLE}> ${CMAKE_CURRENT_LIST_DIR})
### Remove build output from build directory
add_custom_command(TARGET
${PROJECT_NAME}
${EXECUTABLE}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E rm $<TARGET_FILE:${PROJECT_NAME}>)
COMMAND ${CMAKE_COMMAND} -E rm $<TARGET_FILE:${EXECUTABLE}>)

target_include_directories(${PROJECT_NAME} ${TARGET_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${TARGET_LL})
target_sources(${PROJECT_NAME} PUBLIC ${SOURCEFILES})
target_include_directories(${EXECUTABLE} ${TARGET_INCLUDE_DIRS})
target_link_libraries(${EXECUTABLE} ${TARGET_LL})
target_sources(${EXECUTABLE} PUBLIC ${SOURCEFILES})
2 changes: 1 addition & 1 deletion examples/config-tool/cfg_skpico.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* This file is part of USBSID-Pico (https://github.com/LouDnl/USBSID-Pico)
* File author: LouD
*
* Copyright (c) 2024-2025 LouD
* Copyright (c) 2024-2026 LouD
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Binary file modified examples/config-tool/cfg_usbsid
Binary file not shown.
25 changes: 16 additions & 9 deletions examples/config-tool/cfg_usbsid.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ int usbsid_init(void)
}

for (int if_num = 0; if_num < 2; if_num++) {
if (libusb_kernel_driver_active(devh, if_num)) {
if (libusb_kernel_driver_active(devh, if_num) == 1) {
libusb_detach_kernel_driver(devh, if_num);
}
rc = libusb_claim_interface(devh, if_num);
Expand All @@ -354,20 +354,20 @@ int usbsid_init(void)
}

rc = libusb_control_transfer(devh, 0x21, 0x22, ACM_CTRL_DTR | ACM_CTRL_RTS, 0, NULL, 0, 0);
if (rc < 0) {
if (rc != 0 && rc != 7) {
fprintf(stderr, "Error configuring line state during control transfer: %d, %s: %s\n",
rc, libusb_error_name(rc), libusb_strerror(rc));
goto out;
}

rc = libusb_control_transfer(devh, 0x21, 0x20, 0, 0, encoding, count_of(encoding), 0);
if (rc < 0 || rc != 7) {
if (rc != 0 && rc != 7) {
fprintf(stderr, "Error configuring line encoding during control transfer: %d, %s: %s\n",
rc, libusb_error_name(rc), libusb_strerror(rc));
goto out;
}

usid_dev = (rc > 0 && rc == 7) ? 0 : -1;
usid_dev = (rc == 0 || rc == 7) ? 0 : -1;

if (usid_dev < 0)
{
Expand All @@ -385,6 +385,7 @@ int usbsid_init(void)
out:;
if (devh != NULL)
usbsid_close();
rc = -1;
return rc;
}

Expand Down Expand Up @@ -1247,7 +1248,7 @@ void config_skpico(int argc, char **argv)
skpico_write_config(debug);

printf("Start saving default config\n");
sleep(0.5);
sleep(1);
skpico_save_config(debug);

printf("Extend config mode\n");
Expand Down Expand Up @@ -1373,7 +1374,7 @@ void config_skpico(int argc, char **argv)
skpico_write_config(debug);

printf("Start saving config\n");
sleep(0.5);
sleep(1);
skpico_save_config(debug);

printf("Extend config mode\n");
Expand All @@ -1384,7 +1385,7 @@ void config_skpico(int argc, char **argv)
skpico_read_config(debug);
skpico_end_config_mode(debug);

sleep(0.5);
sleep(1);
goto exit;
break;
}
Expand Down Expand Up @@ -1439,6 +1440,7 @@ void print_help(void)
printf("--[PRESETS]---------------------------------------------------------------------------------------------------------\n");
printf(" (add '-q' before any of the preset commands for a quick change and apply the config without saving and rebooting)\n");
printf(" -single, --single-sid : Socket 1 enabled @ single SID, Socket 2 disabled\n");
printf(" -single2, --single-sid-s2 : Socket 1 disabled, Socket 2 enabled @ single SID\n");
printf(" -dual, --dual-sid : Socket 1 enabled @ single SID, Socket 2 enabled @ single SID\n");
printf(" -duals1, --dual-sid-socket1 : Socket 1 enabled @ dual SID, Socket 2 disabled\n");
printf(" -duals2, --dual-sid-socket2 : Socket 1 disabled, Socket 2 enabled @ dual SID\n");
Expand Down Expand Up @@ -1584,10 +1586,15 @@ void config_usbsidpico(int argc, char **argv)
quickchange = 1;
};
if (!strcmp(argv[param_count], "-single") || !strcmp(argv[param_count], "--single-sid")) {
printf("Set USBSID-Pico config to single SID\n");
printf("Set USBSID-Pico config to single SID @ Socket One\n");
write_config_command(SINGLE_SID, quickchange, 0, 0, 0);
goto exit;
}
if (!strcmp(argv[param_count], "-single2") || !strcmp(argv[param_count], "--single-sid-s2")) {
printf("Set USBSID-Pico config to single SID @ Socket Two\n");
write_config_command(SINGLE_SID, quickchange, 1, 0, 0);
goto exit;
}
if (!strcmp(argv[param_count], "-dual") || !strcmp(argv[param_count], "--dual-sid")) {
printf("Set USBSID-Pico config to dual SID\n");
write_config_command(DUAL_SID, quickchange, 0 ,0 ,0);
Expand Down Expand Up @@ -1721,7 +1728,7 @@ void config_usbsidpico(int argc, char **argv)
}
if (argc > 8) {
uint8_t test_buffer[64] = {0};
test_buffer[0] = ((COMMAND << 6) | 18);
test_buffer[0] = ((COMMAND << 6) | CONFIG);
test_buffer[1] = WRITE_CONFIG;
int tb_count = 2;
for (int i = 2; i < argc; i++) {
Expand Down
Binary file modified examples/config-tool/libwinpthread-1.dll
Binary file not shown.
Loading