Claim set · data/claims/smw-av.yaml

Super Mario World graphics and sound (SMWDisX)

Game: Super Mario World.

The game keeps a Mode 7 angle, 0 to $1FF for a full turn, and an X and a Y scale, $20 for 1.0, and turns them into the matrix with a quarter-wave sine table of 129 entries; D copies A and C is −B, a rotation scaled per axis. smw-av/mode-7-matrix

About: Super Mario World Mode 7

Value
{
 "fullTurn": 512,
 "unitScale": 32,
 "sineEntries": 129
}
CodeSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L1303-L1318CalculateMode7Values: ; Subroutine to convert mode 7 X/Y Scale and angle into A/B/C/D Matrix values. … LDA.B Mode7ParamA ;\ D <- A STA.B Mode7ParamD ;| C <- -B … ;| Essentially converting values from X axis to Y axis by rotating by 90 degrees.SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L1319LDA.B Mode7Angle ; A value of $0200 here equals 360 degrees.SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L1371-L1374LSR #5 ; Scale of $20 = 1.0 … M7SineWave: ; Sine LUT, from 0->pi/2 rad, 129 entriesSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L379-L412Mode7Lagging: ; Transfer various RAM mirrors to the registers … LDA.B Mode7ParamA STA.W HW_M7A … LDA.B Mode7ParamD+1 STA.W HW_M7DChecked by claude-agent, 2026-10-21 — read CalculateMode7Values, CalcBasisVector's sign handling per quadrant, SineAndScale, and the NMI's copy of the four parameters to M7A-M7D

The Reznor and Iggy/Larry room setups (bank_00.asm#L2820,

Cited by: Mode 7

In the Reznor fight the Reznor in sprite slot 7 sets the Mode 7 center to $80 and adds 1 to the angle each frame, wrapping at $1FF, so the Mode 7 wheel the four Reznors ride (the "Reznor sign" in the comments) turns once every 512 frames. smw-av/reznor-wheel

About: Super Mario World Mode 7

Value
{
 "anglePerFrame": 1,
 "framesPerTurn": 512
}
CodeSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_03.asm#L3194-L3206Reznor: INC.W ReznorOAMIndex LDA.B SpriteLock BEQ + JMP DrawReznor + CPX.B #$07 BNE CODE_039910 … LDA.B #$80 ; \ Set radius for Reznor sign rotation STA.B Mode7CenterXSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_03.asm#L3219-L3223LDA.B Mode7Angle ; \ Rotate 1 frame around the circle (clockwise) CLC ; | $37,36 = 0 to 1FF, denotes circle position ADC.W #$0001 ; | AND.W #$01FF ; | STA.B Mode7Angle ; /Checked by claude-agent, 2026-10-21 — read the Reznor sprite routine from its entry to the angle step; the step sits on the slot-7 path, and SpriteLock skips it

Cited by: Mode 7

In the Mode 7 boss rooms other than Bowser's, the NMI sets Mode 1 for the status bar at the top of the frame, and an interrupt at the line where the bar ends switches to Mode 7 and writes the Mode 7 layer's scroll; the bar ends at line 36, or 45 in Morton's and Roy's rooms. Bowser's room skips the status bar interrupt and goes straight to Mode 7. smw-av/mode-7-split

About: Super Mario World Status bar split

Value
{
 "mode": [
  1,
  7
 ],
 "splitLine": 36,
 "splitLineMortonRoy": 45
}
CodeSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L379-L381Mode7Lagging: ; Transfer various RAM mirrors to the registers LDA.B #!HW_BG_BG3Pri|!HW_BG_Mode1 STA.W HW_BGMODESMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L413-L421LDA.W IRQNMICommand ;\ LSR A ;| Branch if not in Bowser's room. BCC + ;/ … LDA.B #!HW_TIMEN_NMI|!HW_TIMEN_JoyRead ;\ Skip the status bar IRQ and immediately prepare the registers after. JMP CODE_0083F3 ;/SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L423-L433LDY.B #!StatusBarHeight ;\ Scanline the status bar ends at in Iggy/Larry/Ludwig/Reznor's rooms. … LDY.B #!StatusBarHeight+9 ;/ Scanline the status bar ends at in Morton/Roy's rooms. + JMP CODE_008294 ; Prepare IRQ, and set up a couple more registers.SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_00.asm#L505-L519CODE_0083F3: ; IRQ done; wait for H-blank, then update registers. … LDA.B #!HW_BG_Mode7 STA.W HW_BGMODE LDA.B Mode7XPos STA.W HW_BG1HOFS … STA.W HW_BG1VOFSSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · constants.asm#L57!StatusBarHeight = 36Checked by claude-agent, 2026-10-21 — read the NMI's Mode 7 branch, its choice of IRQ line, and the IRQ path that sets Mode 7; the IRQ routine branches there when IRQNMICommand's bit 7 is set

In Morton's, Roy's, and Ludwig's rooms a second interrupt at line 174 (!BossFloorHeight) restores the main mode for the floor (bank_00.asm#L487-L494).

Cited by: Mode 7, Status bar split

The sound engine runs on the SPC700. Its set-instrument command ($DA) reads a 5-byte entry from a table in audio RAM at $5F46 and writes the first four bytes to the voice's DSP registers, the sample number (SRCN), ADSR1, ADSR2, and GAIN, and keeps the fifth as a pitch multiplier, so every instrument is a recorded sample with an envelope. smw-av/instruments

About: Super Mario World Sampled sound

Value
{
 "entryBytes": 5,
 "table": "$5F46"
}
CodeSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_0E.asm#L1-L8SPC700Engine: … arch spc700SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_0E.asm#L1174-L1215VCmd_DA: CALL NextVCmd46 ; vcmd DA: set instrument; … MOV Y,#$05 MOV.B ARam_14,#$46 MOV.B ARam_15,#$5F APU_0D56: MUL YA ; set sample A in bank at $14/15 width Y; … OR A,#$04 ; voice X SRCN; … CMP Y,#$04 BNE - ; set SRCN, ADSR1/2, GAIN; MOV.B A,(ARam_14)+Y POP X MOV.W ARam_0210+X,A ; set pitch multiplierChecked by claude-agent, 2026-10-21 — read the $DA handler: the instrument number less 1 times 5 plus $5F46 points at the entry, four bytes go out through the DSP address and data ports starting at the voice's register 4, and the fifth is stored per voice

The source credits loveemu with disassembling the SPC700 engine. The samples themselves sit in the repository as BRR files (samples/), which the atlas doesn't read.

Cited by: Sampled sound

The engine's main loop waits on timer 0, set to tick every 2 ms; for each tick it adds the song's tempo byte to an 8-bit accumulator, and on a carry out it calls the routine APU_0BC0, unless a flag at audio RAM $0388 is set. That routine wasn't read; the structure suggests it is one step of the music, which would make the tempo set the step rate. The tempo starts at $36, which gives 500 × 54 / 256, about 105 carries a second. smw-av/tempo

About: Super Mario World Music driver

Value
{
 "timerMs": 2,
 "initialTempo": 54,
 "carriesPerSecond": 105.5
}
CodeSMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_0E.asm#L56-L62MOV A,#$10 MOV.W HW_TIMER0,A ; set timer0 freq to 2ms MOV A,#$36 MOV.B MasterTempo+1,A ; set $51 to #$36 MOV A,#$01 MOV.W HW_SPCCONTROL,A ; start timer 0SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_0E.asm#L63-L95APU_Loop: MOV.W Y,HW_COUNTER0 ; main loop BEQ APU_Loop ; wait for counter 0 increment; … + MOV.B A,MasterTempo+1 POP Y MUL YA CLRC ADC.B A,ARam_49 MOV.B ARam_49,A BCC APU_058D MOV.W A,ARam_0388 BNE + CALL APU_0BC0SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX) · bank_0E.asm#L1294-L1298CALL NextVCmd46 ; vcmd E2: tempo; … MOV.B MasterTempo+1,A MOV.B MasterTempo,#$00Checked by claude-agent, 2026-10-21 — read the timer setup, the main loop's two accumulators (sound effects at a fixed $38 per tick, music at the tempo), and the tempo command

The 8 kHz timer base behind "2ms" is the disassembler's comment. A song's own tempo command replaces the starting $36.

Cited by: Music driver