VGMaps

General Boards => Maps In Progress => Topic started by: Master Bait on July 06, 2010, 09:47:00 am

Title: Alien 3 and parallax backgrounds
Post by: Master Bait on July 06, 2010, 09:47:00 am
I started working on Alien 3 for the SNES. There's a cheat code making all gameplay trivial, which I'm thankful for. Also the screen scrolls nicely, revealing all corners without having to walk back and forth 100 times to reach that last row of pixels. All conditions are great except for one thing. The parallax background.

I tried making a search here to find out how to best deal with it but couldn't find any real sollution. So I will create this post and try to be as specific as possible.

I'm using the 'snes9x 1.51 win32' emulator, so I can easily just remove that layer, it will be replaced with plain black. Sadly there's alot of back in the foreground layer preventing me to just use the magic wand tool in Paint.NET to remove all black and slide the background in beneath.

I realize this is a common problem but what is the best sollution?

My ideas are these:

To me the last one seems like the best pick and it also sounds realistic to me  :P
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 06, 2010, 11:37:08 am
Welcome to the most annoying thing regarding SNES mapping! Sadly, there are no magic solution so far regarding this particular problem.

The problem lies with what I think is called the "overscan" color, which should be the first color entry in the background color palette. In very simple terms and as far as I understand, it's basically what appears by default if there's nothing actively displayed.

We've been lucky enough in recent years to see several emulators feature an option to change this color:

-FCEUX (http://fceux.com/web/home.html) for the NES:
You have to open the config file and search for "gNoBGFillColor", then change the number following it to something else, like 100 for a bright pink background.

-Gens (http://www.emulator-zone.com/download.php/emulators/genesis/gens/gens-win32-bin-2.14.zip) with Maxim's Kmod modifications (https://www.vgmaps.com/forums/index.php?topic=540.15) for the Genesis/Sega CD/32X
Go in the following menus: CPU -> Debug -> Layers and you'll get the option to disable individual layers as well as change the background color.

I also just checked Gens Rerecording and Kega Fusion, and neither allows you to do that.

-VBA-M (http://sourceforge.net/projects/vbam/) for the GBA/GB/GBC
I remember getting one of the coders to add the option to change the background color 0 over a year ago. You simply go to the following menus: Tools -> Palette Viewer, then click the "Change backdrop color" button.

As for the SNES, the only option I've found so far is to use vSNES (http://vsnes.aep-emu.de/), a utility which allows you to edit your savestates to view pretty much any information it contains, including the various graphical layers of the screen with any background color you might want. Unfortunately, it only shows the screen that was visible when you saved and a bit more beyond the edges, but that's it. You'd need to save constantly to get everything, making mapping a bit of a chore.

I'll try and look around tonight to see if new tools or emulators came around during the last year to change this sorry state of things. Nope, haven't found anything yet.
Title: Re: Alien 3 and parallax backgrounds
Post by: Will on July 06, 2010, 01:38:23 pm
I'm not sure, but might get a cheat code that can freeze layers. Trop once gave me one that froze the watery wavy screen in the Underwater Grotto of Demon's Crest. Perhaps you should contact him. He'll probably provide you one, whether it works on Zsnes or Snes9x.
Title: Re: Alien 3 and parallax backgrounds
Post by: RT 55J on July 07, 2010, 12:27:46 am
Provided the background doesn't share any colors with the foreground, just leave the background enabled in all your screenshots. You can then individually replace all of the colors in the background with some sort of "magic pink".
Title: Re: Alien 3 and parallax backgrounds
Post by: Maxim on July 07, 2010, 02:51:34 am
It ought to be possible to hack the ROM to change the backdrop colour. If you have the necessary tools, dump the relevant palette and then search the ROM for those values, and edit the one in question.

(My SNES hacking experience is zero but that's how it's likely to work on almost any system.)
Title: Re: Alien 3 and parallax backgrounds
Post by: Peardian on July 07, 2010, 05:25:49 am
Being able to pop open the Memory viewer and change the background color (or any of the tile colors) is the only reason I haven't given up on mapping YTT, since they sometimes use background colors in use by the tiles of the same palette. (Why? :() My favorite color to set it to is F0 F0.


I really wish there was a SNES emulator with the same features as VBA.
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 07, 2010, 05:56:28 am
I checked out the vSNES tool but I couldn't get much out of it. First of all it seemed only compatible with the saves zsnes creates and I'm not friends with zsnes. I gave it (zsnes) a try though. First game I tried didn't even start. Second one starts but no sound (not that it matters but hey, it should work). Manage to save and load. Restart the emulator and load but then all colors get screwed up. Curse zsnes. Finally I manage to open the save in vSnes but I guess I'm many tutorials away from getting anything out of it.

tl;dr - I don't like zsnes and vSnes is complicated.

That said, I'd need alot of tutoring before I could perform any hack on anything  :-[



To turn it around and leaving the background layer on like RT is saying might be possible in some areas. Gonna try it out right now. Will also see if I can reach Trop about that code Will.

Title: Re: Alien 3 and parallax backgrounds
Post by: Trop on July 07, 2010, 09:01:10 am
I already saw this thread and poked around Alien 3 to see what I could do but I couldn't find any wavy backgrounds to freeze.  Which levels are they part of?

A thing about wavy backgrounds; even when frozen they can still move sometimes.  Using DKC2 as an example, if you play a sunken ship level with bg freeze code on to stop wavy movement you'll still get movement as you move.  This means you have space you screen captures at exact intervals to get everything lined up right and it's a pain.

When push comes to shove and you can't freeze a background at all check out the "BgMapper" program here: http://www.pikensoft.com/programs.html
The wave and any other fancy effects will be gone but at least you'll have your background.
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 07, 2010, 09:35:34 am
BgMapper is a DOS application however, and still requires ZSNES savestates, which is why I suggested vSNES because it has more options and it works in Windows.

I know ZSNES development has been pretty much frozen in terms of release for several years, and apparently Snes9x has been too for about a year, so there's little chance of getting a coder to include an option to change the overscan color for either. Are there any other SNES emulator out there with similar accuracy still being actively worked on?
Title: Re: Alien 3 and parallax backgrounds
Post by: Peardian on July 07, 2010, 10:04:10 am
I gave it (zsnes) a try though. First game I tried didn't even start. Second one starts but no sound (not that it matters but hey, it should work). Manage to save and load. Restart the emulator and load but then all colors get screwed up. Curse zsnes. Finally I manage to open the save in vSnes but I guess I'm many tutorials away from getting anything out of it.

tl;dr - I don't like zsnes and vSnes is complicated.
Wow, that's weird. I've used ZSNES since day one and have never had any of those problems. What version do you use? I put my trust in v1.36.


I couldn't figure out how to work BGMapper until I realized I could set it as the default program for savestate files, making it a simple matter of doubleclicking. Now I use it for all my YI mapping. Once I have it open, I just resave the savestate and use Reload Scene. There are still things it can't do, however, like change the bgcolor.
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 07, 2010, 11:41:57 am
vSNES is a bit more elaborate, so it takes a bit more time to browse the layers, but you *can* change the background color, so it can be a life saver.
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 07, 2010, 05:14:35 pm
Guys, thanks alot. Seems like we actually found the sollution to this.

I changed my zsnes to version 1.51 and it now works as expected. I still prefer Snes9x and there was something about it's compatibility with vSnes on the vSnes webpage but I will settle with the combination zsnes + vSnes for now.

I simply open the savestate in vSnes, pick SceneViewer, go straight to the 'layers' tab, and here its already set on 'regular backgrounds' so all I did was picking 'costum' in the 'transparency' box to the right then picked a pigpink color.

We can't consider the case closed just yet tho. I was playing around with it a little and I'm a little puzzled with what is displayed in the 'layers' tab. It's NOT exactly what you see under the 'screen' tab. It's alot more. Hopefully this won't cause any troubles and might even be useful.
It's getting late here and I will put this method into use tomorrow and then get back here for the final verdict.
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 07, 2010, 06:03:31 pm
There's a lot of information available there, not all of which I understand. Basically, vSNES allows you to see pretty much everything your savestate contains. Among other things, the SceneViewer allows you to see everything that was in the video memory when you saved. That's why you can see tiles, sprites, whole sections of the various layers including parts that were off-screen, etc. The fun/challenge is in actually using all those to reconstruct and/or complete what you capture while playing.
Title: Re: Alien 3 and parallax backgrounds
Post by: Peardian on July 07, 2010, 07:09:03 pm
What the savestate gives you is what the game has loaded into memory. The size of these really depends on the game, as some will load more than others. This is exactly what you get when you use VBA's map viewer, though the layers are separated out and not merged. Games will load anywhere from 256x256 to 512x512, or even more if it's something like Mode7 stuff. Too bad VBA doesn't have something to view the sprite arrangements in the same way.
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 07, 2010, 07:23:44 pm
Nevertheless, all emulators should include the same tools (if possible) as VisualBoyAdvance :).
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 08, 2010, 11:28:09 am
When I tried to map again today I came to the conclusion that, like we mentioned, more of the layers are put in the memory than what's currently displayed. Sadly they can be chopped up and put out of order. It also seemed to me that rather then fluidly updating the layer I inspected, it was given to you in chunks. As if you enter a new area as you progress through the level.
Therefore you're prevented from making the graphics overlap to make sure it's in its right position when putting your map together. You simply have to trust that it is cut at the exact right spot. Of course there's no reason why it shouldn't be cut right where it left off plus you should be able to spot if it wasn't. But that is just not how I've been working so far.

Don't know if I made myself clear. English is not my native language. I can sort of see that what I write myself might sound a bit awkward, but I'm still not able to improve it =S
Title: Re: Alien 3 and parallax backgrounds
Post by: Peardian on July 08, 2010, 03:41:17 pm
At least for bgmapper, the position of the tiles upon first loading the scene is related to the camera. There's a button (9?) that lets you automatically position the tiles in the top left corner of each layer's map as it is in memory (as you'd see in VBA). Each room is (typically) it's own separate room file, so the coordinates will always be relative to the current room and not the level as a whole. I hope that is what you were talking about.
Title: Re: Alien 3 and parallax backgrounds
Post by: Trop on July 08, 2010, 04:35:04 pm
OK seriously, which rooms have these parallax backgrounds?  I've looked through a ton of levels and I can't find them.
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 08, 2010, 05:09:57 pm
All of you seem to praise VBA. I should map something using it to see for myself. And hopefully learn something also.

OK seriously, which rooms have these parallax backgrounds?  I've looked through a ton of levels and I can't find them.

Alien 3 on the SNES. Not in the starting corridore but as soon as you enter a door.
Title: Re: Alien 3 and parallax backgrounds
Post by: Trop on July 08, 2010, 05:55:37 pm
Oh, I thought you were talking about something else.  Yeah that can't be fixed with a code because the any code that holds the animation still also causes it to move with you.  Example: 7E002499

BgMapper works great though.  Here's what I made using it and photoshop.  SNES transparencies usually use Linear Dodge.
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 09, 2010, 04:26:31 am
We might misunderstand eachother slightly. Probably because I wasn't clear enough from the beginning. My apologies.

That layer you show us in the picture is another issue and honestly I was thinking of leaving it out.
No, for me the very background is enough hassle.

Hope I can make some sense with my picture.

(http://img686.imageshack.us/img686/8675/kassfrklaring.th.png) (http://img686.imageshack.us/i/kassfrklaring.png/)

As you all can see, it is possible to produce a map from this. It's just that I've always used some overlapping to make sure everything is correct.
Title: Re: Alien 3 and parallax backgrounds
Post by: DarkWolf on July 09, 2010, 07:22:35 am
I'm not sure if the applies to SNES savestates, but back before Maxim made his changes to Gens Kmod, I ripped the Sonic 3 two-player stages by opening the savestate in a hex editor and changing the background color in the video memory.  What I did was make a savestate where I wanted an image, edit the color in the hex editor, load the state while emulation was paused, then took my screen shot.  As soon as I resumed emulation, of course the palette was refreshed so I had to repeat the steps, but it did make it possible to rip these levels.
Title: Re: Alien 3 and parallax backgrounds
Post by: Peardian on July 09, 2010, 07:31:28 am
Ohhhhh I see. It is entirely possible that the background is actually 1024, making it twice as wide as the loading area. It could also be more. Keep moving to the right and see if you can find the other matching piece to what it started with.
Title: Re: Alien 3 and parallax backgrounds
Post by: Trop on July 09, 2010, 09:33:06 am
That's the problem?  You should have just said "the background is too dark".  Here try these in regular old ZSNES:
7E0200FF
7E0202FF
7E0204FF
7E0206FF
7E0208FF
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 09, 2010, 10:17:54 am
That's the problem?  You should have just said "the background is too dark".  Here try these in regular old ZSNES:
7E0200FF
7E0202FF
7E0204FF
7E0206FF
7E0208FF
It works perfectly.
I'm sorry. I tried to explain in my very first post. When I said "make the emulator display an obscure color, like pink (or even better, transparent for the output image), as its background rather than black." this is exactly what I was looking for. I just don't know what the emulators can do if you fiddle with them a little. Especially not zsnes since I don't use it.


About this.
Ohhhhh I see. It is entirely possible that the background is actually 1024, making it twice as wide as the loading area. It could also be more. Keep moving to the right and see if you can find the other matching piece to what it started with.
I made another image to show you.
(http://img517.imageshack.us/img517/4979/ostkaka.th.png) (http://img517.imageshack.us/i/ostkaka.png/)
That it's twice as wide seems accurate. So this method can be used to map faster. But again, look where it is cut on the left side. At the exact same spot as it was in my previous picture.
But actually, this is something good too. If you trust it, you won't even have to figure out where the joint is. It is right where you left off.
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 09, 2010, 02:22:03 pm
That's the problem?  You should have just said "the background is too dark".  Here try these in regular old ZSNES:
7E0200FF
7E0202FF
7E0204FF
7E0206FF
7E0208FF

Out of curiosity, mind explaining what these codes actually do? What memory values are they actually changing, and do they apply to all games (oh please, oh please, say yes...)?
Title: Re: Alien 3 and parallax backgrounds
Post by: Trop on July 09, 2010, 04:43:32 pm
OK this is how this went.  I realized Bait wanted a background re-coloration code when I tried to make a test map myself.  With the main background switched off you get, like Bait said, a black background.  Unfortunately the black in the background is the same black as the black in the foreground.  So the original outline of the foreground is gone and if you try to move the foreground away from the now black background you tear holes in it.  I've encountered this problem before and the only way I was able to fix it was with a code that changed the background color.

This kind of code isn't easy to find or get right but before when I was confused about what Bait wanted I looked around at all the different levels and I remembered one of the last levels has a background that changes color.  Here's what I did:

Enter password SQUIRREL
Walk forward through door immediately in front of you to wind up in a kind of metalworking area
Note the background fades from dark red to bright red
Begin a 1 byte comparative value search
Return to game, allow the color of the background walls to change, return to cheat search as soon as they do
Select != and click the SEARCH button
Repeat the two previous steps until # OF RESULTS: is 50 or less
put in all codes in with VIEW and ADD then switch them on and off testing each until the background stops changing color
Take a working code, like 7E020471, and set the last two numbers as high or low as they will go 7E020400 or 7E0204FF
If only some of the background has changed look for related codes like 7E020632 and follow the pattern
00  02  04  06  08 all starting with 7E02 and, in this case, ending with FF
If this pattern fails in another level or area just push it further with something like 7E03 or 7E01

Remember with ZSNES codes: 7E** (first four numbers) are the base address, the next two numbers will be the more variable address, and the last two just the amount you want with 0 being the lowest and 255 the highest.

So sorry, these codes are just for this game, but the technique should work for any game.  And if there's no cheat gizmo built unto the program you're using give Cheat Engine a try.
Title: Re: Alien 3 and parallax backgrounds
Post by: TerraEsperZ on July 09, 2010, 09:38:07 pm
Ah, I understand. It's a bit more complicated than I thought, but still workable. I was wondering if you simply weren't doing what the latest VBA-M allows you to do, mainly editing the first color entry in the first (background) layer color palette. It's too bad that this method will not work if the background color never changes anywhere during the game, thus preventing you from finding a changing value.
Title: Re: Alien 3 and parallax backgrounds
Post by: Master Bait on July 13, 2010, 10:53:50 am
I've started mapping this game for real now, thanks to all of you.
So far, so good.



Oh, I thought you were talking about something else.  Yeah that can't be fixed with a code because the any code that holds the animation still also causes it to move with you.  Example: 7E002499

BgMapper works great though.  Here's what I made using it and photoshop.  SNES transparencies usually use Linear Dodge.

I managed with this aswell. Only difference is that I got the layer from vSnes and I use Paint.NET so the correct blending mode is called "Additive".
Just wanted to add that. This thread has taught me alot and maybe it can even be of use for someone else some time  :)
Title: Re: Alien 3 and parallax backgrounds
Post by: feos on October 25, 2012, 07:47:10 am
Hi, I created a thread announciing that this problem for SNES games was solved, now backdrop color is a matter of 1 click.
https://www.vgmaps.com/forums/index.php?topic=1859.0