Screen Flag for "Powerups Unlock Scroll"

Post Reply
User avatar
Raftronaut
Posts: 340
Joined: Mon Sep 03, 2018 4:47 pm

Screen Flag for "Powerups Unlock Scroll"

Post by Raftronaut » Thu Mar 28, 2019 6:13 pm

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?
Space Raft demo updates: [url]http://nesmakers.com/viewtopic.php?f=52&t=2867[/url]

Chiptune:[url] https://soundcloud.com/user-634230995-350638590 [/url]
User avatar
Mugi
Posts: 813
Joined: Thu Dec 27, 2018 8:30 pm

Re: Screen Flag for "Powerups Unlock Scroll"

Post by Mugi » Thu Mar 28, 2019 6:18 pm

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.

Code: Select all

LDA screenflags
ORA #%00001000
STA screenflags
should do the trick.
"what are you up to?" "Oh, not much... just... Parallaxing"
- Raftronaut
User avatar
Raftronaut
Posts: 340
Joined: Mon Sep 03, 2018 4:47 pm

Re: Screen Flag for "Powerups Unlock Scroll"

Post by Raftronaut » Tue Apr 23, 2019 8:03 pm

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?
Space Raft demo updates: [url]http://nesmakers.com/viewtopic.php?f=52&t=2867[/url]

Chiptune:[url] https://soundcloud.com/user-634230995-350638590 [/url]
Post Reply