Implement Menu for adding Optimize serial keys
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions

This commit is contained in:
Lorenzooone
2025-11-07 02:27:23 +01:00
parent a6e4348066
commit 4ce35770ac
37 changed files with 1847 additions and 112 deletions

View File

@@ -1,6 +1,12 @@
#ifndef __CYPRESS_OPTIMIZE_3DS_ACQUISITION_HPP
#define __CYPRESS_OPTIMIZE_3DS_ACQUISITION_HPP
#define SERIAL_KEY_OPTIMIZE_NO_DASHES_SIZE 20
#define SERIAL_KEY_OPTIMIZE_DASHES_REPEATED_POS 4
// Not the last one, so -1
#define SERIAL_KEY_OPTIMIZE_DASHES_NUM ((SERIAL_KEY_OPTIMIZE_NO_DASHES_SIZE / SERIAL_KEY_OPTIMIZE_DASHES_REPEATED_POS) - 1)
#define SERIAL_KEY_OPTIMIZE_WITH_DASHES_SIZE (SERIAL_KEY_OPTIMIZE_NO_DASHES_SIZE + SERIAL_KEY_OPTIMIZE_DASHES_NUM)
#include <vector>
#include "utils.hpp"
#include "hw_defs.hpp"
@@ -18,6 +24,7 @@ bool is_device_optimize_3ds(CaptureDevice* device);
bool is_device_optimize_o3ds(CaptureDevice* device);
bool is_device_optimize_n3ds(CaptureDevice* device);
bool cyop_is_key_for_device_id(CaptureDevice* device, std::string key);
KeySaveError add_key_to_file(std::string key, bool is_for_new_3ds);
void usb_cyop_device_init();
void usb_cyop_device_close();

View File

@@ -47,6 +47,7 @@ int StartCaptureDma(cy_device_device_handlers* handlers, const cyop_device_usb_d
int capture_end(cy_device_device_handlers* handlers, const cyop_device_usb_device* device);
int ReadFrame(cy_device_device_handlers* handlers, uint8_t* buf, int length, const cyop_device_usb_device* device_desc);
int ReadFrameAsync(cy_device_device_handlers* handlers, uint8_t* buf, int length, const cyop_device_usb_device* device_desc, cy_async_callback_data* cb_data);
uint64_t get_device_id_from_key(std::string key, bool is_new_device);
bool check_key_matches_device_id(uint64_t device_id, std::string key, bool is_new_device);
bool check_key_matches_device_id(uint64_t device_id, std::string key, const cyop_device_usb_device* device);
bool check_key_valid(std::string key, bool is_new_device);