nesemu/main.c

49 lines
998 B
C

/*
* =====================================================================================
*
* 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 <stdlib.h>
#include "log.h"
#include "debugger/debugger.h"
#include "include/rom.h"
#include "include/system.h"
int main() {
System system;
log_set_level(LOG_INFO);
system_init(&system);
char *rom_path = "../test_roms/smb.nes";
if (!rom_load(rom_path, &system)) {
system_uninit(&system);
return EXIT_FAILURE;
}
system_start(&system);
start_debugger(&system);
// system_loop(&system);
system_uninit(&system);
return EXIT_SUCCESS;
// system_uninit(&system);
// return win();
}