Initial commit for GitHub migration based on spice2x-25-03-03

This commit is contained in:
sp2xdev
2025-03-10 19:16:49 -07:00
parent 94af8d32c9
commit ed8c72852f
1008 changed files with 296815 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#pragma once
#include <cstring>
#include <ctime>
#include <mutex>
#include <optional>
#include <thread>
#include "device.h"
#include "hooks/sleephook.h"
#include "reader/crypt.h"
namespace acioemu {
extern bool ICCA_DEVICE_HACK;
class ICCADevice : public ACIODeviceEmu {
private:
bool type_new;
bool flip_order;
std::thread *keypad_thread;
std::mutex keypad_mutex;
uint8_t **cards;
time_t *cards_time;
uint8_t *status;
bool *accept;
bool *hold;
uint8_t *keydown;
uint16_t *keypad;
bool **keypad_last;
uint8_t *keypad_capture;
std::optional<Crypt> *crypt;
uint8_t *counter;
public:
explicit ICCADevice(bool flip_order, bool keypad_thread, uint8_t node_count);
~ICCADevice() override;
bool parse_msg(MessageData *msg_in, circular_buffer<uint8_t> *response_buffer) override;
void update_card(int unit);
void update_keypad(int unit, bool update_edge);
void update_status(int unit);
};
}