Screen Flag for "Powerups Unlock Scroll"


I'd like to duplicate the monsters unlock scroll function in my shooter module screen flags and modify it to unlock scrolling after all powerups on screen have been collected. I would like replace the "screen scrolls L" flag for this function, which is number Six down in my screen flags list (which I understand needs to be counted form the bottom in hex making the number two. I have zero ASM experience, but after watching the Bits and Flags tutorial I assume I will need to:

-Change Project labels->screenflags->Screen Scrolls L *change to: Powerups unlock scroll

-Modify the scroll script under bit 02 (for the corresponding flag slot) to tell the system to resume scrolling after all powerups are collected.

Is my logic here correct? Or do I need to create a new macro to tell the system to begin scrolling after powerups are checked, and then update the scrolling script for BIT 02 to point to that macro?


you're more or less right.
you will have to track down from the code where the bit is originally used (search for where screenflags is loaded and something is done to this bit #%00001000 ) then disable that use.
then set whatever code you want to use this bit to set it in code.

assuming you want the auto scroll to resume when this bit is set, you just search for where the original autoscroll resume happens, and make it set this bit.

LDA screenflags
ORA #%00001000
STA screenflags

should do the trick.


Still a bit foggy on this, Started searching for the code that checks to see if monsters are clear before restarting auto scroll so I can make a copy and edit it so I can have a new additional screen flag to check to see if all powerups are cleared before commencing scrolling..... but then the forums went down so I decided to focus on famitracker instead.

Can anyone help me locate the area in the code i'll need to copy/paste/edit to make a new function for this screen flag?
Top Bottom