chip flags rewrite, part 4 - DO NOT USE

the next part is to drop systemFlagsOld completely
and then to fix the GUI
This commit is contained in:
tildearrow 2022-09-29 20:13:40 -05:00
parent ee6e0aa0e0
commit 48db9a1d0c
109 changed files with 532 additions and 377 deletions

View file

@ -1646,7 +1646,7 @@ void DivPlatformOPL::setOPLType(int type, bool drums) {
properDrumsSys=drums;
}
void DivPlatformOPL::setFlags(unsigned int flags) {
void DivPlatformOPL::setFlags(const DivConfig& flags) {
/*
if (flags==3) {
chipClock=COLOR_NTSC*12.0/7.0;
@ -1674,7 +1674,7 @@ void DivPlatformOPL::setFlags(unsigned int flags) {
switch (chipType) {
default:
case 1: case 2: case 8950:
switch (flags&0xff) {
switch (flags.getInt("clockSel",0)) {
case 0x01:
chipClock=COLOR_PAL*4.0/5.0;
break;
@ -1698,7 +1698,7 @@ void DivPlatformOPL::setFlags(unsigned int flags) {
chipRateBase=rate;
break;
case 3:
switch (flags&0xff) {
switch (flags.getInt("clockSel",0)) {
case 0x01:
chipClock=COLOR_PAL*16.0/5.0;
break;
@ -1719,7 +1719,7 @@ void DivPlatformOPL::setFlags(unsigned int flags) {
chipRateBase=rate;
break;
case 4:
switch (flags&0xff) {
switch (flags.getInt("clockSel",0)) {
case 0x01:
chipClock=COLOR_PAL*32.0/5.0;
break;
@ -1785,7 +1785,7 @@ void DivPlatformOPL::renderSamples() {
adpcmBMemLen=memPos+256;
}
int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
parent=p;
dumpWrites=false;
skipRegisterWrites=false;