Debug no keifu

Thảo luận trong 'Fire Emblem - Mộc đế' bắt đầu bởi SPC700, 25/12/21.

  1. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044


    Reset:
    $008D56:
    C0/8D56: 78 SEI
    C0/8D57: 18 CLC
    C0/8D58: FB XCE
    C0/8D59: 9011 BCC $8D6C //Reset: emulation set, carry set
    C0/8D5B: C230 REP #$30
    C0/8D5D: 7B TDC
    C0/8D5E: D00C BNE $8D6C
    C0/8D60: A2568D LDX #$8D56
    C0/8D63: ECFCFF CPX $FFFC
    C0/8D66: D004 BNE $8D6C //fast speed
    C0/8D68: 5C6C8D80 JMP $808D6C
    -----Copy right protection----
    C0/8D6C: C230 REP #$30
    C0/8D6E: BA TSX
    C0/8D6F: 9B TXY
    C0/8D70: A2F71F LDX #$1FF7
    C0/8D73: 9A TXS
    C0/8D74: E220 SEP #$20
    C0/8D76: A901 LDA #$01
    C0/8D78: 8D0D42 STA $420D //fast Rom
    C0/8D7B: A980 LDA #$80
    C0/8D7D: 8D0021 STA $2100 //force blank
    C0/8D80: 9C0042 STZ $4200
    C0/8D83: 9C0B42 STZ $420B
    C0/8D86: 9C0C42 STZ $420C
    C0/8D89: C230 REP #$30
    C0/8D8B: ADFC1F LDA $1FFC
    C0/8D8E: C9454C CMP #$4C45
    C0/8D91: D008 BNE $8D9B
    C0/8D93: ADFE1F LDA $1FFE
    C0/8D96: C94D30 CMP #$304D
    C0/8D99: F028 BEQ $8DC3
    C0/8D9B: 88 DEY
    C0/8D9C: B90000 LDA $0000,Y
    C0/8D9F: 1A INC A
    C0/8DA0: CDFCFF CMP $FFFC
    C0/8DA3: F025 BEQ $8DCA
    C0/8DA5: A20000 LDX #$0000
    C0/8DA8: BD0000 LDA $0000,X
    C0/8DAB: 29FF00 AND #$00FF
    C0/8DAE: C96C00 CMP #$006C
    C0/8DB1: F01F BEQ $8DD2
    C0/8DB3: C94C00 CMP #$004C
    C0/8DB6: F031 BEQ $8DE9
    C0/8DB8: C96000 CMP #$0060
    C0/8DBB: F036 BEQ $8DF3
    C0/8DBD: E8 INX
    C0/8DBE: E0FE1F CPX #$1FFE
    C0/8DC1: D0E5 BNE $8DA8
    C0/8DC3: 4B PHK
    C0/8DC4: 4B PHK
    C0/8DC5: 68 PLA
    C0/8DC6: F002 BEQ $8DCA
    C0/8DC8: 8049 BRA $8E13
    C0/8DCA: A90000 LDA #$0000
    C0/8DCD: 5B TCD
    C0/8DCE: 223E8087 JSR $87803E //異常検出画面
    C0/8DD2: BC0100 LDY $0001,X
    C0/8DD5: C0FCFF CPY #$FFFC
    C0/8DD8: F0F0 BEQ $8DCA
    C0/8DDA: C0FF1F CPY #$1FFF
    C0/8DDD: B0DE BCS $8DBD
    C0/8DDF: B90000 LDA $0000,Y
    C0/8DE2: C9568D CMP #$8D56
    C0/8DE5: F0E3 BEQ $8DCA
    C0/8DE7: 80D4 BRA $8DBD
    C0/8DE9: BC0100 LDY $0001,X
    C0/8DEC: C0568D CPY #$8D56
    C0/8DEF: F0D9 BEQ $8DCA
    C0/8DF1: 80CA BRA $8DBD
    C0/8DF3: 8A TXA
    C0/8DF4: 5B TCD
    C0/8DF5: A00000 LDY #$0000
    C0/8DF8: A96061 LDA #$6160
    C0/8DFB: DD0000 CMP $0000,X
    C0/8DFE: D00F BNE $8E0F
    C0/8E00: 18 CLC
    C0/8E01: 690202 ADC #$0202
    C0/8E04: E8 INX
    C0/8E05: E8 INX
    C0/8E06: C8 INY
    C0/8E07: C8 INY
    C0/8E08: C02000 CPY #$0020
    C0/8E0B: D0EE BNE $8DFB
    C0/8E0D: 80BB BRA $8DCA
    C0/8E0F: 7B TDC
    C0/8E10: AA TAX
    C0/8E11: 80AA BRA $8DBD
    C0/8E13: A90000 LDA #$0000
    C0/8E16: 5B TCD
    C0/8E17: 22748087 JSR $878074
    C0/8E1B: 8DF81F STA $1FF8
    C0/8E1E: 8DFA1F STA $1FFA
    C0/8E21: A9454C LDA #$4C45
    C0/8E24: 8DFC1F STA $1FFC
    C0/8E27: A94D30 LDA #$304D
    C0/8E2A: 8DFE1F STA $1FFE

    ------INIT RAM WRAM-------------
    C0/8E2D: F4007E PEA $7E00
    C0/8E30: AB PLB
    C0/8E31: AB PLB
    C0/8E32: A2F61F LDX #$1FF6
    C0/8E35: 9E0000 STZ $0000,X
    C0/8E38: CA DEX
    C0/8E39: CA DEX
    C0/8E3A: 10F9 BPL $8E35
    C0/8E3C: A2FE1F LDX #$1FFE
    C0/8E3F: 9E0020 STZ $2000,X
    C0/8E42: 9E0040 STZ $4000,X
    C0/8E45: 9E0060 STZ $6000,X
    C0/8E48: 9E0080 STZ $8000,X
    C0/8E4B: 9E00A0 STZ $A000,X
    C0/8E4E: 9E00C0 STZ $C000,X
    C0/8E51: 9E00E0 STZ $E000,X
    C0/8E54: CA DEX
    C0/8E55: CA DEX
    C0/8E56: 10E7 BPL $8E3F
    C0/8E58: F4007F PEA $7F00
    C0/8E5B: AB PLB
    C0/8E5C: AB PLB
    C0/8E5D: A2FE1F LDX #$1FFE
    C0/8E60: 9E0000 STZ $0000,X
    C0/8E63: 9E0020 STZ $2000,X
    C0/8E66: 9E0040 STZ $4000,X
    C0/8E69: 9E0060 STZ $6000,X
    C0/8E6C: 9E0080 STZ $8000,X
    C0/8E6F: 9E00A0 STZ $A000,X
    C0/8E72: 9E00C0 STZ $C000,X
    C0/8E75: 9E00E0 STZ $E000,X
    C0/8E78: CA DEX
    C0/8E79: CA DEX
    C0/8E7A: 10E4 BPL $8E60
    C0/8E7C: 4B PHK
    C0/8E7D: AB PLB

    ----INIT VRAM---------
    C0/8E7E: C230 REP #$30
    C0/8E80: A90918 LDA #$1809
    C0/8E83: 8D0043 STA $4300
    C0/8E86: A90080 LDA #$8000
    C0/8E89: 8D0343 STA $4303
    C0/8E8C: A9938E LDA #$8E93
    C0/8E8F: 8D0243 STA $4302
    C0/8E92: A90000 LDA #$0000
    C0/8E95: 8D0543 STA $4305
    C0/8E98: 9C1621 STZ $2116
    C0/8E9B: E220 SEP #$20
    C0/8E9D: A901 LDA #$01
    C0/8E9F: 8D0B42 STA $420B
    C0/8EA2: C220 REP #$20
    C0/8EA4: 20508C JSR $8C50 //enable pad
    C0/8EA7: 22F68E80 JSR $808EF6 //upload sound driver
    C0/8EAB: 22748087 JSR $878074
    C0/8EAF: A92800 LDA #$0028
    C0/8EB2: 85E0 STA $E0
    C0/8EB4: A90A00 LDA #$000A
    C0/8EB7: 85E2 STA $E2
    C0/8EB9: A9A09C LDA #$9CA0
    C0/8EBC: 85D3 STA $D3
    C0/8EBE: A92282 LDA #$8222
    C0/8EC1: 85D5 STA $D5
    C0/8EC3: A9D69C LDA #$9CD6
    C0/8EC6: 85D7 STA $D7 //first main routine
    C0/8EC8: 5CEE8E80 JMP $808EEE
    C0/8ECC: C230 REP #$30
    C0/8ECE: A2F71F LDX #$1FF7
    C0/8ED1: 9A TXS
    C0/8ED2: E220 SEP #$20
    C0/8ED4: A980 LDA #$80
    C0/8ED6: 8D0021 STA $2100
    C0/8ED9: 9C0042 STZ $4200
    C0/8EDC: 9C0B42 STZ $420B
    C0/8EDF: 9C0C42 STZ $420C
    C0/8EE2: C230 REP #$30
    C0/8EE4: 5C2D8E80 JMP $808E2D
    C0/8EE8: C230 REP #$30
    C0/8EEA: 223F8280 JSR $80823F //wait vblank
    C0/8EEE: C230 REP #$30
    C0/8EF0: F4E78E PEA $8EE7
    C0/8EF3: 6CD700 JMP ($00D7) //main routine
     
    Chỉnh sửa cuối: 25/12/21
    snoopyy thích bài này.
  2. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044
    異常検出画面
    [​IMG]
    [​IMG]

    Nintendō Logo

    $809CD6
    C0/9CD6: SEP #$30
    C0/9CD8: STZ $4200
    C0/9CDB: STZ $B1
    C0/9CDD: LDA #$80
    C0/9CDF: STA $70
    C0/9CE1: STA $2100
    C0/9CE4: STZ $1E20
    C0/9CE7: STZ $1E22
    C0/9CEA: JSR $808341
    C0/9CEE: JSR $80826E
    C0/9CF2: REP #$30
    C0/9CF4: JSR $80A5D9
    C0/9CF8: JSR $A836
    C0/9CFB: JSR $809BEE
    C0/9CFF: LDA #$8200
    C0/9D02: STA $63
    C0/9D04: LDA #$8000
    C0/9D07: STA $62
    C0/9D09: JSR $809C04
    C0/9D0D: LDA #$8100
    C0/9D10: STA $63
    C0/9D12: LDA #$8000
    C0/9D15: STA $62
    C0/9D17: JSR $809C04
    C0/9D1B: LDA #$8200
    C0/9D1E: STA $63
    C0/9D20: LDA #$C000
    C0/9D23: STA $62
    C0/9D25: JSR $809C04
    C0/9D29: LDA #$8200
    C0/9D2C: STA $63
    C0/9D2E: LDA #$E000
    C0/9D31: STA $62
    C0/9D33: JSR $809C04
    C0/9D37: LDA #$9100
    C0/9D3A: STA $63
    C0/9D3C: LDA #$A3A5
    C0/9D3F: STA $62
    C0/9D41: JSR $809C04
    C0/9D45: STZ $0300
    C0/9D48: STZ $0302
    C0/9D4B: JMP $80AD24
    C0/9D4F: JSR $80A6C3
    C0/9D53: JSR $80A5E9
    C0/9D57: JSR $809903
    C0/9D5B: RTS

    $80AD24
    C0/AD24: PHP
    C0/AD25: SEP #$20
    C0/AD27: LDA #$80
    C0/AD29: STA $70
    C0/AD2B: STA $2100
    C0/AD2E: REP #$20
    C0/AD30: JSR $808231
    C0/AD34: JSR $809D5C
    C0/AD38: JSR $809DA3
    C0/AD3C: LDA #$000A
    C0/AD3F: STA $E0
    C0/AD41: LDA #$0006
    C0/AD44: STA $E2
    C0/AD46: LDA #$0000
    C0/AD49: JSR $809ED9
    C0/AD4D: LDA #$030F
    C0/AD50: JSR $809EED
    C0/AD54: LDA #$00FF
    C0/AD57: JSR $809F01
    C0/AD5B: LDA #$0000
    C0/AD5E: STA $02
    C0/AD60: STA $04
    C0/AD62: LDA #$4000
    C0/AD65: STA $06
    C0/AD67: STA $08
    C0/AD69: LDA #$6000
    C0/AD6C: STA $0A
    C0/AD6E: LDA #$5000
    C0/AD71: STA $0C
    C0/AD73: LDA #$5400
    C0/AD76: STA $0E
    C0/AD78: LDA #$5800
    C0/AD7B: STA $10
    C0/AD7D: JSR $809F15
    C0/AD81: JSR $828006
    C0/AD85: JSR $81800A
    C0/AD89: JSR $818038
    C0/AD8D: JSR $82C006
    C0/AD91: JSR $82E073
    C0/AD95: JSR $82E400
    C0/AD99: JSR $8780AA
    C0/AD9D: JSR $82F211
    C0/ADA1: LDA #$00FF
    C0/ADA4: STA $053E
    C0/ADA7: JSR $848000
    C0/ADAB: JSR $868079
    C0/ADAF: JSR $869CCC
    C0/ADB3: JSR $80A773
    C0/ADB7: JSR $91EC8E
    C0/ADBB: JSR $87BF43
    C0/ADBF: CMP #$0001
    C0/ADC2: BNE $ADD0
    C0/ADC4: SEP #$20
    C0/ADC6: LDA $04EA
    C0/ADC9: ORA #$40
    C0/ADCB: STA $04EA
    C0/ADCE: REP #$20
    C0/ADD0: LDA #$00C0
    C0/ADD3: JSR $808F6F
    C0/ADD7: JSR $9BFBC0 //display logo setting
    C0/ADDB: JSR $81A85C
    C0/ADDF: LDA #$0001
    C0/ADE2: STA $0300
    C0/ADE5: LDA #$0002
    C0/ADE8: STA $0302
    C0/ADEB: STZ $0304
    C0/ADEE: LDA #$AE25
    C0/ADF1: STA $D3
    C0/ADF3: LDA #$9D4F //next main routine
    C0/ADF6: STA $D7
    C0/ADF8: JSR $808223 //enable nmi
    C0/ADFC: PLP
    C0/ADFD: CLI
    C0/ADFE: RTS

    0/8223: PHP
    C0/8224: SEP #$20
    C0/8226: LDA $B1
    C0/8228: ORA #$80
    C0/822A: STA $B1
    C0/822C: STA $4200
    C0/822F: PLP
    C0/8230: RTL

    DB/FBC0: PHX
    DB/FBC1: SEP #$20
    DB/FBC3: LDA #$00
    DB/FBC5: STA $7FD000
    DB/FBC9: LDA #$01
    DB/FBCB: STA $96
    DB/FBCD: STA $74
    DB/FBCF: STA $71
    C0/9DEB: STZ $210B
    C0/9DEE: STZ $7A
    C0/9DF0: STZ $210C
    C0/9DF3: STZ $7B
    C0/9DF5: STZ $210D
    C0/9DF8: STZ $7F
    C0/9DFA: STZ $210D
    C0/9DFD: STZ $80
    C0/9DFF: STZ $210E
    C0/9E02: STZ $81
    C0/9E04: STZ $210E
    C0/9E07: STZ $82
    C0/9E09: STZ $210F
    C0/9E0C: STZ $83
    C0/9E0E: STZ $210F
    C0/9E11: STZ $84
    C0/9E13: STZ $2110
    C0/9E16: STZ $85
    C0/9E18: STZ $2110
    C0/9E1B: STZ $86
    C0/9E1D: STZ $2111
    C0/9E20: STZ $87
    C0/9E22: STZ $2111
    C0/9E25: STZ $88
    C0/9E27: STZ $2112
    C0/9E2A: STZ $89
    C0/9E2C: STZ $2112
    C0/9E2F: STZ $8A
    C0/9E31: STZ $2113
    C0/9E34: STZ $8B
    C0/9E36: STZ $2113
    C0/9E39: STZ $8C
    C0/9E3B: STZ $2114
    C0/9E3E: STZ $8D
    C0/9E40: STZ $2114
    C0/9E43: STZ $8E
    C0/9E45: STZ $2115
    C0/9E48: STZ $211A
    C0/9E4B: STZ $7C
    C0/9E4D: STZ $211B
    C0/9E50: STZ $211C
    C0/9E53: STZ $211D
    C0/9E56: STZ $211E
    C0/9E59: STZ $211F
    C0/9E5C: STZ $2120
    C0/9E5F: LDA #$00
    C0/9E61: STA $2123
    C0/9E64: STA $7D
    C0/9E66: LDA #$00
    C0/9E68: STA $2124
    C0/9E6B: STA $7E
    C0/9E6D: STZ $2125
    C0/9E70: STZ $8F
    C0/9E72: LDA #$00
    C0/9E74: STA $2126
    C0/9E77: STA $90
    C0/9E79: LDA #$F8
    C0/9E7B: STA $2127
    C0/9E7E: STA $91
    C0/9E80: STZ $2128
    C0/9E83: STZ $92
    C0/9E85: STZ $2129
    C0/9E88: STZ $93
    C0/9E8A: STZ $212A
    C0/9E8D: STZ $94
    C0/9E8F: STZ $212B
    C0/9E92: STZ $95
    C0/9E94: LDA #$11
    C0/9E96: STA $212C
    C0/9E99: STA $96
    C0/9E9B: STA $212E
    C0/9F98: AND #$F8
    C0/9F9A: ORA $0A
    C0/9F9C: STA $2101
    C0/9F9F: STA $71
    C0/9FA1: LDA $02
    C0/9FA3: STA $210B //BG1, BG2 tile vram adr
    C0/9FA6: STA $7A
    C0/9FA8: LDA $06
    C0/9FAA: STA $210C //BG3, BG4 tile vram adr
    C0/9FAD: STA $7B
    C0/9FAF: PLP
    C0/9FB0: PLB
    C0/9FB1: RTL
     
  3. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044


    NMI
    C0/81B6: CLI
    C0/81B7: REP #$30
    C0/81B9: JMP $8081BD
    C0/81BD: PHB
    C0/81BE: PHD
    C0/81BF: PHA
    C0/81C0: PHX
    C0/81C1: PHY
    C0/81C2: LDA #$0000
    C0/81C5: TCD
    C0/81C6: PHK
    C0/81C7: PLB
    C0/81C8: LDA $4210
    C0/81CB: LDA $D9
    C0/81CD: BMI $81E9 //original nimi
    C0/81CF: ORA #$8000
    C0/81D2: STA $D9
    C0/81D4: PEA $81D9
    C0/81D7: JMP ($00D3)
    C0/81DA: JSR $91EB76
    C0/81DE: INC $DB //exit wait vblank
    C0/81E0: PLY
    C0/81E1: PLX
    C0/81E2: PLA
    C0/81E3: PLD
    C0/81E4: STZ $00D9 //disable original nmi
    C0/81E7: PLB
    C0/81E8: RTI

    C0/81E9: INC $DD
    C0/81EB: JSR $8090A2
    C0/81EF: JSR $8081A8
    C0/81F3: JSR $91EB76
    C0/81F7: PLY
    C0/81F8: PLX
    C0/81F9: PLA
    C0/81FA: PLD
    C0/81FB: PLB
    C0/81FC: RTI

    First D3
    C0/AE25: SEP #$20
    C0/AE27: LDA #$80
    C0/AE29: STA $2100
    C0/AE2C: REP #$20
    C0/AE2E: JSR $80A34F
    C0/AE32: JSR $80807C // DMA oam, color
    C0/AE36: JSR $80A328 //Dma effect?
    C0/AE3A: JSR $8080C3 //Write PPU registers
    C0/AE3E: JSR $8090A2 //Check sound
    C0/AE42: JSR $808002 //Read pad
    C0/AE46: JSR $80A6F9
    C0/AE4A: JSR $808341 //Init $1E00~$1E1E
    C0/AE4E: JSR $809BA9 //JMP [$24] sequence ID?
    C0/AE52: JSR $809C7A //JML [$0306]
    C0/AE56: JSR $80826E //JSR (8282,x)
    C0/AE5A: JSR $858728
    C0/AE5E: JSR $8095CD
    C0/AE62: RTS

    C0/A34F: PHB
    C0/A350: PHP
    C0/A351: PHK
    C0/A352: PLB
    C0/A353: SEP #$20
    C0/A355: LDA $0345
    C0/A358: BEQ $A387
    C0/A35A: STZ $0345
    C0/A35D: STZ $420B
    C0/A360: STZ $420C
    C0/A363: REP #$30
    C0/A365: STZ $0343
    C0/A368: LDY #$0000
    C0/A36B: CPY #$0100
    C0/A36E: BCC $A372
    C0/A370: BRA $A370
    C0/A372: LDA $0346,Y
    C0/A375: AND #$00FF
    C0/A378: ASL A
    C0/A379: TAX
    C0/A37A: JMP ($A37D,X)
    $A387: dw $A387, $A38F, $A3CE, $A41B, A46E

    C0/A387: SEP #$20
    C0/A389: STZ $0346
    C0/A38C: PLP
    C0/A38D: PLB
    C0/A38E: RTL

    C0/A38F: SEP #$20
    C0/A391: LDA $0347,Y
    C0/A394: STA $4312
    C0/A397: LDA $0348,Y
    C0/A39A: STA $4313
    C0/A39D: LDA $0349,Y
    C0/A3A0: STA $4314
    C0/A3A3: LDA $034A,Y
    C0/A3A6: STA $4315
    C0/A3A9: LDA $034B,Y
    C0/A3AC: STA $4316
    C0/A3AF: LDA $034C,Y
    C0/A3B2: STA $2121
    C0/A3B5: STZ $4310
    C0/A3B8: LDA #$22
    C0/A3BA: STA $4311
    C0/A3BD: LDA #$02
    C0/A3BF: STA $420B
    C0/A3C2: REP #$20
    C0/A3C4: TYA
    C0/A3C5: CLC
    C0/A3C6: ADC #$0007
    C0/A3C9: TAY
    C0/A3CA: JMP $80A36B
    C0/A3CE: SEP #$20
    C0/A3D0: LDA $0347,Y
    C0/A3D3: STA $4312
    C0/A3D6: LDA $0348,Y
    C0/A3D9: STA $4313
    C0/A3DC: LDA $0349,Y
    C0/A3DF: STA $4314
    C0/A3E2: LDA $034A,Y
    C0/A3E5: STA $4315
    C0/A3E8: LDA $034B,Y
    C0/A3EB: STA $4316
    C0/A3EE: LDA $034C,Y
    C0/A3F1: STA $2115
    C0/A3F4: LDA $034D,Y
    C0/A3F7: STA $2116
    C0/A3FA: LDA $034E,Y
    C0/A3FD: STA $2117
    C0/A400: LDA #$01
    C0/A402: STA $4310
    C0/A405: LDA #$18
    C0/A407: STA $4311
    C0/A40A: LDA #$02
    C0/A40C: STA $420B
    C0/A40F: REP #$20
    C0/A56D: ADC #$0006
    C0/A570: STA $03,S
    C0/A572: TYA
    C0/A573: CLC
    C0/A574: ADC #$0007
    C0/A577: STA $0343
    C0/A57A: SEP #$30
    C0/A57C: LDA #$01
    C0/A57E: STA $0345
    C0/A581: LDA $70
    C0/A583: BPL $A589
    C0/A585: JSR $80A34F
    C0/A589: PLB
    C0/A58A: PLP
    C0/A58B: RTL
    C0/807C: PHP
    C0/807D: SEP #$10
    C0/807F: REP #$20
    C0/8081: LDA #$0400
    C0/8084: STA $4300
    C0/8087: LDA #$1C00
    C0/808A: STA $4302
    C0/808D: LDX #$00
    C0/808F: STX $4304
    C0/8092: LDA #$0220
    C0/8095: STA $4305
    C0/8098: STZ $2102
    C0/809B: LDA #$2200
    C0/809E: STA $4310
    C0/80A1: LDA #$0100
    C0/80A4: STA $4312
    C0/80A7: LDX #$00
    C0/80A9: STX $4314
    C0/80AC: LDA #$0200
    C0/80AF: STA $4315
    C0/80B2: LDX #$00
    C0/80B4: STX $2121
    C0/80B7: LDX #$03
    C0/80B9: STX $420B
    C0/80BC: LDA $72
    C0/80BE: STA $2102
    C0/80C1: PLP
    C0/80C2: RTL
    C0/A328: PHB
    C0/A329: PHP
    C0/A32A: PHK
    C0/A32B: PLB
    C0/A32C: SEP #$20
    C0/A32E: LDA $0341
    C0/A331: STA $420B
    C0/A334: STZ $0341
    C0/A337: LDA $B6
    C0/A339: ORA $0342
    C0/A33C: STA $B6
    C0/A33E: JSR $82C198
    C0/A342: LDA $B6
    C0/A344: STA $420C
    C0/A347: STZ $B6
    C0/A349: STZ $0342
    C0/A34C: PLP
    C0/A34D: PLB
    C0/A34E: RTL
    C0/80C3: PHP
    C0/80C4: PHB
    C0/80C5: PHK
    C0/80C6: PLB
    C0/80C7: SEP #$20
    C0/80C9: LDA $70
    C0/80CB: STA $2100
    C0/80CE: LDA $71
    C0/80D0: STA $2101
    C0/80D3: LDA $74
    C0/80D5: STA $2105
    C0/80D8: LDA $75
    C0/80DA: STA $2106
    C0/80DD: LDA $76
    C0/80DF: STA $2107
    C0/80E2: LDA $77
    C0/80E4: STA $2108
    C0/80E7: LDA $78
    C0/80E9: STA $2109
    C0/80EC: LDA $79
    C0/80EE: STA $210A
    C0/80F1: LDA $7A
    C0/80F3: STA $210B
    C0/80F6: LDA $7B
    C0/80F8: STA $210C
    C0/80FB: LDA $7D
    C0/80FD: STA $2123
    C0/8100: LDA $7E
    C0/8102: STA $2124
    C0/8105: LDA $8F
    C0/8107: STA $2125
    C0/810A: LDA $90
    C0/810C: STA $2126
    C0/810F: LDA $91
    C0/8111: STA $2127
    C0/8114: LDA $92
    C0/8116: STA $2128
    C0/8119: LDA $93
    C0/811B: STA $2129
    C0/811E: LDA $94
    C0/8120: STA $212A
    C0/8123: LDA $95
    C0/8125: STA $212B
    C0/8128: LDA $96
    C0/812A: STA $212C
    C0/812D: LDA $98
    C0/812F: STA $212E
    C0/8132: LDA $97
    C0/8134: STA $212D
    C0/8137: LDA $99
    C0/8139: STA $212F
    C0/813C: LDA $9A
    C0/813E: STA $2130
    C0/8141: LDA $9B
    C0/8143: STA $2131
    C0/8146: LDA $9D
    C0/8148: STA $2132
    C0/814B: LDA $9E
    C0/814D: STA $2132
    C0/8150: LDA $9F
    C0/8152: STA $2132
    C0/8155: LDA $A0
    C0/8157: STA $2133
    C0/815A: LDA $7F
    C0/815C: STA $210D
    C0/815F: LDA $80
    C0/8161: STA $210D
    C0/8164: LDA $81
    C0/8166: SEC
    C0/8167: SBC #$01
    C0/8169: STA $210E
    C0/816C: LDA $82
    C0/816E: SBC #$00
    C0/8170: STA $210E
    C0/8173: LDA $83
    C0/8175: STA $210F
    C0/8178: LDA $84
    C0/817A: STA $210F
    C0/817D: LDA $85
    C0/817F: SEC
    C0/8180: SBC #$01
    C0/8182: STA $2110
    C0/8185: LDA $86
    C0/8187: SBC #$00
    C0/8189: STA $2110
    C0/818C: LDA $87
    C0/818E: STA $2111
    C0/8191: LDA $88
    C0/8193: STA $2111
    C0/8196: LDA $89
    C0/8198: SEC
    C0/8199: SBC #$01
    C0/819B: STA $2112
    C0/819E: LDA $8A
    C0/81A0: SBC #$00
    C0/81A2: STA $2112
    C0/81A5: PLB
    C0/81A6: PLP
    C0/81A7: RTL
    C0/90A2: PHP
    C0/90A3: PHB
    C0/90A4: PHK
    C0/90A5: PLB
    C0/90A6: SEP #$10
    C0/90A8: REP #$20
    C0/90AA: LDY $04F4
    C0/90AD: BNE $9121
    C0/90AF: LDX $2141
    C0/90B2: CPX $2141
    C0/90B5: BNE $90AF
    C0/90B7: STX $0506
    C0/90BA: LDX $2140
    C0/90BD: CPX $2140
    C0/90C0: BNE $90BA
    C0/90C2: CPX $04D6
    C0/90C5: BNE $90E2
    C0/90C7: LDA $04D8
    C0/90CA: STA $04D6
    C0/90CD: LDA $04DA
    C0/90D0: STA $04D8
    C0/90D3: LDA $04DC
    C0/90D6: STA $04DA
    C0/90D9: LDA $04DE
    C0/90DC: STA $04DC
    C0/90DF: STZ $04DE
    C0/90E2: LDA $04D6
    C0/90E5: STA $2140
    C0/90E8: LDX $2143
    C0/90EB: CPX $2143
    C0/90EE: BNE $90E8
    C0/90F0: STX $04F6
    C0/90F3: LDX $2142
    C0/90F6: CPX $2142
    C0/90F9: BNE $90F3
    C0/90FB: CPX $04E0
    C0/90FE: BNE $911B
    C0/9100: LDA $04E2
    C0/9103: STA $04E0
    C0/9106: LDA $04E4
    C0/9109: STA $04E2
    C0/910C: LDA $04E6
    C0/910F: STA $04E4
    C0/9112: LDA $04E8
    C0/9115: STA $04E6
    C0/9118: STZ $04E8
    C0/911B: LDA $04E0
    C0/911E: STA $2142
    C0/9121: PLB
    C0/9122: PLP
    C0/9123: RTL
    2nd D7
    C0/9D4F: JSR $80A6C3
    C0/9D53: JSR $80A5E9
    C0/9D57: JSR $809903
    C0/9D5B: RTS
    C0/A6C3: PHP
    C0/A6C4: LDA $E4
    C0/A6C6: AND #$EFFF
    C0/A6C9: EOR #$2030
    C0/A6CC: BNE $A6F7
    C0/A6CE: LDA $E8
    C0/A6D0: BIT #$1000
    C0/A6D3: BEQ $A6F7
    C0/A6D5: SEP #$20
    C0/A6D7: LDA #$80
    C0/A6D9: STA $2100
    C0/A6DC: LDA #$01
    C0/A6DE: STA $4200
    C0/A6E1: STA $B1
    C0/A6E3: STZ $0341
    C0/A6E6: STZ $0342
    C0/A6E9: STZ $B6
    C0/A6EB: STZ $0345
    C0/A6EE: REP #$20
    C0/A6F0: STZ $0343
    C0/A6F3: JMP $808ECC
    C0/A6F7: PLP
    C0/A6F8: RTL
    C0/8ECC: REP #$30
    C0/8ECE: LDX #$1FF7
    C0/8ED1: TXS
    C0/8ED2: SEP #$20
    C0/8ED4: LDA #$80
    C0/8ED6: STA $2100
    C0/8ED9: STZ $4200
    C0/8EDC: STZ $420B
    C0/8EDF: STZ $420C
    C0/8EE2: REP #$30
    C0/8EE4: JMP $808E2D
    C0/A5E9: PHB
    C0/A5EA: PHP
    C0/A5EB: PHK
    C0/A5EC: PLB
    C0/A5ED: SEP #$20
    C0/A5EF: REP #$10
    C0/A5F1: LDA $0448
    C0/A5F4: BEQ $A634
    C0/A5F6: REP #$20
    C0/A5F8: STZ $0446
    C0/A5FB: LDY #$0000
    C0/A5FE: CPY #$0020
    C0/A601: BCC $A605
    C0/A603: BRA $A603
    C0/A605: LDA $0449,Y
    C0/A608: ORA $044A,Y
    C0/A60B: BEQ $A62E
    C0/A60D: LDA $0449,Y
    C0/A610: STA $C8
    C0/A612: LDA $044A,Y
    C0/A615: STA $C9
    C0/A617: LDA $044C,Y
    C0/A61A: STA $CB
    C0/A61C: LDA $044D,Y
    C0/A61F: STA $CC
    C0/A621: PHY
    C0/A622: JSR $80AA02
    C0/A626: PLA
    C0/A627: CLC
    C0/A628: ADC #$0006
    C0/A62B: TAY
    C0/A62C: BRA $A5FE
    C0/A62E: STZ $0448
    C0/A631: STZ $0449
    C0/A634: PLP
    C0/A635: PLB
    C0/A636: RTL
    C0/AA02: PHP
    C0/AA03: PHB
    C0/AA04: REP #$30
    C0/AA06: LDY $C8
    C0/AA08: BMI $AA1B
    C0/AA0A: TYA
    C0/AA0B: CLC
    C0/AA0C: ADC #$8000
    C0/AA0F: TAY
    C0/AA10: LDA #$8000
    C0/AA13: STA $C8
    C0/AA15: SEP #$20
    C0/AA17: DEC $CA
    C0/AA19: BRA $AA1F
    C0/AA1B: STZ $C8
    C0/AA1D: SEP #$20
    C0/AA1F: STZ $D2
    C0/AA21: STZ $D1
    C0/AA23: LDA $CD
    C0/AA25: PHA
    C0/AA26: PLB
    C0/AA27: LDX $CB
    C0/AA29: JMP $80ABCA
    C0/AA2D: DEC A
    C0/AA2E: STA $D1
    C0/AA30: BNE $AA38
    C0/AA32: LDA $D0
    C0/AA34: STA $CA
    C0/AA36: LDY $CE
    C0/AA38: RTS
    C0/ABCA: LDA [$C8],Y
    C0/ABCC: INY
    C0/ABCD: BNE $ABD2
    C0/ABCF: JSR $AA39
    C0/ABD2: PHA
    C0/ABD3: LDA $D1
    C0/ABD5: BEQ $ABDF
    C0/ABD7: DEC A
    C0/ABD8: STA $D1
    C0/ABDA: BNE $ABDF
    C0/ABDC: JSR $AA32
    C0/ABDF: PLA
    C0/ABE0: ASL A
    C0/ABE1: BCC $ABAE
    C0/ABE3: BMI $AC1A
    C0/ABE5: LSR A
    C0/ABE6: PHA
    C0/ABE7: LSR A
    C0/ABE8: LSR A
    C0/ABE9: INC A
    C0/ABEA: STA $CD
    C0/ABEC: PLA
    C0/ABED: AND #$03
    C0/ABEF: XBA
    C0/ABF0: LDA [$C8],Y
    C0/ABF2: INY
    C0/ABF3: BNE $ABF8
    C0/ABF5: JSR $AA39
    C0/ABF8: PHY
    C0/ABF9: REP #$20
    C0/ABFB: STA $CB
    C0/ABFD: TXA
    C0/ABFE: SEC
    C0/ABFF: SBC $CB
    C0/AC01: TAY
    C0/AC02: SEP #$20
    C0/AC04: LDA $0000,Y
    C0/AC07: STA $0000,X
    C0/AC0A: INY
    C0/AC0B: INX
    C0/AC0C: DEC $CD
    C0/AC0E: BPL $AC04
    C0/AC10: PLY
    C0/AC11: LDA $D1
    C0/AC13: BEQ $ABCA
    C0/AC15: JSR $AA2D
    C0/AC18: BRA $ABCA
    C0/AC1A: ROR A
    C0/AC1B: CMP #$E0
    C0/AC1D: BCS $AC44
    C0/AC1F: AND #$1F
    C0/AC21: XBA
    C0/AC22: LDA [$C8],Y
    C0/AC24: INY
    C0/AC25: BNE $AC2A
    C0/AC27: JSR $AA39
    C0/AC2A: PHA
    C0/AC2B: LDA $D1
    C0/AC2D: BEQ $AC37
    C0/AC2F: DEC A
    C0/AC30: STA $D1
    C0/AC32: BNE $AC37
    C0/AC34: JSR $AA32
    C0/AC37: PLA
    C0/AC38: REP #$20
    C0/AC3A: ASL A
    C0/AC3B: SEP #$20
    C0/AC3D: LSR A
    C0/AC3E: XBA
    C0/AC3F: INC A
    C0/AC40: STA $CD
    C0/AC42: BRA $ABF0
    C0/AC44: CMP #$F0
    C0/AC46: BCS $AC86
    C0/AC48: AND #$0F
    C0/AC4A: STA $CC
    C0/AC4C: LDA [$C8],Y
    C0/AC4E: INY
    C0/AC4F: BNE $AC54
    C0/AC51: JSR $AA39
    C0/AC54: STA $CB
    C0/AC56: LDA $D1
    C0/AC58: BEQ $AC5D
    C0/AC5A: JSR $AA2D
    C0/AC5D: LDA [$C8],Y
    C0/AC5F: INY
    C0/AC60: BNE $AC65
    C0/AC62: JSR $AA39
    C0/AC65: PHY
    C0/AC66: PHA
    C0/AC67: PHA
    C0/AC68: REP #$20
    C0/AC6A: LDA $CB
    C0/AC6C: CLC
    C0/AC6D: ADC #$0003
    C0/AC70: LSR A
    C0/AC71: TAY
    C0/AC72: PLA
    C0/AC73: STA $0000,X
    C0/AC76: INX
    C0/AC77: INX
    C0/AC78: DEY
    C0/AC79: BNE $AC73
    C0/AC7B: SEP #$20
    C0/AC7D: BCC $AC83
    C0/AC7F: STA $0000,X
    C0/AC82: INX
    C0/AC83: PLY
    C0/AC84: BRA $AC11
    C0/AC86: CMP #$F8
    C0/AC88: BCS $ACA4
    C0/AC8A: AND #$07
    C0/AC8C: ADC #$02
    C0/AC8E: STA $CD
    C0/AC90: LDA [$C8],Y
    C0/AC92: INY
    C0/AC93: BNE $AC98
    C0/AC95: JSR $AA39
    C0/AC98: STA $0000,X
    C0/AC9B: INX
    C0/AC9C: DEC $CD
    C0/AC9E: BPL $AC98
    C0/ACA0: JMP $80AC11
    C0/ACA4: CMP #$FC
    C0/ACA6: BCS $ACFE
    C0/ACA8: AND #$03
    C0/ACAA: XBA
    C0/ACAB: LDA [$C8],Y
    C0/ACAD: INY
    C0/ACAE: BNE $ACB3
    C0/ACB0: JSR $AA39
    C0/ACB3: REP #$20
    C0/ACB5: ASL A
    C0/ACB6: ASL A
    C0/ACB7: ASL A
    C0/ACB8: SEP #$20
    C0/ACBA: LSR A
    C0/ACBB: LSR A
    C0/ACBC: LSR A
    C0/ACBD: XBA
    C0/ACBE: PHA
    C0/ACBF: LDA [$C8],Y
    C0/ACC1: INY
    C0/ACC2: BNE $ACC7
    C0/ACC4: JSR $AA39
    C0/ACC7: REP #$20
    C0/ACC9: CLC
    C0/ACCA: ADC #$0003
    C0/ACCD: STY $CE
    C0/ACCF: STA $CB
    C0/ACD1: SEP #$20
    C0/ACD3: LDA $CA
    C0/ACD5: STA $D0
    C0/ACD7: LDA $D2
    C0/ACD9: REP #$20
    C0/ACDB: BEQ $ACE5
    C0/ACDD: TYA
    C0/ACDE: SEC
    C0/ACDF: SBC $CB
    C0/ACE1: BCS $ACF1
    C0/ACE3: BRA $ACEF
    C0/ACE5: TYA
    C0/ACE6: SEC
    C0/ACE7: SBC $CB
    C0/ACE9: BMI $ACF1
    C0/ACEB: CLC
    C0/ACEC: ADC #$8000
    C0/ACEF: DEC $CA
    C0/ACF1: TAY
    C0/ACF2: SEP #$20
    C0/ACF4: PLA
    C0/ACF5: CLC
    C0/ACF6: ADC #$03
    C0/ACF8: STA $D1
    C0/ACFA: JMP $80ABCA
    C0/ACFE: CMP #$FE
    C0/AD00: BCS $AD21
    C0/AD02: AND #$01
    C0/AD04: XBA
    C0/AD05: LDA [$C8],Y
    C0/AD07: INY
    C0/AD08: BNE $AD0D
    C0/AD0A: JSR $AA39
    C0/AD0D: REP #$20
    C0/AD0F: ASL A
    C0/AD10: ASL A
    C0/AD11: SEP #$20
    C0/AD13: XBA
    C0/AD14: PHA
    C0/AD15: XBA
    C0/AD16: LSR A
    C0/AD17: LSR A
    C0/AD18: REP #$20
    C0/AD1A: AND #$003F
    C0/AD1D: INC A
    C0/AD1E: INC A
    C0/AD1F: BRA $ACCD
    C0/AD21: PLB
    C0/AD22: PLP
    C0/AD23: RTL
    C0/9903: PHP
    C0/9904: PHB
    C0/9905: PHK
    C0/9906: PLB
    C0/9907: SEP #$10
    C0/9909: REP #$20
    C0/990B: LDA $04FA
    C0/990E: BEQ $9930
    C0/9910: LDX $04F4
    C0/9913: BNE $9930
    C0/9915: LDX #$00
    C0/9917: STX $04F5
    C0/991A: LDX $04FC
    C0/991D: STX $04F4
    C0/9920: REP #$10
    C0/9922: LDX $04B8
    C0/9925: STX $58
    C0/9927: STA $57
    C0/9929: JSR $8091B3
    C0/992D: STZ $04FA
    C0/9930: PLB
    C0/9931: PLP
    C0/9932: RTL

    3rd D7
    C0/C0B6: PHP
    C0/C0B7: LDA #$0000
    C0/C0BA: BRA $C0C0
    C0/C0BC: PHP
    C0/C0BD: LDA #$0001
    C0/C0C0: SEP #$20
    C0/C0C2: STA $7FD8B9
    C0/C0C6: REP #$20
    C0/C0C8: SEP #$20
    C0/C0CA: LDA #$80
    C0/C0CC: STA $70
    C0/C0CE: STA $2100
    C0/C0D1: REP #$20
    C0/C0D3: JSR $808231
    C0/C0D7: JSR $95F13C
    C0/C0DB: BCC $C0E7
    C0/C0DD: SEP #$20
    C0/C0DF: LDA #$01
    C0/C0E1: STA $7FD8B9
    C0/C0E5: REP #$20
    C0/C0E7: JSR $828006
    C0/C0EB: JSR $81800A
    C0/C0EF: JSR $82C006
    C0/C0F3: JSR $82E073
    C0/C0F7: JSR $95EE73
    C0/C0FB: JSR $95F0E9
    C0/C0FF: LDA #$9600
    C0/C102: STA $63
    C0/C104: LDA #$80A4
    C0/C107: STA $62
    C0/C109: JSR $82E0C6
    C0/C10D: LDA #$9600
    C0/C110: STA $63
    C0/C112: LDA #$80B3
    C0/C115: STA $62
    C0/C117: JSR $82E0C6
    C0/C11B: JSR $82E08D
    C0/C11F: LDA #$001A
    C0/C122: STA $0302
    C0/C125: LDA #$BFA9
    C0/C128: STA $D3
    C0/C12A: LDA #$C155
    C0/C12D: STA $D7
    C0/C12F: STZ $0300
    C0/C132: JSR $808223
    C0/C136: SEP #$20
    C0/C138: LDA #$80
    C0/C13A: STA $70
    C0/C13C: STA $2100
    C0/C13F: REP #$20
    C0/C141: PLP
    C0/C142: CLI
    C0/C143: RTS

    C0/C144: JSR $80A6C3
    C0/C148: JSR $80A5E9
    C0/C14C: JSR $809903
    C0/C150: JSR $969872
    C0/C154: RTS

    C0/C155: JSR $80A6C3
    C0/C159: JSR $80A5E9
    C0/C15D: JSR $809903
    C0/C161: RTS

    C0/C162: SEP #$20
    C0/C164: LDA #$80
    C0/C166: STA $2100
    C0/C169: REP #$20
    C0/C16B: JSR $8887EC
    C0/C16F: JSR $80A34F
    C0/C173: JSR $80807C
    C0/C177: JSR $80A328
    C0/C17B: JSR $8080C3
    C0/C17F: JSR $8090A2
    C0/C183: JSR $808002
    C0/C187: JSR $80A6F9
    C0/C18B: JSR $808341
    C0/C18F: JSR $809BA9
    C0/C193: JSR $809C7A
    C0/C197: JSR $80826E
    C0/C19B: JSR $878256
    C0/C19F: RTS

    C0/C1A0: PHP
    C0/C1A1: LDA #$7F00
    C0/C1A4: STA $25
    C0/C1A6: LDA #$A500
    C0/C1A9: STA $24
    C0/C1AB: LDA #$5AFF
    C0/C1AE: JSR $82ECB9
    C0/C1B2: INC $0302
    C0/C1B5: STZ $0304
    C0/C1B8: PLP
    C0/C1B9: RTL
     
  4. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044
    [​IMG]

    Main routine
    C0/8ECC: C230 REP #$30
    C0/8ECE: A2F71F LDX #$1FF7
    C0/8ED1: 9A TXS
    C0/8ED2: E220 SEP #$20
    C0/8ED4: A980 LDA #$80
    C0/8ED6: 8D0021 STA $2100
    C0/8ED9: 9C0042 STZ $4200
    C0/8EDC: 9C0B42 STZ $420B
    C0/8EDF: 9C0C42 STZ $420C
    C0/8EE2: C230 REP #$30
    C0/8EE4: 5C2D8E80 JMP $808E2D
    C0/8EE8: C230 REP #$30
    C0/8EEA: 223F8280 JSR $80823F //wait Vblank
    C0/8EEE: C230 REP #$30
    C0/8EF0: F4E78E PEA $8EE7
    C0/8EF3: 6CD700 JMP ($00D7)

    $7E00D7:
    logo:
    9CD6
    9D4F
    intro1:
    C0B6
    C155 (9D4F)
    intro2 (credit):
    B122
    B301
    intro3:
    BFFB
    C144
    intro4:
    B6B6
    9D4F
    intro5:
    B122
    B301
    intro6:
    B6B6
    9D4F
    intro7:
    BFBF
    C144
    intro8:
    B122
    B301
    intro9:
    B122
    B301

    New game gamen:
    F542
    Jugdrall prologue:
    B3A2
    9D4F
    Map 1 title:
    F2BE
    9D4F
    Map1:
    AEEA
    B301
    Map:
    B122
    B301
    Kaiwa:
    B6B6
    9D4F
    Exit kaiwa:
    B122
    B301 (map)
    Menu:
    BBD9
    9D4F
    Battle:
    BFFB
    C144
    Map2 prologue:
    F27C
    9D4F
    B3A2
    9D4F
    Map2 title:
    F2BE
    9D4F
    Map2:
    AEEA
    B301
    B122
    B301

    Intro prepare:
    C0/C0B6: 08 PHP
    C0/C0B7: A90000 LDA #$0000
    C0/C0BA: 8004 BRA $C0C0
    C0/C0BC: 08 PHP
    C0/C0BD: A90100 LDA #$0001 //push start: Logo screen
    C0/C0C0: E220 SEP #$20
    C0/C0C2: 8FB9D87F STA $7FD8B9
    C0/C0C6: C220 REP #$20
    C0/C0C8: E220 SEP #$20
    C0/C0CA: A980 LDA #$80
    C0/C0CC: 8570 STA $70
    C0/C0CE: 8D0021 STA $2100
    C0/C0D1: C220 REP #$20
    C0/C0D3: 22318280 JSR $808231 //disable nmi
    C0/C0D7: 223CF195 JSR $95F13C //check, change music
    C0/C0DB: 900A BCC $C0E7
    C0/C0DD: E220 SEP #$20
    C0/C0DF: A901 LDA #$01
    C0/C0E1: 8FB9D87F STA $7FD8B9
    C0/C0E5: C220 REP #$20
    C0/C0E7: 22068082 JSR $828006 //init EC28~
    C0/C0EB: 220A8081 JSR $81800A //init 1100~
    C0/C0EF: 2206C082 JSR $82C006 //Init Dma channels
    C0/C0F3: 2273E082 JSR $82E073 //Init 168F~
    C0/C0F7: 2273EE95 JSR $95EE73 //Decomp gfx: Fire Emblem background
    C0/C0FB: 22E9F095 JSR $95F0E9 //Init ram
    C0/C0FF: A90096 LDA #$9600
    C0/C102: 8563 STA $63
    C0/C104: A9A480 LDA #$80A4
    C0/C107: 8562 STA $62
    C0/C109: 22C6E082 JSR $82E0C6 //cmp 1695
    C0/C10D: A90096 LDA #$9600
    C0/C110: 8563 STA $63
    C0/C112: A9B380 LDA #$80B3
    C0/C115: 8562 STA $62
    C0/C117: 22C6E082 JSR $82E0C6 //check 1695 =7
    C0/C11B: 228DE082 JSR $82E08D //write next irq, irq pos
    C0/C11F: A91A00 LDA #$001A
    C0/C122: 8D0203 STA $0302 //nmi submode
    C0/C125: A9A9BF LDA #$BFA9
    C0/C128: 85D3 STA $D3 //nmi
    C0/C12A: A955C1 LDA #$C155
    C0/C12D: 85D7 STA $D7 //4th main routine: intro
    C0/C12F: 9C0003 STZ $0300
    C0/C132: 22238280 JSR $808223 //enable nmi
    C0/C136: E220 SEP #$20
    C0/C138: A980 LDA #$80
    C0/C13A: 8570 STA $70
    C0/C13C: 8D0021 STA $2100
    C0/C13F: C220 REP #$20
    C0/C141: 28 PLP
    C0/C142: 58 CLI
    C0/C143: 60 RTS


    ***Decomp gfx: Fire Emblem background***
    BG1 tilemap
    D5/EE73: E220 SEP #$20
    D5/EE75: C210 REP #$10
    D5/EE77: A20E5B LDX #$5B0E //BG1 tilemap adr
    D5/EE7A: 86C8 STX $C8
    D5/EE7C: A9F5 LDA #$F5
    D5/EE7E: 85CA STA $CA
    D5/EE80: A20000 LDX #$0000 //decomp adr
    D5/EE83: 86CB STX $CB
    D5/EE85: A97F LDA #$7F
    D5/EE87: 85CD STA $CD
    D5/EE89: C230 REP #$30
    D5/EE8B: 2202AA80 JSR $80AA02 //decomp
    D5/EE8F: E220 SEP #$20
    D5/EE91: C210 REP #$10
    D5/EE93: A2EEE9 LDX #$E9EE //BG1 cloud tile
    D5/EE96: 86C8 STX $C8
    D5/EE98: A994 LDA #$94
    D5/EE9A: 85CA STA $CA
    D5/EE9C: A20040 LDX #$4000
    D5/EE9F: 86CB STX $CB
    D5/EEA1: A97F LDA #$7F
    D5/EEA3: 85CD STA $CD
    D5/EEA5: C230 REP #$30
    D5/EEA7: 2202AA80 JSR $80AA02
    D5/EEAB: E220 SEP #$20
    D5/EEAD: C210 REP #$10
    D5/EEAF: A29975 LDX #$7599 //tilemap
    D5/EEB2: 86C8 STX $C8
    D5/EEB4: A9F5 LDA #$F5
    D5/EEB6: 85CA STA $CA
    D5/EEB8: A20060 LDX #$6000
    D5/EEBB: 86CB STX $CB
    D5/EEBD: A97F LDA #$7F
    D5/EEBF: 85CD STA $CD
    D5/EEC1: C230 REP #$30
    D5/EEC3: 2202AA80 JSR $80AA02
    D5/EEC7: E220 SEP #$20
    D5/EEC9: C210 REP #$10
    D5/EECB: A27A59 LDX #$597A //tilemap
    D5/EECE: 86C8 STX $C8
    D5/EED0: A9F5 LDA #$F5
    D5/EED2: 85CA STA $CA
    D5/EED4: A20068 LDX #$6800
    D5/EED7: 86CB STX $CB
    D5/EED9: A97F LDA #$7F
    D5/EEDB: 85CD STA $CD
    D5/EEDD: C230 REP #$30
    D5/EEDF: 2202AA80 JSR $80AA02
    D5/EEE3: A20000 LDX #$0000
    D5/EEE6: BF00607F LDA $7F6000,X //copy tilemap
    D5/EEEA: 9F00787F STA $7F7800,X
    D5/EEEE: E8 INX
    D5/EEEF: E8 INX
    D5/EEF0: E00008 CPX #$0800
    D5/EEF3: 90F1 BCC $EEE6
    D5/EEF5: AF00607F LDA $7F6000
    D5/EEF9: 8FFA7B7F STA $7F7BFA
    D5/EEFD: 8FFC7B7F STA $7F7BFC
    D5/EF01: A20000 LDX #$0000
    D5/EF04: 9F807D7F STA $7F7D80,X
    D5/EF08: E8 INX
    D5/EF09: E8 INX
    D5/EF0A: E0C000 CPX #$00C0
    D5/EF0D: 90F5 BCC $EF04
    D5/EF0F: A20000 LDX #$0000
    D5/EF12: 9FA07E7F STA $7F7EA0,X
    D5/EF16: E8 INX
    D5/EF17: E8 INX
    D5/EF18: E01A00 CPX #$001A
    D5/EF1B: 90F5 BCC $EF12
    D5/EF1D: E220 SEP #$20
    D5/EF1F: C210 REP #$10
    D5/EF21: A2A1BF LDX #$BFA1
    D5/EF24: 86C8 STX $C8
    D5/EF26: A99C LDA #$9C
    D5/EF28: 85CA STA $CA
    D5/EF2A: A2888B LDX #$8B88
    D5/EF2D: 86CB STX $CB
    D5/EF2F: A97E LDA #$7E
    D5/EF31: 85CD STA $CD
    D5/EF33: C230 REP #$30
    D5/EF35: 2202AA80 JSR $80AA02
    D5/EF39: A20000 LDX #$0000
    D5/EF3C: BF2A8C7E LDA $7E8C2A,X
    D5/EF40: 9F00677F STA $7F6700,X
    D5/EF44: BF4A8C7E LDA $7E8C4A,X
    D5/EF48: 9F20677F STA $7F6720,X
    D5/EF4C: E8 INX
    D5/EF4D: E8 INX
    D5/EF4E: E01E00 CPX #$001E
    D5/EF51: 90E9 BCC $EF3C
    D5/EF53: 6B RTL

    ***Write PPU indirect***
    D5/F0E9: E220 SEP #$20
    D5/F0EB: A911 LDA #$11
    D5/F0ED: 8596 STA $96 //enable BG1, OAM main screen
    D5/F0EF: A900 LDA #$00
    D5/F0F1: 8597 STA $97 //disable sub screen
    D5/F0F3: A900 LDA #$00
    D5/F0F5: 8598 STA $98 //disable mask main screen
    D5/F0F7: A900 LDA #$00
    D5/F0F9: 8599 STA $99 //disable mask sub screen
    D5/F0FB: A904 LDA #$04
    D5/F0FD: 857A STA $7A //BG1, BG2 tile vram adr
    D5/F0FF: A903 LDA #$03
    D5/F101: 8571 STA $71 //Oam size 8x8
    D5/F103: A909 LDA #$09
    D5/F105: 8574 STA $74 //Mode 1, BG3 priority
    D5/F107: A900 LDA #$00
    D5/F109: 8575 STA $75 //no pixelation
    D5/F10B: A968 LDA #$68
    D5/F10D: 8576 STA $76 //BG1 tilemap adr
    D5/F10F: A96C LDA #$6C
    D5/F111: 8577 STA $77 //BG2 tilemap adr
    D5/F113: C220 REP #$20
    D5/F115: A90000 LDA #$0000
    D5/F118: 857F STA $7F //BG1 h-scroll
    D5/F11A: A90000 LDA #$0000
    D5/F11D: 8581 STA $81 //BG1 v-scroll
    D5/F11F: A90000 LDA #$0000
    D5/F122: 8583 STA $83 //BG2 h-scroll
    D5/F124: A90000 LDA #$0000
    D5/F127: 8585 STA $85 //BG2 v-scroll
    D5/F129: 6B RTL

    Main Nmi
    $7E00D3
    Nintendo logo:
    9CA0
    AE25
    Intro1:
    BFA9
    Intro2:
    AE68
    Intro3:
    BF40
    Intro4:
    B641
    Intro5:
    AE68
    Intro7:
    B641
    Intro8:
    BF40
    Intro9:
    AE68
    New game gamen:
    F560
    Map prologue:
    B347
    Map title:
    BB9B
    Map:
    AE68
    Kaiwa:
    B641
    Menu:
    BB9B
    Battle:
    BF40

    C0/C155: 22C3A680 JSR $80A6C3 //Check restart
    C0/C159: 22E9A580 JSR $80A5E9 //check decmp
    C0/C15D: 22039980 JSR $809903 //stream song?
    C0/C161: 60 RTS

    ***Intro 1 nmi***
    C0/BFA9: 08 PHP
    C0/BFAA: E220 SEP #$20
    C0/BFAC: A980 LDA #$80
    C0/BFAE: 8D0021 STA $2100
    C0/BFB1: C220 REP #$20
    C0/BFB3: 2268C395 JSR $95C368 //Nmi dma
    C0/BFB7: 22DBD596 JSR $96D5DB
    C0/BFBB: 22B1EA9B JSR $9BEAB1 //Jump [$24]
    C0/BFBF: 224FA380 JSR $80A34F //Init ram
    C0/BFC3: 227C8080 JSR $80807C //dma oam, color
    C0/BFC7: 2228A380 JSR $80A328 //choose hdma channel
    C0/BFCB: 22C38080 JSR $8080C3 //write ppu
    C0/BFCF: 22A29080 JSR $8090A2 //check sound
    C0/BFD3: 22028080 JSR $808002 //read pad
    C0/BFD7: 2247E182 JSR $82E147 //write irq pos
    C0/BFDB: 22418380 JSR $808341 //Init Wram $1E00~$1E1F (2nd OAM table)
    C0/BFDF: E220 SEP #$20
    C0/BFE1: A900 LDA #$00
    C0/BFE3: 8FCFE17F STA $7FE1CF
    C0/BFE7: C220 REP #$20
    C0/BFE9: 22A99B80 JSR $809BA9 //JML [$24]
    C0/BFED: 227A9C80 JSR $809C7A //JML [$0306]
    C0/BFF1: 226E8280 JSR $80826E //Init Oam table
    C0/BFF5: 22CD9580 JSR $8095CD
    C0/BFF9: 28 PLP
    C0/BFFA: 60 RTS
     
  5. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044

    **** Màn hình Opening ****
    **** Màn hình Opening ****
    Giai đoạn chuẩn bị
    Force blank
    $80C0B6
    LDA #$0000
    STA $7FD8B9 //00 = màn hình opening, 01=màn hình Titile
    Force blank
    Disable Nmi
    Check music //music changed $7FD8B9 =1
    STZ $0EC8 ~ $10F6
    STZ $1100 ~ $111E
    STZ $1260 ~ $12BE
    STZ $10F7, STZ $15E0, STZ $15E2
    $15E4 = 8087C7
    STZ $15E7 ~ $168D
    Dma channel $4300 ~ $4370 = 00
    $4301 ~ $4371 = 13 : BG4 h-scroll
    STZ $168F ~ $1719
    $B1 AND #$CF: disable nmi
    $168F SET 8000
    $D5 = 8222 : Irq $8222
    Decompress $F55B0E to $7F0000
    Decompress $94E9EE to $7F4000
    Decompress $F57599 to $7F6000 : tilemap
    Decompress $F5597A to $7F6800
    Copy tilemap $7F600 to $7F800
    Copy 2 bytes from $7F6000 to $7F7BFA, $7F7BFC
    STZ $7F7D80 ~ $7F7E40
    STZ $7F7EA0 ~ $7F7EBA
    Decompress $9CBFA1 to $7E8B88
    Copy $7E8C2A ~ $7E8C48 to $7F6700 ~ $7F671E
    Copy $7E8C4A ~ $7E8C68 to $7F6720 ~ $7F673E
    $96 = 11: enable BG1, Oam in main screen
    $97 = 00: disable sub screen
    $98 = 00: disable mask main screen
    $99 = 00: disable mask sub screen
    $7A = 04: BG1, BG2 tile vram
    $71 = 03: oam size 8x8
    $74 = 01: mode 1
    $75 = 00: no mosaic
    $76 = 68: BG1 tilemap vram
    $77 = 6C: BG2 tilemap vram
    $7F = 00: BG1 h-scroll
    $81 = 00: BG1 v-scroll
    $83 = 00: BG2 h-scroll
    $85 = 00: BG2 v-scroll
    $62 = 9680A4
    If $1695 < 7 then write adr $62 to $169A,x write bank $64 to $16AA,x
    with x = 1695 x 2
    STZ $16BA,x
    Write $62 value to $16CA,x : irq h-pos
    Write $62+2 value to $16DA,x : irq v-pos
    Write $62+4 value to $16EA,x
    Write $62+6 value to $16FA,x
    $170A = 01
    INC $1695
    $62 = 9680B3
    STZ $16BA,x
    Write $62 value to $16CA,x
    Write $62+2 value to $16DA,x
    Write $62+4 value to $16EA,x
    Write $62+6 value to $16FA,x
    $170C = 01
    INC $1695
    $B1 ORA 30: enable h-irq, v-irq
    $168F set 8000
    If $1695 >< $1693 then $1693 = $1695, JSL $82E177 irq cal
    $D5 = AE63: irq
    $0302 = 001A: nmi sub-mode
    $D3 = BFA9: nmi
    $D7 = C155: main mode
    STZ $0300
    Enable nmi
    Force blank
    Wait nmi
    *** Nmi ***
    $D9 = 0 then
    $D9 = 8000: minus
    JMP $D3: 80BFA9
    Force blank
    No Nmi dma
    $7FED5C = 0 then return
    X=0
    $7FD8A5,x = 0 then x=x+3, repeat until x =6
    If $7FD8A5 ><0 then JSR $9BEAC6: copy $7FD8A5,x to $24, JMP [$24]
    //first nmi: $7FD8A5,x = 0
    //$7FD8AB = text h-pos
    $0345 = 0 then STZ $0346, return
    If $0345 ><0 then STZ $0345, disable DMA, disable H-DMA, STZ $0343
    Y= 0, Y < 100 then LDA $0346,y ASL TAX JMP ($A37D,x)
    $A37D: A387, $A38F, $A3CE, $A41B, $A46E
    DMA oam, color
    LDA $0341 STA $420B STZ $0341
    hdma channel $B6 = $B6 ORA $0342
    $B6 to $00, X=0E, Y=70
    ASL $00 BCC then Y = Y -10, X=X-2 repeat
    BCS then $165F,x to $4302,y
    $1660,x to $4303,y
    $166F,x to $4304,y
    $1670,x to $4301,y
    $167F,x to $4300,y
    $1680,x to $4307,y
    Y = Y -10, X = X -2 repeat
    $B6 to $420C
    STZ $B6
    STZ $0342
    Write PPU
    Check sound
    Read pad
    If $1695 >< $1693 then $1693 = $1695, JSL $82E177 write irq pos
    If $1693 = 0 then $1697 = 0 $1698 = 0
    $1693 >< 0 then Dec ASL STA $1691 TAX JSL $82E283: write irq pos
    STZ $1E00 ~ $1E1E: Oam 2nd table
    $7FE1CF = 0
    $0302 x 3 TAX
    LDA $809B01,x to $24
    If bank >< 7D then JMP [$24]
    If bank = 7D then $809B01,x to $0302 JML $809BDB
    $0302 = 1A JMP [$24] = 9BDC24
    ***9BDC24***
    Force blank
    STZ $0EC8 ~ $10F6
    ----IRQ----
    JMP ($D5) = 80AE63
    $168F Bit 8000 ><0 then return
    Bit 8000 = 0 then
    LDA $1697 ORA $1698 = 0 then return
    ><0 then X= $1691 JSL $82E2DA
    -82E2DA-
    DB = $1699
    JML [$1697]: 9680AC : draw black bar
    -9BEEB4-
    $7FD075 = 0 then no black bar, $7FD075 >< 0 then black bar
    (=0: If in H-blank: force blank, If not in H-blank then wait H-blank
    *** Black bar blur effect ***
    Wait H-blank, wait H-blank, $2100 = 0
    Wait H-blank, wait H-blank, $7FD8B4 to $2100
    Wait H-blank, Wait H-blank, $7FD8B2 to $2100
    Wait H-blank, Wait H-blank, $7FD8B1 to $2100
    Wait H-blank, Wait H-blank, $7FD8B0 to $2100
    Wait H-blank, Wait H-blank, $7FD8AF to $2100
    Wait H-blank, Wait H-blank, $7FD8AE to $2100
    Wait H-blank, Wait H-blank, $7FD8AD to $2100
    Wait H-blank, Wait H-blank, $70 to $2100: max bright)
    X = $1691
    DEC $170A,x ($170C) >< 0 then return
    Y = $16FA,x
    loop:
    A= $0000,y
    If A Plus then STA $170A,x
    $0002,y to $16DA,x A = Y + 4 STA $16FA,x
    If A Minus then STA $1697
    INY INY JMP ($1697) loop
    -($1697) = 82E028-
    DEY DEY A= Y STA $16FA,x return no loop
    X=$1691 if = 0 then X = $1693 x 2 - 2 = $1691 JSL $82E283
    if $1691 >< 0 then X-2 = $1691 JSL $82E283: write Irq pos
    ----End Irq----
    $7FD001= 0: timer
    $7FD002 = 97EC63: intro scene
    STZ $7FD006 ~ $7FD042
    STZ $15E7 ~ $168D
    STZ $4370 ~ $4300
    STZ $4377 ~ $4307
    STZ $4372 ~ $4302
    STZ $4373 ~ $4303
    STZ $4374 ~ $4304
    $4301 ~ $4371 = 13
    $7FD08B = 0
    $7FD08C = 97F19B: text parameter string: comp adr, decomp adr, vram, size, map....
    STZ $7FECF4
    STZ $7FD8AB
    STZ $7FD8BA
    $9D ~ $9F = E0
    $24 = 95EA91
    Y = 00
    LDA [$24],y if = FFFF then return
    String: 95EA91
    dw X value
    Y = Y +2
    PHA
    AND #$3FFF TAX
    PLA
    AND #$C000
    if = 0 then SEP #$20 LDA [$24],y to $00,x loop
    if = 4000 then LDA [$24],y to $00,x Y = Y +2 loop
    if = 8000 then SEP #$20 LDA $00,x AND [$24],y Y = Y+1 ORA [$24],y STA $00,x REP #$20 INY loop
    If other then AND [$24],y Y=Y+2 ORA [$24],y STA $00,x Y= Y+2 loop
    $7F, $83, $85 =00
    $7FD073= 80 main text brightness blank
    STZ $7E8B88 ~ $7E8CC6
    JSL $80A4BD
    DB = $05,s : bank is bank of previous routine
    X= $03,s: adr is adr of previous routine next adr
    Y = $0343
    SEP #$20
    LDA $0001,x: load value at previous routine next adr
    INX
    STA $0346,y
    DEC if = 0 then JMP $80A552
    until 0
    string: db times, dl DMA source, dw size, db DMA type, dw Vram adr
    ($0001,x to $0347,y $0003,x to $0349,y $0005,x to $034B,y $0007,x to $034D,y
    A= X+8 to $03,s
    A = Y +9 to $0343
    $0345 = 01
    If Not force blank then return
    If force blank then JSL $80A34F: Dma
    ***DMA***
    If $0345 = 0 then STZ $0346, return
    If ><0 then STZ $0345
    STZ $420B, STZ $420C
    STZ $0343 ~ $0344
    LDA $0346,y
    AND #$00FF
    ASL
    TAX
    JMP ($A37D,x)
    A37D: dw $A387, dw $A38F, $A3CE, $A41B, $A46E
    A387: STZ $0346, return
    A38F: $0347,y to $4312 $0348,y to $0413 $0349,y to $4314 $034A,y to $4315 $034B,y to $4316 $034C,y to $2121 STZ $4312: DMA pallet
    A3CE: DMA gfx
    A41B: DMA from PPU to CPU
    Decompress $F3426A to $7E8B88
    ***NMI***
    $D9=8000
    INC $DD
    Check sound
    $70 to $2100
    JSL $91EB76
    ***End nmi***
    ***IRQ = 82E250***
    $168F Bit 8000 >< 0 then blank
    else $1697 ORA $1698 if = 0 then return else
    X = $1691 JSL $82E2DA: draw black bar (9680AC)
    $1691=$1691-2 JSL $82E283: write irq
    ***End irq***
    Decompress $F40F1E to $7E8B88
    DMA decomp ($05,s to bank, $03,s to adr)
    Decompress $F468D3 to $7E8B88
    DMA decomp
    Decompress $F47CBD to $7E8B88
    DMA decomp
    $E02299,x to $0162,x loop x=0 ~ x=1E
    $E023B1,x to $0142,x
    $E02787,x to $0102,x
    $7FD074 =8
    STZ $7E9188 ~ $7E9786
    $E024E3,x AND #$001F to $7E8B88,x
    $E024E3,x AND #$03E0 to $7E8D88,x
    $E024E3,x AND #$7C00 XBA to $7E8F88,x
    Loop X = 0 ~ X =184
    $2181 = 8000
    $2183 = 01
    Y = 21 X =0
    $7E8B88,x ADC $7E9188,x to $7E9188,x
    LSR #5
    PHA
    $7E8D88,x ADC $7E9388,x to $7E9388,x
    LSR #5
    AND #$03E0
    ORA $01,s to $01,s
    $7E8F88,x AND $7E9588,x to $7E9588,x
    LSR #5
    XBA AND #$7C00 ORA $01,s
    SEP #$20
    STA $2180
    XBA
    STA $2180
    REP #$20
    PLA
    X = X + 2 loop to X =184
    Y = Y -1 loop to Y = 0
    X = 0
    $7FFD9A,x = 0
    X = X + A loop til X = 64: sound ram
    $7FFDFE = 0
    STZ $7FEC1D
    STZ $7FEC41
    STZ $7FEC2C
    STZ $7FEC50
    $7FEC66 = C0
    STZ $7FEC36
    STZ $7FEC38
    STZ $7FEC5A
    STZ $7FEC5C
    STZ $7FED5C
    STZ $7FED64
    STZ $7FED6E
    STZ $7FED8A
    STZ $7FED5D
    STZ $7FED65
    STZ $7FED63
    STZ $7FED6B
    $7FED6C = 30
    $7FED6D = 7F
    $7FE51B = 00FF
    X =0
    STZ $7FD08F,x
    X = X+62
    loop til X = 04FA
    STZ $7FD8A5
    STZ $7FD8A8
    STZ$7FE09E
    Title screen flag: $7FD8B9 = 0 then JSL $9BFB7E
    else JMP $9BDCA7
    ***$9BFB7E***
    $04EA = AND #$EF
    Music $04BA = 01
    $7FD8BA = AND #$F7
    $809654: check upload music
    STZ $7FD000
    STZ $7FD8B5
    STZ $7FD075
    STZ $7FD8B7
    STZ $7FD8BA
    $7FD8BA = ORA #$08
    STZ $0CC4 : nmi dma
    STZ $0CC7
    INC $0302
    INC $0304
    X = $0300 x 3
    LDA $809B03,x if not 7D then
    DB = LDA $809B03,x = $26
    Adr = $809B01,x = $24
    JML [$24]
    X = 2D
    $0309,x to $0306,x
    $030A,x to $0307,x
    JML [$0306][$82:8143]
    $0EC8 Set 8000
    $0ECA = 1E = X
    $0ED7,x if = 0 then
    $0ECA = DEC #2
     
    Chỉnh sửa cuối: 4/2/22
  6. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044


    Menu main rountine
    C0/BBD9: 08 PHP
    C0/BBDA: E220 SEP #$20
    C0/BBDC: A980 LDA #$80
    C0/BBDE: 8570 STA $70 //force blank
    C0/BBE0: C220 REP #$20
    C0/BBE2: A99BBB LDA #$BB9B
    C0/BBE5: 85D3 STA $D3 //nmi
    C0/BBE7: 223F8280 JSR $80823F //wait v blank
    C0/BBEB: 22318280 JSR $808231 //disable nmi
    C0/BBEF: 225C9D80 JSR $809D5C //init cpu registers
    C0/BBF3: 22A39D80 JSR $809DA3 //init ppu registers
    C0/BBF7: A90000 LDA #$0000
    C0/BBFA: 8502 STA $02
    C0/BBFC: A90000 LDA #$0000
    C0/BBFF: 8504 STA $04
    C0/BC01: A90040 LDA #$4000
    C0/BC04: 8506 STA $06
    C0/BC06: A90060 LDA #$6000
    C0/BC09: 850A STA $0A
    C0/BC0B: A90020 LDA #$2000
    C0/BC0E: 850C STA $0C
    C0/BC10: A90028 LDA #$2800
    C0/BC13: 850E STA $0E
    C0/BC15: A90058 LDA #$5800
    C0/BC18: 8510 STA $10
    C0/BC1A: 22159F80 JSR $809F15 //set BG vram adr
    C0/BC1E: 22949B85 JSR $859B94 //look up $85C652, $85C33F in $0ED7
    C0/BC22: 220A8081 JSR $81800A //init ram
    C0/BC26: 2273E082 JSR $82E073 //init ram, write irq
    C0/BC2A: 2206C082 JSR $82C006 //init dma channel
    C0/BC2E: 2052BC JSR $BC52
    C0/BC31: 2227BD80 JSR $80BD27
    C0/BC35: 2001BF JSR $BF01
    C0/BC38: A90800 LDA #$0008
    C0/BC3B: 8D0203 STA $0302
    C0/BC3E: A90700 LDA #$0007
    C0/BC41: 8D0003 STA $0300
    C0/BC44: 9C0403 STZ $0304
    C0/BC47: A94F9D LDA #$9D4F
    C0/BC4A: 85D7 STA $D7
    C0/BC4C: 22238280 JSR $808223
    C0/BC50: 28 PLP
    C0/BC51: 60 RTS


    C0/9F15: 8B PHB
    C0/9F16: 08 PHP
    C0/9F17: 4B PHK
    C0/9F18: AB PLB
    C0/9F19: E220 SEP #$20
    C0/9F1B: A570 LDA $70
    C0/9F1D: 3004 BMI $9F23 //brightness
    C0/9F1F: 5CAF9F80 JMP $809FAF //end routine
    C0/9F23: A503 LDA $03 //force blank
    C0/9F25: 29F0 AND #$F0
    C0/9F27: 4A LSR A
    C0/9F28: 4A LSR A
    C0/9F29: 4A LSR A
    C0/9F2A: 4A LSR A
    C0/9F2B: 8503 STA $03
    C0/9F2D: A505 LDA $05
    C0/9F2F: 29F0 AND #$F0
    C0/9F31: 0503 ORA $03
    C0/9F33: 8502 STA $02
    C0/9F35: A507 LDA $07
    C0/9F37: 29F0 AND #$F0
    C0/9F39: 4A LSR A
    C0/9F3A: 4A LSR A
    C0/9F3B: 4A LSR A
    C0/9F3C: 4A LSR A
    C0/9F3D: 8507 STA $07
    C0/9F3F: A509 LDA $09
    C0/9F41: 29F0 AND #$F0
    C0/9F43: 0507 ORA $07
    C0/9F45: 8506 STA $06
    C0/9F47: A50B LDA $0B
    C0/9F49: 29E0 AND #$E0
    C0/9F4B: 4A LSR A
    C0/9F4C: 4A LSR A
    C0/9F4D: 4A LSR A
    C0/9F4E: 4A LSR A
    C0/9F4F: 4A LSR A
    C0/9F50: 850A STA $0A
    C0/9F52: A50D LDA $0D
    C0/9F54: 29FC AND #$FC
    C0/9F56: 850C STA $0C
    C0/9F58: A50F LDA $0F
    C0/9F5A: 29FC AND #$FC
    C0/9F5C: 850E STA $0E
    C0/9F5E: A511 LDA $11
    C0/9F60: 29FC AND #$FC
    C0/9F62: 8510 STA $10
    C0/9F64: A513 LDA $13
    C0/9F66: 29FC AND #$FC
    C0/9F68: 8512 STA $12
    C0/9F6A: A576 LDA $76
    C0/9F6C: 2903 AND #$03
    C0/9F6E: 050C ORA $0C
    C0/9F70: 8D0721 STA $2107 //BG1 tilemap vram adr
    C0/9F73: 8576 STA $76
    C0/9F75: A577 LDA $77
    C0/9F77: 2903 AND #$03
    C0/9F79: 050E ORA $0E
    C0/9F7B: 8D0821 STA $2108 //BG2 tilemap vram adr
    C0/9F7E: 8577 STA $77
    C0/9F80: A578 LDA $78
    C0/9F82: 2903 AND #$03
    C0/9F84: 0510 ORA $10
    C0/9F86: 8D0921 STA $2109 //BG3 tilemap vram adr
    C0/9F89: 8578 STA $78
    C0/9F8B: A579 LDA $79
    C0/9F8D: 2903 AND #$03
    C0/9F8F: 0512 ORA $12
    C0/9F91: 8D0A21 STA $210A //BG4 tilemap vram adr
    C0/9F94: 8579 STA $79
    C0/9F96: A571 LDA $71
    C0/9F98: 29F8 AND #$F8
    C0/9F9A: 050A ORA $0A
    C0/9F9C: 8D0121 STA $2101 //Oam size
    C0/9F9F: 8571 STA $71
    C0/9FA1: A502 LDA $02
    C0/9FA3: 8D0B21 STA $210B //BG1,2 tile vram adr
    C0/9FA6: 857A STA $7A
    C0/9FA8: A506 LDA $06
    C0/9FAA: 8D0C21 STA $210C //BG3,4 tile vram adr
    C0/9FAD: 857B STA $7B
    C0/9FAF: 28 PLP
    C0/9FB0: AB PLB
    C0/9FB1: 6B RTL

    C5/9B94: A90085 LDA #$8500
    C5/9B97: 8563 STA $63
    C5/9B99: A952C6 LDA #$C652
    C5/9B9C: 8562 STA $62
    C5/9B9E: 22118182 JSR $828111 //compare $62, $64 with $0ED7,x x=1E~00
    C5/9BA2: 9004 BCC $9BA8 //not equal
    C5/9BA4: 22368182 JSR $828136 //stz $0ED7,x $0F37 ORA #$2000
    C5/9BA8: A90085 LDA #$8500
    C5/9BAB: 8563 STA $63
    C5/9BAD: A93FC3 LDA #$C33F
    C5/9BB0: 8562 STA $62
    C5/9BB2: 22118182 JSR $828111
    C5/9BB6: 9004 BCC $9BBC //not equal
    C5/9BB8: 22368182 JSR $828136
    C5/9BBC: 6B RTL

    C2/8111: 8B PHB
    C2/8112: 08 PHP
    C2/8113: 4B PHK
    C2/8114: AB PLB
    C2/8115: A21E00 LDX #$001E
    C2/8118: C220 REP #$20
    C2/811A: BDD70E LDA $0ED7,X
    C2/811D: C562 CMP $62
    C2/811F: D009 BNE $812A
    C2/8121: E220 SEP #$20
    C2/8123: BDF70E LDA $0EF7,X
    C2/8126: C564 CMP $64
    C2/8128: F008 BEQ $8132
    C2/812A: CA DEX
    C2/812B: CA DEX
    C2/812C: 10EA BPL $8118
    C2/812E: 28 PLP
    C2/812F: AB PLB
    C2/8130: 18 CLC
    C2/8131: 6B RTL

    C2/8132: 28 PLP
    C2/8133: AB PLB
    C2/8134: 38 SEC
    C2/8135: 6B RTL
     
    Chỉnh sửa cuối: 23/2/22
  7. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044
     
    cundaikho and snoopyy like this.
  8. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044
     
    snoopyy thích bài này.
  9. SPC700

    SPC700 Legend of Zelda

    Tham gia ngày:
    1/10/20
    Bài viết:
    1,044
    Nếu ai chơi dòng FE đủ lâu thì sẽ nhận thấy màn hình FE4 có cái viền đen bao quanh mà các bản khác không có.
    Vậy cái viền đen này để làm gì?
    Video này giải thích về cái viền đó.

     

Chia sẻ trang này