Split project into multiple files

This commit is contained in:
2025-07-21 20:43:53 -04:00
parent 817827b4ad
commit ffef7101fa
11 changed files with 430 additions and 343 deletions

29
src/apu.cpp Normal file
View File

@@ -0,0 +1,29 @@
//
// Created by Palindromic Bread Loaf on 7/21/25.
//
#include "apu.h"
#include <algorithm>
// APU Implementation
void APU::Reset() {
A = X = Y = 0;
SP = 0xFF;
PC = 0x0000;
PSW = 0x02;
std::fill(spc_ram, spc_ram + sizeof(spc_ram), 0);
}
void APU::Step() {
// TODO: Implement SPC700 instruction execution
}
uint8_t APU::ReadSPC(uint16_t address) {
return spc_ram[address];
}
void APU::WriteSPC(uint16_t address, uint8_t value) {
spc_ram[address] = value;
}