Name: | Single Screen v1.2 |
Author: | TheBiob |
Added: | |
Version History: | View |
Type: | Level |
Includes GFX: | No |
Includes Hijack: | Yes |
Featured: | No |
Description: | This will make the game only show one screen and scroll to the next when the player reaches it. Uses 4 bytes of freeram as well as a hijack to disable the invisible screen barriers. V1.1 Changes Now works with LM3 level sizes Start can optionally be aligned to a screen but isn't required to anymore Options to disable horizontal/vertical scrolling separately More options to change the size of the screen/when the scrolling triggers Removed the "code per screen" feature since I think it doesn't really work with big level sizes* V1.2 Changes Fixed graphics bugging out when pausing the game during a screen transition. You can choose between pausing the transition or not allowing to pause during transitions. (Requested by Final Theory) *yeah, I'm just lazy, if you need that feature you probably know what you're doing anyway so add it yourself. Note: for best results, combine with the sprite scroll fix patch (be sure to change the default free RAM). Without this, sprites may not spawn when the screen is scrolled leftwards. |
Tags: | horizontal lorom sa-1 screen scrolling scrolling |
Comments: | 40 (jump to comments) |
Rating: |
Download
2.33 KiB | 1,003 downloads
Comments (40)
It's been a while since I looked at this but if the sprite scroll fix breaks it, it might be due to a freeram conflict, both of these resources use the same default freeram.
I tried to remove the patch by applying the "remove.asm" (also with UberASM I guessed). UberASM told me:
Luckily its not a big deal as I made a backup before, but does someone know what's going on with these patches?
why would you tell people to use that
You didn't make sure that it only does this once (not constantly (every frame)). If you look at my screen scrolling pipes, the code that returns Mario back to normal does this once is by having the revert code reset the RAM state (sets it to #$00). On the next frame, upon executing uberasm tool code again, it first checks if the RAM state is (already) $00, then skip all that code (including clearing out $9D, the controls, etc.):
You should also note that uberasm tool's level and gamemode 14 executes just before executing $00CDE8 (only runs if $71 isn't $0B), which will later process sprites afterwards. Meaning if you just set $9D, it won't freeze sprites, unless you perform a similar move what I did on setting $71 without messing up the HDMA:
If you don't want these issues, consider this instead.
They do conflict, the vert wrap hijack is a more general version which includes the condition this one uses so you should be able to remove the hijack in this one and have it work fine if you've patched the level wrap one.
Commented it out and everything seems to indeed work fine. Thanks
Yeah, don't patch the VertPrep file and in the vertical wrap uberasm file change "SEC : ROR $1B96|!addr" to "LDA #$AC : STA $1B96|!addr".
They do conflict, the vert wrap hijack is a more general version which includes the condition this one uses so you should be able to remove the hijack in this one and have it work fine if you've patched the level wrap one.
then replace "CMP $13D7|!addr" later in the code with "CMP $0E" (apparently LM doesn't set $13D7 to a meaningful value in vertical levels).
Make sure you have a big enough area for the screen to scroll to. The patch won't scroll vertically if the screen would end up outside the level by doing so (you will have to use horizontal level modes with at least a vertical height of 0x20 tiles to do this with the default settings). If you're trying to get it to scroll downwards, keep in mind that the bottom of the level is also limited by the last screen an object is placed on, similar to vertical levels; to make sure the level scrolls downward to the size you see in LM, just stick a single object somewhere at the very bottom of the level.
Guess I'm not done with requests. Is there any way to make it so that the the screen transitions only horizontally or vertically, and otherwise scrolls as normal?
The code already allows that. Check the asm for customization options.
$9D
to#$30
and this patch immediately sets to#$01
, and I tracked that down as the reason why Mario's animation counter went bonkers.I fixed this issue by adding the following check under
Code main:
edit: this doesn't only affect death, but any other instances of the original game setting its freeze flag as well. I came up with another fix. Under
main:
, replace the firstLDA #$01
with:I don't think the original game ever sets the value
#$FF
, so this should be safe. The problem here is that this code always clears the freeze flag when it ends, so that last snippet should stop it from running at all if the game is already frozen for another reason.Interesting, can't say I've ever ran into problems with it but I guess that makes sense. I'm not sure that check takes everything into account but neither do I know why the retry uses $9D for anything death related in the first place.
The way it currently sets $9D was never optimal in the first place, I was just too lazy to come up with a better way so that's something I should probably look into if I ever decide to work on this again.
Guess I'm not done with requests. Is there any way to make it so that the the screen transitions only horizontally or vertically, and otherwise scrolls as normal?
$9D
to#$30
and this patch immediately sets to#$01
, and I tracked that down as the reason why Mario's animation counter went bonkers.I fixed this issue by adding the following check under
Code main:
edit: this doesn't only affect death, but any other instances of the original game setting its freeze flag as well. I came up with another fix. Under
main:
, replace the firstLDA #$01
with:I don't think the original game ever sets the value
#$FF
, so this should be safe. The problem here is that this code always clears the freeze flag when it ends, so that last snippet should stop it from running at all if the game is already frozen for another reason.I'd recommend reading the readme included in the download
Don't know about the death routine being buggy, might be a freeram conflict, this uberasm uses a pretty common freeram address so not changing it might lead to issues
There's only one thing I want to bring up: the "cut to black" setting feels too jarring. Could there be an option to make it fade to black and back very quickly (or any configurable time)?
Works as intended, accepted.
Probably because they share the same free RAM (both use $60). Change the free RAM address for one of them to another empty address and that should fix it.
(you should check this by default when combining pretty much any uberasm codes, as many use the same free RAM addresses)
Tested with: LM 3.04, UberASMTool 1.4, SA-1 1.32, Snes9x 1.60.
If you pause while the screen scrolls, you get stuck between the two screens and all sprites despawn.
Using Lunar Magic 3.04.
Edit:
Fixed. If you use the Screen Scrolling Pipes, you can not use the default freeRAM. Replace them with these if you have any issues with this code:
Most likely won't work for any of the new level sizes, still want to fix that at some point, but that might take a while.
This should work.
Updated for SA-1 compatibility.
Be sure if you are using this to watch every entrance to the level, not just the main one. If any entrance is off center from a screen boundary, it will create garbage tiles.