News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Final Fantasy I (NES) - Sprite Editing  (Read 19294 times)

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #20 on: September 27, 2015, 10:14:44 am »
Quote
And that's because the spells they don't get are programmed to be learnt at level 100, while the maximum level is 99. Each spell used a value for the level, and that was big chunks of values with each spell for each character.

Haha, wow, that's one way to waste space.  :laugh:

So hey guys, maybe you can help again! I probably know the answer but I just want to be sure.



I'd like to have "RÜSTUNG" for ARMOR, but since the german word is 2 characters longer it won't fit in.
So I had the idea of making a sprite for it just like it is with WAFFEN (weapon) and STATUS which are also sprites.



I found some blank space in the tileset which I could use (I guess?). But then again, how do I access it?



Is it enough to just put in the right hex number at the right place to access the graphics or is it way more complicated?
Which is what I think. I'll probably have to change the source code, am I right?

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #21 on: September 27, 2015, 11:15:43 am »
I found some blank space in the tileset which I could use (I guess?). But then again, how do I access it?

That is not the tileset.  That's just a random block of graphics in the ROM.  You can't access all of the graphics in the ROM at once, the game will only have so certain graphics loaded at a certain time.

If you want to see what graphics are loaded in the menu screen, use FCEUX, go in the 'Debug' menu, and select 'PPU viewer':



Those are all the tiles you have available in the menu screen.  I have highlighted in red the tiles that the game does not use for anything -- so those are essentially free space.

Note however, that Final Fantasy's text drawing routine will treat values below $7A as either DTE or special control codes.  Which means tiles below $7A are effectively off-limits when drawing text.

Quote
Is it enough to just put in the right hex number at the right place to access the graphics or is it way more complicated?

It is not more complicated.  Just put the tile number in.  Again, you can use FCEUX for this.  Simply hover over the tile you want, and below the graphic (circled in purple) it will tell you the tile ID.

Again note, tiles below $7A cannot be used.

So if you want to use the 6 tiles that start with / followed by the group of japanese characters, that would be tiles $7A-$7F

And that blank space between the period and the dash would be tile $C1.

Quote
I'll probably have to change the source code, am I right?

Nope.

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #22 on: September 27, 2015, 12:21:13 pm »
Thank you very much for your response! Unfortunately I'm using these for umlauts and ß already.  :laugh:

« Last Edit: September 27, 2015, 12:29:32 pm by Shokupan »

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #23 on: September 27, 2015, 12:35:16 pm »
There's also the "LE" tiles just after the question mark.  Those might be used for some things in menus, but you could easily change them to use the normal L and E tiles to free those up.

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #24 on: September 27, 2015, 12:48:51 pm »
That sounds like an idea, thank you!  :)

I've got another question (sorry for asking so much!!).

I'm at changing the intro text. In order to save space I want to make use of DTE. But where is the information of DTE stored? I just can't find it, or I'm searching at the wrong place.





For example I changed 2F 'ar' into 'el'. But I just changed it in the table file so of course it won't affect the game. So where do I tell the game to use el (which is A8 and AF) when I type 2F?
« Last Edit: September 27, 2015, 01:05:03 pm by Shokupan »

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #25 on: September 27, 2015, 02:23:06 pm »
DTE tables are at offset 0x3F060:

Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;  DTE table   [$F050 :: 0x3F060]
;;
;;  first table is the 2nd character in a DTE pair
;;  second table is the 1st character in a DTE pair
;;
;;  don't ask me why it's reversed
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

lut_DTE2:
  .BYTE $FF,$B7,$AB,$A8,  $FF,$B1,$A4,$FF,  $B1,$A8,$B6,$B5,  $B8,$FF,$B2,$FF
  .BYTE $AA,$A4,$B6,$AC,  $FF,$B5,$B6,$A5,  $A8,$BA,$A8,$B5,  $B2,$B7,$A6,$B7
  .BYTE $B1,$A7,$B1,$AC,  $A8,$B6,$A7,$A4,  $B0,$A9,$FF,$A8,  $BA,$FF,$A8,$B0
  .BYTE $92,$FF,$A9,$B2,  $AF,$B3,$BC,$A4,  $8A,$A8,$FF,$B5,  $B2,$AC,$FF,$AB
  .BYTE $A8,$B7,$AC,$A4,  $A6,$AF,$A8,$AF,  $A8,$B6,$FF,$AF,  $A8,$A7,$AC,$C3

lut_DTE1:
  .BYTE $A8,$FF,$B7,$AB,  $B6,$AC,$FF,$B7,  $A4,$B5,$FF,$A8,  $B2,$A7,$B7,$B1
  .BYTE $B1,$A8,$A8,$FF,  $B2,$A4,$AC,$FF,  $B9,$FF,$B0,$B2,  $FF,$B6,$FF,$A4
  .BYTE $A8,$B1,$B2,$AB,  $B6,$A4,$A8,$AB,  $FF,$FF,$B5,$AF,  $B2,$AA,$A6,$B2
  .BYTE $90,$BC,$B2,$B5,  $AF,$FF,$FF,$A6,  $96,$B7,$A9,$B8,  $BC,$B7,$AF,$FF
  .BYTE $B1,$AC,$B5,$BA,  $A4,$A4,$BA,$AC,  $A5,$B5,$B8,$FF,  $AA,$FF,$AF,$C3

First entry in each table corresponds to byte $1A

So $1A is "e[space]" because the first entry in the DTE1 table is $A8 ('e') and the first entry in the DTE2 table is $FF (space)

EDIT:

Even though I pasted the section from the disassembly, you do not need to use the disassembly for this.  This can be easily modified in a hex editor.

Bregalad

  • Hero Member
  • *****
  • Posts: 2751
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #26 on: September 27, 2015, 03:05:41 pm »
Quote
I'd like to have "RÜSTUNG" for ARMOR, but since the german word is 2 characters longer it won't fit in.
Unfortunately I don't know where exactly, but the HPOS, VPOS, HSIZE and VSIZE of all menu window is recorded somewhere fixed and is extremely simple to change. You'll just have to increase the HSIZE and perhas the HPOS of the main menu windo and you'll be able to fit the word "Rüstung".

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #27 on: September 27, 2015, 03:29:17 pm »
Unfortunately I don't know where exactly, but the HPOS, VPOS, HSIZE and VSIZE of all menu window is recorded somewhere fixed and is extremely simple to change.

Everything is in the disassembly  ;D

Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;  Boxes for Main/Item menus  [$BAA2 :: 0x3BAB2]
;;
;;     in groups of 4:  X, Y, width, height
;;
;;  Item menu boxes are also used for the magic menu.

lut_MainItemBoxes:
    .BYTE   $02,$02,$08,$08    ; main menu - box holding the orbs
    .BYTE   $0B,$01,$0A,$0E    ; main menu - Character 0's stat box
    .BYTE   $15,$01,$0A,$0E    ; main menu - Character 1's stat box
    .BYTE   $0B,$0F,$0A,$0E    ; main menu - Character 2's stat box
    .BYTE   $15,$0F,$0A,$0E    ; main menu - Character 3's stat box
    .BYTE   $01,$0A,$0A,$05    ; main menu - GP box
    .BYTE   $02,$0F,$08,$0E    ; main menu - option box (containing further menu options)
    .BYTE   $01,$01,$08,$04    ; item menu - "ITEM" title box
    .BYTE   $01,$16,$1E,$07    ; item menu - Description box at the bottom
    .BYTE   $01,$03,$1E,$13    ; item menu - the main box containing item list (but isn't used for
                               ;             item menu -- see DrawItemBox.  Is used for magic menu, though)

The problem is if you make the option box bigger, you'll end up overlapping the character stat boxes -- so you'll have to rearrange those as well, which means also moving cursor positions around.  Basically it's opening a can of worms where 1 change requires another change which requires another change.

It can certainly be done, it just will take a bit more effort than changing a single value.



EDIT:

Actually... now that I actually look at the menu, you can totally make the option box 2 tiles bigger.  Just move it left 1 and increase the width by 2.  That will make its width match the GP box just above it.

If you do that, you'll just have to change the X position that the cursor is drawn -- which is at offset 0x3B7D2  (change the $10 to $08 to move it 8 pixels to the left)
« Last Edit: September 27, 2015, 03:37:50 pm by Disch »

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #28 on: September 28, 2015, 05:32:30 am »
Thank you sooooo much guys!!!  :) Thanks to your help I was able to translate the intro text. It was a lot of work, though...  :laugh:
Also thank you for showing me a way how to make the option box bigger. I did it that way but in the end I didn't like way it looked.
I'll go with the original box size since this looks more symmetrical to me. I used an abbreviation for RÜSTUNG --> RÜST. This is perfectly fine, I guess.
Everyone will know what it means.

But now I've encountered a strange problem.



For some reason it doesn't say "MAGIE" in the character box but in the option box. I changed it at 0x3859C and I just can't find another "MAGIC"
in the hex editor. I searched in many ways. I searched for MA+GI, M+A+GI, MA+G+I and also for M+A+G+I.

EDIT: Haha, okay, I found it! It was at 0x3B9ED  :laugh: But it was sepperated from each other so it was hard to find.

« Last Edit: September 28, 2015, 06:30:12 am by Shokupan »

Bregalad

  • Hero Member
  • *****
  • Posts: 2751
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #29 on: September 28, 2015, 11:49:10 am »
Just my $2, but the upper case umlauted letters look terrible and are barely legible at all. I know it's not your fault. The original japanese game had an engine that could use dakutens in the interlines (dakutens are really the japanese equivalent to umlauts- except they modify consonants instead of vowyels but the principle is the same).

I do not know whether it is possible to re-use the code for the japanese dakutens to display umlauts in the menu, but if it is possible it would without doubt look better. That would unfortunately not be possible for dialogue boxes, as they do not use the interlines anymore in the US version, but that's not an issue since upper-case umlauts will hardly appear.

Another, simpler, approach would be to use lower case letters for the menu. I'm pretty sure they are upper case only because the original jap->en translators throught it was a good idea to use all uppercase whenever something was writen in katakana in the original (such as MYSTIC KEY) - when actually katakana would only mean that the word would start with an upper case letter (proper names) or be in italic (loan words) in english. So using lower case in the menu and for monster as well as key item names would be perfectly valid.

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #30 on: September 28, 2015, 01:13:04 pm »
Hello Begrad! Thank you very much for expressing your opinion!

I tried to change the umlauts to the better - what do you think?



I also thought about switching to lower case letters for Menu, Monster names, Item names, etc. But then I thought writing all the names in capital letters will make it feel more 'NES-like'.
I remember that most of the text was in capital letters back then, if I'm not mistaken. What's your opinion on that? Do you think I should switch to lower case letters? I thought writing
in capital letters is kinda the 'NES-style'.

Btw, sometimes I would really like to use Ä. Unfortunately, there's no space for it.

I have to find a way to be able to type Ä...
« Last Edit: September 28, 2015, 01:27:21 pm by Shokupan »

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #31 on: September 28, 2015, 01:27:42 pm »
Why don't you put Ä before the ß?  That diagonal line isn't used for anything.

Nevermind it totally is.  Whoops.

There's still the alternative/duplicate "LE" characters to the right of the question mark.  You could put Ä there.


Also, I agree that all caps is ugly.

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #32 on: September 28, 2015, 01:53:42 pm »
Quote
There's still the alternative/duplicate "LE" characters to the right of the question mark.  You could put Ä there.

I haven't found out where exactly the LE is used yet but this is probably what I'm going to do.  I wanted to search for another way first, since I didn't want to "manipulate" the way "LE" is displayed.
But it seems there's no other way around.  :-\

Quote
Also, I agree that all caps is ugly.

Hehe, okay, seems like I'll have to make some changes.  8)

Thank you guys!

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #33 on: September 28, 2015, 02:21:25 pm »
IIRC, the 'L' is used in the main menu for the experience levels  (like how Vivu in your picture is 'L 5' -- that is using the alternative L)

And I think the 'E' is used in the equip menus to indicate which items are equipped.

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #34 on: September 28, 2015, 02:51:22 pm »
Aaaahhh, right! Thank you very much! Now I just have to find them in the hex editor.  :laugh:

Sooo... I changed the upper case letters into lower case. Is it better that way?




I agree it looks better, but somehow I got the feeling it's not as leagible as before. What do you guys think?

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #35 on: September 28, 2015, 03:19:37 pm »
Aaaahhh, right! Thank you very much! Now I just have to find them in the hex editor.  :laugh:

The 'L' used in the main menu is at offset 0x3BA52  (byte = $C6)

The 'E' used in the equip menus is at offset 0x3ED60 (byte = $C7)

Quote
... I changed the upper case letters into lower case. Is it better that way?

I think it's better.

If you're worried about legibility, maybe consider abandoning FF's hideous font and taking one from a different game.

Bregalad

  • Hero Member
  • *****
  • Posts: 2751
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #36 on: September 29, 2015, 03:07:12 am »
I think words not being in all caps looks better, but that's just my opinion, nothing else.

Also the reason the L and E letters are different is because they were already letters in the japanese games - other latin letters didn't exist in the game at all.

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2927
  • 2 + 2 = 5
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #37 on: September 29, 2015, 03:15:28 am »
Quote
I agree it looks better, but somehow I got the feeling it's not as leagible as before. What do you guys think?

+

Quote
I think it's better.

If you're worried about legibility, maybe consider abandoning FF's hideous font and taking one from a different game.

I second this.

Cigarettes, ice-cream, figurines of the Virgin Mary...

Maeson

  • Sr. Member
  • ****
  • Posts: 279
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #38 on: September 29, 2015, 05:06:11 am »
I personally have no problem with all-caps in things like menus. I'm used to it, as it was the norm back then, even if nowadays seems like the worst disease discovered by humanity.

But as Disch said, if you're not happy with how it looks, you could take a look at other games to see if there's a font you may like. Or create your own, even.
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

Shokupanda

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Re: Final Fantasy I (NES) - Sprite Editing
« Reply #39 on: September 29, 2015, 05:08:57 am »
Quote
The 'E' used in the equip menus is at offset 0x3ED60 (byte = $C7)

Thank you very much, that saved me a lot of time of searching!  :)

Quote
I think it's better.

If you're worried about legibility, maybe consider abandoning FF's hideous font and taking one from a different game.
Quote
I think words not being in all caps looks better, but that's just my opinion, nothing else.
Quote
I second this.

Thank you so much guys! I'll go for the lower case letter way then. When I'm done with translating and I don't like the way the font looks I'll consider changing it.
But for now I'll stick with it, I guess.

By the way! Luckily the german word for "Poison" is way shorter so I was even able to place an Ö in it.  :laugh: Now I have every single umlaut + ß. Hell yeah!
(I changed the L for Level into an St for Stufe, the german word for Level).



Thank you so much for your help guys!!  :thumbsup:

EDIT:

So I've encountered a new problem. I was working in the hex editor and shortened the "You can't carry anymore." to "Kein Platz mehr." so I have space for "Kaufen" (Buy) and "Verkaufen" (Sell).



I thought the program wouldn't care as long as I put '00' after every 'word' and '01' for a new section. But as it seems the hex numbers have to be at the right place somehow... or did I mess up with something else?





For the item shop it seems that the program is saying somwhere "start with 'Buy' at 0x380A9".
Is there a way to adjust this?

Thanks in advance!
« Last Edit: September 29, 2015, 07:46:03 am by Shokupan »