øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2020.msg22714e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5bbc.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2020.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5bbc.html.zxg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ ,/”OKtext/htmlISO-8859-1gzip0|Ö”ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 04:22:05 GMT0ó°° ®0®P®€§²ð®g^ÿÿÿÿÿÿÿÿ--” Japanese Title Screen

Author Topic: Japanese Title Screen  (Read 7036 times)

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Japanese Title Screen
« Reply #15 on: March 11, 2015, 04:50:25 PM »
Interesting. The question is, where is that data to give instructions to the title screen? Maybe those instructions are vastly different in the US version.

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Japanese Title Screen
« Reply #16 on: March 14, 2015, 12:41:45 AM »
So I did a little research graphically and this is what my findings where in YYCHR:


As you can see the lineup of tiles is different. I'm sure it has to do with the instructions and what not, but if you just copy the Japanese data over, it makes a scrambled FFIV title screen. Also where things are lineup differently. You can see where the information ends and the new stuff begins. Makes you wonder what that extra space is doing there.


Here's the title screen I get if I just straight copy over the data.

« Last Edit: March 14, 2015, 10:54:40 AM by Rodimus Primal »

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Japanese Title Screen
« Reply #17 on: March 16, 2015, 08:57:34 AM »
What range of bytes did you copy over?

I don't know about the Japanese version, but the US version has a set of graphic sprites and a table that describes the tile layout for the entire screen in a straightforward grid. Looking at your shots of the graphics, I wonder if this is not the case with the Japanese version.  I'll also have to look at a video of the title screen again, to see the different phases I seem to remember that the US version doesn't use.

Edit: I see why yours is corrupt looking. The table I mentioned that the US version uses is at 46000 (unheadered) which is where graphics are in the screenshot you provided of YYCHR.  So the US code is loading garbage there, and randomish sprites display. As JCE3000GT indicated, the Japanese version does have multiple layers, at least for the text (not sure about the crystal). Each of those would be BG layers, and the US only has 1, conveniently in the hardware format for the whole screen.

So it would certainly be doable to get that title screen in the US rom, but probably not without getting the assembly for it too, and that might not be a simple paste if it doesn't fit in the same place in the US version.
« Last Edit: March 16, 2015, 12:17:25 PM by avalanche »

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Japanese Title Screen
« Reply #18 on: March 16, 2015, 10:54:03 PM »
From beginning to end, the space provided for the title screen is exactly the same. Same exact locations in both ROMs. If looking at the US version, there is black space at the end of it, and stuff continues, which is most likely the layout table, in the Jap version. From the beginning of that first "F" until the last space including that black tile I copied over.

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Japanese Title Screen
« Reply #19 on: March 17, 2015, 12:21:36 AM »
Avalanche I believe the crystal also has two layers..?

You can easily import most of the Japanese title screen but not just by copying the whole data block without changing the palette if memory serves me.  I don't have time right now but I would like to try and help out here as soon as I get some free time.  The custom title I did was originally from Final Fantasy IV EasyType actually.  :)

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Japanese Title Screen
« Reply #20 on: March 17, 2015, 09:58:20 PM »
I know free time with real life can be challenging, but all of you have helped in so many ways too numerous to count. I believe we can do this though.

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Japanese Title Screen
« Reply #21 on: March 18, 2015, 01:24:51 AM »
Ok here is more data for you all to chew on.  Lets organize all of the offsets.  My problem is I cannot locate the assembly code that loads the extra Japanese title subroutines for transparency and the dual layers.  It should be noted that Final Fantasy IV and Final Fantasy IV EasyType have slightly different title screens which includes having the "EASY TYPE" text also have a rotating palette like the crystal does when loaded on the title screen.  Also Final Fantasy IV EasyType does not have two layers for the "FINAL FANTASY IV" text either.  Plus the palette data is slight different as you'll see below.  It is also an interesting note that the crystal is duplicated and one layer is shifted slightly up and to the left while the top layer (layer 1) is also transparent like the "FINAL FANTASY IV" text. 

Title Screen Graphic Data Final Fantasy IV & IV (J) EasyType (no header): $44000-46BFF (11264 bytes)
Title Screen Graphic Data Final Fantasy II US V1.0 & 1.1 (no header): $44000-467FF (10240 bytes)
Title Screen Palette locations Final Fantasy II US V1.0 & 1.1 (no header): $46800-468FF (256  bytes)
Title Screen Palette locations Final Fantasy IV & IV (J) EasyType (no header): $46C00-46C7F (128 bytes)

Total Title Screen data block size (including palettes) for all ROM versions: 11424 bytes

Final Fantasy IV (J) Palette Data values (paste in your hex editor):
Code: [Select]
0000FF7F5A0000000000000000000000000000000000000000000000000000000000FF7FDC7FB87F7477326FF166905A2E4AEC4189352729C41C6210210821040000FF7FF97FF27FE07FA07F407FE076606EC065005D805000440034002400140000FF7F717FCE6E2B668851E544623420240014000400008851E54462340014
Final Fantasy IV (J) EasyType Palette Data values (paste in your hex editor):
Code: [Select]
0000FF7F5A00A07F407FE076606EC065005D80500044003400247B7BD662104A6B19FF7FDC7FB87F7477326FF166905A2E4AEC4189352729C41C6210210821046B190000A07F407FE076606EC065005D8050004400340024FF7F7B7BD662104A6B19FF7F717FCE6E2B668851E544623420240014000400008851E54462340014
Final Fantasy II (U) V1.0 & 1.1 Palette Data values (paste in your hex editor):
Code: [Select]
0000FF7F717FEB6E676204568149033940245F07DE0E39029501F0006A005A006B19FF7FDF4F9F3F3C37D92E55261322B0192C11A8082400E71CE71CFF7F5A006B19DD7F717FEB6E676204568149033940245F07DE0E39029501F0006A005A006B19717FEB6E67620456814903394024FF7F5F07DE0E39029501F0006A005A0000004024FF7F717FEB6E67620456814903395F07DE0E39029501F0006A005A000000814903394024FF7F717FEB6E676204565F07DE0E39029501F0006A005A00000067620456814903394024FF7F717FEB6E5F07DE0E39029501F0006A005A000000FF7FEB6E0000000000000000000000005F07DE0E39029501F0006A005A00
Lets keep the momentum going and solve this investigation so we can import the Final Fantasy IV (J) title screen to the Final Fantasy II US ROM. :)

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Japanese Title Screen
« Reply #22 on: March 19, 2015, 08:24:19 AM »
Allow me to add another item that is relevant here.  I would split this out from the graphic data in your list, in case it helps dealing with it separately.

Title Screen Layout Table, FF2 US 1.1 (no header):   $46000-467FF

These are 2-byte entries which already in the hardware format for background sprite layout.  32 columns by 32 rows, although I think only the first 28 rows are visible.  Format:
Code: [Select]
Note these two bytes are in reverse order when in the ROM.
vhopppcc cccccccc
  v = vertical flip
  h = horiz flip
  o = priority
  p = palette
  c = character number (aka sprite index)

I haven't looked for the code yet, but I would imagine that in the US version the graphics and layout table are copied to video memory and a couple of registers are set to point at them, and that's about it for drawing a full screen of graphics with this data.  I don't have the Japanese ROM at my disposal, but it would have to have at least 2 background layers, and at least 2 (possibly more) layout tables because the Final Fantasy text in the front and back layers use different sprites.  These might not have a full 32x32 set; they could composite some smaller subset tables like is done in the prologue text scrolling screen with the castle.

It shouldn't be too hard to find the assembly that loads this data into the video memory and sets up the background layers in the US version, but I don't have the Japanese ROM, so I can only speculate there.  But one speculation that I can add with reasonable confidence is that, based on my findings with the palette blinking/rotating effects for other areas of the game, it is likely that the palette rotation effect is applied in an interrupt routine.  A custom interrupt will probably be installed somewhere during screen setup, and that will handle the palette effects, possibly also fading from black if that occurs.  So the interrupt routine in the US version will have to be modified/replaced in addition to the screen setup code.



Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Japanese Title Screen
« Reply #23 on: March 20, 2015, 06:39:53 AM »
Being that the actual title screen, for the most part, is in the same place, would it be safe to assume that the instructions for the title screen would be in the same place in both games? Granted the instructions are different but it would make sense.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Japanese Title Screen
« Reply #24 on: March 31, 2015, 05:25:38 PM »
You'd think so, right?
No, unfortunately not so.
I took a look under the hood of the Japanese title screen today. Didn't have the chance to get deep into it, but I was able to zero in pretty easily on the active palettes, as well as the routine that causes the flashing effect.

To put it as simply as possible (I'm not home right now anyway, so simple is the best I can do anyway), the game uses four palettes for the title screen: one for the black background, two for the "final fantasy" and one for the crystal. The active palettes (as is the case for most palettes in the game) are stored in RAM at 0CFB. These are constantly reloaded from a static location in RAM in the 0A00s (0A7C or something like that). Then, there's a constantly rotating byte in the 0600s (0675 or something). When the value there/2 is under 16, the game runs through a special set of instructions (otherwise skipped by way of a BCS) that causes a single color in the palette to turn white for a cycle. As X counts up, which color is white increases, 11 cycles until 1/2 that value at 0600-whatever is no longer less than 16.
It's a relatively simple process, however the problem with porting it over to FFIIUS is that none of this happens in that version... And the place in ROM where this routine is (beginning at 8002, I think, in LoROM, so right near 0000 in ROM) is occupied by other stuff in FFIIUS. So this will require finding a new place to put all of the instructions.
I mean, definitely possible, but it'll take a while to work out.

I'll keep ya posted as I make progress.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Japanese Title Screen
« Reply #25 on: March 31, 2015, 09:42:19 PM »
...Other stuff? We had been lead to believe that the only programmed difference between the Japanese and English versions was 16 bytes fixing some of the Stop Bugs (not all of them) is this other data anything important that you're aware of?)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Japanese Title Screen
« Reply #26 on: March 31, 2015, 10:19:10 PM »
I didn't have a lot of time to look into it this morning, so I don't know for sure, but there's definitely code (or data?) in the US version that does not run during the title screen, which occupies the space that in the Japanese version controls the flash effect. I set a breakpoint and ran ffiius and there was no break at the title screen.
So, yeah...

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Japanese Title Screen
« Reply #27 on: April 01, 2015, 11:42:06 AM »
Would it make sense after finding out what the extra is to move it if it's important somewhere else in the ROM?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Japanese Title Screen
« Reply #28 on: April 01, 2015, 11:55:00 AM »
Oh, sure, that's what will have to be done, unless it turns out that the stuff in FFIIUS is the easier stuff to move.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Japanese Title Screen
« Reply #29 on: April 03, 2015, 11:59:30 PM »
Whew, so this is another thing that's turning out to be way more complicated than I originally expected.
 :bah:
So whereas tile layout data for the us version is pretty straightforward - all tiles arranged in order (except only 28 rows are used - the last 0x100 bytes are seemingly worthless) - the Japanese layout is... Not so simple.

The layout data begins (as far as I can tell) at 46800. There's 0x180 bytes representing the top layer of "FINAL FANTASY IV" followed by 0x180 bytes for the bottom layer. Each of these layouts fills only the vertical space occupied by the FINAL FANTASY letters. Somehow the game knows not to put anything in the top 8 or so rows.
After the layout data for FINAL FANTASY IV, there's a few bytes that are doing... Something... Then there's layout data for one layer of the crystal. It's the layer that shows up second (not the image of the crystal that appears before anything else). I don't know if it's the top or bottom layer because they're not off-set like the letters are. the crystal layout data only arranges tiles within the vertical and horizontal space occupied by the crystal. Again, somehow the game simply knows not to put anything in the empty (black) space.  I don't know where to find the layout data for the other layer of the crystal, but I've kinda run out of steam for the day, so I stopped looking.

I also documented just about every routine FFIVJ runs up through the title screen. Unfortunately, there's a lot more going on there than in FF2US, but creating something that is similar enough seems within reach.

The biggest roadblock I'm facing here is that I have no idea how the SNES handles graphics in layers.
Using the information I've gathered thus far, I could probably put together a fairly reasonable facsimile of the Japanese title screen in the US version, including (probably, but I'd have to write my own routine, I think) the flashing effect... But I don't think I know enough about SNES graphics processing to recreate multiple layers.

Not that I'm not willing to learn, but I don't really know where to begin.
Anyone have any insight into this?