www.pudn.com > bak22.rar > XYD.ASM, change:2006-05-30,size:2310b


PlayXYDBlockWithRec: 
         R1=[_RecordFlag] 
         R1|=EnRecRegBit 
         [_RecordFlag]=R1 
         R1=0 
         [_RecordFileNum]=R1 
         [_RecordOrgFileNum]=R1 
PlayXYDBlock: 
         CALL ReadNandByte 
         [_FileNumber]=R1 
         CALL NandAddrInc 
         [_PlayAddr]=R3 
         [_PlayBank]=R4 
         R1=1 
         [_InPlayBlock]=R1 
         R1=0 
         [_FileIndex]=R1 
         RETF 
 
GetRandomSoundIndex: 
         R3=[_RSAddr] 
         R4=[_RSAddrB] 
         R2=R1 LSL 1 
         R1+=R2 
         CALL NandAddrAdd 
         CALL ReadNandAddr 
         R4&=0xff 
         CALL AddrChg 
         CALL AddBookAddr 
         CALL ReadNandByte 
         CALL GetRandomData         
         R1=R1 LSL 1 
         R1+=1 
         CALL NandAddrAdd 
         CALL ReadNandWord 
         [_Index]=R1 
         RETF 
 
PlayRamdomSoundGroup: 
         R2=InsSpecialSoundGroupMode 
         [_InsMode]=R2 
GetRandomSoundGroup: 
         R3=[_RSGAddr] 
         R4=[_RSGAddrB] 
         R2=R1 LSL 1 
         R1+=R2 
         CALL NandAddrAdd 
         CALL ReadNandAddr                 // r4,r3        
         CALL AddrChg 
         CALL AddBookAddr 
         CALL ReadNandByte 
         CALL GetRandomData          
         R1=R1 LSL 1 
         R1+=1 
         CALL NandAddrAdd 
         CALL ReadNandWord 
PlaySoundGroup: 
         R2=InsSpecialSoundGroupMode 
         [_InsMode]=R2 
         R3=[_SSGAddr] 
         R4=[_SSGAddrB] 
         R2=R1 LSL 1 
         R1+=R2 
         CALL NandAddrAdd 
         CALL ReadNandAddr    
         R4&=0xff 
         CALL AddrChg    
         CALL AddBookAddr       
         [_InsertPlayBank]=R4           // bank 
         [_InsertPlayAddr]=R3           // addr 
         CALL ReadNandByte 
         [_InsertFileNumber]=R1          
         CALL NandAddrInc 
         [_InsertPlayBank]=R4           // bank 
         [_InsertPlayAddr]=R3           // addr 
         R1=0 
         [_InsertFileIndex]=R1 
         RETF 
 
TestSpcFunc: 
         R1=[_SeriousFlag] 
         TEST R1, 0x03 
         JNE TestSpcFuncWithSpc 
         R1=[_BlockFlag] 
         TEST R1, HaveSelectionQuestionBit 
         JNE TestSpcFuncWithSpc 
TestSpcFuncNoSpc: 
         R1=0 
         RETF 
TestSpcFuncWithSpc: 
         R1=1 
         RETF