EMU618社区

 找回密码
 立即注册
搜索
查看: 1331|回复: 30

[FC][魂斗罗][24合1]

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2020-3-22 22:15:35 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2020-3-22 22:23 编辑

真是无聊透顶, 搞个假的合卡哈

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


  1. ;[FC][精简合卡菜单45_52]
  2. ;FlameCyclone
  3. ;2020.03.22
  4. ;6502 Macroassembler & Simulator 1.2.11
  5. ;==================================================
  6. RESET_PORT             = $A000
  7. MENU_INDEX             = 03
  8. MENU_RESET             = $F80D
  9. MENU_NMI               = $E800
  10. ;==================================================
  11. MULTICART_TYPE         = 52
  12. ;==================================================
  13. Char_Arrow = $3F
  14. SCROLL_H_VALUE         = 0
  15. SCROLL_V_VALUE         = 8
  16. ARROW_X_OFFSET         = $1C ;箭头横坐标
  17. ARROW_Y_OFFSET         = $27 ;箭头纵坐标
  18. ITEM_COUNT             = 24  ;节目总数
  19. SPRITES_ADDR           = $0400
  20. SPRITES_PAGE           = SPRITES_ADDR / 256
  21. ;==================================================
  22. BTN_DELAY              = 30     ;按键重复触发时长
  23. BTN_SPEED              = 10     ;按键重复触发速度
  24. ;==================================================
  25. Data_L                 = $40
  26. Data_H                 = Data_L + $01
  27. Data_Count             = Data_H + $01
  28. ;==================================================
  29. Sel_Index              = Data_Count + $01
  30. ;==================================================
  31. Button_Keep            = Sel_Index + $01
  32. Button_Once            = Button_Keep+$01
  33. Button_Temp            = Button_Once+$01
  34. Button_Buf             = Button_Temp+$01
  35. Button_Status          = Button_Buf+$01
  36. ;==================================================
  37. SEL_PROCESS_SIZE       = SelectGameLength - SelectGame
  38. Sel_Process_Addr       = $0500
  39. ;==================================================
  40. Second_Time            = Button_Status + $02
  41. Btn_Delay              = Second_Time + $01

  42. .IF MULTICART_TYPE == 52
  43. ;========================================
  44. Sel_Addr_L             = Btn_Delay + 2
  45. Sel_Addr_H             = Sel_Addr_L + 1
  46. .ENDIF

  47. .IF MULTICART_TYPE == 45
  48. ;========================================
  49. Rom_Index              = Btn_Delay + 2
  50. CHR_Addr_L             = Rom_Index + $01
  51. CHR_Addr_H             = CHR_Addr_L + $01
  52. PRG_Addr               = CHR_Addr_H + $01
  53. PRG_Size               = PRG_Addr + $01
  54. CHR_Size               = PRG_Size + $01
  55. MIR_Addr               = CHR_Size + $01
  56. ;========================================
  57. .ENDIF

  58. BTN_UP                 = $08
  59. BTN_DOWN               = $04
  60. BTN_LEFT               = $02
  61. BTN_RIGHT              = $01
  62. BTN_SELECT             = $20
  63. BTN_START              = $10
  64. BTN_B                  = $40
  65. BTN_A                  = $80
  66. ;==================================================
  67. SOUND_OPEN             = 1     ;菜单音效
  68. CUSTOM_MUSIC_OPEN      = 0     ;个性化音乐
  69. BUTTON_SOUND_OPEN      = 1     ;按键选择列表音效
  70. ATTRIBUTE_OPEN         = 1     ;属性表开启
  71. ROM_CHAR_MAP           = 1     ;字符映射
  72. ;==================================================
  73. ROM_MIRRIOR_OPEN       = 0     ;启用镜像选择
  74. ROM_VRAM_OPEN          = 0     ;启用VRAM
  75. Vram_Data              = $BC00 ;Vram数据地址
  76. Vram_Addr              = $0200 ;Vram写入地址
  77. Vram_Size              = $04   ;VRAM大小 * 0x100
  78. ;==================================================
  79. Sound_Addr_Init        = $BF00 ;音乐初始化
  80. Sound_Addr_Play        = $8000 ;音乐播放
  81. SOUND_BGM              = 29    ;背景音效
  82. SOUND_BUTTON           = 30    ;选择音效
  83. SOUND_ENTER            = 34    ;进入音效
  84. SOUND_ENTER_TIME       = 60    ;进入音效延时
  85. ;==================================================
  86. .ORG RESET_PORT
  87. ;==================================================
  88. ;程序初始化
  89. ResetInit:
  90. CLD
  91. SEI
  92. LDX #$FF
  93. TXS
  94. LDA #$00
  95. STA $2000
  96. STA $2001
  97. STA $E000
  98. LDA #$80
  99. STA $A001
  100. LDA #$01
  101. STA $A000
  102. LDX #$02
  103. ResetDelayA:
  104. BIT $2002
  105. BPL ResetDelayA
  106. ResetDelayB:
  107. BIT $2002
  108. BMI ResetDelayB
  109. DEX
  110. BNE ResetDelayA

  111. LDA #$0F
  112. STA $4015
  113. LDA #$C0
  114. STA $4017

  115. JSR PaletteClear

  116. MenuInit
  117. .IF MULTICART_TYPE == 52
  118. MenuInitSet:
  119. LDX #MENU_INDEX
  120. LDA Rom_Select_Data
  121. AND #$7F
  122. STA $6000
  123. .ENDIF

  124. .IF MULTICART_TYPE == 45
  125. LDA #MENU_INDEX
  126. JSR GetRomPort
  127. LDX #$00
  128. MenuInitSet:
  129. LDA CHR_Addr_L
  130. STA $6000
  131. LDA PRG_Addr
  132. ASL
  133. STA $6000
  134. LDA CHR_Addr_H
  135. ASL
  136. ASL
  137. ASL
  138. ASL
  139. ORA CHR_Size
  140. STA $6000
  141. LDA PRG_Size
  142. STA $6000
  143. INX
  144. BNE MenuInitSet
  145. .ENDIF

  146. ;==================================================
  147. ;RAM清空
  148. RamClear:
  149. LDA #$00
  150. STA $00
  151. STA $01
  152. LDX #$08
  153. LDY #$00
  154. RamClearWrite:
  155. STA ($00),Y
  156. INY
  157. BNE RamClearWrite
  158. INC $01
  159. DEX
  160. BNE RamClearWrite

  161. JSR SpriteClear
  162. JSR VramClear
  163. JSR ChrSteup
  164. JSR TextWrite
  165. JSR TimeWait
  166. JSR PaletteSet

  167. .IF ATTRIBUTE_OPEN
  168. JSR TimeWait
  169. JSR AttributeSet
  170. .ENDIF

  171. JSR ResetScroll

  172. LDA #BTN_START
  173. STA Button_Buf
  174. LDA #$1E
  175. STA $2001

  176. JSR NmiDelay
  177. .IF SOUND_OPEN
  178. .IF CUSTOM_MUSIC_OPEN
  179. LDA #SOUND_BGM - 1
  180. JSR Sound_Addr_Init
  181. .ENDIF
  182. .ENDIF

  183. ;==================================================
  184. ;循环等待
  185. WaitLoop:
  186. JSR NmiDelay
  187. JSR SelectChange
  188. JSR SpriteSet
  189. JMP WaitLoop
  190. RTS

  191. ;==================================================
  192. ;NMI延时
  193. NmiDelay:
  194. JSR TimeWait
  195. LDA #SPRITES_PAGE
  196. STA $4014
  197. JSR ResetScroll

  198. .IF CUSTOM_MUSIC_OPEN
  199. JSR Sound_Addr_Play
  200. .ENDIF

  201. JSR Button_Process
  202. RTS

  203. ;==================================================
  204. ;延时等待
  205. TimeWait:
  206. LDA $2002
  207. BPL TimeWait
  208. RTS

  209. ;==================================================
  210. ;重设滚动
  211. ResetScroll:
  212. LDA #$00
  213. STA $2006
  214. STA $2006
  215. LDA #SCROLL_H_VALUE
  216. STA $2005
  217. LDA #SCROLL_V_VALUE
  218. STA $2005
  219. RTS

  220. ;==================================================
  221. ;按键处理
  222. Button_Process:
  223. JSR Button_Scan
  224. LDA Button_Keep
  225. STA Button_Temp
  226. JSR Button_Scan
  227. LDA Button_Keep
  228. CMP Button_Temp
  229. BEQ Button_Get_Once
  230. LDA Button_Buf
  231. STA Button_Keep
  232. Button_Get_Once:
  233. TAY
  234. EOR Button_Buf
  235. AND Button_Keep
  236. STA Button_Once
  237. STY Button_Buf
  238. JSR ButtonDelay
  239. RTS
  240. ;==================================================
  241. ;按键扫描
  242. Button_Scan:
  243. LDX #$01
  244. STX $4016
  245. DEX
  246. STX $4016
  247. LDY #$08
  248. Button_Value:
  249. LDA $4016
  250. STA Button_Status
  251. LSR
  252. ORA Button_Status
  253. LSR
  254. ROL Button_Keep
  255. DEY
  256. BNE Button_Value
  257. RTS

  258. ;==================================================
  259. ;按键延时重复
  260. ButtonDelay:
  261. LDA Button_Keep
  262. AND #$EF
  263. BNE ButtonDelaySet
  264. LDA #$00
  265. STA Btn_Delay
  266. ButtonDelaySet:
  267. INC Btn_Delay
  268. LDA Btn_Delay
  269. CMP #BTN_DELAY + BTN_SPEED
  270. BCC ButtonDelayEnd
  271. LDA #BTN_DELAY
  272. STA Btn_Delay
  273. LDA Button_Keep
  274. STA Button_Once
  275. ButtonDelayEnd:
  276. RTS

  277. ;========================================
  278. ;图形块设置
  279. ChrSteup:
  280. LDX #$00
  281. ChrSteupSetChr:
  282. STX $8000
  283. LDA ChrBankData,X
  284. STA $8001
  285. INX
  286. CPX #$06
  287. BCC ChrSteupSetChr

  288. .IF ROM_VRAM_OPEN
  289. LDA #<Vram_Data
  290. STA Data_L
  291. LDA #>Vram_Data
  292. STA Data_H
  293. LDA #>Vram_Addr
  294. STA $2006
  295. LDA #<Vram_Addr
  296. STA $2006
  297. LDX #Vram_Size
  298. LDY #$00
  299. ChrSteupSetVram:
  300. LDA (Data_L),Y
  301. STA $2007
  302. INY
  303. BNE ChrSteupSetVram
  304. INC Data_H
  305. DEX
  306. BNE ChrSteupSetVram
  307. .ENDIF

  308. RTS

  309. ;==================================================
  310. ;精灵清除
  311. SpriteClear:
  312. LDX #$00
  313. LDA #$F8
  314. SpriteClearWrite:
  315. STA SPRITES_ADDR,X
  316. INX
  317. BNE SpriteClearWrite
  318. RTS

  319. ;==================================================
  320. ;精灵设置
  321. SpriteSet:
  322. LDA Sel_Index
  323. ASL
  324. ASL
  325. ASL
  326. ;ASL
  327. CLC
  328. ADC #ARROW_Y_OFFSET
  329. STA SPRITES_ADDR
  330. LDA #Char_Arrow
  331. STA SPRITES_ADDR + 1
  332. LDA #$00
  333. STA SPRITES_ADDR + 2
  334. LDA #ARROW_X_OFFSET
  335. STA SPRITES_ADDR + 3
  336. RTS

  337. ;==================================================
  338. ;清空PPU内存
  339. VramClear:
  340. LDA #$00
  341. STA $2006
  342. LDA #$00
  343. STA $2006
  344. TAX
  345. LDY #$30
  346. LDA #$00
  347. NameTableClearBeg:
  348. STA $2007
  349. INX
  350. BNE NameTableClearBeg
  351. DEY
  352. BNE NameTableClearBeg
  353. RTS

  354. ;==================================================
  355. ;清空调色板
  356. PaletteClear:
  357. JSR PaletteAddrSet
  358. LDA #$0F
  359. LDX #$00
  360. PaletteClearWrite:
  361. STA $2007
  362. INX
  363. CPX #$20
  364. BCC PaletteClearWrite
  365. RTS

  366. ;==================================================
  367. ;设置调色板
  368. PaletteSet:
  369. JSR PaletteAddrSet
  370. LDX #$00
  371. PaletteSetWrite:
  372. LDA PaletteData,X
  373. STA $2007
  374. INX
  375. CPX #$20
  376. BCC PaletteSetWrite
  377. RTS

  378. ;==================================================
  379. ;调色板地址设置
  380. PaletteAddrSet:
  381. LDA #$3F
  382. STA $2006
  383. LDA #$00
  384. STA $2006
  385. RTS

  386. .IF ATTRIBUTE_OPEN
  387. ;==================================================
  388. ;设置属性表
  389. AttributeSet:
  390. LDA #$23
  391. STA $2006
  392. LDA #$C0
  393. STA $2006
  394. LDX #$00
  395. AttributeSetWrite:
  396. LDA AttributeData,X
  397. STA $2007
  398. INX
  399. CPX #$40
  400. BCC AttributeSetWrite
  401. RTS
  402. .ENDIF

  403. ;==================================================
  404. ;写入文本
  405. TextWrite:
  406. LDA #<TextData
  407. STA Data_L
  408. LDA #>TextData
  409. STA Data_H
  410. LDY #$00
  411. TextWriteCheckMode:
  412. LDA (Data_L),Y
  413. BEQ TextWriteOver
  414. CMP #$FF
  415. BEQ TextWriteOver
  416. AND #$04
  417. STA $2000
  418. JSR CheckAddr
  419. LDA (Data_L),Y
  420. STA $2006
  421. JSR CheckAddr
  422. LDA (Data_L),Y
  423. STA $2006
  424. JSR CheckAddr
  425. LDA (Data_L),Y
  426. TAX
  427. JSR CheckAddr
  428. TextWriteData:
  429. STX Data_Count
  430. LDA (Data_L),Y

  431. .IF ROM_CHAR_MAP
  432. TAX
  433. LDA Char_Rom_Map,X
  434. .ENDIF

  435. STA $2007
  436. JSR CheckAddr
  437. LDX Data_Count
  438. DEX
  439. BNE TextWriteData
  440. JMP TextWriteCheckMode
  441. TextWriteOver:
  442. LDA #$00
  443. STA $2000
  444. RTS
  445. ;--------------------------------------------------
  446. CheckAddr:
  447. INY
  448. BNE CheckAddrOver
  449. INC Data_H
  450. CheckAddrOver:
  451. RTS

  452. ;==================================================
  453. ;选项切换
  454. SelectChange:
  455. LDA Button_Once
  456. AND #$FF
  457. BEQ SelectChangeEnd
  458. SelectChangeSound:
  459. .IF SOUND_OPEN
  460. .IF BUTTON_SOUND_OPEN
  461. JSR ButtonSound
  462. .ENDIF
  463. .ENDIF
  464. SelectInc:
  465. LDA Button_Once
  466. AND #BTN_SELECT | BTN_DOWN
  467. BEQ SelectDec
  468. LDA Sel_Index
  469. CMP #ITEM_COUNT - 1
  470. BCC SelectIncSet
  471. LDA #$FF
  472. STA Sel_Index
  473. SelectIncSet:
  474. INC Sel_Index
  475. SelectDec:
  476. LDA Button_Once
  477. CMP #BTN_UP
  478. BNE SelectBeg
  479. LDA Sel_Index
  480. BNE SelectDecSet
  481. LDA #ITEM_COUNT
  482. STA Sel_Index
  483. SelectDecSet:
  484. DEC Sel_Index
  485. SelectBeg:
  486. LDA Button_Once
  487. AND #BTN_LEFT | BTN_B
  488. BEQ SelectEnd
  489. LDA #$00
  490. STA Sel_Index
  491. SelectEnd:
  492. LDA Button_Once
  493. AND #BTN_RIGHT | BTN_A
  494. BEQ SelectOver
  495. LDA #ITEM_COUNT - 1
  496. STA Sel_Index
  497. SelectOver:
  498. LDA Button_Once
  499. CMP #BTN_START
  500. BNE SelectChangeEnd

  501. .IF SOUND_OPEN
  502. JSR TimeWait
  503. JSR EnterSound
  504. JSR TimeWait
  505. JSR SoundClean
  506. .ENDIF

  507. JSR TimeWait
  508. LDA #$00
  509. STA $2001
  510. STA $4010
  511. STA $4011
  512. STA $4012
  513. STA $4013
  514. STA $4015
  515. JSR PaletteClear

  516. JMP RomSelect
  517. SelectChangeEnd:
  518. RTS

  519. .IF SOUND_OPEN
  520. ;========================================
  521. ;按键音效
  522. ButtonSound:
  523. .IF CUSTOM_MUSIC_OPEN
  524. LDA #SOUND_BUTTON - 1
  525. JSR Sound_Addr_Init
  526. RTS
  527. .ELSE
  528. LDA #$03
  529. STA $4015
  530. LDX #$00
  531. ButtonSoundWrite:
  532. LDA ButtonSoundData,X
  533. STA $4000,X
  534. INX
  535. CPX #$04
  536. BCC ButtonSoundWrite
  537. RTS
  538. ButtonSoundData:
  539. .DB $87,$89,$F0,$00
  540. .ENDIF
  541. .ENDIF

  542. .IF SOUND_OPEN
  543. ;========================================
  544. ;进入音效
  545. EnterSound:
  546. .IF CUSTOM_MUSIC_OPEN
  547. LDA #SOUND_ENTER - 1
  548. JSR Sound_Addr_Init
  549. LDA #SOUND_ENTER_TIME
  550. JSR SecondDelay
  551. RTS
  552. .ELSE
  553. LDA #$02
  554. STA $4015
  555. LDX #$00
  556. EnterSoundWrite:
  557. LDA EnterSoundData,X
  558. STA $4004,X
  559. INX
  560. CPX #$04
  561. BCC EnterSoundWrite
  562. LDA #$18
  563. JSR SecondDelay
  564. RTS
  565. EnterSoundData:
  566. .DB $3F,$9A,$FF,$00
  567. .ENDIF
  568. .ENDIF

  569. .IF SOUND_OPEN
  570. ;========================================
  571. ;等待延时
  572. SecondDelay:
  573. STA Second_Time
  574. BEQ SecondDelayEnd
  575. SecondDelayWait:
  576. JSR NmiDelay
  577. LDA Button_Once
  578. AND #$90
  579. BNE SecondDelayEnd
  580. DEC Second_Time
  581. BNE SecondDelayWait
  582. SecondDelayEnd:
  583. RTS
  584. .ENDIF

  585. .IF SOUND_OPEN
  586. ;=================================================
  587. ;音频清理
  588. SoundClean:
  589. LDA #$0B
  590. STA $4015
  591. LDA #$00
  592. STA $4008
  593. LDA #$0F
  594. STA $4015

  595. LDA #$30
  596. STA $4000
  597. JSR SoundCleanDelay
  598. STA $4004
  599. JSR SoundCleanDelay
  600. STA $400C
  601. JSR SoundCleanDelay

  602. LDA #$7F
  603. STA $4001
  604. JSR SoundCleanDelay
  605. STA $4005
  606. JSR SoundCleanDelay
  607. RTS

  608. SoundCleanDelay:
  609. NOP
  610. NOP
  611. NOP
  612. NOP
  613. NOP
  614. NOP
  615. NOP
  616. NOP
  617. NOP
  618. NOP
  619. RTS

  620. .ENDIF


  621. .IF MULTICART_TYPE == 52
  622. ;==================================================
  623. RomSelect:;选择节目处理
  624. LDX #$00
  625. SelectProcessWrite:
  626. LDA SelectGame,X
  627. STA Sel_Process_Addr,X
  628. INX
  629. CPX #SEL_PROCESS_SIZE
  630. BCC SelectProcessWrite

  631. .IF ROM_MIRRIOR_OPEN
  632. LDX Sel_Index
  633. LDA Rom_Select_Mirrior,X
  634. STA $A000
  635. .ENDIF

  636. LDA Sel_Index
  637. ASL
  638. TAX
  639. LDA Rom_Select_Data,X
  640. STA Sel_Addr_H
  641. INX
  642. LDA Rom_Select_Data,X
  643. STA Sel_Addr_L
  644. LDY #$00
  645. LDX Sel_Index
  646. LDA Stage_Data,X
  647. STA $01C0
  648. LDA Life_Data,X
  649. STA $01C1
  650. LDA Weapon_Data,X
  651. STA $01C2
  652. JMP MENU_RESET
  653. LDA #$00
  654. JMP Sel_Process_Addr

  655. ;==================================================
  656. SelectGame:;选择节目
  657. STA (Sel_Addr_L),Y
  658. CPX #MENU_INDEX
  659. BNE SelectGameEnd
  660. JMP MENU_RESET
  661. SelectGameEnd:
  662. STA $6000
  663. JMP ($FFFC)
  664. SelectGameLength:
  665. .ENDIF

  666. .IF MULTICART_TYPE == 45
  667. ;==================================================
  668. GetRomPort:
  669. STA Rom_Index
  670. JSR GetPrgBankIndex
  671. JSR GetChrBankIndex
  672. JSR GetPrgSize
  673. JSR GetChrSize
  674. LDX Rom_Index
  675. LDA ROM_Mirroring,X
  676. STA MIR_Addr
  677. RTS
  678. ;----------------------------------------
  679. WriteMultiPort:
  680. LDA CHR_Addr_L
  681. STA $6000
  682. LDA PRG_Addr
  683. ASL
  684. STA $6000
  685. LDA CHR_Addr_H
  686. ASL
  687. ASL
  688. ASL
  689. ASL
  690. ORA CHR_Size
  691. STA $6000
  692. LDA PRG_Size
  693. STA $6000
  694. RTS
  695. ;----------------------------------------
  696. GetPrgBankIndex:
  697. LDA #$00
  698. STA PRG_Addr
  699. LDA Rom_Index
  700. BEQ GetPrgBankIndexEnd
  701. LDX #$00
  702. GetPrgBankIndexBeg:
  703. LDA PRG_Addr
  704. CLC
  705. ADC ROM_PRG_Size,X
  706. STA PRG_Addr
  707. INX
  708. CPX Rom_Index
  709. BCC GetPrgBankIndexBeg
  710. GetPrgBankIndexEnd:
  711. RTS
  712. ;----------------------------------------
  713. GetChrBankIndex:
  714. LDA #$00
  715. STA CHR_Addr_L
  716. STA CHR_Addr_H
  717. LDA Rom_Index
  718. BEQ GetChrBankIndexEnd
  719. LDX #$00
  720. GetChrBankIndexBeg:
  721. LDA CHR_Addr_L
  722. CLC
  723. ADC ROM_CHR_Size,X
  724. STA CHR_Addr_L
  725. ADC CHR_Addr_H
  726. STA CHR_Addr_H
  727. INX
  728. CPX Rom_Index
  729. BCC GetChrBankIndexBeg
  730. LDX #$00
  731. GetChrBankIndexSet:
  732. ASL CHR_Addr_L
  733. ROL CHR_Addr_H
  734. INX
  735. CPX #$03
  736. BCC GetChrBankIndexSet
  737. GetChrBankIndexEnd:
  738. RTS
  739. ;----------------------------------------
  740. GetPrgSize:
  741. LDX Rom_Index
  742. LDA ROM_PRG_Size,X
  743. LDX #$00
  744. GetPrgSizeBeg:
  745. CMP PRG_Size_Map,X
  746. BEQ GetPrgSizeSetEnd
  747. INX
  748. CPX #$06
  749. BCC GetPrgSizeBeg
  750. GetPrgSizeSetEnd:
  751. LDA PRG_Size_Data,X
  752. STA PRG_Size
  753. RTS
  754. ;----------------------------------------
  755. GetChrSize:
  756. LDX Rom_Index
  757. LDA ROM_CHR_Size,X
  758. LDX #$00
  759. GetChrSizeBeg:
  760. CMP CHR_Size_Map,X
  761. BEQ GetChrSizeSetEnd
  762. INX
  763. CPX #$06
  764. BCC GetChrSizeBeg
  765. GetChrSizeSetEnd:
  766. LDA CHR_Size_Data,X
  767. STA CHR_Size
  768. RTS

  769. ;==================================================
  770. ;节目选择
  771. RomSelect:
  772. LDX #$00
  773. RomSelectBeg:
  774. LDA SelectGame,X
  775. STA Sel_Process_Addr,X
  776. INX
  777. CPX #SEL_PROCESS_SIZE
  778. BCC RomSelectBeg
  779. LDX Sel_Index
  780. LDA ROM_Order,X
  781. CMP #MENU_INDEX
  782. BNE RomSelectSet
  783. JMP MENU_RESET
  784. RomSelectSet:
  785. JSR GetRomPort
  786. RomSelfCheck:
  787. JMP Sel_Process_Addr

  788. ;==================================================
  789. ;节目选择处理
  790. SelectGame:
  791. LDX #$00
  792. SelectGameBeg:
  793. LDA CHR_Addr_L
  794. STA $6000
  795. LDA PRG_Addr
  796. ASL
  797. STA $6000
  798. LDA CHR_Addr_H
  799. ASL
  800. ASL
  801. ASL
  802. ASL
  803. ORA CHR_Size
  804. STA $6000
  805. LDA PRG_Size
  806. ORA #$C0
  807. STA $6000
  808. INX
  809. BNE SelectGameBeg
  810. SelectGameSet:
  811. LDA MIR_Addr
  812. STA $A000
  813. JMP ($FFFC)
  814. SelectGameLength:
  815. .ENDIF

  816. ;==================================================
  817. ;图形块号
  818. ChrBankData:
  819. .DB $00,$02,$04,$05,$06,$07

  820. ;==================================================
  821. ;调色板数据
  822. PaletteData:
  823. .DB $0F,$2A,$2A,$2A,$0F,$25,$25,$25,$0F,$21,$21,$21,$0F,$20,$20,$20
  824. .DB $0F,$20,$26,$16,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F

  825. .IF ATTRIBUTE_OPEN
  826. ;==================================================
  827. ;属性表数据
  828. AttributeData:
  829. .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$0A,$05,$0A,$05,$09,$0A,$00
  830. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  831. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  832. .DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  833. .ENDIF

  834. .IF ROM_CHAR_MAP
  835. ;==================================================
  836. ;字符映射
  837. Char_Rom_Map:
  838. .DB $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F
  839. .DB $10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$1A,$1B,$1C,$1D,$1E,$1F
  840. .DB $00,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2A,$2B,$2C,$2D,$25,$2F
  841. .DB $01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$3A,$3B,$3C,$3D,$3E,$3F
  842. .DB $40,$0B,$0C,$0D,$0E,$0F,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19
  843. .DB $1A,$1B,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$5B,$5C,$5D,$5E,$5F
  844. .ENDIF

  845. ;==================================================
  846. ;文本数据
  847. TextData:
  848. .DB $80,$20,$49
  849. .STR "CONTRA 24 IN 1"
  850. .DB $80,$20,$84
  851. .STR "PUSH U.D OR START BUTTON"
  852. .DB $80,$20,$C5
  853. .STR "01.STAGE 1"
  854. .DB $80,$20,$E5
  855. .STR "02.STAGE 1 30 LIFE"
  856. .DB $80,$21,$05
  857. .STR "03.STAGE 1 30 LIFE S GUN"
  858. .DB $80,$21,$25
  859. .STR "04.STAGE 2"
  860. .DB $80,$21,$45
  861. .STR "05.STAGE 2 30 LIFE"
  862. .DB $80,$21,$65
  863. .STR "06.STAGE 2 30 LIFE S GUN"
  864. .DB $80,$21,$85
  865. .STR "07.STAGE 3"
  866. .DB $80,$21,$A5
  867. .STR "08.STAGE 3 30 LIFE"
  868. .DB $80,$21,$C5
  869. .STR "09.STAGE 3 30 LIFE S GUN"
  870. .DB $80,$21,$E5
  871. .STR "10.STAGE 4"
  872. .DB $80,$22,$05
  873. .STR "11.STAGE 4 30 LIFE"
  874. .DB $80,$22,$25
  875. .STR "12.STAGE 4 30 LIFE S GUN"
  876. .DB $80,$22,$45
  877. .STR "13.STAGE 5"
  878. .DB $80,$22,$65
  879. .STR "14.STAGE 5 30 LIFE"
  880. .DB $80,$22,$85
  881. .STR "15.STAGE 5 30 LIFE S GUN"
  882. .DB $80,$22,$A5
  883. .STR "16.STAGE 6"
  884. .DB $80,$22,$C5
  885. .STR "17.STAGE 6 30 LIFE"
  886. .DB $80,$22,$E5
  887. .STR "18.STAGE 6 30 LIFE S GUN"
  888. .DB $80,$23,$05
  889. .STR "19.STAGE 7"
  890. .DB $80,$23,$25
  891. .STR "20.STAGE 7 30 LIFE"
  892. .DB $80,$23,$45
  893. .STR "21.STAGE 7 30 LIFE S GUN"
  894. .DB $80,$23,$65
  895. .STR "22.STAGE 8"
  896. .DB $80,$23,$85
  897. .STR "23.STAGE 8 30 LIFE"
  898. .DB $80,$23,$A5
  899. .STR "24.STAGE 8 30 LIFE S GUN"
  900. .DB $FF

  901. .IF MULTICART_TYPE == 52
  902. ;==================================================
  903. ;ROM选择数据
  904. Rom_Select_Data:
  905. ;;;;;WMCCSBPP
  906. ;W: 禁用合卡寄存器并启用RAM
  907. ;M: CHR 块容量 (0=256KB   1=128KB)
  908. ;C: CHR 块选择 (位1,0)
  909. ;S: PRG 块容量 (0=256KB   1=128KB)
  910. ;B: CHR + PRG 高位(位2)
  911. ;P: PRG 块选择 (位1,0)
  912. .DB @11001000   ;001
  913. .DB @11011001   ;002
  914. .DB @11101010   ;003
  915. .DB @11111011   ;004
  916. .DB @11001100   ;005
  917. .DB @11011101   ;006
  918. .DB @11101110   ;007
  919. .DB @11111111   ;008
  920. .ENDIF

  921. ;==================================================
  922. ;镜像 01:水平 00:垂直
  923. .IF ROM_MIRRIOR_OPEN
  924. Rom_Select_Mirrior:
  925. .DB $00 ;1
  926. .DB $00 ;2
  927. .DB $00 ;3
  928. .DB $00 ;4
  929. .DB $00 ;5
  930. .DB $00 ;6
  931. .DB $00 ;7
  932. .DB $00 ;8
  933. .ENDIF

  934. .IF MULTICART_TYPE == 45
  935. ;========================================
  936. CHR_Size_Map:
  937. .DB $01,$02,$04,$08,$10,$20
  938. CHR_Size_Data:
  939. .DB $0A,$0B,$0C,$0D,$0E,$0F
  940. ;----------------------------------------
  941. PRG_Size_Map:
  942. .DB $01,$02,$04,$08,$10,$20
  943. PRG_Size_Data:
  944. .DB $3E,$3C,$38,$30,$20,$00
  945. ;========================================
  946. ROM_PRG_Size:
  947. .DB $08,$08,$08,$08,$08,$08,$08,$08
  948. ROM_CHR_Size:
  949. .DB $10,$10,$10,$10,$10,$10,$10,$10
  950. ;镜像 01:水平 00:垂直
  951. ROM_Mirroring:
  952. .DB $00,$00,$00,$00,$00,$00,$00,$00
  953. ;选择序号索引
  954. ROM_Order:
  955. .DB $00,$01,$02,$03,$04,$05,$06,$07
  956. .ENDIF


  957. Stage_Data:
  958. .DB 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7
  959. Life_Data:
  960. .DB 2,29,29,2,29,29,2,29,29,2,29,29,2,29,29,2,29,29,2,29,29,2,29,29
  961. Weapon_Data:
  962. .DB $00,$00,$13,$00,$00,$13,$00,$00,$13,$00,$00,$13,$00,$00,$13,$00,$00,$13,$00,$00,$13,$00,$00,$13
复制代码

本帖子中包含更多资源

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

x
[发帖际遇]: yandagui 打扫环境卫生,被奖励 6 个 柠檬. 幸运榜 / 衰神榜

签到天数: 1833 天

[LV.Master]伴坛终老

发表于 2020-3-22 23:04:38 | 显示全部楼层
感谢分享!
[发帖际遇]: lelehehe扶老大爷过马路,警察叔叔奖励lelehehe 2 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 2923 天

[LV.Master]伴坛终老

发表于 2020-3-22 23:30:10 | 显示全部楼层
好强大的合集
[发帖际遇]: 一个袋子砸在了 afti 头上,afti 赚了 4 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 1831 天

[LV.Master]伴坛终老

发表于 2020-3-23 06:04:58 | 显示全部楼层
爱玩魂斗罗。
[发帖际遇]: wsz7257踩坏了花花草草,被罚款9 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 1310 天

[LV.10]以坛为家III

发表于 2020-3-23 13:06:17 | 显示全部楼层
统一收藏先
[发帖际遇]: wincyd花10 个 柠檬买彩票,血本无归T_T. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 595 天

[LV.9]以坛为家II

发表于 2020-3-23 16:49:06 | 显示全部楼层

感谢分享!
[发帖际遇]: tonyowen123 乐于助人,奖励 7 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 444 天

[LV.9]以坛为家II

发表于 2020-3-23 19:48:23 | 显示全部楼层
怎么个假的啊
回复 支持 反对

使用道具 举报

签到天数: 2181 天

[LV.Master]伴坛终老

发表于 2020-3-24 04:17:20 | 显示全部楼层
强大{:4_97:}
[发帖际遇]: adsl9646 被钱袋砸中进医院,看病花了 1 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 1548 天

[LV.Master]伴坛终老

发表于 2020-3-24 17:46:26 | 显示全部楼层
非常强大的合集
回复 支持 反对

使用道具 举报

签到天数: 1483 天

[LV.10]以坛为家III

发表于 2020-4-6 22:24:44 | 显示全部楼层
感谢{:4_118:}
[发帖际遇]: she370192822 发帖时在路边捡到 1 个 柠檬,偷偷放进了口袋. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 566 天

[LV.9]以坛为家II

发表于 2020-4-12 18:16:38 | 显示全部楼层
我看到了直接就有 30life 的 版本,哈哈!感谢楼主分享!
回复 支持 反对

使用道具 举报

签到天数: 537 天

[LV.9]以坛为家II

发表于 2020-7-7 03:03:39 | 显示全部楼层
谢谢分享!
[发帖际遇]: xuxiaoxin850127 乐于助人,奖励 9 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 27 天

[LV.4]偶尔看看III

发表于 2020-7-7 22:05:41 | 显示全部楼层

感谢大佬的分享,非常感谢!!
回复 支持 反对

使用道具 举报

签到天数: 79 天

[LV.6]常住居民II

发表于 2020-12-31 09:17:46 | 显示全部楼层
哈哈,确实无聊
回复 支持 反对

使用道具 举报

签到天数: 62 天

[LV.6]常住居民II

发表于 2021-1-21 10:02:56 | 显示全部楼层
感谢楼主分享
[发帖际遇]: keysea辛苦发帖,赚了 4 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

签到天数: 3 天

[LV.2]偶尔看看I

发表于 2021-1-23 19:22:09 | 显示全部楼层
谢谢兄弟分享~~
回复 支持 反对

使用道具 举报

签到天数: 39 天

[LV.5]常住居民I

发表于 2021-1-24 21:13:44 | 显示全部楼层
这个应该就是魂斗罗一袋
回复 支持 反对

使用道具 举报

签到天数: 1 天

[LV.1]初来乍到

发表于 2021-2-8 20:32:39 | 显示全部楼层
辛苦谢谢
回复 支持 反对

使用道具 举报

签到天数: 69 天

[LV.6]常住居民II

发表于 2021-2-27 21:50:43 | 显示全部楼层
谢谢分享
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2022-12-6 16:54:33 | 显示全部楼层
多谢分享!!
回复 支持 反对

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|国治模拟精品屋 ( 沪ICP备15012945号-1 )

GMT+8, 2024-12-19 02:06 , Processed in 1.085937 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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