rpcsx/rpcs3/Emu/Cell/Modules/StaticHLE.h

36 lines
643 B
C
Raw Normal View History

2020-12-05 13:08:24 +01:00
#pragma once
2018-10-26 12:08:45 +02:00
2020-12-12 13:01:29 +01:00
#include "util/types.hpp"
2020-10-30 21:26:22 +01:00
#include "Emu/Memory/vm_ptr.h"
2018-10-26 12:08:45 +02:00
#include <vector>
struct shle_pattern
{
u16 start_pattern[32];
u8 crc16_length;
u16 crc16;
u16 total_length;
std::string _module;
2018-10-26 12:08:45 +02:00
std::string name;
u32 fnid;
};
class statichle_handler
{
public:
2019-09-19 14:58:02 +02:00
statichle_handler(int);
2018-10-26 12:08:45 +02:00
~statichle_handler();
statichle_handler(const statichle_handler&) = delete;
statichle_handler& operator=(const statichle_handler&) = delete;
2018-10-26 12:08:45 +02:00
bool load_patterns();
bool check_against_patterns(vm::cptr<u8>& data, u32 size, u32 addr);
protected:
2020-12-18 09:24:19 +01:00
u16 gen_CRC16(const u8* data_p, usz length);
2018-10-26 12:08:45 +02:00
std::vector<shle_pattern> hle_patterns;
};