1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Starts towards implementing some OPL test cases.

This commit is contained in:
Thomas Harte 2020-04-14 23:51:45 -04:00
parent d8380dc3e2
commit b13b0d9311
3 changed files with 31 additions and 4 deletions

View File

@ -334,9 +334,10 @@ struct OPLL: public OPLBase<OPLL> {
int level = 0;
};
void update_all_chanels() {
for(int c = 0; c < 6; ++ c) { // Don't do anything with channels that might be percussion for now.
channels_[c].level = (channels_[c].update() * total_volume_) >> 14;
}
// for(int c = 0; c < 6; ++ c) { // Don't do anything with channels that might be percussion for now.
// channels_[c].level = (channels_[c].update() * total_volume_) >> 14;
// }
channels_[0].level = (channels_[0].update() * total_volume_) >> 14;
}
Channel channels_[9];

View File

@ -23,7 +23,7 @@ static CPU::MOS6502::Register registerForRegister(CSTestMachine6502Register reg)
case CSTestMachine6502RegisterA: return CPU::MOS6502::Register::A;
case CSTestMachine6502RegisterX: return CPU::MOS6502::Register::X;
case CSTestMachine6502RegisterY: return CPU::MOS6502::Register::Y;
case CSTestMachine6502RegisterStackPointer: return CPU::MOS6502::Register::S;
case CSTestMachine6502RegisterStackPointer: return CPU::MOS6502::Register::StackPointer;
}
}

View File

@ -0,0 +1,26 @@
//
// OPLTests.m
// Clock SignalTests
//
// Created by Thomas Harte on 14/04/2020.
// Copyright © 2020 Thomas Harte. All rights reserved.
//
#import <XCTest/XCTest.h>
#include "OPL2.hpp"
@interface OPLTests: XCTestCase
@end
@implementation OPLTests {
}
- (void)testADSR {
Yamaha::OPL::Operator test_operator;
Yamaha::OPL::OperatorState test_state;
}
@end