The routine that draws the status bar onto the screen. The tables get stored in the order of $43x0-$43圆. These four tables indicate the DMA settings and the source address to use for the status bar tiles (the ones that are uploaded at the very beginning of the level). *$008CF7-$008CFE: bottom line of status bar (4 bottom tiles of item box) *$008CC1-$008CF6: Third line of status bar *$008C81-$008C88: top line of status bar (4 top tiles of the item box) Tile array for numbers in bonus star counter.ĭefault status bar tiles info table. On SA-1 roms, this must be called when running on the SNES CPU. SMW calls it every frame in mode 7 bosses (when $0D9B is >= #$80), and the "Easy Mode 7 patch" calls it every frame in mode 7 levels, but you may need to call it manually if you're using mode 7 in special situations (for example, on the Overworld). Routine that updates the mode 7 matrix parameters mirrors at $2E-$34 using the rotation and scale parameters at $36-$38. $210A is never set, since it is only ever used in Mode 0. $008AAB: Default value for $2130, although it's actually stored to the mirror here (i.e. The routine that sets up certain VRAM-related registers in normal levels. Specifically, it clears ram $00-$FF (direct page), $0200-$1FFF, $0681 and the stripe image table (by setting $7F837B to #$0000 and the start of $7F837D to #$FF). This is controlled by the addresses $1BE4 and $1CE6 when they are a non-zero value.Ĭlear RAM subroutine. This routine is the DMA routine in charge of updating layers one and two as needed. Push 24-bit return address (bank -> mid -> lo) Store stripe image pointer (24-bit) to $00-$02 See this thread how the stripe image format works. Uses $00-$02 as a 24-bit pointer to tile data. The subroutine should always be accessed by a JSL. Pointer subroutine: Jump to a 3-byte pointer, the position of the pointer used is "Position after the JSL + 1 + (A*3)". Pointer subroutine: Jump to a 2-byte pointer, the position of the pointer used is "Position after the JSL + 1 + (A*2)". It first initializes the first 100 tiles to be 16x16 (by setting $0420,x to #$02), then jumps in the middle of the standard OAM clear routine (JSL $7F812E). Subroutine that initializes the OAM table in Roy, Morton and Ludwig's rooms. $0086A0 (x8A0) - Change to to cause both player 1 & 2 to be controlled by controller 1. This is the routine that polls the controller and updates $15, $16, $17, $18. This should only be done during a blank period (usually NMI).įills the entire layer 3 tilemap with tile 0x0FC (transparent tile) i.e. To call this routine from outside bank 0 you can JSL to the wrapper at $0084C8. In any case, $12 is reset to 0 before returning. Afterwards, if $12 is #$00, the stripe image length at $7F837B is set to 0 and the terminator $FF is written to the beginning of $7F837D. The pointer is loaded from the table at $0084D0, and then the routine at $00871E is called. Subroutine which uploads the stripe image pointed by $12 to VRAM. Each 24-bit pointer here corresponds to a value of $12, but only multiples of 3 are used (the first pointer is for value $00, the second is for value $03, the third for $06, etc.). Because it upload tiles, it must run in either f- or v-blank (e.g. JSL wrapper for the stripe image uploader (pointer lies in $12), which can be found at $0085D2. How many scanlines the status bar and ceiling use during the battles with Morton and Roy.Ĭode that transfer Sprite OAM mirror (sprite OAM table at $7E0200-$7E041F, a total of 544 bytes) to register $2104 to draw sprites.Ĭopies OAM's extra bits (size and 9th bit X position: %000000SX) data stored in $7E0420, and reformats, or “compacts” each 4 bytes of that into each byte to $7E0400 ( %SXSXSXSX). How many scanlines the status bar uses during the battles with Bowser, Ludwig, and Reznor. How many scanlines the status bar uses during a regular level. Changing all values to (NOP) or jumping over the code effectively mutes all sound. Handles transfers to and from the SPC700 (I/O). One of the frame counters ($13) is also incremented here. It is used to wait for V-blank to complete before executing the code of the next frame. SPC engine upload, sample upload, OAM setup, windowing setup, and RAM clearing all happens here. This is the main part of the SMW initialization routine. The uploaded routine is essentially an unrolled loop which stores #$F0 to all of the OAM mirror($0200) Y positions. This is code is responsible for uploading the OAM clear routine to $7F8000. This takes care of basic initialization such as disabling IRQ, HDMA, DMA, clearing the SPC ports, enabling F-blank, disabling emulation mode, disabling decimal mode, initializing the direct page, and setting up the stack.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |