⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctrs.asm

📁 完整的方案
💻 ASM
📖 第 1 页 / 共 2 页
字号:
//Old version nodefine
//SelectRelevantSoundBit:       .EQU Bit0
//SelectRelevantRetSoundBit:    .EQU Bit1
//SelectRelevantNoRetSoundBit:  .EQU Bit2
//SelectNoRetSoundBit:          .EQU BitF

//SelectValidSoundBit:          .EQU Bit0
//SelectValidRetSoundBit:       .EQU Bit1
//SelectValidNoRetSoundBit:     .EQU Bit2
//SelectInvalidRetSoundBit:     .EQU Bit4
//SelectInvalidNoRetSoundBit:   .EQU Bit5

//LinkModeSoundBit:             .EQU Bit0
//LinkNoModeSoundBit:           .EQU Bit1
//LinkCorrectSoundBit:          .EQU Bit2
//LinkErrRetSoundBit:           .EQU Bit5
//LinkErrNoRetSoundBit:         .EQU Bit7
//LinkRetSoundBit:              .EQU Bit8
//LinkNoRetSoundBit:            .EQU Bit9

SelectRelevantSoundBit:         .EQU Bit0
SelectRelevantRetSoundBit:      .EQU Bit1
SelectRelevantNoRetSoundBit:    .EQU Bit2
SelectIrrelevantSoundBit:       .EQU Bit3
SelectIrrelevantRetSoundBit:    .EQU Bit4
SelectIrrelevantNoRetSoundBit:  .EQU Bit5
SelectCorrectSoundBit:          .EQU Bit6
SelectCorrectRetSoundBit:       .EQU Bit7
SelectCorrectNoRetSoundBit:     .EQU Bit8
SelectErrSoundBit:              .EQU Bit9
SelectErrRetSoundBit:           .EQU BitA
SelectErrNoRetSoundBit:         .EQU BitB
SelectModeSoundBit:             .EQU BitC
SelectNoModeSoundBit:           .EQU BitD
SelectRetSoundBit:              .EQU BitE
SelectNoRetSoundBit:            .EQU BitF

SelectValidSoundBit:            .EQU Bit0
SelectValidRetSoundBit:         .EQU Bit1
SelectValidNoRetSoundBit:       .EQU Bit2
SelectInvalidSoundBit:          .EQU Bit3
SelectInvalidRetSoundBit:       .EQU Bit4
SelectInvalidNoRetSoundBit:     .EQU Bit5

LinkModeSoundBit:               .EQU Bit0
LinkNoModeSoundBit:             .EQU Bit1
LinkCorrectSoundBit:            .EQU Bit2
LinkErrSoundBit:                .EQU Bit3
LinkCorrectRetSoundBit:         .EQU Bit4
LinkErrRetSoundBit:             .EQU Bit5
LinkCorrectNoRetSoundBit:       .EQU Bit6
LinkErrNoRetSoundBit:           .EQU Bit7
LinkRetSoundBit:                .EQU Bit8
LinkNoRetSoundBit:              .EQU Bit9

CAEHadCauseSoundBit:            .EQU Bit0
CAENoCauseSoundBit:             .EQU Bit1
CAEHadEffectSoundBit:           .EQU Bit2
CAENoEffectSoundBit:            .EQU Bit3
CAEHadCauseHadEffectSoundBit:   .EQU Bit4
CAENoCauseHadEffectSoundBit:    .EQU Bit5
CAEHadCauseNoEffectSoundBit:    .EQU Bit6
CAENoCauseNoEffectSoundBit:     .EQU Bit7

ConditionModeSoundBit:          .EQU Bit0
ConditionNoModeSoundBit:        .EQU Bit1
Condition1HadSoundBit:          .EQU Bit2
Condition1NoSoundBit:           .EQU Bit3
Condition2HadSoundBit:          .EQU Bit4
Condition2NoSoundBit:           .EQU Bit5
Condition3HadSoundBit:          .EQU Bit6
Condition3NoSoundBit:           .EQU Bit7

ReplayModeSoundBit:             .EQU Bit0
ReplayNoModeSoundBit:           .EQU Bit1

ScoreModeSoundBit:              .EQU Bit0
ScoreNoModeSoundBit:            .EQU Bit1
ScoreAddSoundBit:               .EQU Bit2
ScoreSubSoundBit:               .EQU Bit3
ScoreAddRetSoundBit:            .EQU Bit4
ScoreSubRetSoundBit:            .EQU Bit5
ScoreAddNoRetSoundBit:          .EQU Bit6
ScoreSubNoRetSoundBit:          .EQU Bit7
ScoreRetSoundBit:               .EQU Bit8
ScoreNoRetSoundBit:             .EQU Bit9
ScoreTwiceSoundBit:             .EQU BitA

//                           .EQU  0x00   //       无条件
SelectRelevantEngine:        .EQU  0x01   // Bit0  选择相关
SelectRelevantRetEngine:     .EQU  0x02   // Bit1  选择相关返回
SelectRelevantNoRetEngine:   .EQU  0x03   // Bit2  选择相关不返回
SelectIrrelevantEngine:      .EQU  0x04   // Bit3  选择不相关
SelectIrrelevantRetEngine:   .EQU  0x05   // Bit4  选择不相关返回
SelectIrrelevantNoRetEngine: .EQU  0x06   // Bit5  选择不相关不返回
SelectCorrectEngine:         .EQU  0x07   // Bit6  选择正确
SelectCorrectRetEngine:      .EQU  0x08   // Bit7  选择正确返回
SelectCorrectNoRetEngine:    .EQU  0x09   // Bit8  选择正确不返回
SelectErrEngine:             .EQU  0x0a   // Bit9  选择错误
SelectErrRetEngine:          .EQU  0x0b   // BitA  选择错误返回
SelectErrNoRetEngine:        .EQU  0x0c   // BitB  选择错误不返回
SelectModeEngine:            .EQU  0x0d   // BitC  选择存在
SelectNoModeEngine:          .EQU  0x0e   // BitD  选择不存在
SelectRetEngine:             .EQU  0x0f   // BitE  选择返回
SelectNoRetEngine:           .EQU  0x10   // BitF  选择不返回

SelectValidEngine:           .EQU  0x11   // Bit0  选择有效
SelectValidRetEngine:        .EQU  0x12   // Bit1  选择有效返回
SelectValidNoRetEngine:      .EQU  0x13   // Bit2  选择有效不返回
SelectInvalidEngine:         .EQU  0x14   // Bit3  选择无效
SelectInvalidRetEngine:      .EQU  0x15   // Bit4  选择无效返回
SelectInvalidNoRetEngine:    .EQU  0x16   // Bit5  选择无效不返回

LinkModeEngine:              .EQU  0x17   // Bit0  连接存在
LinkNoModeEngine:            .EQU  0x18   // Bit1  连接不存在
LinkCorrectEngine:           .EQU  0x19   // Bit2  当连接正确
LinkErrEngine:               .EQU  0x1a   // Bit3  当连接错误
LinkCorrectRetEngine:        .EQU  0x1b   // Bit4  当连接正确且返回
LinkErrRetEngine:            .EQU  0x1c   // Bit5  当连接错误且返回
LinkCorrectNoRetEngine:      .EQU  0x1d   // Bit6  当连接正确且不返回
LinkErrNoRetEngine:          .EQU  0x1e   // Bit7  当连接错误且不返回
LinkRetEngine:               .EQU  0x1f   // Bit8  当连接返回
LinkNoRetEngine:             .EQU  0x20   // Bit9  当连接不返回

CAEHadCauseEngine:           .EQU  0x21   // Bit0  因果模式有原因
CAENoCauseEngine:            .EQU  0x22   // Bit1  因果模式无原因
CAEHadEffectEngine:          .EQU  0x23   // Bit2  因果模式有结果
CAENoEffectEngine:           .EQU  0x24   // Bit3  因果模式无结果
CAEHadCauseHadEffectEngine:  .EQU  0x25   // Bit4  因果模式有原因有结果
CAENoCauseHadEffectEngine:   .EQU  0x26   // Bit5  因果模式无原因有结果
CAEHadCauseNoEffectEngine:   .EQU  0x27   // Bit6  因果模式有原因无结果
CAENoCauseNoEffectEngine:    .EQU  0x28   // Bit7  因果模式无原因无结果

ConditionModeEngine:         .EQU  0x29   // Bit0  条件题存在
ConditionNoModeEngine:       .EQU  0x2a   // Bit1  条件题不存在
Condition1HadEngine:         .EQU  0x2b   // Bit2  条件1存在
Condition1NoEngine:          .EQU  0x2c   // Bit3  条件1不存在
Condition2HadEngine:         .EQU  0x2d   // Bit4  条件2存在
Condition2NoEngine:          .EQU  0x2e   // Bit5  条件2不存在
Condition3HadEngine:         .EQU  0x2f   // Bit6  条件3存在
Condition3NoEngine:          .EQU  0x30   // Bit7  条件3不存在

ReplayModeEngine:            .EQU  0x31   // Bit0  复读存在
ReplayNoModeEngine:          .EQU  0x32   // Bit1  复读不存在

ScoreModeEngine:             .EQU  0x33   // Bit0  计分存在
ScoreNoModeEngine:           .EQU  0x34   // Bit1  计分不存在
ScoreAddEngine:              .EQU  0x35   // Bit2  计分模式加分
ScoreSubEngine:              .EQU  0x36   // Bit3  计分模式减分
ScoreAddRetEngine:           .EQU  0x37   // Bit4  计分模式加分且返回
ScoreSubRetEngine:           .EQU  0x38   // Bit5  计分模式减分且返回
ScoreAddNoRetEngine:         .EQU  0x39   // Bit6  计分模式加分不返回
ScoreSubNoRetEngine:         .EQU  0x3a   // Bit7  计分模式减分不返回
ScoreRetEngine:              .EQU  0x3b   // Bit8  计分模式返回
ScoreNoRetEngine:            .EQU  0x3c   // Bit9  计分模式不返回
ScoreTwiceEngine:            .EQU  0x3d   // BitA  计分模式同一记分点

SoundWhenSelectionOk:
         R1=SelectCorrectEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionOkRet:
         R1=SelectCorrectRetEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionOkGoOn:
         R1=SelectCorrectNoRetEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionError:
         R1=SelectErrEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionErrorRet:
         R1=SelectErrRetEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionErrorGoOn:
         R1=SelectErrNoRetEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionIrrelevant:
         R1=SelectIrrelevantEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionIrrelRet:
         R1=SelectIrrelevantRetEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionIrrelGoOn:
         R1=SelectIrrelevantNoRetEngine
         JMP SoundEnableOldStruct
SoundWhenNoSelection:
         R1=SelectNoModeEngine
         JMP SoundEnableOldStruct
SoundWhenSelection:
         R1=SelectModeEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionRet:
         R1=SelectRetEngine
         JMP SoundEnableOldStruct
SoundWhenSelectionInvalid:
         R1=SelectInvalidEngine
         JMP SoundEnableOldStruct

SoundWhenLinkCorrectRet:
         R1=LinkCorrectRetEngine
         JMP SoundEnableOldStruct
SoundWhenLinkCorrectNoRet:
         R1=LinkCorrectNoRetEngine
          JMP SoundEnableOldStruct
SoundWhenLinkErr:
         R1=LinkErrEngine

SoundEnableOldStruct:
         CALL ConditionDetect
         CMP R1, 0
         JNE FSStructSoundEn
         JMP FSStructSoundDi
         
SoundWholeStruct:
         R1=[_SysFlagA]
         R1|=WholeSoundBit
         [_SysFlagA]=R1
         JMP FSStructSoundEn
SoundDisableStruct:
         R1=[FileSeriousH]
         CALL ConditionDetect
         CMP R1, 0
         JE FSStructSoundEn
FSStructSoundDi:
         R1=0
         [_FileOk]=R1
FSStructSoundEn:
         PC=GetPlayIndex0

FSSoundStructTab:
         .DW   SoundDisableStruct              // 0x00
         .DW   SoundWhenSelectionOkRet         // 0x01
         .DW   SoundWhenSelectionError         // 0x02
         .DW   SoundWhenSelectionIrrelevant    // 0x03
         .DW   SoundWhenSelectionOkGoOn        // 0x04
         .DW   SoundWhenLinkCorrectRet         // 0x05
         .DW   SoundWhenLinkErr                // 0x06
         .DW   SoundWhenLinkCorrectNoRet       // 0x07
         .DW   SoundWhenNoSelection            // 0x08
         .DW   SoundWhenSelection              // 0x09
         .DW   SoundWholeStruct                // 0x0a
         .DW   SoundWhenSelectionOk            // 0x0b
         .DW   SoundWhenSelectionErrorGoOn     // 0x0c
         .DW   SoundWhenSelectionErrorRet      // 0x0d
         .DW   SoundWhenSelectionIrrelGoOn     // 0x0e
         .DW   SoundWhenSelectionIrrelRet      // 0x0f
         .DW   SoundWhenSelectionRet           // 0x10
         .DW   SoundWhenSelectionInvalid       // 0x11

ConditionDetect:
         CMP R1, ScoreTwiceEngine
         JNA ConditionDetect1
ConditionDetectNo:
         R1=0
         RETF
ConditionDetect1:
         CMP R1, ScoreModeEngine
         JB ConditionDetect2
         R1-=ScoreModeEngine
         R1+=BitTab
         R3=[R1]
         CALL ConditionScore
         R1&=R3
         RETF

ConditionDetect2:
         CMP R1, ReplayModeEngine
         JB ConditionDetect3
         JZ ConditionDetect2In
ConditionDetect2No:
         R2=[_RecordFlag]
         TEST R2, InRecModeBit
         JE ConditionDetectOk
         JMP ConditionDetectNo
ConditionDetect2In:
         R2=[_RecordFlag]
         TEST R2, InRecModeBit
         JNE ConditionDetectOk
         JMP ConditionDetectNo

ConditionDetect3:
         CMP R1, ConditionModeEngine
         JB ConditionDetect4
         R1-=ConditionModeEngine
         R1+=BitTab
         R3=[R1]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -