| In the first US release, Torchlight Trouble's beam is window 1 reshaped on every line by HDMA. The second start step of 45 entrances (counted), Torchlight Trouble's among them, points HDMA channel 2 at a table in RAM of 224 one-line entries (computed), each writing window 1's left and right edges, all set to 255 and 254, and turns that channel on. Only the 6 entrances whose flag word has bit 2 set (converted from hex), which by the disassembly's names are Torchlight Trouble's start, checkpoint and bonus-room ways in and out, rewrite the table each frame, and only while the game keeps a sprite number for it. The beam starts at a point set by that sprite's position and offsets carried in its current pose, which also carries two slopes, one for the beam's upper edge and one for its lower edge, in 1/256 px a line; when bit 14 of the sprite's attribute word is set (converted from hex), both slopes and the horizontal offset are taken negated. The point's line is held between 0 and 223 (converted from hex). From it, each line up moves the edge by the upper slope and each line down by the lower: with a positive slope the window runs from the edge to 255, with a negative one from 0 to the edge, and once the edge passes the screen's side every line beyond is set back to 255 and 254. Every frame the cave display routine makes the table's first entry 1 line or 3 by the low bit of a counter, so on alternate counts the whole shape sits 2 lines lower (computed). | Global/HardwareRegisters/SNES.asm L480–492Global/HardwareRegisters/SNES.asm L306–307Global/HardwareRegisters/SNES.asm L431–432 | Code |
| In the first US release, Torchlight Trouble dims the stage with color math outside its beam (dkc-av/torchlight-beam-window). The start code of its 6 entrances loads 128 background colors into color memory with every bit inverted, sets color 0, the backdrop, to a gray of 16 of 31 in each channel (converted from hex), writes 255 to both bytes of color 17 (white, converted from hex), and fills the third background layer's map with one tile word (in the value). It puts the third layer alone on the main screen with window 1, inverted, applied to it, and the first and second layers and the sprites on the subscreen, with no color window in use. Color math subtracts the subscreen from the third layer and from the backdrop, and the cave display routine writes the same layers and color math again every frame. Where the third layer shows color 17, 31 less an inverted channel gives the channel back (computed), so the stage shows its own background colors; where the backdrop shows, 16 less the inverted channel leaves the channel 15 lower (computed). While a countdown the game keeps is above 0, each frame takes 1 off it, writes to the backdrop the color the new count picks from four (in the value, for counts 0 to 3), and turns off the main screen's layers and color math, so that frame shows the backdrop alone. | Global/HardwareRegisters/SNES.asm L253–272Global/HardwareRegisters/SNES.asm L336–362Global/HardwareRegisters/SNES.asm L289 | Code |
| In the first US release, the snow stages can wave their third background layer up and down, line by line, with HDMA. The second start step of 15 entrances (by the disassembly's names, Snow Barrel Blast's, Ice Age Alley's and Rambi's bonus room's) builds a table in RAM of 288 one-line entries for that layer's vertical scroll, from a table of 64 values rising from 0 to 127: down the screen the values run 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, then the same below 0, a 32-line wave of up to 2 px either way (computed). The step points HDMA channel 2 at the table and leaves HDMA off. The snow display routine starts the channel one entry further back every 2 counts of a counter it reads, so the wave moves down a line every 2 counts and repeats every 64 (computed), and turns the channel on, with the third layer's map moved to another address in video memory, only while a weather stage the game keeps is 5. | Global/HardwareRegisters/SNES.asm L82Global/HardwareRegisters/SNES.asm L222 | Code |
| In the first US release, Poison Pond lays its third background layer over the rest of the stage at half strength. The second start step of its 2 entrances (by the disassembly's names, its start and its checkpoint) puts the third layer alone on the main screen and the first and second layers and the sprites on the subscreen, and sets color math to add the subscreen at half to the third layer and the backdrop. It turns on HDMA channels 2, 5 and 6; the underwater stages' channel setup points them at tables in RAM that set the second layer's horizontal scroll, the first layer's scroll and the third's down the screen. The other 7 underwater entrances (Croctopus Chase's, Coral Capers', Clam City's and Enguarde's bonus room's) take a second step that turns on channels 2 and 5 and sets the color math's layers and operation and the fixed color from a per-entrance table: adding on the second layer and the backdrop for Croctopus Chase, Coral Capers and Enguarde's bonus room, and subtracting at half on the second layer for Clam City. | Global/HardwareRegisters/SNES.asm L372Global/HardwareRegisters/SNES.asm L431–432Global/HardwareRegisters/SNES.asm L336–362 | Code |
| In the first US release, the game's fades step the screen's brightness by one of its 16 levels at a fixed pace. A control byte beside the brightness copy holds the pace: a value n from 1 to 127 brightens one level every n frames up to full, and 128 plus n darkens one level every n frames down to black, then the byte clears itself. Each frame the copy is written to the brightness register. Every fade-out start in the code uses a pace of 2, so a fade from full brightness to black takes 15 steps and 30 frames (computed); fade-ins start at black with a pace of 2 or, in three places, 3. | Global/HardwareRegisters/SNES.asm L3 | Code |