Death the Kid
New member
well am looking for some help with using directx for my emulator, since so far i only have figured out how to intialize a window lol (sorry about not being more specific) any kind of help would be greatly appreciated.
bool Emu::Load()
{
CPUReset();
ClearScreen();
FILE* in;
in = fopen("C:/"Pong", "rb") ;
if (0 == in)
{
return false;
}
fread(&m_GameMemory[0x200], ROMSIZE, 1, in) ;
fclose(in);
return true;
}
uhhh am having a problem with my emualtor, i pretty much coded the entire thing but, there is no screen output, am pretty sure this is because the ROM isnt being loaded in properly. I have used a break point to find the problem
Code:bool Emu::Load() { CPUReset(); ClearScreen(); FILE* in; in = fopen("C:/"Pong", "rb") ; if (0 == in) { return false; } fread(&m_GameMemory[0x200], ROMSIZE, 1, in) ; fclose(in); return true; }
the in pointer has this
error CXX0030: Error: expression cannot be evaluated
in = fopen("Pong.ch8", "rb");
in = fopen("Pong", "rb");
typedef unsigned char BYTE;
const int ROMSIZE = 0xFFF;
BYTE m_GameMemory[ROMSIZE];
Are you sure you coded pretty much all of this, because this is a pretty obvious error, and the inconsistent indentation is a little telling...