cleanup apu and spc

This commit is contained in:
scawful
2024-04-25 00:23:14 -04:00
parent 268a7f2a0e
commit b4f2fdc57e
4 changed files with 0 additions and 13 deletions

View File

@@ -29,8 +29,6 @@ static const uint8_t bootRom[0x40] = {
0xdd, 0x5d, 0xd0, 0xdb, 0x1f, 0x00, 0x00, 0xc0, 0xff}; 0xdd, 0x5d, 0xd0, 0xdb, 0x1f, 0x00, 0x00, 0xc0, 0xff};
void Apu::Init() { void Apu::Init() {
// Set the clock frequency
clock_.SetFrequency(kApuClockSpeed);
ram.resize(0x10000); ram.resize(0x10000);
for (int i = 0; i < 0x10000; i++) { for (int i = 0; i < 0x10000; i++) {
ram[i] = 0; ram[i] = 0;

View File

@@ -17,10 +17,6 @@ namespace audio {
using namespace memory; using namespace memory;
const int kApuClockSpeed = 1024000; // 1.024 MHz
const int apuSampleRate = 32000; // 32 KHz
const int apuClocksPerSample = 64; // 64 clocks per sample
typedef struct Timer { typedef struct Timer {
uint8_t cycles; uint8_t cycles;
uint8_t divider; uint8_t divider;

View File

@@ -85,12 +85,6 @@ uint8_t Spc700::dp() {
return ReadOpcode() | (PSW.P << 8); return ReadOpcode() | (PSW.P << 8);
} }
uint8_t Spc700::get_dp_addr() {
PC++;
uint8_t offset = read(PC);
return (PSW.P << 8) + offset;
}
// Direct page indexed by X // Direct page indexed by X
uint8_t Spc700::dp_plus_x() { uint8_t Spc700::dp_plus_x() {
PC++; PC++;

View File

@@ -854,7 +854,6 @@ void Spc700::ExecuteInstructions(uint8_t opcode) {
A = (A >> 4) | (A << 4); A = (A >> 4) | (A << 4);
PSW.Z = (A == 0); PSW.Z = (A == 0);
PSW.N = (A & 0x80); PSW.N = (A & 0x80);
;
break; break;
} }
case 0xa0: { // ei imp case 0xa0: { // ei imp