mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
lay base for AR cheatzorz. baahahhhh
This commit is contained in:
parent
2944575cbc
commit
106b9a6f24
@ -100,6 +100,8 @@
|
|||||||
<Unit filename="melon.rc">
|
<Unit filename="melon.rc">
|
||||||
<Option compilerVar="WINDRES" />
|
<Option compilerVar="WINDRES" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
<Unit filename="src/AREngine.cpp" />
|
||||||
|
<Unit filename="src/AREngine.h" />
|
||||||
<Unit filename="src/ARM.cpp" />
|
<Unit filename="src/ARM.cpp" />
|
||||||
<Unit filename="src/ARM.h" />
|
<Unit filename="src/ARM.h" />
|
||||||
<Unit filename="src/ARMInterpreter.cpp" />
|
<Unit filename="src/ARMInterpreter.cpp" />
|
||||||
@ -279,6 +281,10 @@
|
|||||||
<Unit filename="src/types.h" />
|
<Unit filename="src/types.h" />
|
||||||
<Unit filename="src/version.h" />
|
<Unit filename="src/version.h" />
|
||||||
<Unit filename="xp.manifest" />
|
<Unit filename="xp.manifest" />
|
||||||
<Extensions />
|
<Extensions>
|
||||||
|
<code_completion />
|
||||||
|
<envvars />
|
||||||
|
<debugger />
|
||||||
|
</Extensions>
|
||||||
</Project>
|
</Project>
|
||||||
</CodeBlocks_project_file>
|
</CodeBlocks_project_file>
|
||||||
|
55
src/AREngine.cpp
Normal file
55
src/AREngine.cpp
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016-2019 Arisotura
|
||||||
|
|
||||||
|
This file is part of melonDS.
|
||||||
|
|
||||||
|
melonDS is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "NDS.h"
|
||||||
|
#include "AREngine.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace AREngine
|
||||||
|
{
|
||||||
|
|
||||||
|
// TODO: more sensible size for this? allocate on demand?
|
||||||
|
u32 CheatCodes[2 * 1024];
|
||||||
|
|
||||||
|
|
||||||
|
bool Init()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeInit()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset()
|
||||||
|
{
|
||||||
|
memset(CheatCodes, 0, sizeof(u32)*2*1024);
|
||||||
|
|
||||||
|
// TODO: acquire codes from a sensible source!
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RunCheats()
|
||||||
|
{
|
||||||
|
// bahahah
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
src/AREngine.h
Normal file
33
src/AREngine.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016-2019 Arisotura
|
||||||
|
|
||||||
|
This file is part of melonDS.
|
||||||
|
|
||||||
|
melonDS is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARENGINE_H
|
||||||
|
#define ARENGINE_H
|
||||||
|
|
||||||
|
namespace AREngine
|
||||||
|
{
|
||||||
|
|
||||||
|
bool Init();
|
||||||
|
void DeInit();
|
||||||
|
void Reset();
|
||||||
|
|
||||||
|
void RunCheats();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ARENGINE_H
|
@ -1,6 +1,7 @@
|
|||||||
project(core)
|
project(core)
|
||||||
|
|
||||||
add_library(core STATIC
|
add_library(core STATIC
|
||||||
|
AREngine.cpp
|
||||||
ARM.cpp
|
ARM.cpp
|
||||||
ARMInterpreter.cpp
|
ARMInterpreter.cpp
|
||||||
ARMInterpreter_ALU.cpp
|
ARMInterpreter_ALU.cpp
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "NDS.h"
|
#include "NDS.h"
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
u64 vbltime;
|
#include "AREngine.h"
|
||||||
|
|
||||||
namespace GPU
|
namespace GPU
|
||||||
{
|
{
|
||||||
@ -986,6 +986,9 @@ void StartScanline(u32 line)
|
|||||||
GPU2D_A->VBlank();
|
GPU2D_A->VBlank();
|
||||||
GPU2D_B->VBlank();
|
GPU2D_B->VBlank();
|
||||||
GPU3D::VBlank();
|
GPU3D::VBlank();
|
||||||
|
|
||||||
|
// TODO: verify when AR cheats actually run!
|
||||||
|
AREngine::RunCheats();
|
||||||
}
|
}
|
||||||
else if (VCount == 144)
|
else if (VCount == 144)
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
#include "RTC.h"
|
#include "RTC.h"
|
||||||
#include "Wifi.h"
|
#include "Wifi.h"
|
||||||
|
#include "AREngine.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
|
|
||||||
|
|
||||||
@ -177,6 +178,8 @@ bool Init()
|
|||||||
if (!RTC::Init()) return false;
|
if (!RTC::Init()) return false;
|
||||||
if (!Wifi::Init()) return false;
|
if (!Wifi::Init()) return false;
|
||||||
|
|
||||||
|
if (!AREngine::Init()) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,6 +201,8 @@ void DeInit()
|
|||||||
SPI::DeInit();
|
SPI::DeInit();
|
||||||
RTC::DeInit();
|
RTC::DeInit();
|
||||||
Wifi::DeInit();
|
Wifi::DeInit();
|
||||||
|
|
||||||
|
AREngine::DeInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -500,6 +505,8 @@ void Reset()
|
|||||||
SPI::Reset();
|
SPI::Reset();
|
||||||
RTC::Reset();
|
RTC::Reset();
|
||||||
Wifi::Reset();
|
Wifi::Reset();
|
||||||
|
|
||||||
|
AREngine::Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop()
|
void Stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user