Author
|
Topic: Need a bit of expertise with BoF2. (Read 2 times)
|
Ryusui
Guest
|
|
« on: March 21, 2008, 05:11:56 pm » |
|
I know what needs to be done, but I'm scouring the docs and coming up with squat.
Here's the thing. The reason the Dragon's Tear displays behind the frame in the status screen in BoF2 is because BG3 is set to be translucent, which means the solid black outlines for d4s' font and the shadows on mine display as transparent. d4s' cheapo fix (possibly due to the same lack of documentation that's tripping me up) was to have BG3 display over everything else (this is denoted in VSNES by the check flag under "Screen" that says "BG3 p1 on top"), rather than disable the translucency effect. The good news: now black displays properly. The bad news: now the Dragon's Tear is obscured by the frame.
Qwertie's doc is clueless, and while there's an extensive guide on SNES color math there is absolutely nothing in it that tells me how it's actually done (and hence how I can disable it). Can anyone offer some assistance?
|
|
|
|
MathOnNapkins
Guest
|
|
« Reply #1 on: March 21, 2008, 05:43:59 pm » |
|
Have you consulted Anomie's Register doc, first of all? Qwertie's doc is okay for a lot of things, but pretty damn out of date in the year 2008. Keeping BG3 (I call it BG2 myself, but whatever) from being translucent would be a matter of taking it off the subscreen. I believe the register is called "subscreen designation," or $212D. Once you deactivate BG3 from the subscreen you'll need to add it to the main screen to display. This is accomplished by setting the corresponding bit in "main screen designation" or $212C that you disabled in $212D. I think that should fix the problem. You might also need to fiddle with register $2131, but that controls which BGs (as well as Obj) that color math are applied to.
|
|
|
|
creaothceann
Guest
|
|
« Reply #2 on: March 21, 2008, 09:09:04 pm » |
|
It's probably 2131. By activating BG3 on the mainscreen and deactivating color math for BG3 it should become solid.
(Note that a background by itself doesn't have any settings that control if its translucent - it's how the mainscreen and the subscreen are configured and combined.)
|
|
|
|
Ryusui
Guest
|
|
« Reply #3 on: March 22, 2008, 03:12:30 am » |
|
Thanks for the help, but I'm still having problems.
I can disable the BG3 priority bit and translucency easily enough, but here's the killer part: BG2 obscures BG3 if I don't use either the priority bit or translucency. As in, it blocks out BG3 completely. I looked at Anomie's doc and there doesn't seem to be a mode where BG3 will fit between BG2 and the sprites...
|
|
|
|
creaothceann
Guest
|
|
« Reply #4 on: March 22, 2008, 04:39:52 am » |
|
Could you upload a savestate?
Maybe you'll need to swap the contents of BG2 and BG3.
|
|
|
|
Ryusui
Guest
|
|
« Reply #5 on: March 22, 2008, 12:25:42 pm » |
|
Maybe I do...>_> There's some funky HDMA work as well...something tells me that'll cause problems, too. EDIT: Here. http://sixtybillionman.tripod.com/bof2.007http://sixtybillionman.tripod.com/bof2.008Both are Snes9x savestates. The top one was taken in the regular U.S. ROM...the fonts are mine, however. Basically, the modified and unmodified ROMs have the same filename save for the extension, so save states I make in one can be loaded in the other. The second one was taken in my WIP, but it should still be compatible with d4s' version. Unfortunately, something is eating my bandwidth, so I have to use my crappy old Tripod service. Sorry.
|
|
« Last Edit: March 22, 2008, 01:03:14 pm by Ryusui »
|
|
|
|
creaothceann
Guest
|
|
« Reply #6 on: March 22, 2008, 01:17:55 pm » |
|
You can also display BG3 on top of the other backgrounds with the following configuration:
mainscreen: - BG3 enabled - color math enabled for backdrop pixels
subscreen: - BG1 enabled - BG2 enabled
Enabling color math for the backdrop means that the subscreen is applied to the transparent mainscreen pixels, in this case BG3. Sprites could also be enabled on mainscreen or subscreen, depending on if they should be displayed in front of or behind BG3.
|
|
|
|
Ryusui
Guest
|
|
« Reply #7 on: March 22, 2008, 03:00:07 pm » |
|
And OBJ/Sprites will still display on top of everything else?
EDIT: It seems I haven't explained my situation well enough. As it happens, the game already does what you suggested (except for subscreening BG2, which disables the HDMA gradient and makes BG2 obscure BG3)...I can tweak the bits going into the mainscreen/subscreen/color math registers and produce the exact same effect as the original version (which, yes, displays the sprites over BG3), but the problem is it's still semitransparent. I want it to look solid, like you see in the savestate I gave you for d4s' German version, but with the Dragon's Tear (sprite) displaying over everything else.
Is there any combination for the registers I can use to achieve this effect? Or is this gonna take some serious rip-and-tear-type hacking?
|
|
« Last Edit: March 22, 2008, 04:58:49 pm by Ryusui »
|
|
|
|
creaothceann
Guest
|
|
« Reply #8 on: March 22, 2008, 04:52:03 pm » |
|
Only if they're on the mainscreen and have a higher priority. top: mainscreen OBJ with priority 3 +/- subscreen if color math on OBJ mainscreen BG1 with priority 1 +/- subscreen if color math on BG1 mainscreen BG2 with priority 1 +/- subscreen if color math on BG2 mainscreen OBJ with priority 2 +/- subscreen if color math on OBJ | mainscreen BG1 with priority 0 +/- subscreen if color math on BG1 V mainscreen BG2 with priority 0 +/- subscreen if color math on BG2 mainscreen OBJ with priority 1 +/- subscreen if color math on OBJ mainscreen BG3 with priority 1 +/- subscreen if color math on BG3 mainscreen OBJ with priority 0 +/- subscreen if color math on OBJ mainscreen BG3 with priority 0 +/- subscreen if color math on BG3 bottom: backdrop +/- subscreen if color math on BACK Here's a simplified diagram of Mode1. The SNES goes through the list and stops at the first non-transparent mainscreen pixel. If color math is enabled for that layer then the subscreen pixel (from any layer) is added/subtracted. By enabling color math for the backdrop (in case of the mainscreen this is palette color 0), the layers enabled on the subscreen appear under any layers enabled on the mainscreen.
|
|
|
|
Ryusui
Guest
|
|
« Reply #9 on: March 22, 2008, 11:59:38 pm » |
|
I edited my above post while you were writing that, it seems. Could you take another look?
|
|
|
|
MathOnNapkins
Guest
|
|
« Reply #10 on: March 23, 2008, 04:05:35 am » |
|
So this is your desired setup, correct? :
drawn first
1. BG1 / 2 2. BG3 3. all sprites (Obj)
all with no translucency affects, right?
If so, I was able to produce this setup. It involves taking creaothceann's idea about adding the subscreen to the backdrop and placing everything else you want to display on the main screen. I had to fiddle with it a bit b/c LTTP uses the windows / color windows somewhat implicitly in the background and it's easy to forget about them. I was already familiar with this sort of thing already b/c LTTP adds BG1 to the backdrop in dungeons to achieve the "this floor is under this other floor" effect, but I never thought anyone would want to put BG3 below the sprites too...
|
|
|
|
creaothceann
Guest
|
|
« Reply #11 on: March 23, 2008, 04:29:53 am » |
|
Argh, didn't see this until now. Unfortunately the files seem to be corrupt. Could you upload them via rapidshare/megaupload/... ?
|
|
|
|
|
creaothceann
Guest
|
|
« Reply #13 on: March 23, 2008, 01:37:59 pm » |
|
Just to clarify, is that sleeping bug thing at the top the Dragon's Tear? (EDIT2: Nope, but doesn't matter.)
Anyway, if you get translucent graphics it means that color math is enabled for them + they're on the mainscreen but not on the subscreen.
- OBJ enabled on the mainscreen - BG3 enabled on the mainscreen - BG2 enabled on the subscreen - "BG3 p1 on top" bit disabled - color math disabled for everything but the backdrop
This should display the sprites -> status screen -> background, whatever comes first.
EDIT: Of course the colored HDMA background might interfere with that - I don't know how d4s accomplished it. EDIT2: He uses the color constant, i.e. the background of the subscreen... I've written something about that on the next page.
|
|
« Last Edit: March 23, 2008, 02:34:00 pm by creaothceann »
|
|
|
|
Ryusui
Guest
|
|
« Reply #14 on: March 23, 2008, 02:14:43 pm » |
|
Just to clarify, is that sleeping bug thing at the top the Dragon's Tear? Er, no. It's a Li'l Goblin and if you're in an area where there are random encounters, it starts dancing. Go to Status or Equip; the Dragon's Tear will appear in the same place. In the original, it appears in front of the background frame (the way I want it), while in the retranslation it currently appears behind the frame. I can fix it, but the frame (and text) becomes semitransparent as a result. Anyway, if you get translucent graphics it means that color math is enabled for them + they're on the mainscreen but not on the subscreen.
- OBJ enabled on the mainscreen - BG3 enabled on the mainscreen - BG2 enabled on the subscreen - "BG3 p1 on top" bit disabled - color math disabled for everything but the backdrop
This should display the sprites -> status screen -> background, whatever comes first.
EDIT: Of course the colored HDMA background might interfere with that - I don't know how d4s accomplished it.
I'll give it a shot.
|
|
|
|
|