+-----------------------------------------+ | visine - Mega Man 1&2 editor - TUTORIAL | | (c)2000-2003 -= Fx3 =- Revision 1.93 ** | +-----------------------------------------+ - Written by Fx3 (http://rocknes.kinox.org). - HLP version converted by J_F is freely available, covering tons of aspects that this tutorial does not. A must read. - visine is entirely coded in C, compiled with DJGPP and Allegro library. It's a masterpiece for Mega Man hacking. Like any other program, it has bugs and a few problems, plus unsupported features. Since I want to share it, you have a great freeware (read: no money) distributed as is, with no warraties. In other words, I cannot be responsible for any damage on your computer, your home, your dog or whatever. Use it at your own risk. Indeed, I'm coding visine as hobby, by learning 6502 ASM and more about the NES videogame. - Any contribution into this tutorial is welcome! - Possible english faults warning, 'cuz I natively speak portuguese... ^_^;; ***************** * WHAT'S NEW? * * revision 1.94 - August xxth 2003, Fx3 * - explaination of TSA types to be used in a stage. * * revision 1.93 - June ??th 2003, Fx3 * - new section: 7.3 - Game information, within a lot of useful tips. * * revision 1.92 - October 13th 2002, Fx3 * - major text fix. * * revision 1.91 - September 28th 2002, Fx3 * - in sync with visine 2.80 * * revision 1.90 - August 12th 2002, Fx3 * - updated for visine 2.70 release. * - major revision, many errors fixed and section 6 has been cutted. * * revision 1.83 - July 27th 2002, Fx3 * - section 2.2 completed and with better explaination for sprite banks. * * revision 1.82 - July 26th 2002, Fx3 * - added new section: 1.4 - special screens (aka NameTables); * - section 2 has been splited into 2 parts: new section 2.2 - sprite banks; * - minor fixes. * * revision 1.81 - July 20th 2002, Fx3 * - Two new know problems added (section 9); * - Fixed MM2 enemy storage concept, thanks J-F (section 2); * - Small fixes in section 3 (colors); * - EngRish fixes. * * revision 1.8 - June 6th 2002, Fx3 * - new known bug added; * - minor additions, slightly updated, better disclaimer; * - engRish fixes; * - FAQ updated. * * revision 1.7 - May 05 2002, Fx3 * - in sync with visine 2.6 and its new features; * - many additions. * * revision 1.6 - Apr 14 2002, Fx3 * - added/modified informations about the palette editor. * * revision 1.5 - Apr 13 2002, Fx3 * - in sync with visine 2.5 and its new features; * - added missing KEY_S information; * - usual fixes. * * revision 1.4 - Apr 8 2002, Fx3 * - added information about the structures; * - usual cleanups and fixes. * * revision 1.3 - Apr 7 2002, Fx3 * - more information about scroll/enemy data; * - cleanups and a few additions. * * revision 1.2 - Apr 6 2002, Fx3 * - finally the scroll issue has been solved. * * revision 1.1 - Apr 6 2002, Fx3 * - added more information about changing the level scrolling. * - added an index for your pleasure; * - general fixes for missing information (like KEY_W). ****************************************************************** INDEX: 0. The interface 1. Structures 1.1 - Copying and pasting a structure 1.2 - Modifying a structure 1.3 - The structure context 1.4 - Special screens (aka NameTables) 2. Enemies and items 2.1 - Basics 2.2 - Sprites banks (of graphics) 3. Colors and palettes 3.1 - Basics 3.2 - Modifying the level palette 4. Attribute table 5. Scrolling and level path 6. Menus and hot keys 6.1 - From F1 to F12 keys 6.2 - More keys 6.3 - The menus: 6.3.1 - General settings (KEY_F8) 6.3.2 - Stage settings (KEY_F6) 6.3.3 - Sound effects (KEY_F7) 6.3.4 - Stage select settings (MM2 only) 6.3.5 - Skull castle settings (MM2 only) 7. General notes 7.1 - Sprites IDs 7.2 - Sound codes 7.3 - Game information 8. Frequently Asked Questions (FAQ) 9. Known bugs and problems <<------------------------------------------------------------------------>> <<------------------------------------------------------------------------>> TUTORIAL ======== 0. The interface - When you launch visine, this is the interface you get: +-> These numbers are: | $level, $page and $room +--------------------------------+ | +--------+ | | $00 | 1 | | | $00 |________| | >Current level< | $00 | 2 | -> Structure selector | | |________| (4 per time) | screen #0 | | 3 | | 7 rows within 8 structures |Structure |________| | + half row |attributes| 4 | | | ^ |________| | | =^= | | | +--------+ | | 0 1 -> | | -> Selected structure | | 2 3 | | | | +--------+ | | $00 01 02 -> TSA blocks used | | ^STR index 03 04 by this structure | | +-----------------+ | | | TSA blocks | | | +-----------------+ +--------------------------------+ TSA TYPE 0 -> TSA type select * This is much better detailed in the J-F's tutorial. //////////////////////////////////////////////////////////////////////////// 1. Structures 1.1 - copying and pasting a structure ************************************* - The levels are made by structures of 32x32 pixels that can be subdivided into 4 parts of 16x16 pixels. The STRUCTURE SELECTOR (right column) is used to pick a structure. Press KEY_TAB for the next 4 or KEY_TILDE for the previous 4. - Right click to pick a structure, Left click to paste it. - Once you picked a structure, it's displayed under the selector. Now, go to the level map and paste it anywhere with a left click. To grab it directly from the level, use a right click anywhere in the level screen. Each screen is composed by 64 structures, 8 at horizontal and 8 at vertical. Because of NES design, the last row of structures are clipped: actually, they are half- displayed. Once you copy one of them, its display will be okay. 1.2 - modifying a structure *************************** - Note: the Wily's Castle, Ending and Password are sublevels. - Warning: as you might know, the levels share data. As examples, Cutman and Wily 1, or Airman and Wily 2. In other words, if a structure looks garbaged, it could be in use by the sublevel. Both games have 256 slots. Editing a "garbaged" structure can affect the sublevel, so be careful. - A structure has the following layout: +----+----+ | 01 | 03 | [01,02,03,04 are TSA blocks - 16x16 pixels] +----+----+ +(T)ile (S)quaroid (A)ssembly | 02 | 04 | ---------------------------- +----+----+ 32x32 pixels * Press KEY_A to activate the attribute mode, KEY_ENTER to finish it. * To change a TSA block, grab one from selector and paste it where you want (blocks 01..04). Notice this TSA block can act as AIR (background), SOLID (standing up), LADDER (climbing up/down), SPIKE (you're history) and more - choose how it will act using the blue bar under the selector. Many levels use #0 as air, #1 as solid, #2 as ladder and #3 as spike. * For Mega Man 1, you can redefine what each slot holds. * To toggle the color attribute (read section 4 - Attribute table), use a right click over a 16x16 structure region (01..04 blocks). 1.3 - the structure context *************************** - visine displays the structure context on selection. On left side, the 4 numbers are the types for the TSA blocks (how they act). On lower right corner, it displays the TSA blocks used by the structure. It helps a lot to identify the structure context. 1.4 - special screens (aka NameTables) ************************************** - Instead of "meta tiles" (a structure), the game still uses the standard screen building - a tiles grid called "nametable". Most of these screens are editable - main title, stage select and Skull Castle. Instead of 32x32 structures, you take the smallest region - the 8x8 tile! Needless to say the attribute table is always 16x16 pixels large. NOTICE ------ * You CANNOT paste tiles over the selected 32x32 region, because this way you will toggle the attribute color. * You CANNOT copy a tile as you would do with structures. Pick a tile at right, from patterns. * Press KEY_F10 to access the stage select screen. If you hit SPACEBAR, the Skull Castle is editable. Hit SPACEBAR again to go back. * Keys F9 (palette editor) and F5 (save changes) still work, but the structure editor (KEY_A) does not - you can toggle the color directly using a left click over a 16x16 region. * Press KEY_Q to access the title screen (Mega Man II only). This editor works exactly like the Boss screen editor. * Press ENTER to exit any of these modes. - The "nametable" is composed by tiles of 8x8 pixels. The grid is 32x30, or exactly 960 tiles to build a screen. Normal levels are nametables too, but "meta tiles" (read: structures) are used for compression purposes. As small note, sprites are obviously used. Currently, visine draws sprites in the Boss screen (eyes and part of their faces). <<------------------------------------------------------------------------>> 2. Enemies and items 2.1 - Basics ************ - Squares of 16x16 pixels within hexadecimal numbers are sprites, like: +---+$1 -> "Slot" used to store this sprite. |///| +---+$00 -> Sprite ID. - For Mega Man 2, there are 2 types: "dark blues" as enemies (like metools) and "light blues" as items (like E-tanks). When you click in a square, it becomes lighter (pink). Needless to say that another click will unselect it. Click in a new location to move it. - While selected, press KEY_HOME/KEY_END to increase/decrease its ID. - To insert/delete sprites, use KEY_INSERT/KEY_DELETE respectively. The new sprite always appears at top left, using the last sprite ID or $01. **TIP - Hold Shift to insert an item. - Light blue sprites (usually items) will not reappear once you collect or defeat them; dark blue objects (usually enemies) will regenerate once their default positions are revisited. Thanks to J-F for this information. - Special sprites can be used to define looping points or certain events. Please, read J-F's HLP version for some detailed information. * General notes (by Vagla): *************************** - MM1 uses a different sprite system than MM2. You can't have any more sprites in a stage than the original stage had, unlike in MM2 where you can have up to 256 in a stage. Thus, in order to insert a sprite, you have to delete one first. - To move sprites, right click on a sprite and then right click where you want the sprite. If you want to finetune the location (moving a sprite by 1 pixel), use +/-. Hold shift to move it in the opposite direction. - To change the sprite ID, press Home or End while a sprite is highlighted. Hold shift while pressing them to change the ID by $10. 2.2 - Sprites banks (graphics) ****************************** - The NES caches 2x256 tiles (background and sprites) in the video RAM. - When editing a level and changing the enemies, notice that sometimes a Sniper Joe becomes garbaged in a certain area on gameplay. That's because the graphics for drawing it are not loaded. Unlike some newer games (like Mega Man VI), the engine does not load it automatically, but fetches certain pre-defined ROM addresses for graphics data loading. An explaination of how it works: * SLOT TO USE - size is 1 byte, format is $AB, with B = 2*A. Example: for slot #3, the bank ID is $36; for slot #4, the ID is $48. The highest value acceptable is #7 ($7E). * ADDRESSES - size is 4 bytes, each slot has 6 addresses, decoded by reading 2 bytes $XXyy. Format: yy selects a $4000 bank, XX an offset (max XX=1F): [ ($XX-$80) + (yy * $04) ] * $1000 * The next 3 pairs of bytes are used for sprites palettes. <<------------------------------------------------------------------------>> <<------------------------------------------------------------------------>> 3. Colors and palettes 3.1 - Basics ************ - The level palette has 32 entries, 16 for background and 16 for sprites. Since entries #x0, #x4, #x8 and #xC are mirrors of background color, only 24 colors are unique (note: x = 0 or 1). - Press KEY_F9 to open the palette editor. There are 2 windows: the upper window is the NES palette within "64" colors (16 per time, press KEY_TAB to toggle the next 16 colors), and the lower window is the level palette. - Press KEY_ENTER to close it. 3.2 - Modifying the level palette ********************************* - Right click to pick a color, Left click to paste it. Fairly obvious you cannot change the NES palette, only the level palette! - Mega Man 2 uses palette rotation to do background animations, like the magma river (Heatman) or waterfalls (Bubbleman). Mega Man 1 does NOT use the same kind of palette rotation, but still does to create the Fire Wall animation on Fireman's stage, which is not supported yet. Rotate the palette by clicking in the "+" and "-" buttons near the level palette window. - Here's the format (palette storage) used by Mega Man 1: * The first 16 colors are the level palette; * The next 16 colors are colors for sprites; * The next 16 colors give the flash animation when MegaMan reaches the boss room (flipping palettes #0 and #1); * As small note, the palette is switched after the first boss door. This is unused because the same palette is copied. Probably it was planned, but removed in the final version). You can use this unused feature by pressing KEY_F4! - For MegaMan 2, you have the -LOCK- option. Let "LOCK ON" to apply the changes for *ALL* palette cycles. <<------------------------------------------------------------------------>> 4. Attribute table ****************** * The NES palette is subdivided in groups of 4 colors. The magic to change the colors lies in the attribute table. Here's a simple palette diagram: BACKGROUND COLORS 00 * 01 * 02 * 03 * 04 * 05 * 06 * 07 * 08 * 09 * 0A * 0B * 0C * 0D * OE * OF +---------------+ +---------------+ +---------------+ +---------------+ attribute #0 attribute #1 attribute #2 attribute #3 <<------------------------------------------------------------------------>> 5. Scrolling and level path *************************** - Taking the first level of Mega Man 2 (Heatman), a ladder appears to climb down after 7 screens: the scroll stops and a roll-up happens. - Press KEY_SPACE to view the level layout (path). Legend is: * Green squares are "normal" rooms; * The white square is the actual screen; * The red square is the boss room (always the last one); * Blue squares are "stop'n scroll" for an horizontal sequence of rooms. - Hit KEY_S to access the scroll data window. Bytes has the following format: $TX -------> T is the scrolling type after X pages. T can be: * 0 - free scroll? * 1 - unused? * 2 - "stop'n scroll" for an horizontal sequence of rooms * 4 - scroll down * 8 - scroll up Examples: $23 to perform a "stop-and-scroll" after 3 pages. $47 to perform a scroll down after 7 pages. ** NOTES: a) For Mega Man 1, use $00 to define the boss room. b) Mega Man 2 uses a few extra settings for scrolling (details below). c) A checkpoint is where Mega Man restarts. Both games have 3 checkpoints: level beginning, mid-point and boss gateway. ** Here's a scroll data example: - Open Mega Man 2, Heatman's level; - Press KEY_SPACE to access the level path viewer; - Now press KEY_S to access the scroll data window; - Okay, you see the following numbers: $47, $40... and a few others. Let's assume you want to SCROLL UP (instead of SCROLL DOWN - default) and after 6 screens (instead of 7 - default). Change the scroll byte from $47 to $86. Now 1 screen is missing: change the next byte from $40 (SCROLL DOWN) to $81 (SCROLL UP after 1 screen) - then, the new path becomes: * * *... ($81) * * ($86) * * * * * * * 0 1 2 3 4 5 6 - AHA! If you play the game, the scroll will NOT stop when screen #6 is reached, hence you can't climb up! To fix the problem, go back to visine, hit KEY_F6 (stage settings), click in "Advanced" and look for: ... SCROLL DATA # 00 02 05 SCROLL LOCK L# 00 09 16 SCROLL LOCK R# 07 13 16 ^^ - Each value works for checkpoints #1, #2 and #3, respectively. - Change the "07" to "06" and save. Go play the game now. NOTE: the enemy graphics data (slots - read section 2.2 for more info) is directly linked with scroll data. It changes when the scroll data changes, be clear. No panic if Sniper Joes are garbaged after a scroll change. * >Some< of the advanced options for Mega Man II are: SCREEN START # - the screen ID to start a level. Notice you must adjust the other fields (of room/page data) to get it working fine. I didn't investigate the format yet, sorry. Have fun with numbers. EVENT START # - the screen ID to start an event, like Force Beams. I didn't investigate how it works, sorry. Have fun with numbers. SCROLL DATA # - affects the scroll data pointer start. Even if you are setting a h-scroll value, the screen will not lock automatically, so you must define it in the next options. SCROLL LOCK L# - the screen number to lock the scroll at left. For checkpoint #1 (level start), default is 00 for main levels (meaning backward screen #00 isn't allowed). SCROLL LOCK R# - the screen number to lock the scroll at right. For checkpoint #1 (level start), default is 09 for Heatman (meaning you cannot advance when screen 09 is reached). It's important for you change it to a valid value if the scroll data is being hacked. <<------------------------------------------------------------------------>> 6. Menus and hot keys 6.1 - From F1 to F12 keys settings: *********************************** - previous level - next level - graphics editor - toggles primary/secondary palettes (MegaMan 1 only) - save changes - stage settings menu - sound effects menu - general settings menu - level palette editor - NameTable editor (MegaMan 2 only -- read more below) - quit the editor (like ESC). - ROM patch menu (read more below) NOTES: 1. The graphics editor edits the selected TSA block. 2. For the ROM patch menu, a ROM address is necessary to fetch/patch data. Input a valid address and click "Get it" to fetch data (1 byte). Input a new byte value and click "OK". NOTICE: this is **NOT** for GameGenie codes. 6.2 - More keys: **************** KEY_ESC - quits the editor. KEY_E - shows the enemy damage level (partial). KEY_A - edits the selected structure; you can replace TSA blocks or toggle the attribute color (right click) of a 16x16 TSA. KEY_T - Next set of TSA blocks in the selector. Select a block with a right click, left click to toggle the palette for better viewing. Hold Shift for the previous set. KEY_SPACE - Level path viewer. To edit the scroll data, hit KEY_S. KEY_TAB - Next set of structures. Use KEY_TILDE for the previous set. KEY_P - For MegaMan 1 only, it changes the current room (screen) used. Hold Shift for the previous room index. MegaMan 1 uses room order. Unfortunately, some of these tables have a weird format, meaning you cannot change them for the following levels: Cut, Wily1, Guts and Ending levels. KEY_W - Weapons colors editor. You can change the MegaMan colors when he's wearing a weapon. KEY_S - For MegaMan 1 only, it displays the TSA blocks used by doors animations (when openning). It shares the same area of the selected structure, be warned. Press Shift+KEY_S for the previous set. Use the selected TSA block to paste (left click). For attribute color, use a right click. KEY_Q - For MegaMan 2 only, it opens the title screen editor, exactly like the Boss select/Skull Castle thing. 6.3 - The menus: * visine has 3 menus for game settings: the GENERAL SETTINGS (F8), the SOUND EFFECTS (F7) and the STAGE SETTINGS (F6). All the values are _hexadecimal_ by convenience. * When you access the NameTable editor (Stage select/Skull Castle), hit KEY_F8 to access a menu within specific settings. 6.3.1 - General settings (KEY_F8) ********************************* << to be rewritten, use J-F's for reference >> - Global settings. It affects the main char (Mega Man jump height, buster properties and more) and many game settings. 6.3.2 - Stage settings (KEY_F6) ******************************* << to be rewritten, use J-F's for reference >> - Settings for the current level only, like Boss properties, counters and much more. They have no global effect in the game. - The TSA select: unlike MegaMan1, you are no more able to change TSA slots 0 and 1 for trivial reasons (00=always air, 01=always solid, else, the game becomes unplayable). So, slots #2 and #3 are free to change. Attribute is: ------------------------------------------------------------- 00=air (background) 01=solid (wall) 02=ladder 03=spikes (gone if touched) 04=water (inside to be exact ^_^) 05=conveyor belt from right to left (found in MetalMan stage) 06=conveyor belt from left to right (found in MetalMan stage) 07=sliding (like ice, found in FlashMan stage) ------------------------------------------------------------- 6.3.3 - Sound effects ********************* << to be rewritten, use J-F's for reference >> - Each event (like the Arm cannon shot) plays a sound. You can change which sound is played by editing the index. Tons of neat settings here! 6.3.4 - Stage select settings (KEY_F8 while editing the Stage Select) ********************************************************************* << to be rewritten, use J-F's for reference >> - Here you can change how it works, like the cursor properties, the Boss chosen screen properties and more... 6.3.5 - Skull Castle settings (KEY_F8 while editing the Skull Castle) ********************************************************************* << to be rewritten, use J-F's for reference >> - The same. You take control of some nice settings while the Skull Castle animation is played, like how the Dr.Wily's ship acts. 7. General notes **************** - Mega Man 2 levels have $2B (43) screens. You cannot create levels larger than 43 screens, already counting the sublevel (read: Wily's stage), the same for structures and sprites (enemies and items): 256 per level. - Moving platforms are not supported (like those found on Guts/CrashMan), plus the Fire Wall and Lava River found on Fireman's stage, and the Force Beams on Quickman's stage. 7.1 - Sprites ID ---------------- * Here's a list about the sprite indexes. It's far to be completed, but special IDs will be placed here. Any help is welcome. << to be written, use J-F's for reference >> 0x68 - DragoDroid's fireshot. 7.2 - Sound codes ----------------- * Here's a list about the sound codes used by game events. It's far to be completed, but special IDs will be placed here. Any help is welcome. << to be written, use J-F's for reference >> 0xFD - Fade out the current music. 0xFF - Stop playing the current music (or no sound). <<------------------------------------------------------------------------>> 8. Frequently Asked Questions (FAQ) NOTE: Annoyances are not welcome. ********************************* 1) Your editor hangs when I press KEY_A (attribute mode), KEY_F9 (palette editor) and KEY_W (weapon editor). A- Dear user, try to press KEY_ENTER to exit any of these modes :D 2) I get the error "Unable to save!" when I hit F5. Why??? A- Please, using Windows Explorer, locate the file (megaman.nes or megaman2.nes), give a right click and select "Properties". Now, the "read only" must be unchecked. More, be sure you are NOT l4mm3 enough to edit from a CD-ROM! 3) Why can't I place any enemy in every level? For example: Kero in Heatman's level... if I do that, i get a graphic error in the game... A- The graphics data is not changed automatically like MegaMan6, but it's defined by a few pointers. So, you must change these pointers in order to get the new enemies looking good. 4) How long can I make a level? A- For MegaMan2, the max number of screens is $2B (or 43 in decimal). For MegaMan1, this value is variable depending of level. 5) I can't edit Wily's stages scroll data for any reason! A- YES, you can. Remember: the levels share data. So, when you are on Heatman's level (for example), press SPACEBAR and then S to access the scroll menu. The white numbers are scroll data for the main level and the blue ones for the sublevel (read: Wily's). The red values are the end-marks for scroll datas. Finally, green $FF is free space. 6) The checkpoints are messed up for MegaMan1 if I touch the scroll! A- True, but if you do minor changes (like $80->$40 for example), so you won't get this issue. That's because MM1 uses a crazy way to define the checkpoints. I have the ROM locations, the same data, but acting in different ways which I didn't crack it yet... :-( <<------------------------------------------------------------------------>> 9. Known bugs OR problems Global ****** - Backup your ROM image before a new visine session. Like any other software, annoyances may appear if you are doing a major change. This problem might be gone in a short future with the bug fixes. Of course: NO PANIC! Use visine and enjoy its power! Mega Man I ---------- - The checkpoints cannot be changed because I didn't crack the format. There are 3 locations (read: ROM addresses) to define a checkpoint. - Special objects (Mega Man I) cannot be moved by 1-pixel basis by default, but I included this option anyways. I concluded it's helpful sometimes ;) The same is valid for a resize: you cannot resize a G-Block (those ones you grab with the G-Weapon) other than 32x32 pixels: it won't work. - Objects support is very limited. For example, the popping blocks won't appear in another screen that they are placed by default. There are problems with the G-Blocks too if popping blocks are used in a level. - Special objects will stop to work if they are deleted. Mega Man II ----------- - When you add/delete enemies in levels that shares data, some enemies may disappear when you enter one of the levels, and if MegaMan restarts, a garbaged enemy can appear. I really don't know what's up... - The initial stage selected can be any level. Btw, the boss chosen screen is messed up for Wily levels (by trivial reasons). - Airman's Tiki heads or Bubbleman's Lantern Fish colors CAN be edited, but the support is still preliminary. - Actually, you cannot redefine sprites palettes (will be supported later). - *Sometimes* if you are editing graphics (F3) and hit ENTER, the TSA block can become garbaged for some unknown reason (annoyance). Please, save the changes before editing graphics. - If you toggle the palette for "special" stages (read: background animations), yes, the original palette is restored on page change. - The scroll data for sublevels is fetched after the first null byte ($00). In other words, if you cut/enlarge scroll data, the sublevel (read: Wily) might become incorrect (wrong data pointer). - The "CHR SET" option (F6 menu - stage settings - graphic bank) does not take effect for level editing. - Support for special palette switching (for Bubbleman and Airman's stages) are limited and preliminary, so wait for a next release to get a proper fix. <<------------------------------------------------------------------------>> <<------------------------------------------------------------------------>> TO BE CONTINUED _END_OF_FILE_