请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

新模拟器共享论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

1

最近看过此主题的会员

查看: 317|回复: 30

[原创] [FC][魂斗罗][最佳可视化]

    [复制链接]

签到天数: 348 天

[LV.8]以坛为家I

评论头像

发表于 2019-11-29 17:26:59 | 显示全部楼层 |阅读模式
本帖最后由 FlameCyclone 于 2019-12-4 21:30 编辑

[FC][魂斗罗][最佳可视化]
时间:2019.11.30
作者:FlameCyclone
内容:
1.可视化:   
     (1)暂停时按选择键进入菜单
     (2)方向键选择功能: B键开启: A键关闭: 选择键交换,开始键退出
     1.1.透明无敌: 透明无敌
     1.2.加强无敌: 金身无敌
     1.3.生命锁定: 生命锁定3条
     1.4.武器锁定: 武器保持不变
     1.5.武器切换: 游戏时按选择键切换武器
     1.6.无限跳跃: 跳跃无限触发
     1.7.快速移动: 行走速度加倍
     1.8.皮肤切换: 交换玩家肤色
     1.9.公平子弹: 玩家子弹可以与敌人子弹对打
     1.10.强力子弹: 子弹打中敌人后继续穿透
     1.11.一击必杀: 敌方中弹一发必死
     1.12.全屏击杀: 开枪时全屏可击中目标必死
     1.13.玩家双控: 两个玩家的任意一方均可同时控制两个玩家
     1.14.移除电网: 移除2,4关的电网
     1.15.掉坑不死: 掉坑后不会死亡
     1.16.跳过关卡: 跳转到下一关


成长力: 0个(别问为什么, 成长力无法拯救我)
  1. ;[FC][魂斗罗][最佳可视化]
  2. ;20191129

  3. ;程序开始地址
  4. .ORG $9000

  5. ;==================================================
  6. ;==================================================
  7. ;是否双人玩家
  8. FC_IS_DOUBLE_PLAYERS = 1

  9. ;==================================================
  10. ;PPU缓冲地址配置
  11. FC_PPU_Buffer = $0300
  12. ;PPU地址配置
  13. FC_PPU_Cursor = $00
  14. FC_PPU_Status = FC_PPU_Cursor+$01
  15. FC_PPU_Data_Cnt = FC_PPU_Status + $01
  16. FC_Data_Port_A_L = FC_PPU_Data_Cnt + $01
  17. FC_Data_Port_A_H = FC_Data_Port_A_L + $01
  18. FC_Data_Port_B_L = FC_Data_Port_A_H + $01
  19. FC_Data_Port_B_H = FC_Data_Port_B_L + $01
  20. ;==================================================

  21. ;==================================================
  22. ;选择项地址配置
  23. FC_Select_Index = FC_Data_Port_B_H + $01
  24. FC_Select_Temp = FC_Select_Index + $02
  25. ;NMI循环计时器
  26. FC_Time_Count = FC_Select_Temp + $01
  27. ;==================================================

  28. ;==================================================
  29. ;光标配置
  30. FC_Cursor_Addr_L = FC_Time_Count + $01
  31. FC_Cursor_Addr_H = FC_Cursor_Addr_L + $01
  32. FC_Cursor_X = FC_Cursor_Addr_H + $01
  33. FC_Cursor_Y = FC_Cursor_X + $01
  34. ;----------------------------------------
  35. ;光标图形号
  36. FC_CURSOR_TILE = $3E
  37. ;光标偏移像素值
  38. FC_CURSOR_OFFSET_X = 12
  39. FC_CURSOR_OFFSET_Y = 1
  40. FC_FUNCTION_OFFSET = 21
  41. FC_ON_TILE = $3D
  42. FC_OFF_TILE = $3C
  43. ;==================================================

  44. ;==================================================
  45. ;翻页配置
  46. FC_Page_Old = FC_Cursor_Y + $01
  47. FC_Page_Cur = FC_Page_Old + $01
  48. FC_Page_Item_Count = FC_Page_Cur + $01
  49. FC_Page_Item_Buffer = FC_Page_Item_Count + $01
  50. ;----------------------------------------
  51. ;翻页属性
  52. FC_PAGE_SIZE = 10
  53. ;PPU单次写入缓冲项数
  54. FC_PAGE_BUF_SIZE = 2
  55. ;----------------------------------------
  56. ;显示项最大索引属性
  57. FC_ITEM_SUM = 16 - 1
  58. ;最大页索引属性
  59. FC_PAGE_MAX = FC_ITEM_SUM/FC_PAGE_SIZE*FC_PAGE_SIZE
  60. ;==================================================

  61. ;==================================================
  62. ;按键配置
  63. Button_Keep = FC_Page_Item_Buffer + $01
  64. Button_Once = Button_Keep+$02
  65. Button_Temp = Button_Once+$02
  66. Button_Buf = Button_Temp+$02
  67. Button_Status = Button_Buf+$02
  68. Button_Auto_Delay = Button_Status+$02
  69. ;----------------------------------------
  70. BUTTON_DELAY_MAX = $18
  71. BUTTON_DELAY_SPEED = $08

  72. BTN_UP = $08
  73. BTN_DOWN = $04
  74. BTN_LEFT = $02
  75. BTN_RIGHT = $01
  76. BTN_SELECT = $20
  77. BTN_START = $10
  78. BTN_B = $40
  79. BTN_A = $80
  80. ;==================================================

  81. FC_Copy_Addr = Button_Auto_Delay + $01
  82. ;----------------------------------------
  83. FC_Clear_Val   = FC_Copy_Addr+$00      ;清除模式覆盖值
  84. FC_Cpy_From_L   = FC_Copy_Addr+$00     ;复制来源地址低位
  85. FC_Cpy_From_H   = FC_Copy_Addr+$01     ;复制来源地址高位
  86. FC_Cpy_To_L     = FC_Copy_Addr+$02     ;复制目的地址低位
  87. FC_Cpy_To_H     = FC_Copy_Addr+$03     ;复制目的地址高位
  88. FC_Cpy_Count_L = FC_Copy_Addr+$04      ;复制长度低位
  89. FC_Cpy_Count_H = FC_Copy_Addr+$05      ;复制长度高位
  90. FC_Cpy_Port_L   = FC_Copy_Addr+$06     ;配置地址低位
  91. FC_Cpy_Port_H   = FC_Copy_Addr+$07     ;配置地址高位
  92. ;----------------------------------------
  93. FC_MODE_RAM_TO_RAM     = $00  ;复制RAM到RAM模式
  94. FC_MODE_RAM_TO_PPU     = $01  ;复制RAM到PPU模式
  95. FC_MODE_PPU_TO_RAM     = $02  ;复制PPU到RAM模式
  96. FC_MODE_PPU_CLEAR     = $03  ;清除PPU模式

  97. ;==================================================
  98. Rom_Nmi_Addr = $FF
  99. Rom_Btn_Once = $F5
  100. Rom_Btn_Keep = $F9
  101. Rom_Pause_Addr = $25
  102. Rom_Pause_Val = $01
  103. Rom_Pal_Addr = $07C0
  104. ;----------------------------------------
  105. Save_Zero_Addr = $6200
  106. ;==================================================
  107. ;==================================================

  108. ;程序入口
  109. Enter:
  110. LDA Rom_Pause_Addr
  111. AND #Rom_Pause_Val
  112. BEQ Quit_End
  113. LDA Rom_Btn_Once
  114. CMP #BTN_SELECT
  115. BNE Quit_End
  116. PHA
  117. TXA
  118. PHA
  119. TYA
  120. PHA
  121. JSR Wait_Sound_Stop
  122. JSR Save_Screen
  123. JSR Program_Begin
  124. JSR Load_Screen
  125. LDA #$10
  126. STA Rom_Btn_Keep
  127. LDA #$00
  128. STA Rom_Btn_Once
  129. Quit:
  130. PLA
  131. TAY
  132. PLA
  133. TAX
  134. PLA
  135. Quit_End:
  136. RTS

  137. ;==================================================
  138. ;等待音乐结束
  139. Wait_Sound_Stop:
  140. Wait_Sound_Stop_Check:
  141. JSR NMI_Wait
  142. JSR $F825
  143. LDA $010A
  144. BNE Wait_Sound_Stop_Check
  145. RTS

  146. ;==================================================
  147. ;保存屏幕数据
  148. Save_Screen:
  149. JSR Screen_Off
  150. JSR Save_Zero
  151. JSR Save_Ram
  152. JSR Save_Ppu
  153. JSR Ram_Init
  154. JSR Sprites_Init
  155. JSR Clear_Ppu
  156. RTS

  157. ;==================================================
  158. ;加载屏幕数据
  159. Load_Screen:
  160. LDA #$00
  161. STA $2001
  162. JSR NMI_Wait
  163. LDA #$02
  164. STA $4014
  165. JSR Load_Ram
  166. JSR Load_Ppu
  167. JSR Load_Zero
  168. JSR NMI_Wait
  169. JSR Load_Palette
  170. JSR Screen_On
  171. RTS

  172. ;==================================================
  173. ;关闭屏幕
  174. Screen_Off:
  175. LDA Rom_Nmi_Addr
  176. AND #$7F
  177. STA $2000
  178. JSR NMI_Wait
  179. LDA #$00
  180. STA $2000
  181. STA $2001
  182. RTS

  183. ;==================================================
  184. ;开启屏幕
  185. Screen_On:
  186. LDA Rom_Nmi_Addr
  187. STA $2000
  188. RTS

  189. ;==================================================
  190. ;清空占用RAM
  191. Ram_Init:
  192. LDX #$00
  193. LDA #$00
  194. Ram_Init_Set:
  195. STA $00,X
  196. INX
  197. CPX #$40
  198. BCC Ram_Init_Set
  199. RTS

  200. ;==================================================
  201. ;清空占用RAM
  202. Sprites_Init:
  203. LDA $2002
  204. LDX #$00
  205. STX $2003
  206. LDA #$F8
  207. Sprites_Init_Set:
  208. STA $2004
  209. INX
  210. BNE Sprites_Init_Set
  211. RTS

  212. ;==================================================
  213. ;保存零页数据
  214. Save_Zero:
  215. LDX #$00
  216. Save_Zero_Set:
  217. LDA $00,X
  218. STA Save_Zero_Addr,X
  219. INX
  220. BNE Save_Zero_Set
  221. RTS

  222. ;==================================================
  223. ;加载零页数据
  224. Load_Zero:
  225. LDX #$00
  226. Load_Zero_Set:
  227. LDA Save_Zero_Addr,X
  228. STA $00,X
  229. INX
  230. BNE Load_Zero_Set
  231. RTS

  232. ;==================================================
  233. ;恢复调色板
  234. Load_Palette:
  235. LDA #$3F
  236. STA $2006
  237. LDA #$00
  238. STA $2006
  239. LDX #$00
  240. Load_Palette_Set:
  241. LDA Rom_Pal_Addr,X
  242. STA $2007
  243. INX
  244. CPX #$20
  245. BCC Load_Palette_Set
  246. RTS

  247. ;==================================================
  248. ;==================================================

  249. ;==================================================
  250. ;程序开始
  251. Program_Begin:
  252. ;==================================================
  253. ;图形设置
  254. JSR CHR_Set
  255. JSR NMI_Wait
  256. JSR Palette_Set
  257. JSR PPU_Data_Page_Show

  258. ;==================================================
  259. ;开启显示
  260. LDA #$1E
  261. STA FC_PPU_Status

  262. LDA #BTN_SELECT
  263. STA Button_Keep
  264. ;==================================================
  265. ;模拟NMI循环
  266. NMI_Loop:
  267. JSR NMI_Delay
  268. JSR Button_Process
  269. JSR Button_Auto_Press
  270. JSR Change_Select_Item
  271. JSR Change_Function
  272. LDA Button_Once
  273. CMP #BTN_START
  274. BNE NMI_Loop
  275. RTS

  276. ;==================================================
  277. ;模拟NMI中断
  278. NMI_Delay:
  279. JSR NMI_Wait
  280. JSR Show_Select_Cursor
  281. JSR FC_PPU_Process
  282. RTS

  283. ;==================================================
  284. ;等待NMI中断
  285. NMI_Wait:
  286. LDA $2002
  287. BPL NMI_Wait
  288. DEC FC_Time_Count
  289. RTS

  290. ;==================================================
  291. ;PPU写入模式配置属性
  292. FC_PPU_MODE_CNTL = $FE               ;带计数行写入
  293. FC_PPU_MODE_CNTC = $FC               ;带计数行清除
  294. ;-------------------------------------------------
  295. ;PPU处理
  296. FC_PPU_Process:
  297. LDA FC_PPU_Buffer
  298. BEQ FC_PPU_Process_End
  299. JSR FC_PPU_Process_Beg
  300. FC_PPU_Process_End:
  301. LDA #$00
  302. STA FC_PPU_Buffer
  303. STA $2006
  304. STA $2006
  305. STA $2005
  306. STA $2005
  307. LDA FC_PPU_Status
  308. STA $2001
  309. RTS
  310. ;----------------------------------------
  311. ;PPU处理开始
  312. FC_PPU_Process_Beg:
  313. LDX FC_PPU_Cursor
  314. LDA #$00
  315. STA $2001
  316. STA FC_PPU_Buffer,X
  317. STA FC_PPU_Cursor
  318. LDX #$FF
  319. CLV
  320. FC_PPU_Process_Mode_Select:
  321. INX
  322. LDA FC_PPU_Buffer,X
  323. CMP #FC_PPU_MODE_CNTL
  324. BEQ FC_PPU_Process_Mode_CountLine
  325. CMP #FC_PPU_MODE_CNTC
  326. BEQ FC_PPU_Process_Mode_CountClean
  327. RTS
  328. ;----------------------------------------
  329. ;计数行写入模式
  330. FC_PPU_Process_Mode_CountLine:
  331. JSR FC_PPU_Process_Set_Addr_And_Count
  332. FC_PPU_Process_Mode_CountLine_Write:
  333. INX
  334. LDA FC_PPU_Buffer,X
  335. STA $2007
  336. DEY
  337. BNE FC_PPU_Process_Mode_CountLine_Write
  338. BVC FC_PPU_Process_Mode_Select
  339. ;----------------------------------------
  340. ;计数行清除模式
  341. FC_PPU_Process_Mode_CountClean:
  342. JSR FC_PPU_Process_Set_Addr_And_Count
  343. LDA #$00
  344. FC_PPU_Process_Mode_CountClean_Write:
  345. STA $2007
  346. DEY
  347. BNE FC_PPU_Process_Mode_CountClean_Write
  348. BVC FC_PPU_Process_Mode_Select
  349. ;----------------------------------------
  350. ;设置PPU地址和写入计数
  351. FC_PPU_Process_Set_Addr_And_Count:
  352. INX
  353. LDA FC_PPU_Buffer,X
  354. STA $2006
  355. INX
  356. LDA FC_PPU_Buffer,X
  357. STA $2006
  358. INX
  359. LDY FC_PPU_Buffer,X
  360. RTS

  361. ;==================================================
  362. ;设置CHR图形
  363. CHR_Set:
  364. LDX #$05
  365. CHR_Set_Data:
  366. STX $8000
  367. LDA CHR_Data,x
  368. STA $8001
  369. DEX
  370. BPL CHR_Set_Data
  371. RTS
  372. ;----------------------------------------
  373. ;CHR图形bank数据
  374. CHR_Data:
  375. .BYTE $00,$00,$00,$00,$00,$00

  376. ;==================================================
  377. ;背景调色板设置
  378. Palette_Set:
  379. LDA #$3F
  380. STA $2006
  381. LDA #$00
  382. STA $2006
  383. LDX #$00
  384. Palette_Set_Data:
  385. LDA Palette_Data,X
  386. STA $2007
  387. INX
  388. CPX #$20
  389. BCC Palette_Set_Data
  390. RTS
  391. ;----------------------------------------
  392. ;背景调色板数据
  393. Palette_Data:
  394. .DB $0F,$29,$24,$24,$0F,$20,$20,$20,$0F,$26,$26,$26,$0F,$2A,$2A,$2A
  395. .DB $0F,$20,$26,$16,$0F,$24,$24,$24,$0F,$26,$26,$26,$0F,$2A,$2A,$2A


  396. ;==================================================
  397. ;按键扫描
  398. Button_Process:
  399. LDX #$01
  400. Button_Process_Beg:
  401. JSR Button_Scan
  402. LDA Button_Keep,X
  403. STA Button_Temp,X
  404. JSR Button_Scan
  405. LDA Button_Keep,X
  406. CMP Button_Temp,X
  407. BEQ Button_Get_Once
  408. LDA Button_Buf,X
  409. STA Button_Keep,X
  410. Button_Get_Once:
  411. TAY
  412. EOR Button_Buf,X
  413. AND Button_Keep,X
  414. STA Button_Once,X
  415. STY Button_Buf,X
  416. DEX
  417. BPL Button_Process_Beg
  418. RTS
  419. ;----------------------------------------
  420. Button_Scan:
  421. LDA #$01
  422. STA $4016
  423. LDA #$00
  424. STA $4016
  425. LDY #$08
  426. Button_Value:
  427. LDA $4016,X
  428. STA Button_Status,X
  429. LSR
  430. ORA Button_Status,X
  431. LSR
  432. ROL Button_Keep,X
  433. DEY
  434. BNE Button_Value
  435. RTS

  436. ;==================================================
  437. ;按键自动按压
  438. Button_Auto_Press:
  439. LDA Button_Keep
  440. ORA Button_Keep + 1
  441. BEQ Button_Auto_Press_End
  442. INC Button_Auto_Delay
  443. LDA Button_Auto_Delay
  444. CMP #BUTTON_DELAY_MAX
  445. BCC Button_Auto_Press_No_Active
  446. LDA Button_Keep
  447. STA Button_Once
  448. LDA Button_Keep + 1
  449. STA Button_Once + 1
  450. LDA Button_Auto_Delay
  451. SEC
  452. SBC #BUTTON_DELAY_SPEED
  453. STA Button_Auto_Delay
  454. Button_Auto_Press_No_Active:
  455. RTS
  456. ;----------------------------------------
  457. ;未按压按键
  458. Button_Auto_Press_End:
  459. LDA #$00
  460. STA Button_Auto_Delay
  461. RTS

  462. ;==================================================
  463. ;设置PPU写入模式
  464. Set_PPU_Mode:
  465. LDX FC_PPU_Cursor
  466. STA FC_PPU_Buffer,X
  467. INX
  468. STX FC_PPU_Cursor
  469. RTS

  470. ;==================================================
  471. ;写入单独一行文本
  472. Set_Select_Addr:
  473. LDX FC_PPU_Cursor
  474. LDA FC_Select_Temp
  475. ASL
  476. TAY
  477. INY
  478. LDA Text_PPU_Addr,Y
  479. STA FC_PPU_Buffer,X
  480. INX
  481. DEY
  482. LDA Text_PPU_Addr,Y
  483. STA FC_PPU_Buffer,X
  484. INX
  485. STX FC_PPU_Cursor
  486. RTS

  487. ;==================================================
  488. ;写入单独一行文本
  489. Set_Select_Data:
  490. LDA FC_Select_Temp
  491. CLC
  492. ADC FC_Page_Cur
  493. ASL
  494. TAY
  495. INY
  496. LDA Text_Data_Addr,Y
  497. STA FC_Data_Port_A_H
  498. DEY
  499. LDA Text_Data_Addr,Y
  500. STA FC_Data_Port_A_L
  501. RTS

  502. ;==================================================
  503. ;清除旧文本
  504. Set_Select_Data_Clean:
  505. LDA FC_Select_Temp
  506. CLC
  507. ADC FC_Page_Old
  508. ASL
  509. TAY
  510. INY
  511. LDA Text_Data_Addr,Y
  512. STA FC_Data_Port_A_H
  513. DEY
  514. LDA Text_Data_Addr,Y
  515. STA FC_Data_Port_A_L
  516. RTS

  517. ;==================================================
  518. ;写入单独一行文本
  519. PPU_Data_Write_Item:
  520. LDA FC_Select_Temp
  521. CLC
  522. ADC FC_Page_Cur
  523. CMP #FC_ITEM_SUM
  524. BEQ PPU_Data_Write_Item_Set
  525. BCS PPU_Data_Write_Item_End
  526. PPU_Data_Write_Item_Set:
  527. LDA #FC_PPU_MODE_CNTL
  528. JSR Set_PPU_Mode
  529. JSR Set_Select_Addr
  530. JSR Set_Select_Data
  531. JSR PPU_Data_Write_Line
  532. PPU_Data_Write_Item_End:
  533. RTS

  534. ;==================================================
  535. ;清除单独一行文本
  536. PPU_Data_Clean_Item:
  537. LDA FC_Select_Temp
  538. CLC
  539. ADC FC_Page_Old
  540. CMP #FC_ITEM_SUM
  541. BEQ PPU_Data_Clean_Item_Set
  542. BCS PPU_Data_Clean_Item_End
  543. PPU_Data_Clean_Item_Set:
  544. LDA #FC_PPU_MODE_CNTC
  545. JSR Set_PPU_Mode
  546. JSR Set_Select_Addr
  547. JSR Set_Select_Data_Clean
  548. JSR PPU_Data_Clean_Line
  549. PPU_Data_Clean_Item_End:
  550. RTS

  551. ;==================================================
  552. ;页内容写入
  553. PPU_Data_Page_Show:
  554. LDA #FC_PAGE_SIZE
  555. STA FC_Page_Item_Count
  556. LDA #$00
  557. STA FC_Page_Item_Buffer
  558. STA FC_Select_Temp
  559. PPU_Data_Page_Item_Set:
  560. JSR PPU_Data_Clean_Item
  561. JSR PPU_Data_Write_Item
  562. JSR Function_Status_Clean
  563. JSR Function_Status_Show
  564. INC FC_Select_Temp
  565. INC FC_Page_Item_Buffer
  566. LDA FC_Page_Item_Buffer
  567. CMP #FC_PAGE_BUF_SIZE
  568. BNE PPU_Data_Page_Item_Set_Check
  569. JSR NMI_Delay
  570. LDA #$00
  571. STA FC_Page_Item_Buffer
  572. PPU_Data_Page_Item_Set_Check:
  573. DEC FC_Page_Item_Count
  574. BNE PPU_Data_Page_Item_Set
  575. PPU_Data_Page_Show_End_Check:
  576. LDA FC_Page_Item_Buffer
  577. BEQ PPU_Data_Page_Show_End
  578. JSR NMI_Delay
  579. PPU_Data_Page_Show_End:
  580. RTS

  581. ;==================================================
  582. ;PPU单行数据写入接口
  583. PPU_Data_Write_Line:
  584. LDX FC_PPU_Cursor
  585. LDY #$00
  586. LDA (FC_Data_Port_A_L),Y
  587. STA FC_PPU_Buffer,X
  588. STA FC_PPU_Data_Cnt
  589. INX
  590. STX FC_PPU_Cursor
  591. INY
  592. PPU_Data_Write_Line_Set:
  593. LDA (FC_Data_Port_A_L),Y
  594. TAX
  595. LDA Char_Rom,X
  596. LDX FC_PPU_Cursor
  597. STA FC_PPU_Buffer,X
  598. INX
  599. STX FC_PPU_Cursor
  600. INY
  601. DEC FC_PPU_Data_Cnt
  602. BNE PPU_Data_Write_Line_Set
  603. STX FC_PPU_Cursor
  604. RTS

  605. ;==================================================
  606. ;PPU单行数据清空接口
  607. PPU_Data_Clean_Line:
  608. LDX FC_PPU_Cursor
  609. LDY #$00
  610. LDA (FC_Data_Port_A_L),Y
  611. STA FC_PPU_Buffer,X
  612. INX
  613. STX FC_PPU_Cursor
  614. RTS

  615. ;==================================================
  616. ;更改选择项
  617. Change_Select_Item:
  618. Change_Previous_Page:
  619. LDA Button_Once
  620. ORA Button_Once + 1
  621. AND #$02
  622. BEQ Change_Next_Page
  623. JSR Change_To_Previous_Page
  624. Change_Next_Page:
  625. LDA Button_Once
  626. ORA Button_Once + 1
  627. AND #$01
  628. BEQ Change_Previous_Item
  629. JSR Change_To_Next_Page
  630. Change_Previous_Item:
  631. LDA Button_Once
  632. ORA Button_Once + 1
  633. AND #$08
  634. BEQ Change_Next_Item
  635. JSR Change_To_Previous_Item
  636. Change_Next_Item:
  637. LDA Button_Once
  638. ORA Button_Once + 1
  639. .IF FC_IS_DOUBLE_PLAYERS
  640. AND #$04
  641. .ELSE
  642. AND #$24
  643. .ENDIF
  644. BEQ Change_Select_Item_End
  645. JSR Change_To_Next_Item
  646. Change_Select_Item_End:
  647. RTS

  648. ;==================================================
  649. ;切换到上一个选项
  650. Change_To_Previous_Item:
  651. LDA FC_Select_Index
  652. BNE Change_To_Previous_Item_Set
  653. ;----------------------------------------
  654. ;切换到末页最后一项
  655. Change_To_Previous_Item_Set_Last_Page:
  656. JSR Record_Last_Page_Index
  657. LDA #FC_ITEM_SUM
  658. STA FC_Select_Index
  659. LDA #FC_PAGE_MAX
  660. STA FC_Page_Cur
  661. JSR Update_Page_Content
  662. RTS
  663. ;----------------------------------------
  664. ;切换到上一个
  665. Change_To_Previous_Item_Set:
  666. ;检查是否需要换页
  667. LDA FC_Select_Index
  668. CMP FC_Page_Cur
  669. BNE Change_To_Previous_Item_Set_No_Page
  670. ;----------------------------------------
  671. ;切换到上一个(需换页)
  672. Change_To_Previous_Item_Set_Page:
  673. JSR Record_Last_Page_Index
  674. LDA FC_Page_Cur
  675. SEC
  676. SBC #FC_PAGE_SIZE
  677. STA FC_Page_Cur
  678. DEC FC_Select_Index
  679. JSR Update_Page_Content
  680. RTS
  681. ;----------------------------------------
  682. ;切换到上一个(无换页)
  683. Change_To_Previous_Item_Set_No_Page:
  684. DEC FC_Select_Index
  685. RTS

  686. ;==================================================
  687. ;切换到下一个选项
  688. Change_To_Next_Item:
  689. LDA FC_Select_Index
  690. CMP #FC_ITEM_SUM
  691. BNE Change_To_Next_Item_Set
  692. ;----------------------------------------
  693. ;切换到起始页第一个
  694. Change_To_Next_Item_Set_Begin_Page:
  695. JSR Record_Last_Page_Index
  696. LDA #$00
  697. STA FC_Select_Index
  698. STA FC_Page_Cur
  699. JSR Update_Page_Content
  700. RTS
  701. ;----------------------------------------
  702. ;切换到下一个
  703. Change_To_Next_Item_Set:
  704. INC FC_Select_Index
  705. LDA FC_Page_Cur
  706. CLC
  707. ADC #FC_PAGE_SIZE
  708. CMP FC_Select_Index
  709. BNE Change_To_Next_Item_Set_End
  710. ;----------------------------------------
  711. ;切换到下一个(需换页)
  712. Change_To_Next_Item_Set_Page
  713. JSR Record_Last_Page_Index
  714. LDA FC_Page_Cur
  715. CLC
  716. ADC #FC_PAGE_SIZE
  717. STA FC_Page_Cur
  718. JSR Update_Page_Content
  719. Change_To_Next_Item_Set_End:
  720. RTS

  721. ;==================================================
  722. ;切换到上一页
  723. Change_To_Previous_Page:
  724. LDA FC_Page_Cur
  725. BEQ Change_To_Previous_Page_Set_Last_Page
  726. JSR Record_Last_Page_Index
  727. LDA FC_Page_Cur
  728. SEC
  729. SBC #FC_PAGE_SIZE
  730. STA FC_Page_Cur
  731. LDA FC_Select_Index
  732. SEC
  733. SBC #FC_PAGE_SIZE
  734. STA FC_Select_Index
  735. JSR Update_Page_Content
  736. Change_Select_Last_Page_End:
  737. RTS
  738. ;----------------------------------------
  739. ;切换到最后一页
  740. Change_To_Previous_Page_Set_Last_Page:
  741. LDA #FC_PAGE_MAX
  742. BEQ Change_To_Previous_Page_Set_Begin_Item
  743. JSR Record_Last_Page_Index
  744. LDA FC_Select_Index
  745. SEC
  746. SBC FC_Page_Cur
  747. CLC
  748. ADC #FC_PAGE_MAX
  749. STA FC_Select_Index
  750. LDA #FC_PAGE_MAX
  751. STA FC_Page_Cur
  752. LDA FC_Select_Index
  753. CMP #FC_ITEM_SUM
  754. BCC Change_To_Previous_Page_Set_Last_Page_End
  755. ;----------------------------------------
  756. ;切换到最后一项
  757. Change_To_Previous_Page_Set_Last_Item
  758. LDA #FC_ITEM_SUM
  759. STA FC_Select_Index
  760. Change_To_Previous_Page_Set_Last_Page_End:
  761. JSR Update_Page_Content
  762. RTS
  763. ;----------------------------------------
  764. ;切换到起始项(最大页只有一页时)
  765. Change_To_Previous_Page_Set_Begin_Item:
  766. LDA #$00
  767. STA FC_Select_Index
  768. RTS

  769. ;==================================================
  770. ;切换到下一页
  771. Change_To_Next_Page:
  772. LDA #FC_PAGE_MAX
  773. BEQ Change_To_Next_Page_Set_Last_Item
  774. LDA FC_Page_Cur
  775. CMP #FC_PAGE_MAX
  776. BEQ Change_To_Next_Page_Set_Begin_Page
  777. ;----------------------------------------
  778. ;切换到下一页
  779. Change_To_Next_Page_Set:
  780. JSR Record_Last_Page_Index
  781. LDA FC_Page_Cur
  782. CLC
  783. ADC #FC_PAGE_SIZE
  784. STA FC_Page_Cur
  785. LDA FC_Select_Index
  786. CLC
  787. ADC #FC_PAGE_SIZE
  788. STA FC_Select_Index
  789. LDA FC_Select_Index
  790. CMP #FC_ITEM_SUM
  791. BCC Change_To_Next_Page_Set_End
  792. ;----------------------------------------
  793. ;切换到最后一项
  794. LDA #FC_ITEM_SUM
  795. STA FC_Select_Index
  796. Change_To_Next_Page_Set_End:
  797. JSR Update_Page_Content
  798. RTS
  799. ;----------------------------------------
  800. ;切换到起始页
  801. Change_To_Next_Page_Set_Begin_Page:
  802. JSR Record_Last_Page_Index
  803. LDA FC_Select_Index
  804. SEC
  805. SBC FC_Page_Cur
  806. STA FC_Select_Index
  807. LDA #$00
  808. STA FC_Page_Cur
  809. JSR Update_Page_Content
  810. RTS
  811. ;----------------------------------------
  812. ;切换到最后一项(最大页只有一页时)
  813. Change_To_Next_Page_Set_Last_Item:
  814. LDA #FC_ITEM_SUM
  815. STA FC_Select_Index
  816. JSR Update_Page_Content
  817. RTS

  818. ;==================================================
  819. ;更新页面内容
  820. Update_Page_Content:
  821. LDA FC_Page_Cur
  822. CMP FC_Page_Old
  823. BEQ Change_Update_Page_End
  824. JSR PPU_Data_Page_Show
  825. Change_Update_Page_End:
  826. RTS

  827. ;==================================================
  828. ;记录上次页索引
  829. Record_Last_Page_Index
  830. LDA FC_Page_Cur
  831. STA FC_Page_Old
  832. RTS

  833. ;==================================================
  834. ;显示当前选择项光标
  835. Show_Select_Cursor:
  836. LDA FC_Select_Index
  837. SEC
  838. SBC FC_Page_Cur
  839. ASL
  840. TAY
  841. INY
  842. LDA Text_PPU_Addr,Y
  843. AND #$03
  844. STA FC_Cursor_Addr_H
  845. INX
  846. DEY
  847. LDA Text_PPU_Addr,Y
  848. STA FC_Cursor_Addr_L
  849. ;----------------------------------------
  850. ;计算光标X坐标
  851. Show_Select_Cursor_Set_X:
  852. LDA FC_Cursor_Addr_L
  853. AND #$1F
  854. ASL
  855. ASL
  856. ASL
  857. STA FC_Cursor_X
  858. LDA FC_Cursor_Addr_L
  859. AND #$E0
  860. STA FC_Cursor_Addr_L
  861. ;----------------------------------------
  862. ;计算光标Y坐标
  863. Show_Select_Cursor_Set_Y:
  864. LDX #$05
  865. ROR FC_Cursor_Addr_H
  866. ROR FC_Cursor_Addr_L
  867. ROR FC_Cursor_Addr_H
  868. ROR FC_Cursor_Addr_L
  869. LDA FC_Cursor_Addr_L
  870. STA FC_Cursor_Y
  871. ;----------------------------------------
  872. ;写入光标
  873. Show_Select_Cursor_Set:
  874. LDA #$00
  875. STA $2003
  876. LDA FC_Cursor_Y
  877. SEC
  878. SBC #FC_CURSOR_OFFSET_Y
  879. STA $2004
  880. LDA #FC_CURSOR_TILE
  881. STA $2004
  882. LDA #$00
  883. STA $2004
  884. LDA FC_Cursor_X
  885. SEC
  886. SBC #FC_CURSOR_OFFSET_X
  887. STA $2004
  888. RTS

  889. ;==================================================
  890. ;切换功能
  891. Change_Function:
  892. ;----------------------------------------
  893. ;开启功能A
  894. Change_Function_On_A:
  895. LDA Button_Once
  896. CMP #$40
  897. BNE Change_Function_On_B
  898. JSR Change_Function_To_On_A
  899. JSR Function_Status_Update
  900. ;----------------------------------------
  901. ;关闭功能B
  902. Change_Function_On_B:
  903. .IF FC_IS_DOUBLE_PLAYERS
  904. LDA Button_Once + 1
  905. CMP #$40
  906. BNE Change_Function_Off_A
  907. JSR Change_Function_To_On_B
  908. JSR Function_Status_Update
  909. .ENDIF
  910. ;----------------------------------------
  911. ;关闭功能A
  912. Change_Function_Off_A:
  913. LDA Button_Once
  914. CMP #$80
  915. BNE Change_Function_Off_B
  916. JSR Change_Function_To_Off_A
  917. JSR Function_Status_Update
  918. ;----------------------------------------
  919. ;关闭功能B
  920. Change_Function_Off_B:
  921. .IF FC_IS_DOUBLE_PLAYERS
  922. LDA Button_Once + 1
  923. CMP #$80
  924. BNE Change_Function_Swap
  925. JSR Change_Function_To_Off_B
  926. JSR Function_Status_Update
  927. .ENDIF
  928. ;==================================================
  929. ;交换开关
  930. Change_Function_Swap:
  931. .IF FC_IS_DOUBLE_PLAYERS
  932. LDA Button_Once
  933. ORA Button_Once + 1
  934. CMP #$20
  935. BNE Change_Function_End
  936. JSR Change_Function_To_Swap
  937. JSR Function_Status_Update
  938. .ENDIF
  939. Change_Function_End:
  940. RTS

  941. ;==================================================
  942. ;交换开关状态
  943. Change_Function_To_Swap:
  944. .IF FC_IS_DOUBLE_PLAYERS
  945. LDA FC_Select_Index
  946. SEC
  947. SBC FC_Page_Cur
  948. STA FC_Select_Temp
  949. JSR Set_Function_Port
  950. LDY #$00
  951. LDX FC_Select_Index
  952. LDA (FC_Data_Port_A_L),Y
  953. EOR (FC_Data_Port_B_L),Y
  954. AND Function_Check,X
  955. BEQ Change_Function_To_Swap_End
  956. LDA (FC_Data_Port_A_L),Y
  957. EOR Function_Check,X
  958. STA (FC_Data_Port_A_L),Y
  959. LDA (FC_Data_Port_B_L),Y
  960. EOR Function_Check,X
  961. STA (FC_Data_Port_B_L),Y
  962. Change_Function_To_Swap_End:
  963. RTS
  964. .ENDIF


  965. ;==================================================
  966. ;更新功能状态
  967. Function_Status_Update:
  968. LDA FC_Select_Index
  969. SEC
  970. SBC FC_Page_Cur
  971. STA FC_Select_Temp
  972. JSR Function_Status_Show
  973. RTS

  974. ;==================================================
  975. ;设置功能地址端口
  976. Set_Function_Port:
  977. LDA FC_Select_Temp
  978. CLC
  979. ADC FC_Page_Cur
  980. ASL
  981. TAY
  982. INY
  983. LDA Function_Addr_A,Y
  984. STA FC_Data_Port_A_H
  985. .IF FC_IS_DOUBLE_PLAYERS
  986. LDA Function_Addr_B,Y
  987. STA FC_Data_Port_B_H
  988. .ENDIF
  989. DEY
  990. LDA Function_Addr_A,Y
  991. STA FC_Data_Port_A_L
  992. .IF FC_IS_DOUBLE_PLAYERS
  993. LDA Function_Addr_B,Y
  994. STA FC_Data_Port_B_L
  995. .ENDIF
  996. RTS

  997. ;==================================================
  998. ;设置功能临时索引
  999. Set_Function_Temp_Index:
  1000. LDA FC_Select_Index
  1001. SEC
  1002. SBC FC_Page_Cur
  1003. STA FC_Select_Temp
  1004. RTS

  1005. ;==================================================
  1006. ;开启功能A
  1007. Change_Function_To_On_A:
  1008. JSR Set_Function_Temp_Index
  1009. JSR Set_Function_Port
  1010. LDX FC_Select_Index
  1011. LDY #$00
  1012. LDA (FC_Data_Port_A_L),Y
  1013. ORA Function_Check,X
  1014. STA (FC_Data_Port_A_L),Y
  1015. RTS
  1016. ;----------------------------------------
  1017. ;开启功能B
  1018. .IF FC_IS_DOUBLE_PLAYERS
  1019. Change_Function_To_On_B:
  1020. JSR Set_Function_Temp_Index
  1021. JSR Set_Function_Port
  1022. LDX FC_Select_Index
  1023. LDY #$00
  1024. LDA (FC_Data_Port_B_L),Y
  1025. ORA Function_Check,X
  1026. STA (FC_Data_Port_B_L),Y
  1027. RTS
  1028. .ENDIF
  1029. ;----------------------------------------
  1030. ;关闭功能A
  1031. Change_Function_To_Off_A:
  1032. JSR Set_Function_Temp_Index
  1033. JSR Set_Function_Port
  1034. LDX FC_Select_Index
  1035. LDY #$00
  1036. LDA Function_Check,X
  1037. EOR #$FF
  1038. AND (FC_Data_Port_A_L),Y
  1039. STA (FC_Data_Port_A_L),Y
  1040. RTS
  1041. ;----------------------------------------
  1042. ;关闭功能B
  1043. .IF FC_IS_DOUBLE_PLAYERS
  1044. Change_Function_To_Off_B:
  1045. JSR Set_Function_Temp_Index
  1046. JSR Set_Function_Port
  1047. LDX FC_Select_Index
  1048. LDY #$00
  1049. LDA Function_Check,X
  1050. EOR #$FF
  1051. AND (FC_Data_Port_B_L),Y
  1052. STA (FC_Data_Port_B_L),Y
  1053. RTS
  1054. .ENDIF

  1055. ;==================================================
  1056. ;设置功能状态PPU地址
  1057. Set_Function_Status_Addr:
  1058. LDX FC_PPU_Cursor
  1059. LDA FC_Select_Temp
  1060. ASL
  1061. TAY
  1062. INY
  1063. LDA Text_PPU_Addr,Y
  1064. STA FC_PPU_Buffer,X
  1065. INX
  1066. DEY
  1067. LDA Text_PPU_Addr,Y
  1068. CLC
  1069. ADC #FC_FUNCTION_OFFSET
  1070. STA FC_PPU_Buffer,X
  1071. INX
  1072. .IF FC_IS_DOUBLE_PLAYERS
  1073. LDA #$02
  1074. .ELSE
  1075. LDA #$01
  1076. .ENDIF
  1077. STA FC_PPU_Buffer,X
  1078. INX
  1079. STX FC_PPU_Cursor
  1080. RTS

  1081. ;==================================================
  1082. ;获取当前选择索引
  1083. Get_Select_Index:
  1084. LDA FC_Select_Temp
  1085. CLC
  1086. ADC FC_Page_Cur
  1087. TAX
  1088. RTS

  1089. ;==================================================
  1090. ;清除状态文本
  1091. Function_Status_Clean:
  1092. LDA #FC_PPU_MODE_CNTC
  1093. JSR Set_PPU_Mode
  1094. JSR Set_Function_Status_Addr
  1095. RTS

  1096. ;==================================================
  1097. ;显示开关状态
  1098. Function_Status_Show:
  1099. JSR Get_Select_Index
  1100. CPX #FC_ITEM_SUM
  1101. BEQ Function_Status_Show_Set
  1102. BCS Function_Status_Show_End
  1103. Function_Status_Show_Set:
  1104. LDA #FC_PPU_MODE_CNTL
  1105. JSR Set_PPU_Mode
  1106. JSR Get_Select_Index
  1107. JSR Set_Function_Status_Addr
  1108. JSR Set_Function_Port
  1109. JSR Function_Status_Show_Check_A
  1110. .IF FC_IS_DOUBLE_PLAYERS
  1111. JSR Function_Status_Show_Check_B
  1112. .ENDIF
  1113. Function_Status_Show_End:
  1114. RTS
  1115. ;----------------------------------------
  1116. ;检查功能A状态
  1117. Function_Status_Show_Check_A:
  1118. JSR Get_Select_Index
  1119. LDY #$00
  1120. LDA (FC_Data_Port_A_L),Y
  1121. AND Function_Check,X
  1122. BEQ Show_Function_Status_Off
  1123. JSR Show_Function_Status_On
  1124. RTS
  1125. ;----------------------------------------
  1126. ;检查功能B状态
  1127. .IF FC_IS_DOUBLE_PLAYERS
  1128. Function_Status_Show_Check_B:
  1129. JSR Get_Select_Index
  1130. LDY #$00
  1131. LDA (FC_Data_Port_B_L),Y
  1132. AND Function_Check,X
  1133. BEQ Show_Function_Status_Off
  1134. JSR Show_Function_Status_On
  1135. RTS
  1136. .ENDIF

  1137. ;----------------------------------------
  1138. ;显示功能开启状态
  1139. Show_Function_Status_On:
  1140. LDX FC_PPU_Cursor
  1141. LDA #FC_ON_TILE
  1142. STA FC_PPU_Buffer,X
  1143. INX
  1144. STX FC_PPU_Cursor
  1145. RTS
  1146. ;----------------------------------------
  1147. ;显示功能关闭状态
  1148. Show_Function_Status_Off:
  1149. LDX FC_PPU_Cursor
  1150. LDA #FC_OFF_TILE
  1151. STA FC_PPU_Buffer,X
  1152. INX
  1153. STX FC_PPU_Cursor
  1154. RTS


  1155. ;-------------------------------------------------------------
  1156. FC_Data_Copy:    ;数据拷贝参数设置
  1157. STX FC_Cpy_Port_L
  1158. STY FC_Cpy_Port_H
  1159. LDY #$00
  1160. LDX #$06
  1161. FC_Data_Copy_Addr_Set:    ;从指定地址读入参数
  1162. LDA (FC_Cpy_Port_L),Y
  1163. STA FC_Cpy_From_L,Y
  1164. INY
  1165. DEX
  1166. BNE FC_Data_Copy_Addr_Set
  1167. LDA (FC_Cpy_Port_L),Y
  1168. CLV
  1169. LDY #$00
  1170. ;----------------------------------
  1171. FC_Data_Copy_Mode:   ;复制模式校验
  1172. CMP #FC_MODE_RAM_TO_RAM
  1173. BEQ FC_Ram_To_Ram_Mode
  1174. CMP #FC_MODE_RAM_TO_PPU
  1175. BEQ FC_Ram_To_Ppu_Mode
  1176. CMP #FC_MODE_PPU_TO_RAM
  1177. BEQ FC_Ppu_To_Ram_Mode
  1178. CMP #FC_MODE_PPU_CLEAR
  1179. BEQ FC_Ppu_Clear_Mode
  1180. RTS
  1181. ;----------------------------------------
  1182. FC_Ram_To_Ram_Mode:   ;复制RAM到RAM模式
  1183. LDX FC_Cpy_Count_L
  1184. INX
  1185. FC_Ram_To_Ram_Count:   ;剩余计数检查
  1186. DEX
  1187. BNE FC_Ram_To_Ram_Copy
  1188. DEC FC_Cpy_Count_H
  1189. BMI FC_Ram_To_Ram_Over
  1190. FC_Ram_To_Ram_Copy:   ;开始复制数据
  1191. LDA (FC_Cpy_From_L),Y
  1192. STA (FC_Cpy_To_L),Y
  1193. FC_Ram_To_Ram_From_Set:    ;源地址递增
  1194. INY
  1195. BNE FC_Ram_To_Ram_Count
  1196. INC FC_Cpy_To_H
  1197. INC FC_Cpy_From_H
  1198. BVC FC_Ram_To_Ram_Count
  1199. FC_Ram_To_Ram_Over:    ;结束数据复制
  1200. RTS

  1201. ;----------------------------------------
  1202. FC_Ram_To_Ppu_Mode:   ;复制RAM到PPU模式
  1203. LDA FC_Cpy_To_H
  1204. STA $2006
  1205. LDA FC_Cpy_To_L
  1206. STA $2006
  1207. LDX FC_Cpy_Count_L
  1208. INX
  1209. FC_Ram_To_Ppu_Count:   ;剩余计数检查
  1210. DEX
  1211. BNE FC_Ram_To_Ppu_Copy
  1212. DEC FC_Cpy_Count_H
  1213. BMI FC_Ram_To_Ppu_Over
  1214. FC_Ram_To_Ppu_Copy:   ;开始复制数据
  1215. LDA (FC_Cpy_From_L),Y
  1216. STA $2007
  1217. FC_Ram_To_Ppu_From_Set:    ;源地址递增
  1218. INY
  1219. BNE FC_Ram_To_Ppu_Count
  1220. INC FC_Cpy_From_H
  1221. BVC FC_Ram_To_Ppu_Count
  1222. FC_Ram_To_Ppu_Over:    ;结束数据复制
  1223. RTS

  1224. ;----------------------------------------
  1225. FC_Ppu_To_Ram_Mode:   ;复制PPU到RAM模式
  1226. LDA FC_Cpy_From_H
  1227. STA $2006
  1228. LDA FC_Cpy_From_L
  1229. STA $2006
  1230. LDA $2007
  1231. LDX FC_Cpy_Count_L
  1232. INX
  1233. FC_Ppu_To_Ram_Count:   ;剩余计数检查
  1234. DEX
  1235. BNE FC_Ppu_To_Ram_Copy
  1236. DEC FC_Cpy_Count_H
  1237. BMI FC_Ppu_To_Ram_Over
  1238. FC_Ppu_To_Ram_Copy:   ;开始复制数据
  1239. LDA $2007
  1240. STA (FC_Cpy_To_L),Y
  1241. FC_Ppu_To_Ram_To_Set:    ;目的地址递增
  1242. INY
  1243. BNE FC_Ppu_To_Ram_Count
  1244. INC FC_Cpy_To_H
  1245. BVC FC_Ppu_To_Ram_Count
  1246. FC_Ppu_To_Ram_Over:    ;结束数据复制
  1247. RTS

  1248. ;----------------------------------------
  1249. FC_Ppu_Clear_Mode:   ;清除PPU模式
  1250. LDA FC_Cpy_To_H
  1251. STA $2006
  1252. LDA FC_Cpy_To_L
  1253. STA $2006
  1254. LDX FC_Cpy_Count_H
  1255. LDY FC_Cpy_Count_L
  1256. LDA FC_Clear_Val
  1257. FC_Ppu_Clear_Count:   ;剩余计数检查
  1258. BNE FC_Ppu_Clear_Copy
  1259. DEX
  1260. BMI FC_Ppu_Clear_Over
  1261. FC_Ppu_Clear_Copy:   ;开始清除PPU
  1262. STA $2007
  1263. DEY
  1264. BVC FC_Ppu_Clear_Count
  1265. FC_Ppu_Clear_Over:    ;结束数据复制
  1266. RTS

  1267. ;==================================================
  1268. ;保存RAM数据
  1269. Save_Ram:
  1270. LDX #<Save_Ram_Data
  1271. LDY #>Save_Ram_Data
  1272. JSR FC_Data_Copy
  1273. RTS

  1274. ;加载RAM数据
  1275. Load_Ram:
  1276. LDX #<Load_Ram_Data
  1277. LDY #>Load_Ram_Data
  1278. JSR FC_Data_Copy
  1279. RTS

  1280. ;保存PPU数据
  1281. Save_Ppu:
  1282. LDX #<Save_PPU_Data
  1283. LDY #>Save_PPU_Data
  1284. JSR FC_Data_Copy
  1285. RTS

  1286. ;加载PPU数据
  1287. Load_Ppu:
  1288. LDX #<Load_PPU_Data
  1289. LDY #>Load_PPU_Data
  1290. JSR FC_Data_Copy
  1291. RTS

  1292. ;清空PPU数据
  1293. Clear_Ppu:
  1294. LDX #<Cln_PPU_Data
  1295. LDY #>Cln_PPU_Data
  1296. JSR FC_Data_Copy
  1297. RTS

  1298. ;==================================================
  1299. ;数据配置
  1300. Save_Ram_Data:
  1301. .DB $00,$03,$00,$63,$00,$01,FC_MODE_RAM_TO_RAM
  1302. Load_Ram_Data:
  1303. .DB $00,$63,$00,$03,$00,$01,FC_MODE_RAM_TO_RAM
  1304. Save_PPU_Data:
  1305. .DB $00,$20,$00,$64,$00,$04,FC_MODE_PPU_TO_RAM
  1306. Load_PPU_Data:
  1307. .DB $00,$64,$00,$20,$00,$04,FC_MODE_RAM_TO_PPU
  1308. Cln_PPU_Data:
  1309. .DB $00,$00,$00,$20,$00,$04,FC_MODE_PPU_CLEAR


  1310. ;==================================================
  1311. ;文本数据PPU显示地址
  1312. Text_PPU_Addr:
  1313. .WORD $20C5
  1314. .WORD $2105
  1315. .WORD $2145
  1316. .WORD $2185
  1317. .WORD $21C5
  1318. .WORD $2205
  1319. .WORD $2245
  1320. .WORD $2285
  1321. .WORD $22C5
  1322. .WORD $2305
  1323. .WORD $2345

  1324. ;==================================================
  1325. ;文本数据PPU数据地址
  1326. Text_Data_Addr:
  1327. .WORD Text_Data_01
  1328. .WORD Text_Data_02
  1329. .WORD Text_Data_03
  1330. .WORD Text_Data_04
  1331. .WORD Text_Data_05
  1332. .WORD Text_Data_06
  1333. .WORD Text_Data_07
  1334. .WORD Text_Data_08
  1335. .WORD Text_Data_09
  1336. .WORD Text_Data_10
  1337. .WORD Text_Data_11
  1338. .WORD Text_Data_12
  1339. .WORD Text_Data_13
  1340. .WORD Text_Data_14
  1341. .WORD Text_Data_15
  1342. .WORD Text_Data_16

  1343. ;==================================================
  1344. ;文本数据
  1345. Text_Data:
  1346. Text_Data_01:
  1347. .STR "01.INVINCIBLE"
  1348. Text_Data_02:
  1349. .STR "02.INVINCIBLE PLUS"
  1350. Text_Data_03:
  1351. .STR "03.LOCK LIFE"
  1352. Text_Data_04:
  1353. .STR "04.LOCK WEAPON"
  1354. Text_Data_05:
  1355. .STR "05.SEL CHANGE WEAPON"
  1356. Text_Data_06:
  1357. .STR "06.UNLIMITED JUMP"
  1358. Text_Data_07:
  1359. .STR "07.MOVE FAST"
  1360. Text_Data_08:
  1361. .STR "08.SWAP SKIN"
  1362. Text_Data_09:
  1363. .STR "09.EQUAL BULLET"
  1364. Text_Data_10:
  1365. .STR "10.STRONG BULLET"
  1366. Text_Data_11:
  1367. .STR "11.KILL BY ONCE"
  1368. Text_Data_12:
  1369. .STR "12.FULL SCREEN KILL"
  1370. Text_Data_13:
  1371. .STR "13.DOUBLE CONTROL"
  1372. Text_Data_14:
  1373. .STR "14.REMOVE E-GRID"
  1374. Text_Data_15:
  1375. .STR "15.FALL INVINCIBLE"
  1376. Text_Data_16:
  1377. .STR "16.NEXT STAGE"

  1378. ;==================================================
  1379. ;功能开关检查地址
  1380. Function_Addr_A:
  1381. .WORD $01C0
  1382. .WORD $01C0
  1383. .WORD $01C0
  1384. .WORD $01C0
  1385. .WORD $01C0
  1386. .WORD $01C0
  1387. .WORD $01C0
  1388. .WORD $01C0
  1389. .WORD $01C4
  1390. .WORD $01C4
  1391. .WORD $01C4
  1392. .WORD $01C4
  1393. .WORD $01C4
  1394. .WORD $01C4
  1395. .WORD $01C2
  1396. .WORD $01C4

  1397. ;功能开关检查地址
  1398. Function_Addr_B:
  1399. .WORD $01C1
  1400. .WORD $01C1
  1401. .WORD $01C1
  1402. .WORD $01C1
  1403. .WORD $01C1
  1404. .WORD $01C1
  1405. .WORD $01C1
  1406. .WORD $01C1
  1407. .WORD $01C4
  1408. .WORD $01C4
  1409. .WORD $01C4
  1410. .WORD $01C4
  1411. .WORD $01C4
  1412. .WORD $01C4
  1413. .WORD $01C3
  1414. .WORD $01C4

  1415. ;==================================================
  1416. ;功能开关检查数据
  1417. Function_Check:
  1418. .DB $01
  1419. .DB $02
  1420. .DB $04
  1421. .DB $08
  1422. .DB $10
  1423. .DB $20
  1424. .DB $40
  1425. .DB $80
  1426. .DB $01
  1427. .DB $02
  1428. .DB $04
  1429. .DB $08
  1430. .DB $10
  1431. .DB $20
  1432. .DB $40
  1433. .DB $80

  1434. Char_Rom:
  1435. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  1436. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  1437. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3B,$25,$00
  1438. .DB $01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$00,$00,$00,$00,$00,$00
  1439. .DB $00,$0B,$0C,$0D,$0E,$0F,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19
  1440. .DB $1A,$1B,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$00,$00,$00,$00,$00


复制代码

游客,如果您要查看本帖隐藏内容请回复

flamecyclone.ys168.com
www.nesbbs.com

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

评分

2

查看全部评分

回复

使用道具 举报

签到天数: 26 天

[LV.4]偶尔看看III

评论头像

发表于 2019-11-29 17:59:10 | 显示全部楼层
这个比之前那个更好
回复 支持 反对

使用道具 举报

签到天数: 551 天

[LV.9]以坛为家II

评论头像

发表于 2019-11-29 18:58:28 | 显示全部楼层
售价:4294967195个成长力????
回复 支持 反对

使用道具 举报

签到天数: 2839 天

[LV.Master]伴坛终老

评论头像

发表于 2019-11-29 19:52:15 | 显示全部楼层
这个版本比之前的选项更多。
[发帖际遇]: 一个袋子砸在了 stglk 头上,stglk 赚了 2 个 魅力. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 732 天

[LV.9]以坛为家II

评论头像

发表于 2019-11-29 19:57:17 | 显示全部楼层
这魂斗罗改得更加出神入化了
回复 支持 反对

使用道具 举报

签到天数: 348 天

[LV.8]以坛为家I

评论头像

发表于 2019-11-29 21:10:24 | 显示全部楼层
修复bug, 累死我了, 一个游戏为啥这么难改啊
[发帖际遇]: FlameCyclone 被钱袋砸中进医院,看病花了 1 个 魅力. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 1256 天

[LV.10]以坛为家III

评论头像

发表于 2019-11-30 00:01:49 | 显示全部楼层
举报楼主成长力负数

点评

举报无效,反对有理  详情 回复 发表于 2019-11-30 16:52
[发帖际遇]: 伟大的病毒 在论坛发帖时没有注意,被小偷偷去了 2 枚 金钱. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 168 天

[LV.7]常住居民III

评论头像

发表于 2019-11-30 11:18:59 | 显示全部楼层
好改版,支持一下大佬!
[发帖际遇]: a1310944151 姜维第二交手机费,竟交错 3 枚 金钱. 无语. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 2 天

[LV.1]初来乍到

评论头像

发表于 2019-11-30 12:51:26 | 显示全部楼层
绝对是神作啊
[发帖际遇]: 风之月夜 发帖时在路边捡到 2 个 魅力,偷偷放进了口袋. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 348 天

[LV.8]以坛为家I

评论头像

发表于 2019-11-30 16:10:35 | 显示全部楼层
重新制作, 修复已经发现的bug
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

新模拟器共享论坛X

翻译WIKI大量成长力和金钱奖励!

访问http://wiki.nesbbs.com,翻译词条到论坛指定区,每一个完成翻译并有采纳的,有成长力等奖励哟...

点击查看详情 

QQ|申请友链|小黑屋|手机版|Archiver|新模拟器共享网 ( 辽ICP备09001055号|繁體中文   

GMT+8, 2019-12-16 20:42 , Processed in 0.140400 second(s), 47 queries , XCache On.

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表