Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 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.1-BETA.${MAGIC_SMOKE}") # Generate compile version
set(PROJECT_VERSION "0.6.2-BETA.${MAGIC_SMOKE}") # Generate compile version

### Want a cookie?
# NOTICE: ENABLING THESE DEBUGGING DEFINITIONS WILL HAVE SIGNIFICANT IMPACT AND WILL DELAY PLAYING!
Expand Down Expand Up @@ -99,11 +99,11 @@ endif()
# remember that enabling debugging and disabling optimizations
# will weird out tune playing and reading from and writing to
# SKPico will stop functioning
# *3 is required for onboard siplayer but can cause desync
# *3 is required for onboard siplayer but could cause desync
# with DMA read_address and chain_to()
set(DEBUG_SYMBOLS 0) # 0 default, 1 debug symbols & debug build enabled
set(DEBUGGING 0) # 0 default, 1~3 equals -g1~3
set(OPTIMIZATIONS 3) # 2 default, 2 ~ -O1 for debugging
set(OPTIMIZATIONS 3) # 3 default, 3 ~ -O1 for debugging
set(WARNINGS_ONLY 0) # 0 default, 0 error on warnings
set(TUSB_DEBUG 0) # 0 default, 0~3 non verbose to very verbose
set(ANALYSE_STACKUSAGE 0) # 0 default, 1 enabled, 0 disabled
Expand Down
Binary file modified examples/config-tool/cfg_usbsid
Binary file not shown.
6 changes: 6 additions & 0 deletions examples/config-tool/cfg_usbsid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,7 @@ void print_help(void)
printf(" -defaults,--config-defaults : Reset USBSID-Pico config to defaults\n");
printf(" Add optional positional argument `1` to reboot USBSID-Pico afterwards\n");
printf("--[PRESETS]---------------------------------------------------------------------------------------------------------\n");
printf(" -flip, --flip-sockets : Flip sockets SocketOne becomes SocketTwo, SocketTwo becomes SocketOne\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");
Expand Down Expand Up @@ -1630,6 +1631,11 @@ void config_usbsidpico(int argc, char **argv)
write_config_command(MIRRORED_SID, quickchange, 0 ,0 ,0);
goto exit;
}
if (!strcmp(argv[param_count], "-flip") || !strcmp(argv[param_count], "--flip-sockets")) {
printf("Set USBSID-Pico config to flip sockets One <-> Two\n");
write_config_command(FLIP_SOCKETS, 0, 0 ,0 ,0);
goto exit;
}

if (!strcmp(argv[param_count], "-r") || !strcmp(argv[param_count], "--read-config")) {
if (debug == 1) {
Expand Down
1 change: 1 addition & 0 deletions examples/config-tool/cfg_usbsid.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ enum
MIRRORED_SID = 0x45, /* Socket Two is linked to Socket One */
DUAL_SOCKET1 = 0x46, /* Two SID's in socket One, Socket Two disabled */
DUAL_SOCKET2 = 0x47, /* Two SID's in socket Two, Socket One disabled */
FLIP_SOCKETS = 0x48, /* Socket Two is Socket One and vice versa */

SET_CLOCK = 0x50, /* Change SID clock frequency by array id */
DETECT_SIDS = 0x51, /* Try to detect the SID types per socket */
Expand Down
2 changes: 1 addition & 1 deletion src/config_logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void print_cfg_addr(void)

void print_pico_features(void)
{
usCFG("\n[START PRINT PICO DEFAULT FEATURES]\n");
usCFG("[START PRINT PICO DEFAULT FEATURES]\n");

usCFG("PICO_PIO_VERSION = %d\n", PICO_PIO_VERSION); /* pio.h */
#if defined(PICO_DEFAULT_LED_PIN)
Expand Down
11 changes: 9 additions & 2 deletions src/config_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@
#include "logging.h"


/* Config */
/* config. */
extern void save_load_apply_config(bool at_boot, bool print_cfg);
extern Config usbsid_config;
extern RuntimeCFG cfg;

/* Config bus */
/* config_bus.c */
extern void apply_bus_config(bool quiet);
extern uint8_t sidaddr_default[4];

/* sid.c */
extern void reset_sid_registers(void);

/* Pre declarations */
void apply_socket_change(bool quiet);

Expand Down Expand Up @@ -330,6 +333,8 @@ void flip_sockets(void)
usbsid_config.socketTwo.sid2.addr = sidaddr_default[ids[1]];
extern void apply_bus_config(bool quiet);
apply_bus_config(false);
/* Reset SID registers after fiddling with the socket configuration */
reset_sid_registers();
return;
}

Expand Down Expand Up @@ -423,6 +428,8 @@ void set_socket_config(uint8_t cmd, bool s1en, bool s1dual, uint8_t s1chip, bool
} else if (cmd == 1) {
apply_socket_change(false);
}
/* Reset SID registers after fiddling with the socket configuration */
reset_sid_registers();
return;
}

Expand Down