Setup for obtaining ISTC Serial

This commit is contained in:
Lorenzooone
2024-12-11 23:15:09 +01:00
parent 895f4f1bbf
commit 0bcc9f986a
14 changed files with 307 additions and 67 deletions

View File

@@ -13,6 +13,7 @@
enum is_device_type {
IS_NITRO_EMULATOR_DEVICE,
IS_NITRO_CAPTURE_DEVICE,
IS_TWL_CAPTURE_DEVICE,
};
enum is_device_forward_config_values_colors {
@@ -59,12 +60,16 @@ struct is_device_usb_device {
int default_config;
int default_interface;
int bulk_timeout;
int ep2_in;
int ep1_out;
int ep_in;
int ep_out;
std::string write_pipe;
std::string read_pipe;
int product_id;
int manufacturer_id;
is_device_type device_type;
InputVideoDataType video_data_type;
size_t max_usb_packet_size;
bool do_pipe_clear_reset;
};
struct is_device_device_handlers {

View File

@@ -61,6 +61,11 @@ struct PACKED ISNitroEmulatorVideoInputData {
uint8_t screen_data[IN_VIDEO_SIZE_DS][3];
};
struct PACKED ISTWLCaptureVideoInputData {
USBOldDSPixelData screen_data[IN_VIDEO_SIZE_DS];
uint8_t bit_6_rb_screen_data[(IN_VIDEO_SIZE_DS >> 3) * 2];
};
struct ALIGNED(16) PACKED FTD3_3DSCaptureReceived {
RGB83DSVideoInputData video_in;
uint16_t audio_data[N3DSXL_SAMPLES_IN];
@@ -113,6 +118,23 @@ struct ALIGNED(16) PACKED ISNitroCaptureReceived {
ISNitroEmulatorVideoInputData video_in;
};
struct ALIGNED(16) PACKED ISTWLCaptureVideoReceived {
ISTWLCaptureVideoInputData video_in;
uint32_t time;
uint32_t frame;
uint8_t unknown[0x40000 - (sizeof(ISTWLCaptureVideoInputData) + (sizeof(uint32_t) * 2))];
};
struct ALIGNED(16) PACKED ISTWLCaptureAudioReceived {
uint32_t time;
uint16_t sound_data[TWL_CAPTURE_SAMPLES_IN];
};
struct ALIGNED(16) PACKED ISTWLCaptureReceived {
ISTWLCaptureVideoReceived video_capture_in;
ISTWLCaptureAudioReceived audio_capture_in[TWL_CAPTURE_MAX_SAMPLES_CHUNK_NUM];
};
#pragma pack(pop)
union CaptureReceived {

View File

@@ -73,5 +73,7 @@
#define N3DSXL_SAMPLES_IN (1096 * 16)
#define DS_SAMPLES_IN (1096)
#define MAX_SAMPLES_IN O3DS_SAMPLES_IN
#define TWL_CAPTURE_SAMPLES_IN (510)
#define TWL_CAPTURE_MAX_SAMPLES_CHUNK_NUM (MAX_SAMPLES_IN / TWL_CAPTURE_SAMPLES_IN)
#endif