diff --git a/include/audio/sidfx.c b/include/audio/sidfx.c index 0b63078..db3a216 100644 --- a/include/audio/sidfx.c +++ b/include/audio/sidfx.c @@ -158,7 +158,10 @@ inline void sidfx_loop_ch(byte ch) channels[ch].cnt--; channels[ch].com = com; channels[ch].priority = com->priority; - channels[ch].state = SIDFX_RESET_0; + if (com->time0) + channels[ch].state = SIDFX_RESET_0; + else + channels[ch].state = SIDFX_READY; } else { diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 1c039b7..53e34bb 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -18684,6 +18684,7 @@ bool NativeCodeBasicBlock::SimplifyDiamond(NativeCodeProcedure* proc) mFalseJump->mEntryRequiredRegs += mIns[sz].mAddress; mFalseJump->mExitRequiredRegs += mIns[sz].mAddress; } + mIns[sz].mLive |= LIVE_MEM; mTrueJump->mTrueJump->mIns.Insert(0, NativeCodeInstruction(mIns[sz].mIns, ASMIT_LDY, mIns[sz])); changed = true; @@ -18709,6 +18710,8 @@ bool NativeCodeBasicBlock::SimplifyDiamond(NativeCodeProcedure* proc) mFalseJump->mEntryRequiredRegs += mIns[sz].mAddress; mFalseJump->mExitRequiredRegs += mIns[sz].mAddress; } + mIns[sz].mLive |= LIVE_MEM; + mTrueJump->mTrueJump->mIns.Insert(0, NativeCodeInstruction(mIns[sz].mIns, ASMIT_LDX, mIns[sz])); changed = true; } @@ -51489,7 +51492,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc) mInterProc = proc; mInterProc->mLinkerObject->mNativeProc = this; - CheckFunc = !strcmp(mInterProc->mIdent->mString, "fighter_status"); + CheckFunc = !strcmp(mInterProc->mIdent->mString, "fighter_input"); int nblocks = proc->mBlocks.Size(); tblocks = new NativeCodeBasicBlock * [nblocks]; @@ -52923,6 +52926,8 @@ void NativeCodeProcedure::Optimize(void) if (mEntryBlock->JoinXYCascade()) changed = true; } + + #if 1 if (step == 9 && cnt < 10) { @@ -53051,7 +53056,6 @@ void NativeCodeProcedure::Optimize(void) changed = true; } - if (step == 8) { ResetVisited();