2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
2015-11-10 05:21:49 +00:00
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
2012-12-19 09:30:18 +00:00
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
#pragma once
|
2016-01-13 11:15:30 +00:00
|
|
|
#include <Project64-core/N64System/Recompiler/X86ops.h>
|
2012-12-19 09:30:18 +00:00
|
|
|
|
2010-05-30 01:54:42 +00:00
|
|
|
class CRecompMemory :
|
2015-12-13 08:26:41 +00:00
|
|
|
protected CX86Ops
|
2010-05-25 09:15:19 +00:00
|
|
|
{
|
|
|
|
protected:
|
2015-12-13 08:26:41 +00:00
|
|
|
CRecompMemory();
|
|
|
|
~CRecompMemory();
|
2010-05-25 09:15:19 +00:00
|
|
|
|
2015-12-13 08:26:41 +00:00
|
|
|
bool AllocateMemory();
|
|
|
|
void CheckRecompMem();
|
|
|
|
void Reset();
|
|
|
|
void ShowMemUsed();
|
2015-04-28 22:19:02 +00:00
|
|
|
|
2015-12-13 08:26:41 +00:00
|
|
|
uint8_t* RecompPos() const { return m_RecompPos; }
|
2010-05-25 09:15:19 +00:00
|
|
|
|
2010-05-30 01:54:42 +00:00
|
|
|
private:
|
2015-12-13 08:26:41 +00:00
|
|
|
CRecompMemory(const CRecompMemory&); // Disable copy constructor
|
|
|
|
CRecompMemory& operator=(const CRecompMemory&); // Disable assignment
|
2015-04-28 22:19:02 +00:00
|
|
|
|
2015-12-13 08:26:41 +00:00
|
|
|
uint8_t * m_RecompCode;
|
|
|
|
uint32_t m_RecompSize;
|
2015-11-09 20:22:51 +00:00
|
|
|
|
2015-12-13 08:26:41 +00:00
|
|
|
enum { MaxCompileBufferSize = 0x03C00000 };
|
|
|
|
enum { InitialCompileBufferSize = 0x00500000 };
|
|
|
|
enum { IncreaseCompileBufferSize = 0x00100000 };
|
2015-01-31 19:27:27 +00:00
|
|
|
};
|