Baronhaynes

mm4 notes (couldn't remember where I found them)

Jul 2nd, 2020
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 192.51 KB | None | 0 0
  1. MEGAMAN 4 COMPREHENSIVE DOCUMENT
  2. version 1.6 - June 2016
  3.  
  4. Writers:
  5. Matrixz
  6. MartsINY
  7.  
  8. (Looks best in monospaced font)
  9.  
  10. -- Update notes --
  11.  
  12. Corrected sprite bank pointers for Sprite Bank 4 (6C010-7000F).
  13. Identified the usage of object IDs $39, $4B and $90.
  14. Additions by MartsINY (lots)
  15. 2016-06-02: Added informations on existing datas and documented more functions.
  16. More info on Subroutine $FD17
  17. Added width and height values for Enemy hit detection data vs. other sprites (weapons/megaman)
  18.  
  19. LEGEND :
  20. ========
  21. RTS NUBT means the RTS of the ASM is Not Used By The following functions, so you can erase it.
  22. RTS UBT means the RTS of the ASM is Used By The following functions. So do not erase it unless you erase the following functions (or ASM)
  23. RTS PUBT means the same as UBT, but its RTS is used by the precedent function.
  24. RTS N means no RTS
  25. When the RTS are used by the next functions, I write where in the ASM code under.
  26.  
  27. ============================ CONTENTS =============================
  28.  
  29. * NOTES
  30. * TERM DESCRIPTION
  31. * RAM (Memory Map)
  32. * ROM MAP (From start to end)
  33. * LEVEL BANK MAP
  34.  
  35. * Object ID List
  36. * Sprite ID List
  37. * Unused ID's
  38. * Object - Vertical Wall Detection ID's (For D2FC/F0F8)
  39. * Object Slot Usage
  40. * Stage Bank / Scene Bank ID's
  41. * Scanline Effect ID's
  42. * Weapon ID's
  43. * Sprite Tile Usage
  44. * Primary Graphics Load ID's
  45. * Sound ID's (Music / Sound effect ID's)
  46.  
  47. * ADDITIONAL MESSY NOTES:
  48. * Sprite Data Formats
  49. * Weapon Code Procedure
  50. * Explosion Code Procedure
  51. * Kill Enemy Procedure
  52. * ASM explanation : Bank $3C, $805E : Crushed by a moving wall?
  53. * Graphics Load Data
  54. * Earlier Version Traces
  55. * ROM Version / Regional differences
  56. * Object/Wall Hit Detection - Object Shape Data (Vertical Hit Detection)
  57.  
  58. ============================== NOTES ==============================
  59.  
  60. Offsets
  61. -------
  62. Two types of offsets are used in this document; ROM offset and memory offset.
  63. Sometimes one of them are noted, sometimes both of them are noted, seperated
  64. with a slash. (Memory address to the left and ROM offset to the right).
  65. For those not familiar with memory offsets, if an offset in this doc is
  66. four-digit, its not a ROM offset, unless stated as so.
  67. The "rom offset" section is divided into sub-sections of one or more ROM banks,
  68. where the size of one ROM bank is $2000 bytes.
  69. "MEMORY AREA" is meant to tell what range in the NES' memory
  70. the ROM bank(s) are loaded into when it is being used.
  71.  
  72. Level data
  73. ----------
  74. For areas of level data, its noted as "<level data>".
  75. Level data is always placed at the same locations within a ROM bank.
  76. After the entire "ROM Offset" section of this document, there's
  77. a map describing how level data is organized withing all those banks.
  78.  
  79. ========================= TERM DECRIPTION =========================
  80.  
  81. Object Slot
  82. -----------
  83. Used to refer to a byte index in the object/sprite memory arrays.
  84.  
  85. Enemy ID / Object ID / Sprite ID
  86. --------------------------------
  87. All these three mean different things, and these are the terms i use to differ the three in
  88. this document. Now to try to explain the difference.
  89.  
  90. Enemy ID
  91. --------
  92. Identifies the different "enemies" or other objects that can be placed in a level, as part
  93. of level data. The Enemy ID is connected to several tables, such as HP, default speed,
  94. Sprite ID and Object ID.
  95.  
  96. Object ID
  97. ---------
  98. Identifies the different AI's of enemies or other objects. Also, Megaman 4 has a complicated
  99. system of using different banks for sprite data. The bank it uses to read sprite data depends on
  100. the Object ID, using a lookup table at $7E00A in the ROM.
  101.  
  102. Sprite ID
  103. ---------
  104. Identifies different sprite animations for the sprites on the screen. However, there are different
  105. banks used for sprite data, and these banks each have a set of Sprite ID's. Again, the sprite bank
  106. used depends on Object ID, and not Sprite ID.
  107.  
  108. =============================== RAM ===============================
  109.  
  110. List of Unused Memory
  111. -------------------------
  112.  
  113. ZP Zero use: 2C, 4F, 5F, 68, 70-7F, 98, AE, AF
  114.  
  115. ZP Relatively free:
  116. 94 (Not used after RESET vector code.)
  117.  
  118. Temporary Memory
  119. ----------------
  120.  
  121. 00-01 : Temporary - Used in all threads
  122. 02-13 : Temporary - Used only in Main thread
  123. 02-0F : Lower-level temporary
  124. 0F : Often use with function that return values results in Carry Flag. They make
  125. a ROR with it and then reuse $0F to know if the Carry was set or not.
  126. 10-13 : Subroutine argument / Subroutine result / Counters / Higher-level temporary
  127.  
  128. These addresses are never used in NMI or IRQ.
  129.  
  130. Joypad Memory
  131. -------------
  132.  
  133. 14 : Joypad 1 - Button Push Bits
  134. 15 : Joypad 2 - Button Push Bits
  135. [0 = Not Recently Pushed Down, 1 = Recently Pushed Down]
  136. 16 : Joypad 1 - Button Status Bits
  137. 17 : Joypad 2 - Button Status Bits
  138. [0 = Not Being Pressed Down, 1 = Being Pressed Down]
  139. MSB
  140. bit0 : A
  141. bit1 : B
  142. bit2 : Select
  143. bit3 : Start
  144. bit4 : Up
  145. bit5 : Down
  146. bit6 : Left
  147. bit7 : Right
  148. LSB
  149.  
  150. Graphics Updates
  151. ----------------
  152.  
  153. 18 : Palette Buffer - Write Flag (if == 1, then write Palette Buffer to VRAM. $FF is also written.)
  154. 19 : VRAM Buffer - Write Flag (if > 0, then write VRAM Buffer to VRAM)
  155. 1A : VRAM Buffer - Write Flag (Vertical NameTable Updates) (if > 0, then write VRAM Buffer to VRAM, NameTable writes are done in Vertical direction. )
  156.  
  157. 1B : Auto Screen update - register
  158. 1C : Screen of Auto Screen update / Screen of Auto 32x32 Tile redraw
  159. If this is set to a value greater than 0 before entering weapon menu, it will draw the
  160. entire screen to the 2nd Nametable before gameplay resumes.
  161. 1D : Auto 32x32 Tile Draw. Value $80 or higher enables it.
  162. MSB
  163. bit0: Enable
  164. bit1: Destination Nametable of Draw
  165. 0 = $2000
  166. 1 = $2400/$2800 (depends on current mirroring)
  167. bit2-bit7: 32x32 Tile
  168. bit2-bit4: Vertical pointer
  169. bit5-bit7: Horizontal pointer
  170. LSB
  171.  
  172. 1E : Enable special effect in Drill Man's Stage (???)
  173.  
  174. --
  175.  
  176. 1F : Point in Level Passed
  177. 00 : Not passed any point
  178. 01 : Mid-Point
  179. 02 : Boss-Point (Or for some stages, secondary Mid-Point)
  180.  
  181. This byte has more uses than this one.
  182.  
  183. 20-21 : Screen Preset Data pointer
  184.  
  185. 22 : Stage Bank / Scene Graphics Bank
  186.  
  187. 23 : Direction which Nametable Column of Tiles has been recently drawn.
  188. 08 : Up
  189. 04 : Down
  190. 02 : Left
  191. 01 : Right
  192.  
  193. 24 : Tile Nametable Row/Collumn Counter
  194. 25 : Pixel Scroll Counter X
  195. 26 : Pixel Scroll Counter Y
  196. 27 : Megaman's X position (Copy of 330)
  197. 28 : Current Screen Position Megaman is on. (Copy of 348)
  198. (Not current screen Scroll-wise. For Scroll-wise current screen, see Mem $F9).
  199.  
  200. 29 : 32x32 Tile location on the screen. It is used in two different events:
  201. 1. Sprite hit detection with walls. The value is based on Mega Man or an enemy's position in a screen.
  202. 2. Name Table updates when scrolling. The value is based on the row / collumn being updated in a screen.
  203. The value is used in routine $D295 as a index into the level data.
  204.  
  205. 2A : Next Screen Position (Scroll Related) / Screen of Nametable updates
  206.  
  207. 2B : Scroll Direction + Scroll Data Index
  208. b0-3: Scroll Direction
  209. 08 = Up
  210. 04 = Down
  211. 02 = Horizontal
  212. b4-7: Current Scroll Map
  213.  
  214. 2C : Never used in entire game.
  215.  
  216. 2D : Number of Screens in Current Scroll Map.
  217. 2E : Current Screen Position of current Scroll Map (Scroll Related)
  218. 2F : Direction which Screen is being scrolled.
  219. 02 : Left
  220. 01 : Right
  221.  
  222. Megaman stuff
  223. -------------
  224.  
  225. 30 : Status of Megaman
  226. 00 : On ground (Standing/Walking)
  227. OR IF STATUS WAS 01, BUT START WAS PUSHED, WHEN COMING BACK FROM PAUSE,
  228. STATUS WILL BE 00 EVEN IF IT SHOULD BE 00. OR MEGA MAN HIT A ROOFT.
  229. ALSO, IF ON GROUND WITH STATUS 06, 06 IS IN $30 THEN IT WILL BECOME 00.
  230. 01 : Jump
  231. 02 : Slide
  232. 03 : Ladder Climb
  233. 04 : Rush Marine
  234. 05 : Wire Adaptor use
  235. 06 : Hit by Object.
  236. 07 : Hit by spikes/Defeated by enemy/Fell down pit.
  237. When hit by spike, to know if #$07 will be set in $30, it checks $3D
  238. 08 : Boss Defeated - Warp Out
  239. 09 : Boss Chamber - Wait for Boss to get ready.
  240. 0A : "Ready" blink, Warp down.
  241. 0B : Boss Defeated - Weapon Get / Warp Out
  242. 0C : Battle with Cossack - Caught by Cossack Catcher
  243. 0D : Cossack Stage 4 - Cossack Defeated
  244. 0E : Cossack Stage 4 - Cossack Defeated (Dialog)
  245. 0F : Wily Stage 3 Rematch Room Warp
  246. 10 : Enter boss room - walk a bit forward (Used with Cockrach Twins boss)
  247. 11 : Wire/Balloon Item achieved - Wait, then warp out.
  248. 12 : Wily Stage 4 - Wily defeated.
  249. 13 : MM escapes from Wily's Fortress
  250. 31 : Walking Direction (Copied to memory $420)
  251. 32 : # of Frames which Megaman's Pose should last until it returns to normal.
  252. (Used for Weapon Aiming Poses, etc.)
  253. 33 : Indicated if MM is shooting : #$00 MM is not shooting.
  254. #$01 MM is shooting with gun (like normal weapon)
  255. #$02 MM is shooting with arm (like Metal Blade)
  256.  
  257. 34 : Slide Counter
  258. 35 : Buster Charge Counter (If $35 = 5C, Full Charged Shot is ready)
  259. 36 : Buster Charge Palette set to set as megaman's palette when player releases B button.
  260.  
  261. 37 : Megaman horizontal movement speed Low (ratio) (Written to $3A8)
  262. 38 : Megaman hotizontal movement speed High (pixels per frame) (Written to $3C0)
  263.  
  264. 39 : Horizontal Movement Patch - Direction (Toad Man Wind and more)
  265. Values are as following :
  266. 00 : Mega Man is not moved.
  267. 01 : Mega Man is pushed to the right with values of 3A and 3B.
  268. 02 : Mega Man is pushed to the left with values of 3A and 3B.
  269. 3A : Horizontal Movement Patch - Speed Low (Toad Man Wind and more)
  270. 3B : Horizontal Movement Patch - Speed High (Toad Man Wind and more)
  271.  
  272. 3C : Megaman's Invincibility Counter - Copied to $5B8 if > 0. $05B8 is what makes him blink.
  273. 3D : Set to #$30 when Megaman hits spikes.
  274.  
  275. 3E : Ring Man stage / Ring Guy / Blocked passage flag
  276. Determines if Megaman has destroyed "Ring Guy" in Ring Man's stage
  277. where it traps the level passage until you have defeated it.
  278. Cleared at stage init.
  279.  
  280. 3F : Hatch hit flag. Cleared at stage init.
  281. Written $50 to when megaman hits a hatch. This is used in the scrolling code to force scrolling right to the next section.
  282. Note: Contains TSA type value of any hit wall, (AND #$10 != #$00)
  283. But only to the right of Megaman.
  284. Seems to only be used for the purpose of checking for hit with hatches.
  285.  
  286. --
  287.  
  288. 40-4E : Seems like temporary memory, but has many different uses.
  289.  
  290. 40 : Object Hit Detection With Walls - Counter.
  291.  
  292. 41 : 16x16 Tile Type of 16x16 Tile Object has hit. (Result of D2FC).
  293. If hit more than one 16x16 tile type, this will tell the Type with highest value.
  294.  
  295. So don't use it to know if a solid tile was hit, because if water was hit (#$60)
  296. and a solid tile (#$10) it contains #$60. But in this case, $10 contains #$70.
  297.  
  298. 42 : Object / Hit Detection temp?
  299. Copy of Object's Y Coordinate
  300.  
  301. 43 : In water, fall slowly.
  302. It's a variable used to make sure Vertical Speed is lowered more slowly when in Water. It is set to #$03,
  303. and then until it reached #$00, Vertical Speed is not reduced.
  304.  
  305. 44 : Seems to contain the hit block in center of MM. It is used to know when MM changes of of place (examole center touch air and middle touch water,
  306. then water will Splash
  307. 45-49 : Object Hit Detection with Walls - Result Array (From $45 to $49 they contain hit block from left to right I believe)
  308. Most object uses only 3 ($45 to $47 like Mega Man, but Jumbig uses them all)
  309.  
  310. 45 : Temporary Store of 22 when executing weapon menu.
  311. 46 : Temporary Store of FC when executing weapon menu. Use at some other place, like before status $30
  312. is set to "Ladder Climb".
  313. 47 : Temporary Store of 1C when executing weapon menu.
  314. 48 : Temporary Store of F0 when executing weapon menu.
  315. 49 : Temporary Store of FD when executing weapon menu.
  316. 4A : Temporary Store of FA when executing weapon menu.
  317.  
  318. 4B-4E : Palette Animation ID - Temporary Store
  319. Used to store Palette Animation ID's from 6F0-6F3 when
  320. temporarily turned off (6F0-6F3 is cleared), to be turned
  321. back on by writing them back to 6F0-6F3.
  322. (Used by Weapon Menu)
  323.  
  324. 4F : Never used in entire game.
  325.  
  326. --
  327.  
  328. 50 : Graphics Load ID to load.
  329. 51 : Current byte position in Gfx load - Relative to offset 52/53
  330. 52-53 : Graphics being loaded - Address of ID
  331. 54 : Graphics being loaded- PRG-Bank to load graphics from
  332. 55 : Graphics being loaded - Remaining Tile Counter
  333. 56-57 : Graphics being loaded - Source Address Pointer
  334. 58-59 : Graphics being loaded - Dest. VRAM Address Pointer
  335.  
  336. 5A-5B : Level Hit Detection : Temporary Address to Wall Hit Detect data
  337.  
  338. 5C : # of Scanlines before Scanline Effect, from NMI. (Copy of $F1)
  339. 5D : ID : Mid-frame Scanline effect to do using MMC3 Scanline IRQ's. (Copy of $F0)
  340.  
  341. 5E : Used with Scanline Effect #1 in Ring Man's Stage.
  342.  
  343. 5F : Never used in entire game.
  344.  
  345. --
  346.  
  347. 60 : Palette Animation Handler - Index Counter
  348. 61 : Palette Animation - Temp Mem - Copy of $18 status (Palette Buffer Write Flag)
  349.  
  350. 62-63 : Palette Animation handler - Temp Mem - Address of Palette Animation data
  351.  
  352. 64 : Palette Fade - Palette Ignore Bits.
  353. (Tells Palette Fade to ignore certain parts of the palette. Must be set before fade occurs. Cleared after fade.)
  354. MSB
  355. bit0: Ignore BG Palette 1
  356. bit1: Ignore BG Palette 2
  357. bit2: Ignore BG Palette 3
  358. bit3: Ignore BG Palette 4
  359. bit4: Ignore Spr Palette 1
  360. bit5: Ignore Spr Palette 2
  361. bit6: Ignore Spr Palette 3
  362. bit7: Ignore Spr Palette 4
  363. LSB
  364.  
  365. 65 : Vertical Scrolling (Written to 2005, copy of FA)
  366. 66 : Horizontal Scrolling (Written to 2005, Copy of 69 or FC depending on Scanline IRQ Effect in use.)
  367. 67 : Source Nametable to Display - OR'ed with Memory $FF and written to $2000 every Vblank.
  368. Copy of FD normally, copy of 6A if Scanline IRQ Effects 3, 6, 7, 9, $A, or $B are used.
  369.  
  370. 68 : Never used in entire game.
  371.  
  372. 69 : Written to 66 if Scanline Effect ID is #3
  373. 6A : Written to 67 if Scanline Effect ID is #3
  374.  
  375. 6B : If set (not 0), disable handling of sprite animations. Sprites are still rendered.
  376. Counter of Health/Weapon capsule increase amount.
  377.  
  378. 6C-6F : Cossack Stage 4 end scene - Dialogue memory.
  379. 6C : Dialogue ID
  380. 6D : Character Pointer
  381. 6E-6F : Offset of Dialogue ID (THEY ARE WRITTEN BEFORE THE ARE READ, SO YOU CAN USE THEM AT OTHER PLACES, FOR TEMPORARY USE)
  382.  
  383. --
  384.  
  385. 70-7F : Never used in entire game.
  386.  
  387. Threads
  388. -------
  389.  
  390. 80-83: Thread 1 Register
  391. 80 : Thread 1 Status:
  392. 01: Has called back by $FF1C, waiting for Vblank.
  393. 02: Returned from NMI, returning from thread handler.
  394. 04: Vblank occured, execution to proceed.
  395. 08: Recently been registered.
  396. 81 : Thread 1 Frame Wait Counter
  397. 82 : Thread 1 Stack Pointer
  398. 84-87 : Thread 2 Register
  399. 86 : Thread 2 Stack Pointer
  400. 88-8B : Thread 3 Register (Not used)
  401. 8C-8F : Thread 4 Register (Not used)
  402.  
  403. 90 : Thread handler memory
  404. 91 : Thread handler memory (thread counter?) / (Joypad update flag?)
  405. Denotes that Joypad is already updated and doesnt need 2nd update.
  406. 92 : Frame Counter - Increased in NMI.
  407.  
  408. 93-94 : Thread Code Address for new thread to be registered.
  409. 93 : Also has a different use in thread handler routines
  410. 94 : Never used after boot-up (Last use is before copyright screen fades up.)
  411.  
  412. --
  413.  
  414. 95 : Manual Frame Counter, not increased in NMI.
  415.  
  416. 96 : Object Slot Counter - For Drawing Sprites
  417.  
  418. 97 : Sprite DMA Buffer RAM - Free sprite 8-bit Pointer / Sprite Counter
  419.  
  420. 98 : Never used in entire game.
  421.  
  422. 99 : Global Gravity Force (Always $40.)
  423.  
  424. 9A : VRAM update suspend flag. Used to synchronize sprite DMA updates and VRAM updates.
  425.  
  426. 9B : Enable Scanline IRQ Effects? (Depending on value, write is done to $E000 / $E001)
  427.  
  428. 9C-9D : Scanline IRQ Effect - ASM Address
  429.  
  430. 9E : Stage Enemy Counter - Next Enemy (first to init by forwards movement)
  431. 9F : Stage Enemy Counter - Previous Enemy (first to init backwards movement)
  432.  
  433. A0 : Item/Weapon In Use (Weapon ID)
  434.  
  435. A1 : Extra Lives
  436. A2 : # of Energy Tanks
  437.  
  438.  
  439. A3-A8 : Slippery Block / A4 has another function
  440.  
  441. A3 : It's used for Slippery Block.
  442. Contains direction bits of slipping direction
  443. A4 : If set, MM gets hit by spikes?
  444. Also in cossack Stage 1 set when MM is on slippery block (as long as he touches, even if a little, a slippery block,
  445. it contains #$B0.
  446. A5 : Slow Down
  447. This variable is always minimum #$01. Then, for every turn while walking in the same direction on ice, it is
  448. increase by #$01, up to #$1A Max. Then when deccelerating, it is diminished by #$01 every turn. this value is
  449. used to be substracted to $3A every turn when deccelerating
  450.  
  451. A6 : This variable is like the high speed of A5 if A5 would be a low speed. But since max value of A5 it #$1A, it never
  452. happen. It was probably used when programming but was never used in the end.
  453.  
  454.  
  455. A7 : Used with "Slippery" block type.
  456. Horizontal Movement Patch for Slippery Block, set in $3A (Low)
  457. A8 : Used with "Slippery" block type.
  458. Horizontal Movement Patch for Slippery Block, set in $3B (High)
  459.  
  460. A9 : Clear Bits for Regular Stages
  461. MSB
  462. bit0 : Skull Man
  463. bit1 : Dive Man
  464. bit2 : Dust Man
  465. bit3 : Ring Man
  466. bit4 : Pharaoh Man
  467. bit5 : Drill Man
  468. bit6 : Toad Man
  469. bit7 : Bright Man
  470. LSB
  471.  
  472. AA : Clear Bits for Cossack / Wily Stages
  473. MSB
  474. bit0 : Wily 4
  475. bit1 : Wily 3
  476. bit2 : Wily 2
  477. bit3 : Wily 1
  478. bit4 : Cossack 4
  479. bit5 : Cossack 3
  480. bit6 : Cossack 2
  481. bit7 : Cossack 1
  482. LSB
  483.  
  484. AB : Wily Stage 3 Warp Pointer.
  485. AC : Wily Stage 3 Rematch Warp Room - Robot Master Clear Bits.
  486. (Cleared at Stage Clear along with $100-$11F.)
  487. MSB
  488. bit0 : Dust Man (Lower-Right)
  489. bit1 : Ring Man (Right)
  490. bit2 : Pharaoh Man (Upper-Right)
  491. bit3 : Toad Man (Center-Right)
  492. bit4 : Dive Man (Center-Left)
  493. bit5 : Skull Man (Lower-Left)
  494. bit6 : Bright Man (Left)
  495. bit7 : Drill Man (Uppwer-Left)
  496. LSB
  497.  
  498. AD : Suspend Megaman's Movement by # frames.
  499. (Used in Bright Man boss battle)
  500.  
  501. AE-AF : Never used in entire game.
  502.  
  503. --
  504.  
  505. B0 : Megaman's HP
  506. Weapon Energy - Array:
  507. B1 : Rush Coil
  508. B2 : Rush Jet
  509. B3 : Rush Marine
  510.  
  511. B4 : Toad - Rain Flush
  512. B5 : Wire Adaptor
  513. B6 : Balloon Adaptor
  514. B7 : Dive - Dive Missile
  515. B8 : Ring - Ring Boomerang
  516. B9 : Drill - Drill Bomb
  517. BA : Dust - Dust Crusher
  518. BB : Pharaoh - Pharaoh Shot
  519. BC : Bright - Flash Stopper
  520. BD : Skull - Skull Barrier
  521. BE : Set to #$9C when opening weapon's menu.
  522. This is simply used to draw the energy bar
  523. below "M.Buster" (using the same method as for the
  524. other energy bars). The buster bar is always full
  525. in the weapon's menu ;)
  526.  
  527. BF : Robot Master HP - This is a copy of $467 (or $466 in some cases)
  528. used to draw the Boss energy bar.
  529.  
  530. Music / Sound
  531. -------------
  532.  
  533. C0 : Sound routines memory.
  534.  
  535. C1-C7 : Sound routines memory
  536.  
  537. C8 : BGM Tempo Low Counter
  538. C9-CA : BGM Tempo
  539. CB : BGM Transpose
  540. CC : BGM Fade Down / Up Speed (Set to Activate)
  541. CD : BGM Fade Depth
  542.  
  543. CE-D0 : Sound routines memory
  544. CE : Sound's priority. Useful if in certain case you want a specific sound to crush another one.
  545. D1-D5 : Sound Effect stuff..
  546. D6 : Sound routines memory - seems to be 00 most of the time..
  547. D7 : Sound routines memory - also seems to be 00 mostly.
  548. D8 : Sound routines memory - same.
  549.  
  550. D9 : Current Sound ID playing (Music)
  551. DA : Sound ID Init Array Counter (after init?)
  552. DB : Sound ID Init Array Counter
  553. DC-E3 : Sound ID Init Array
  554. E0 : Sound ID
  555.  
  556. -------------
  557.  
  558. E4-E7 : Random Numbers
  559. E4 : Also written to outside random generator
  560. E6 : Also written to outside random generator
  561. E7 : Also written to outside random generator
  562.  
  563. E6-E7 : Temp Values Used In Weapon Particle Hit Detection..
  564. Also Temp Mem in Scrolling Nametable Updates.
  565.  
  566. E8-E9 : NMI return address store/backup - used with stack manipulation in NMI.
  567.  
  568. EA : If set (not zero) : Disable all writes to PPU registers and disable Scanline IRQ effects.
  569.  
  570. EB : Object (ASM) Object Slot Counter
  571.  
  572. EC : Copy (Backup) of $F6
  573.  
  574. ED : Backup of X Register (Used by $FF5C Routine.)
  575. EE : Backup of Y Register (Used by $FF5C Routine.)
  576.  
  577. EF : Y Coordinate to give sprites below coordinate background priority. (00 = disable)
  578. See C86B. For every stage, this table is looked to set $EF
  579.  
  580. F0 : Mid-frame Scanline effect# to do using MMC3 Scanline IRQ's.
  581.  
  582. F1 : Scanline IRQ Effect - # of Scanlines before Start - Copied to 5C.
  583.  
  584. F2 : Value which has been recently written to $8000 (MMC3 Control Register).
  585. F3 : Bank which has been switched into MMC3 Bank A ($8000 - $9FFF) - Copy of F5 at bankswitch.
  586. F4 : Bank which has been switched into MMC3 Bank B ($A000 - $BFFF) - Copy of F6 at bankswitch.
  587. F5 : Bank to Bankswitch to - MMC3 Bank A ($8000 - $9FFF)
  588. F6 : Bank to Bankswitch to - MMC3 Bank B ($A000 - $BFFF)
  589. F7 : Flag - Bankswitching in Progress? (If doing bankswitch, set to 1)
  590. Sound handling in NMI/Vblank is delayed to after bankswitch if this is set. (See below.)
  591. F8 : Flag - Handle sound immediately after next bankswitch.
  592. The sound handling done in NMI/Vblank sets the MMC3 bank registers
  593. directly, and needs F7 to be clear. If it isnt clear (bankswitch in progress), F8 will be
  594. set instead of handling sound at that moment.
  595. Then, when the NMI returns, the bankswitching routine will check F8 after fullfilling
  596. the bankswitch, and if set, branches to $FF5C which then calls the sound routines.
  597. In simplier words, it assures that sound is updated once every Vblank. :p
  598.  
  599. F9 : Current Screen Position (Seems independent from Memory 28)
  600. FA : Vertical Scrolling - Copied to 65.
  601. FB : Set to 00 at Stage Start, other than that, dont know if its used.
  602. FC : Horizontal Scrolling - Copied to 66 and 25 (Some Scanline IRQ Effects causes 66 to be overwritten)
  603.  
  604. FD : Source Nametable to Display - (Bits 6/7 of PPU Control Register 0) - Written to 67 but not used if specific Scanline IRQ Effects are active.
  605. 0 : Display Nametable at VRAM $2000 (Normal)
  606. 1 : Display Nametable at VRAM $2400
  607. 2 : Display Nametable at VRAM $2800 (Set to for Weapon Menu)
  608. 3 : Display Nametable at VRAM $2C00
  609.  
  610. FE : Written to $2001 (PPU Control Register 1) every Vblank.
  611. FF : AND'ed with #$78 and written to $2000 (PPU Control Register 0), then OR'ed with
  612. 67 and written to $200 again, both every Vblank.
  613.  
  614. 100-11F : Stage - Pickup Item Bits
  615. [Ever noticed when Megaman dies and starts from a continue point,
  616. some picked up items like 'E' tanks doesnt exist anymore?
  617. This array sets bits to register these things. ]
  618.  
  619. 120-123 : Rainbow bars memory : Draw register
  620. Is $80-$FF when a bar is active.
  621. If value is $C0-$FF, it will draw to the screen.
  622. bits 2 to 7 holds the screen position which the bar exists,
  623. but the value never seem used for anything.
  624. 124-127 : Rainbow bars memory : Nametable access address High
  625. 128-12B : Rainbow bars memory : Nametable access address Low
  626. 12C-12F : Rainbow bars memory : Index to TSA of level data, to draw to the screen.
  627.  
  628. 130-132 : Energy Bar Enable. (If >$80, draw Energy Bar.)
  629. Memory Byte to use for Source is ($B0 + ([Value] AND $7F))
  630. 130 : Megaman
  631. 131 : Weapon
  632. 132 : Boss
  633.  
  634. 133-134 : Wait Counter? Used when MM achieves Wire Item
  635. Also used when Mega Man falls in a pit. They will be counted if $30 has the value 07, 08, 11 or 13.
  636.  
  637. 135-137 : In-Gameplay Palette Fading registers.
  638. 135 : Init Register
  639. 136 : Frame Counter
  640. 137 : Current Value to Subtract from Palette
  641.  
  642. 138 : Currently Selected Weapon/Item in Weapon Menu. Used to keep memory of cursor
  643. Values :
  644. 00 : Mega Buster
  645. 01 : Flash Stopper
  646. 02 : Rain Flush
  647. 03 : Drill Bomb
  648. 04 : Pharaoh Shot
  649. 05 : Ring Boomerang
  650. 06 : Dust Crusher
  651. 07 : E-Tank
  652. 08 : Dive Missile
  653. 09 : Skull Barrier
  654. 0A : Rush Coil
  655. 0B : Rush Marine
  656. 0C : Rush Jet
  657. 0D : Wire Adaptor
  658. 0E : Balloon Adaptor
  659.  
  660. 139 : Weapon Menu - Previous selection.
  661. See values of $0138. Values are the same.
  662.  
  663. 13A : Rain Flush Sprite Effect - Enable/Count Register
  664. 13B : Rain Flush Relative X Coordinate Register
  665. 13C : Flash Stopper Frame Counter Low
  666. 13D : Flash Stopper Frame Counter High
  667. 13E : (?) Has with rising/sinking water in Dive Man's stage to do.
  668. Also, Y Pixel where MM falls or gets out of water.
  669. Also used by Dust Man's moving ceiling.
  670.  
  671. 13F : ?? Used by Dust Man's moving ceiling.
  672.  
  673. 140-142 : ?? Used by Dust Man's moving ceiling.
  674. 140 : Shootable Block Hit - X screen on which the weapon met the block
  675. 141 : Shootable Block Hit - Copy of $29 at hit..
  676. 142 : Shootable Block Hit - 16x16 Block index of 32x32 tile which is hit. (0-3)
  677.  
  678. 143-144 : Counter until light turns back on automatically, after shooting lightbulb bot.
  679.  
  680. 145 : Toad Man boss battle uses this.
  681. If >=$10, Rain Flush effect will use different sprite tile and palette. (Used when Toad Man casts
  682. rain flush, rather than Megaman.)
  683.  
  684. 146 : Boss Object Slot index.
  685.  
  686. 147 : ?? Copy of $22 when Warping back after achieving Wire Item.
  687. (Also copy of $22 when quitting gameplay loop.)
  688. Copied back to $22 when at Password Screen, in these cases:
  689. * After beating level.
  690. * Game Over.
  691.  
  692. 148 : Cease MM Status Change (Mem $30) by set # of Frames. (i think)
  693. Setting $30 to #$11 along at least will make MM warp out of screen,
  694. but after this byte has been counted down to 0, decreased for every Vblank.
  695. (Used when Megaman picks up Balloon and Wire Items.)
  696.  
  697. 149 : Used for Warps in Wily Stage 3.
  698.  
  699. 14A-15F : Never used in entire game.
  700.  
  701. (160 and a few bytes on may also be never used, it depends on how deep the stack
  702. from 17F grows.)
  703.  
  704. Stacks:
  705. -------
  706.  
  707. <-17F : Third Stack (2nd Thread - Random Generator/Palette Animations)
  708.  
  709. <-1BF : Secondary Stack (Main Thread - Main game loop)
  710.  
  711. <-1FF : Main Stack (Thread Switch and Wait Handler)
  712.  
  713. Sprite DMA Buffer RAM:
  714. ----------------------
  715.  
  716. 200-2FF : Sprite DMA Buffer RAM
  717. DATA FORMAT :
  718. Y POSITION - TILE TO SELECT - PALETTE TO SELECT - X POSITION
  719. PLEASE, NOTE THAT IF YOU DRAW TOO MUCH SPRITE ON A CERTAIN Y
  720. COORDINATE, SOME WON'T DISPLAY. THERE IS A MAXIMUM OF 8.
  721. Y POSITION is set to $F8 for sprites that are not used.
  722.  
  723.  
  724. ---------------
  725.  
  726. Sprite/Object Arrays:
  727. ---------------------
  728.  
  729. 300-317 : Object ID
  730. 318-32F : X Coordinate Ratio Counter
  731. 330-347 : X Coordinate
  732. 348-35F : X Screen (Level Screen)
  733. 360-377 : Y Coordinate Ratio Counter
  734. 378-38F : Y Coordinate
  735. 390-3A7 : Y Screen
  736. $00 : On visible screen.
  737. if $80-$FF : On screen above visible screen
  738. if $01-$7F : On screen below visible screen
  739. 3A8-3BF : Horizontal Speed Low
  740. 3C0-3D7 : Horizontal Speed High
  741. 3D8-3EF : Vertical Speed Low
  742. 3F0-407 : Vertical Speed High
  743. 408-41F : Substance and Shape
  744. Object's Byte:
  745. MSB
  746. bit0: Substance (If Set, MM is damaged if hitting Object)
  747. bit1: Weapon damage
  748. If 0, Weapons are deflected (however, if the weapon is set to do no damage
  749. for that object, nothing happens.)
  750. If 1, Object is damaged by weapons (however, if the weapon is set to do no
  751. damage for that object, the weapon is deflected if object is set to
  752. visible with bit 5 of Sprite Flag (of 528). If it is invisible,
  753. nothing happen.)
  754. bit2-bit7 : Shape ID (Decides Height and Width setting of occupying space).
  755. LSB
  756. Megaman's byte in this array ($408) has no use, appearently.
  757. 420-437 : Direction Bits
  758. Object's Byte:
  759. MSB
  760. bit4: Up (Not neccesarily set when Jumping)
  761. bit5: Down (Not neccesarily set when falling from gravity.)
  762. bit6: Left
  763. bit7: Right
  764. LSB
  765. 438-44F : Enemy Number# of Level
  766. 450-467 : Enemy HP
  767.  
  768.  
  769. 468-47F : Object ASM Private Memory 1
  770. 480-497 : Object ASM Private Memory 2
  771. 498-4AF : Object ASM Private Memory 3
  772. 4B0-4C7 : Object ASM Private Memory 4
  773. 4C8-4DF : Object ASM Private Memory 5
  774. 4E0-4F7 : Object ASM Private Memory 6
  775. 4F8-50F : Object ASM Private Memory 7
  776. 510-527 : Object ASM Private Memory 8 - Seems to only be used for Mothraya and Rainbow bars
  777.  
  778. 438 : ???May never be used! Play a complete game with a debugger point to know.
  779. 468 : Backup of $30 when MM is hit by enemy.
  780. 480 : Used. Purpose unknown.
  781. 498 : Has to do with Mega Man being in air. For example, when Rush Coil makes Mega Man jumps, Rush Coil increase it by 1.
  782. 4B0 : Used with Rush Jet (Status if Megaman rides on Rush Jet?)
  783. 4C8 : Used with Pharaoh Shot (Object slot of loading Pharaoh Shot?)
  784. 4E0 : Flash Stopper Counter
  785. 4F8 : Used. Purpose unknown.
  786. 510 : Used to count energy depletion of Rush Marine
  787.  
  788. 528-53F : Sprite Flags
  789. Object's Byte:
  790. MSB
  791. bit0: Game use it : set to 1 means enemy is on visible screen, 0 if he is not.
  792. For weapons, if set, it hurts enemies, else it doesn't
  793. bit1: Direction: 1=Face Right 0=Face Left
  794. bit2: 1=Sprite BG Priority 0=No Sprite BG Priority
  795. bit3: Apply X Scrolling when drawing sprites? (1=Yes. Probably always set.)
  796. bit4: If set, objects are not erased when moving out of screen. (Both Horizontally and Vertically)
  797. If object can hurt Mega Man, they can touch him, if they are in another screen.
  798. bit5: 1=Invisible 0=Visible
  799. bit6-7: Object Wall Bits (MM can walk on object)
  800. If value is 1, 2, 3, the Object have solids parts. If Mega Man hits a non solid
  801. parts, he ends up on top. Here are the solid parts.
  802. 1: Top
  803. 2: All
  804. 3: Top, Left, Right (if hit object by under, Mega Man is replaced at a
  805. certain position from the block (the right, left or top)
  806. LSB
  807. 540-557 : Sprite's Animation
  808. 558-56F : Sprite ID
  809. 570-587 : Animation Frame Counter
  810. 588-59F : ASM - Low Address
  811. 5A0-5B7 : ASM - High Address
  812. 5B8-5CF : Invincibility Blink / Freeze Action Status
  813. Object's Byte:
  814. MSB
  815. bit0: Mode (1 = Freeze Action, 0 = Invincibility Blink)
  816. bit1-bit7: Frame Counter of Blink/Freeze
  817. LSB
  818. Notes: The freeze function is used with Flash Stopper.
  819. Invincibility Blink refers to when Megaman or an enemy
  820. gets hit and become invincible for a moment, while blinking.
  821. This memory range is used for both cases.
  822. For Mega Man to be invincible, value must be in $3C.
  823.  
  824. 5D0-5FF : Never used in entire game.
  825.  
  826. ---------------
  827.  
  828. 600-61F : Palette VRAM buffer
  829. 620-63F : Palette Source
  830.  
  831. 640-67F : Attribute Table Work RAM
  832.  
  833. 680-6BF : Stage Special Mem / 2nd Attribute Table Work RAM
  834. Memory is used by Ring Man's Rainbow bars.
  835. Drill Man "Switch" Memory:
  836. One byte for each Screen Position from $10 to $13:
  837. Values:
  838. $00 : Is Off
  839. $70 : Being Turned On (Fading up Palette)
  840. $7F : Is On
  841. Dust Man Shootable Block Memory:
  842. In the moving ceiling section from Screen Position $0C to $11:
  843. Every Block in this section has each a Bit for its status in
  844. the memory range $680-$691, the bit is set to 1 if the block is gone.
  845. The bits seems to be organized into each byte representing a
  846. field of shootable blocks of 32 pixels width and 64 pixels height.
  847.  
  848. Mem is cleared when entering a new Scroll Map Position
  849.  
  850. This memory range is also used to cache Attribute Table updates for the 2nd Name Table,
  851. at automatic screen drawing, triggered by memory $1B.
  852. This is done at the moving waves of Dive Man's stage, moving ceiling of Dust Man's stage, and
  853. possibly other places.
  854.  
  855. 6C0-6C3 : Palette Animation ID - Temporary Store
  856. Used to store Palette Animation ID's from 6F0-6F3 when
  857. temporarily turned off (6F0-6F3 is cleared), to be turned
  858. back on by writing them back to 6F0-6F3.
  859. (Debug Menu)
  860. 6C0-6CF : 16x16 Tile Return Data (Used in Screen Drawing and Updating)
  861. Those indications are at least true when calling $D24B. Values may have different
  862. uses at different times. When that function is called, $29 must contain the Structure
  863. position to get datas for.
  864. There are 4 tiles in a TSA Block. 4 TSA Blocks in a Structure. 6C0-6CF contains the 16 Tiles
  865. of a Structure. Here is ASM code to read tile values from the buffer for a specific TSA Block
  866. and tile:
  867. First, load Y with the index of the TSA Block (values goes from 00 to 03).
  868. LDY #$00
  869. Then, load X with a value from the table at $D2BA with Y as the index. This gives
  870. the correct pointer to $6C0 for your TSA Block.
  871. LDX $D2BA,Y
  872. Depending on which tile you want, you read from some address in $6C0 with X as the index.
  873. LDA $6C0,X ;Tile 00
  874. LDA $6C1,X ;Tile 01
  875. LDA $6C4,X ;Tile 02
  876. LDA $6C5,X ;Tile 03
  877.  
  878. The contents in D2BA are as follows:
  879. Y = 00: TSA Block 00: 00
  880. Y = 01: TSA Block 01: 02
  881. Y = 02: TSA Block 02: 08
  882. Y = 03: TSA Block 03: 0A
  883.  
  884. 6D0-6EF : Never used in entire game.
  885.  
  886. 6F0-6F3 : Palette Animation ID
  887. If bit 0 is on, palette is animated.
  888. 6F4-6F7 : Palette Animation Frame ID
  889. 6F8-6FB : Palette Animation Vblank Frame Counter
  890.  
  891. 6FC-6FF : Never used in entire game.
  892.  
  893. Sound:
  894. ------
  895.  
  896. 704-727 : Sound Effect Memory.
  897. 700-703 : Instrument
  898.  
  899. 728-77F : BGM Memory
  900. 728-72B : Channel - ??
  901. 72C-72F : Channel - ??
  902. 730-733 : Channel - ?? (Has with CMD #4 to do)
  903. 734-737 : Channel - ?? (b0-1 : Duty Cycle, b2-7 : Volume?)
  904. 738-73B : Channel - ??
  905. 73C-73F : Channel - Pitch Tune Setting
  906. 740-743 : Channel - Note Slide Setting
  907. 744-747 : Channel - Note (not used for Noise channel)
  908. 748-74B : Channel - Frequency - Low
  909. 74C-74F : Channel - Frequency - High (Noise frq. is stored here)
  910. 750-753 : Channel - Data Low Address
  911. 754-757 : Channel - Data High Address
  912. 758-75B : Channel - Octave
  913. 75C-75F : Channel - Transpose
  914. 760-763 : Channel - Note Length Counter
  915. 764-767 : Channel - Note-On Length Setting
  916. 768-76B : Channel - ??
  917. 76C-76F : Channel - Loop Counter 0
  918. 770-773 : Channel - Loop Counter 1
  919. 774-777 : Channel - Loop Counter 2
  920. 778-77B : Channel - Loop Counter 3
  921. 77C-77F : Channel - ??
  922.  
  923. 780-7FE : VRAM Buffer.
  924. (Used to write to Name Table VRAM, either when
  925. screen is off or in NMI when screen is on.)
  926. Format:
  927. The buffer is divided in chunks of strings.
  928. If the first byte in the chunk is $80 or more (usually $FF),
  929. it means to stop reading chunks from the buffer.
  930. Format of string chunk:
  931. byte 0: PPU VRAM Address High (if >= $80, stop reading buffer)
  932. byte 1: PPU VRAM Address Low
  933. byte 2: Number of Letters/Bytes to write (minus 1; if
  934. the value is 0, it means to write 1 tile, if value is 1,
  935. it means to write 2 tiles, and so on..)
  936. From byte 3 follows the variable-length string of bytes to write
  937. in sequence, (length is the value of [Byte 2] + 1)
  938. This is the end of the string chunk.
  939.  
  940. DEFINITION : If changing them affect the colors, here is how they works.
  941. Each of those byte will define a structure
  942. TSA blocks' palette use. First byte decide the structure at the given
  943. position, then the next byte is for the structure to the right...
  944. Bit are as follow :
  945. Bit 0-1 : Palette of TSA Block down right
  946. Bit 2-3 : Palette of TSA Block down left
  947. Bit 4-5 : Palette of TSA Block up right
  948. Bit 6-7 : Palette of TSA Block up left
  949.  
  950.  
  951. Format, explained by interpretion in C code style: {
  952. unsigned char a, x, y;
  953. unsigned char vram_hi, vram_lo;
  954. x = 0;
  955. loop:
  956. a = *(0x780 + x);
  957. if ((a & 0x80) == 0x80) { return (0); }
  958. vram_hi = a;
  959. a = *(0x781 + x);
  960. vram_lo = a;
  961. y = *(0x782 + x);
  962. for ( ; y >= 0; y--) {
  963. a = *(0x783 + x);
  964. NES_PPU_VRAM[(vram_hi << 8) | vram_lo] = a;
  965. x++;
  966. }
  967. x += 3;
  968. goto loop;
  969. }
  970.  
  971.  
  972. 780-78F : Password enter temp buffer. Copied to B0-BF if password is accepted.
  973. 7B0-7CF : Temporary Store of Palette while executing Weapon Menu.
  974.  
  975. 7FF : Never used.
  976.  
  977. ============================= ROM MAP =============================
  978.  
  979. 10 <-> 1400F - (Bank $0 <-> $9 by $2000)
  980. ----------------------------------------
  981.  
  982. CHR - Mostly Sprite Related, if not completely.
  983.  
  984. 2010 <-> 400F - (Bank $1 by $2000)
  985. ----------------------------------
  986.  
  987. 2210-280F : Pharaoh Man
  988.  
  989. 4010 <-> 600F - (Bank $2 by $2000)
  990. ----------------------------------
  991.  
  992. ROM offset 5A10-5B0F : Part of Pre-Intro Graphics (City Scene - Explosion Sprites.)
  993.  
  994. 6010 <-> 800F - (Bank $3 by $2000)
  995. ----------------------------------
  996.  
  997. ROM offset 06410-0690F : Unused
  998. ROM offset 07210-0760F : Sprites loaded by boss containing graphics of Mega Man,
  999. they are loaded in Mega Man's PPU.
  1000. ROM offset 07610-0770F : Sprites loaded by Pharaoh Man containing graphics of Mega Man,
  1001. they are loaded in Mega Man's PPU.
  1002. ROM offset 07710-0780F : Sprites loaded by boss containing graphics of Mega Man,
  1003. they are loaded in Mega Man's PPU.
  1004. ROM offset 07F10-07F8F : Spark Spine
  1005. ROM offset 07F90-07FCF : Piranha part 1
  1006. ROM offset 07FD0-0801F : Unused Datas
  1007.  
  1008. 8010 <-> A00F - (Bank $4 by $2000)
  1009. ----------------------------------
  1010.  
  1011. ROM offset 8010-900F : Mega Man & Rush for Weapon Get
  1012. ROM offset 9210-930F : Title screen tiles, cursor tile is used in Megaman 4, all sprites are used for Rockman 4 title screen.
  1013. ROM offset 9410-950F : Actually never used. Not referenced to by any graphics load data.
  1014.  
  1015. A010 <-> C00F - (Bank $5 by $2000)
  1016. ----------------------------------
  1017.  
  1018. ROM offset A390-A3AF : Tiles for Block Platform (Enemy ID $80, Object ID $60) (used in Bright Man)
  1019.  
  1020. C010 <-> E00F - (Bank $6 by $2000)
  1021. ----------------------------------
  1022.  
  1023. ROM offset C310-C40F : Piranha part 2
  1024. ROM offset C610-C70F : Before Spikes Box, Unused Datas
  1025. ROM offset C710-C80F : Spike Box
  1026.  
  1027. ROM offset D010-D04F : Some block tiles, unused, but probably meant to be used in Drill Man's stage.
  1028. ROM offset D310-D5EF : Mono-Roader
  1029. ROM offset D5F0-D60F : After Mono-Roader, Unused Datas
  1030. ROM offset D910-DB0F : Unused CHR :)
  1031.  
  1032. E010 <-> 1000F - (Bank $7 by $2000)
  1033. -----------------------------------
  1034.  
  1035. ROM offset E610-E66F : Skull Launcher
  1036. ROM offset E670-E70F : After Skull Launcher, Unused Datas
  1037. ROM offset E710-E80F : Wheeled Skull
  1038. ROM offset EA10-EB0F : Unused CHR - Rolling ball (?)
  1039. ROM offset EB10-EC0F : Unused CHR - Snake, and something.
  1040.  
  1041. ROM offset EE10-EF0F : Fly (Enemy ID $13) Sprite graphics.
  1042.  
  1043. 10010 <-> 1200F - (Bank $8 by $2000)
  1044. ------------------------------------
  1045.  
  1046. 106C0-1070F : Unused CHR ? (Not sure.)
  1047. 10710-107EF : Saturn Bot
  1048. 107F0-107FF : After Saturn Bot, Unused Datas
  1049. 11D10-11E0F : Unused CHR :)
  1050. 11F10-1200F : Disappearing Block
  1051.  
  1052. 12010 <-> 1400F - (Bank $9 by $2000)
  1053. ------------------------------------
  1054.  
  1055. 12410-1270F : Unused CHR :)
  1056.  
  1057. 12710-129AF : Mega Man's Head (the face on second intro screen)
  1058.  
  1059. 12B10-1300F : Mega Man's Head (the face on third intro screen)
  1060.  
  1061. 13110-1330F : Unused CHR :)
  1062.  
  1063. 13810-13B0F : Unused CHR :)
  1064.  
  1065.  
  1066. 14010 <-> 1800F - (Bank $A <-> $B by $2000)
  1067. -------------------------------------------
  1068.  
  1069. [Sprite Bank 1 - Certian Enemies / Objects]
  1070.  
  1071. MEMORY AREA: $8000-$BFFF
  1072.  
  1073. 1616B-1780F : Unused random data.
  1074.  
  1075. Tile Usage ID's:
  1076.  
  1077. Coordinate ID's:
  1078. 2E : Unused Coordinate Data A
  1079. 43 : Unused Coordinate Data B
  1080.  
  1081. 17810-17A0F : Tile Usage - Address Table Low
  1082. 17A10-17C0F : Tile Usage - Address Table High
  1083. 17C10-17D0F : Coordinate Data - Address Table Low
  1084.  
  1085. NOTE! THE LAST POINTER IS #$41, SO ALL DATAS AFTER 17C4F WOULD BE USABLE! TO CHECK
  1086.  
  1087. 17D10-17E0F : Coordinate Data - Address Table High
  1088.  
  1089. NOTE! THE LAST POINTER IS #$41, SO ALL DATAS AFTER 17D4F WOULD BE USABLE! TO CHECK
  1090.  
  1091. 17E10-17F0F : Animation - Address Table Low
  1092. 17F10-1800F : Animation - Address Table High
  1093.  
  1094. Adjust Value : C010
  1095.  
  1096. 18010 <-> 1C00F - (Bank $C <-> $D by $2000)
  1097. -------------------------------------------
  1098.  
  1099. [Sprite Bank 2 (Megaman, etc.)]
  1100.  
  1101. MEMORY AREA: $8000-$BFFF
  1102.  
  1103. 1807C-1808F : Tile Usage - Megaman Walk (1 animation)
  1104. 180B8-180F3 : Tile Usage - Megaman Stands Still
  1105. 18120-18165 : Tile Usage - Megaman Jumps
  1106. 181A8-181BF : Tile Usage - Megaman leashes out item
  1107. 1827E-182B3 : Tile Usage(s): ??
  1108. 1868A-186E1 : Tile Usages - Balloon Item
  1109. 186E2-18733 : Tile Usage - Dive Missile
  1110. 18786-18789 : Tile Usage - Smal Pharaoh Shot
  1111. 187C6-187CF : Tile Usage - Medium Pharaoh Shot
  1112. 187DA-187ED : Tile Usage - Big Pharaoh Shot (Animation 1)
  1113. 187EE-18801 : Tile Usage - Big Pharaoh Shot (Animation 2)
  1114. 18FD6-18FE9 : Tile Usage - Wire Item Capsule
  1115. 8FDA-8FED / 18FEA-18FFD : Tile Usage - Balloon Item Capsule
  1116. 18FFE-1909F : Tile Usage - Wily saucer flying away
  1117.  
  1118. 1974A-19771 : Coordinate - Megaman
  1119. 197CE-197DD : Coordinate - Megaman
  1120. 197EE-19811 : Coordinate - Megaman Facing Left
  1121. 1994C-19961 : Coordinate - Megaman leashing out item
  1122. 199F4-19A05 : Coordinate - Common 16x16 Sprite?
  1123. 19C50-19C65 : Coordinate - Balloon Item
  1124. 1A35E-1A3BF : Coordinate - Wily saucer flying away
  1125.  
  1126. 1A6DA-1A6E6 : Animation - Megaman (Standing)
  1127.  
  1128. 1A74C-1A752 : Animation - Unused 1
  1129. 1A767-1A769 : Animation - Unused
  1130.  
  1131. 1A818 : Times for "Ready" to blink before MM warps in. (Default = $19)
  1132. (Changing it doesnt work. I dont know why.)
  1133. 1A819 : "Ready" Blink Delay
  1134.  
  1135. 1A85F-1A866 : Animation datas - Balloon Item
  1136.  
  1137. 1A86F-1A87A : Animation - Dive Missile
  1138.  
  1139. 1A888-1A891 : Animation datas - Pharaoh Shot
  1140.  
  1141. A8B0-A8B3 / 1A8C0-1A8C3 : Animation - Wire Item Capsule
  1142. A8B4-A8B7 / 1A8C4-1A8C7 : Animation - Balloon Item Capsule
  1143.  
  1144. 1A9B6-1A9C5 : Animation - Wily Saucer flying away
  1145.  
  1146. 1AA7D-1B80F : Unused space with random data.
  1147.  
  1148. 1B810-1B987 : Tile Usage - Address Table Low
  1149. 1BA10-1BB87 : Tile Usage - Address Table High
  1150. 1BC10-1BD0F : Coordinate Data - Address Table Low
  1151. 1BD10-1BE0F : Coordinate Data - Address Table High
  1152. 1BE10-1BEBF : Animation - Address Table Low
  1153. 1BF10-1BFBF : Animation - Address Table High
  1154.  
  1155. Adjust Value : 10010
  1156.  
  1157. Tile Usage:
  1158. 21-2B : Unused.
  1159. 40-42 : Unused.
  1160. 48 : Unused.
  1161. 51-54 : Unused.
  1162. 57 : Unused.
  1163. 62-65 : Balloon Item
  1164. 92-99 : Unused.
  1165. EB-EC : Wire Item Capsule
  1166. ED-EE : Balloon Item Capsule
  1167. 101-108 : Wily saucer flying away
  1168.  
  1169. Coordinate ID's:
  1170. 20 : Medium Pharaoh Shot, Shooted left
  1171. 21 : Medium Pharaoh Shot, Shooted right
  1172. 22 : Small Pharaoh Shot, Shooted left
  1173. 23 : Small Pharaoh Shot, Shooted right
  1174. 24 : Big Pharaoh Shot Left
  1175. 25 : Big Pharaoh Shot Right
  1176. 41 : Balloon Item Left
  1177. 42 : Balloon Item Right
  1178. 97-9D : Wily saucer flying away
  1179.  
  1180. 1C010 <-> 2000F - (Bank $E <-> $F by $2000)
  1181. ------------------------------------------------
  1182.  
  1183. [Sprite Bank 3 - Boss, and certain other things.]
  1184.  
  1185.  
  1186. 1F810-1FA0F : Tile Usage - Address Table Low
  1187. 1FA10-1FC0F : Tile Usage - Address Table High
  1188. 1FC10-1FD0F : Coordinate Data - Address Table Low
  1189. 1FD10-1FE0F : Coordinate Data - Address Table High
  1190. 1FE10-1FF0F : Animation - Address Table Low
  1191. 1FF10-2000F : Animation - Address Table High
  1192.  
  1193. Adjust Value : 14010
  1194.  
  1195. 20010 <-> 3600F - (Bank $10 <-> $1A by $2000)
  1196. ---------------------------------------------
  1197.  
  1198. CHR - Stage / Cutscene Backgrounds.
  1199.  
  1200. 2A010 <-> 2C00F - (Bank $15 by $2000)
  1201. ---------------------------------------
  1202.  
  1203. 2BD10-2C00F : This CHR is unused :)
  1204.  
  1205. 36010 <-> 3800F - (Bank $1B by $2000)
  1206. -------------------------------------
  1207.  
  1208. [Intro Sequence / Ending / Credits - Code & Data]
  1209.  
  1210. 8000 : Entry Point - Pre-Intro
  1211.  
  1212. 8003-> : Ending/Credits programming
  1213.  
  1214. 8458 : In middle of Credits programming
  1215.  
  1216. 8875 -> : Background Palettes!
  1217. 88F5 / 36905 : Intro 0
  1218. 8915 / 36925 : Intro 1
  1219. 8935 / 36945 : Intro 2
  1220. 8955 / 36965 : Intro 3
  1221. 89B5 / 369C5 : ??
  1222. 369E5 : ??
  1223. 36A05 : ??
  1224. 36A25 : ??
  1225. 36A45 : ??
  1226. 36A65 : ??
  1227. 36A85 : Epilogue?
  1228. 36AA5 : ??
  1229.  
  1230. 8E36-> : ASM - Pre-Intro
  1231.  
  1232. 9AD4-9FFF :
  1233.  
  1234. 38010 <-> 3A00F - (Bank $1C by $2000)
  1235. -------------------------------------
  1236.  
  1237. CHR - Some sprite CHR, some intro sequence CHR.
  1238.  
  1239. 38CB0-3900F : Before Mega Man's Body Graphics Datas of fourth intro screen
  1240. 39010-394BF : Mega Man's Body Graphics Datas of fourth intro screen
  1241. 394C0-39FDF : Mega Man's Head Graphics Datas of fourth intro screen
  1242.  
  1243. 3A010 <-> 3C00F - (Bank $1D by $2000)
  1244. -------------------------------------
  1245.  
  1246. [Sound Data Bank #2]
  1247.  
  1248. 3B9D2-3C00F : Not used.
  1249.  
  1250. 3B9D2-3BA70: Shadow of 3B933-3B9D1, probably from earlier version of game. Nothing new.
  1251. 3BA71-3BFFF: Shadow of Sprite Data Pointers from earlier version of game? (which were moved to different bank?)
  1252.  
  1253. 3C010 <-> 3E00F - (Bank $1E by $2000)
  1254. -------------------------------------
  1255.  
  1256. [Sound Data Bank #0]
  1257.  
  1258. ASM:
  1259. 8000: Entry Point - Frame Playback
  1260. 8003: Entry Point - Sound ID Init (Sound ID in A)
  1261.  
  1262. 3E010 <-> 4000F - (Bank $1F by $2000)
  1263. -------------------------------------
  1264.  
  1265. [Sound Data Bank #1]
  1266.  
  1267. 40010 <-> 4200F - (Bank $20 by $2000)
  1268. -------------------------------------
  1269.  
  1270. [Bright Man Stage Data]
  1271.  
  1272. MEMORY AREA: $A000-$BFFF
  1273.  
  1274. A000-B6FF : <Level Data> : Bright Man
  1275.  
  1276. B700-B7FF : Mega Buster: Damage to each object ID
  1277.  
  1278. B800-B8C6 : Palette Animation Handler ASM
  1279. B813-B822 : Check for each palette if it's animated. If so, call $B829.
  1280. If #$80 (bit 7 is on), palette is animated.
  1281. B829-B862 : Subroutine called if palette is animated.
  1282.  
  1283. B8C7-> : Palette Animations - Palette Sets - (Groups of 3 bytes)
  1284. D3 is last Palette Set
  1285.  
  1286. BB43-BD2B : Palette Animation Data
  1287.  
  1288. BD2C-BD6B : Palette Animation ID Offset - Low Byte
  1289. BD6C-BDAB : Palette Animation ID Offset - High Byte
  1290.  
  1291. 41DBD-4200F : Unused random data.
  1292.  
  1293. 42010 <-> 4400F - (Bank $21 by $2000)
  1294. -------------------------------------
  1295.  
  1296. [Toad Man Stage Data]
  1297.  
  1298. MEMORY AREA: $A000-$BFFF
  1299.  
  1300. A000-B6FF : <Level Data> : Toad Man
  1301.  
  1302. B700-B7FF : Rush Coil : Damage to each object ID (Should be same as Mega Buster)
  1303.  
  1304. B800-BFFF : Unused random data.
  1305.  
  1306. 44010 <-> 4600F - (Bank $22 by $2000)
  1307. -------------------------------------
  1308.  
  1309. [Drill Man Stage Data]
  1310.  
  1311. MEMORY AREA: $A000-$BFFF
  1312.  
  1313. A000-B6FF : <Level Data> : Drill Man
  1314.  
  1315. B700-B7FF : Rush Jet : Damage to each object ID (Should be same as Mega Buster)
  1316.  
  1317. B800-BFFF / 45810-4600F: Graphics (Wily Stage 2)
  1318.  
  1319. 46010 <-> 4800F - (Bank $23 by $2000)
  1320. -------------------------------------
  1321.  
  1322. [Pharaoh Man Stage Data]
  1323.  
  1324. MEMORY AREA: $A000-$BFFF
  1325.  
  1326. A000-B6FF : <Level Data> : Pharaoh Man
  1327. B5E0-B6FF : Unused.
  1328.  
  1329. B700-B7FF : Rush Marine : Damage to each object ID (Should be same as Mega Buster)
  1330.  
  1331. B800-BFFF / 47810-4800F : Dr.Wily Stage 2 Boss Tiles
  1332.  
  1333. 48010 <-> 4A00F - (Bank $24 by $2000)
  1334. -------------------------------------
  1335.  
  1336. [Ring Man Stage Data]
  1337.  
  1338. MEMORY AREA: $A000-$BFFF
  1339.  
  1340. A000-B6FF : <Level Data> : Ring Man
  1341.  
  1342. B700-B7FF / 49710-4980F: Rain Flush: Damage/Effect to each Object ID
  1343.  
  1344. B800-BFFF / 49810-4A00F: Unused tile table: Japanese characters and other characters.
  1345.  
  1346. 4A010 <-> 4C00F - (Bank $25 by $2000)
  1347. -------------------------------------
  1348.  
  1349. [Dust Man Stage Data]
  1350.  
  1351. MEMORY AREA: $A000-$BFFF
  1352.  
  1353. A000-B6FF : <Level Data> : Dust Man
  1354.  
  1355. B700-B7FF / 4B710-4B80F : Wire Adaptor : Damage to each Object ID
  1356.  
  1357. A800-BFFF / 4B810-4C00F: Ending Scene (Train Ride) Tiles
  1358.  
  1359. 4C010 <-> 4E00F - (Bank $26 by $2000)
  1360. -------------------------------------
  1361.  
  1362. [Dive Man Stage Data]
  1363.  
  1364. MEMORY AREA: $A000-$BFFF
  1365.  
  1366. A000-B6FF : <Level Data> : Dive Man
  1367.  
  1368. B700-B7FF : Balloon Adaptor : Damage to each Object ID (All zero. Not used at all!)
  1369. NOTE: IF YOU WANT COLLISION TO BE CHECKED BETWEEN BALLONG AND ENEMIES, CHANGE
  1370. THE VALUE OF $FABE FOR THE BALLOON ADAPTOR ITEM.
  1371.  
  1372. A800-BFFF / 4D810-4E00F: Wily Stage 4 BG Tiles
  1373.  
  1374. 4E010 <-> 5000F (Bank $27 by $2000)
  1375. -----------------------------------
  1376.  
  1377. [Skull Man Stage Data]
  1378.  
  1379. MEMORY AREA: $A000-$BFFF
  1380.  
  1381. A000-B6FF : <Level Data> : Skull Man
  1382.  
  1383. B700-B7FF / 4F710-4F80F : Dive Missile : Damage to each Object ID
  1384.  
  1385. B800-BFFF / 4F810-5000F : Empty, unused space.
  1386.  
  1387. 50010 <-> 5200F (Bank $28 by $2000)
  1388. -----------------------------------
  1389.  
  1390. [Cossack Stage 1 Data]
  1391.  
  1392. MEMORY AREA: $A000-$BFFF
  1393.  
  1394. A000-B6FF : <Level Data> : Cossack Stage 1
  1395.  
  1396. B700-B7FF / 51710-5180F : Ring Boomerang : Damage to each Object ID
  1397.  
  1398. [Primary Graphics Load Data]
  1399.  
  1400. 51810-5187F : Offset - Low Byte
  1401. 51880-518EF : Offset - High Byte
  1402. 518F0-51DD1 : Primary Graphics Load - Data
  1403. 51DD2-5200F : Filler Junk (Usable for expanded Primay Graphics Load Data)
  1404.  
  1405. 52010 <-> 5400F (Bank $29 by $2000)
  1406. -----------------------------------
  1407.  
  1408. [Cossack Stage 2 Data]
  1409.  
  1410. MEMORY AREA: $A000-$BFFF
  1411.  
  1412. A000-B6FF : <Level Data> : Cossack Stage 2
  1413.  
  1414. B700-B7FF / 53710-5380F : Drill Bomb : Damage to each Object ID
  1415.  
  1416. [Scroll Graphics Load Data]
  1417.  
  1418. B800-B84F / 53810-5385F : Scroll Gfx Load - Offset - Low Byte
  1419. B860-B8AF / 53870-538BF : Scroll Gfx Load - Offset - High Byte
  1420. B8B0-> / 538C0-> : Scroll Gfx Load - Data
  1421.  
  1422. 53BF1-53BF4 : Palette for Pharaoh Man (P1) BODY
  1423. 53BF5-53BF8 : Palette for Pharaoh Man (P2) JEWEL
  1424.  
  1425. 53BBA-53BBD : Palette for Dust Man (P1) VACCUM
  1426. 53BBE-53BC1 : Palette for Dust Man (P2) BODY
  1427.  
  1428. 54010 <-> 5600F - (Bank $2A by $2000)
  1429. -------------------------------------
  1430.  
  1431. [Cossack Stage 3 Data]
  1432.  
  1433. MEMORY AREA: $A000-$BFFF
  1434.  
  1435. A000-B6FF : <Level Data> : Cossack Stage 3
  1436.  
  1437. B700-B7FF / 55710-5580F : Dust Crusher : Damage to each Object ID
  1438.  
  1439. B800-BFFF / 55810-5600F : Intro Sequence Graphics (City)
  1440.  
  1441. 56010 <-> 5800F - (Bank $2B by $2000)
  1442. -------------------------------------
  1443.  
  1444. [Cossack Stage 4 Data]
  1445.  
  1446. MEMORY AREA: $A000-$BFFF
  1447.  
  1448. A000-B6FF : <Level Data> : Cossack Stage 4
  1449.  
  1450. B700-B7FF / 57710-5780F : Pharaoh Shot : Damage to each Object ID
  1451.  
  1452. B800-BFFF / 57810-5800F: Intro Sequence Graphics (Megaman is born)
  1453.  
  1454. 58010 <-> 5A00F - (Bank $2C by $2000)
  1455. -------------------------------------
  1456.  
  1457. [Wily Stage 1 Data]
  1458.  
  1459. MEMORY AREA: $A000-$BFFF
  1460.  
  1461. A000-B6FF : <Level Data> : Wily Stage 1
  1462.  
  1463. B700-B7FF / 59710-5980F : Flash Stopper : Property/effect to each Object ID
  1464.  
  1465. B800-BFFF / 59810-5A00F: Intro Sequence Graphics (Train Ride)
  1466.  
  1467. 5A010 <-> 5C00F - (Bank $2D by $2000)
  1468. -------------------------------------
  1469.  
  1470. [Wily Stage 2 Data]
  1471.  
  1472. MEMORY AREA: $A000-$BFFF
  1473.  
  1474. A000-B6FF : <Level Data> : Wily Stage 2
  1475.  
  1476. B700-B7FF / 5B710-5B80F : Skull Barrier : Damage/effect to each Object ID
  1477. If Value is $FF, it will remove the enemy Object instantly. (Such as bullets.)
  1478.  
  1479. B800-BFFF / 5B810-5C00F : Empty, unused space.
  1480.  
  1481. 5C010 <-> 5E00F - (Bank $2E by $2000)
  1482. -------------------------------------
  1483.  
  1484. [Wily Stage 3 Data]
  1485.  
  1486. MEMORY AREA: $A000-$BFFF
  1487.  
  1488. A000-B6FF : <Level Data> : Wily Stage 3
  1489.  
  1490. B700-B7FF : Unused. (Random data)
  1491. B800-BFFF / 5D810-5E00F: Ending Scene Graphics (Snowy Hill)
  1492.  
  1493. 5E010 <-> 6000F - (Bank $2F by $2000)
  1494. -------------------------------------
  1495.  
  1496. [Wily Stage 4 Data]
  1497.  
  1498. MEMORY AREA: $A000-$BFFF
  1499.  
  1500. A000-B6FF : <Level Data> : Wily Stage 4
  1501.  
  1502. B700-B7FF : Unused. (Copy of Snowy Hill Graphics)
  1503. B800-BFFF / 5F810-6000F : Ending Scene Graphics (Train Ride BG - other half)
  1504.  
  1505. 60010 <-> 6200F - (Bank $30 by $2000)
  1506. -------------------------------------
  1507.  
  1508. [Stage Select / Capcom Logo / Stage Intro / Weapon Menu / Copyright Text - Tile Assemy and Screen Data]
  1509.  
  1510. MEMORY AREA: $A000-$BFFF
  1511.  
  1512. A000-A3FF : 16x16 Tile - 8x8 Tile Assembly Data
  1513. A400-A4FF : 16x16 Tile - Palette and Substance Data
  1514. A500-A8FF : 32x32 Tile - 16x16 Tile Assembly Data
  1515. A900-B0FF : Screen Preset - 32x32 Tile Assembly Data (Space for $20 Screen Presets)
  1516. AB00-B0FF : Unused.
  1517.  
  1518. B100-B2FF : Unused random data?
  1519.  
  1520. B500-B505 : Screen Preset Layout. This is used.
  1521. B530-B531 : Stage Layout (Not used)
  1522.  
  1523. B550-B551 : Stage Part : Stage BG Palette Set (Not used)
  1524. B560-B561 : Stage Part : Scroll Graphics Load ID (not used)
  1525.  
  1526. Note : The Copyright screen, as well as parts of the intro, load Primary
  1527. Scroll GFX #$55. You can change this value at 36E5F
  1528.  
  1529. B590-B5A3 : Copy of Rockman 4 title screen palette set. Never used.
  1530.  
  1531. (From B300 to B7FF there seems to be just junky expect for the above data.)
  1532.  
  1533. B800-BFFF / 61810-6200F : Wily Stage 3 Graphics
  1534.  
  1535. 62010 <-> 6400F - (Bank $31 by $2000)
  1536. -------------------------------------
  1537.  
  1538. [Weapn Get / Password / Title Screen - Tile Assemy and Screen Data]
  1539.  
  1540. MEMORY AREA: $A000-$BFFF
  1541.  
  1542. AA00-90FF : Unused.
  1543.  
  1544. B100-B7FF : Copy of Wily Stage 3 Graphics, bank's stage data layered above. (The real tiles are elsewhere.)
  1545.  
  1546. B590-B5A3 : Some palette set. Never used.
  1547.  
  1548. B800-BFFF / 63810-6400F : Blank Tiles. However, this is loaded at the bottom half portion of BG Tiles for
  1549. Wily Stage 3.
  1550.  
  1551. 64010 <-> 6600F - (Bank $32 by $2000)
  1552. -------------------------------------
  1553.  
  1554. [Cossack Stage Map / Wily Saucer Scene / Wily Stage Map - Tile Assemy and Screen Data]
  1555.  
  1556. MEMORY AREA: $A000-$BFFF
  1557.  
  1558. AA00-B0FF : Unused.
  1559.  
  1560. B590-B5A3 : Black palette set. Never used.
  1561.  
  1562. B800-BFFF / 65810-6600F : Wily Stage 3 Wily Battle BG Graphics
  1563.  
  1564. 66010 <-> 6800F - (Bank $33 by $2000)
  1565. -------------------------------------
  1566.  
  1567. [Intro Scene - Tile Assemy and Screen Data]
  1568.  
  1569. MEMORY AREA: $A000-$BFFF
  1570.  
  1571. B590-B5A3 : A unused copy of Bright Man Stage's 1st Palette Set resides here, for whatever reason. :)
  1572.  
  1573. B5A4-B7FF : Unused data.
  1574.  
  1575. B800-BFFF / 67810-6800F: Wily Stage 3 Wily Battle BG Graphics (for second form?)
  1576.  
  1577. 68010 <-> 6A00F - (Bank $34 by $2000)
  1578. -------------------------------------
  1579.  
  1580. [Ending Scene - Tile Assemy and Screen Data]
  1581.  
  1582. MEMORY AREA: $A000-$BFFF
  1583.  
  1584. B590-B5A3 : Another unused copy of Bright Man Stage's 1st Palette Set resides here, for whatever reason. :)
  1585.  
  1586. B700-BFFF : Unused random data.
  1587.  
  1588. 6A010 <-> 6C00F (Bank $35 by $2000)
  1589. -----------------------------------
  1590.  
  1591. [Object ASM Bank #1]
  1592.  
  1593. MEMORY AREA: $A000-$BFFF
  1594.  
  1595. A000-A02C : Cossack Defeated Scene - Dr.Wily - Object ASM (Oject ID $A5)
  1596.  
  1597. A02D-A33F : Wily Stage 1 Boss - eyes - Object ASM (Object ID $A6)
  1598.  
  1599. A340-A429 : (Tables, probably used by Wily Stage 1 Boss)
  1600.  
  1601. A42A-A486 : Object ASM - Wily Stage 1 Boss - Metools (Object ID $AA)
  1602. A487-
  1603.  
  1604. A797-> : Warp Object ASM (Object ID $B3)
  1605.  
  1606. A7F9 : Boss Init Object ASM
  1607.  
  1608. A862 / 6A872 : Sound effect ID to play when boss charges energy
  1609.  
  1610. A89F / 6A8AF : Load stage ID in Y. If it's a castle stage, load in Y $AB (Wily
  1611. Stage 3 Warp pointer. Uses table A8D4
  1612.  
  1613. A8AC-A8B3 / 6A8BC-6A8C3 : Boss Sprite ID to set at beginning of boss battle, for each stage.
  1614. A8B4-A8BB / 6A8C4-6A8CB : Robot Master enters chamber - Vertical Floor Hit Detection ID
  1615.  
  1616. A8BC / 6A8CC : Contains the Object ID of the boss, indexed by the Stage ID
  1617.  
  1618. A8C4 / 6A8D4 : Contains the Sprite ID of the boss, indexed by the stage ID
  1619.  
  1620. A8CC / 6A8DC : Contains the S&S pointer of the boss, indexed by the stage ID
  1621.  
  1622. A8D4 / 6A8E4 : A table used by A89F if in a castle stage (??? don't know more)
  1623.  
  1624. A8DE / 6A8EE : Contains the starting horizontal speed low of the boss, indexed by the stage ID
  1625.  
  1626. A8E6 / 6A8F6 : Contains the starting horizontal speed high of the boss, indexed by the stage ID
  1627.  
  1628. A8EE : Object ASM (unknown)
  1629.  
  1630. A971-A9B5 : Cossack Defeated Scene - Kalinka - Object ASM (Oject ID $A3)
  1631.  
  1632. A9B6-AA51 : Cossack Defeated Scene - Protoman - Object ASM (Object ID $A4)
  1633.  
  1634. AA52-AC12 : Wily Stage 3 Battle (Object ID $BC)
  1635.  
  1636. ABA6-AC12 : Subroutine called from ADD6
  1637.  
  1638. AC13-AC40 : Wily Stage 3 Battle - Shots - Object ASM (Object ID $BF)
  1639.  
  1640. AC41-ADD5 : Object ID $C0 ASM (Wily Stage 3 Battle something)
  1641.  
  1642. ADD6-AE7B : Object ASM - Handler when Wily battle finished in Wily Stage 3. (Object ID $27)
  1643. ADD6 : Main Entry Point
  1644. AE16 : 2nd Entry Point
  1645. AE4F : 3rd Entry Point
  1646. AE61 : 4th Entry Point
  1647.  
  1648. AE7C-AEDB : Subroutine - Set explosions and mute sound when boss dies.
  1649. Called by ADD6
  1650. Called by B2EB
  1651. AE81 : Called as sub by B29E
  1652.  
  1653. AF94-AFD3 : Data used by AE7C.
  1654.  
  1655. AFD4 : Object ASM executed when boss dies.
  1656.  
  1657. B0F0 : Jumped to from ASM in B0F4
  1658. B0F4-B17B : ObjASM of Object ID $4D and Object ID $2A
  1659.  
  1660. B188-> : Table
  1661. B213-> : Table
  1662.  
  1663. B29E-B2EA : Object ASM - Cossack stage 3 boss - Handler - Initialize 2nd Cockroach Twin (Object ID $49)
  1664.  
  1665. B2EB-B32B : Object ASM - Cossack stage 3 boss - Handler - Cockroach twins defeated (Object ID $4A)
  1666. B2EB : Main Entry Point
  1667. B2FD : 2nd Entry Point
  1668. B313 : 3rd Entry Point
  1669.  
  1670. B3FD : "Shuffled Blocks" Object ASM. (Object ID $C3)
  1671. B423 : Alternate entry point
  1672.  
  1673. B480-B4C2 / 6B490-6B4D2 : Cossack Stage 3 Boss - Nametable writes - VRAM buffer source.
  1674.  
  1675. B4C3-B4C4 : Screen: Block data byte pointer into B4C5
  1676.  
  1677. B4C5-B4EA : Block data.
  1678.  
  1679. B4EB-B614 : Wily Stage 4 Battle ASM (Object ID $C4)
  1680. B615-B696 : Wily Stage 4 battle - Charged Shot ASM (Object ID $C5)
  1681.  
  1682. B934-BFFF : Unused random data.
  1683.  
  1684. 6C010 <-> 7000F - (Bank $36 <-> $37 by $2000)
  1685. ---------------------------------------------
  1686.  
  1687. [Sprite Bank 4 (Many enemies, pickups, and more.)]
  1688.  
  1689. MEMORY AREA: $8000-$BFFF
  1690.  
  1691. 8ACC-6ADF / 6CADC-6CAEF : Tile Usage: E-Tank
  1692.  
  1693. 6DD0C : Coordinate: E-Tank AND Ring Man Rainbow Bars.
  1694.  
  1695. 6F18E-6F191 : Animation - Smal Life Energy.
  1696. 6F19D-6F1A0 : Animation - E-Tank
  1697. 6F1C5-6F1C9 : Animation -Ring Man Rainbow Bars.
  1698.  
  1699. B4EA-B7FF / 6F4FA-6F80F : Unused space. (random bytes)
  1700.  
  1701. 6F810-????? : Tile Usage - Address Table Low
  1702. 6FA10-????? : Tile Usage - Address Table High
  1703. 6FC10 : Coordinate Data - Address Table Low
  1704. 6FD10 : Coordinate Data - Address Table High
  1705. 6FE10-????? : Animation - Address Table Low
  1706. 6FF10-????? : Animation - Address Table High
  1707.  
  1708. Adjust Value : 64010
  1709.  
  1710. Tile Usage ID's:
  1711. AB : E-Tank (Anim 1)
  1712. AC : E-Tank (Anim 2)
  1713.  
  1714. Coordinate ID's:
  1715. 2F : Smal Energy Capsule
  1716.  
  1717. 70010 <-> 7200F (Bank $38 by $2000)
  1718. -----------------------------------
  1719.  
  1720. [Object ASM Bank #2 (Boss ASM) / Enemy init handle Bank]
  1721.  
  1722. Note: This bank can be loaded into either memory range $8000-$9FFF and $A000-$BFFF,
  1723. depending on what it is being used for.
  1724.  
  1725. MEMORY AREA: $8000-$9FFF
  1726.  
  1727. 8000 : Entry Point from Game Loop - Check for Enemies to Init.
  1728.  
  1729. 810B : Read stage Enemy data, Set up Object and Sprite registers.
  1730.  
  1731. 817F-820E / 7018F-7021E : 528() flags to set for each Enemy ID
  1732. 820F-829E / 7021F-702AE : Object ID to put for stages enemies and items, indexed by Enemy ID
  1733. 829F-832E / 702AF-7033E : 408() flags to set for each Enemy ID (Substance and Shape)
  1734. 832F-83BE / 7033F-703CE : Sprite ID to put for stages enemies and items, indexed by Enemy ID
  1735.  
  1736. 83BF-844E / 703CF-7045E : Enemy HP for each Enemy ID
  1737. 844F-84DE / 7045F-> : Initial speed setting for each Enemy ID. Value is an index two other tables
  1738. telling the real speed low and highs. (84DF and 84E6)
  1739.  
  1740. 84DF-84E5 : Object Speed Setting - Low
  1741. 84E6-84EC : Object Speed Setting - High
  1742.  
  1743. 84ED-851C : Effect Sprite - 4-Color Quad Palette Index Byte
  1744. 851D-854C : Effect Sprite - Palette Anim ID or 4-color Palette
  1745. (if >= $80, its a Palette Animation ID, else its a 4-byte block index into 854D.
  1746. 854D-85A8 : Effect Sprite - Palette Sets (4 bytes for each set, Omni-BG Color + 3 colors to load into chosen 4-Color quad.)
  1747.  
  1748. 85A9-87FF : Unused random data.
  1749.  
  1750. MEMORY AREA: $A000-$BFFF
  1751.  
  1752. [Skull Man's ASM: A800-AA69]
  1753.  
  1754. [Ring Man's ASM: AA6A-AD27]
  1755.  
  1756. Object Memory:
  1757. $468,X (Private mem 1) : Status
  1758. 1E: Walk?
  1759.  
  1760. AA6A : First Entry Point.
  1761.  
  1762. Datas:
  1763. AAB6 / 70AC6 : Delay before next movement - after shooting first Ring Boomerang.
  1764.  
  1765. ABEC-AC06 : Subroutine - Check if there's two Ring Boomerangs in air.
  1766.  
  1767. AC6C-AD27 : Ring Man's Ring Boomerang ASM (Object ID $76)
  1768.  
  1769. [Dust Man's ASM]
  1770.  
  1771. AD28-AE41 (for the end, there may be a table after, but it's the end of the AI)
  1772. AD28 : Main Entry Point.
  1773. ADD6 : Entry Point
  1774.  
  1775. [Drill Man's ASM: B045-B32F]
  1776.  
  1777. B2E2 : Object ASM (Object ID $82)
  1778.  
  1779. [Bright Man's ASM]
  1780.  
  1781. B541 : Main Entry Point? (Wait for delay)
  1782. B58E : Entry Point - Mode 2
  1783. B5DA : Entry Point - Bright Man Shoots.
  1784. B5F6 : Continue Point - Bright Man Shoots.
  1785.  
  1786. 716D8 : Bright Man Modes
  1787. 35 : Jump
  1788. 37 : Flash with Lightbulb
  1789. 38 : Shoot
  1790.  
  1791. [Pharaoh Man's ASM: B330-B53B / 71340-7154B]
  1792. B330-B4FD / 71340-7150D Pharaoh Man ASM first entry point
  1793. B387 Charging Pharaoh Shot entry point
  1794. B33A Load next AI from Y (going from 00 to 02) entry point
  1795. B3C9 Jump on Mega Man entry point
  1796. B3F8 Manage the jumps once parameters are set (note:
  1797. big jump parameters are set at $B3C9, but the
  1798. two small jumps parameters are set when setting
  1799. the new AI at $B33A. This just execute a jump with the given
  1800. parameters).
  1801. B4FE-B52A / 7150E-7153A Pharaoh Man's table (in function of a value from a AI pointer,
  1802. AI pointer, depending on what to do, is a value from 00 to 02,
  1803. when we load an ASM with this pointer, we load all those datas.)
  1804. B516-B518 / 71526-71528 : Sprite ID
  1805. B519-B51B / 71529-7152B : Low ASM
  1806. B51C-B51E / 7152C-7152E : High ASM
  1807. B51F-B521 / 7152F-71531 : Vertical Speed Low
  1808. B522-B524 / 71532-71534 : Vertical Speed High
  1809. B525-B527 / 71535-71537 : Counter until the Small Pharaoh Shot is thrown when
  1810. in air
  1811. B528-B52A / 71538-7153A : Number of jumps to do
  1812. B52B-B52D / 7153B-7153D Pharaoh Shot ASM
  1813. B52E-B53B / 7153E-7154B Normal Shot ASM
  1814.  
  1815. [Common Boss ASM]
  1816.  
  1817. B71E-B743 : Return a Y used to pick in a table the next action. Start from
  1818. Y 0, until y = probably?? max value from action table. To give a randomize
  1819. feeling, actions are in a table
  1820.  
  1821. [Toad Man's ASM]
  1822.  
  1823. B747 : Toad Man's ASM Start
  1824. B7DA : Other Entry Point
  1825.  
  1826. BB9B-BBF3 / 71BAB-71C03 : Seemingly unused ASM.. hmm.
  1827.  
  1828. [Cockroach Twins]
  1829.  
  1830. BC71 : Subroutine - Draw Hatch opening up
  1831. BCDA : Subroutine - Draw Hatch closing
  1832.  
  1833. BD43-BD4D / 71D53 : Cockroach Twins : Hatch Open/Close Buffer Template
  1834. BD4E : Cockroach Twins : Hatch tile preset pointer
  1835. BD56-BD61 : Cockroach Twins : Hatch tile presets
  1836.  
  1837. BD62-BFFF : Unused random data.
  1838.  
  1839. 72010 <-> 7400F (Bank $39 by $2000)
  1840. -----------------------------------
  1841.  
  1842. MEMORY AREA: $8000-$9FFF
  1843.  
  1844. [Sequence]
  1845.  
  1846. 8000 : Entry Point - Startup ($800C)
  1847. 8003 : Entry Point - Handle Return from Stage Clear / Game Over ($8C7C)
  1848. 8006 : Entry Point - Level Init ($85AD)
  1849. 8009 : Entry Point - Debug Menu!!! ($9A28)
  1850.  
  1851. 800C-> : Startup ASM
  1852.  
  1853. 8022 : Execute Point - Copyright Screen Wait
  1854.  
  1855. [Title Screen]
  1856.  
  1857. 803A : Execute Point - Entering Title Screen
  1858.  
  1859. 804D-8051 : Check if a menu was selected. If so, go to $808C.
  1860. 8053-8057 : Was a button pushed to make cursor move? If no, go to 8070, which goes to $FF1C.
  1861. 8059-806D : Handle cursor movement.
  1862.  
  1863. 809D : Execution Point - "Press Start" Selected
  1864. This is where it jumps back after selecting "Stage Select" on the Password Screen.
  1865.  
  1866. [Stage Select / Castle Stage Intro's]
  1867.  
  1868. 80E7 : Execution Point - Level ID loaded to $22
  1869.  
  1870. 80FE : Execute Point - Entering Cossack / Wily Castle Intro Scene Start
  1871. Here's some slight interesting ASM: It will check here if the Cossack Stages
  1872. are cleared, and will jump to $83E8 in that case. However, the
  1873. JMP $83E8 is never executed through the game.
  1874. When doing the Wily Stage Intro, the game jumps
  1875. to $83E8 from elsewhere. (not sure where).
  1876.  
  1877. 8107-8219 : Cossack Stage Intro Code
  1878.  
  1879. 821A-8236 : Cossack and Wily Stage Intro Code - Subroutine
  1880.  
  1881. 8237-82FE : Stage Select Loop - Cursor Movement and Blinking Handler
  1882. 82EA-82FB : Set cursor sprites to blank tile.
  1883.  
  1884.  
  1885. 82FF-833B : Stage Select - Cossack Portrait Exception
  1886. When all regular stages are cleared, this routine takes care of
  1887. doing the slight palette blink and drawing cossack's portrait onto the
  1888. stage select screen, when the Cossack stages can be played.
  1889.  
  1890. 833C-83E7 : Cossack Stage Intro Code - After first stage clear.
  1891.  
  1892. 83E8-8494 : Wily Stage Intro Code
  1893.  
  1894. 8495-85AC : Common Screen Handler (Arguments: $10 = ID, $2A = ??)
  1895. Returns after palette is faded up.
  1896.  
  1897. 85AD-8626 : Huge RAM Clear Routine - Used by Common Screen Handler, Wily Stage Intro code and Cossack Stage Intro code (833C) and more.
  1898. Called when gameplay starts. (from C555)
  1899.  
  1900. 8627-> : Cossack/Wily Stage Map Sub (8107 & 833C) (Draw sprites of past path)
  1901. 866B-> : Cossack/Wily Stage Map Sub (8107 & 833C) (Draw sprites of next path)
  1902. 86B7-> : Cossack/Wily Stage Map Sub (8107 & 833C) (Animate destination point)
  1903.  
  1904. 872E-884D / 7273E-7285D : Common Screen Palettes ($20 bytes for each ID)
  1905. 7273E-7275D : Capcom Logo Palettes
  1906. 7275E-7277D : Title Screen Palettes
  1907. 878E-87AD / 7277E-7279D : Stage Select Palettes
  1908. 7279E-727BD : Copyright Palette
  1909.  
  1910. 87AE-87BD : Cossack Stage Intro - Some Palette
  1911. 87CE-87ED : Cossack Stage Intro - Darkened Down Background Palette (?)
  1912.  
  1913. 880E-882D : Wily Stage Intro palette - dark
  1914. 882E : Wily Stage Intro palette - bright
  1915.  
  1916. 884E-> : Common Screen ID: Screen Bank and Primary Graphics Load ID (Seems so)
  1917.  
  1918. 8856 - 8859 : Common Screen sprite data offset table - Low
  1919. 8857 / 72867: Title Screen (A1)
  1920. 885A - 885D : Common Screen sprite data offset table - High
  1921. 885B / 7286B: Title Screen (88)
  1922.  
  1923. 885E-8866 / 7286E-72876 : Stage Select : Base Sprite Y coordinate for each selection.
  1924. 8867-886F / 72877-7287F : Stage Select : Base Sprite X coordinate for each selection.
  1925. 8870-8878 / 72880-72888 : Stage Select : Stage ID for each selection.
  1926.  
  1927. 8879-887A-> : Common Screen: Sound ID
  1928. 887D : Cossack Portrait Nametable Data
  1929.  
  1930. 889F-88A0 : Data Belonging to 821A Sub. (Blink palette colors)
  1931.  
  1932. 88A1-88A5 : Title Screen Sprite Data.
  1933.  
  1934. 88BF-88D7 / 728CF-728E7 (18) : Stage Select - Selection Window Sprite Data
  1935.  
  1936. 88D8-88F7 : Cossack Portrait Sprite Data
  1937. 88F8-8997 : Cossack Stage Intro - Sprite Data
  1938. 8998-89B7 : Cossack Stage Intro - Path Sprite Data
  1939. 89B8 :
  1940. 89DF-> : Wily Stage Intro - sprite data
  1941.  
  1942. 8A0C-8B52 : Cossack/Wily Stage Intro : Past Path Sprite Data
  1943.  
  1944. 8B53 : Cossack/Wily Stage Intro : Past Path Sprite Data - Low
  1945. 8B5B : Cossack/Wily Stage Intro : Past Path Sprite Data - High
  1946.  
  1947. [Stage Select Screen Data]
  1948.  
  1949. Data:
  1950. 8B63-8C3E / 72B73-72C4E : Portrait Sprite Data
  1951. 8B63-8B8F / 72B73-72B9F : Bright Man
  1952. 8B90-8BB8 / 72BA0-72BC8 : Toad Man
  1953. 8BB9-8BE1 / 72BC9-72BF1 : Drill Man
  1954. 8BE2-8BEA / 72BF2-72BFA : Pharaoh Man
  1955. 8BEB-8C07 / 72BFB-72C17 : Ring Man
  1956. 8C08-8C10 / 72C18-72C20 : Dust Man
  1957. 8C11-8C2D / 72C21-72C3D : Dive Man
  1958. 8C2E-8C3E / 72C3E-72C4E : Skull Man
  1959.  
  1960. 8C3F-8C46 / 72C4F-72C56 : Portrait Sprite Data - Low Offset for each Boss
  1961. 8C47-8C4E / 72C57-72C5E : Portrait Sprite Data - High Offset for each Boss
  1962.  
  1963. 8C4F - 8C6B : VRAM Buffer Template for a blank Boss portrait (used for
  1964. all stages which are cleared. The stage select screen
  1965. graphics is over-written with a 4x4 tile blank box for
  1966. each portrait area. This is just a template, it overwrites
  1967. all the VRAM Address bytes with specific information
  1968. before its written to Name Table VRAM.)
  1969. 8C6C - 8C73 : Specific VRAM Address to blank out portrait - Low VRAM Address for each Boss
  1970. 8C74 - 8C7B : Specific VRAM Address to blank out portrait - High VRAM Address for each Boss
  1971.  
  1972. 8C7C : Execute Point - Boss defeated, MM warps out of level.
  1973.  
  1974. 8CBC : Point - Init Weapon Get screen.
  1975.  
  1976. 8E78 : Execute Point - Weapon Get Done, go to Password Screen.
  1977.  
  1978. 8E8F : Jumped to from Game Over.
  1979.  
  1980. 8EA3 : Password Screen (Stage Clear) Selection Loop
  1981.  
  1982. 8ECC : Password Screen (Stage Clear) - Pressed A / Start, handling selection.
  1983.  
  1984. 8EDE-8EF6 : Sub - Refill Weapon Energy. (Branched to from Game Over)
  1985.  
  1986. 8EF7-8F48 : Password Screen (Game Over) ASM
  1987. 8F3D : Password Screen Loop, if Game Over happened in Cossack or Wily stage.
  1988.  
  1989. 8F49-8F92 : Weapon Get / Password Screen Subroutine - Init graphics, password screen palette, put text.
  1990.  
  1991. 8F93-> : Stage Introduction ASM Subroutine. Called when regular stage is selected.
  1992.  
  1993. 902D-9048 : Special code to create Ring Man's Sparkling Helmet
  1994.  
  1995. For the animated palette in the 3 last background palettes,
  1996. here is how the animated palette is calculated, directly in an ASM,
  1997. (which means, if you want to change the loaded palettes, change the ASM) :
  1998. Palette 1 : ((((stage ID)) * 2 + (stage ID)) + 92)
  1999. Then, remove bit 7, which is there to say that the palette is
  2000. animated. Palette 1 value result is in the accumulator at
  2001. $8FF6 ($8FF6:9D F0 06 STA $06F0,X)
  2002.  
  2003. Here are the results if you calculate them
  2004. Bright Man : 92
  2005. Toad Man : 95
  2006. Drill Man : 98
  2007. Pharaoh Man : 9B
  2008. Ring Man : 9E
  2009. Dust Man : A1
  2010. Dive Man : A4
  2011. Skull Man : A7
  2012.  
  2013. Palette 2 : (Palette 1) + 1
  2014. Palette 3 : (Palette 2) + 1
  2015.  
  2016. 7303F : Stage ID compare with #4 (?)
  2017.  
  2018. 909C : Stage Introduction Animation Loop
  2019.  
  2020. 90C7-9253-> : Wily Saucer sequence
  2021. Jumps to 83E8 at end.
  2022.  
  2023. 9254-9271 : Sub of Wily Saucer Sequence (Move stars)
  2024.  
  2025. 9272-9280 : Sub of Wily Saucer Sequence (Arguments: A = # of frames to update sprites and do delay.)
  2026.  
  2027. 9281-92C8 : Text Write Common Routine (Used by Boss Intro, Weapon Get)
  2028.  
  2029. 92C9-92DE : Write Password Screen Text String to screen. (Subroutine of 8F49, 8EF7, and possibly more.)
  2030. Y register is loaded with text string id. (See 9529 and 952E.)
  2031. 92DF-92FE : Weapon Get Palette
  2032.  
  2033. 92FF-937E / 7330F-7338E : Weapon Get - Megaman Portrait Palettes
  2034. 92FF-930E : Flash Stopper (Bright Man)
  2035. 930F-931E : Rain Flush (Toad Man)
  2036. 931F-932E / 7332F-7333E : Drill Bomb (Drill Man)
  2037. 932F-933E : Pharaoh Shot (Pharaoh Man)
  2038. 933F-934E : Ring Boomerang (Ring Man)
  2039. 934F-935E : Dust Crusher (Dust Man)
  2040. 935F-936E : Dive Missile (Dive Man)
  2041. 936F-937E / 7337F-7338E : Skull Barrier (Skull Man)
  2042.  
  2043. 937F-938E / 7338F-7339E : Weapon Get : Rush Adaptor Spr Palette
  2044. 938F / 7339F : Weapon Get : Got Rush Adaptor Blink : Color 1 ($16)
  2045. 9390 / 733A0 : Weapon Get : Got Rush Adaptor Blink : Color 2 ($0F)
  2046. 9391-93B0 / 733A1-733C0 : Wily's Saucer Sequence - Palette
  2047.  
  2048. [Weapon Get Data]
  2049.  
  2050. 93B1-93B8 : Weapon Get : Index of weapon achieved for each stage id index.
  2051.  
  2052. 93B9-93D4 : Weapon Get - VRAM Buffer to clear old "You Got" letters.
  2053.  
  2054. 93D5-94D8 / 733E5-73456 : Weapon Get / Boss Introduction Text Data
  2055. Datas are as follow : -Determine Height and???-X Coordinate of the First Letter (the others are written after this one)-Then all the tiles to pick, ending with "FF"
  2056. Note : This means the palette to write the letters is probably picked up by the ASM.
  2057.  
  2058. 94D9-94F0 - 734E9-73500 : Weapon Get / Boss Introduction Text Offset - Low
  2059. 94F1-9508 - 73501-73518 : Weapon Get / Boss Introduction Text Offset - High
  2060.  
  2061. 733E5 - 93D5 : $00 = "You Got"
  2062. 733EF - 93DF : $01 = "Flash Stopper"
  2063. 733FF - 93EF : $02 = "Rain Flush"
  2064. 7340C - 93FC : $03 = "Drill Bomb"
  2065. 73419 - 9409 : $04 = "Pharaoh Shot"
  2066. $05 = "Ring Boomerang"
  2067. $06 = "Dust Crusher"
  2068. $07 = "Dive Missile"
  2069. $08 = "Skull Barrier"
  2070. $09 = "Rush Jet"
  2071. 734C9 - 94B9 : $0A = "Rush Marine"
  2072.  
  2073. $0B = "Bright Man"
  2074. $0C = "Toad Man"
  2075. $0D = "Drill Man"
  2076. $0E = "Pharaoh Man"
  2077. $0F = "Ring Man"
  2078. 734BD - 94AD : $10 = "Dust Man"
  2079. $11 = "Dive Man"
  2080. $12 = "Skull Man"
  2081.  
  2082. 734DF- 734E8 : 94CF-94D8 : $13 = "Adaptor"
  2083.  
  2084. $14 = "Pharaoh Shot"
  2085. $15 = "Ring Boomerang"
  2086. $16 = "Dust Crusher"
  2087. 73448-73456 - 9438-9446 : $17 = "Dive Missile"
  2088.  
  2089. [Password Screen Data]
  2090.  
  2091. 9509-9528 : Password Screen Palette
  2092.  
  2093. 9529-952D : Password Screen - Text data - Byte Pointer table
  2094.  
  2095. 952E-9540 : Password Screen Text data (VRAM Buffer source) 0 - Blank text in text window.
  2096. 9541-9567 : Password Screen Text data (VRAM Buffer source) 1 - "Stage select / Continue"
  2097. 9568-9575 : Password Screen Text data (VRAM Buffer source) 2 - "Continue" only.
  2098. 9576-9588 : Password Screen Text data (VRAM Buffer source) 3 - "Pass word error".
  2099. 9589-9595 : Password Screen Text data (VRAM Buffer source) 4 - "Game Over".
  2100.  
  2101. [Stage Intro Data]
  2102.  
  2103.  
  2104. 9596-9615 / 735A6-73625 : Stage Introduction Screen - Initial BG Palettes
  2105. Table read with Y, Y is Stage ID * 16
  2106.  
  2107. 9616-961D / 73626-7362D : Stage Introduction - Sprite Palette Color $0 - $7
  2108. Those remains for every stage selected.
  2109.  
  2110. 961E-965D / 7362E-7366D : Stage Introduction - Sprite Palettes (Color $8 - $F)
  2111. Table read with Y, Y is Stage ID * 8
  2112. 7362E-73635 : Palette for Bright Man
  2113. 73636-7363D : Palette for Toad Man
  2114. 7363E-73645 : Palette for Drill Man
  2115. 73646-73649 : Palette for Pharaoh Man (P1) BODY (when selected)
  2116. 7364A-7364D : Palette for Pharaoh Man (P2) JEWEL (when selected)
  2117. 7364E-73655 : Palette for Ring Man
  2118. 73656-73659 : Palette for Dust Man (P1) VACCUM (when selected)
  2119. 7365A-7365D : Palette for Dust Man (P2) BODY (when selected)
  2120. 73666-7366D : Palette for Skull Man
  2121.  
  2122.  
  2123. [Misc Data]
  2124.  
  2125. 965E-9671 : Wily Saucer Sequence - Stars Sprite data.
  2126.  
  2127. [Password Screen]
  2128.  
  2129. 9672-9839 : Password Screen (Password Enter) ASM
  2130. 968D : Password entering loop
  2131. 9722 : Point - It jumps back here after password error
  2132. 972D : Password decoder / check
  2133. 9772 : Jump to 981D
  2134. 978E : Password check loop
  2135. 97E1 : Point - Password OK
  2136. 97FE : jump to stage select.
  2137. 9801-981C : Password check subroutine
  2138. 981D-9839 : Point - Password error
  2139.  
  2140. 983A-9885 : Password enter loop subroutine
  2141.  
  2142. 9886-98F5 : Password Generator ASM
  2143.  
  2144. 98FA-9999 : Password Screen Sprite RAM setup
  2145.  
  2146. 999A : Password Screen cursor Y coordinate data
  2147. 99A1 : Password Screen cursor X coordinate data
  2148.  
  2149. 99A8-99A9 : Password screen cursor add table
  2150. 99AA-99AE : Password Table A
  2151. Fields which cannot have dot in it
  2152. 99AF-99B9 : Password Table B
  2153. Sprite DMA byte index to 11 fields in the
  2154. password, only 1 of the fields can
  2155. have a dot in them.
  2156.  
  2157. 99BA : Password table C
  2158.  
  2159. 99CE-> : Password Table D
  2160.  
  2161. 99E2-> : Password Table E
  2162.  
  2163. 9A1E-9A27 : Password generator - Weapon energy memory index
  2164.  
  2165. 9A28-9B2F : Debug Menu ASM
  2166.  
  2167. 9B30-9B74 : Debug Menu Subroutine
  2168.  
  2169. 9B75-9B7C : Debug Menu Sprite Palette Data
  2170. 9B7D-9B84 : Debug Menu Sprite Palette Data
  2171.  
  2172. 9B85-9C5D : Debug Menu Sprite RAM Data
  2173. 9C5E -> ?? Data
  2174.  
  2175. 73C86-7400F : Unused random data.
  2176.  
  2177. 74010 <-> 7800F (Bank $3A <-> $3B by $2000)
  2178. -------------------------------------------
  2179.  
  2180. [Object ASM Bank #3 and #4 - Enemies / Weapons / Items / Pickups.]
  2181.  
  2182. MEMORY AREA: $8000-$BFFF
  2183.  
  2184. Routines between addresses $8000 to $8823 can be called from any of the Object ASM banks,
  2185. as this bank always is loaded into $8000-$9FFF regardless of where the Object ASM is.
  2186.  
  2187. 74076 : Stage ID compare with #$04 (Rainbow bars related?)
  2188.  
  2189. Code:
  2190.  
  2191. it's in the middle of a function...
  2192.  
  2193. 8016-802B / 74026-7403B : Check for every $0300 slot if there is an object ID, and if
  2194. there is no ASM that was set when creating the object, load him an ASM with his object
  2195. ID from table $8683 and $8753. So just putting an object ID in a slot, with a unique
  2196. object ID is enough to have the enemy created.
  2197. NOTE : SEEMS TO NOT WORK WITH EVERY OBJECT ID... BUT WORK WITH SOME THINGS
  2198.  
  2199. 805A-8096 : Check if invincibility counter is off, else, RTS. Then, if going on, look for $805E explained at the end of this document.
  2200.  
  2201. 80A7-80DA : Flash Stopper-specific code.
  2202. Note : If you delete Flash Stopper and want to use it, make sure to change at $80A3 the
  2203. code which allows it to come here when weapon is Time Stopper.
  2204. 80DB-8107 : Rain Flush-specific code.
  2205.  
  2206. 8110 : Handle Weapon Particle Collition?
  2207. This is executed whenever a weapon/gadget hits another object.
  2208. $8162 : Weapon is going to be deflected.
  2209.  
  2210. 81BB-81C8 : Check if Mega Man is already in hurt state. If so, go on to $81C9. Code comes back together at $81C9.
  2211. 81C1 : Check if there is a collision with Mega Man. If so, call $81CC because Mega Man is hit.
  2212.  
  2213. 81CC : Subtract MM's HP when MM gets hit by object. (Subroutine, can be called from Object ASM)
  2214.  
  2215. 823F-> : Routine, MM is defeated by enemies/hit by spikes.
  2216. 8243 : Jump-in point if MM is hit by spikes.
  2217.  
  2218. Data in ASM:
  2219. 7426E : Delay before gameplay refreshes - (death by spikes) - Low
  2220. 74273 : Delay before gameplay refreshes - (death by spikes) - High
  2221.  
  2222. 82A4-83D2 / 742B4-743E2 : Sub - Subract Enemy HP, remove if no HP left,
  2223. check if remove weapon object or not, etc. (Enemy is Hit by Particle)
  2224. There are special ASM for Dust Crusher, Drill Bomb, Ring Boomerang, Wire Adaptor,
  2225. Charged Shot and Charged Pharaoh Shot. The rest are managed the same way.
  2226.  
  2227. 833A-834D : Special exception ASM for Cossack Stage 4, battle with Cossack.
  2228. Ensures that object HP's are kept to a value of #2 or more.
  2229.  
  2230. 8373-8380 : Since the life of Cossack Stage 3 boss is for each, half
  2231. the life of a complete life bar, we must still draw the complete
  2232. life bar. So the life bar with those boss is #$0E. When we reach this
  2233. place, we add to it #$0E so it becomes a complete life bar (the graphic).
  2234.  
  2235. 8413-84E2 / 74423-744F2 : Damage Objects does to Megaman, for each Object ID
  2236. 84E3-85B2 / 744F3-745C2 : Object ID to drop when Object dead (?) (If more than 0), for each Object ID.
  2237. 85B3-8682 / 745C3-74692 : Enemy ASM Bank for each Object ID
  2238. 8683-8752 / 74693-74762 : Enemy ASM Address Low for each Object ID
  2239. 8753-8822 / 74763-74832 : Enemy ASM Address High for each Object ID
  2240.  
  2241.  
  2242. -- I think, for all the ASM beyond this point, bank $3B ($76010-7800F) is assumed switched into $A000-$BFFF. However, for the ASM before this point, the bank switched into $A000-$BFFF depends. --
  2243.  
  2244. 8823 : Single RTS (No Object ASM)
  2245. Object ID's pointing here: $80, $81
  2246. 8824 : Single RTS (No Object ASM) - Entry Point of Object ID $67
  2247. Object ID's pointing here: $26, $67
  2248.  
  2249. 8825-884A / 74835-7485A : Buster Object ASM (Object ID $02)
  2250. 8825 : Entry Point
  2251.  
  2252. 884B-88BC : Weapon ObjASM Subroutine - Handle "Shootable" block.
  2253. (Called as Subroutine of Weapon Object ASM)
  2254. Check if weapon hits Shootable Block, if so:
  2255. Draw blank tiles where block was, and make explosion sprite at the same point.
  2256. Scanline Effect ID ($F0) must be set to #4 for this to do anything.
  2257.  
  2258. 88BD-> Buster Object ASM - Speed Low Byte
  2259. 88C3-> Buster Object ASM - Speed High Byte
  2260.  
  2261. 88C9-88DD : Deflected Weapon Object ASM (Object ID $03)
  2262. 88C9 : Entry Point
  2263.  
  2264. 88DE-> Rush Items Object ASM (Object ID $04)
  2265. 88DE-88F2 : Main Rush's ASM
  2266. 88F3-881A : Rush Coil First Own Object ASM
  2267. 891A-894A : Rush Jet First Own Object ASM
  2268. 894B-8972 : Rush Marine First Own Object ASM
  2269.  
  2270. 8973-8995 : Rush is dismissed (part 1)
  2271. 8996-89E2 : Rush Item landed
  2272. 89E3-8A36 : Rush Items Waiting for something to happen.
  2273. 8A16-8A36 : Mega Man is on Rush Item.
  2274.  
  2275. 8A37-8A5C : Mega Man on Rush Coil.
  2276. 8A5D-8A85 : Rush is dismissed (part 2)
  2277. 8A86-8B1C / 74A96-74B2C : Rush Jet moving. As soon as Mega Man was once on Rush Jet,
  2278. it will always be there now.
  2279.  
  2280. -----------------------------------------------------------------------------------------------------------------
  2281. All the following tables are read with the Y set from $A0. So they go from #$01 to #$03, which
  2282. means that the address where is the table is never used.
  2283.  
  2284. example, in the code, the table with values from $8B1D-8B1F is loaded at $8B1C,Y.
  2285.  
  2286. 8B1D-8B1F / 74B2D-74B2F : Rush Items sprite to set right after landing.
  2287. 8B20-8B22 / 74B30-74B32 : Rush Items $0408 Flag to set when he has landed.
  2288. $8B23-$8B25 / 74B33-74B35
  2289. 8B23-8B25 / 74B33-74B35 : Rush Items Sprite Flag values wich it adds to the Sprite Flag already in position.
  2290. 8B26-8B28 / 74B36-74B38 : Rush Items Address Table - Low (Entry Point)
  2291. 8B29-8B2B / 74B39-74B2B : Rush Items Address Table - High (Entry Point)
  2292.  
  2293. The 2 followings are address tables. ASM for when driving Rush Jet/Marine
  2294. The one for Rush Coil contains #$00 which are used to know when Rush item is current item.
  2295. This is done this way, so if item is Rush Coil, they make a BEQ to send him somewhere else,
  2296. and for the others they already loaded an ASM value.
  2297.  
  2298. 8B2C-8B2E / 74B3C-74B3E : Rush Items Address Table - Low
  2299. 8B2F-8B31 / 74B3F-74B41 : Rush Items Address Table - High
  2300.  
  2301.  
  2302. For the following table, those belong to Rush Jet, and Y = #$00 is possible. So for example,
  2303. table $8B32 is loaded in the code as $8B32,Y
  2304.  
  2305. 8B32-8B35 / 74B42-74B45 : Horizontal Speed Low
  2306. 8B36-8B39 / 74B46-74B49 : Horizontal Speed High
  2307. 8B3A-8B3D / 74B4A-74B4D : Vertical Speed Low
  2308. 8B3E-8B41 / 74B4E-74B51 : Vertical Speed High
  2309. -----------------------------------------------------------------------------------------------------------------
  2310.  
  2311.  
  2312.  
  2313.  
  2314. 8B42-8B94 : Mega Man in Rush Marine. Set initial properties, then set ASM at $8B95.
  2315. 8B95-8BA2 : Mega Man in Rush Marine ASM.
  2316.  
  2317.  
  2318. Memory usage:
  2319. =============
  2320. 468-47F : Object ASM Private Memory 1 For Rush Coil, Marine and Jet, this is Low counter untile Rush leaves
  2321. when waiting for contact with Mega Man.
  2322.  
  2323. 480-497 : Object ASM Private Memory 2 For Rush Coil, Marine and Jet, this is High counter untile Rush leaves
  2324. when waiting for contact with Mega Man.
  2325.  
  2326. 4B0-4C7 : Object ASM Private Memory 4 For Rush Jet/Marine, used as a counter to decrease their energy.
  2327.  
  2328.  
  2329.  
  2330. 8BA3-8BFA Rain Flush (Capsule) Object ASM (Object ID $05)
  2331. 8BA3 : Entry Point
  2332.  
  2333. 8BFB-8CA3 : Balloon Adaptor Object ASM (Object ID $06)
  2334.  
  2335. 8CA4-8D8E-> : Dive Missile Object ASM (Object ID $07)
  2336. 8CA4 : Entry Point
  2337. 8D8E-> : Data Table
  2338.  
  2339. 8D9E-8E30 : Ring Boomerang Object ASM (Object ID $08)
  2340. 8D9E : Initial Entry Point
  2341. 8DBC : Entry Point #2
  2342. 8DD7 : Entry Point #3
  2343. RTS : Not used by $8E31.
  2344.  
  2345. 8E31-8E6E : Drill Bomb Object ASM (Object ID $09)
  2346. 8E31 : Entry Point
  2347. RTS : Not used by $8E6F
  2348.  
  2349. 8E6F-8ECB : Dust Crusher Object ASM (Object ID $0A)
  2350. 8E6F : Entry Point
  2351. 8ECC-8ECF : Data Table 1 (Sprite ID for the 4 Small Pieces)
  2352. 8ED0-8ED3 : Data Table 1 (Direction bits for the 4 Small Pieces)
  2353.  
  2354. 8ED4-8F24 : Wire Adaptor Object ASM (Object ID $0B)
  2355. 8ED4 : Entry Point
  2356.  
  2357. 8F25 : Pharaoh Shot Object ASM (Object ID $0C)
  2358.  
  2359. 8F40 : Pharaoh Shot (Being Charged) ObjASM (Object ID $0D)
  2360.  
  2361. 8F9C-> : Table : Substance/Shape bits (Mem 408->) for each Sprite ID (Mem 558)
  2362. (Used by Pharaoh Shot.) Possibly to update shape difference between smal shot
  2363. and charged shot.
  2364.  
  2365. 8FE6 : Single RTS (No Object ASM) - Entry Point of Object ID $0E
  2366.  
  2367. 8FE7-8FFF : Skull Barrier Object ASM (Object ID $0F)
  2368. 8FE7 : Entry Point
  2369.  
  2370. 9000-90A1 : Ladybug Copter Object ASM (Object ID $10)
  2371. 9000 : Main Entry Point
  2372. 9063 : 2nd Entry Point
  2373.  
  2374. 9073 : Called as Subroutine
  2375.  
  2376. 90AA-90E9 : Movement Speed Tables - Used by multiple ASM code in same bank.
  2377.  
  2378. 90EA-90EC : Ladybug Copter - Dropped Propel - Object ASM (Object ID $11)
  2379.  
  2380. 90ED-91DB : Hover ASM
  2381. NOTE : RTS NUBT
  2382.  
  2383. 91DC-91DE : Hover : Bullets shot ASM (Object ID $39)
  2384.  
  2385. 91DF-93AE : Slinky
  2386. 91DF-934E : Slinky ASM
  2387. 934F-93AE : Slinky Tables
  2388.  
  2389. 93AF-942A : Desert Scorpion Generator
  2390. NOTE : RTS UBT
  2391.  
  2392. 942B-94E5 : Desert Scorpion
  2393. 942B-94DB : Desert Scorpion (Object ID $14) Object ASM start.
  2394. 94DC-94DE : table, use unknown??
  2395. 94DF-94E1 : table, use unknown??
  2396. 94E2-94E5 : Random "dash" time table.
  2397.  
  2398. NOTE : RTS NUBT
  2399.  
  2400. 94E6-9635 : Grasshoper
  2401. 94E6-95F5 : Grasshoper ASM
  2402. 95F6-9635 : Grasshoper's Tables
  2403.  
  2404. NOTE : RTS NUBT
  2405.  
  2406. 9636-96A1 : Unused Object ASM (Object ID $17) - Generate Jet Bird (Object ID $18)
  2407. at random X location, then do nothing.
  2408. THIS IS USED :
  2409. 9689-969D : Function used by Jet Bird for Generation of Jet Bird Children.
  2410.  
  2411. 96A2-9764 : Jet Bird ASM
  2412.  
  2413. There is a RTS between them, and it is not used by any of them.
  2414.  
  2415. 9766-97C2 : Jet Bird Children
  2416. 9766-97AA : Jet Bird Children ASM
  2417. 97AB-97C2 : Jet Bird Children Table
  2418.  
  2419. 97C3-97D2 / 757D3-757E2 : Tables used by Wall Gun & Jet Bird Children enemy over wall gun
  2420. 97D3-97E2 / 757E3-757F2 : Tables used by Jet Bird Children Enemy over wall gun
  2421. 97E3-98D4 / 757F3-758E4 : Wall Gun's ASM NOTE : RTS NUBT
  2422. 98D5-9924 / 758E5-75934 : Wall Gun's Tables NOTE : RTS N
  2423. 9925-992A / 75935-7593A : Wall Gun's Bullet ASM NOTE : RTS N
  2424.  
  2425.  
  2426. 9B07-9B51 / 75B17-75B61 : Whapper's ASM NOTE : RTS UBT
  2427. 9B52-9B55 / 75B62-75B65 : Whapper's Rings object creator's Tables NOTE : RTS N
  2428. 9B56-9C0E / 75B66-75C1E : Whapper's Rings object creator NOTE : RTS NUBT
  2429. 9C0F-9C14 / 75C1F-75C24 : Whapper's Rings' property Table NOTE : RTS N
  2430. 9C15-9C1A / 75C25-75C2A : Whapper's Rings' property Table NOTE : RTS N
  2431. 9C1B-9C20 / 75C2B-75C30 : Whapper's Rings' property Table NOTE : RTS N
  2432. 9C21-9C26 / 75C31-75C36 : Whapper's Rings' property Table NOTE : RTS N
  2433. 9C27-9C2C / 75C37-75C3C : Whapper's Rings' property Table NOTE : RTS N
  2434. 9C2D-9C32 / 75C3D-75C42 : Whapper's Rings' property Table NOTE : RTS N
  2435. 9C33-9C8D / 75C43-75C9D : Whapper's Ring's ASM NOTE : RTS NUBT
  2436.  
  2437. 9C8E-9CA1 : Common routine - Find Object with Object ID equal to memory $00.
  2438.  
  2439. 9CA2-9D6B : Fly's Code / Object ID 33 / Enemy ID $13
  2440. 9CA2-9D5A : Fly's ASM
  2441. 9D5B-9D68 : Fly's Table
  2442. 9D69-9D6B : Fly's Bullet ASM
  2443.  
  2444. 9D6C-9E3B : Umbrella Metool's Code / Object ID 35 / Enemy ID $14
  2445.  
  2446. 9E3C-9E3E : Umbrella Metool's Projectile's Code / Object ID 36 / Enemy ID ???
  2447.  
  2448. 9E3F-9EE5 / 75E4F-75EF5 : Fireworks Guy's ASM NOTE : RTS NUBT
  2449. 9EE6-9F1C : Fireworks Guy - Object placed when shot - Object ASM - (Object ID $C8)
  2450.  
  2451. 9F85-9FDE-> : Object ID $82 and $83 ASM (explosion like Drill Bomb)
  2452.  
  2453. A0DC-A184 /760EC-76194 Super Ball Machine ASM NOTE : RTS UBT
  2454. A185-A18C /76195-7619C Super Ball Machine Tables NOTE : RTS N
  2455. A18D-A1DD /7619D-761ED Super Ball Machine's Ball NOTE : RTS NUBT
  2456.  
  2457. A1DE-A222 : Falling Boulder - controller ASM (Object ID $40) (Enemy ID $30)
  2458. A223-A286 : Falling Boulder, small pieces RTS NUBT
  2459. A287-A2A0 : Falling Boulder Tables
  2460.  
  2461.  
  2462. A2B9-A3B4 : Eddie RTS NUBT
  2463. A3B5-A3D4 : Eddie's tables
  2464.  
  2465. A436-A46C / 76446-7647C : Weapon deflection if hits from left. Used by Skullmet and
  2466. probably other enemies
  2467.  
  2468. A46D-A557 : Totempole
  2469. A46D-A54C : Totempole's ASM
  2470. A534-A54C : Totempole jumps
  2471. A54D-A554 : Totempole's Table
  2472. A555-A557 : Totempole's Bullet ASM
  2473.  
  2474. A558-A6D2 : Metool (Jumping, Walking, Spinning)
  2475. A558-A68F : Metool (Jumping, Walking, Spinning)
  2476. A690-A69C : Metool's Table
  2477. A69B-A6D2 : ??? bullet?? of metool?
  2478.  
  2479. A93F-A951 : Water Air Bubble Object ASM (Object ID $66)
  2480.  
  2481. AA11-AACB / 76A21-76ADB : Amoeba NOTE : RTS NUBT
  2482.  
  2483. ABD5-AC00 / 76BE5-76C10 : Saturn Bot's ASM
  2484.  
  2485. AC29-AC94 : Unused Object ASM.. NOTE : RTS NUBT
  2486.  
  2487. AC51-AC94 : Entry Point of Object ID $68 (Unused)
  2488.  
  2489. AC95-AD5D / 76CA5-76D6D : Skullmet ASM NOTE : RTS NUBT
  2490. AD5E-AD69 / 76D6E-76D79 : Skullmet's Tables NOTE : RTS N
  2491. AD6A-AD6F / 76D7A-76D7F : Skullmet's Bullet ASM NOTE : RTS N
  2492.  
  2493. AD70-ADC2 / 76D80-76DD2 Helipon 1 - Flying
  2494. ADC3-ADF0 / 76DD3-76E00 Helipon 2 - Falling
  2495. ADF1-AE4B / 76E01-76E5B Helipon 3 - Waiting and shooting
  2496. AE4C-AE4E / 76E5C-76E5E Helipon's bullet ASM
  2497. AE4F-AF34 / 76E5F-76F44 Piranha ASM
  2498.  
  2499. AE4F-AF34 / 76E5F-76F44 : Piranha's ASM
  2500. AE4F : Waiting to see Mega Man to jump
  2501. (if piranha hits a wall with this entry point, it just can't advance)
  2502. AE94 : Jump on Mega Man
  2503. AEFC : Don't know what it's for
  2504. AF19 : Advance until it sees a wall and turn back, to set entry point back to AE4F
  2505.  
  2506. B0D9-B16F / 770E9-7717F : Manta ASM
  2507. B170-B197 / 77180-771A7 : Manta's Tables
  2508.  
  2509. B3D9-B42F / 773E9-7743F : Mono-Roader ASM
  2510.  
  2511. B430-B597 : Gachappon NOTE : RTS NUBT
  2512. B430-B57A : Gachappon's ASM
  2513. B57B-B58E : Gachappon's Table
  2514. B58F-B591 : White Bullet's ASM
  2515. B592-B597 : Red Bullet's ASM
  2516.  
  2517. B598-B621 : Pakatto 24
  2518. B598-B61C / 775A8-7762C : Pakatto 24 ASM NOTE : RTS NUBT
  2519. B61D-B61E / 7762D-7762E : Pakatto 24's Tables NOTE : RTS N
  2520. B61F-B621 / 7762F-77631 : Pakatto 24's Bullet ASM NOTE : RTS N
  2521.  
  2522. B622-B6DC : Up'n'down
  2523. B622-B6DC : Up'n'down Controller NOTE : RTS NUBT
  2524. B6DD-B6E4 : Up'n'down tables
  2525.  
  2526. B6E5-???? : Water Mine
  2527.  
  2528. B780 : Part of Spark Spine (Object ID $B7) ASM.
  2529.  
  2530. B7C5-B85F / 777D5-7786F : Skull Launcher ASM
  2531.  
  2532. B860-B8C3 / 77870-778D3 : Wheel Skull ASM
  2533.  
  2534. B8C4-B94D : Spike Box - From both Left and Right - Generator (Object ID's $BD & $CE)
  2535.  
  2536. B8E0 / 778F0 : Spike Box (Enemy ID $54) - Delay until new one appears - High
  2537. B8E5 / 778F5 : Spike Box (Enemy ID $54) - Delay until new one appears - Low
  2538.  
  2539. B94E-B972 / 7795E:77982 : Spike Box ASM
  2540.  
  2541. BB6C-BBC2 : Decide items to drop when enemy dies
  2542.  
  2543. BBC3 : ObjASM for Dropped Items (All of them)
  2544.  
  2545. BBD3 : Execution Point - Megaman Reaches Item
  2546. BBEE : Where we make the jump to the right place, depending on picked up item.
  2547.  
  2548. Item:
  2549. 0: Smal Weapon Energy Capsule
  2550. 1: Big Life Energy Capsule
  2551. 2: Smal Life Energy Capsule
  2552. 3: Extra Life
  2553. 4: Big Weapon Energy Capsule
  2554. This can't be dropped by enemies, but has ASM address in the pickup handler jump table.
  2555. 5: E-Tank
  2556.  
  2557. BC01: E-Tank Picked Up ASM
  2558.  
  2559. BC11: Big/Small Life Capsule Picked Up ASM
  2560.  
  2561. BC15: Big/Small Energy Capsule Picked Up ASM
  2562.  
  2563. BC24 : Increase Health/Weapon - Picked up Large Health Capsule
  2564.  
  2565. BC44 : Balloon Item (Capsule) Obj-ASM Entry Point
  2566.  
  2567. BC4A : Object ASM for Pickups (Object ID $C1)
  2568. ??? and something else which goes on at BC66
  2569.  
  2570. BC7A-BC8C : Object ASM - Big Energy Capsule dropped by robot masters in rematch battles. (Object ID $C6)
  2571.  
  2572. [Items Dropped when enemy is defeated]
  2573.  
  2574. BC8D-BC91 / 77C9D-77CA1: Chance of item being dropped (00 is lowest, FF is highest...
  2575. it's appropriate, but it's more complex, see "Tutorial - Object to Drop")
  2576. BC92-BC96 : Sprite
  2577. BC97-BC9B : Object Substance and Shape byte ($408())
  2578. BC9C-BCA0 : Written to Memory 0 ($468()). It's pointer for $F0F8 function.
  2579. Low Counter is always #$FF for all.
  2580.  
  2581.  
  2582. BCA1-BCA5 : Table which tells how much to refill for each item.
  2583. Table is read using index Y being sprite ID
  2584. So table read is $BC87.
  2585.  
  2586. BCA6-BCAB : ASM Pointers for Pickups - Low
  2587. BCAC-BCB1 : ASM Pointers for Pickups - High
  2588.  
  2589. BCB2-BFFF : All unused random data.
  2590.  
  2591. 78010 <-> 7A00F (Bank $3C by $2000)
  2592. -----------------------------------
  2593.  
  2594. MEMORY AREA: $8000-$9FFF
  2595.  
  2596. [Megaman Movement ASM / Weapon Menu ASM]
  2597.  
  2598. 8083 / 78093 : This is here we upgrade $35, which is the counter
  2599. for the charged buster shot. We check the sound and palettes to load...
  2600. Set two CLC there is you want the charged buster to be impossible.
  2601.  
  2602. 80E3-80F1 / 780F3-78101 : MM Movement ASM Picker : Take Mega Man
  2603. status in $30 as an index, and pick his ASM in 80FA and 810E
  2604. table.
  2605.  
  2606. 80FA-810D : MM Movement - ASM Address - Low
  2607. 810E-8121 : MM Movement - ASM Address - High
  2608.  
  2609. ==============================
  2610. ==============================
  2611. 8130-8352 : Status is 00 Start
  2612. ==============================
  2613. ==============================
  2614. 8130 / 78140 : MM Movement - Stand/Walk/Aim AND CHECK OTHER, AS WELL AS JUMP,
  2615. AND SEND TO RIGHT CODE SECTION.
  2616. ONLY COME HERES DIRECTLY IF STATUS IS $30.
  2617.  
  2618. 8135-813D / 78145-7814D : Check if "A" is pushed. If so,
  2619. go to $813E. It seems, to be here, Mega Man must be on ground.
  2620.  
  2621. 813E / 7814E : Send here if you want Mega Man to jump. It checks there if
  2622. Mega Man is on Rush Jet? and if down is held (slide). Better to have
  2623. X at 0 if you send here, because it will be used as Mega Man's identifier.
  2624.  
  2625. 8156 / 78166 : Slide starting code : $8147 sends here if the
  2626. pushed buttons indicate Mega Man is sliding.
  2627. You don't want Mega Man to slide in your game? Put a RTS here!
  2628.  
  2629. 81B3 : Toad Man Stage Slide-Dust-Cloud exception -
  2630. Here it chooses the Sprite ID for the dust cloud when Megaman slides.
  2631. If at beginning of Toad Man's stage, it picks an alternate sprite.
  2632.  
  2633. 81DC : Code comes here is Down is pushed. It checks if $46 contains ladder top. If so, set Mega Man status to be #$03
  2634. (climbing)
  2635.  
  2636. 826C : Check for Toad Man's stage, create water effect when MM walks.
  2637. 82C8 : MM Movement - Jump, Also Subroutine of 8130.
  2638.  
  2639. 782E3 : Stage ID for which level the "Slippery" Block Type is functional in. Contents is $08 (Cossack Stage 1).
  2640. 1st of 3 checks that need to be changed.
  2641.  
  2642. 8320-8352 : Come here if Mega Man is on ground. If $30 is not #$00, it means Mega Man fell on ground, so do things
  2643. such as playing "MM hit ground sound".
  2644. ============================
  2645. ============================
  2646. 8130-8352 : Status is 00 End
  2647. ============================
  2648. ============================
  2649.  
  2650. 8353-83F1 : MM Movement - 02 - Slide.
  2651. 83D3 : Comes here when Mega Man stop sliding.
  2652.  
  2653. 83F2-841F : Check collision with solid object (slot $0528). Only called with sliding, since it uses
  2654. Mega Man Sliding's shape. !!!new!!! not 100% sure about it. I need to check it more
  2655. RTS UBT
  2656.  
  2657. 8420-84AC? : MM Movement - Ladder ASM Entry Point??
  2658.  
  2659. 84AD-854C : MM Movement - 04 - In Rush Marine.
  2660. 854D-858C : MM Movement - 04 - Rush Marine's Speed Tables.
  2661.  
  2662. NOTE : THOSE TABLE USE TOO MUCH SPACE FOR NOTHING. IT JUST LOAD THE DIRECTION BITS AND LOAD SPEEDS WITH THIS
  2663.  
  2664. 854D-855C : Horizontal Speed Low
  2665. 855D-856C : Horizontal Speed High
  2666. 856D-856C : Vertical Speed Low
  2667. 857D-858C : Vertical Speed High
  2668.  
  2669.  
  2670. 858D-85DC : MM Movement - 05 - Using Wire Adaptor.
  2671.  
  2672. 85DD : MM Movement - 06 - Hit by Object. (85E9 in Mega Man 4 Dr Cossack Treason)
  2673. RTS NUBT
  2674.  
  2675. 865D-86AC : MM Movement - 13 - MM escapes from Wily's Castle (Also Subroutine of 8775.)
  2676. Called as routine from 8775.
  2677. RTS UBT
  2678.  
  2679. 86AD-86CD : MM Movement - 09 - Wait for boss to get ready.
  2680.  
  2681. 86CE : MM Movement - 0A - "Ready" blink, Warp down.
  2682.  
  2683. 8730 : Position at which we start checking if Mega Man hit floor.
  2684.  
  2685. 8775-87A6 : MM Movement - 11 - Wire/Balloon Item achieved - Wait, then warp out.
  2686.  
  2687. 87A7-884F : MM Movement - 0B - Boss Defeated - Weapon Get / Warp Out
  2688.  
  2689. 8850-8894 : MM Movement - 0C - Battle with Cossack - Caught by cranes
  2690.  
  2691. 8895-8919 : MM Movement - 0D - Cossack Stage 4 - Cossack Defeated
  2692.  
  2693. 891A-8A6F : MM Movement - 0E - Cossack Stage 4 - Cossack Defeated (Dialogue Handler)
  2694. 891A-89E4 : Main ASM
  2695. 89E5-8A03 : Dialogue $00 Effect
  2696. 8A04-8A5A : Dialogue $01 Effect
  2697. 8A5B-8A69 : Dialogue $02 Effect
  2698.  
  2699. 8A6A-8A6C : Dialogue - Special Effect ASM Address - Low
  2700. 8A6D-8A6F : Dialogue - Special Effect ASM Address - High
  2701.  
  2702. 8A70-8B37 : MM Movement - 0F - Wily Stage 3 Rematch Room Warp
  2703. 8AEC / 78AFC : Song ID to play after Warp (Wily Stage 3)
  2704.  
  2705. 8AF7-8B37 : Subroutine - Special stuff to do if warping to Rematch Room
  2706.  
  2707. 8B38-8B8C : Routine : Conditional $528 setting (MM sprite bg-priority bit) for Wily Stage 3
  2708.  
  2709. 8BE5-8C27 : VRAM Buffer Source - Additional Warp at Rematch Room in Wily Stage 3 (Used when warping back from robot master battle)
  2710.  
  2711. 8C28-> : Data table for 8B38
  2712. 8C33-> : Data table for 8B38
  2713. 8C3E-> : Data table for 8B38
  2714.  
  2715. 8C49-8C64 : MM Movement - 10 - Enter boss room - walk a bit forward
  2716. 8C65-8CBC : MM Movement - 12 - Wily Stage 4 - Wily defeated.
  2717.  
  2718. 8CBD-8CCB : Subroutine - Jump to Current Weapon's Init Code
  2719.  
  2720. 8CCC : Mega Buster Init Code
  2721. 8CF6 : B button is released here. It's either a Full or Incomplete Charged shot.
  2722. Counter $35 is compared to #$20 at 8CF2. If it's only a bullet, it goes to $8D59. More than #$20, it
  2723. goes on.
  2724.  
  2725. 8DD5-8E3A / 78DE5-78E4A : Entry Point of Rush Coil / Rush Marine / Rush Jet Code
  2726. 8DFD / 78E0D : If shooting, it comes here.
  2727.  
  2728. 8E3B-8E9C : Rain Flush Init Code
  2729.  
  2730. 8E9D-8F16 / 78EAD-78F26 : Entry Point of Wire Item Code. RTS is not used by next ASM.
  2731.  
  2732. 8F17: Entry Point of Balloon Item Init Code
  2733. 8F17-8F97 Balloon Item - Init Code
  2734. IMPORTANT NOTE : RTS at 8F97 is used by next function.
  2735.  
  2736. 8F98-9044 : Entry Point of Dive Missile / Drill Bomb / Ring Boomerang / Dust Crusher Init Code
  2737.  
  2738. 8FE2 : Common Code for Setting Weapon's Object ID, etc.. (for the 4 weapons of $8F98)
  2739.  
  2740. RTS : USED BY $9045.
  2741.  
  2742. 9045 / 79055: Entry Point of Pharaoh Shot Code
  2743.  
  2744. 79110 : Pharaoh Shot Code
  2745.  
  2746. The following speeds are chosen by the following bits :
  2747. Take the direction bits value you want, and divide them by 4.
  2748.  
  2749. 9217-9219 / 79227-79229 : Horizontal low speed table of Pharaoh Shot
  2750. 921A-921C / 7922A-7922C : Horizontal high speed of pharaoh shots
  2751. 921D-921F / 7922D-7922F : Vertical low speed of pharaoh shots
  2752. 9220-9222 / 79230-79232 : Vertical high speed of pharaoh shots
  2753.  
  2754. 914E-91C1 : Entry Point of Flash Stopper Code
  2755. RTS IS USED BY FOLLOWING CODE
  2756.  
  2757. 91C2 / : Entry Point of Skull Barrier Code
  2758.  
  2759. 91EB-91F8 / 791FB-79208 : Weapon Init Code Address - Low
  2760. Mega Buster 91EB / 791FB
  2761. Rush Coil 91EC / 791FC
  2762. Rush Jet 91ED / 791FD
  2763. Rush Marine 91EE / 791FE
  2764. Rain Flush 91EF / 791FF
  2765. Wire Adaptor 91F0 / 79200
  2766. Balloon Adaptor 91F1 / 79201
  2767. Dive Missile 91F2 / 79202
  2768. Ring Boomerang 91F3 / 79203
  2769. Drill Bomb 91F4 / 79204
  2770. Dust Crusher 91F5 / 79205
  2771. Pharaoh Shot 91F6 / 79206
  2772. Flash Stopper 91F7 / 79207
  2773. Skull Barrier 91F8 / 79208
  2774.  
  2775. 91F9-9206 / 79209-79216 : Weapon Init Code Address - High
  2776. Mega Buster 91F9 / 79209
  2777. Rush Coil 91FA / 7920A
  2778. Rush Jet 91FB / 7920B
  2779. Rush Marine 91FC / 7920C
  2780. Rain Flush 91FD / 7920D
  2781. Wire Adaptor 91FE / 7920E
  2782. Balloon Adaptor 91FF / 7920F
  2783. Dive Missile 9200 / 79210
  2784. Ring Boomerang 9201 / 79211
  2785. Drill Bomb 9202 / 79212
  2786. Dust Crusher 9203 / 79213
  2787. Pharaoh Shot 9204 / 79214
  2788. Flash Stopper 9205 / 79215
  2789. Skull Barrier 9206 / 79216
  2790.  
  2791. 9207-> : Particle Weapons - Sprite ID's to Init
  2792.  
  2793. 922B-926C : Subroutine - Check for Ladder grab.
  2794.  
  2795. 7927D-7928C : Buster Charge - Megaman Palette Color 1 variants
  2796. 7928D-7929C : Buster Charge - Megaman Palette Color 2 variants
  2797. 7929D-792AC : Buster Charge - Megaman Palette Color 3 variants
  2798. For the three above, it takes an index. For example, if index is 2, and if the Color 1 need to be changed,
  2799. it is picked in 7927D + 2 = 7927F.
  2800. Note : The index is first going in loop from 4 to 7, then from 08 to 0B, and then from 0A to 0D.
  2801. When released, it does 00, 04 and 0C.
  2802. Index 00 to 03 and 0D and 0E use are unknown. I think they're never used.
  2803.  
  2804. 929D-92C4 : Buster Charge - 4-color palettes, after releasing charged shot.
  2805. The 1st color of each palette is never read.
  2806.  
  2807. Sometimes the color #2 of the 4 color palettes are read,
  2808. other times the last 3 colors are read.
  2809.  
  2810. There is palette updating ASM at $8D0C in the same bank as well as $804E.
  2811. RAM location $36 is used specifically for this.
  2812.  
  2813. The way palettes are updated after the charged shot is released,
  2814. seems to be programmed sloppily. Look at the ASM at $8D0C.
  2815. In detail, the Y register isnt increased when copying the palette, thus
  2816. only one color is copied to Megaman's whole palette. Second, there is
  2817. no write to RAM location $18, causing the palette buffer to be updated
  2818. to the PPU randomly or not at all.
  2819.  
  2820. Possible 4-color palettes read after B button is released:
  2821.  
  2822. 08 : Immediatedly at 8D0C, random updates.
  2823. 09 : Immediatedly at 8D0C, random updates.
  2824. 00 : Immediatedly at 8D0C, random updates.
  2825. 07 : At 804E next frame, sometimes after 08/09 at 8D0C, buffer written to PPU's VRAM.
  2826. 01 : At 804E next frame, after 00 is read at 8D0C. Buffer written to PPU's VRAM.
  2827.  
  2828. The other 4-color palettes are used too, seemingly only possible if a full
  2829. charged shot is released upon entering a boos chamber.
  2830.  
  2831. 92C5-938E : Subroutine - Toad Man stage / Cossack Stage 1 Check.
  2832. Block Types "Glide Left" / "Glide Right" / "Special" (Snow & Water Falling on Mega Man's head) handler.
  2833. Handler for "Slippery" block type.
  2834. ASM for "wind" effect in Toad Man's stage.
  2835.  
  2836. 92D6 / 792E6 : Stage ID for which level the "Rain" and "Glide effect" are functional in.
  2837. 92DC / 792EC : Wind effect of Toad Man's stage happen for screen less than the one a this
  2838. address
  2839. 92E4 / 792F4 : Direction for Toad Man Rain
  2840.  
  2841. 9314-> Toad Man Stage - Glide Left/Glide Right ASM
  2842. 9332 / 79342 : Glide speed, low byte
  2843. 933A / 7934A : Glide speed, high byte
  2844. 9341 : Common ASM for this routine - (Wind effect/Glide)
  2845. 9343-> Toad Man Stage - Wind effect ASM
  2846.  
  2847. 9346 / 79356 : Strenght of Toad Man Rain
  2848. 934A / 7935A : Frequency per turn of Toad Man Rain
  2849.  
  2850. 938F : Subroutine - "Slippery" block handler.
  2851.  
  2852. 793A2 : Stage ID for which level the "Slippery" Block Type is functional in. Contents is $08 (Cossack Stage 1).
  2853. 2nd of 3 checks that need to be changed.
  2854.  
  2855. 793AE : "Slippery" block effect - Effect deplete - Frame Counter bitwise AND, deciding ratio of depletion.
  2856. Contents is $03. $07 makes it twice as slow, $0F four times slow, $01 makes it twice as fast, etc.
  2857.  
  2858. 93C9-93DA : Put #$00 in $A3, $A7, $A8, #$01 in $A5, #$00 in $A6 (separated from $A3, $A7, $A8).
  2859. Called by $93DB.
  2860. Return Value : Set carry flag, meaning for $93DB stage is not Cossack Stage 1
  2861.  
  2862. 93DB-9403 : Subroutine - Manages A3 to A8, no matter the stage (call $93C9 if not in Cossack Stage 1)
  2863. Return : Carry Set if stage is Cossack Stage 1.
  2864.  
  2865. 793EE : Stage ID for which level the "Slippery" Block Type is functional in. Contents is $08 (Cossack Stage 1).
  2866. 3rd of 3 checks that need to be changed.
  2867.  
  2868. 79431: "Slippery" block effect - Effect increase - Frame Counter bitwise AND, deciding ratio of depletion.
  2869. Contents is $01. $03 makes it twice as fast, $07 four times fast, etc.
  2870.  
  2871. 946E / 7947E : If no direction (right or left) button pushed, JUMP to $93C9. Put values in $A5-A8.
  2872.  
  2873. 948C-94D0 : Subroutine - Water - Bubble generator.
  2874.  
  2875. 94D1-9570 : Dialogue Data (1)
  2876. 9571-95B5 : Dialogue Data (2)
  2877. 95B6-95F1 : Dialogue Data (3)
  2878.  
  2879. 95F2-95F4 : Dialogue - Offset - Low
  2880. 95F5-95F7 : Dialogue - Offset - High
  2881.  
  2882. 95F8-95FF : Unused space
  2883.  
  2884. [Weapon Menu]
  2885.  
  2886. 9600-96CE-> : Weapon Menu ASM
  2887.  
  2888. 965D - 967A : Draw all the 32*32 of the Weapon Screen in the current screen.
  2889.  
  2890. 967B-9685 : Load the Weapon Menu Palettes. Also Draw the sprites from $9E51 table.
  2891.  
  2892. 9686-96AE : Draw Weapons or not, dependings if it is achieved.
  2893.  
  2894. 96D7-96E7 : The loop on the weapon menu. It will go out only if start is pushed, to $9720.
  2895.  
  2896. 968E : This is where it sets up the standard sprites to Spr-DMA Memory.
  2897.  
  2898. 96E8-971F : E-Tank use code
  2899. 9720 : Start/A button pressed
  2900. 9731 : Weapon selected, leaving menu.
  2901.  
  2902. 973A : IMPORTANT PLACE OF CODE! HERE, IT SETS #$00 in $30, meaning that whatever Mega Man was doing, he is now
  2903. having the standing state.
  2904.  
  2905. 974A-976E : Rush Coil/Marine/Jet Selected - Special Code
  2906.  
  2907. 97AD : Load the Primary Scroll GFX of the selected Weapon.
  2908.  
  2909. 983E : When closing the menu, this delete the weapons in slot X = 1 to X = 4
  2910.  
  2911. 9885 : Weapon Menu - Draw Slot for Achieved Weapon/Item (Setup VRAM Buffer)
  2912.  
  2913. 98D0-9921 : Weapon Menu - Draw E-Tank / Extra Life quantity
  2914.  
  2915. 9922-9A85 : Weapon Menu - Button Press Handler ??
  2916. 9992 : For Highlighting weapon selected, and turning gray the old one.
  2917. 999E : Continous Attribute Table Updater?
  2918. 9A3A-9A85 : Update Rush/Megaman Sprites
  2919. (9A3A called as Sub when showing Rush animation when Rush Items chosen.)
  2920.  
  2921. 9A86-9AE2 : Weapon Menu - Draw Slot for Unachieved Weapon/Item (Setup VRAM Buffer)
  2922. 9AE3-9B02 / 79AF3-79B12 : Weapon Menu Palette
  2923. 9AFB-9AFE / 79B0B-79B0E : Coloring of hilighted Pharaoh Shot,
  2924. Flash Stopper, Ring Boomerang
  2925.  
  2926. 9B04-9B3E / 79B14-79B4E : Megaman Weapon Palettes
  2927.  
  2928. The two following tables are where to draw the energy bar for each weapon. Written at $0780 and $0781:
  2929.  
  2930. 9B3F-> : Nametable VRAM Address for each menu entry - Low
  2931. For the cursor, look at B0 to BE, take the desired weapon, and substract B0. You have the index.
  2932. 9B4E-> : Nametable VRAM Address for each menu entry - High
  2933. For the cursor, look at B0 to BE, take the desired weapon, and substract B0. You have the index.
  2934.  
  2935. 9B62-9B6C 79B72/79B7C : Weapon Menu - VRAM Buffer Source: (Quantity digits for E-Tank / Extra Life stuff) (2327)
  2936. Note : Digits are corrected after.
  2937.  
  2938. 9B71-9B7D-> : What to write to $A0 (Current Weapon) for each Weapon Menu selection. $0138 is the index.
  2939.  
  2940. 9B81 : Menu Entry - 1st Attribute Data Byte Offset (A index for the $9B90
  2941. attribute table, loaded with the $0138 as an index.)
  2942. 9B90-9B96-> : Menu Entry - 1st Attribute Datas. Contains datas for the $0780 tables, index by $9B81.
  2943. Contains datas for the $0780 Buffer to know, if the weapon is selected, which TSA table
  2944. to edit the palette.
  2945. All the datas will be written there in orders. So first are the two pointers, then
  2946. the byte for number of datas, then the datas.
  2947. The datas are the coloring of a selected weapon.
  2948. Bit 0-1 : Palette of TSA Block down right
  2949. Bit 2-3 : Palette of TSA Block down left
  2950. Bit 4-5 : Palette of TSA Block up right
  2951. Bit 6-7 : Palette of TSA Block up left
  2952.  
  2953. X = 00 : Mega Buster
  2954. X = 07 : Flash Stopper
  2955. X = 0E : Rain Flush
  2956. X = 15 : Drill Bomb
  2957. X = 1C : Pharaoh Shot
  2958. X = 23 : Ring Boomerang
  2959. X = 2A : Dust Crusher
  2960. X = 31 : E-Tank
  2961. X = 37 : Dive Missile
  2962. X = 3E : Skull Barrier
  2963. X = 45 : Rush Coil
  2964. X = 4C : Rush Marine
  2965. X = 54 : Rush Jet
  2966. X = 5B : Wire Adaptor
  2967. X = 62 : Balloon Adaptor
  2968.  
  2969. 9BF9 : Menu Entry - 2nd Attribute Data Byte Offset (A index for the $9C08
  2970. attribute table, loaded with the $0139 as an index.)
  2971. 9C08-> : Menu Entry - 2nd Attribute Datas. Contains datas for the $0780 address.
  2972. All the datas will be written there in orders. So first are the two pointers, then
  2973. the byte for number of datas, then the datas.
  2974. The datas are the coloring of a not selected weapon.
  2975. Bit 0-1 : Palette of TSA Block down right
  2976. Bit 2-3 : Palette of TSA Block down left
  2977. Bit 4-5 : Palette of TSA Block up right
  2978. Bit 6-7 : Palette of TSA Block up left
  2979.  
  2980. 9C70-9C73-> : Weapon Menu - Some Sprite Data
  2981. 9D30 : Sprite letters - Sprite DMA Buffer index for menu entry's sprite letter, if
  2982. it has one letter in its text that is sprite rather than bg.
  2983. If none of the letters are a sprite, the value is 00.
  2984. One byte for each menu entry.
  2985. 9D3F-9D62 : Weapon Menu - Megaman and Rush Sprites Byte-offset Data for 9D63
  2986. (Two bytes for each Weapon/Item, one for two possible animations.
  2987. The bytes points to where in the 9D63-9E50 to start reading sprites from.)
  2988.  
  2989. Sprite Sets - Indexes to 9D3F:
  2990. 00-17 : Megaman
  2991. 18-19 : Rush (Animation)
  2992. 1A-1B : Rush (Rush Coil Selected)
  2993. 20-21 : Rush (Rush Marine Selected)
  2994. 22-23 : Rush (Rush Jet Selected)
  2995.  
  2996. 9D63-9E50 : Weapon Menu - Megaman and Rush Sprite Data
  2997. 9D63-9D88 / 79D73-79D98 : Mega Man
  2998. 9D89-9DB4 / 79D99-79DC4 : Rush standing : see 79DC7
  2999. 9DB7-9DBE / 79DC7-79DCE : Rush's moving tail
  3000. 9DC1-9DE4 / 79DD1-79DF4 : Rush Going into Marine Or Jet Manque queue
  3001. 9DE8-9DF6 / 79DF8-79E06 : Rush Coil (only the spring and the back, since the rest is the same as Rush standing)
  3002. 9DF9-9E28 / 79E09-79E38 : Rush Marine
  3003. 9E2B-9E4E / 79E3B-79E5E : Rush Jet
  3004.  
  3005. 9E51-9E7C : Weapon Menu Standard Sprites - Sprite RAM Setup
  3006. 9E51-9E60 / 79E61-79E70 : Life Word
  3007. 9E61-9E64 / 79E71-79E74 : "V" of Dive Missile
  3008. 9E65-9E68 : "C" of Coil
  3009. 9E69-9E6C : "M" of Marine
  3010. 9E6D-9E70 : "J" of Jet
  3011. 9E71-9E74 : "W" of Wire
  3012. 9E75-9E78 : Left part of Mega Man's Head
  3013. 9E79-9E7C : RIght part of Mega Man's Head
  3014.  
  3015. 9E7D-> : VRAM Buffer - Name Table data to write to 2nd Name Table under this condition:
  3016. Returning from weapon menu to Wily Stage 3, Second phase of battle with Wily.
  3017. (Part 1)
  3018. 9EE7-> : VRAM Buffer - Name Table data to write to 2nd Name Table under this condition:
  3019. Returning from weapon menu to Wily Stage 3, Second phase of battle with Wily.
  3020. (Part 2)
  3021.  
  3022. 9F28 : Weapon Menu - Selection Black-out Template VRAM buffer
  3023. 9F45-9F53 : Weapon Menu - Selection Black-out Name Table VRAM Address - High
  3024. For the cursor, look at B0 to BE, take the desired weapon, and substract B0. You have the index.
  3025. 9F54-9F62 : Weapon Menu - Selection Black-out Name Table VRAM Address - Low
  3026. For the cursor, look at B0 to BE, take the desired weapon, and substract B0. You have the index.
  3027.  
  3028. 9F63-9FFF / 79F73-7A00F : All unused.
  3029.  
  3030. 7A010 <-> 7C00F (Bank $3D by $2000)
  3031. -----------------------------------
  3032.  
  3033. [Object ASM Bank #5]
  3034.  
  3035. MEMORY TYPE $A000-$BFFF:
  3036.  
  3037. A000 : ?? Object ASM (Used by Ring Man Rainbow Bars)
  3038.  
  3039. 7A267-7A27A : Rainbow bars - Index data for each Screen Position.
  3040. 7A27B : Rainbow bars data.
  3041. Data chunk (8 bytes):
  3042. 0-1: Nametable VRAM Update Address. (Points to Upper-Left tile in Block to the right end of bar.)
  3043. If Direction is Right, of Block to the left of bar.
  3044. 2: Object X coordinate. (Points to mid of bar) (is ?0 or ?8) (Same as X placement of enemy)
  3045. 3: 16x16 Level TSA TBlock to draw on void space.
  3046. 4: Object Direction. (Direction which bar is to disappear, $1: from right, $2: from left.)
  3047. 5: 16x16 Tile Y and X coordinate of bar. (Points to Rightmost block in bar, Leftmost if direction is Right.)
  3048. bit0-3: 16x16 Tile Block Y coordinate
  3049. bit4-7: 16x16 Tile Block X coordinate.
  3050. Stored to Object Private Memory 4 ($4B0-$4C7) and Enemy HP ($450-$467)
  3051. 6: Bar Length - in 16x16 Blocks. (Written to Object's Substance and Shape data byte?)
  3052. 7: X Coordinate of Right or Left end of bar. (Object X Coordinate to set when Megaman steps on bar.)
  3053. Left if direction is Right
  3054. This is always '?8' (? is high nibble of hex value)
  3055.  
  3056. A55B-A59C : Hippo's Missile Object ASM (Object ID $25)
  3057. A5A5-> : Sprite ID Table
  3058.  
  3059. A5D3 : Object ID $90 ASM
  3060.  
  3061. A7E5-A805 / 7A7F5-7A815 : Snailbot's Bomb Object ASM (Object ID $2C)
  3062.  
  3063. A846-A876 : ??? Object ASM (Object ID $2D)
  3064.  
  3065. A877-A8BD / 7A887-7A8CD : [Ring Miniboss Defeat Handler] Object ASM (Object ID $3A)
  3066.  
  3067. A8BE-A8C2 / 7A8CE-7A8D2 : Tables used by $A877.
  3068.  
  3069. A90D-A97F / 7A91D-7A98F : Bright Man's Platform (Red) NOTE : RTS UBT
  3070. A980-AA1E / 7A990-7AA2E : Bright Man's Platform (Green) NOTE : RTS NUBT
  3071. AA1F-AA66 / 7AA2F-7AA76 : Bright Man's Platform (Green & Red)'s
  3072. Table (Y quantity to add to platform) NOTE : RTS N
  3073.  
  3074. AA67-AA85 : ??? Object ASM (Object ID $4B)
  3075.  
  3076. AD0C-ADCF : Drill Man stage switch Object ASM (Object ID $5B)
  3077. Also entry points of Unused Object ID's $57, $58, $59 and $5A.
  3078.  
  3079. AFA6-AFAF : Dive Man stage moving spikes Object ASM (Object ID $CF)
  3080. AFB0-AFB6 : Water Splash Object ASM (Object ID $6F)
  3081.  
  3082. B033-B144-> : ??? - Object ID $74 ASM.
  3083.  
  3084. B13C-B144-> : Tbl
  3085.  
  3086. B148 : Cossack stage 1 boss Object ASM (Object ID $87)
  3087. B148 : Initial entry point
  3088.  
  3089. B319 : Subroutine
  3090. B4C4 : Subroutine
  3091. B5D2 : Table
  3092. B5DE : Table
  3093.  
  3094. 7B5FB-> : Floor Destruction - Name Table update data
  3095.  
  3096. B65C : Object ID $89 ASM (Single RTS)
  3097. B65D- : (Object ID $92)
  3098.  
  3099. B796 : (ASM here which writes $94 to $300-$317)
  3100.  
  3101. B9D6 : Subroutine of B65D.
  3102.  
  3103. BA8B : Object $94 ASM
  3104.  
  3105. BD9A-BFFF : Unused junk space.
  3106.  
  3107. 7C010 <-> 8000F (Bank $3E <-> $3F by $2000) - HARD-WIRED BANK
  3108. -------------------------------------------------------------
  3109.  
  3110. MEMORY AREA: $C000-$FFFF
  3111.  
  3112. [Interrupts]
  3113.  
  3114. ASM:
  3115. C000-C126 : NMI! (Main Body)
  3116. C127-C148 : NMI - Sound Engine Handler
  3117. C149-C157 : MMC3 IRQ Handler
  3118. C158-C310 : Various MMC3 IRQ Effect ASM
  3119. C30E : 00 Jump Point (= No effect)
  3120. C158 : 01 Entry Point
  3121. C1A8 : 02 Entry Point
  3122. C1E0 : 03 Entry Point
  3123. C1E9 : 04 Entry Point - Dust Man Ceiling Scanline IRQ Effect
  3124. C20F : 05 Entry Point - Dive Man Waves Scanline IRQ Effect
  3125. C235 : 06 Entry Point - Dr. Cossack Battle Scanline IRQ Effect
  3126. C252 : 07 Entry Point - Dr. Cossack Stage 2 Boss - Scanline IRQ Effect
  3127. C2A0 : 08 Entry Point - Dr. Cossack Battle End Scene - Scanline IRQ Effect
  3128. C2BF : 09 Entry Point - Giant Metool Battle / Wily Stage 3 Battle - Scanline IRQ Effect
  3129. C2DC : 0B Entry Point
  3130. C2FE : 0A Entry Point - Train Ride Ending Scene - Scanline IRQ Effect
  3131. C311-C317 : MMC3 IRQ Tail (Return Handler)
  3132.  
  3133. Data:
  3134. C318-C323 : Scanline IRQ Effect - ASM Addresses - Low
  3135. C324-C32F : Scanline IRQ Effect - ASM Addresses - High
  3136.  
  3137. ASM:
  3138. C330-C354 : Writing of VRAM Buffer to VRAM
  3139. Note : This function is in some case accessed directly at $C334.
  3140.  
  3141. C355-C35E : Disable NMI (PPU Control Reg #1 / $2000 / $FF - AND with #$11)
  3142. C35F-C368 : Enable NMI (PPU Control Reg #1 / $2000 / $FF - OR with #$80)
  3143. C369-C372 : Disable Display (PPU Control Reg #2 / $2001 / $FE - Write #0)
  3144. C373-C37C : Enable Display (PPU Control Reg #2 / $2001 / $FE - Write #$18)
  3145.  
  3146. C37D-C3D4 : Joypad Memory Update Routine (Read from Joypad Regs, store to $14-$17)
  3147.  
  3148. C3D5-C420 : Pattern Table / Name Table / Attribute Table Clear Routine
  3149. [Usage: A = Pattern Table / Name Table - High VRAM Address,
  3150. X = Byte value to fill with, Y = If Pattern Table (A < $20): # of $100-byte chunks
  3151. to fill/clear CHR-RAM with from start address.
  3152. - or - if Name/Attribute table (A => $20): Byte to fill Attribute Table with.
  3153. (If Name Table start address is given ($20, $24, $28 or $2C), it will automatically
  3154. clear its Attribute Table as well with value in Y.)]
  3155. Not to be called when Display is on.
  3156. C421-C437 : Sprite DMA Buffer RAM - Clear Routine
  3157. C438-C450 : Object Memory Arrays - Clear Routine
  3158. C451-C4B7 : Palette Fade Up/Down Routine
  3159. C451 : JSR Entry Point for Fade Up
  3160. C457 : JSR Entry Point for Fade Down
  3161. C4B8-C4D5 : Address Jumptable Handlers
  3162.  
  3163. C4D6-C50B : 2nd Thread ASM (Random Generator, Palette Animation)
  3164.  
  3165. C50C -> : Start-Up ASM (Starting Point of Main Thread)
  3166.  
  3167. C539 : When gameplay is about to begin, program returns here. (Seems to happen only at first time
  3168. gameplay starts)
  3169.  
  3170. C541 : If MM looses a life (no Game Over), game jumps back here.
  3171. Also jumps back here from C82C.
  3172.  
  3173. C5A6-C5C3 : This is where the first screen is drawn to Nametable before fading palette up.
  3174.  
  3175. C6D4-C706 : Special case writes to $EF, for Cossack Stage 1, Pharaoh Man's Stage and Toad Man's Stage.
  3176. There are also some of those cases $CF67.
  3177.  
  3178. C68B : Draw exception for Wily Stage 3 for Screen Position #9. (Rematch warp room)
  3179. If game starts on this screen, and all robot masters have been defeated,
  3180. it will draw the additional teleporter to the Wily battle here and also
  3181. set up an additional sprite.
  3182.  
  3183. C6CD : Execution Point - Palette is Faded up when Level begins
  3184.  
  3185. C6F3-C7F5 : Main Game Loop
  3186. C6F3 : Give Sprites BG Priority in Cossack Stage #1 (Continuos Check)
  3187. C707-C73F : Check if Weapon Menu is to be opened.
  3188. C731-C73D : Entering Weapon Menu
  3189. C740-C74C : Handle Megaman's Movement ASM
  3190. C74D-C759 : Handling of Object ASM
  3191. C75A-C765 : Handle Scrolling
  3192. C766-C775 : Handle Initalizing of Stage Enemies/Items
  3193. C776 : Call $E0FA : Ring Man Rainbow Bars handler loop add-on.
  3194. C779 : Call $E35C : Auto Screen Updates handler. (Checks memory $1B/$1C).
  3195. C77C : Call $E262 : Auto 32x32 Tile redraw.
  3196. C77F : Call $E492 : In-Game Palette Fade Handler.
  3197. C782-C784 : Call $E49C : Drill Man's Stage-specific ASM?
  3198. C785-C787 : Call $E4DD : Dust Man stage Shootable Blocks loop add-on.
  3199. C788-C791 : Update Megaman's Horizontal movement speed ($37 copied to $3A8, $38 copied to $3C0.)
  3200. C792-C7B3 : Mid-Point Pass Check?
  3201. C7B4-C7BD : Updating of Sprite DMA based on Object Sprites.
  3202. C7C6 : Return to Thread Handler (JSR $FF1C) (And Wait for Screen Refresh)
  3203. C7CB : If memory $30 is $07, $08, $11 or $13, it counts down mem $133/$134 until 0 and jumps to $C6F3, else
  3204. to $C7F6.
  3205. C7F3 : End. Return to C6F3
  3206.  
  3207. C80B-C852 : Decides what to do when gameplay ends by different means.
  3208. Can go to Ending and Credits, can go to Weapon Get or Password screen
  3209. or Cossack/Wily stage maps, can restart gameplay if megaman lost a life
  3210. or got Balloon or Wire adaptor, or go to Game Over screen.
  3211.  
  3212. C82C : When gameplay is about to begin, program returns here.
  3213. (All times expect the first time of a playthrough)
  3214.  
  3215. C853-C85A / 7C863-7C76A : Megaman's Palette
  3216.  
  3217. C85B-C86A : Sound ID to Init for each Level.
  3218. C86B-C87A / 7C87B-7C88A : Bits to OR with $528 (Megaman's Sprite Flags, see Mem 528-53F) for each Level.
  3219. C87B-C88A / 7C88B-7C89A : Y Coordinate to give sprites below it background priority, for each Level. (Written to $EF).
  3220.  
  3221. C88B-C8AA / 7C89B-7C8BA : Screen Preset where Mid-Point / Boss-Point is passed
  3222. 2 bytes for each Level ID (Mid-Point, then Boss-Point).
  3223. This data must be set for Mid-Point / Boss-Data to work.
  3224. For continue-points that arent used, the value is set to $FF.
  3225. note: This defines the screen where the continue point is activated, while Bytes 1 and 5 in the data
  3226. below defines where MM will start if defeated.
  3227.  
  3228. C8AB-C92A / 7C8BB-7C93A -> : Mid-Point / Boss-Point Data for All Stages
  3229. Each stage has 8 bytes.
  3230. byte 1 : Mid-point: Screen Position
  3231. byte 2 : Mid-point: Scroll Map Position
  3232. byte 3 : Mid-point: Primary Graphics Load ID to load (00 = None)
  3233. byte 4 : Mid-point: Palette Set
  3234. byte 5 : Boss-point: Screen Position
  3235. byte 6 : Boss-point: Scroll Map Position
  3236. byte 7 : Boss-point: Primary Graphics Load ID to load (00 = None)
  3237. byte 8 : Boss-point: Palette Set
  3238.  
  3239. C92B-C96D : Wily Stage 3 rematch warp room -
  3240. VRAM Buffer Source for drawing 9th teleporter (If all clear).
  3241.  
  3242. [Scrolling]
  3243.  
  3244. ASM:
  3245. C96E-CBFC-> : Scrolling ASM
  3246. C981-C9D0 : Start of Cossack Stage 3 Auto Scrolling Code.
  3247.  
  3248. CACF : Reading of Multipaths (Horizontal Scrolling)
  3249.  
  3250. CAFF : Execution Point - MM moving through boss door / (Horizontal Scrolling) scrolling right check. Jump in from $CA6F
  3251.  
  3252. CB43 : Execution Point - Handling Boss Doors
  3253.  
  3254. Data in ASM:
  3255. 7CB90 : Megaman - Movement Speed when scroll right - Low
  3256. 7CB98 : Megaman - Movement Speed when scroll right - High
  3257.  
  3258. CC03-CC12 : Boss-Doors: Screen Position of level to skip boss-door wrap down after entering boss screen.
  3259. (0 means no screen. This data is set for most Cossack/Wily levels.)
  3260.  
  3261. CC13-> : Scrolling ASM (Vertical Scrolling)
  3262.  
  3263. CCD0 : Reading of Multipaths (Vertical Scrolling)
  3264.  
  3265. CDD5 : Point - Megaman approaches a new screen
  3266.  
  3267. Data in ASM:
  3268. 7CE08 : Vertical Screen Scroll Speed - Down
  3269. 7CE18 : Megaman - Movement Speed when climbing ladders Down - Low
  3270. 7CE20 : Megaman - Movement Speed when climbing ladders Down - High
  3271. 7CE32 : Vertical Screen Scroll Speed - Up
  3272. 7CE40 : Megaman - Movement Speed when climbing ladders Up - Low
  3273. 7CE48 : Megaman - Movement Speed when climbing ladders Up - High
  3274.  
  3275. CEE1-CFA0 : Handle Stage Part Data (Scroll Map Data), set up memory and registers for new screen.
  3276. CEEA : Check Palette Set Byte for current Scroll Map.
  3277. CF67-CF9C : Special case writes to $EF, for Cossack Stage 1, Pharaoh Man's Stage and Toad Man's Stage.
  3278. There are also some of those cases which use table $CFA1 at $C6D4.
  3279. CFA1-CFB0 : Value to write to $EF for each Scroll Map, in Toad Man's Stage.
  3280.  
  3281. CFB1-D04D -> : Horizontal Scrolling - Nametable Updates (Setting up of buffer)
  3282. D04E-> : Attribute Table AND Table with AT Work RAM (640->)
  3283. D050-D051 : Attribute Table AND Table with New Attribute Byte
  3284.  
  3285. D052-D142 : Vertical Scrolling - Nametable Updates (Setting up of buffer)
  3286. D143-D16E : Nametable Updates - Some Routine (Soubroutine of Scrolling ASM)
  3287.  
  3288. D16F-D170 : Table Used by D052
  3289. D171-D172 : Table Used by D052
  3290. D173-D176 : Table Used by D052
  3291.  
  3292. D177-> : Table Used by D052
  3293. D17B-D17C : Table Used by D052 and D143
  3294. D17F-D1C4 : Scrolling Nametables Updates - Return 8x8 Tiles Used in a 32x32 Tile field.
  3295. $29 is 32x32 Tile field in Screen to return data for. (Note: Refers to area in screen, not a 32x32 tile set in stage data. The routine reads Screen Data based on $29.)
  3296. Needs $20-$21 set up.
  3297. Sets up $7C0-$7CF and returns Attribute Table byte in $10.
  3298. Used by both CFB1 and D052
  3299.  
  3300. D1C5-D24A : Nametable Updates Special Exceptions - Sub of D17F
  3301.  
  3302. 7D1D8 : Stage ID for Hidden Blocks/Switch feature (graphics updates)
  3303.  
  3304. D1CF-D22F : Ring Man Rainbow Bars Exception.
  3305. For 16x16 Tiles:
  3306. $09 (Rainbow Bars - First Part)
  3307. $8C (Rainbow Bars - Second Part)
  3308. This thing's purpose is to draw black tiles instead if there's a Rainbow Bar at nametable
  3309. row/collumn being updated, if that part of the bar is cut off/void/black/w.e.
  3310.  
  3311. D230-D24A : Drill Man "Switch" Exception (Change Tile Palette to #1 if Screen's Switch is turned On. See Mem $680.)
  3312.  
  3313. D24B-D294 : Nametable Updates - Dust Man Shootable Block Exception - Sub of D17F
  3314. This make the shooted Shootable Block non solid.
  3315.  
  3316. D295-D2B9 : Scroling Nametables Updates Sub - Read Screen Data and set 32x32 Tile Data Address.
  3317. D2A2 : Entry Point from D2FC (Past Bankswitching)
  3318.  
  3319. D2BA-D2BD : Table used by D17F and D24B
  3320. D2BE-> : Table used by D052
  3321. D2C6-> : Table used by D052
  3322. D2CE-D2FB : Nametables Updates - Set a screen's Screen Data Address to $20/$21
  3323. (Y is Screen Position, $22 is Stage/Level.)
  3324. Sub of CFB1 and D052
  3325. D2D7 : Entry Point from D2FC (Past Bankswitching)
  3326.  
  3327.  
  3328. D2FC-D427: Hit Detection : Objects with Stage Walls. (Vertical Detection/Vertical Collision)
  3329. [Arg: Y = Shape data couple index.]
  3330. Note : if calling this function directly, it only checks collision with the sent pointer,
  3331. not the Shape data couple.
  3332.  
  3333. Returns result in Mem $10, $11, and
  3334. $45/$46/$47/$48/$49 stores the TSA ID from left to right under : example, for Mega Man there are values in $45, $46, $47
  3335.  
  3336. $10, Same as $41, in most case. In fact, $10 contains the bits of every object
  3337. that is touched, because every time something is touched, we take this new
  3338. value and make a ORA of $10. For example, if $10 contains #$10 (solid) and we hit
  3339. water (ORA #$60), it contains #$70.
  3340. ?$11 : Contains the Y position of the hit block.
  3341. $41 : 16x16 Tile Type of 16x16 Tile Object has hit with highest
  3342. value (see $41 at the start of the document). (Result of D2FC).
  3343.  
  3344. D397 : Hit Detection - Check for Rainbow Bar
  3345. D39A : Hit Detection - Cossack Stage 1 Boss Check
  3346. D39D : Hit Detection - Dive Man? Drill Man?
  3347. D3A0 : Hit Detection - Dust Man Shootable Blocks
  3348. D3A3 : D661 Call - Wily Stage #3 - Virtual Platform in rematch room after all clear.
  3349.  
  3350. D428 : Hit Detection : Objects with Stage Walls. (Horizontal Detection/Horizontal Collision)
  3351. Returns result in Mem $10, and $45/$46/$47
  3352.  
  3353. D4C8 : D599 call
  3354. D4CB : D5DA call
  3355. D4CE : D5E6 call
  3356. D4D1 : D624 call
  3357. D4D4 : D661 Call - Wily Stage #3 - Virtual Platform in rematch room after all clear.
  3358.  
  3359. D53A- : ??
  3360. Sub of D2FC
  3361.  
  3362. D552-D58C : Dust Man Shootable Block Exception ??
  3363. Sub of D2FC
  3364.  
  3365. D58D-D598 : ??
  3366.  
  3367. D599-D5D9 : D2FC Sub (Ring Man Rainbow Bars?)
  3368. 7D5B1 : Stage ID compare with #$04 (Rainbow bars related?)
  3369. D5DA : D2FC Sub (Cossack Stage 1 - Mothraya boss extra stuff)
  3370. D5E6-D623 : D2FC Sub (TSA Block exceptions: Dive Man Waves, Drill Man conditional surface, Ring Man "Ring-guy" miniboss with blocked path.)
  3371.  
  3372. Every structure are passed in this, in $29. We check all of them, and depending
  3373. on the level we are in, we check if for the block there is an exeption at a certain
  3374. moment. For exemple, every turn, all the block in Ring Man stage are checked. When
  3375. Whapper is defeated, some blocks must be destroyed, so here, when we check those
  3376. blocks, if Whapper is defeated, we destroy them.
  3377.  
  3378. D5EF / 7D5FF : Stage ID for Hidden Blocks/Switch feature (physics)
  3379.  
  3380. D5F2-D60D / 7D602-7D61D : This is here we choose to not consider the
  3381. Ring Man's Whapper blocks for the collision.
  3382.  
  3383. D624 : D2FC Sub (Scanline Effect #4?)
  3384. D661-D690 : D2FC Sub (Wily Stage 3 - Virtual Platform in rematch room after all clear.)
  3385.  
  3386. D691-D695 : Ring Man's stage: Screen $0A Ring Miniboss:
  3387. 32x32 tiles which are free to pass when miniboss is defeated.
  3388.  
  3389. D696-D69D : Wily Stage #3 - Rematch Room - Virtual Platform data
  3390.  
  3391. D69E-D6DD : Object/Wall Hit Detection (Vertical) - Shape Data - Offset - Low
  3392. D6DE-D71D : Object/Wall Hit Detection (Vertical) - Shape Data - Offset - High
  3393.  
  3394. D71E-D807 : Object/Wall Hit Detection (Vertical) - Object Shape Data
  3395. Pointer Address
  3396. ======= =======
  3397. 00 D71E-D722 Down pointer has one more datas. It's done because there are some case
  3398. which code needs to checks if there is a collision in the middle of Mega Man.
  3399. It's done with ladder top for example : when grabbing it, it check if the middle
  3400. coordinate point is touched. If so it is grabbed, else not because Mega Man is
  3401. touching it but is too far.
  3402. 01 D723-D726
  3403.  
  3404. 18 D777-D77B
  3405. 19 D77C-D780
  3406.  
  3407. D808-D847 : Object/Wall Hit Detection (Horizontal) - Shape Data - Offset - Low
  3408. D848-D887 : Object/Wall Hit Detection (Horizontal) - Shape Data - Offset - High
  3409.  
  3410. D888-D99E : Object/Wall Hit Detection (Horizontal) - Shape Data
  3411. Pointer Address
  3412. ======= =======
  3413. 00 D888-D88C
  3414. 01 D88D-D891
  3415.  
  3416. 0E D8BF-D8C2
  3417. 0F D8C3-D8C6
  3418.  
  3419. D99F-D9B6 : Called by F000. Has with Object movement to do.
  3420. D9B7-D9CC : Called by F049. Has with Object movement to do.
  3421. D9CD-D9E6 : Put Mega Man under of the hit block detected in D2FC.
  3422. Called from F0F3, F225, and from certian megaman movement ASM (ROM offset 78507)
  3423. Called when using Rush Marine.
  3424. It's called after a call to $D2FC (and maybe others) because it uses the value it sets in $11.
  3425. Call it if with movement up, there is no more any contact with water. If so, using $11, it
  3426. set back item in water.
  3427.  
  3428. D9E7-DA04 / 7D9F7-7DA14 : Put Mega Man on top of the hit block detected in D2FC.
  3429. Uses $11 to set MM back to position without collision
  3430. In $D2FC, we could find exactly what it is, since the $11 used come from
  3431. this function. (when called by $F3C1).
  3432. Called from F0BC, F1F5, F3C1 and F3DE.
  3433.  
  3434. DA05-DA8A : Primary Graphics Load - Loader Routine
  3435. [Use: X = ID]
  3436.  
  3437. DA8B-DABA : Scroll Graphics Load - Init Routine
  3438. [Use: A = ID]
  3439.  
  3440. DABB-DB39 : Scroll Graphics Load - Handler/Writer Routine
  3441.  
  3442. DB3A-DB71 : Draw Sprites. (Write to $200-$2FF, which is later copied to SPR-RAM using DMA.)
  3443.  
  3444. DB72-DEE1 : Draw Object to $200-$2FF - X is Object Slot. This chunk of ASM also does all sorts of other stuff.
  3445.  
  3446. DB8F : Is enemy out of Y screen? Use $0528 to know if it has bit to be alive.
  3447. Also, if he has, he needs specific Sprite ID or object ID to survie (see $DBDA)
  3448. This is the place where we check if an object is out of Y screen. If it's Mega Man, go to $DC14.
  3449.  
  3450. DBDA-DBFF : A check by Object ID for some object that can survive even if out of screen.
  3451.  
  3452. DC00-DC13 : Remove Properties of Object in Slot indexed by X Register. (This is called as Subroutine plenty of places.)
  3453. Those properties are, with X index :
  3454. $300, $450, $5A0, $5B8 and put #$FF in $438.
  3455.  
  3456. DC14 : MM not in Y Screen #$00! Check if...
  3457. ASM : Megaman falls down pit. code is at DC14. At dc1F is if it's the first time we come here.
  3458.  
  3459. DC30 / 7DC40 : Falling down pit : Delay before gameplay refreshes - Low
  3460. DC35 / 7DC45 : Falling down pit : Delay before gameplay refreshes - High
  3461.  
  3462. DD5E-DD6D : Value for each Level, has with sprite invicibility to do. (When enemies are hit.)
  3463. This value is Sprite Bank's Tile Usage data ID to use for "blink" effect.
  3464. If the value is 0, it does palette blinking. (Used for Cossack/Wily stage bosses.)
  3465.  
  3466. DD6E-DE49 : Update Object's Sprites to Sprite DMA Buffer - Continued (A = Actual Sprite Bank's Coordinate ID, X = Object Slot)
  3467.  
  3468. DE4A-DE71 : Subroutine - Actively copy parts of Source Palette to Palette Buffer. Done at all bosses.
  3469.  
  3470. DE72-DE8C : Subroutine - Blink effect for Cossack and Wily bosses.
  3471.  
  3472. DE8D-DEE1 : Jump-to point - Handle blink effect for mini-bosses. Jumps back to DD30.
  3473.  
  3474. DEE2-DEF1 : Draw Energy Bars (In order from 0 to 2)
  3475. DEF2-DEFF : Draw Energy Bars (In order from 2 to 0)
  3476.  
  3477. DF00-DF58 : Routine for setting up Energy Bars to Sprite DMA. (X = slot in the $0130 values)
  3478.  
  3479. DF1E / 7DF2E : Y Coordinate of Bottom Sprite of all Energy Bars.
  3480.  
  3481. DF59-DF5B / 7DF69-7DF6B: Energy Bar Sprite Attribute Bytes
  3482. DF59 / 7DF69: Megaman Health
  3483. DF5A / 7DF6A: Weapon/Gadget Energy
  3484. DF5B / 7DF6B: Boss Health
  3485. DF5C-DF5E / 7DF6C-7DF6E: Energy Bar Sprite X Coordinates
  3486. DF5C / 7DF6C: Megaman Health
  3487. DF5D / 7DF6D: Weapon/Gadget Energy
  3488. DF5E / 7DF6E: Boss Health
  3489.  
  3490.  
  3491.  
  3492.  
  3493. If you want to free the two following code sections because you don't have Rain Flush anymore,
  3494. remove this JSR : $DB3A:20 5F DF JSR $DF5F.
  3495. Also, note that 13A and 13B won't be necessary anymore.
  3496.  
  3497. DF5F-DFBD : Rain Flush effect handler - Updates registers and writes to Sprite DMA Buffer.
  3498. DFBE-DFF9 : Rain Flush Sprite Y and X setup data
  3499.  
  3500. DFFA-E0F9 / 7E00A-7E109: Upper Sprite Bank Data to use for each Object ID
  3501.  
  3502. E0FA-E20D : Some Ring Man's Stage Game Loop ASM. (Rainbow Bars)
  3503.  
  3504. E20E-E261 : Unused Routine! Might be old subroutine previously used for Rainbow Bars or Shootable blocks.
  3505. The RTS at $E261 is used by $E262.
  3506.  
  3507. E262 : Draw 32x32 Tile location in Memory $1D if value => $80. Updates done to VRAM Buffer, not direct write to VRAM.
  3508.  
  3509. E333-E424 : Auto Screen Updates Handler
  3510. E35C : JSR in point from game loop.
  3511.  
  3512. E425-E428 : Table used by E333
  3513.  
  3514. E429-E49B : In-Game Palette Fade Handler
  3515.  
  3516. E49C-E4DC : Drill Man stage-specific ASM - Attribute Table updates
  3517.  
  3518. E4DD-E571 : Shootable Blocks - Update Name Table and graphic. (Main Loop Subroutine)
  3519. this function update the graphic of the block, not the type the type is d24b
  3520. Jump in from $C785
  3521.  
  3522. E572-E576 : Data used by D24B (Scrolling Nametable Updates - Dust Man Shootable Block Exception)
  3523. Pointer to Shootable Block data for each screen from Screen Position $C.
  3524. Note : This means that to read this table, you read $E566,X, where X is the
  3525. X screen position where the Block met the Weapon.
  3526. E577-E5C3 : More Data used by D24B (Scrolling Nametable Updates - Dust Man Shootable Exception)
  3527. Shootable Block - 32x32 tile position data.
  3528. Data pair:
  3529. Byte 1: 32x32 tile position (Value $80-$FF ends data.) In a specific X screen.
  3530. Byte 2: Bit Offset in memory ($680-$6BF) (E578 table)
  3531.  
  3532. Summary : E572 tells where are the Structure datas for each X screen in the E577 table.
  3533. Then, each data in E577 table is a structure where there are Shootable Blocks.
  3534. E572-E5C3 : Tables used by E4DD
  3535. E5C4-E5C7 : Table used by E4DD
  3536.  
  3537. E5C8-E679 : Boss Rematch room prepare routine.
  3538. E67A-E681 : Scroll Graphics Load ID's to load for each robot master's rematch room.
  3539.  
  3540. E682-E750 : Boss Door Wrap-Up Drawing ASM
  3541. E751-E80F : Boss Door Wrap-Down Drawing ASM
  3542.  
  3543. E810-E813 : Table used by E751, and possibly E682.
  3544.  
  3545. E814-EFFF : Unused Random Data.
  3546.  
  3547. [$F000-$FDFF Region: Object ASM/Enemy AI Routines]
  3548.  
  3549. note: For most of these routines, object slot is loaded into X register as argument.
  3550.  
  3551. F000-F048 : Check for Object Hit with Walls (To the Right of Object, i think) + move. - (X = Obj Slot, Y = Arg)
  3552. Routine Calls of this Sub:
  3553. F22D
  3554. F843
  3555. F8F9
  3556. F02A
  3557.  
  3558. F049-F087 : Check for Object Hit with Walls (To the Left of Object, i think) + move. - (X = Obj Slot, Y = Arg)
  3559.  
  3560. F088-F0C0 : ? Vertical check.. (Down). Also update movement
  3561. [Carry is set if floor hit]
  3562.  
  3563. F0C1-F0F7 : ? Vertical check.. (Up). Also Update movement.
  3564. [Carry is set if ceiling hit]
  3565.  
  3566. F0F8-F22C : Jump Movement (gravity influenced) + Floor collition check
  3567. [Arg: Y = data index, Result: Carry Flag = Floor hit. Carry is Set if floor is hit.]
  3568.  
  3569. F1CE : Code for Pharaoh Man's Quicksand tiles, check if in Pharaoh Man stage, and if
  3570. not, make a CLC and then a RTS.
  3571.  
  3572. F22D-F24A : Update X (Horizontal) Movement (Move Right)
  3573. F24B-F268 : Update X (Horizontal) Movement (Move Left)
  3574. F269-F288 : Update Y (Vertical) Movement (Move Down)
  3575. F289-F2A6 : Update Y (Vertical) Movement (Move Up)
  3576. Identical fo $F2D8.
  3577.  
  3578. F289-F2A6 : Subtract Y coordinate according to Movement Speed.
  3579.  
  3580. F2A7-F2B7 : Update Vertical Object Movement (Jump). No wall hit detection. (gravity influenced)
  3581.  
  3582. F2B8-F2D7 : Sprite Movement Up / Down according to Speed (F17C)
  3583.  
  3584. F2D8-F2F5 : Update Y (Vertical) Movement (Move Up)
  3585. Identical fo $F289
  3586. Called at $F1FE (function $F0F8)
  3587. Called at $F2B2
  3588.  
  3589. F2F6-F323 : Sprite Movement Up / Down according to Gravity (F1B0)
  3590. Note : It also limits the vertical speed to F900.
  3591.  
  3592. F324-F32E : Set Vertical Movement Speed to FF00.
  3593.  
  3594. F32F-F37B : Functions whichs makes checks before calling $F37C. The big difference with calling directly
  3595. $F37C, it is that it checks if Mega Man is on enemy (like with Hover enemies in Pharaoh Man
  3596. stage). For the Whale in Dive Man stage, it uses an exception to go to $F37C.
  3597. Used for Whale Sucking, Pharaoh Man's Hover enemy, Rush Jet and maybe more.
  3598. [Arg: X = Object index which makes Mega Man moves with him
  3599. Object direction bits as the direction where Mega Man goes]
  3600.  
  3601. IMPORTANT NOTE: The big problem is that it's often called after the object moved. So if for example you jump
  3602. on Rush Jet, but are just on the edge of it, it will move before, then this function will be called, and Mega
  3603. Man is not anymore over Rush Jet, si he'll fall from it.
  3604.  
  3605. F37C-F3C0 : Routine for Dust Man's suck action. Also Dive Man's whale.
  3606. NOTE : It is called by $F32F, a function which checks few things before calling
  3607. $F37C, like if Mega Man is in contact with object before (exemple with Hover in Pharaoh Man's stage).
  3608.  
  3609. F3C1-F3EC / 7F3D1-7F3FC : Check if Mega Man had a Vertical collision with a wall.
  3610. Take Y as Vertical Wall Detection ID, depending if Mega Man is
  3611. sliding, or standing. (#$02 if not sliding, else it's #$04).
  3612. If he had a Vertical Collision while on the platform, call $D9E7, which put Mega Man
  3613. on the hit floor)
  3614. Used by Bright Man's Green Platform (not the Red one)
  3615.  
  3616. F3ED-F3FF : Update Horizontal movement + Check for Object hit with Walls, both Left and Right [Arg: Y = Shape data couple index.]
  3617. (When function returns, Carry Flag contains wall hit status. If set, a wall has been hit.)
  3618. Function also update $0528 Flag.
  3619.  
  3620. F400-F412 : Update Vertical movement + Check for Object hit with Walls, both Above and Below. [Arg: Y = Shape data couple index.]
  3621. (When function returns, Carry Flag contains wall hit status. If set, a wall has been hit.)
  3622.  
  3623. F413-F433 : Update Horizontal Object Movement.
  3624. F434-F445 / 7F444-7F455 : Update Vertical Object Movement. (Not gravity-influenced)
  3625.  
  3626. F446-F451 : Set Sprite ID. ($558,X) [Arguments: A = Sprite ID]
  3627.  
  3628. F452-F49B : Duplicate Object, with given sprite id. [Arguments: A = Sprite ID, Y = Destination Object Slot]
  3629. NOTE : OBJECT ID WILL NEED TO BE SET.
  3630. F46B : Jump-in point from $F49C routine.
  3631.  
  3632. F490-F49B : Used as subroutine in various ASM: Set sprite of object in slot Y.
  3633.  
  3634. F49C-F4DB : Set Object Position Relative to Other Object [Arguments: $10 = Relativity Pointer,
  3635. Y = Destination Object Slot, A = Written to $558,Y (Sprite ID), X = Object from
  3636. which the new object is positionned.]
  3637. (Uses tables F50B, F573, F5DB and F643, with pointer given in $10)
  3638.  
  3639. TABLES
  3640. ******
  3641.  
  3642. F50B / 7F51B : How far from the other object (Horizontal)
  3643. Values depends on F573 :
  3644. If F573 is 00, values goes from 00 to FF
  3645. If F573 is FF, values goes from FF to 00
  3646. F573 / 7F583 : Relative position given at F50B :
  3647. to the right or to the left?
  3648. 00 : Right
  3649. FF : Left
  3650. F5DB / 7F5EB : How far from the other object (Vertical)
  3651. Values depends on F643 :
  3652. If F643 is 00, values goes from 00 to FF
  3653. If F643 is FF, values goes from FF to 00
  3654. F643 / 7F653 : Relative position given at F5DB :
  3655. up or down?
  3656. 00 : Down
  3657. FF : Up
  3658.  
  3659. F4DC-F4F5 : Set $420,X based on relative position to Megaman (Make object face Megaman.)
  3660. F4F6-F50A : Set $528,X byte based on $420,X (Set sprite mirroring bit based on movement direction.)
  3661.  
  3662. 7F51B-7F582 : Relative Coordinate Set Table A
  3663. 7F583-7F5EA : Relative Coordinate Set Table B (Screen)
  3664. 7F5EB-7F652 : Relative Coordinate Set Table C
  3665. 7F653-7F6BA : Relative Coordinate Set Table D (Screen)
  3666.  
  3667. F6AB-F6BB : Invert Object's Horizontal Direction (Left<->Right) - Arguments: X = Object Slot
  3668. F6BC-F6D6 : Sound Init Array Write - Sound ID Init Routine (Called with Sound ID# in A)
  3669. (F6BE for Sound Effects)
  3670.  
  3671. F6D7-F6E5 : Return Relative Y Coordinate to Megaman. [Return val: A = Relative Y Coordinate,
  3672. X = Design other object, Carry Flag is set if Mega Man is at under the object.]
  3673. F6E6-F6FC : Return Relative X Coordinate to Megaman. [Return val: A = Relative X Coordinate,
  3674. X = Design other object, Carry Flag is set if Mega Man is at right of object.]
  3675.  
  3676. Variables not used :
  3677. $10
  3678.  
  3679. F6FD-F70E : Set Mega Man position to be used by function it calls after setting values : F71E.
  3680. [Arg: 00 = Mega Man's Y, 01 = Mega Man's X, 02 = Mega Man's X Screen]
  3681. For the return value, see F71E
  3682. (Uses F71E)
  3683.  
  3684. F70F-F71D : Set Object defined by Y position to be used by function following : F71E.
  3685. [Arg: 00 = (Object defined by Y)'s Y, 01 = (Object defined by Y)'s X,
  3686. 02 = (Object defined by Y)'s X Screen]
  3687. For the return value, see F71E
  3688. NOTE : It doesn't call F71E, it follows, it's in the same function, but it's easier
  3689. to see them as separate function, since F6FD use F71E to.
  3690. (Uses F71E)
  3691.  
  3692. F71E-F775 : Prepare values for functions from position between two objects.
  3693. From them, one known, F7A6, so enemy go toward Mega Man or another
  3694. object (defined by the caller : F70F or F6FD) and then make circles over him.
  3695. [Result: 00 = Distance between the two (X or Y coordinate, depending which one
  3696. is smaller. If they are equal, it contains X distance)
  3697. 01 : Distance between the two (X or Y coordinate, depending which one
  3698. is bigger. If they are equal, it contains X distance)
  3699. 02 : Contain a pointer used in the function to read table F776
  3700. A : It contains a value from F776 table. Seems to have a mean about
  3701. the distance between 2 object.
  3702. Y : See down here. NOTE: It's used by the function and seems to not
  3703. be used by the callers. It's a pointer on a table, for a value
  3704. which is used by the calling function.]
  3705. (Uses table F776, read from it with Y)
  3706. (Used by F6FD and F70F)
  3707.  
  3708. HERE IS HOW Y IS BUILD :
  3709.  
  3710. Y value (start from 00, and do steps in order) :
  3711. - Plus 01 if Y distance > X distance
  3712. - Plus 02 if (caller) at the right of (owner)
  3713. - Plus 04 if Y coordinate of (owner) < those of (caller)
  3714.  
  3715. * Multiply the numbers summed by 4
  3716.  
  3717. - Plus 01 if bigger distance divided by 2 is smaller than the smallest distance
  3718. - Plus 02 if bigger distance divided by 4 is smaller than the smallest distance
  3719.  
  3720.  
  3721. F776 : Table used by F71E. COntains a value which has meaning concerning the position
  3722. between 2 objects. Indexed by the Y of F776.
  3723. (Used by F71E)
  3724.  
  3725. F796 : Table : direction bits to choose from with a pointer (build with results of F71E)
  3726. for enemy going on Mega Man and circling over him. The pointer is build
  3727. from information about the position between two objects. From this information is
  3728. the value F71E return in A (value read from F776).
  3729. (Used by F7A6)
  3730. (Also used by FD17)
  3731. (Also used by Manta)
  3732.  
  3733. F7A6-F7D7 : Give information about the distance between Mega Man and the enemy...
  3734. Appear to be a really useful function!
  3735. Use by Wall Gun, enemies that make circle over Mega Man (like Lady Bug
  3736. Copter), and maybe others... Will be really useful when we know more.
  3737. Calls F6FD which load Mega Man's position datas, and then F71E
  3738. to calculate values this function uses to make enemy go toward Mega Man and then
  3739. circle over him.
  3740.  
  3741. (Uses table F796)
  3742. (Uses F6FD)
  3743.  
  3744. F7D8-F842 : Hit detection: MM - Object Walls
  3745. Return Value : Carry is set if Mega Man is on an object. Else, it's clear.
  3746. $01 : contains ID of object hit.
  3747.  
  3748. Important points :
  3749. $F822 : It's where it comes when there is a collision with an object.
  3750.  
  3751. F843-F899 : ??
  3752.  
  3753. F89A-F8BC : ? Return relative X coordinate between Megaman and object Y? (Sub of F7D8)
  3754. Relative X coordinate is returned in memory $10.
  3755.  
  3756. F8BD-F8F8 : I don't know what it does exactly, but has to do with calculating
  3757. vertical distance with MM. This is this function which is used
  3758. to calculate values which are used to put MM on/under object. (Sub of F7D8)
  3759. F8F9 : ??
  3760. F92E : Subtract Y coordinate pixels from MM if in contact with wall object.
  3761. F93F : Add Y coordinate pixels to MM if in contact with wall object.
  3762. Return value :
  3763. Carry Set :
  3764. Carry Clear
  3765.  
  3766. F95D-F9B3 : Hit detection : Megaman w/ Enemy Object.
  3767.  
  3768. Variables it uses :
  3769.  
  3770. Write Over :
  3771.  
  3772. $00
  3773. That's all!
  3774.  
  3775. (for Mega Man's shape, it's already set in the function. The value is the same
  3776. for everything, except sliding, which is checked by sprite ID (#$10 = sliding))
  3777.  
  3778. [Return value: 01 in the Carry Flag if there is no collision]
  3779. IMPORTANT NOTE : OBJECT NEED TO BE VISIBLE! (Bit 5 of Slot $0528,X)
  3780. ALSO, THIS DOESN'T CHECK IF THERE IS AN OBJECT IN SLOT X!
  3781.  
  3782. F9B4-F9F3 / 7F9C4-7FA03 : Hit detection : Megaman w/ Enemy Object - Shape Height (Y) Data
  3783. Value is in # of Pixels from center of Object.
  3784. (For total value, multiply by 2)
  3785. F9F4-FA33 / 7FA04-7FA43 : Hit detection : Megaman w/ Enemy Object - Shape Width (X) Data
  3786. Value is in # of Pixels from center of Object.
  3787. (For total value, multiply by 2)
  3788. Which entry is used in these two tables are referenced by the Object's shape bits.
  3789. These are bits 2-7 of the object's byte in the $408-$41F memory range.
  3790. That makes the byte pointer to both tables above.
  3791.  
  3792. NOTE : This function checks the difference between center of Mega Man and Enemy Object.
  3793. It compares the distance with the ones in the tables.
  3794.  
  3795. FA34-FA81 /7FA44-7FA91 : Collition Detect : Weapons with Enemies
  3796. [Arg: X = Enemy, Y = Weapon]
  3797. [Return value: 01 in the Carry Flag if there is no collision]
  3798. (Uses table FACE)
  3799. FA82 : Particle Hit Detection Check?
  3800. (00, 01, 02, E6, E7 <- input args. Returns by Carry : set if there is no collision.)
  3801.  
  3802. FABE-FACD : Max Object Slot of weapons for each Weapon ID. Used with collition detection with enemies. (Table of FA34)
  3803. FACE / 7FADE : Shape Height and Width Table (For Weapons)
  3804. For this weapons table, each Shapes are ordered in pairs of Object Height (Y) then Width (X).
  3805. Value is in # of Pixels from center of Object.
  3806.  
  3807. Pointers (to have it, take the Substance and Shape of the weapon, and multiply by 2)
  3808. 00 : Normal Shot, Drill Bomb
  3809. 04 : Medium Pharaoh Shot
  3810. 08 : Small Pharaoh Shot
  3811. 0A : Fully charged Pharaoh Shot
  3812.  
  3813. Note : For Enemy Shape Data, take their Substance and Shape value and make AND 3F.
  3814. Then you have the pointer for table FADC and FB1C
  3815. For more specific datas on Substance and Shape, such as which object used which, seek
  3816. Substance and Shape Explicits values
  3817.  
  3818. FADC : Shape Height Table - Enemies.
  3819. Value is in # of Pixels from center of Object.
  3820. (For total value, multiply by 2)
  3821. FB0A : Gachappon's Entry
  3822. FB1C : Shape Width Table - Enemies.
  3823. Value is in # of Pixels from center of Object.
  3824. (For total value, multiply by 2)
  3825. FB4A : Gachappon's Entry
  3826.  
  3827. FB5C-FB6B : Find Empty Enemy Object Slot (With X register, from $8 to $17) [Return vals: X = Obj slot]
  3828. FB6C-FB7B : Find Empty Enemy Object Slot (With Y register, from $8 to $17) [Return vals: Y = Obj slot, Carry = Result, Set if no empty obj slot could be found.]
  3829. FB7C-FB8B : Find Empty Object Slot (With Y register, from $5 to $17)
  3830.  
  3831. FB8C-FC13 / 7FB9C-7FC23 : Throw weapon directly on Mega Man. Sets the direction bits and speed,
  3832. so it goes on Mega Man with the same speed, in different direction.
  3833. [Arg: X = object to orient index]
  3834. [Ret val.: 0C = Direction bits of the object, so it goes on Mega Man. You have to set it,
  3835. after the call, the function doesn't do it. It sets the speed though.]
  3836. (Uses F6E6)
  3837.  
  3838. FC14-FC39 : Divide routine [
  3839. Arguments:
  3840. $00 = Argument 1, $01 = Argument 2
  3841. Return Values:
  3842. $02 : Result of Argument 1 ($00) divided on Argument 2 ($01).
  3843. $03 : Remainder of divide
  3844. ]
  3845.  
  3846. If divide by 0, Result 1 ($02) returns $FF, Result 2 ($03) returns value of Argument 2.
  3847.  
  3848. FC3A-FC7A : 16-bit Divide Routine
  3849. [Affects: $06, $07, $09 (Temp mem)
  3850. Arguments:
  3851. $00 : Argument 1 Low byte
  3852. $01 : Argument 1 High byte
  3853. $02 : Argument 2 Low byte
  3854. $03 : Argument 2 High byte
  3855. Return Values:
  3856. $04 : 8-bit Remainder of divide?
  3857. $05 : 8-bit Result (Argument 1 / Argument 2)
  3858. ]
  3859.  
  3860. FC7B-FC9D : Multiplication Routine - (Unused, not addressed from anywhere.)
  3861. [
  3862. Affects: $04 (temp)
  3863. Arguments:
  3864. $00, $01
  3865. Return Values:
  3866. $02 : 8-bit Result
  3867. $03 : ?? Affected if result overflows byte value, but is not High byte of 16-bit result.
  3868. ]
  3869.  
  3870. FC9E-FCBE : Set disable flag in $100-$11F range for stage's enemy/item.
  3871.  
  3872. [Hard-Wired Misc]
  3873.  
  3874. Data:
  3875. FCBF-FCC6 : Bit OR / AND table
  3876. FCC7-FCCE : Bit OR / AND table (Inverted bits)
  3877.  
  3878. ASM:
  3879.  
  3880. FCCF-FCE2 : Remove Properties of Object in Slot indexed by Y Register.
  3881. Those properties are, with Y index :
  3882. $300, $450, $5A0, $5B8 and put #$FF in $438.
  3883.  
  3884. FCE3-FD04 : Stores Banks, Calls $C421, $DB3A and $FF1C.
  3885. called while refilling Weapon Energy/Health.
  3886. FCE7 : JSR point from Wily Saucer Sequence (Bank $39, $9167)
  3887. FD05-FD16 : Store Banks to stack, Call $DABB (Scroll Graphics Load Handler)
  3888.  
  3889. FD17-FD44 : Subroutine used by Whale enemy's missile to set movement speed. Used by other enemies?
  3890. FD45-FD74 : Data.
  3891. FD45 : Low byte of speeds
  3892. FD5D : High byte of speeds
  3893.  
  3894. FD75-FD8D : Subtract Weapon Energy Routine
  3895.  
  3896. FD8E-FD9B / 7FD9E-7FDAB : Weapon Energy Depletion for Each Weapon ID
  3897.  
  3898. FD9C-FDCC : Init Boss Battle Music and set up other memory. - Called from Enemy ASM. Music played depends on stage.
  3899.  
  3900. FDCD-FDDD : Pre-Intro ASM Launcher - Changes bank and calls Pre-Intro ASM. Called from Startup ASM.
  3901. FDDE-FDE6 : Remove All Weapon/Gadget Objects (Removes Objects in Obj Slots 1-4.)
  3902.  
  3903. FDE7-FDFF : Unused random data.
  3904.  
  3905. [$FE00-$FFF9 Region]
  3906.  
  3907. ASM:
  3908. FE00-FEA4 : Boot-up asm from Reset Interrupt - Various Reseting / Initializing.
  3909. Continues into FEA5.
  3910. FEA5-FEEC : Multi-Thread Handler Loop.
  3911. FEED-FEFC : Register Thread.
  3912. Arguments:
  3913. A = Thread Slot. (0-3)
  3914. $93 = Start Address Low.
  3915. $94 = Start Address High.
  3916. FEFD-FF04 : Remove Thread (?). A register is Thread Slot. Unused Routine.
  3917. FF05-FF0E : Remove Thread - ??
  3918. FF0F-FF14 : Return [$91] * 4 in X.
  3919. JSR to FF11 : Return (A * 4) in X.
  3920. FF15-FF1B : Multi-frame Delay : # of Frames in X. (Calls FF1C multiple times.)
  3921. FF1C-FF36 : Thread Context Switch Call
  3922. Stores Thread status and goes to multi-thread handler. (FEA5).
  3923. After Vblank has occured, it returns back from the thread handler.
  3924. Joypad Memory is automatically refreshed before it returns.
  3925. This routine is called to do single-frame delay, among other things.
  3926.  
  3927. FF37-FF5B : Bankswitch Routine
  3928. [Usage: Set $F5 (Bank# $8000-$9FFF) or/and $F6 (Bank# $A000-$BFFF), then call this routine.]
  3929.  
  3930. FF5C-FFAC : Sound Refresh - Call Sound Init / Play Routines.
  3931. Called once every Vblank.
  3932.  
  3933. FFAD-FFB2 : Initial CHR Bank Setup from Reset.
  3934. FFB3-FFF9 : Unused random data.
  3935.  
  3936. [Interrupt Vectors]
  3937.  
  3938. FFFA-FFFB : NMI Vector
  3939. FFFC-FFFD : Reset Vector
  3940. FFFE-FFFF : IRQ Vector
  3941.  
  3942. Level Data
  3943. ==========
  3944.  
  3945. A000-A3FF : 16x16 Tile Data
  3946. A000-A0FF : Upper-Left 8x8 Tile
  3947. A100-A1FF : Upper-Right 8x8 Tile
  3948. A200-A2FF : Lower-Left 8x8 Tile
  3949. A300-A3FF : Lower-Right 8x8 Tile
  3950.  
  3951. Each 16x16 tile uses a byte in all 4 tables.
  3952.  
  3953. A400-A4FF : 16x16 Tile - Palette and Substance Data (Single byte for each entry.)
  3954. MSB
  3955. bit0-bit3 : Substance ID
  3956. bit6-bit7 : 4-color BG Palette
  3957. LSB
  3958.  
  3959. A500-A8FF : 32x32 Tile Data
  3960. Unlike 16x16 tile data, each entry is organized in groups of 4 bytes.
  3961. byte 1 : Upper-Left 16x16 Tile
  3962. byte 2 : Upper-Right 16x16 Tile
  3963. byte 3 : Lower-Left 16x16 Tile
  3964. byte 4 : Lower-Right 16x16 Tile
  3965.  
  3966. A900-B0FF : Screen Preset Data (Space for 32 Screen Presets)
  3967.  
  3968. B100-B17F : Stage Sprite Objects - Screen of Location
  3969. B180-B1FF : Stage Sprite Objects - X Coordinate of Location
  3970. B200-B27F : Stage Sprite Objects - Y Coordinate of Location
  3971. B280-B2FF : Stage Sprite Objects - Enemy ID
  3972.  
  3973. B300-B32F : Stage Sprite Object Count for each Screen
  3974. (Used for Mid-Points when setting enemy count back.)
  3975.  
  3976. B330-B4FF : Unused. (Random data)
  3977.  
  3978. B500-B52F : Screen Preset Order
  3979. B520-B52F : Normally not used, but some levels are more than 32 screens long. (Pharaoh Man's stage.)
  3980. B530-B53F : Scroll Data
  3981. B540-B54F : Special Scroll Data (Groups of 4 bytes.)
  3982.  
  3983. B550-B55F : Scroll Index : Stage BG Palette Set
  3984. B560-B56F : Scroll Index : Scroll Graphics Load ID
  3985.  
  3986. B570 : Boss Door Wrap Up - Nametable VRAM Address of Door Updates - High
  3987. B571 : Boss Door Wrap Up - Nametable VRAM Address of Door Updates - Low
  3988. (Note: This points to the bottom 16x16 Tile of the Door, the top left 8x8 tile
  3989. of that one, to be exact.)
  3990. B572-B575 : Boss Door Wrap Up - Which 16x16 Tiles to draw in place of the boss door.
  3991. B576 : Boss Door Wrap Up - Attribute Table (Palette) Updates - 32x32 Tile of Door Updates (0 to $3F)
  3992. B577 : Boss Door Wrap Up - Attribute Table (Palette) Updates - 16x16 Tile of Door Updates (0 to 3)
  3993. (This also points to the bottom 16x16 Tile of the door.)
  3994. B578-B57B : Boss Door Wrap Up - Attribute Table OR Data for each 16x16 Tile.
  3995.  
  3996. B57C-B587 : Boss Door Wrap Down Data. (Should be similiar to wrap-up data)
  3997.  
  3998. B590-B61B-> : Stage BG Palette Sets
  3999. B61B is the maximum byte used in Megaman 4 for palette sets, but its safe to use
  4000. data past that, until B6FF.
  4001.  
  4002. B61C-B6FF : Unused.
  4003.  
  4004.  
  4005. Tutorial for Sprite Banks
  4006. =========================
  4007. To explain it, let's take the sprite 10 from Sprite Bank 3 (Ring Man's Ring)
  4008.  
  4009. BEFORE ANIMATION
  4010.  
  4011. You must first add this value (Sprite ID : 10) to both ROM address
  4012. Animation - Address Table Low
  4013. Animation - Address Table High
  4014. of Sprite Bank 3, whiwh are 1FE10 (Low) and 1FF10 (High) to obtain the address of it's animaton
  4015. You find at 1FE20 (Low) D1 and at 1FF20 (High) B5 which makes B5D1.
  4016. This is the RAM address where is the Animation.
  4017. Since we are looking for it in the ROM, you must add it to 14010 if it's in Sprite Bank 3,
  4018. C010 if it's Sprite Bank 1, 10010 if it's Sprite Bank 2 and 64010 if it's Sprite Bank 4. Let's
  4019. call those the "Adjust Values".
  4020. Our pointer, in this case, is 1F5E1. We are now at the animation datas
  4021.  
  4022. ANIMATION
  4023.  
  4024. Byte 0 : The number of animation (00 being 1 animation... Also, if value is bigger or equal to
  4025. 80, you'll have to add 100 to the Tile Usage pointers.
  4026. Byte 1 : The delay between animations.
  4027. Byte following : Tile Usage pointers, they are used to know where is the Tile Usage.
  4028.  
  4029. To find your Tile Usage, you need to add the Tile Usage Pointers to the following datas
  4030. Tile Usage - Address Table Low (1F810 for Sprite Bank 3)
  4031. Tile Usage - Address Table High (1FA10 for Sprite Bank 3)
  4032. and do the same process as done in the first step, with the same "Adjust Value".
  4033. Let's do it with Tile Usage pointer 26. With 82 as High and F4 as Low, when adding it to 14010,
  4034. you shall obtain 1C304. Let's go there.
  4035.  
  4036. TILE USAGE
  4037.  
  4038. Byte 0 : The number of tiles (00 being 1 tile)
  4039. Byte 1 : The Coordinate Pointer (for all the tiles, coordinate will be applied with the
  4040. same order as the tiles are given here).
  4041. Byte followings : By groups of two :
  4042. First : The tile to load from the Pattern Table (PPU viewer with emulator
  4043. FCEUXD)
  4044. Second: Byte composed of bits with signification.
  4045. bit 7 : If set, make a Horizontal Flip of the Tile.
  4046. bit 6 : If set, make a Vertical Flip of the Tile.
  4047. bit 5 : If set, tile is behind background.
  4048. bit 4 : Never seem to be use. If it has a use, it's unknown.
  4049. bit 3 : Never seem to be use. If it has a use, it's unknown.
  4050. bit 2 : Never seem to be use. If it has a use, it's unknown.
  4051. bit 0 & 1 : Their value, as Hex, is used to know which palet to
  4052. use to color this tile (from 0 to 3). They defined
  4053. set of palets loaded in the RAM of the game.
  4054.  
  4055. COORDINATE
  4056.  
  4057. With the Coordinate Pointer of the Tile Usage (Byte 1), use those table
  4058. Coordinate Data - Address Table Low (1FC10 for Sprite Bank 3)
  4059. Coordinate Data - Address Table High (1FD10 for Sprite Bank 3)
  4060. to obtain 996E with our current example, and add it to the "Adjust Value" of Sprite Bank 3,
  4061. to obtain 1D97E.
  4062. There, the datas are this way, by group of 2 (2 Byte for each tile). Apply the coordinate
  4063. to the tiles with the same order they are shown.
  4064.  
  4065. Byte 0 : Y position from the center of object.
  4066. Byte 1 : X position from the center of object.
  4067. NOTE : Coordinates from FF to 80 are negative, starting with -1 as FF. 00 to 7F are positives.
  4068. Negative is left on X coordinates, and up on Y coordinates.
  4069.  
  4070. That's about it! Coordinates pointers may be used by more than one Tile Usage. Especially
  4071. paterns which are common, like squares. The only Tile Usage which are used for more than
  4072. one animation are the Empty ones.
  4073.  
  4074. Object ID List
  4075. ==============
  4076.  
  4077. Total number of Object ID's is $D0. Megaman 4 does not support more.
  4078. "u" is noted for unused Id.
  4079.  
  4080. 01 : Megaman.
  4081. 02 : Buster Shots.
  4082. 03 : Weapon Shots - After having been deflected off enemies.
  4083. 04 : Rush Coil/Marine/Jet.
  4084. 05 : Rain Flush
  4085. 06 : Balloon Adaptor
  4086. 07 : Dive Missile
  4087. 08 : Ring Boomerang
  4088. 09 : Drill Bomb
  4089. 0A : Dust Crusher
  4090. 0B : Wire Adaptor
  4091. 0C : Pharaoh Shot (Shot)
  4092. 0D : Pharaoh Shot (Being Charged)
  4093. 0Eu: Unused.
  4094. 0F : Skull Barrier
  4095. 10 : Ladybug Copter (Enemy ID $00)
  4096. 11 : Ladybug Copter - Dropped Propel.
  4097. 12 : Hover (Enemy ID $01)
  4098. 13 : Slinky (Enemy ID $02)
  4099. 14 : Scorpion
  4100. 15 : Scorpion - Controller/Generator (Enemy ID $03)
  4101. 16 : Grasshopper (Enemy ID $04)
  4102. 17u: Jet Bird - Unused.
  4103. 18 : Jet Bird (Enemy ID $05)
  4104. 19 : Jet Bird Children
  4105. 1A : Wall Gun (Enemy ID $06/$07)
  4106. 1B : Wall Gun's Bullet
  4107. 1C : Lightbulb Guy (Enemy ID $10)
  4108. 1D : Lightbulb Guy - Flare Capsule
  4109. 1E : Lightbulb Guy - Flare
  4110. 1F : Rat (Enemy ID $11)
  4111. 20 : Ring Man Rainbow Bar A/2A (Enemy ID $8/$C)
  4112. 21 : Ring Man Rainbow Bar B/2B (Enemy ID $9/$D)
  4113. 22 : Ring Man Rainbow Bar C/2C (Enemy ID $A/$E)
  4114. 23 : Ring Man Rainbow Bar D/2D (Enemy ID $B/$F)
  4115. 24 : Hippo's nose (Enemy ID $18)
  4116. 25 : Hippo's Missile
  4117. 26 : Hippo - platform block (Enemy ID $1A)
  4118. 27 : Handler when Wily battle finished in Wily Stage 3.
  4119. 28 : Wall (Enemy ID $29/$2A/$2B)
  4120. 29 : Handler after Cossack Stage 1 & 2 Boss defeated. / And Wily Stage 1 & 2 Boss defeated. (Changed to $29 from previous ID.)
  4121. 2A : Energy Circling around Megaman after Boss defeated.
  4122. 2B : Snailbot (Toad Man stage miniboss) (Enemy ID $1E)
  4123. 2C : Snailbot's Bomb
  4124. 2D : Snaibot - Defeat Handler
  4125. 2E : Fragments of Defeated Boss.
  4126. 2F : Bright Man Stage Platform - Red (Enemy ID $28)
  4127. 30 : Ring Miniboss (Enemy ID $12)
  4128. 31 : Ring Miniboss - Ring seperation handler
  4129. 32 : Ring Miniboss - rings (seperated body)
  4130. 33 : Fly (Enemy ID $13)
  4131. 34 : Fly's Dropped Bullet
  4132. 35 : Umbrella Metool (Enemy ID $14)
  4133. 36 : Umbrella Metool - Umbrella Projectile
  4134. 37 : Fireworks Guy (Enemy ID $15)
  4135. 38 : Fireworks Guy - Fireworks Capsule
  4136. 39 : Hover : Bullets shot
  4137. 3A : Ring Miniboss - Defeat handler
  4138. 3B : Drill Bomb - Explosion State (Set to $3B from $09.) (Also used with Cossack stage 1 boss)
  4139. 3C : Explosion(s).. (Set to when Ring Miniboss is defeated). (Also when Snailbot is defeated)
  4140. 3D : Spinner (Enemy ID $2D)
  4141. 3E : Super ball machine (Enemy ID $3E/$3F)
  4142. 3F : Super ball machine - Balls
  4143. 40 : Falling Rock - controller (Enemy ID $30)
  4144. 41 : Falling Rock - smaller pieces
  4145. 42 : Eddie (walking) (Enemy ID $31)
  4146. 43 : Eddie (not walking) (Enemy ID $32)
  4147. 44 : Eddie - Item given by Eddie (Not $C1)
  4148. 45 : Cossack stage 3 boss (Cockroach Twins) (Enemy ID $1C)
  4149. 46 : Jumbig (Enemy ID $33)
  4150. 47u: Unused. - ASM at $9F85 in bank $3A, already used by something else.
  4151. 48 : Shield Attacker (Enemy ID $34)
  4152. 49 : Cossack stage 3 boss - Handler - Initialize 2nd Cockroach Twin
  4153. 4A : Cossack stage 3 boss - Handler - Cockroach twins defeated
  4154. 4B : Hippo - Used when defeated
  4155. 4C : Lightbulb Guy - After shot - Takes care of initializing auto palette fade down
  4156. 4D : Wily Stage 4 Battle - Swirls, Enemy ID $1D (Enemy ID $1D is never used however)
  4157. 4E : Totempole (Enemy ID $36)
  4158. 4F : Totempole's Bullet
  4159. 50 : Walking Metool (Enemy ID $3B)
  4160. 51 : Metool's Bullets
  4161. 52 : Whale miniboss (Enemy ID $38)
  4162. 53 : Whale's Missile
  4163. 54 : Whale's Mines
  4164. 55u: Unused. - RTS at $ACFC in bank $3D.
  4165. 56 : Jumping Metool (Enemy ID $3C)
  4166. 57u: Unused. (Enemy ID $3D) - Bank $3D, $AD0C.
  4167. 58u: Unused. (Enemy ID $3E) - Bank $3D, $AD0C.
  4168. 59u: Unused. (Enemy ID $3F) - Bank $3D, $AD0C.
  4169. 5Au: Unused. (Enemy ID $40) - Bank $3D, $AD0C.
  4170. 5B : Drill Man's stage Switch (Enemy ID $41)
  4171. 5C : Spinning Metool (Enemy ID $42)
  4172. 5D : Cossack stage 3 platforms (Enemy ID $6A)
  4173. 5E : Dust Man up/down ceiling handler
  4174. 5F : M422A (Enemy ID $45)
  4175. 60 : Block Platform (Enemy ID $80), Shuffled Block, General (Used as general Object ID at ending, credits, and during intro scenes.) (Sprite Bank $A/$B)
  4176. 61 : Amoeba (Enemy ID $47)
  4177. 62 : Skeleton Joe (Enemy ID $48)
  4178. 63 : Skeleton Joe - Bone
  4179. 64 : Saturn Bot (Enemy ID $49)
  4180. 65 : Water Metool (Enemy ID $4A)
  4181. 66 : Water Air Bubbles.
  4182. 67 : Used with Wily Stage 1 Boss - ASM pointer refers to RTS ($8824) (Enemy ID $2C, $6D)
  4183. 68u: Unused.
  4184. 69 : Skullmet (Enemy ID $46/$4B)
  4185. 6A : Skullmet's Bullet
  4186. 6B : Dive Man's stage - Wavering water effect 1 (Enemy ID $16)
  4187. 6C : Dive Man's stage - Wavering water effect 2 (Enemy ID $17)
  4188. 6D : Helipon (Enemy ID $4C)
  4189. 6E : Helipon's Bullet
  4190. 6F : Water Splash
  4191. 70 : Piranha (Enemy ID $4D)
  4192. 71 : Skull Man
  4193. 72 : Skull Man's Bullets
  4194. 73 : Assembling Block (Enemy ID $4F)
  4195. 74 : Assembling Block - 16x16 pixel blocks.
  4196. 75 : Ring Man
  4197. 76 : Ring Man's Ring Boomerangs
  4198. 77 : Explosion? (Handler after Robot Master defeated)
  4199. 78 : Wall Wheel (Enemy ID $51/$52)
  4200. 79 : Dust Man
  4201. 7A : Dust Man's Dust Crusher (Big)
  4202. 7B : Dust Man's Dust Crusher (Smal)
  4203. 7C : Dive Man
  4204. 7D : Dive Man's Dive Missile
  4205. 7E : Drill Man
  4206. 7F : Drill Man's Drill Bomb
  4207. 80 : General - (Object ASM $8823). Known to be used to make the small explosion when an enemy dies, only when enemy dies with the "Kill Enemy Procedure"
  4208. 81 : Skull Man's Skull Barrier / General Id (Robot Master Credits - Robot Master sprites) (Sprite Bank $E/$F)
  4209. 82 : Used in Drill Man Boss Battle.
  4210. 83 : Multiple Explosions
  4211. 84 : Pharaoh Man
  4212. 85 : Pharaoh Man - Pharaoh Shot
  4213. 86 : Pharaoh Man - Normal shots
  4214. 87 : Cossack stage 1 boss (Enemy ID $57)
  4215. 88 : Cossack stage 1 boss - rod (Enemy ID $58)
  4216. 89 : Cossack stage 1 boss - eyes (Enemy ID $59)
  4217. 8A : Cossack stage 1 boss - bullet
  4218. 8B : Bright Man
  4219. 8C : Bright Man's Bullets
  4220. 8D : Toad Man
  4221. 8E : Battonton (Enemy ID $5C)
  4222. 8F : Cossack stage 1 boss - debris
  4223. 90 : Triggered after Whale miniboss. (Bank: 3D, Addr: A5D3)
  4224. 91 : Mantan (Enemy ID $5D)
  4225. 92 : Cossack battle - Cossack sprite (Enemy ID $5E)
  4226. 93 : Cossack battle - cranes (Enemy ID $5F)
  4227. 94 : ??? (Only movement) (Bank: 3D, Addr: BA8B)
  4228. 95 : Cossack stage 2 boss - eye (Enemy ID $61)
  4229. 96 : Cossack stage 2 boss - platforms (Enemy ID $62)
  4230. 97 : ??? (Only movement) (Bank: 3D, Addr: BA8B)
  4231. 98 : Falling Rock - Rock falling down
  4232. 99 : Cossack stage 2 boss - walls (Enemy ID's $63-$66)
  4233. 9A : Mummy Mauler (Enemy ID $67)
  4234. 9B : Mummy Mauler - Thrown Head
  4235. 9C : Worm (Enemy ID $68)
  4236. 9D : Pickups dropped by enemies / explosion after Enemy is killed.
  4237. 9E : Cossack Stage 3 Boss (Enemy ID $69)
  4238. 9F : Cossack Stage 3 Boss - Heavy Shot
  4239. A0 : Cossack Stage 3 Boss - Bullets
  4240. A1 : Mono-Roader (Enemy ID $6B)
  4241. A2 : Cossack Stage 3 Boss (Cockroach Twin #2)
  4242. A3 : Cossack Defeated Scene - Kalinka
  4243. A4 : Cossack Defeated Scene - Protoman
  4244. A5 : Cossack Defeated Scene - Dr.Wily
  4245. A6 : Wily Stage 1 Boss - eyes (Enemy ID $6C)
  4246. A7 : Gachappon (Enemy ID $6E)
  4247. A8 : Gachappon's Fast Bullets
  4248. A9 : Gachappon's Bomb
  4249. AA : Wily Stage 1 Boss - Metools.
  4250. AB : Wily Stage 2 Boss - Controller
  4251. AC : Wily Stage 2 Boss - Boss Substance (Enemy ID $1B)
  4252. AD : Wily Stage 2 Boss - Ball
  4253. AE : Wily Stage 2 Boss - Flame shot
  4254. AF : Wily Stage 2 Boss - Platforms
  4255. B0 : Pakatto 24 (Enemy ID $72)
  4256. B1 : Pakatto 24's Bullets
  4257. B2 : Upndown
  4258. B3 : Warp (Enemy ID $74)
  4259. B4 : Upndown - Controller (Enemy ID $73)
  4260. B5 : Spike Block (Enemy ID $75 and $76)
  4261. B6 : Water Mine (Enemy ID $77)
  4262. B7 : Spark Spine (Enemy ID $78)
  4263. B8 : Robot Master Boss Controller (Enemy ID $79)
  4264. B9 : Skull Dropper (Enemy ID $4E)
  4265. BA : Moving Skull (Generated by Skull Dropper)
  4266. BB : Wily Stage 3 Battle (Enemy ID $50) - Points to 8824.
  4267. BC : Wily Stage 3 Battle (Enemy ID $53)
  4268. BD : Spike Box from Right - Controller (Enemy ID $54)
  4269. BE : Spike Box
  4270. BF : Wily Stage 3 Battle - Shots
  4271. C0 : Wily Stage 3 Battle - Second form - Something!
  4272. C1 : General pickup controller (E-Tank, Health and Weapon Energy Capsules) (Note: Not items dropped by enemies)
  4273. C2 : Balloon Item and Wire Item Capsules
  4274. C3 : Wily stage 1 Shuffled blocks (Enemy ID $35)
  4275. C4 : Wily Stage 4 Battle
  4276. C5 : Wily Stage 4 Battle - Charged Shot
  4277. C6 : Big Energy Capsule dropped by robot masters in rematch battles.
  4278. C7 : Ladder Press Right (Enemy ID $84)
  4279. C8 : Fireworks Guy - Object placed when shot, splits into fireworks and smal explosion.
  4280. C9 : Bright Man Stage Platform - Green (Enemy ID $82)
  4281. CA : Ladder Press Left (Enemy ID $81)
  4282. CB : Wily Stage 4 - Wily Sprite
  4283. CC : Drill Man Boss Battle - Clouds when Drill Man drills into/out of ground.
  4284. CD : Snailbot (Toad Man stage miniboss) - top (Enemy ID $1F)
  4285. CE : Spike Box from Left - Controller (Enemy ID $85)
  4286. CF : Dive Man stage floating spikes
  4287.  
  4288. Sprite ID List
  4289. ==============
  4290.  
  4291. An "u" after the ID means that the listed Sprite ID is unused for that bank.
  4292. "?" means im not sure if its really unused or not.
  4293.  
  4294. Sprite Bank 1 (MMC3 Banks $A/$B) Sprite ID's:
  4295. ---------------------------------------------
  4296.  
  4297. 01 : Intro : Fourth Screen (MM on train) - Face 1 (Sad mouth)
  4298. 02 : Intro : Fourth Screen (MM on train) - Face 2 (Normal mouth)
  4299. 03 : Intro : Fourth Screen (MM on train) - Face 3 (Determined face)
  4300. 04 : Intro : Fourth Screen (MM on train) - Face 4 (Putting helmet)
  4301. 05 : Intro : Fourth Screen (MM on train) - Body 1 (Standing)
  4302. 06 : Intro : Fourth Screen (MM on train) - Body 2 (Lifting fist)
  4303. 07 : Intro : Second Screen (MM in Machine) - Body (Pelvis region)
  4304. 08 : Intro : Second Screen (MM in Machine) - Face 2 (Pain animation)
  4305. 09 : Intro : Third Screen (MM waking up) - Face 2 (Opening eyes)
  4306. 0A : Intro : First Screen (City) - Explosion 1
  4307. 0B : Intro : First Screen (City) - Explosion 2
  4308. 0C : Intro : First Screen (City) - Explosion 3
  4309. 0D : Intro : Fourth Screen (MM on train) - Tunnel lights
  4310. 0E : Wheeled Skull (front)
  4311. 0F : Wheeled Skull (moving)
  4312. 10 : Skull Dropper
  4313. 1B : ???
  4314. 1C : Spike Box
  4315. 1D : ???
  4316. 33 : Intro : Second Screen (MM in Machine) - Face 1 (Normal)
  4317. 34 : Intro : Third Screen (MM waking up) - Face 1 (Eyes closed)
  4318. 35 : Intro : Fourth Screen (MM on train) - Face 5 (Helmet on)
  4319. 36 : Intro : Fourth Screen (MM on train) - Body 3 (Fist raised)
  4320. 37 : Intro : Third Screen (MM waking up) - Face 3 (Eyes opened)
  4321. 38 : Intro : Second Screen (MM in Machine) - Face 3 (Eyes closed)
  4322.  
  4323.  
  4324.  
  4325. 39 : First of unused pointers
  4326.  
  4327. Sprite Bank 2 (MMC3 Banks $C/$D) Sprite ID's:
  4328. ---------------------------------------------
  4329.  
  4330. 01 : MM - Standing
  4331. 02 : MM - Aiming
  4332. 03 : MM - Unleashing object
  4333. 04 : MM - Walking
  4334. 05 : MM - Aiming while walking
  4335. 06 : MM - Unleashing object (looks same as 03, use unknown)
  4336. 07 : MM - Jumping
  4337. 08 : MM - Aiming while jumping
  4338. 09 : MM - Unleashing object while jumping
  4339. 0A : MM - Climing ladder
  4340. 0B : MM - Aiming while climbing ladder
  4341. 0C : MM - Unleashing object while climbing ladder
  4342. 0D : MM - Step forward
  4343. 0E : MM - Aiming (same as 02, use unknown)
  4344. 0F : MM - Unleashing object (same as 03, use unknown)
  4345. 10 : MM - Sliding
  4346. 11 : MM - Getting hit (with explosion)
  4347. 12 : "Clouds" when MM gets hit.
  4348. 13 : MM - Warp animation
  4349. 14 : MM - Reaching top of ladder
  4350. 15 : MM - Aiming while climbing ladder (same as 0B, used if shooting when "reaching top of ladder")
  4351. 16 : MM - Unleashing object while climbing ladder (same as 0C, used if shooting when "reaching top of ladder")
  4352. 17 : Slide dust cloud
  4353. 18 : Normal Buster Shot
  4354. 19u: Big Explosion
  4355. 1Au: Big Health Capsule
  4356. 1Bu: Smal Health Capsule
  4357. 1Cu: Big Weapon Capsule
  4358. 1Du: Smal Weapon Capsule
  4359. 1Eu: E-Tank
  4360. 1Fu: Extra Life
  4361. 20 : Full Charged Shot - Release Form
  4362. 21 : Smal Charged Shot
  4363. 22 : Full Charged Shot - Deflected off enemy
  4364. 23 : Full Charged Shot
  4365. 24 : Rush Jet
  4366. 25 : Rush Coil
  4367. 26 : Rush Marine (Not in operation)
  4368. 27 : Rush Marine (Combining with Megaman)
  4369. 28u: Rush Marine (Without waves behind propel - unused.)
  4370. 29 : Rush Marine (In operation)
  4371. 2A : Rush Marine (Aiming buster)
  4372. 2B : Rush Marine (Getting hit)
  4373. 2Du: Water splash - same data as 2E.
  4374. 2E : Water splash
  4375. 32 : MM - Warp animation (same as 13, use unknown)
  4376. 33 : "Ready"
  4377. 35 : Medium Explosion
  4378. 36 : Rain Flush capsule
  4379. 37 : Rain Flush capsule B
  4380. 3E : Balloon Item
  4381. 3F : Balloon Item (Megaman On Top)
  4382. 40-44 : Dive Missile
  4383. 40 : Up
  4384. 41 : Up-Left/Right
  4385. 42 : Left/Right
  4386. 43 : Down-Left/Right
  4387. 44 : Down
  4388. 45 : Ring Boomerang
  4389. 46 : Drill Bomb
  4390. 47 : Pharaoh Shot A (small)
  4391. 48 : Pharaoh Shot B (half charged)
  4392. 49 : Pharaoh Shot C (charged)
  4393. 4A : Dust Crusher
  4394. 4B : Dush Crusher, small piece
  4395. 4C : Dush Crusher, small piece
  4396. 4D : Dush Crusher, small piece
  4397. 4E : Dush Crusher, small piece
  4398. 4F : Charging Pharaoh Shot
  4399. 50 : Skull Barrier
  4400. 51 : Wire Item Capsule
  4401. 52 : Balloon Item Capsule
  4402. 53-60u : ? Has its own data.
  4403. 64-6Bu : Same data as $6C.
  4404. 6E : Cossack Battle - Cossack Catcher "cranes"
  4405. 71 : Dr.Wily (After Cossack battle)
  4406. 72?: Dr.Wily - Talking, pointing finger (unused?)
  4407. 74 : Kalinka
  4408. 75?: Kalinka - Talking (unused)
  4409. 76 : Dr. Cossack (After battle)
  4410. 77?: Dr. Cossack - Talking (unused)
  4411. 78 : Warping (Dr.Wily and Protoman after Cossack battle)
  4412. 79 : Protoman
  4413. 7A : Cossack Sprite (Battling Megaman)
  4414. 83 : Cossack Battle - Cossack Catcher lamps.
  4415. 89 : Wily's Saucer flying into distance
  4416. 8A : Wily's Saucer flying
  4417. 8B : Wily's Saucer - Opening Up (Top)
  4418. 8C : Wily'S Saucer - Opening Up (Bottom)
  4419.  
  4420. AA : MAY BE THE FIRST OF UNUSED POINTERS
  4421.  
  4422. B0-FFu: Unused, has no pointers.
  4423.  
  4424. Sprite Bank 3 (MMC3 Banks $E/$F) Sprite ID's:
  4425. ---------------------------------------------
  4426. Sprite ID range: 00-6F
  4427.  
  4428. 01-06 : Skull Man Sprites
  4429. 01 : Skull Man's Skull Barrier
  4430. 02 : Skull Man standing
  4431. 03 : Skull Man Walking
  4432. 04 : Skull Man creating Skull Barrier
  4433. 05 : Skull Man Shooting
  4434. 06 : Skull Man Jumping
  4435. 07 : Mothraya Eyes
  4436. 08 : Bullet - Used with Skull Man and Bright Man and other bosses.
  4437. 09-11 : Ring Man Sprites (Except 0E)
  4438. 09 : Ring Man Standing
  4439. 0A : Ring Man Walking
  4440. 0B : Ring Man Walking, Throwing Ring
  4441. 0C : Ring Man Jumping/Falling
  4442. 0D : Ring Man Throwing Ring in Air
  4443. 0F : Ring Man's sparkling helmet
  4444. 10 : Ring Man's Ring
  4445. 11 : Ring Throwing
  4446. 0E : Mothraya : The light flashing on his red button
  4447. 12-1C : Dust Man Sprites (Except 16)
  4448. 12 : Standing
  4449. 13 : Preparing Dust Crusher
  4450. 14 : Jumping Up
  4451. 15 : Preparing for sucking attack
  4452. 17 : Dust Crusher (Composed)
  4453. 18 : Dust Crusher (Smal piece)
  4454. 19 : Dust Crusher (Smal piece 2)
  4455. 1A : Dust Crusher (Smal piece 3)
  4456. 1B : Dust Crusher (Smal piece 4)
  4457. 1C : Doing sucking attack
  4458. 16 : Mothraya (Cossack Stage 1 Boss) Rod
  4459. 1D-28 (excluded 25 & 27) : Dive Man Sprites
  4460. 1D : Shooting Dive Missile
  4461. 1E : Propelling through - Preparing
  4462. 1F : Dive missile Left/Right
  4463. 20 : Dive missile Up
  4464. 21 : Dive missile Down
  4465. 22 : Dive missile Down Left/Right
  4466. 23 : Dive missile Up Left/Right
  4467. 24 : Standing.
  4468. 25 : Unused. Points at same data of 26.
  4469. 26 : Propelling through
  4470. 27 : Unused : against Mothraya, it's a sprite for fire from his back. However, he doesn't use it.
  4471. 28 : Tilting forward
  4472. 29-33 (excluded 32) : Drill Man Sprites
  4473. 29 : Standing
  4474. 2A : Standing, facing screen
  4475. 2B : Drill into ground - Dust Cloud
  4476. 2C : Standing, facing screen - Rotating drills
  4477. 2D : Fast Jumping up
  4478. 2E : Drilling into ground
  4479. 2F : Jumping
  4480. 30 : Running
  4481. 31 : Shooting
  4482. 33 : Drill Man's Drill Bomb.
  4483. 32 : Bullet shot by Mothraya and second Cockroach Twin.
  4484. 34-35 & 37 & 38 : Bright Man Sprites
  4485. 34 : Standing
  4486. 35 : Jumping
  4487. 37 : Doing Flash
  4488. 38 : Aiming
  4489. 36 : Rush Animation sprite in Weapon Get
  4490. 39-40 : Pharaoh Man Sprites
  4491. 39 : Standing
  4492. 3A : Charging Pharaoh Shot
  4493. 3B : Jumping (facing Left)
  4494. 3C : Jumping, throwing smal shot (facing Left)
  4495. 3D : Jumping (facing Right)
  4496. 3E : Jumping, throwing smal shot (facing Right)
  4497. 3F : Pharaoh Shot
  4498. 40 : Smal Pharaoh Shot
  4499. 41-43 : Toad Man Sprites
  4500. 41 : Toad Man Standing
  4501. 42 : Toad Man Jumping
  4502. 43 : Toad Man Rain Dance
  4503.  
  4504. 44 : Boss Demo - Bright Man
  4505. 45 : Boss Demo - Toad Man
  4506. 46 : Boss Demo - Drill Man
  4507. 47 : Boss Demo - Pharaoh Man
  4508. 48 : Boss Demo - Ring Man
  4509. 49 : Boss Demo - Dust Man
  4510. 4A : Boss Demo - Dive Man
  4511. 4B : Boss Demo - Skull Man
  4512.  
  4513. 4C : Mothraya - Debris 1 when breaking floor
  4514. 4D : Mothraya - Debris 2 when breaking floor
  4515. 4E : Mothraya - Debris 3 when breaking floor
  4516. 4F : Mothraya - Debris 4 when breaking floor
  4517.  
  4518. 50-5F : Cossack Stage 3 boss (Cockroach twins) sprites
  4519. 50 : Walking (bottom wall)
  4520. 51 : Wall turn - bottom wall to left wall
  4521. 52 : Walking (left wall)
  4522. 53 : Wall turn - left wall to top wall
  4523. 54 : Walking (top wall)
  4524. 55 : Wall turn - top wall to right wall
  4525. 56 : Walking (right wall)
  4526. 57 : Wall turn - right wall to bottom wall
  4527. 58 : Aiming (at bottom wall)
  4528. 59 : Aiming/Ducking (at bottom wall)
  4529. 5A : Aiming (at left wall)
  4530. 5B : Aiming/Ducking (at left wall)
  4531. 5C : Aiming (at top wall)
  4532. 5D : Aiming/Ducking (at top wall)
  4533. 5E : Aiming (at right wall)
  4534. 5F : Aiming/Ducking (at right wall)
  4535.  
  4536. 60 : Gachappon
  4537. 61 : Gachappon (Launching ball from top)
  4538. 62 : Gachappon (Shooting bullet)
  4539. 63 : Gachappon's Ball
  4540. 64 : Mantan (Wide)
  4541. 65 : Mantan (Narrow)
  4542. 66 : Mantan (Smal)
  4543. 67 : Mono-Roader (Normal)
  4544. 68 : Mono-Roader (Rotating)
  4545. 69 : Battonton (Hiding)
  4546. 6A : Battonton (Starting to move)
  4547. 6B : Battonton (Flying)
  4548. 6C : Battonton (Going back to hiding)
  4549. 6D : Sinking Platform.
  4550. 6E : Toad Man Sprite (Use unknown)
  4551.  
  4552.  
  4553. 70 : First of Unused Pointers
  4554.  
  4555. Sprite Bank 4 (MMC3 Banks $36/$37) Sprite ID's:
  4556. -----------------------------------------------
  4557.  
  4558. Sprite ID's / Animation Address Table Index:
  4559. 01 : Ladybug Copter (Flying)
  4560. 02 : Ladybug Copter (Circling)
  4561. 03 : Ladybug Copter (Circling - slower)
  4562. 04 : Ladybug Copter (Propel)
  4563. 05 : Hover (MM not on)
  4564. 06 : Hover (MM on)
  4565. 07 : Hover (Air clouds)
  4566. 08 : Hover (Same as 06?)
  4567. 09 : Spinner (Onto ceiling)
  4568. 0A : Spinner (Ready to spin)
  4569. 0B : Spinner (Spinning)
  4570. 0C : Hippo (Nose)
  4571. 0D : Hippo (Ears)
  4572. 0Eu: Unused 1 (Smal sprite) (Correction - Might be Hippo's Missile)
  4573. 0Fu: Unused 2 (Some 16x16 animated sprite) (Correction - Might be Hippo's Missile)
  4574. 11u: Unused 3 (Some 16x16 animated sprite) (Correction - Might be Hippo's Missile)
  4575. 12u: Unused 4 (Smal sprite) (Correction - Might be Hippo's Missile)
  4576. 13 : Slinky (One block down)
  4577. 14 : Scorpion (Walking)
  4578. 15 : Scorpion (Digging down into ground)
  4579. 16u: Unused ID in this bank, Same data as $17.
  4580. 18 : General Bullet?
  4581. 19 : Explosion
  4582. 1A : Big Health Capsule
  4583. 1B : Smal Health Capsule
  4584. 1C : Big Weapon Capsule
  4585. 1D : Smal Weapon Capsule
  4586. 1E : Extra Life
  4587. 1F : E Tank
  4588. 20u: Unused ID in this bank, Same data as $21.
  4589. 21 : Small Wall
  4590. 22u: Unused 5 (Could be Enemy ID $2A's sprite.. or a copy of it.)
  4591. 23u: Unused 6 (Could be Enemy ID $2B's sprite.. or a copy of it.)
  4592. 24u: Unused 7 (Some animated block.. uses enemy sprite tiles.)
  4593. 25u: Unused 8 (Some small un-animated sprite..)
  4594. 26u: Unused 9 (Unused sprite: Rolling ball-something!)
  4595. 27u: Unused 10 (Unused enemy sprite: Snake!)
  4596. 28u: Unused 11 (Some animated block.. also uses enemy sprite tiles.)
  4597. 29 : Rainbow Bar
  4598. 2A : Rainbow Bar (2nd Variant)
  4599. 2B : Fireworks Guy (Walking)
  4600. 2C : Fireworks Guy (Jumping)
  4601. 2Du: Unused ID in this bank, Same data as $2E.
  4602. 2F : Jet Bird
  4603. 30 : Jet Bird (Same as 2F?)
  4604. 31 : Jet Bird Child (Forward)
  4605. 32 : Jet Bird Child (Down)
  4606. 33 : Jet Bird Child (Forward-Down)
  4607. 34?: Unused? 12 - Jet Bird Child (Up)
  4608. 35?: Unused? 13 - Jet Bird Child (Forward-Up)
  4609. 36 : Snailbot's Eyes
  4610. 37 : Snailbot - "Thing" on the back.
  4611. 38 : Snailbot - Launch opening on top.
  4612. 39?: Unused 14? (Snailbot's Bomb)
  4613. 3A : Wall Gun - Direction 1
  4614. 3B : Wall Gun - Direction 1 (Aiming)
  4615. 3C : Wall Gun - Direction 2
  4616. 3D : Wall Gun - Direction 2 (Aiming)
  4617. 3E : Wall Gun - Direction 3
  4618. 3F : Wall Gun - Direction 3 (Aiming)
  4619. 40 : Wall Gun - Direction 4
  4620. 41 : Wall Gun - Direction 4 (Aiming)
  4621. 42 : Wall Gun - Direction 5
  4622. 43 : Wall Gun - Direction 5 (Aiming)
  4623. 44 : Wall Gun - Direction 6
  4624. 45 : Wall Gun - Direction 6 (Aiming)
  4625. 46 : Wall Gun - Direction 7
  4626. 47 : Wall Gun - Direction 7 (Aiming)
  4627. 48 : Sand Clounds when Scorpion digs into ground?
  4628. 49 : Fireworks Bot - Launched Fireworks
  4629. 4A : Fireworks Bot - Exploding Fireworks
  4630. 4B : Rainbow Bar?
  4631. 4C : Lightbulb Bot
  4632. 4D : Lightbulb Bot (Launching flares?)
  4633. 4E : Lightbulb Bot (?)
  4634. 4F : Lightbulb Bot - Flare Capsule
  4635. 50 : Lightbulb Bot - Flare
  4636. 51 : Rat
  4637. 52 : Ring Guy
  4638. 53 : Ring Guy (Eyes only)
  4639. 54 : Ring Guy (Seperating into rings)
  4640. 55 : Ring Guy (Ring)
  4641. 56 : Fly
  4642. 57 : Fly's Bullet
  4643. 58 : Eddie (Standing)
  4644. 59 : Eddie (Throwing item)
  4645. 5A : Eddie (Walking)
  4646. 5B : Hippo (Warp Animation)?
  4647. 5C : Umbrella Metool/Bot (Walking)
  4648. 5D : Umbrella Metool/Bot (Folding umbrella)
  4649. 5E?: Unused 21? (Umbrella Metool/Bot - walking forward with umbrella)
  4650. 5F : Umbrella Metool/Bot (Walking forward without umbrella)
  4651. 60 : Umbrella Metool/Bot (Launching umbrella)
  4652. 61 : Umbrella Metool/Bot - Umbrella
  4653. 62 : Explosion
  4654. 63 : Grasshopper (Hopping)
  4655. 64 : Super Ball Machine
  4656. 65 : Super Ball Machine (Ball - Vertically stretched)
  4657. 66 : Super Ball Machine (Ball - Horizontally stretched)
  4658. 67 : Falling Boulder (Compact)
  4659. 68 : Falling Boulder (Smal piece 1)
  4660. 69 : Falling Boulder (Smal piece 2)
  4661. 6A : Falling Boulder (Smal piece 3)
  4662. 6B : Falling Boulder (Smal piece 4)
  4663. 6E-70u: Unused 22 (same data) (Might be a platform)
  4664. 71 : Drill Man Stage Switch
  4665. 72 : Skullmet
  4666. 73 : Skullmet (Shooting bullet)
  4667. 74 : Shield Attacker (seems unused, same as 76)
  4668. 75 : Shield Attacker (seems unused, same as 76)
  4669. 76 : Shield Attacker
  4670. 77 : Shield Attacker (Turning)
  4671. 78u: Unused 23 (Unused enemy sprite: Wheel gun!)
  4672. 7E : Air Bubble
  4673. 90 : Amoeba standing
  4674. 91 : Amoeba going down
  4675. 92 : Amoeba "walking"
  4676. 93 : Amoeba going up
  4677. 97 : Saturn Bot
  4678.  
  4679. A0u: Unused 25 (Unused enemy sprite: Drop)
  4680. A1u: Unused 26 (Unused enemy sprite: Drop - falling drop)
  4681. AAu: Unused 27 (Some animated 32x32 pixel block using mirrored sprites)
  4682.  
  4683. AD : First of unused pointers
  4684.  
  4685. B0-FFu: Unused, has no pointers.
  4686.  
  4687. More Sprite ID's: (Undetermined Sprite Bank)
  4688. --------------------------------------------
  4689.  
  4690. 49 : Fireworks A
  4691. 4A : Fireworks B
  4692. 62 : Explosion (drill bomb)
  4693. DF? : Inviliciblity blink
  4694.  
  4695. Unused IDs..
  4696. ============
  4697.  
  4698. Definately Unused Enemy ID's: $21, $22, $23, $24, $25, (more)
  4699.  
  4700. Other Unused Enemy ID's:
  4701. 2A : Wall (Medium)
  4702. 2B : Wall (Large)
  4703. 2C : Loads Object ID $67, Sprite ID $A0. (Sprite Bank 2)
  4704. 3D : Switch (Unused Variant)
  4705. 3E : Loads Unused Object ID $58, Sprite ID $71 (Sprite Bank 4)
  4706. 3F :
  4707. 40 :
  4708. 88-8F : Unused entries. 8F is the last entry in all the tables concerning Enemy ID.
  4709.  
  4710. Unused Object ID's:
  4711. 0E
  4712. 17 : Unused ASM - Generates Jet Bird (Object ID $18)
  4713. 47 : ASM at $9F85 in bank $3A, already used by something else. - Generates explosions w/ sound.
  4714. 55 : RTS at $ACFC in bank $3D.
  4715. 57 : ASM at $AD0C in bank $3D, already used by Drill Man Stage Switch. (Object ID $5B.)
  4716. 58 : ASM at $AD0C in bank $3D, already used by Drill Man Stage Switch. (Object ID $5B.)
  4717. 59 : ASM at $AD0C in bank $3D, already used by Drill Man Stage Switch. (Object ID $5B.)
  4718. 5A : ASM at $AD0C in bank $3D, already used by Drill Man Stage Switch. (Object ID $5B.)
  4719. 68.
  4720.  
  4721. Weapon Shape ID's
  4722. =================
  4723.  
  4724. 00 : 00x00 : Normal Buster, Small Charged Buster, Drill Bomb, Ring Boomerang, Dust Crusher, Dive Missile, Wire
  4725. 01 : 02x06 : Fully Charged Buster
  4726. 02 : 06x06 : Medium Pharaoh Shot
  4727. 03 : 0Ex0E : Drill Bomb Explosion
  4728. 04 : 02x02 : Small Pharaoh Shot
  4729. 05 : 0Ax0A : Big Pharaoh Shot
  4730. 06 : 16x16 : Skull Barrier
  4731.  
  4732. NOTE : To read the datas from FACE, multiply the pointers by two (since one pointer covers two
  4733. datas)
  4734.  
  4735. Object Shape ID's - bits 2-7 of 408-41F (Occupying area, hit detection between sprites).
  4736. ========================================================================================
  4737.  
  4738. ( Height x Width )
  4739. $FADC x $FB1C
  4740. 00 : 0A-0A - 16*16 Square - Ladybug Copter, Battonton, Big Energy Capsule.
  4741. 01 : 09-0A - Ring Man Rainbow bars (active)
  4742. 02 : 0A-12 - Ring Man Rainbow bars (inactive) 1, Ring Guy Sub-object
  4743. 03 : 0A-1A - Ring Man Rainbow bars (inactive) 2
  4744. 04 : 0A-22 - Ring Man Rainbow bars (inactive) 3
  4745. 05 : 0A-2A - Ring Man Rainbow bars (inactive) 4
  4746. 06 : 0A-32 - Ring Man Rainbow bars (inactive) 5
  4747. 07 : 0A-3A - Ring Man Rainbow bars (inactive) 6
  4748. 08 : 0A-42
  4749. 09 : 0A-4A
  4750. 0A : 06-1A
  4751. 0B : 08-12
  4752. 0C : 0A-1A
  4753. 0D : 0E-0E - Mono-Roader, Ring Guy (Piece)
  4754. 0E : 06-06 - Hippo's Missile
  4755. 0F : 05-05 - Ladybug Copter - Dropped Propel, Bullets.
  4756. 10 : 0E-12 - Wall Gun
  4757. 11 : 0E-0A - Helipon
  4758. 12 : 0A-06
  4759. 13 : 1A-12 - Jumbig, Ring Guy
  4760. 14 : 12-12 - Drill Man's Drill Bomb Explosion
  4761. 15 : 12-0A
  4762. 16 : 1A-0A
  4763. 17 : 22-0A
  4764. 18 : 22-32 - Hippo
  4765. 19 : 2A-32
  4766. 1A : 06-0A
  4767. 1B : 0C-0E
  4768. 1C : 10-05
  4769. 1D : 04-0E
  4770. 1E : 0B-0E
  4771. 1F : 32-12
  4772. 20 : 07-0A - Metools (Covered)
  4773. 21 : 04-0A
  4774. 22 : 0E-1A
  4775. 23 : 1A-0C-Bright Man?
  4776. 24 : 12-0C
  4777. 25 : 42-06
  4778. 26 : 12-32
  4779. 27 : 12-06
  4780. 28 : 0E-06
  4781. 29 : 2A-0A
  4782. 2A : 0A-42
  4783. 2B : 05-0E
  4784. 2C : 22-22
  4785. 2D : 16-2A
  4786. 2E : 22-16
  4787. 2F : 32-32
  4788. 30 : 32-22
  4789. 31 : 0A-16
  4790. 32 : 12-16
  4791. 33 : 7A-12 -
  4792. 34 : 0A-08
  4793. 35 : 82-F2
  4794. 36 : 0D-0B - Drill Man
  4795. 37 : 1A-1A
  4796. 38 : 0C-0A
  4797. 39 : 0A-0C
  4798. 3A : 02-02 (unused)
  4799. 3B : 02-02 (unused)
  4800. 3C : 02-02 (unused)
  4801. 3D : 02-02 (unused)
  4802. 3E : 02-02 (unused)
  4803. 3F : 02-02 (unused)
  4804.  
  4805. (Went through Drill Man/ on Ring Man..)
  4806.  
  4807. Wall hit detection ID - Vertical
  4808. ================================
  4809. Object - Vertical Wall Detection ID (For D2FC/F0F8)
  4810. ===================================================
  4811.  
  4812. Pairs: [Down]/[Up]
  4813.  
  4814. Note 1 : Down/Up, meaning if the movement of the object is going down, or up.
  4815. Different numbers are used for both case.
  4816.  
  4817. 00/01 : Megaman (Normal)
  4818. D71E/D722
  4819. 02 : Megaman - Check if in Water. Used in function $F3C1 (bank $3E). After the check with $1A/1B, Rush Marine
  4820. call $D2FC with this pointer.
  4821. D727
  4822. 03 : Megaman - Slide - Check open space above MM
  4823. D72A
  4824. 04 : Megaman - Slide - Check open space below MM
  4825. D72F
  4826. 06 : Worm (Falling Down), Spinner (On Ground)
  4827. 08/09 : Skull Man (Jumping), Fireworks Bot, Mono-Roader, Wheel Skull
  4828. 0A/0B : Some Robot Masters (Jumping), Umbrella Bot Falling, Grasshopper Jump
  4829. Robot Masters : Dive Man, Pharaoh Man, Toad Man
  4830. 0C/0D : Dust Man (Jumping), Rat's Jump, Falling Boulder (Big)
  4831. 0E : Eddie, Spark Spine, Item dropped by Eddie (Down), Spinner
  4832. 10 : Megaman - Toad Man Stage - Check for hit with Block types Glide Right/Left, Special
  4833. 11/12 : Snail Bot's Bomb
  4834. 13 : Bright Man Jump, Hover
  4835. 14 : Small (8x8) Item (Downwards gravity)
  4836. 15 : Rush Warp Down, Falling Boulder (small pieces)
  4837. 16/17 : Super Ball Machine's Ball
  4838. 18/19 : Rush Jet, a pointer checking collision when moving.
  4839. 18 : Worm (When on ground)
  4840. 1A/1B : Rush Marine
  4841. 1C/1D : Totempole
  4842. 1D/1E : Metool
  4843. 1F/20 : M442A (Down/Up)
  4844. 21/22 : Amoeba
  4845. 23 : Wire, Water Bubbles (Up)
  4846. 26/27 : Water Metool
  4847. 29 : Helipon (Down Check)
  4848. 2A : Wall Wheel (Down check)
  4849. 2B : Wall Wheel (Up check)
  4850. 2C : Unused?
  4851. 2D : Big (16x16) Item
  4852. 32/33 : Jumbig
  4853. 38 : Megaman - Another check if in Water? (Used to determine when to generate bubbles.)
  4854. 39 : Megaman - Slide Stop - Check open space below MM, but at #$10 instead of #$0A like pointer
  4855. $04. It's used when stop sliding. Maybe because of moving floors?
  4856. D800
  4857. 3A : Battonton - Upwards wall check
  4858. 3B-3F : Unused.
  4859.  
  4860. Wall hit detection ID - Horizontal (For D428/F3ED)
  4861. ==================================================
  4862.  
  4863. Pairs: [Right]/[Left]
  4864.  
  4865. Note 1 : Right/Left, meaning if the movement of the object is going right or left.
  4866. Different numbers are used for both case.
  4867. Exemple :
  4868. 00 is Mega Man (Normal) collision to the Right
  4869. 01 is Mega Man (Normal) collision to the Left
  4870.  
  4871. It checks at specific points if there is a collision. I will explain it with an example of pointer 00
  4872.  
  4873. 02 08 F8 08 0B
  4874.  
  4875. 02 : First digit always tell the number of digits there will be after second digits. Here 3 because it's #$02
  4876. 08 : Second digit tells us, from center of object, how much to move the point to check. Here, +8 (#$08)
  4877.  
  4878. Here, those are all excedent digits, for which collisions are checked. The number of those is said by the first digit.
  4879. Those are all Y values moving from the point we are, to know where to check for collision.
  4880. I will go on with the example.
  4881.  
  4882. Note : If going Up, for #$FC, Y position will be AND #$04... so knowing this you can find the rest
  4883.  
  4884. F8 : Go up from where you are of -8 (#$F8) and check at this point for collision.
  4885.  
  4886. IMPORTANT NOTE! FOR ALL THE FOLLOWING DIGITS, WE ALWAYS MOVE FROM THE LAST POSITION
  4887.  
  4888. 08 : Go down from where you are (-8) of 8. So check at 0 vertical position
  4889.  
  4890. 0B : Go down from where you are (0) of 0B : So check vertical position at B.
  4891.  
  4892. That's all!
  4893.  
  4894.  
  4895.  
  4896. 00/01 : Megaman (Normal)
  4897. D888/D88D
  4898. 04/05 : Mega Man (Slide)
  4899. D897/D89B
  4900. 06/07 : Mega Man (To Start to Slide)
  4901. D89F/D8A2
  4902. 0C/0D : Dive Man
  4903. D74D/D752
  4904. 0E/0F : Drill Bomb, Worm (Small)
  4905. D8BF/D8C3
  4906. 14/15 : Rat, Flying Shield, Dust Man, Skull Man, Fireworks Bot, Scorpions, Hover, Mono-Roader
  4907. 18/19 : Umbrella Bot Walking, Spark Spine, Item dropped by Eddie
  4908. 1A/1B : Snail Bot's Bomb
  4909. 1C/1D : Piranha, Spinner
  4910. 20/21 : Super Ball Machine's Ball
  4911. 22/23 : Eddie
  4912. 24/25 : Rush Jet, Worm (Medium)
  4913. 26/27 : Rush Marine
  4914. 2A/2B : Metool
  4915. 2E/2F : Water Metool
  4916. 30/31 : Wall Wheels
  4917. 32/33 : Toad Man, Pharaoh Man
  4918. 34/35 : Bright Man
  4919. 36/37 : Worm (Large)
  4920. 3C/3D : Jumbig
  4921. 3E : Megaman - ??? (Normal) I know it is set here, and not called in stage #$04...
  4922. has to do with Ring man rainbow bars?
  4923. D998
  4924. 3F : Megaman - ??? (Slide)
  4925. D99C
  4926.  
  4927. Toad|Dust|Skull|Dive|Bright|Pharaoh
  4928.  
  4929. Object Slot Usage
  4930. =================
  4931.  
  4932. 00: Megaman.
  4933. 01-04: Megaman's Weapons.
  4934. 04 : Rush Coil or Wire Adaptor Stuff
  4935. 05: Water when MM walks. (In Toad Man's stage.)
  4936. "Shock" sprite when MM is hit by enemy
  4937. Slide dust cloud.
  4938. Water Splash.
  4939. Might be used at explosions (When MM dies, and other cases).
  4940. 06: Megaman's Air Bubbles (If Megaman is in Water.)
  4941. Might be used at explosions (When MM dies, and other cases).
  4942. 07: Might be used at explosions (When MM dies, and other cases).
  4943. 08-17 : Enemies, Items, Explosions, etc.
  4944.  
  4945. Stage Bank / Scene Bank (Contents of $22)
  4946. =========================================
  4947.  
  4948. 00: Bright Man
  4949. 01: Toad Man
  4950. 02: Drill Man
  4951. 03: Pharaoh Man
  4952. 04: Ring Man
  4953. 05: Dust Man
  4954. 06: Dive Man
  4955. 07: Skull Man
  4956. 08: Cossack Stage 1
  4957. 09: Cossack Stage 2
  4958. 0A: Cossack Stage 3
  4959. 0B: Cossack Stage 4
  4960. 0C: Wily Stage 1
  4961. 0D: Wily Stage 2
  4962. 0E: Wily Stage 3
  4963. 0F: Wily Stage 4
  4964.  
  4965. Scanline Effect ID's (Contents of $F0)
  4966. ======================================
  4967. 00: No effect
  4968. 01: Hippo
  4969. 02: Whale
  4970. 03: Mothraya
  4971. 04: Dust Man Ceiling
  4972. 05: Dive Man Waves
  4973. 06: Dr. Cossack Battle
  4974. 07: Dr. Cossack Stage 2 Boss
  4975. 08: Dr. Cossack Battle End Scene
  4976. 09: Giant Metool Battle and Wily Stage 3 Battle
  4977. 0A: Train Ride Intro and Ending Scene
  4978. 0B:
  4979.  
  4980. Weapon ID's (Refers to what is loaded into Memory $A0)
  4981. ======================================================
  4982.  
  4983. 00: Mega Buster
  4984. 01: Rush Coil
  4985. 02: Rush Jet
  4986. 03: Rush Marine
  4987. 04: Rain Flush
  4988. 05: Wire Adaptor
  4989. 06: Balloon Adaptor
  4990. 07: Dive Missile
  4991. 08: Ring Boomerang
  4992. 09: Drill Bomb
  4993. 0A: Dust Crusher
  4994. 0B: Pharaoh Shot
  4995. 0C: Flash Stopper
  4996. 0D: Skull Barrier
  4997.  
  4998. Sprite Tile Usage
  4999. =================
  5000.  
  5001. Enemy sprites:
  5002.  
  5003. C0-CF : Ladybug Copter (Enemy ID $00)
  5004. C0-CF : Hover (Enemy ID $01)
  5005. A0-BF : Slinky (Enemy ID $02)
  5006. A0-BF & D2-D6 : Desert Scorpion (Enemy ID $03)
  5007. E0-FF : Grashopper (Enemy ID $04)
  5008. DC-EF : Rocket Bird (Enemy ID $05)
  5009. E0-FF : Gun (Enemy ID $06/$07)
  5010. A0-BA : Lightbulb Guy (Enemy ID $10)
  5011. A0-BF : Sewer Rat (Enemy ID $11)
  5012. E0-EF : Fly (Enemy ID $13)
  5013. A0-DB : Umbrella Guard (Enemy ID $14)
  5014. C0-DF : Fireworks Guy (Enemy ID $15)
  5015. E0-EF : Bright Man Platforms (Enemy ID $28, $82)
  5016. EE-EF : Walls (Enemy ID $29/$2A/$2B)
  5017. C0-E6 : Blade Spinner (Enemy ID $2D)
  5018. A0-BF : Super Ball Machine (Enemy ID $2E/$2F)
  5019. B0-BF : Falling Boulder (Enemy ID $30)
  5020. B0-BF & D0-F4 Jumbig (Enemy ID $33)
  5021. C0-DA : Shield Attacker (Enemy ID $34)
  5022. A0-AF : Shuffled Blocks (Enemy ID $35)
  5023. C0-DF : Totempole (Enemy ID $36)
  5024. A0-AF & B0-B2 & D0-DF : Walking Metool (Enemy ID $3B)
  5025. A0-BF : Jumping Metool (Enemy ID $3C)
  5026. A0-AF : Switch (Enemy ID $41/$3D)
  5027. A0-AF & B0-B2 & C0-CF : Spinning Metool (Enemy ID $42)
  5028. A0-AF : M442A (Enemy ID $45)
  5029. C0-D8 : Skullmet (Enemy ID $46/4B)
  5030. C0-E6 : Amoeba (Enemy ID $47)
  5031. A0-EF : Skeleton Joe (Enemy ID $48)
  5032. C0-CF : Saturn Bot (Enemy ID $49)
  5033. D0-EF : Water Metool (Enemy ID $4A)
  5034. C0-EF : Helipon (Enemy ID $4C)
  5035. B8-BB & C0-CF : Piranha (Enemy ID $4D)
  5036. C0-DF : Skull Dropper (Enemy ID $4E)
  5037. A0-AB : Assembling Block (Enemy ID $4F)
  5038. A0-A5 : Wheel (Enemy ID $51/$52)
  5039. F0-FF : Spike Box (Enemy ID $54)
  5040. A0-BF : Battonton (Enemy ID $5C)
  5041. D0-EF : Mantan (Enemy ID $5D)
  5042. A0-BF & D0-FF : Mummy Mauler (Enemy ID $67)
  5043. A0-AF & E0-E9 : Worm (Enemy ID $68)
  5044. D0-DF : Sinking Platform (Enemy ID $6A)
  5045. D0-FF : Mono-Roader (Enemy ID $6B)
  5046. B0-BF & D0-FF : Gachappon (Enemy ID $6E)
  5047. C0-CF : Pakatto 24 (Enemy ID $72)
  5048. F0-FF : Upndown (Enemy ID $73)
  5049. A0-AD : Shifting Spike Block (Enemy ID $75/$76)
  5050. C0-CB : Water Mine (Enemy ID $77)
  5051. B0-B7 : Spark Spine (Enemy ID $78)
  5052. A0-B5 : Ladder Press (Enemy ID $81/84)
  5053.  
  5054. Effects:
  5055.  
  5056. F0-FF : Water Splash Effect / Bubbles
  5057.  
  5058. Primary Graphics Load ID list
  5059. =============================
  5060.  
  5061. 00-0F : Stage Graphics Load (Starting from beginning of stage)
  5062. 10 : Stage Select / Capcom Logo
  5063. 11 : Title Screen
  5064. 12 : Debug Menu - Font Load (Unused otherwise)
  5065. 13 : Debug Menu - Sprite Revert (Unused otherwise)
  5066. 14 : Weapon Menu
  5067. 15 : Weapon Menu Exit - Sprite Graphics Revert (Megaman's sprites)
  5068. 16 : Weapon Get
  5069. 17 : Password
  5070. 18-1F : Boss Demonstration Graphics
  5071. 20-2F : Weapon Menu - Graphics Reload for each stage (Not used at continue point!)
  5072. 30-3D : Weapon Graphics (Sorted by Weapon ID)
  5073. Note: 30 and 3C points to the same data! Modifying one will modify the other.
  5074. 3E : Cossack Stage Intro
  5075. 3F : Dr. Wily Stage Intro
  5076. 40 : Wily Saucer Scene
  5077. 41 : -
  5078. 42 : Bright Man's Stage - Continue Point 1
  5079. 43 : Drill Man's Stage - Continue Point 1
  5080. 44 : Pharaoh Man's Stage - Continue Point 1
  5081. 45 : Ring Man's Stage - Continue Point 1
  5082. 46 : Dust Man's Stage - Continue Point 1
  5083. 47 : Dive Man's Stage - Continue Point 1
  5084. 48 : Skull Man's Stage - Continue Point 1
  5085. 49 : Ring Man's Stage - Continue Point 2
  5086. 4E : Cossack Stage 1 - Continue Point 1
  5087. 4F : Cossack Stage 2 - Continue Point 1
  5088. 50 : Cossack Stage 3 - Continue Point 1
  5089. 51 : Cossack Stage 4 - Continue Point 1
  5090. 52 : Wily Stage 1 - Continue Point 1
  5091. 53 : Wily Stage 2 - Continue Point 1
  5092. 54 : Toad Man's Stage - Continue Point 1
  5093. 55 : Copyright Text / Intro - City Scene
  5094. 56 : Intro - Megaman's History
  5095. 57 : Intro - Train Ride
  5096.  
  5097. Scroll Graphics Load ID list
  5098. ============================
  5099.  
  5100. 00 : Nothing
  5101. 01 : Hippo
  5102. 02 : Ring Man BG graphics change, Saturn Bot, Rainbow Bars
  5103. 03 :
  5104. 04 : Mummy Mauler
  5105. 05 : Snailbot BG and SPR
  5106.  
  5107. 3A : Unused
  5108.  
  5109. Sound ID list
  5110. =============
  5111.  
  5112. ID BGM SFX
  5113.  
  5114. 00: X Bright Man
  5115. 01: X Toad Man
  5116. 02: X Ring Man
  5117. 03: X Drill Man
  5118. 04: X Pharaoh Man
  5119. 05: X Dive Man
  5120. 06: X Skull Man
  5121. 07: X Dust Man
  5122. 08: X Cossack Stage 1 & 2
  5123. 09: X Wily Stage 1 & 2
  5124. 0A: X Pre-Intro A
  5125. 0B: X Ending
  5126. 0C: X Stage Clear
  5127. 0D: X Password
  5128. 0E: X Game Over
  5129. 0F: X Stage Intro
  5130. 10: X Stage Select
  5131. 11: X Boss Battle
  5132. 12: X Title
  5133. 13: X Credits
  5134. 14: X Weapon Get
  5135. 15: X Cossack Stage 3 & 4
  5136. 16: X Wily Stage 3 & 4
  5137. 17: X Flash Stopper
  5138. 18: X Rain Flush
  5139. 19: X Ring Boomerang
  5140. 1A: X Drill Bomb
  5141. 1B: X Pharaoh Shot (Load)
  5142. 1C: X Lightning (Cossack Stage Intro)
  5143. 1D: X Path being drawn (Cossack/Wily stage maps)
  5144. 1E: X Charged Shot Release
  5145. 1F: X Extra Life
  5146. 20: X Unused? - Mega Buster charged?
  5147. 21: X Normal Buster Shot
  5148. 22: X Mega Buster load start
  5149. 23: X MM hits ground
  5150. 24: X MM hit by enemy
  5151. 25: X MM explodes
  5152. 26: X Buster shot on enemy
  5153. 27: X Mega Buster loaded (held)
  5154. 28: X Drill Bomb Explodes (and more?)
  5155. 29: X Health being filled up
  5156. 2A: X Selection selected.
  5157. 2B: X MM's weapon deflected off enemy
  5158. 2C: X Boss-door wrap-up
  5159. 2D: X ?? Password error?
  5160. 2E: X Menu selection
  5161. 2F: X Password OK?
  5162. 30: X Opening Weapon Menu
  5163. 31: X Grasshopper's Jump.
  5164. 32: X Wire
  5165. 33: X MM appears.
  5166. 34: X Unused - Train Flute?
  5167. 35: X ?
  5168. 36: X Wily's lab is going to explode
  5169. 37: X Wily's lab is exploding (?)
  5170. 38: X Unused - ?
  5171. 39: X Appearing/Disapperaing Blocks
  5172. 3A: X Balloon/Wire Adaptor Achieved.
  5173. 3B: X Wily Stage Intro
  5174. 3C: X Cossack Stage Intro
  5175. 3D: X Full-loaded mega buster released.
  5176. 3E: X Full-loaded Pharaoh Shot released.
  5177. 3F: X Protoman's Whistle
  5178. 40: X Wily Saucer
  5179. 41: X MM Warps Out
  5180. 42: X Unused - Train Car SFX?
  5181. 43: X Pre-Intro B
  5182. 44: Unused (Pointer is 0, no data.)
  5183. 45: X Final Wily Battle
  5184. 46: X Wily Defeated
  5185.  
  5186. Game Sequence
  5187. =============
  5188.  
  5189. +-- Wily Defeated ->>-- JSR --> Ending/Credits **END**
  5190. |
  5191. +- Cossack Stage Map +-- Robot M. Defeated >-- JSR -+- Weapon Get -+
  5192. | | Weapon Menu | | |
  5193. | | | | (stage already V
  5194. | | | | clear, no Weapon Get) V
  5195. ^ V | | | |
  5196. ^ V | | +------<<<-----+
  5197. | RTS <<JSR/RTS>> | |
  5198. | V | | |
  5199. | +->>+>+ Start Level -> [Game Loop] ----+--- Loose Life --------+ |
  5200. | | ^ ^ V | |
  5201. | | | +-----------<<<<---------------------------+ | V
  5202. | ^ | | V
  5203. | ^ +---<<<-- RTS ---<<<--- (continue) ----+ V V
  5204. | | ^ V |
  5205. | | ^ | |
  5206. | +-- RTS -<<+ +------ JMP --------<- Game Over -<<- JSR -<<--+ |
  5207. | | V |
  5208. +----- Stage Select --<<JSR/RTS>>-- Robot Master Demonstration |
  5209. | ^ |
  5210. ^ | |
  5211. ^ | |
  5212. | +--------<<<-------- Password Screen ------<<<----------+
  5213. |
  5214. +--<-+
  5215. | |
  5216. | |
  5217. ^ Password Enter
  5218. | |
  5219. | ^
  5220. +----+
  5221. |
  5222. Copyright/
  5223. Title Screen ---<<JSR/RTS>>-- Intro
  5224. |
  5225. +-- JSR ---+
  5226. |
  5227. ^
  5228. |
  5229. Reset ($FE00)
  5230. **START**
  5231.  
  5232. Hard-wired bank ($7C010-$8000F):
  5233. * Reset
  5234. * Start Level
  5235. * [Game Loop]
  5236.  
  5237. Additional Messy Notes
  5238. ======================
  5239.  
  5240. Object/Wall Hit Detection - Object Shape Data (Vertical Hit Detection)
  5241. ----------------------------------------------------------------------
  5242.  
  5243. BYTE # of components.
  5244. BYTE Y add.
  5245. BYTE X add.
  5246. for each additional component:
  5247. BYTE X add
  5248.  
  5249. Sprite Data Formats
  5250. -------------------
  5251.  
  5252. Animation Data:
  5253.  
  5254. Size of Data - Description
  5255. 1 byte [# of Frames + Page Flag]
  5256. 1 byte Frame Length (In Vblank's)
  5257. [# of Frames]+1 Tile Usage ID's
  5258.  
  5259. Tile Usage Data:
  5260.  
  5261. Size of Data - Description
  5262. 1 byte [# of Tiles]
  5263. 1 byte Coordinate ID
  5264. 2 * ([# of Tiles]+1) Tile Block
  5265. Tile Block:
  5266. 1 byte Pattern Table Tile
  5267. 1 byte Sprite Attribute Byte
  5268.  
  5269.  
  5270. Weapon Code Procedure
  5271. ---------------------
  5272.  
  5273. Weapon Handler:
  5274. (Tmp Memory $10/$11 seems to be used for Temps)
  5275. $10: Direction Operand Function
  5276. $11: Sprite ID?
  5277.  
  5278. (Quit if Weapon Energy = Empty)
  5279. Check for B Button Push ($14/$16, AND #$40)
  5280.  
  5281. Release New Object:
  5282.  
  5283. (
  5284. lda $16
  5285. and #3
  5286. beq :+
  5287. sta $420
  5288. sta $31
  5289. jsr $F4F6 (dunno what it does)
  5290. :
  5291. Setting MM's Pose:
  5292. Setting $32 (Pose Length)
  5293. If $33 is 0: {
  5294. Setting $33
  5295. Calling $F446 (X = 0), with $33 + $558(0) }
  5296.  
  5297. Set 420>
  5298. Call $F49C (with args)
  5299. Set 300> to something.
  5300. Set up 3A8>, 3C0>, 3D8>, 3F0> Ranges (Object Speeds?)
  5301. Set up 408> (unknown use) to 04?
  5302.  
  5303. Call $FD75 to subtract current weapon's energy
  5304.  
  5305. Call $F6BE with Sound ID in A for whatever weapon sound effect
  5306.  
  5307. Common Object ASM for Weapons/Items:
  5308. jsr $F413 ;(Object Slot in X register) - update horizontal Object movement (left and right)
  5309. jsr $F434 ;(Object Slot in X register) - update vertical Object movement (up and down)
  5310. jsr $884B ;(Object Slot in X register) - make weapon work with "Shootable" block type.
  5311. lda $390,x ;$390 is Y screen.
  5312. beq :+
  5313. ;Will remove object if it moves out of top or bottom of screen.
  5314. jsr $DC00 ;(Object Slot in X register) - Kill object.
  5315.  
  5316.  
  5317. Explosion Code Procedure
  5318. ------------------------
  5319.  
  5320. This is for a explosion that hurt Mega Man
  5321.  
  5322. !!! START : HOW TO CREATE AN EXPLOSION (LIKE WITH DRILL MAN'S BOMB)
  5323.  
  5324. 20 00 DC JSR $DC00 Kill object
  5325.  
  5326. !!! Load the sprite ID for explosion and call function to set it and reset sprite's properties
  5327.  
  5328. A9 62 LDA #$62
  5329. 20 46 F4 JSR $F446
  5330.  
  5331. !!! Object ID now become #$83, multiple explosion
  5332.  
  5333. A9 83 LDA #$83
  5334. 9D 00 03 STA $0300,X @ $0313 = #$2C
  5335.  
  5336. !!! Substance and shape now become #$B7
  5337.  
  5338. A9 B7 LDA #$B7
  5339. 9D 08 04 STA $0408,X @ $041B = #$CE
  5340. 60 RTS
  5341.  
  5342. !!! END : HOW TO CREATE AN EXPLOSION (LIKE WITH DRILL MAN'S BOMB)
  5343.  
  5344. Kill Enemy Procedure
  5345. --------------------
  5346. This is useful, because just calling $DC00 doesn't put the small explosion sprite. This is what is used in the original ASM when an enemy dies after a time.
  5347. A function to put a enemy exploding sprite when you kill him
  5348.  
  5349. !!! Kill enemy
  5350.  
  5351. $9EF3:20 00 DC JSR $DC00
  5352.  
  5353. !!! Put a object ID of explosion.
  5354.  
  5355. $9EF6:A9 9D LDA #$9D
  5356. $9EF8:9D 00 03 STA $0300,X @ $0317 = #$CE
  5357.  
  5358. !!! Set Substance And Shape to #$00, else it deflects weapons
  5359.  
  5360. $9EFB:A9 00 LDA #$00
  5361. $9EFD:9D 08 04 STA $0408,X @ $041F = #$C0
  5362.  
  5363. !!! Load the sprite for the small explosion.
  5364.  
  5365. $9F00:A9 62 LDA #$62
  5366. $9F02:4C 46 F4 JMP $F446
  5367.  
  5368. ASM explanation : Bank $3C, $805E : Crushed by a moving wall?
  5369. -------------------------------------------------------------
  5370.  
  5371. $805E:A5 30 LDA $0030
  5372. $8060:C9 06 CMP #$06
  5373. $8062:B0 32 BCS $8096
  5374. $8064:A5 22 LDA $0022
  5375. $8066:C9 04 CMP #$04
  5376. $8068:F0 2C BEQ $8096
  5377. $806A:A2 00 LDX #$00
  5378. $806C:A0 3E LDY #$3E
  5379. $806E:A9 B5 LDA #$B5
  5380. $8070:85 00 STA $0000
  5381. $8072:A5 30 LDA $0030
  5382. $8074:C9 02 CMP #$02
  5383. $8076:D0 05 BNE $807D
  5384. $8078:A9 B7 LDA #$B7
  5385. $807A:85 00 STA $0000
  5386. $807C:C8 INY
  5387. $807D:A5 F0 LDA $00F0
  5388. $807F:C9 04 CMP #$04
  5389. $8081:D0 07 BNE $808A
  5390. $8083:AD 78 03 LDA $0378
  5391. $8086:C5 00 CMP $0000
  5392. $8088:B0 0C BCS $8096
  5393. $808A:20 28 D4 JSR $D428
  5394. $808D:A5 10 LDA $0010
  5395. $808F:29 10 AND #$10
  5396. $8091:F0 03 BEQ $8096
  5397. $8093:20 43 82 JSR $8243
  5398. $8096:60 RTS
  5399.  
  5400. This ASM is for detecting if megaman became crushed by a moving wall,
  5401. and happens every frame during all gameplay, except for Ring Man's stage.
  5402. $22 is stage id, the value #$04 means Ring Man's stage.
  5403. Its probably only meant for the moving wall in Dust Man's stage.
  5404. The reason for the Ring Man exception is probably to prevent the disappearing bars
  5405. from crushing megaman, they are moving walls.
  5406. There is also additional code for when megaman is in the moving wall section
  5407. in Dust Man's stage. If MM's Y coordinate is $B5 or more ($B7 if sliding), the
  5408. wall hit detection is skipped. Im not sure why.
  5409. (F0 is active Scanline Effect id, #$04 is the one used in the moving wall section.
  5410. This value is checked a lot of places to check if MM is in that particular area
  5411. of the game.)
  5412.  
  5413. Graphics Load Data
  5414. ------------------
  5415.  
  5416. 0: Source Bank
  5417. 1: # of tiles
  5418. 2: Src Hi
  5419. 3: Dst Hi
  5420.  
  5421. Earlier Version Traces
  5422. ----------------------
  5423.  
  5424. Suggestion: Cossack Stage 3 were meant to have the Sewer Rat enemy and Platforms from Bright Man's stage
  5425. at the beginning of the stage.
  5426. Evidence: The graphics for those objects are loaded into the pattern table when the stage starts.
  5427.  
  5428. Suggestion: Toad Man's stage had a section where scrolling splits in two, connected at the screen right before
  5429. the first Snail miniboss. Maybe either Wire or Balloon were in Toad Man's stage previously.
  5430. Evidence: Between screens $F and $12 in Toad Man's stage, there are two blank screens, which follows regular
  5431. scroll data. The "ordinary" path between screens $F and $12 is connected using extraordinary scroll data.
  5432. (ie Multi-Path data).
  5433.  
  5434. Alternate "READY" tiles: A different-looking tile set of "ready" is loaded into the sprite pattern table, among
  5435. the "lightbulb" enemy graphics when Bright Man's stage starts. These might be test graphics, or Capcom
  5436. thought of using a different part of the pattern table for the "READY" tiles.
  5437.  
  5438. ROM Version / Regional differences (Incomplete)
  5439. -----------------------------------------------
  5440.  
  5441. European version:
  5442. Bank $1B ($36010) has some differences in code.
  5443. The sound engine has alot of changes. (Bank $1E)
  5444.  
  5445. Rockman version:
  5446. Bank $1C ($38010) has a few changes in code.
  5447. Bank $1B ($36010) has some differences in code.
  5448. Bank $3D: Changes from $B690 / $7B6A0 and on.
  5449. $CF52 / 7CF62 : STA $BF and STA $4C8 is swapped around.
  5450.  
  5451. Differences between Rockman 4 ROM dumps (differences from "Rockman 4 - Aratanaru Yabou! (J).nes".)
  5452.  
  5453. Rockman 4 - Aratanaru Yabou! (J) [a1].nes :
  5454. Tile at $8B90: 1 pixel is different (probably corrupt).
  5455. Tile at $269E0: 1 pixel is corrupt.
  5456. Tile at $2DD10: 1 pixel is corrupt.
  5457. Tile at $2EC50: 1 pixel is corrupt.
  5458. Tile at $306A0: 1 pixel is corrupt.
  5459. Tile at $33330: 1 pixel is corrupt.
  5460. Tile at $4BF90: 1 pixel is corrupt.
  5461.  
  5462. Rockman 4 - Aratanaru Yabou! (J) [b1].nes :
  5463. NES header: Initial Mirroring setting is Horizontal.
  5464. Tile at $E020: Slightly different.
  5465.  
  5466. Basically, for most ranges labeled "Unused random data", the contents of those ranges
  5467. seem all different in both the European version and the Rockman 4 version.
Add Comment
Please, Sign In to add comment