Integrate memory changes from AW.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
f6224a5a3b
commit
edb93cbaa0
8 changed files with 2 additions and 34 deletions
|
@ -38,7 +38,6 @@ add_library(appleii SHARED
|
|||
|
||||
Configuration/PropertySheetHelper.cpp
|
||||
|
||||
linux/windows/memory.cpp
|
||||
linux/windows/handles.cpp
|
||||
linux/windows/files.cpp
|
||||
linux/windows/resources.cpp
|
||||
|
|
|
@ -68,6 +68,7 @@ typedef UINT64 uint64_t;
|
|||
#include <stack>
|
||||
#include <stdexcept>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
|
||||
#include "linux/win.h"
|
||||
|
||||
|
|
|
@ -151,8 +151,6 @@ namespace
|
|||
|
||||
LogFileOutput("Initialisation\n");
|
||||
|
||||
ImageInitialize();
|
||||
|
||||
bool disksOk = true;
|
||||
if (!options.disk1.empty())
|
||||
{
|
||||
|
@ -227,7 +225,6 @@ namespace
|
|||
CpuDestroy();
|
||||
|
||||
cardManager.GetDisk2CardMgr().Destroy();
|
||||
ImageDestroy();
|
||||
|
||||
LogDone();
|
||||
|
||||
|
|
|
@ -80,7 +80,6 @@ namespace
|
|||
|
||||
void loadEmulator(QWidget * window, Emulator * emulator, const GlobalOptions & options)
|
||||
{
|
||||
ImageInitialize();
|
||||
LoadConfiguration();
|
||||
|
||||
CheckCpu();
|
||||
|
@ -142,7 +141,6 @@ namespace
|
|||
CpuDestroy();
|
||||
|
||||
cardManager.GetDisk2CardMgr().Destroy();
|
||||
ImageDestroy();
|
||||
LogDone();
|
||||
RiffFinishWriteFile();
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ namespace
|
|||
g_nAppMode = MODE_RUNNING;
|
||||
LogFileOutput("Initialisation\n");
|
||||
|
||||
ImageInitialize();
|
||||
g_bFullSpeed = false;
|
||||
|
||||
LoadConfiguration();
|
||||
|
@ -103,7 +102,6 @@ namespace
|
|||
CpuDestroy();
|
||||
|
||||
GetCardMgr().GetDisk2CardMgr().Destroy();
|
||||
ImageDestroy();
|
||||
LogDone();
|
||||
RiffFinishWriteFile();
|
||||
}
|
||||
|
|
|
@ -1,31 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <type_traits>
|
||||
#include "linux/windows/wincompat.h"
|
||||
|
||||
#define MEM_COMMIT 0x00001000
|
||||
#define MEM_RESERVE 0x00002000
|
||||
#define MEM_RELEASE 0x00008000
|
||||
|
||||
#define PAGE_NOACCESS 0x01
|
||||
#define PAGE_READWRITE 0x04
|
||||
|
||||
#define MoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
|
||||
#define FillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
|
||||
#define EqualMemory(Destination,Source,Length) (!memcmp((Destination),(Source),(Length)))
|
||||
#define CopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
|
||||
|
||||
template <typename T>
|
||||
void ZeroMemory(T * dest, const size_t size)
|
||||
{
|
||||
// never zero a C++ complex type requiring a constructor call.
|
||||
static_assert(std::is_pod<T>::value || std::is_void<T>::value, "POD required for ZeroMemory()");
|
||||
memset(dest, 0, size);
|
||||
}
|
||||
|
||||
LPVOID VirtualAlloc(LPVOID lpAddress, size_t dwSize,
|
||||
DWORD flAllocationType, DWORD flProtect);
|
||||
|
||||
BOOL VirtualFree(LPVOID lpAddress, size_t dwSize, DWORD dwFreeType);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
add_executable(testcpu6502
|
||||
stdafx.cpp
|
||||
../../source/SynchronousEventManager.cpp
|
||||
../../source/linux/windows/memory.cpp
|
||||
dummy.cpp
|
||||
TestCPU6502.cpp)
|
||||
|
|
|
@ -26,6 +26,7 @@ typedef UINT64 uint64_t;
|
|||
|
||||
#else
|
||||
|
||||
#include <cstring>
|
||||
#include <linux/win.h>
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue