[FC][FC Music 50 in 1][Source code][Mapper 5]

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
FlameCyclone
Posts: 15
Joined: Fri Jun 02, 2017 2:45 am

[FC][FC Music 50 in 1][Source code][Mapper 5]

Post by FlameCyclone » Sun Apr 05, 2020 7:27 am

Code: Select all

;[FC][FC音乐50合1][MMC5][20190121]
;FlameCyclone
;=============================================================
RESET_ADDR = $8000    ;重置中断指针
SELF_BANK = $80       ;程序所在bank号
SELF_PORT = $5114     ;程序块所在位置
;-------------------------------------------------------------
SPIRIT_CHR = $00    ;精灵图形CHR索引
BG_CHR = $00    ;背景图形CHR索引
;-------------------------------------------------------------
FC_PPU_Data_L = $50  ;PPU数据低位
FC_PPU_Data_H = FC_PPU_Data_L+$01  ;PPU数据高位
;========================================
;========================================
Sound_Init_Size = Sound_Play - Sound_Init
Sound_Play_Size = Sound_Bank - Sound_Play
Sound_Bank_Size = Recv_Bank - Sound_Bank
Recv_Bank_Size = Recv_Bank_Over - Recv_Bank
Sound_Process_Size = Recv_Bank_Over - Sound_Init
;========================================
SOUND_INIT_ADDR = $6000
SOUND_PLAY_ADDR = SOUND_INIT_ADDR + Sound_Init_Size
SOUND_BANK_ADDR = SOUND_PLAY_ADDR + Sound_Play_Size
RECV_BANK_ADDR = SOUND_BANK_ADDR + Sound_Bank_Size
Sound_Index_Addr = SOUND_INIT_ADDR + $80
Sound_Ram_Clear_Beg = FC_PPU_Data_L + $10
;----------------------------------------
FC_PPU_Buffer = $6100                ;PPU缓冲地址
FC_PPU_Cursor = FC_PPU_Buffer + $E0  ;当前PPU缓冲位置
FC_PPU_Addr_L = FC_PPU_Cursor + $01  ;PPU地址低位
FC_PPU_Addr_H = FC_PPU_Cursor + $02  ;PPU地址高位
FC_PPU_Status = FC_PPU_Cursor + $03  ;PPU显示状态
FC_PPU_Mode_C = FC_PPU_Cursor + $04  ;PPU清空模式
FC_PPU_Count  = FC_PPU_Cursor + $05  ;PPU数据计数
;=============================================================
Btn_Once = FC_PPU_Count + 1     ;单次按键
Btn_Keep = Btn_Once + 1         ;长按按键
Btn_Buffer = Btn_Once + 2       ;按键缓冲
Btn_Value = Btn_Once + 3        ;按键取值
Btn_Temp = Btn_Once + 4         ;按键临时
;-------------------------------------------------------------
FC_Cpy_From_L   = FC_PPU_Data_H+$01     ;复制来源地址低位
FC_Cpy_From_H   = FC_Cpy_From_L+$01     ;复制来源地址高位
FC_Cpy_To_L     = FC_Cpy_From_L+$02     ;复制目的地址低位
FC_Cpy_To_H     = FC_Cpy_From_L+$03     ;复制目的地址高位
FC_Cpy_Count_L = FC_Cpy_From_L+$04      ;复制长度低位
FC_Cpy_Count_H = FC_Cpy_From_L+$05      ;复制长度高位
FC_Cpy_Port_L   = FC_Cpy_From_L+$06     ;配置地址低位
FC_Cpy_Port_H   = FC_Cpy_From_L+$07     ;配置地址高位
;-------------------------------------------------------------
FC_Item_SelectCur = Btn_Temp + 1   ;当前选择项索引
FC_Item_SelectOld = FC_Item_SelectCur+$01   ;历史选择项索引
FC_Item_PageCur = FC_Item_SelectCur+$02     ;当前分页索引
FC_Item_PageOld = FC_Item_SelectCur+$03     ;历史分页索引
FC_Item_Count = FC_Item_SelectCur+$04       ;项计数索引
FC_Item_Buffer = FC_Item_SelectCur+$05      ;项缓冲最大数
FC_Item_PageMax = FC_Item_SelectCur+$06     ;最大分页索引
FC_Item_PageSize = FC_Item_SelectCur+$07    ;每页节目数
FC_Btn_Delay = FC_Item_SelectCur+$08      ;按键延时计数地址
;-------------------------------------------------------------
FC_Data_L = FC_Cpy_Port_H+$01  ;选项内容数据地址低位
FC_Data_H = FC_Data_L+$01         ;选项内容数据地址高位
;-------------------------------------------------------------
FC_Sound_Init_Code = FC_Data_H+$01    ;
FC_SOUND_INIT_ADDR_L = FC_Sound_Init_Code+$01    ;
FC_SOUND_INIT_ADDR_H = FC_Sound_Init_Code+$02    ;
;----------------------------------------
FC_Sound_Play_Bank_8000 = FC_Btn_Delay+$01    ;
FC_Sound_Play_Bank_A000 = FC_Sound_Play_Bank_8000+$01
FC_Sound_Play_Bank_C000 = FC_Sound_Play_Bank_A000+$01
FC_Sound_Play_Bank_E000 = FC_Sound_Play_Bank_C000+$01
;-------------------------------------------------------------
Digit_1 = FC_Sound_Play_Bank_A000 + $01
Digit_10 = Digit_1+$01
Digit_100 = Digit_1+$02
;-------------------------------------------------------------
FC_MODE_RAM_TO_RAM     = $00  ;复制RAM到RAM模式
FC_MODE_RAM_TO_PPU     = $01  ;复制RAM到PPU模式
FC_MODE_PPU_TO_RAM     = $02  ;复制PPU到RAM模式
FC_MODE_PPU_CLEAN     = $03   ;清除PPU模式
FC_MODE_RAM_CLEAN     = $04   ;清除RAM模式
;-------------------------------------------------------------
CHAR_SPACE = $00           ;空格字符索引
CHAR_POINT = $2E           ;空格句号索引
CHAR_ARROW = $1F           ;光标箭头图形索引
CHAR_DIGIT = $30           ;数字字符起始
CHAR_PER = $2F             ;字符'/'
ITEM_MAX_SIZE = 50 - 01    ;最大节目索引
ITEM_PAGE_SIZE = 08        ;每页显示节目数
ITEM_BUFFER_SIZE = 01      ;节目内容一次性写入缓冲数
BUTTON_DELAY_TIME = $18    ;按键延时启动时间
BUTTON_DELAY_SPEED = $08   ;按键延时触发速度
;=============================================================
 .ORG RESET_ADDR
ProgramBegin:;程序开始
 SEI
 CLD
 LDA #$10
 STA $2000
 LDA #$00
 STA $2001
 STA $4015 ;设置声音
 STA $4010
 LDA #$C0
 STA $4017 ;
;-------------------------
TimeDelayA:;延时A
 BIT $2002
 BPL TimeDelayA
TimeDelayB:;延时B
 BIT $2002
 BMI TimeDelayB
;-------------------------
 LDX #$FF
 TXS
;-------------------------
PaletteClear:;调色板清空
 LDA #$3F
 STA $2006
 LDA #$00
 STA $2006
 LDX #$00
 LDA #$0F
PaletteClear_Set:;
 STA $2007
 INX
 CPX #$20
 BCC PaletteClear_Set
;-------------------------
MMC5_PpuSet:
 LDA #$03  ;PRG 1KB模式
 STA $5100
 LDA #$03  ;CHR 1KB模式
 STA $5101
 
 LDA #$02 ;允许写入PRG-RAM A
 STA $5102
 LDA #$01 ;允许写入PRG-RAM B
 STA $5103
 
 LDA #$02 ;ExRAM CPU存取模式
 STA $5104
 
 LDA #$44 ;命名表垂直镜像
 STA $5105
 
 LDA #$00 ;选择PRG-RAM
 STA $5113
 
 LDA #$00
 STA $5010 ;设置PCM
 STA $5200
 STA $5204 ;IRQ 控制
MMC5_SetPpuPattern:
 LDX #$00
 STX $5030 ;设置CHR高位
MMC5_SetPpuSPPattern:;设置背景图形1KB*4
 TXA
 STA $5120,X
 INX
 TXA
 STA $5121,X
 INX
 CPX #$08
 BCC MMC5_SetPpuSPPattern
 LDX #$00
MMC5_SetPpuBGPattern:;设置背景图形1KB*4
 TXA
 STA $5128,X
 INX
 TXA
 STA $5129,X
 INX
 CPX #$04
 BCC MMC5_SetPpuBGPattern
;-------------------------
RAM_Clear:;RAM清空
 LDX #$00
 LDA #$00
RAM_Clear_Set:
 STA $0000,X
 STA $0100,X
 STA $0200,X
 STA $0300,X
 STA $0400,X
 STA $0500,X
 STA $0600,X
 STA $0700,X
 STA $5C00,X
 STA $5D00,X
 STA $6000,X
 STA $6100,X
 INX
 BNE RAM_Clear_Set
;-------------------------
ScreenInitialize:;屏幕初始化
 JSR PPU_DataClear
 JSR NMI_Wait
 JSR PaletteSetup
 JSR SetPpuLayout
 JSR ScrollReset
 JSR GetPageSize
 JSR GetMaxPage
 
 JSR Sound_Process_Init
 
 LDA SOUND_PLAY_ADDR
 PHA
 LDA #$60
 STA SOUND_PLAY_ADDR
 JSR ShowTitle
 JSR ShowPageItems
 JSR RefreshArrow
 LDA #$0E
 STA FC_PPU_Status
 PLA
 STA SOUND_PLAY_ADDR
 JSR Sound_Play_Init

;==================================================
NMI_Loop:;NMI循环
 JSR NMI_Delay
 JSR ButtonProcess
 JSR ButtonDelay
 JSR ChangeSelectIndex
 JMP NMI_Loop

;==================================================
NMI_Wait:;NMI等待
 LDA $2002
 BPL NMI_Wait
 RTS
;--------------------------------------------------
NMI_Delay:;NMI延时
 BIT $2002
 BPL NMI_Delay
 JSR FC_PPU_Process
 JSR SOUND_PLAY_ADDR
 RTS

;--------------------------------------------------
PaletteReset:;调色板重设
 LDA #$3F
 STA $2006
 LDA #$00
 STA $2006
 LDX #$00
PaletteReset_Set:
 LDA #$0F
 STA $2007
 INX
 CPX #$20
 BCC PaletteReset_Set
 RTS
;--------------------------------------------------
ScrollReset:;滚动重设
 LDA #$00
 STA $2006
 STA $2006
 STA $2005
 STA $2005
 RTS
 
;==================================================
PaletteSetup:;背景调色板设置
 LDA #$3F
 STA $2006
 LDA #$00
 STA $2006
 LDX #$00
PaletteSetup_Set:
 LDA Palette_Data,X
 STA $2007
 INX
 CPX #$10
 BCC PaletteSetup_Set
 RTS

PPU_DataClear:;PPU清空
 LDX #<PpuClear_Data
 LDY #>PpuClear_Data
 JSR FC_Data_Copy
 RTS

FC_Data_Copy:;数据拷贝
 STX FC_Cpy_Port_L
 STY FC_Cpy_Port_H
 LDY #$00
 LDX #$06
FC_Data_Copy_Addr_Set:
 LDA (FC_Cpy_Port_L),Y
 STA FC_Cpy_From_L,Y
 INY
 DEX
 BNE FC_Data_Copy_Addr_Set
 LDA (FC_Cpy_Port_L),Y
 LDX #$00
 LDY #$00
 JMP FC_Ppu_CLean_Mode

;--------------------------------------------------
FC_Ppu_CLean_Mode:;清除PPU模式
 LDA FC_Cpy_To_H
 STA $2006
 LDA FC_Cpy_To_L
 STA $2006
 LDA #$00
 LDX FC_Cpy_Count_H
 LDY FC_Cpy_Count_L
FC_Ppu_CLean_Count:;开始清除PPU
 BNE FC_Ppu_CLean_Count_End
 CPX #$00
 BEQ FC_Ppu_CLean_Over
 DEX
FC_Ppu_CLean_Count_End:
 DEY
FC_Ppu_CLean_Copy:
 STA $2007
FC_Ppu_CLean_Copy_End:
 JMP FC_Ppu_CLean_Count
FC_Ppu_CLean_Over:;结束数据复制
 RTS

;==================================================
MODE_CNTL = $FB  ;带计数行写入模式
MODE_CNTC = $FC  ;带计数行清除模式
MODE_CNTS = $FD  ;带计数下一行带空格数写入模式
MODE_CNTN = $FE  ;带计数下一行写入模式
MODE_OVER = $FF  ;源数据结束
;--------------------------------------------------
FC_PPU_Process:
 LDA FC_PPU_Buffer
 BEQ FC_PPU_Process_End
 JSR FC_PPU_Process_Beg
FC_PPU_Process_End:
 LDA #$00
 STA FC_PPU_Buffer
 STA $2006
 STA $2006
 STA $2005
 STA $2005
 LDA FC_PPU_Status
 STA $2001
 RTS

;--------------------------------------------------
FC_PPU_Process_Beg:;处理开始
 LDX FC_PPU_Cursor
 LDA #$00
 STA $2001
 STA FC_PPU_Buffer,X
 STA FC_PPU_Cursor
 LDX #$FF
;--------------------------------------------------
FC_PPU_Mode_Select:;模式选择
 INX
 LDA FC_PPU_Buffer,X
 CMP #MODE_CNTL
 BEQ FC_PPU_Mode_CountLine
 CMP #MODE_CNTC
 BEQ FC_PPU_Mode_CountClear
 CMP #MODE_CNTN
 BEQ FC_PPU_Mode_CountNext
 CMP #MODE_CNTS
 BEQ FC_PPU_Mode_CountSpace
 RTS

;--------------------------------------------------
FC_PPU_Mode_CountLine:;计数行写入模式
 JSR FC_PPU_Set_Addr
 LDY FC_PPU_Buffer,X
FC_PPU_CountLine_Write:
 INX
 LDA FC_PPU_Buffer,X
 STA $2007
 DEY
 BNE FC_PPU_CountLine_Write
 JMP FC_PPU_Mode_Select
 
;--------------------------------------------------
FC_PPU_Mode_CountClear:;计数行清除模式
 JSR FC_PPU_Set_Addr
 LDY FC_PPU_Buffer,X
 LDA #$00
FC_PPU_CountClear_Write:
 STA $2007
 DEY
 BNE FC_PPU_CountClear_Write
 JMP FC_PPU_Mode_Select

;--------------------------------------------------
FC_PPU_Mode_CountNext:;计数下一行写入模式
 LDA FC_PPU_Addr_L
 CLC
 ADC #$20
 STA FC_PPU_Addr_L
 BCC FC_PPU_CountNext_Write
 INC FC_PPU_Addr_H
FC_PPU_CountNext_Write:
 LDA FC_PPU_Addr_H
 STA $2006
 LDA FC_PPU_Addr_L
 STA $2006
 INX
 LDY FC_PPU_Buffer,X
 JMP FC_PPU_CountLine_Write

;--------------------------------------------------
FC_PPU_Mode_CountSpace:;计数下一行带空格数写入模式
 LDA FC_PPU_Addr_L
 CLC
 ADC #$20
 STA FC_PPU_Addr_L
 BCC FC_PPU_Mode_CountSpace_Write
 INC FC_PPU_Addr_H
FC_PPU_Mode_CountSpace_Write:
 INX
 LDA FC_PPU_Addr_H
 STA $2006
 LDA FC_PPU_Addr_L
 AND #$E0
 CLC
 ADC FC_PPU_Buffer,X
 STA $2006
 INX
 LDY FC_PPU_Buffer,X
 JMP FC_PPU_CountLine_Write

;--------------------------------------------------
FC_PPU_Set_Addr:;写入地址
 INX
 LDA FC_PPU_Buffer,X
 STA FC_PPU_Addr_H
 STA $2006
 INX
 LDA FC_PPU_Buffer,X
 STA FC_PPU_Addr_L
 STA $2006
 INX
 RTS

;--------------------------------------------------
FC_PPU_Port_CountLine:
 LDX FC_PPU_Cursor
 LDA #MODE_CNTL
 STA FC_PPU_Buffer,X
 INX
 LDY #$02
 LDA (FC_PPU_Data_L),Y
 CLC
 ADC #$03
 STA FC_PPU_Count
 LDY #$00
FC_PPU_Port_CountLine_Write
 LDA (FC_PPU_Data_L),Y
 STA FC_PPU_Buffer,X
 INX
 INY
 DEC FC_PPU_Count
 BNE FC_PPU_Port_CountLine_Write
FC_PPU_Port_CountLine_End:
 STX FC_PPU_Cursor
 RTS

;--------------------------------------------------
FC_PPU_Port_SourceCopy:
 LDX FC_PPU_Cursor
 LDY #$00
FC_PPU_Port_SourceCopy_Write:
 LDA (FC_PPU_Data_L),Y
 CMP #MODE_OVER
 BEQ FC_PPU_Port_SourceCopy_End
 STA FC_PPU_Buffer,X
 INX
 INY
 BNE FC_PPU_Port_SourceCopy_Write
FC_PPU_Port_SourceCopy_End:
 STX FC_PPU_Cursor
 RTS

;=============================================================
ButtonProcess:;按键扫描
 JSR ButtonScan
 LDA Btn_Keep
 STA Btn_Temp
 JSR ButtonScan
 LDA Btn_Keep
 CMP Btn_Temp
 BEQ ButtonProcess_Set
 LDA Btn_Buffer
 STA Btn_Keep
ButtonProcess_Set:
 TAY
 EOR Btn_Buffer
 AND Btn_Keep
 STA Btn_Once
 STY Btn_Buffer
 RTS
;--------------------------------------------------
ButtonScan:
 LDX #$01
 STX $4016
 DEX
 STX $4016
 LDX #$08
ButtonScanValue:
 LDA $4016
 STA Btn_Value
 LSR
 ORA Btn_Value
 LSR
 ROL Btn_Keep
 DEX
 BNE ButtonScanValue
 RTS
 
;========================================
ButtonDelay:;按键长按延迟
 LDA Btn_Keep
 ORA Btn_Once
 BEQ ButtonDelay_End
 CMP #$10
 BEQ ButtonDelay_End
 LDA FC_Btn_Delay
 CMP #BUTTON_DELAY_TIME
 BCS ButtonDelay_Press
 INC FC_Btn_Delay
 RTS
ButtonDelay_Press:
 INC FC_Btn_Delay
 LDA FC_Btn_Delay
 SEC
 SBC #BUTTON_DELAY_TIME
 CMP #BUTTON_DELAY_SPEED
 BCS ButtonDelay_PressFinish
 RTS 
ButtonDelay_PressFinish:
 LDA Btn_Keep
 STA Btn_Once
 LDA #$00
 STA Btn_Keep
 LDA #BUTTON_DELAY_TIME
 STA FC_Btn_Delay
 RTS
ButtonDelay_End:
 LDA #$00
 STA FC_Btn_Delay
 RTS

;========================================
HexToDec:;8位16进制转10进制
 LDY #$00
DigitClear:
 STY Digit_100
 STY Digit_10
 STY Digit_1
 BCC Count_100
 INY
 SBC #100
Count_100:
 CMP #100
 BCC Set_100
 SBC #100
 INY
 BNE Count_100
Set_100:
 STY Digit_100
 LDY #$00
Count_10:
 CMP #10
 BCC Set_10
 SBC #10
 INY
 BNE Count_10
Set_10:
 STY Digit_10
Set_1:
 STA Digit_1
 RTS

;=============================================================
SetPpuLayout:;调色板布局配置
 LDA #$23
 STA $2006
 LDA #$C0
 STA $2006
 LDX #$00
SetPpuLayout_Set:
 LDA PpuLayout_Data,X
 STA $2007
 INX
 CPX #$40
 BCC SetPpuLayout_Set
 RTS

;========================================
GetPageSize:;获取每页最大节目数
 LDA #ITEM_MAX_SIZE
 CMP #ITEM_PAGE_SIZE - 1
 BCC GetPageSize_End
 LDA #ITEM_PAGE_SIZE
 STA FC_Item_PageSize
 RTS
GetPageSize_End:
 STA FC_Item_PageSize
 INC FC_Item_PageSize
 RTS

;========================================
GetMaxPage:;获取最大分页数目
 LDA #$00
 CLC
GetMaxPageIndex:
 STA FC_Item_PageMax
 ADC FC_Item_PageSize
 BCS GetMaxPageIndex_End
 CMP #ITEM_MAX_SIZE
 BCC GetMaxPageIndex
 BEQ GetMaxPageIndex
GetMaxPageIndex_End:
 LDA FC_Item_PageMax
 STA FC_Item_PageOld
 RTS

;========================================
SetLastPageSelect:;设置上一页选择项
 LDA FC_Item_PageMax
 BEQ SetLastPageSelectNormal
 LDA FC_Item_PageCur
 BNE SetLastPageSelect_LastPage
 LDA FC_Item_SelectCur
 CLC
 ADC FC_Item_PageMax
 BCS SetLastPageSelect_Max
 CMP #ITEM_MAX_SIZE
 BCC SetLastPageSelectNormal
SetLastPageSelect_Max:
 LDA #ITEM_MAX_SIZE
SetLastPageSelectNormal:
 STA FC_Item_SelectCur
 RTS
SetLastPageSelect_LastPage:
 LDA FC_Item_SelectCur
 SEC
 SBC FC_Item_PageSize
 STA FC_Item_SelectCur
 RTS
 
;========================================
SetNextPageSelect:;设置下一页选择项
 LDA FC_Item_PageMax
 BEQ SetNextPageSelect_Max
 CMP FC_Item_PageCur
 BNE SetNextPageSelect_NextPage
 LDA FC_Item_SelectCur
 SEC
 SBC FC_Item_PageCur
 STA FC_Item_SelectCur
 RTS
SetNextPageSelect_NextPage:
 LDA FC_Item_SelectCur
 CLC
 ADC FC_Item_PageSize
 BCS SetNextPageSelect_Max
 CMP #ITEM_MAX_SIZE
 BCC SetNextPageSelect_Normal
SetNextPageSelect_Max:
 LDA #ITEM_MAX_SIZE
SetNextPageSelect_Normal:
 STA FC_Item_SelectCur
 RTS

;========================================
GetLastPage:;获取上一页的页号索引
 JSR SetLastPageSelect
 LDA FC_Item_PageCur
 BNE GetLastPageIndex
SetEndPage:
 LDA FC_Item_PageMax
 STA FC_Item_PageCur
 RTS
GetLastPageIndex:
 LDA FC_Item_PageCur
 SEC
 SBC FC_Item_PageSize
 STA FC_Item_PageCur
 RTS

;========================================
GetNextPage:;获取下一页的页号索引
 JSR SetNextPageSelect
 LDA FC_Item_PageCur
 CMP FC_Item_PageMax
 BNE GetNextPageIndex
SetBeginPage:
 LDA #$00
 STA FC_Item_PageCur
 RTS
GetNextPageIndex:
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_PageSize
 STA FC_Item_PageCur
 RTS

;========================================
GetLastItem:;获取上一个选项
 LDA FC_Item_SelectCur
 BEQ SetItemToEndPage
 CMP FC_Item_PageCur
 BNE GetLastItem_End
 LDA FC_Item_PageCur
 SEC
 SBC FC_Item_PageSize
 STA FC_Item_PageCur
 JSR ShowPageItems
 DEC FC_Item_SelectCur
 RTS
SetItemToEndPage:
 LDA FC_Item_PageMax
 STA FC_Item_PageCur
 LDA #ITEM_MAX_SIZE
 STA FC_Item_SelectCur
 JSR ShowPageItems
 RTS
GetLastItem_End:
 DEC FC_Item_SelectCur
 RTS

;========================================
GetNextItem:;获取下一个选项
 LDA FC_Item_SelectCur
 CMP #ITEM_MAX_SIZE
 BEQ SetItemToBeginPage
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_PageSize
 SEC
 SBC #01
 CMP FC_Item_SelectCur
 BNE GetNextItem_End
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_PageSize
 STA FC_Item_PageCur
 JSR ShowPageItems
 INC FC_Item_SelectCur
 RTS 
SetItemToBeginPage:
 LDA #$00
 STA FC_Item_PageCur
 STA FC_Item_SelectCur
 JSR ShowPageItems
 RTS
GetNextItem_End:
 INC FC_Item_SelectCur
 RTS

;========================================
ChangeSelectIndex:;改变当前选项
 LDA Btn_Keep
 CMP #$30
 BNE ChangeSelectIndex_Set
 LDA Btn_Once
 CMP #$20
 BNE ChangeSelectIndex_Set
 JMP RESET_ADDR
ChangeSelectIndex_Set
 LDA Btn_Once
 AND #$FF
 BEQ ChangeSelectIndex_End
ChangeSelectIndex_Beg:
 LDA FC_Item_SelectCur
 STA FC_Item_SelectOld
 LDA FC_Item_PageCur
 STA FC_Item_PageOld
;SelectLastPage:
 ;LDA Btn_Once
 ;CMP #$02
 ;BNE SelectNextPage
 ;JSR GetLastPage
 ;JSR ShowPageItems
 ;JSR Sound_Play_Init
SelectNextPage:
 LDA Btn_Once
 CMP #$20
 BNE SelectLastItem
 JSR GetNextPage
 JSR ShowPageItems
 JSR Sound_Play_Init
SelectLastItem:
 LDA Btn_Once
 CMP #$08
 BNE SelectNextItem
 JSR GetLastItem
 JSR Sound_Play_Init
SelectNextItem:
 LDA Btn_Once
 CMP #$04
 BNE SelectLastMusic
 JSR GetNextItem
 JSR Sound_Play_Init
SelectLastMusic:
 LDA Btn_Once
 CMP #$02
 BNE SelectNextMusic
 JSR PlayLastSound
SelectNextMusic
 LDA Btn_Once
 CMP #$01
 BNE SelectLastTenMusic
 JSR PlayNextSound
SelectLastTenMusic:
 LDA Btn_Once
 CMP #$40
 BNE SelectNextTenMusic
 JSR PlayLastTenSound
SelectNextTenMusic
 LDA Btn_Once
 CMP #$80
 BNE SelectCurMusic
 JSR PlayNextTenSound
SelectCurMusic:
 LDA Btn_Once
 CMP #$10
 BNE SelectItem_End
 JSR Sound_Play_Init
SelectItem_End:
 JSR RefreshArrow
ChangeSelectIndex_End:
 RTS
 
;========================================
SetItemCoordinate:;设置选项内容显示位置
 STA FC_PPU_Buffer,X
 INX
 LDA Coordinate_Data_H,Y
 STA FC_PPU_Buffer,X
 INX
 LDA Coordinate_Data_L,Y
 STA FC_PPU_Buffer,X
 INX
 RTS
;====================
SetItemAddrData:;设置选项内容地址
 LDA ItemText_Data_L,Y
 STA FC_Data_L
 LDA ItemText_Data_H,Y
 STA FC_Data_H
 RTS

;========================================
SetItemOrderText:;设置节目序号
 TYA
 CLC
 ADC #$01
 JSR HexToDec
 LDX FC_PPU_Cursor
 LDA Digit_100
 CLC
 ADC #CHAR_DIGIT
 STA FC_PPU_Buffer,X
 INX
 LDA Digit_10
 ADC #CHAR_DIGIT
 STA FC_PPU_Buffer,X
 INX
 LDA Digit_1
 ADC #CHAR_DIGIT
 STA FC_PPU_Buffer,X
 INX
 LDA #CHAR_POINT
 STA FC_PPU_Buffer,X
 INX
 STX FC_PPU_Cursor
 RTS

;========================================
ShowSingleItem:;显示单独一项内容
ClearSingleItem_WriteItem:;清除历史项内容
 LDA FC_Item_PageOld
 CLC
 ADC FC_Item_Count
 BCS ShowSingleItem_WriteItem
 CMP #ITEM_MAX_SIZE
 BEQ ClearSingleItem_WriteItem_Set
 BCS ShowSingleItem_WriteItem
ClearSingleItem_WriteItem_Set:
 LDY FC_Item_Count
 LDX FC_PPU_Cursor
 LDA #MODE_CNTC
 JSR SetItemCoordinate
 LDA #$3C
 STA FC_PPU_Buffer,X
 INX
 STX FC_PPU_Cursor

ShowSingleItem_WriteItem:;显示当前项内容
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_Count
 BCS ShowSingleItem_End
 CMP #ITEM_MAX_SIZE
 BEQ ShowSingleItem_WriteItem_Set
 BCS ShowSingleItem_End
ShowSingleItem_WriteItem_Set:
 LDY FC_Item_Count
 LDX FC_PPU_Cursor
 LDA #MODE_CNTL
 JSR SetItemCoordinate
ShowSingleItem_SetDataAddr:
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_Count
 TAY
ShowSingleItem_WriteAddr:
 JSR SetItemAddrData
 TYA
 PHA
 LDY #$00
 LDA #$04
 CLC
 ADC (FC_Data_L),Y
 STA FC_PPU_Buffer,X
 INX
 STX FC_PPU_Cursor
 PLA
 TAY
 JSR SetItemOrderText
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_Count
 TAY
ShowSingleItem_WriteItem_Beg:
 LDA ItemText_Data_L,Y
 STA FC_PPU_Data_L
 LDA ItemText_Data_H,Y
 STA FC_PPU_Data_H
 CLC
 LDA FC_PPU_Data_L
 ADC #$01
 STA FC_PPU_Data_L
 LDA FC_PPU_Data_H
 ADC #$00
 STA FC_PPU_Data_H
 JSR FC_PPU_Port_SourceCopy
ShowSingleItem_End:
 RTS

;========================================
SetCursorCoordinate:;设置光标箭头坐标
 TAY
 LDX FC_PPU_Cursor
 LDA #MODE_CNTL
 STA FC_PPU_Buffer,X
 INX
 LDA Coordinate_Data_H,Y
 STA FC_PPU_Buffer,X
 INX
 LDA Coordinate_Data_L,Y
 SEC
 SBC #$02
 STA FC_PPU_Buffer,X
 INX
 LDA #$01
 STA FC_PPU_Buffer,X
 INX
 RTS
 
;========================================
ClearLastArrow:;清除上次光标箭头
 LDA FC_Item_SelectOld
 SEC
 SBC FC_Item_PageOld
 JSR SetCursorCoordinate
 LDA #CHAR_SPACE
 STA FC_PPU_Buffer,X
 INX
 STX FC_PPU_Cursor
 RTS
 
;========================================
ShowCurArrow:;显示上次光标箭头
 LDA FC_Item_SelectCur
 SEC
 SBC FC_Item_PageCur
 JSR SetCursorCoordinate
 LDA #CHAR_ARROW
 STA FC_PPU_Buffer,X
 INX
 STX FC_PPU_Cursor
 RTS

;========================================
RefreshArrow:;刷新显示选择光标箭头
 JSR ClearLastArrow
 JSR ShowCurArrow
 RTS
;========================================
ShowPageItems:;显示一页的选项内容
 LDA #$00
 STA FC_Item_Count
 STA FC_Item_Buffer
 STA $4015
 
 LDA SOUND_PLAY_ADDR
 PHA
 LDA #$60
 STA SOUND_PLAY_ADDR
 
ShowPageItems_Beg:
 JSR ShowSingleItem
 JSR ShowSingleDigit
 INC FC_Item_Buffer
 LDA FC_Item_Buffer
 CMP #ITEM_BUFFER_SIZE
 BCC WriteItemText
 JSR NMI_Delay
 LDA #$00
 STA FC_Item_Buffer
WriteItemText:
 INC FC_Item_Count
 LDA FC_Item_Count
 CMP FC_Item_PageSize
 BCC ShowPageItems_Beg
 LDA FC_Item_Buffer
 BEQ ShowPageItems_End
 JSR NMI_Delay
ShowPageItems_End:
 PLA
 STA SOUND_PLAY_ADDR
 RTS

;========================================
ShowTitle:;显示标题
 LDA #<Title_Text_Data
 STA FC_PPU_Data_L
 LDA #>Title_Text_Data
 STA FC_PPU_Data_H
 JSR FC_PPU_Port_CountLine
 JSR NMI_Delay
 RTS

;========================================
SetDigitCoordinate:;
 STA FC_PPU_Buffer,X
 INX
 LDA Coordinate_Data_H,Y
 STA FC_PPU_Buffer,X
 INX
 LDA Coordinate_Data_L,Y
 CLC
 ADC #$24
 STA FC_PPU_Buffer,X
 BCC SetDigitCoordinate_NoBorrow
 DEX
 INC FC_PPU_Buffer,X
 INX
SetDigitCoordinate_NoBorrow:
 INX
 RTS
;========================================
SetNumOrderText:
 CLC
 JSR HexToDec
 LDA Digit_100
 CLC
 ADC #CHAR_DIGIT
 STA FC_PPU_Buffer,X
 INX
 LDA Digit_10
 ADC #CHAR_DIGIT
 STA FC_PPU_Buffer,X
 INX
 LDA Digit_1
 ADC #CHAR_DIGIT
 STA FC_PPU_Buffer,X
 INX
 RTS

;========================================
ShowSingleDigit:;显示单独一项数字
ClearSingleDigit_WriteItem:;清除历史数字内容
 LDA FC_Item_PageOld
 CLC
 ADC FC_Item_Count
 BCS ShowSingleDigit_WriteItem
 CMP #ITEM_MAX_SIZE
 BEQ ClearSingleDigit_WriteItem_Set
 BCS ShowSingleDigit_WriteItem
ClearSingleDigit_WriteItem_Set:
 LDY FC_Item_Count
 LDX FC_PPU_Cursor
 LDA #MODE_CNTC
 JSR SetDigitCoordinate
ClearSingleDigit_SetDataAddr:
 LDA #$07
 STA FC_PPU_Buffer,X
 INX
 STX FC_PPU_Cursor
ShowSingleDigit_WriteItem:;显示当前数字内容
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_Count
 BCS ShowSingleDigit_End
 CMP #ITEM_MAX_SIZE
 BEQ ShowSingleDigit_WriteItem_Set
 BCS ShowSingleDigit_End
ShowSingleDigit_WriteItem_Set:
 LDY FC_Item_Count
 LDX FC_PPU_Cursor
 LDA #MODE_CNTL
 JSR SetDigitCoordinate
ShowSingleDigit_WriteAddr:
 LDA #$07
 STA FC_PPU_Buffer,X
 INX
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_Count
 TAY
 LDA Sound_Index_Addr,Y
 CLC
 ADC #$01
 JSR SetNumOrderText
 LDA #CHAR_PER
 STA FC_PPU_Buffer,X
 INX
 LDA FC_Item_PageCur
 CLC
 ADC FC_Item_Count
 TAY
 LDA Sound_Song_Sum,Y
 CLC
 JSR SetNumOrderText
 STX FC_PPU_Cursor
ShowSingleDigit_End:
 RTS

;========================================
ShowSelectPlayIndex:
 LDA FC_Item_SelectCur
 SEC
 SBC FC_Item_PageCur
 STA FC_Item_Count
 JSR ShowSingleDigit
 RTS
 
;========================================
PlayLastSound:
 LDX FC_Item_SelectCur
 LDA Sound_Index_Addr,X
 BEQ PlayLastSound_End
 DEC Sound_Index_Addr,X
 LDA Sound_Index_Addr,X
 JSR SOUND_INIT_ADDR
 JSR ShowSelectPlayIndex
PlayLastSound_End:
 RTS

;========================================
PlayNextSound:
 LDX FC_Item_SelectCur
 LDA Sound_Index_Addr,X
 CLC
 ADC #$01
 CMP Sound_Song_Sum,X
 BCS PlayNextSound_End
 INC Sound_Index_Addr,X
 LDA Sound_Index_Addr,X
 JSR SOUND_INIT_ADDR
 JSR ShowSelectPlayIndex
PlayNextSound_End:
 RTS

;========================================
PlayLastTenSound:
 LDX FC_Item_SelectCur
 LDA Sound_Index_Addr,X
 BEQ PlayLastSound_End
 LDA Sound_Index_Addr,X
 SEC
 SBC #10
 STA Sound_Index_Addr,X
 BCS MinLimited_End
MinLimited:
 LDA #$00
 STA Sound_Index_Addr,X
MinLimited_End:
 LDA Sound_Index_Addr,X
 JSR SOUND_INIT_ADDR
 JSR ShowSelectPlayIndex
PlayLastTenSound_End:
 RTS

;========================================
PlayNextTenSound:
 LDX FC_Item_SelectCur
 LDA Sound_Index_Addr,X
 CLC
 ADC #$01
 CMP Sound_Song_Sum,X
 BCS PlayNextSound_End
 LDA Sound_Index_Addr,X
 CLC
 ADC #10
 STA Sound_Index_Addr,X
 CLC
 ADC #$01
 CMP Sound_Song_Sum,X
 BCC MaxLimited_End
MaxLimited:
 LDA Sound_Song_Sum,X
 SEC
 SBC #$01
 STA Sound_Index_Addr,X
MaxLimited_End:
 LDA Sound_Index_Addr,X
 JSR SOUND_INIT_ADDR
 JSR ShowSelectPlayIndex
PlayNextTenSound_End:
 RTS

;========================================
Sound_Init_Ram:
 LDX #$00
 LDA #$00
 STA $4015
Sound_Init_Register:
 STA $4000,X
 INX
 CPX #$14
 BCC Sound_Init_Register
 LDX #$00
Sound_Init_ZeroPageA:
 STA $00,X
 INX
 CPX #FC_PPU_Data_L
 BCC Sound_Init_ZeroPageA
 LDX #Sound_Ram_Clear_Beg
Sound_Init_ZeroPageB:
 STA $00,X
 INX
 BNE Sound_Init_ZeroPageB
 LDX #$00
Sound_Init_StackPage:
 STA $0100,X
 INX
 CPX #$D0
 BCC Sound_Init_StackPage
 LDX #$00
Sound_Init_All:
 STA $0200,X
 STA $0300,X
 STA $0400,X
 STA $0500,X
 STA $0600,X
 STA $0700,X
 INX
 BNE Sound_Init_All
 LDA #$1F
 STA $4015
 RTS

;========================================
Sound_Play_Init:
 LDA #$4C
 STA FC_Sound_Init_Code
 LDA #$1F
 STA $4015
 JSR SOUND_INIT_ADDR
 RTS

;========================================
Sound_Play_Init_Bank:
 LDX FC_Item_SelectCur
 LDA Sound_Bank_8000,X
 STA FC_Sound_Play_Bank_8000
 LDA Sound_Bank_A000,X
 STA FC_Sound_Play_Bank_A000
 LDA Sound_Bank_C000,X
 STA FC_Sound_Play_Bank_C000
 LDA Sound_Bank_E000,X
 STA FC_Sound_Play_Bank_E000
 RTS

;========================================
Sound_Process_Init:
 LDX #$00
Sound_Process_Sound_Init:
 LDA Sound_Init,X
 STA SOUND_INIT_ADDR,X
 INX
 CPX #Sound_Process_Size
 BCC Sound_Process_Sound_Init
 LDX #$00
Sound_Process_Song_Start:
 LDA Sound_Song_Start,X
 SEC
 SBC #$01
 STA Sound_Index_Addr,X
 INX
 CPX #ITEM_MAX_SIZE + 1
 BCC Sound_Process_Song_Start
 RTS

;========================================
Sound_Init:
 JSR Sound_Init_Ram
 LDX FC_Item_SelectCur
 LDA Sound_Init_Port_L,X
 STA FC_SOUND_INIT_ADDR_L
 LDA Sound_Init_Port_H,X
 STA FC_SOUND_INIT_ADDR_H
 JSR SOUND_BANK_ADDR
 LDX FC_Item_SelectCur
 LDA Sound_Index_Addr,X
 JSR FC_Sound_Init_Code
 JMP RECV_BANK_ADDR

;========================================
Sound_Play:
 LDX FC_Item_SelectCur
 LDA Sound_Play_Port_L,X
 STA FC_SOUND_INIT_ADDR_L
 LDA Sound_Play_Port_H,X
 STA FC_SOUND_INIT_ADDR_H
 JSR SOUND_BANK_ADDR
 JSR FC_Sound_Init_Code
 JMP RECV_BANK_ADDR

;========================================
Sound_Bank:
 JSR Sound_Play_Init_Bank
 LDX #$00
Sound_Bank_Beg:
 LDA FC_Sound_Play_Bank_8000,X
 STA $5114,X
 INX
 CPX #$04
 BCC Sound_Bank_Beg
 RTS
;========================================
Recv_Bank:
 LDA #SELF_BANK
 STA SELF_PORT
 RTS
Recv_Bank_Over:
;========================================
Palette_Data:;背景调色板数据
 .BYTE $0F,$24,$24,$24,$0F,$20,$20,$20,$0F,$27,$27,$27,$0F,$2C,$2C,$2C
PpuClear_Data:;PPU配置数据
 .DB $00,$00,$00,$24,$00,$08,FC_MODE_PPU_CLEAN
;========================================
PpuLayout_Data:;属性表数据
 .DB $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$FF,$55,$00,$00,$00,$00,$00,$00
 .DB $FF,$55,$00,$00,$00,$00,$00,$00,$FF,$55,$00,$00,$00,$00,$00,$00
 .DB $FF,$55,$00,$00,$00,$00,$00,$00,$FF,$55,$00,$00,$00,$00,$00,$00
 .DB $FF,$55,$00,$00,$00,$00,$00,$00,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA

;========================================
Coordinate_Data_L:;节目坐标位置低位
 .DB $84,$E4,$44,$A4,$04,$64,$C4,$24
Coordinate_Data_H:;节目坐标位置高位
 .DB $20,$20,$21,$21,$22,$22,$22,$23
 
;========================================
Title_Text_Data:;标题文本数据
 .DB $20,$48
 .STR "FC MUSIC 50 IN 1"
;==============================
ItemText_Data:;节目文本
ITEM_001 .STR "ROCKMAN 1"
 .DB MODE_OVER
ITEM_002 .STR "ROCKMAN 2"
 .DB MODE_OVER
ITEM_003 .STR "ROCKMAN 3"
 .DB MODE_OVER
ITEM_004 .STR "ROCKMAN 4"
 .DB MODE_OVER
ITEM_005 .STR "ROCKMAN 5"
 .DB MODE_OVER
ITEM_006 .STR "ROCKMAN 6"
 .DB MODE_OVER
ITEM_007 .STR "1943"
 .DB MODE_OVER
ITEM_008 .STR "MIGHT FINAL FIGHT"
 .DB MODE_OVER
ITEM_009 .STR "NINJA GAIDEN 1"
 .DB MODE_OVER
ITEM_010 .STR "NINJA GAIDEN 2"
 .DB MODE_OVER
ITEM_011 .STR "NINJA GAIDEN 3"
 .DB MODE_OVER
ITEM_012 .STR "CONTRA"
 .DB MODE_OVER
ITEM_013 .STR "SUPER CONTRA"
 .DB MODE_OVER
ITEM_014 .STR "CONTRA FORCE"
 .DB MODE_OVER
ITEM_015 .STR "RAF WORLD"
 .DB MODE_OVER
ITEM_016 .STR "FINAL MISSION"
 .DB MODE_OVER
ITEM_017 .STR "DOUBLE DRAGON 1"
 .DB MODE_OVER
ITEM_018 .STR "DOUBLE DRAGON 2"
 .DB MODE_OVER
ITEM_019 .STR "DOUBLE DRAGON 3"
 .DB MODE_OVER
ITEM_020 .STR "KAGE"
 .DB MODE_OVER
ITEM_021 .STR "TOURNAMENT FIGHTERS"
 .DB MODE_OVER
ITEM_022 .STR "BATTLE TOADS &"
 .DB MODE_CNTS,$10
 .STR "DOUBLE DRAGON"
 .DB MODE_OVER
ITEM_023 .STR "GETSUFUU MADEN"
 .DB MODE_OVER
ITEM_024 .STR "RUSH'N ATTACK"
 .DB MODE_OVER
ITEM_025 .STR "JACKAL"
 .DB MODE_OVER
ITEM_026 .STR "BATTLE CITY"
 .DB MODE_OVER
ITEM_027 .STR "THE LEGEND OF KAGE"
 .DB MODE_OVER
ITEM_028 .STR "YIE AR KUNG FU"
 .DB MODE_OVER
ITEM_029 .STR "ADVENTURE ISLAND 1"
 .DB MODE_OVER
ITEM_030 .STR "ADVENTURE ISLAND 2"
 .DB MODE_OVER
ITEM_031 .STR "ADVENTURE ISLAND 3"
 .DB MODE_OVER
ITEM_032 .STR "ADVENTURE ISLAND 4"
 .DB MODE_OVER
ITEM_033 .STR "CRISIS FORCE"
 .DB MODE_OVER
ITEM_034 .STR "RECCA"
 .DB MODE_OVER
ITEM_035 .STR "POWER RANGERS"
 .DB MODE_OVER
ITEM_036 .STR "SALAMANDER"
 .DB MODE_OVER
ITEM_037 .STR "CHIP & DALE 1"
 .DB MODE_OVER
ITEM_038 .STR "CHIP & DALE 2"
 .DB MODE_OVER
ITEM_039 .STR "GUERILLA WAR"
 .DB MODE_OVER
ITEM_040 .STR "SILK WORM"
 .DB MODE_OVER
ITEM_041 .STR "WAI WAI WORLD 1"
 .DB MODE_OVER
ITEM_042 .STR "WAI WAI WORLD 2"
 .DB MODE_OVER
ITEM_043 .STR "BOMBERMAN 1"
 .DB MODE_OVER
ITEM_044 .STR "BOMBERMAN 2"
 .DB MODE_OVER
ITEM_045 .STR "SNOW BROS"
 .DB MODE_OVER
ITEM_046 .STR "RAINBOW ISLANDS"
 .DB MODE_OVER
ITEM_047 .STR "DBZ KYOUSHUU!"
 .DB MODE_CNTS,$10
 .STR "SAIYA"
 .DB MODE_OVER
ITEM_048 .STR "DBZ GAIDEN"
 .DB MODE_OVER
ITEM_049 .STR "DBZ 2: GEKISHIN"
 .DB MODE_CNTS,$10
 .STR "FREEZA!!"
 .DB MODE_OVER
ITEM_050 .STR "DBZ 3: RESSEN"
 .DB MODE_CNTS,$10
 .STR "JINZOUNINGEN"
 .DB MODE_OVER

;========================================
ItemText_Data_L:;节目文本地址低位
 .DB <ITEM_001,<ITEM_002,<ITEM_003,<ITEM_004,<ITEM_005,<ITEM_006,<ITEM_007,<ITEM_008,<ITEM_009,<ITEM_010
 .DB <ITEM_011,<ITEM_012,<ITEM_013,<ITEM_014,<ITEM_015,<ITEM_016,<ITEM_017,<ITEM_018,<ITEM_019,<ITEM_020
 .DB <ITEM_021,<ITEM_022,<ITEM_023,<ITEM_024,<ITEM_025,<ITEM_026,<ITEM_027,<ITEM_028,<ITEM_029,<ITEM_030
 .DB <ITEM_031,<ITEM_032,<ITEM_033,<ITEM_034,<ITEM_035,<ITEM_036,<ITEM_037,<ITEM_038,<ITEM_039,<ITEM_040
 .DB <ITEM_041,<ITEM_042,<ITEM_043,<ITEM_044,<ITEM_045,<ITEM_046,<ITEM_047,<ITEM_048,<ITEM_049,<ITEM_050
ItemText_Data_H:;节目文本地址高位
 .DB >ITEM_001,>ITEM_002,>ITEM_003,>ITEM_004,>ITEM_005,>ITEM_006,>ITEM_007,>ITEM_008,>ITEM_009,>ITEM_010
 .DB >ITEM_011,>ITEM_012,>ITEM_013,>ITEM_014,>ITEM_015,>ITEM_016,>ITEM_017,>ITEM_018,>ITEM_019,>ITEM_020
 .DB >ITEM_021,>ITEM_022,>ITEM_023,>ITEM_024,>ITEM_025,>ITEM_026,>ITEM_027,>ITEM_028,>ITEM_029,>ITEM_030
 .DB >ITEM_031,>ITEM_032,>ITEM_033,>ITEM_034,>ITEM_035,>ITEM_036,>ITEM_037,>ITEM_038,>ITEM_039,>ITEM_040
 .DB >ITEM_041,>ITEM_042,>ITEM_043,>ITEM_044,>ITEM_045,>ITEM_046,>ITEM_047,>ITEM_048,>ITEM_049,>ITEM_050
;========================================
Sound_Song_Sum:
 .DB 051,067,057,071,076,102,045,054,062,078
 .DB 088,044,039,054,038,033,041,083,077,042
 .DB 088,034,046,063,019,021,021,003,033,085
 .DB 090,076,013,040,018,033,016,116,048,008
 .DB 022,137,017,028,034,040,097,070,124,060
;========================================
Sound_Song_Start:
 .DB 006,014,001,019,012,026,001,001,015,022
 .DB 009,007,007,005,001,007,032,001,001,008
 .DB 004,001,038,002,010,001,001,001,001,001
 .DB 001,014,001,002,001,003,001,001,001,001
 .DB 001,004,001,001,001,001,001,013,060,002
;========================================
Sound_Init_Port_L:
 .DB $03,$03,$03,$03,$03,$03,$03,$03,$00,$00
 .DB $C0,$F0,$00,$00,$C8,$B0,$E0,$00,$E0,$C0
 .DB $00,$00,$F0,$00,$F0,$76,$C0,$00,$00,$00
 .DB $00,$40,$00,$00,$00,$F0,$99,$F0,$00,$90
 .DB $00,$C0,$36,$FA,$00,$00,$00,$90,$00,$F0
Sound_Init_Port_H:
 .DB $90,$80,$80,$80,$80,$80,$80,$80,$C4,$BF
 .DB $9F,$BB,$DF,$D4,$BF,$D7,$BF,$80,$BF,$9E
 .DB $D0,$80,$BF,$BF,$BF,$8F,$D6,$C0,$C0,$FF
 .DB $FF,$FF,$D1,$FF,$BF,$BF,$AF,$BF,$D7,$BD
 .DB $C1,$C7,$EF,$D7,$BF,$BF,$CC,$BF,$D8,$BF
;========================================
Sound_Play_Port_L:
 .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
 .DB $80,$D5,$3C,$0F,$00,$01,$03,$96,$03,$00
 .DB $01,$C8,$5F,$A1,$08,$7E,$BB,$F9,$12,$8C
 .DB $57,$09,$63,$25,$00,$00,$00,$00,$24,$00
 .DB $00,$32,$7A,$06,$00,$03,$07,$E7,$0D,$7B
Sound_Play_Port_H:
 .DB $90,$80,$80,$80,$80,$80,$80,$80,$80,$BE
 .DB $9E,$80,$81,$AA,$80,$80,$80,$81,$80,$A0
 .DB $80,$8C,$81,$82,$80,$8A,$C7,$CE,$C0,$E8
 .DB $EA,$80,$81,$CB,$BE,$80,$80,$80,$80,$81
 .DB $80,$C6,$EF,$D8,$80,$80,$80,$84,$80,$81
;========================================
Sound_Bank_8000:
 .DB $80,$82,$84,$87,$8A,$8D,$90,$92,$94,$96
 .DB $99,$9D,$9F,$A2,$A6,$A8,$AB,$AD,$AF,$B1
 .DB $B3,$B6,$B9,$BB,$BD,$BF,$FE,$FE,$FE,$C3
 .DB $C5,$C7,$C9,$CB,$CF,$D3,$D6,$D8,$DA,$DC
 .DB $DE,$E2,$FE,$EA,$EE,$F1,$F5,$F8,$FA,$FD
Sound_Bank_A000:
 .DB $81,$83,$85,$88,$8B,$8E,$91,$93,$95,$97
 .DB $9A,$9E,$A0,$A3,$A7,$A9,$AC,$AE,$B0,$B2
 .DB $B4,$B7,$BA,$BC,$BE,$BF,$FE,$FE,$FE,$FE
 .DB $FE,$C8,$CA,$CC,$D0,$D4,$D7,$D9,$DB,$DD
 .DB $DF,$E1,$FE,$EB,$EF,$F2,$F6,$F9,$FB,$FE
Sound_Bank_C000:
 .DB $FE,$FE,$FE,$FE,$FE,$FE,$FE,$FE,$9C,$9C
 .DB $9C,$A4,$A5,$A4,$AA,$AA,$FE,$FE,$FE,$FE
 .DB $B5,$B8,$FE,$FE,$B8,$FE,$C0,$C1,$C2,$FE
 .DB $FE,$FE,$E8,$CD,$FE,$FE,$FE,$FE,$E8,$FE
 .DB $E0,$E8,$FE,$EC,$F0,$F3,$F7,$FE,$FC,$FE
Sound_Bank_E000:
 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
 .DB $FF,$FF,$FF,$FF,$FF,$BF,$FF,$FF,$FF,$FF
 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$C4
 .DB $C6,$C6,$FF,$CE,$FF,$FF,$FF,$FF,$FF,$FF
 .DB $E0,$FF,$E9,$FF,$FF,$F4,$FF,$FF,$FF,$FF
 
 .DCB $800,$FF
[FC][FC音乐50合1][MMC5][20190115]-0.png
[FC][FC音乐50合1][MMC5][20190115]-0.png (2.48 KiB) Viewed 1183 times
[FC][FC音乐50合1][MMC5][20190115]-1.png
[FC][FC音乐50合1][MMC5][20190115]-1.png (2.63 KiB) Viewed 1183 times
[FC][FC音乐50合1][MMC5][20190115]-2.png
[FC][FC音乐50合1][MMC5][20190115]-2.png (2.85 KiB) Viewed 1183 times
[FC][FC音乐50合1][MMC5][20190115]-3.png
[FC][FC音乐50合1][MMC5][20190115]-3.png (2.89 KiB) Viewed 1183 times
rom demo(1.25MB):
[FC][FC音乐50合1][MMC5][20190115].zip
(551.33 KiB) Downloaded 43 times

Post Reply