Old threads can be found here:
Sprite/Block/HDMA/ASM Code Library
Advanced documentation
Put any SMW related code or documentation related to the SNES here. I will try to keep this updated, and hopefully more mods can help with that.
Random codes:
Blocks:
Change Map16 Number (load the Map16 tile in X, it can be 8-bit or 16-bit)
Causes a block to disappear
Causes a block to shatter
Causes a block to shatter on sprite contact
Check which side of a block Mario touched
Template block
Get Map16 number given a blocks position
Sprites:
GetDrawInfo
Clipping routines for checking contact between the player and a sprite, or two sprites
Causes the sprite to explode like a Bob-omb
Draw smoke at sprite's position
Stores Mario to the sprite position
Stores sprite to Mario's position
Horizontal proximity check
Vertical proximity check
Spawn a normal sprite
Spawn a custom sprite
Spawn an extended sprite
Set sprite (extended, regular or minor extended) speed based on Mario's speed
Cape collision detection
Fireball Contact Routine
Sprite Interacts With Map16 Tile xxx.
Sprite Aiming Routine
HDMA:
Inverse colors
Translucent color window
Layer scrolling macros
Bright blue to darker blue, background colour gradient. ($2132)
Blue sky gradient
Green sky gradient (Image)
Pink sky gradient (Image)
Night sky gradient (Image)
Sunset gradient (Image)
Window effect (Image)
Wavy HDMA effect
HDMA Brightness gradient
Vertically Scrolling Parallax Scrolling
Misc:
SA-1 base code
VRAM and CGRAM macros
Square root approximation routine
Multiplication routine
Code to get the map16 number of the block at any given position.
Find the number ($13BF format) of the level the current player is on.
Make certain tiles slippery without using custom blocks
Close the VWF dialogue and exit to the overworld
ROM->RAM DMA transfer macro
ExecutePtr macros
Circle routine
Yoshi's Earthquake
Pointer Subroutine
Random Number Generation (Ersanio)
Random Number Generation (1024)
Reset the game
The for() loop in ASM
Lose Yoshi
Convert time to binary
Use JSL with RTS
Hex -> Dec (short)
Hex -> Dec (long)
Show value of a RAM address on the status bar
Layer 3 scroll (left and right codes included)
Stop level at a certain screen
Disable P-switch music when using AMK
Advanced documentation:
HDMA and DMA stuff...
This site has almost everything: ASM, SPC-700, DMA transfer and the Super FX chip, and much more...
Another ASM tutorial
SNES dev. Manual | Version with searchable text layer
Complete listing of opcodes
65c816 ASM opcode matrix
Advanced DMA stuff
Useful information about SNES itself. (visit the links)
In-depth look in SNES registers <-- MUST-HAVE in my opinion
Another document about DMA and HDMA and other stuff...
A VERY detailed ASM tutorial
Another great tutorial about ASM.
A SMWiki category I've mostly worked on, based on ASM
ASM Workshop summary
Ersanio's GENERAL ASM tutorial
Iceguy's SMW ASM tutorial
How to use the opcode MVN $XXXX
Document about DMA and HDMA
ASM workshop 2012 logs: Basic workshop | Intermediate workshop | Intermediate part 2 | Advanced workshop
Other:
SNES INIT <-- Routine to initialize SNES hardware registers (in a homebrew ROM for example)
SNES-SPC700 Sound File Data v0.30 <-- .spc file format
SPC700.log
Sprite/Block/HDMA/ASM Code Library
Advanced documentation
Put any SMW related code or documentation related to the SNES here. I will try to keep this updated, and hopefully more mods can help with that.
Random codes:
Blocks:
Change Map16 Number (load the Map16 tile in X, it can be 8-bit or 16-bit)
Causes a block to disappear
Causes a block to shatter
Causes a block to shatter on sprite contact
Check which side of a block Mario touched
Template block
Get Map16 number given a blocks position
Sprites:
GetDrawInfo
Clipping routines for checking contact between the player and a sprite, or two sprites
Causes the sprite to explode like a Bob-omb
Draw smoke at sprite's position
Stores Mario to the sprite position
Stores sprite to Mario's position
Horizontal proximity check
Vertical proximity check
Spawn a normal sprite
Spawn a custom sprite
Spawn an extended sprite
Set sprite (extended, regular or minor extended) speed based on Mario's speed
Cape collision detection
Fireball Contact Routine
Sprite Interacts With Map16 Tile xxx.
Sprite Aiming Routine
HDMA:
Inverse colors
Translucent color window
Layer scrolling macros
Bright blue to darker blue, background colour gradient. ($2132)
Blue sky gradient
Green sky gradient (Image)
Pink sky gradient (Image)
Night sky gradient (Image)
Sunset gradient (Image)
Window effect (Image)
Wavy HDMA effect
HDMA Brightness gradient
Vertically Scrolling Parallax Scrolling
Misc:
SA-1 base code
VRAM and CGRAM macros
Square root approximation routine
Multiplication routine
Code to get the map16 number of the block at any given position.
Find the number ($13BF format) of the level the current player is on.
Make certain tiles slippery without using custom blocks
Close the VWF dialogue and exit to the overworld
ROM->RAM DMA transfer macro
ExecutePtr macros
Circle routine
Yoshi's Earthquake
Pointer Subroutine
Random Number Generation (Ersanio)
Random Number Generation (1024)
Reset the game
The for() loop in ASM
Lose Yoshi
Convert time to binary
Use JSL with RTS
Hex -> Dec (short)
Hex -> Dec (long)
Show value of a RAM address on the status bar
Layer 3 scroll (left and right codes included)
Stop level at a certain screen
Disable P-switch music when using AMK
Advanced documentation:
HDMA and DMA stuff...
This site has almost everything: ASM, SPC-700, DMA transfer and the Super FX chip, and much more...
Another ASM tutorial
SNES dev. Manual | Version with searchable text layer
Complete listing of opcodes
65c816 ASM opcode matrix
Advanced DMA stuff
Useful information about SNES itself. (visit the links)
In-depth look in SNES registers <-- MUST-HAVE in my opinion
Another document about DMA and HDMA and other stuff...
A VERY detailed ASM tutorial
Another great tutorial about ASM.
A SMWiki category I've mostly worked on, based on ASM
ASM Workshop summary
Ersanio's GENERAL ASM tutorial
Iceguy's SMW ASM tutorial
How to use the opcode MVN $XXXX
Document about DMA and HDMA
ASM workshop 2012 logs: Basic workshop | Intermediate workshop | Intermediate part 2 | Advanced workshop
Other:
SNES INIT <-- Routine to initialize SNES hardware registers (in a homebrew ROM for example)
SNES-SPC700 Sound File Data v0.30 <-- .spc file format
SPC700.log