Okay, I've got a working title screen upon startup. Now it's time to go somewhere with it. The flowchart for Project Alpha dictates that there are only two ways out of the Title Screen, the main one being pressing Start to transition to Level Zero. Since Level Zero represents actual gameplay, the time has come to get serious about the Main Program Loop (which is currently just a frame counter).
After considering various approaches, I've drafted the following as my tentative blueprint:
1) Music/Sound Updates (tail-end of NMI)
2) Frame Counter Advance
3) Transition Check:
Are we transitioning? This will be determined by a zero-page status byte normally set to zero (null). #01 = Activate Transition, which JSR's to a special handling routine. #FF = Transition-in-progress, which JMP's to the upkeep handler part of that routine.
This will handle stuff like the Title Screen --> Level Zero fade-out/fade-in sequence, transitions to and from the status subscreen, transitions between levels and perhaps even transitions within them (horizontal area to vertical area, etc.).
4) Mode-Specific Branching
This is the one I'm most curious about, as it's either really right or really wrong. I figured that because not every part of the game is going to require the same checks & updates, it could be advantageous to have multiple versions of the MPL (with the branch point positioned after all of the "universal" stuff).
Branching is based on the current "macromode", of which I've determined six: title screen, active gameplay, subscreen, password screen, game over screen, ending/credits. (Ironically, the first thing I've got down for each branch is a check on controller input...)
These roads will all converge in the end, if only to experience the timeless delight of "A9-00-F0-FC".
After considering various approaches, I've drafted the following as my tentative blueprint:
1) Music/Sound Updates (tail-end of NMI)
2) Frame Counter Advance
3) Transition Check:
Are we transitioning? This will be determined by a zero-page status byte normally set to zero (null). #01 = Activate Transition, which JSR's to a special handling routine. #FF = Transition-in-progress, which JMP's to the upkeep handler part of that routine.
This will handle stuff like the Title Screen --> Level Zero fade-out/fade-in sequence, transitions to and from the status subscreen, transitions between levels and perhaps even transitions within them (horizontal area to vertical area, etc.).
4) Mode-Specific Branching
This is the one I'm most curious about, as it's either really right or really wrong. I figured that because not every part of the game is going to require the same checks & updates, it could be advantageous to have multiple versions of the MPL (with the branch point positioned after all of the "universal" stuff).
Branching is based on the current "macromode", of which I've determined six: title screen, active gameplay, subscreen, password screen, game over screen, ending/credits. (Ironically, the first thing I've got down for each branch is a check on controller input...)
These roads will all converge in the end, if only to experience the timeless delight of "A9-00-F0-FC".