diff --git a/src/engine/platform/c140.cpp b/src/engine/platform/c140.cpp index 58ef1570b..f68531576 100644 --- a/src/engine/platform/c140.cpp +++ b/src/engine/platform/c140.cpp @@ -639,10 +639,26 @@ void DivPlatformC140::set219(bool is_219) { totalChans=is219?16:24; } +int DivPlatformC140::getClockRangeMin() { + if (is219) return 1000000; + return MIN_CUSTOM_CLOCK; +} + +int DivPlatformC140::getClockRangeMax() { + if (is219) return 100000000; + return MAX_CUSTOM_CLOCK; +} + void DivPlatformC140::setFlags(const DivConfig& flags) { - chipClock=32000*256; // 8.192MHz and 12.288MHz input, verified from Assault Schematics - CHECK_CUSTOM_CLOCK; - rate=chipClock/192; + if (is219) { + chipClock=50113000; // 50.113MHz clock input in Namco NA-1/NA-2 PCB + CHECK_CUSTOM_CLOCK; + rate=chipClock/1136; // assumed as ~44100hz + } else { + chipClock=32000*256; // 8.192MHz and 12.288MHz input, verified from Assault Schematics + CHECK_CUSTOM_CLOCK; + rate=chipClock/192; + } for (int i=0; irate=rate; } diff --git a/src/engine/platform/c140.h b/src/engine/platform/c140.h index 0706a6fbc..fb74151c0 100644 --- a/src/engine/platform/c140.h +++ b/src/engine/platform/c140.h @@ -106,6 +106,8 @@ class DivPlatformC140: public DivDispatch { size_t getSampleMemUsage(int index = 0); bool isSampleLoaded(int index, int sample); void renderSamples(int chipID); + int getClockRangeMin(); + int getClockRangeMax(); void set219(bool is_219); void setFlags(const DivConfig& flags); int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags); diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index 1609ca7b0..b048ca6a0 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -2099,6 +2099,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo case DIV_SYSTEM_PV1000: case DIV_SYSTEM_VERA: case DIV_SYSTEM_C140: + case DIV_SYSTEM_C219: break; case DIV_SYSTEM_YMU759: supportsCustomRate=false;