Language…
2 users online: Gamer_HS, scratch - Guests: 44 - Bots: 328
Users: 65,627 (2,198 active)
Latest user: Bobelo

Status Bar NMI Optimizer v1.1

SMW Patches → Status Bar NMI Optimizer v1.1

Submission Details

Name: Status Bar NMI Optimizer v1.1
Author: Kevin
Added:
Version History: View
Tool: Asar
Requires Free Space: No
Bug Fix: No
Featured: No
Description: This patch rewrites the Status Bar NMI uploader to be faster (no ugly loops, yes ugly optimizations) saving about 0.78 scanlines of v-blank processing on SlowROM/SA-1, or 0.6 on FastROM. No free ram/space required.
Note that this won't work with custom status bars like "Super Status Bar" etc. (also, don't use it if you disabled the layer 3 status bar, of course). Compatible with "RAM Toggled Status Bar".

v1.1 update: added small optimization which saves an additional 6 bytes and 8 cycles (thanks to MarioFanGamer for pointing it out)
Tags: lorom optimize sa-1 v-blank
Comments: 4 (jump to comments)
Download 584 bytes | 272 downloads

Comments (4)

Burning Loaf Link
Tested with:
  • Mesen 2.0.0
  • Lunar Magic 3.33
  • SA-1 Pack 1.40
  • Asar 1.81

Confirmed by debugging that the end result is the same but faster. Approved.
 MarioFanGamer From older version: Status Bar NMI Optimizer Link
Code
    ldx.w #$0EF9|!addr : stx.w !dma_reg+2
    stz.w !dma_reg+4
    ldy.w #$001C : sty.w !dma_reg+5
...
    ldx.w #$0F15|!addr : stx.w !dma_reg+2

Since DMA increments its source register, couldn't you just drop the last line and save on six more bytes?
 Kevin Author From older version: Status Bar NMI Optimizer Link
Probably, I'll check
Burning Loaf From older version: Status Bar NMI Optimizer Link
Tested with:
  • Asar 1.81
  • Lunar Magic 3.33
  • SA-1 Pack 1.40
  • Mesen 2.0.0

Works well. Much less wasteful than the vanilla routine.