diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 6477929..3065594 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index 504a40c..2d5c6cb 100644 --- a/main.cpp +++ b/main.cpp @@ -1,31 +1,41 @@ #include "pixelGameEngine.h" -#include "Polygon.h" using namespace olc; -#define WIDTH 640 -#define HEIGHT 480 +bool USE_DEBUG_DISPLAY=false; +int EMULATOR_SCREEN_WIDTH = 64; +int EMULATOR_SCREEN_HEIGHT = 32; +int EMULATOR_PIXEL_SIZE=5; -class Example : public olc::PixelGameEngine +class SNESEmulator : public olc::PixelGameEngine { - - public: - Example() + //SplashScreen s; + SNESEmulator() { - sAppName = "Example"; + sAppName = "SNES Emulator"; } public: + std::arraymemory={}; //128KB RAM + std::arraycartridge={}; //32 Mb cartidge (seems to be the max) + bool OnUserCreate() override { - Polygon poly{{30,30},{20,20},{-7,6}}; + std::ifstream file("/home/niconiconii/Documents/Earthbound (USA).smc",std::ios_base::binary); + uint32_t counter=0x0; + while (file.good()){ + uint8_t val = file.get(); + if (val!=-1){ + memory[counter++]=val; + std::cout<