daily pastebin goal
64%
SHARE
TWEET

BIOSUpdate_forward_queue_to_channel_map

LuigiBlood Jul 15th, 2012 (edited) 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;BS-X BIOS
  2. ;forward_queue_to_channel_map update from bsx16.srm (BS-X SRAMS Dumps 6-26-01)
  3. ;Disassembled by LuigiBlood
  4.  
  5. SEP #$20
  6. LDA $7EA1B8
  7. BNE NotZero
  8. INC A
  9. STA $7EA1B8
  10. JML $80E0E5 ;Original full forward_queue_to_channel_map BIOS code
  11. NotZero:
  12. REP #$20
  13. LDA $1429
  14. AND #$00FF
  15. ASL A
  16. TAX
  17. SEP #$20
  18. JSR (Jumps,x)
  19. RTL
  20.  
  21. Jumps:
  22. dw $50D1, $50DA, $51BF
  23.  
  24. ;$50D1
  25. INC $1429
  26. STZ $1413
  27. STZ $1412
  28. ;$50DA
  29. LDA $143C
  30. AND #$1C
  31. CMP #$10
  32. BEQ PacketStartFlag
  33. JMP Return1
  34. PacketStartFlag:
  35. LDY $1435
  36. STY $1433
  37. STZ $1437
  38. LDY #$FFFF
  39. STY $4B
  40. INY
  41. SearchFirstPacket:
  42. LDA $9A20,y
  43. BIT #$10
  44. BNE FirstPacketFound
  45. INY
  46. CPY $143D
  47. BNE SearchFirstPacket
  48. JMP Return1
  49. FirstPacketFound:
  50. STY $47
  51. LDA $9A20,y
  52. BIT #$80
  53. BNE .arLabel059
  54. INY
  55. CPY $143D
  56. BEQ .arLabel05B
  57. SearchLastPacket:
  58. LDA $9A20,y
  59. BIT #$90
  60. BNE .arLabel052
  61. INY
  62. CPY $143D
  63. BNE SearchLastPacket
  64. BRA .arLabel05B
  65. .arLabel052:
  66. BIT #$10
  67. BEQ .arLabel059
  68. JMP $521C
  69. .arLabel059:
  70. STY $4B
  71. .arLabel05B:
  72. JSR $5252
  73. LDY $47
  74. INY
  75. INY
  76. LDA $9A34,y
  77. STA $1411
  78. INY
  79. LDA $9A34,y
  80. STA $1410
  81. INY
  82. LDA $9A34,y
  83. STA $140F
  84. INY
  85. STY $49
  86. LDX #$9BEC
  87. STX $51
  88. LDA #$7E
  89. STA $53
  90. LDX $4B
  91. BPL $2F
  92. LDX $143D
  93. STX $47
  94. JSR $5252
  95. LDX #$0000
  96. LDA $9A34,y
  97. PHY
  98. TXY
  99. STA [$51],y
  100. PLY
  101. INY
  102. INX
  103. CPY $47
  104. BNE $F2
  105. TXY
  106. JSR $5243
  107. REP #$20
  108. LDA $47
  109. SEC
  110. SBC $49
  111. STA $47
  112. JSR $522E
  113. SEP #$20
  114. INC $1429
  115. Return1:
  116. RTS
  117. STX $47
  118. JSR $5252
  119. LDA $1411
  120. BNE $20
  121. LDX $140F
  122. BEQ $17
  123. STX $47
  124. LDX #$0000
  125. LDA $9A34,y
  126. PHY
  127. TXY
  128. STA [$51],y
  129. PLY
  130. INY
  131. INX
  132. CPX $47
  133. BNE $F2
  134. TXY
  135. JSR $5243
  136. STZ $1427
  137. RTS
  138. LDA #$01
  139. STA $1429
  140. LDY $1435
  141. STY $1433
  142. STZ $1437
  143. RTS  
  144.  
  145. ;$51BF
  146. LDX $143D
  147. STX $47
  148. JSR $5252
  149. LDA $143C
  150. BIT #$1C
  151. BNE $4E
  152. BIT #$80
  153. BNE $19
  154. REP #$20
  155. LDY #$0000
  156. LDA $9A34,y
  157. STA [$51],y
  158. INY
  159. INY
  160. CPY $47
  161. BNE $F5
  162. SEP #$20
  163. JSR $522E
  164. JSR $5243
  165. RTS
  166. LDA $1411
  167. BMI $19
  168. BNE $1B
  169. LDY $140F
  170. BEQ $12
  171. STY $47
  172. LDY #$0000
  173. LDA $9A34,y
  174. STA [$51],y
  175. INY
  176. CPY $47
  177. BNE $F6
  178. JSR $5243
  179. STZ $1427
  180. RTS
  181. LDA #$01
  182. STA $1429
  183. LDY $1435
  184. STY $1433
  185. STZ $1437
  186. RTS
  187. STZ $1429
  188. LDY $1435
  189. STY $1433
  190. STZ $1437
  191. LDA #$8D05
  192. CMP #$6013
  193. PHP
  194. REP #$20
  195. LDA $140F
  196. SEC
  197. SBC $47
  198. STA $140F
  199. SEP #$20
  200. BCS $03
  201. DEC $1411
  202. PLP
  203. RTS
  204. REP #$20
  205. TYA
  206. CLC
  207. ADC $51
  208. STA $51
  209. SEP #$20
  210. BCC $02
  211. INC $53
  212. RTS
  213. REP #$20
  214. LDA $47
  215. ASL A
  216. ASL A
  217. ADC $47
  218. ASL A
  219. ADC $47
  220. ASL A
  221. STA $47
  222. SEP #$20
  223. RTS
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top