/* * ===================================================================================== * * Filename: main.c * * Description: Emulator main loop * * Version: 1.0 * Created: 2023-09-21 09:50:34 PM * Revision: none * Compiler: gcc * * Author: William Nolin, * Organization: * * ===================================================================================== */ #include #include #include "debugger/debugger.h" #include "include/rom.h" #include "include/system.h" //int win() { // printf("NCURSES\n"); // // setlocale(LC_ALL, ""); // setenv("TERM", "xterm-256color", 1); // setenv("TERMINFO", "/usr/share/terminfo", 1); // // initscr(); // printw("Hello World !!!"); // refresh(); // getch(); // endwin(); // // return EXIT_SUCCESS; //} int main() { System system; log_set_level(LOG_INFO); system_init(&system); char *rom_path = "../test_roms/nestest.nes"; if (!rom_load(rom_path, &system)) { system_uninit(&system); return EXIT_FAILURE; } start_debugger(&system); system_uninit(&system); return 0; // // system_start(&system); // system_loop(&system); // system_uninit(&system); // return EXIT_SUCCESS; // return win(); }