www.pudn.com > bak22.rar > Const.inc, change:2007-06-12,size:19882b
.define DEBUG_PC .define CDDEBUG //.define HSH .define WM //.define DBL .define M64 //.define EDL //.define XYD //.define EDITMOD //.define TTTEMP //.define DEBUG_MODE //.define TRACE // 0x1000000 = 16MByte = 128MBit Block=0x400(/0x4000) Sector=0x8000(/0x200) // RecAddr1: .EQU 0x1000000 RecEndAddr1: .EQU 0x1010000 RecAddr2: .EQU 0 RecEndAddr2: .EQU 0x80000 Set20s: .EQU 64*20 SoundBufMax: .EQU 12 RegistRecNumMax: .EQU 16 CommBufLen: .EQU SoundBufMax*5+RegistRecNumMax*2 //Rec1OrgAddr: .EQU 0 //Rec1OrgBank: .EQU RecAddr1/0x10000 Rec1EndAddr: .EQU 0 Rec1EndBank: .EQU RecEndAddr1/0x10000 Rec1OrgBlock: .EQU RecAddr1/0x4000 Rec1EndBlock: .EQU RecEndAddr1/0x4000 Rec1End_200Addr: .EQU 0xfe00 Rec1End_200Bank: .EQU Rec1EndBank-1 Rec1End_2Addr: .EQU 0xfffe Rec1End_2Bank: .EQU Rec1EndBank-1 //Rec2OrgAddr: .EQU 0 //Rec2OrgBank: .EQU RecAddr2/0x10000 //Rec2EndAddr: .EQU 0 //Rec2EndBank: .EQU RecEndAddr2/0x10000 //Rec2OrgBlock: .EQU RecAddr2/0x4000 //Rec2EndBlock: .EQU RecEndAddr2/0x4000 //Rec2End_200Addr: .EQU 0xfe00 //Rec2End_200Bank: .EQU Rec2EndBank-1 //Rec2End_2Addr: .EQU 0xfffe //Rec2End_2Bank: .EQU Rec2EndBank-1 RecEndAddr: .EQU 0 RecEndBank: .EQU 8 RecEnd_200Addr: .EQU 0xfe00 RecEnd_200Bank: .EQU 7 // ============= Special sound ======================= Bit0: .EQU 0000000000000001B Bit1: .EQU 0000000000000010B Bit2: .EQU 0000000000000100B Bit3: .EQU 0000000000001000B Bit4: .EQU 0000000000010000B Bit5: .EQU 0000000000100000B Bit6: .EQU 0000000001000000B Bit7: .EQU 0000000010000000B Bit8: .EQU 0000000100000000B Bit9: .EQU 0000001000000000B BitA: .EQU 0000010000000000B BitB: .EQU 0000100000000000B BitC: .EQU 0001000000000000B BitD: .EQU 0010000000000000B BitE: .EQU 0100000000000000B BitF: .EQU 1000000000000000B Bit0_: .EQU 1111111111111110B Bit1_: .EQU 1111111111111101B Bit2_: .EQU 1111111111111011B Bit3_: .EQU 1111111111110111B Bit4_: .EQU 1111111111101111B Bit5_: .EQU 1111111111011111B Bit6_: .EQU 1111111110111111B Bit7_: .EQU 1111111101111111B Bit8_: .EQU 1111111011111111B Bit9_: .EQU 1111110111111111B BitA_: .EQU 1111101111111111B BitB_: .EQU 1111011111111111B BitC_: .EQU 1110111111111111B BitD_: .EQU 1101111111111111B BitE_: .EQU 1011111111111111B BitF_: .EQU 0111111111111111B AutoRecordBit: .EQU Bit0 AutoRecordBit_: .EQU Bit0_ DiAutoRecordBit: .EQU Bit8 DiAutoRecordBit_: .EQU Bit8_ DiPlayTimeBit: .EQU Bit9 DiPlayTimeBit_: .EQU Bit9_ CurrentRecDealBit: .EQU BitA CurrentRecDealBit_: .EQU BitA_ dRxOk: .EQU 0 dRxNoSign: .EQU 1 dRxUnmatchedModeErr: .EQU 2 dRxCheckSumErr: .EQU 3 dRxWaitLowClkErr: .EQU 4 dRxWaitHighClkErr: .EQU 5 dRxNoErr: .EQU 6 // 0--32 SysErrSound: .EQU 40 Sys20Sound: .EQU 41 AdjFinishedSound: .EQU 49 BeginAdjustSound: .EQU 50 VersionSound: .EQU 51 // ============= ram allocation ======================= // ============= system key word ====================== // FEDCBA9876543210 // RAPPCCAAAAAAAAAA // DL0o212222111111 // /E w 3210987654 Enable24c02: .EQU 1001010000000000b ExternalRom: .EQU 1001011000000000b ResetHightRom: .EQU 1001111000000000b ResetLowRom: .EQU 0001111000000000b BufferRom: .EQU 1001111000000000b Internal128Rom: .EQU 1001101000001000b InternalRom: .EQU 1001101000001000b iUnitOff: .EQU 1000111000000000b AutoOffMaxTime: .EQU 32*60 C02DiBit: .EQU Bit9 C02DiBit_: .EQU Bit9_ PlayCEBit: .EQU 0x2000 PlayCEBit_: .EQU 0xdfff //UartBefore: .EQU 1001111111111111b //Internal512Rom: .EQU 1001101000000000b // ============= card mode ============================ NoMode: .EQU 0 NormalMode: .EQU 1 AdjustMode: .EQU 2 VersionMode: .EQU 3 TestMode: .EQU 4 CoordMode: .EQU 5 // print message ContinousMode: .EQU 6 // play continous // ============= error Type =========================== SysOk: .EQU 0 ErrFlashErr: .EQU 1 ErrC02Err: .EQU 2 ErrC02DataErr: .EQU 3 AdjustPercisionErr: .EQU 4 ErrRxErr: .EQU 5 ErrTxErr: .EQU 6 ErrPenNoFunction: .EQU 7 // ============= sound mode -- SoundMode ============= PlayNormalSoundMode: .EQU 0 PlaySoundGroupMode: .EQU 1 PlayRandomSoundMode: .EQU 2 PlayRandomSoundGroupMode: .EQU 3 // ============= insert sound mode -- Insert Mode ===== InsNormalSoundMode: .EQU 1 InsSpecialSoundGroupMode: .EQU 2 // ============= Parament in flash ==================== BookBias: .EQU 0x8040 // Normal mode FCapacityOfMaskRom: .EQU 0x10 FCheckSumOfMaskRom: .EQU 0x11 //_ .EQU 0x12 FHowManyBook: .EQU 0x13 FAutoOffTime: .EQU 0x14 FUnitOnSound: .EQU 0x15 //_ .EQU 0x16 FUnitOffSound: .EQU 0x17 //_ .EQU 0x18 FXMinGate: .EQU 0x19 FXMaxGate: .EQU 0x1a FYMinGate: .EQU 0x1b FYMaxGate: .EQU 0x1c FSpcSoundGroupAddr: .EQU 0x1d //_ .EQU 0x1e //_ .EQU 0x1f FRandomSoundGroupAddr: .EQU 0x20 //_ .EQU 0x21 //_ .EQU 0x22 FRandomSoundAddr: .EQU 0x23 //_ .EQU 0x24 //_ .EQU 0x25 FSoundIndexAddr: .EQU 0x26 //_ .EQU 0x27 //_ .EQU 0x28 FSoundOrgIndex: .EQU 0x29 //_ .EQU 0x2a FSoundEndIndex: .EQU 0x2b //_ .EQU 0x2c FCardMode: .EQU 0x2d FOnVolumn: .EQU 0x2e FPrintFlag: .EQU 0x2f FLowVFlag: .EQU 0x30 FLowVIndex: .EQU 0x31 //_ .EQU 0x32 FCardExternAttrib: .EQU 0x33 // .EQU 0x34 FXMinValid: .EQU 0x35 FXMaxValid: .EQU 0x36 FYMinValid: .EQU 0x37 FYMaxValid: .EQU 0x38 FSpeedAdjust: .EQU 0x39 FPara: .EQU 0x10 FDTotal: .EQU 0x10 FD1: .EQU 0x11 FDAll: .EQU 0x12 FDYsp: .EQU 0x13 FDYfp: .EQU 0x14 FDXsp: .EQU 0x15 FDXfp: .EQU 0x16 FCDly: .EQU 0x17 FMxMul: .EQU 0x18 FMxSub: .EQU 0x19 FM2Sub: .EQU 0x1A FAllPt: .EQU 0x1B FVolGate: .EQU 0x1C FMxMinMul: .EQU 0x1D FMxMaxMul: .EQU 0x1E FRes2: .EQU 0x1F FAdjN: .EQU 0x20 FAdjMaxN: .EQU 0x21 FAdjMaxP: .EQU 0x22 FAdjF: .EQU 0x23 FParaCS: .EQU 0x24 FVer: .EQU 0x30 FVerCS: .EQU 0x3f // Test mode FTestDPCount: .EQU 0x2f //SysFlagA KeyBit: .EQU Bit0 KeyBit_: .EQU Bit0_ LowVoltageBit: .EQU Bit1 LowVoltageBit_: .EQU Bit1_ UnitOffBit: .EQU Bit2 UnitOffBit_: .EQU Bit2_ CoordBit: .EQU Bit3 CoordBit_: .EQU Bit3_ PlayIndexBit: .EQU Bit4 PlayIndexBit_: .EQU Bit4_ ReadyPlayBit: .EQU Bit5 ReadyPlayBit_: .EQU Bit5_ TmpBit: .EQU Bit6 TmpBit_: .EQU Bit6_ HadDealBit: .EQU Bit7 HadDealBit_: .EQU Bit7_ WholeSoundBit: .EQU Bit8 WholeSoundBit_: .EQU Bit8_ FirstKnockBit: .EQU Bit9 FirstKnockBit_: .EQU Bit9_ SecondKnockBit: .EQU BitA SecondKnockBit_: .EQU BitA_ ThirdKnockBit: .EQU BitB ThirdKnockBit_: .EQU BitB_ ForthKnockBit: .EQU BitC ForthKnockBit_: .EQU BitC_ KeyCutRecBit: .EQU BitD KeyCutRecBit_: .EQU BitD_ SysErrBit: .EQU BitE SysErrBit_: .EQU BitE_ PaiStatuBit: .EQU BitF PaiStatuBit_: .EQU BitF_ BaseDataBit: .EQU PaiStatuBit BaseDataBit_: .EQU PaiStatuBit_ DiCoordBit: .EQU LowVoltageBit DiCoordBit_: .EQU LowVoltageBit_ //BookMark XYDBookBit: .EQU Bit0 //Statu: DynamicBit: .EQU Bit0 DynamicBit_: .EQU Bit0_ StatuMask: .EQU 0xfff9 DTNormalPlayBit: .EQU 0000B DTRecBit: .EQU 0010B DTSourceBit: .EQU 0100B DTPlayRecBit: .EQU 0110B //EditFlag: InEditBit: .EQU Bit0 InEditBit_: .EQU Bit0_ HintSoundBit: .EQU Bit1 HintSoundBit_: .EQU Bit1_ HaveEditBit: .EQU Bit2 HaveEditBit_: .EQU Bit2_ EditBank2Bit: .EQU Bit3 EditBank2Bit_: .EQU Bit3_ EditRecordBit: .EQU Bit4 EditRecordBit_: .EQU Bit4_ EditModeBit: .EQU Bit5 EditModeBit_: .EQU Bit5_ ToEditBit: .EQU Bit6 ToEditBit_: .EQU Bit6_ ToHintBit: .EQU Bit7 ToHintBit_: .EQU Bit7_ ToRegBit: .EQU Bit8 ToRegBit_: .EQU Bit8_ NoEditSpaceBit: .EQU Bit9 NoEditSpaceBit_: .EQU Bit9_ PageEditFullBit: .EQU BitA PageEditFullBit_: .EQU BitA_ HaveEditBlockBit: .EQU BitB HaveEditBlockBit_: .EQU BitB_ AutoEditBit: .EQU BitC AutoEditBit_: .EQU BitC_ ToPlayGiveEditBit: .EQU BitD ToPlayGiveEditBit_: .EQU BitD_ //Attrib PageD2Bit: .EQU Bit0 PageD2Bit_: .EQU Bit0_ PageA2Bit: .EQU Bit1 PageA2Bit_: .EQU Bit1_ EnBlankRecordBit: .EQU Bit4 EnBlankRecordBit_: .EQU Bit4_ OnceKnockRecordBit: .EQU Bit5 OnceKnockRecordBit_: .EQU Bit5_ SysSoundRecordBit: .EQU Bit6 SysSoundRecordBit_: .EQU Bit6_ DSLGroupBit: .EQU Bit8 DSLGroupBit_: .EQU Bit8_ //PrintFlag PrintCoordBit: .EQU Bit8 PrintBlockBit: .EQU Bit9 PrintDealMessBit: .EQU BitA PrintPlayMessBit: .EQU BitB PrintDealMessBit_: .EQU BitA_ //SeriousFlag SeriousSelectionBit: .EQU Bit0 SeriousSelectionBit_: .EQU Bit0_ SeriousInLinkBit: .EQU Bit1 SeriousInLinkBit_: .EQU Bit1_ ExplainBit: .EQU Bit2 ExplainBit_: .EQU Bit2_ //BlockFlag SeriousPlayBit: .EQU Bit0 SeriousPlayBit_: .EQU Bit0_ HaveSelectionQuestionBit: .EQU Bit1 HaveSelectionQuestionBit_: .EQU Bit1_ AnswerIrrelevantBit: .EQU Bit2 AnswerIrrelevantBit_: .EQU Bit2_ AnswerRelevantBit: .EQU Bit3 AnswerRelevantBit_: .EQU Bit3_ AnswerCorrectBit: .EQU Bit4 AnswerCorrectBit_: .EQU Bit4_ AnswerSuccessfulBit: .EQU Bit5 AnswerSuccessfulBit_: .EQU Bit5_ SelectionMaskBit: .EQU 0000000000111100b SelectionMaskBit_: .EQU 1111111111000011b BlockInLinkBit: .EQU Bit6 BlockInLinkBit_: .EQU Bit6_ BlockErrLinkBit: .EQU Bit7 BlockErrLinkBit_: .EQU Bit7_ BlockEndLinkBit: .EQU Bit8 BlockEndLinkBit_: .EQU Bit8_ CAECauseBit: .EQU Bit9 CAECauseBit_: .EQU Bit9_ CAEEffectBit: .EQU BitA CAEEffectBit_: .EQU BitA_ CAEMask: .EQU CAECauseBit|CAEEffectBit CAEMask_: .EQU CAEEffectBit_&CAEEffectBit_ ConditionBit: .EQU BitB ConditionBit_: .EQU BitB_ BackGroundBit: .EQU BitC BackGroundBit_: .EQU BitC_ AttribHadDealBit: .EQU BitD AttribHadDealBit_: .EQU BitD_ QuestionDiCoordBit: .EQU BitE QuestionDiCoordBit_: .EQU BitE_ AnswerErrRetBit: .EQU AnswerSuccessfulBit AnswerErrRetBit_: .EQU AnswerSuccessfulBit_ AnswerRetBit: .EQU AnswerSuccessfulBit AnswerRetBit_: .EQU AnswerSuccessfulBit_ BlockSelectionMask: .EQU AnswerIrrelevantBit|AnswerRelevantBit //BlockFlag2 InScoreModeBit: .EQU Bit0 InScoreModeBit_: .EQU Bit0_ NumFullEnRetBit: .EQU Bit1 NumFullEnRetBit_: .EQU Bit1_ ScoreFullEnRetBit: .EQU Bit2 ScoreFullEnRetBit_: .EQU Bit2_ ScoreEnInvalidRetBit: .EQU Bit3 ScoreEnInvalidRetBit_: .EQU Bit3_ ScoreBlockBit: .EQU Bit4 ScoreBlockBit_: .EQU Bit4_ ScoreEnTwiceBit: .EQU Bit5 ScoreEnTwiceBit_: .EQU Bit5_ ScoreEnableBit: .EQU Bit6 ScoreEnableBit_: .EQU Bit6_ ScoreTwiceBit: .EQU Bit7 ScoreTwiceBit_: .EQU Bit7_ ScoreAddBit: .EQU Bit8 ScoreAddBit_: .EQU Bit8_ ScoreSubBit: .EQU Bit9 ScoreSubBit_: .EQU Bit9_ ScoreRetBit: .EQU BitA ScoreRetBit_: .EQU BitA_ //RecordFlag InRecModeBit: .EQU Bit0 InRecModeBit_: .EQU Bit0_ HadRecBit: .EQU Bit1 HadRecBit_: .EQU Bit1_ InPlayBit: .EQU Bit2 InPlayBit_: .EQU Bit2_ InPlayRecBit: .EQU Bit3 InPlayRecBit_: .EQU Bit3_ RecordBlockBit: .EQU Bit4 RecordBlockBit_: .EQU Bit4_ ToRecordBit: .EQU Bit5 ToRecordBit_: .EQU Bit5_ ToPlayRecordBit: .EQU Bit6 ToPlayRecordBit_: .EQU Bit6_ ToPlaySoundBit: .EQU Bit7 ToPlaySoundBit_: .EQU Bit7_ RecordAttribHadDealBit: .EQU Bit8 RecordAttribHadDealBit_: .EQU Bit8_ RecWaitBit: .EQU Bit9 RecWaitBit_: .EQU Bit9_ InPlaySoundBit: .EQU BitA InPlaySoundBit_: .EQU BitA_ HadSoundBit: .EQU BitB HadSoundBit_: .EQU BitB_ RecAllBit_: .EQU ToRecordBit_&ToPlaySoundBit_&ToPlayRecordBit_&InPlaySoundBit_&InPlayRecBit_&InPlayBit_ EnRecRegBit: .EQU BitC EnRecRegBit_: .EQU BitC_ //PageModeAttrib PMSQInvalidRetBit: .EQU Bit0 PMSQInvalidRetBit_: .EQU Bit0_ ConditionInvalidRetBit: .EQU Bit1 ConditionInvalidRetBit_: .EQU Bit1_ ChangePageDiBit: .EQU Bit2 ChangePageDiBit_: .EQU Bit2_ PMLinkInvalidRetBit: .EQU Bit3 PMLinkInvalidRetBit_: .EQU Bit3_ PMLinkErrRetBit: .EQU Bit4 PMLinkErrRetBit_: .EQU Bit4_ ChangeBookDiBit: .EQU Bit2 ChangeBookDiBit_: .EQU Bit2_ PV0H: .EQU 0x00 PV1H: .EQU 0x01 PV2H: .EQU 0x02 PV3H: .EQU 0x03 PV4H: .EQU 0x04 PV5H: .EQU 0x05 PV6H: .EQU 0x06 PV7H: .EQU 0x07 PV0L: .EQU 0x08 PV1L: .EQU 0x09 PV2L: .EQU 0x0a PV3L: .EQU 0x0b PV4L: .EQU 0x0c PV5L: .EQU 0x0d PV6L: .EQU 0x0e PV7L: .EQU 0x0f XBase: .EQU 0x10 YBase: .EQU 0x11 RAdjP: .EQU 0x00 RAdjN: .EQU 0x01 AdjABi: .EQU 0x02 AdjXBi: .EQU 0x03 AdjYBi: .EQU 0x04 .DEFINE WRBit 0x0008 //0x0200 .DEFINE WRBit_ 0xfff7 //0xfdff .DEFINE SramBit_ 0x0ff0 .DEFINE SramBit2_ 0xf00f&WRBit_ M5MBit: .EQU Bit0 M5MBit1: .EQU Bit1 M5MBit2: .EQU Bit2 ID2Bit: .EQU Bit3 Erase2Bit: .EQU Bit4 M5MBit_: .EQU Bit0_ M5MBit1_: .EQU Bit1_ M5MBit2_: .EQU Bit2_ ID2Bit_: .EQU Bit3_ Erase2Bit_: .EQU Bit4_ TogBit: .EQU BitB TogBit_: .EQU BitB_ Tog2Bit: .EQU Bit9 Tog2Bit_: .EQU Bit9_ .include hard.inc