Files
pico-loader/arm9/source/SecureSysCallsUnusedSpaceLocator.h

19 lines
714 B
C
Raw Permalink Normal View History

2025-11-22 11:08:28 +01:00
#pragma once
#include "ndsHeader.h"
class PatchHeap;
/// @brief Class for finding the unused space between the system calls in the arm9 secure area.
class SecureSysCallsUnusedSpaceLocator
{
public:
/// @brief Searches for the unused space between the system calls in the arm9 secure area of the rom
/// with the given \p romHeader and adds the unused space to the given \p patchHeap.
/// @param romHeader The rom header.
/// @param patchHeap The patch heap to add the unused space to.
void FindUnusedSpace(const nds_header_ntr_t* romHeader, PatchHeap& patchHeap) const;
private:
const u16* FindPattern(const u16* data, u32 length, const u16* pattern, u32 patternLength) const;
};