diff --git a/include/audio/sidfx.c b/include/audio/sidfx.c index e2e5a5e..a1be2c8 100644 --- a/include/audio/sidfx.c +++ b/include/audio/sidfx.c @@ -29,6 +29,11 @@ void sidfx_init(void) } } +bool sidfx_idle(byte chn) +{ + return channels[chn].state == SIDFX_IDLE; +} + void sidfx_play(byte chn, const SIDFX * fx, byte cnt) { SIDFXState ns = channels[chn].state; diff --git a/include/audio/sidfx.h b/include/audio/sidfx.h index 729afe6..97dbcb9 100644 --- a/include/audio/sidfx.h +++ b/include/audio/sidfx.h @@ -14,6 +14,8 @@ struct SIDFX void sidfx_init(void); +inline bool sidfx_idle(byte chn); + inline void sidfx_play(byte chn, const SIDFX * fx, byte cnt); void sidfx_stop(byte chn); diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 524e9ce..1b821e6 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -48519,7 +48519,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc) mInterProc = proc; mInterProc->mLinkerObject->mNativeProc = this; - CheckFunc = !strcmp(mInterProc->mIdent->mString, "flossiec_read_lzo"); + CheckFunc = !strcmp(mInterProc->mIdent->mString, "main"); int nblocks = proc->mBlocks.Size(); tblocks = new NativeCodeBasicBlock * [nblocks]; @@ -49773,6 +49773,13 @@ void NativeCodeProcedure::Optimize(void) changed = true; #endif + if (step == 2 && !changed) + { + ResetVisited(); + if (mEntryBlock->CombineSameXY()) + changed = true; + } + #if 1 if (step >= 5) {