Creating a base window

This commit is contained in:
AnonymusRaccoon
2020-02-14 17:55:53 +01:00
parent c8e6c0d4f9
commit 4f150441a3
8 changed files with 86 additions and 6 deletions
+2 -1
View File
@@ -11,13 +11,14 @@ using namespace ComSquare;
int main(int argc, char **argv)
{
if (argc != 2) {
if (argc < 2) {
std::cout << "ComSquare:" << std::endl << "\tUsage: " << argv[0] << " rom_path" << std::endl;
return 1;
}
try {
Renderer::SFRenderer renderer(600, 800, 60);
SNES snes(std::make_shared<Memory::MemoryBus>(), argv[1], renderer);
snes.enableCPUDebugging();
while (!renderer.shouldExit) {
unsigned cycleCount = snes.cpu->update();
snes.ppu->update(cycleCount);