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

新模拟器共享论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

1

最近看过此主题的会员

查看: 226|回复: 16

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

[复制链接]

签到天数: 348 天

[LV.8]以坛为家I

评论头像

发表于 2019-12-1 16:24:54 | 显示全部楼层 |阅读模式
本帖最后由 FlameCyclone 于 2019-12-2 10:44 编辑

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


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

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

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

  9. ;==================================================
  10. ;PPU缓冲地址配置
  11. FC_PPU_Buffer = $0400
  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 = $EE
  37. ;光标偏移像素值
  38. FC_CURSOR_OFFSET_X = 12
  39. FC_CURSOR_OFFSET_Y = 1
  40. FC_FUNCTION_OFFSET = 21
  41. FC_ON_TILE = $ED
  42. FC_OFF_TILE = $EC
  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 = 14 - 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 = $F7
  101. Rom_Pause_Addr = $39
  102. Rom_Pause_Val = $01
  103. Rom_Pal_Addr = $03E0
  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. LDA #$80
  117. STA $A001
  118. PHA
  119. TXA
  120. PHA
  121. TYA
  122. PHA
  123. JSR Wait_Sound_Stop
  124. JSR Save_Screen
  125. JSR Program_Begin
  126. JSR Load_Screen
  127. LDA #$10
  128. STA Rom_Btn_Keep
  129. LDA #$00
  130. STA Rom_Btn_Once
  131. Quit:
  132. PLA
  133. TAY
  134. PLA
  135. TAX
  136. PLA
  137. Quit_End:
  138. RTS

  139. ;==================================================
  140. ;等待音乐结束
  141. Wait_Sound_Stop:
  142. JSR Screen_Off
  143. Wait_Sound_Stop_Check:
  144. JSR NMI_Wait
  145. JSR $FFDE
  146. LDA $010E
  147. BNE Wait_Sound_Stop_Check
  148. RTS

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

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

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

  186. ;==================================================
  187. ;开启屏幕
  188. Screen_On:
  189. LDA Rom_Nmi_Addr
  190. STA $2000
  191. RTS

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

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

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

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

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

  250. ;==================================================
  251. ;==================================================

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

  261. ;==================================================
  262. ;开启显示
  263. LDA #$1E
  264. STA FC_PPU_Status

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

  279. ;==================================================
  280. ;模拟NMI中断
  281. NMI_Delay:
  282. JSR NMI_Wait
  283. JSR Show_Select_Cursor
  284. JSR FC_PPU_Process
  285. RTS

  286. ;==================================================
  287. ;等待NMI中断
  288. NMI_Wait:
  289. LDA $2002
  290. BPL NMI_Wait
  291. DEC FC_Time_Count
  292. RTS

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

  364. ;==================================================
  365. ;设置CHR图形
  366. CHR_Set:
  367. LDX #$05
  368. CHR_Set_Data:
  369. STX $8000
  370. LDA CHR_Data,x
  371. STA $8001
  372. DEX
  373. BPL CHR_Set_Data
  374. RTS
  375. ;----------------------------------------
  376. ;CHR图形bank数据
  377. CHR_Data:
  378. .BYTE $40,$6A,$40,$41,$6A,$6B

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  830. ;==================================================
  831. ;记录上次页索引
  832. Record_Last_Page_Index
  833. LDA FC_Page_Cur
  834. STA FC_Page_Old
  835. RTS

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

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

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


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

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

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

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

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

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

  1092. ;==================================================
  1093. ;清除状态文本
  1094. Function_Status_Clean:
  1095. LDA #FC_PPU_MODE_CNTC
  1096. JSR Set_PPU_Mode
  1097. JSR Set_Function_Status_Addr
  1098. RTS

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

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


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

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

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

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

  1270. ;==================================================
  1271. ;保存RAM数据
  1272. Save_Ram:
  1273. LDX #<Save_Ram_Data
  1274. LDY #>Save_Ram_Data
  1275. JSR FC_Data_Copy
  1276. RTS

  1277. ;加载RAM数据
  1278. Load_Ram:
  1279. LDX #<Load_Ram_Data
  1280. LDY #>Load_Ram_Data
  1281. JSR FC_Data_Copy
  1282. RTS

  1283. ;保存PPU数据
  1284. Save_Ppu:
  1285. LDX #<Save_PPU_Data
  1286. LDY #>Save_PPU_Data
  1287. JSR FC_Data_Copy
  1288. RTS

  1289. ;加载PPU数据
  1290. Load_Ppu:
  1291. LDX #<Load_PPU_Data
  1292. LDY #>Load_PPU_Data
  1293. JSR FC_Data_Copy
  1294. RTS

  1295. ;清空PPU数据
  1296. Clear_Ppu:
  1297. LDX #<Cln_PPU_Data
  1298. LDY #>Cln_PPU_Data
  1299. JSR FC_Data_Copy
  1300. RTS

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


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

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

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

  1380. ;==================================================
  1381. ;功能开关检查地址
  1382. Function_Addr_A:
  1383. .WORD $61F0
  1384. .WORD $61F0
  1385. .WORD $61F0
  1386. .WORD $61F0
  1387. .WORD $61F0
  1388. .WORD $61F0
  1389. .WORD $61F0
  1390. .WORD $61F0
  1391. .WORD $61F2
  1392. .WORD $61F2
  1393. .WORD $61F2
  1394. .WORD $61F2
  1395. .WORD $61F2
  1396. .WORD $61F2
  1397. .WORD $61F4

  1398. ;功能开关检查地址
  1399. Function_Addr_B:
  1400. .WORD $61F1
  1401. .WORD $61F1
  1402. .WORD $61F1
  1403. .WORD $61F1
  1404. .WORD $61F1
  1405. .WORD $61F1
  1406. .WORD $61F1
  1407. .WORD $61F1
  1408. .WORD $61F2
  1409. .WORD $61F2
  1410. .WORD $61F2
  1411. .WORD $61F2
  1412. .WORD $61F2
  1413. .WORD $61F2
  1414. .WORD $61F5

  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. Char_Rom:
  1434. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  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,$E8,$26,$00
  1437. .DB $01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$00,$00,$00,$00,$00,$00
  1438. .DB $00,$0B,$0C,$0D,$0E,$0F,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19
  1439. .DB $1A,$1B,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$00,$00,$00,$00,$00


复制代码

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

flamecyclone.ys168.com
www.nesbbs.com


本帖子中包含更多资源

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

x
[发帖际遇]: FlameCyclone 在网吧通宵,花了 7 个 魅力. 幸运榜 / 衰神榜
回复

使用道具 举报

签到天数: 1720 天

[LV.Master]伴坛终老

评论头像

发表于 2019-12-1 17:39:24 | 显示全部楼层
感谢楼主,顶一个
回复 支持 反对

使用道具 举报

签到天数: 650 天

[LV.9]以坛为家II

评论头像

发表于 2019-12-1 17:47:45 | 显示全部楼层
不错呀的修改,谢谢楼主付出
[发帖际遇]: xiaobing88 乐于助人,奖励 6 个 魅力. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 1256 天

[LV.10]以坛为家III

评论头像

发表于 2019-12-1 18:17:38 | 显示全部楼层
霍燕童鞋,你应该送成长力才对

点评

我没法送。。。  详情 回复 发表于 2019-12-1 18:20
[发帖际遇]: 伟大的病毒 在网吧通宵,花了 2 个 魅力. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 348 天

[LV.8]以坛为家I

评论头像

发表于 2019-12-1 18:20:27 来自手机 | 显示全部楼层
伟大的病毒 发表于 2019-12-1 18:17
霍燕童鞋,你应该送成长力才对

我没法送。。。
回复 支持 反对

使用道具 举报

签到天数: 772 天

[LV.10]以坛为家III

评论头像

发表于 2019-12-1 21:20:47 | 显示全部楼层
感谢楼主分享
[发帖际遇]: datone2003 姜维第二交手机费,竟交错 5 枚 金钱. 无语. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 1256 天

[LV.10]以坛为家III

评论头像

发表于 2019-12-1 22:01:19 | 显示全部楼层

多送点,兴许你就负负得正了
[发帖际遇]: 伟大的病毒 一个砖头砸在你头上,丢了 4 枚 金钱. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 348 天

[LV.8]以坛为家I

评论头像

发表于 2019-12-2 10:49:57 | 显示全部楼层
更新去除无用功能, 修复bug
回复 支持 反对

使用道具 举报

签到天数: 168 天

[LV.7]常住居民III

评论头像

发表于 2019-12-2 12:11:51 | 显示全部楼层
又来啦,魂斗罗的更新,感谢感谢!
回复 支持 反对

使用道具 举报

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

本版积分规则

新模拟器共享论坛X

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

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

点击查看详情 

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

GMT+8, 2019-12-16 21:47 , Processed in 0.156000 second(s), 50 queries , XCache On.

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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