small fixes

This commit is contained in:
2024-02-05 19:53:38 -08:00
parent 05f3df8be3
commit dcb30dbba7
6 changed files with 118 additions and 127 deletions

View File

@@ -47,11 +47,6 @@ void GameBoy::addCycles(uint8_t ticks)
lastOpTicks = ticks;
}
void test()
{
printf("");
}
void GameBoy::start(std::string bootrom, std::string game)
{
addressSpace.loadBootrom(bootrom);
@@ -61,28 +56,22 @@ void GameBoy::start(std::string bootrom, std::string game)
while(!quit)
{
// Event loop: Check and handle SDL events
// if(SDL_PollEvent(&event))
// {
// if(event.type == SDL_QUIT)
// {
// quit = true; // Set the quit flag when the close button is hit
// }
// }
// if(SDL_PollEvent(&event))
// {
// if(event.type == SDL_QUIT)
// {
// quit = true; // Set the quit flag when the close button is hit
// }
// }
opcodeHandler();
interruptHandler();
//timing();
ppuUpdate();
if(PC == 0x8c && DE.hi == 0)
test();
if(PC > 0xFF && addressSpace.getBootromState())
{
addressSpace.unmapBootrom();
}
if(PC > 0x2FF)
{
test();
}
int cyclesSince = cyclesSinceLastRefresh();
if(cyclesSince > FRAME_DURATION)
{