mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-24 23:24:54 +00:00
Creating a base window
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user