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

Author Topic: Final Fantasy II Nes  (Read 2115 times)

Leonel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Final Fantasy II Nes
« on: June 05, 2016, 07:44:25 pm »
I am translating Final Fantasy 2 NES. But I need to change the DTE table in the ROM code.

DTE can not find the table in the ROM. They can help me locate it. To modify the table at my convenience in my language.  :o

Thank you.

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy II Nes
« Reply #1 on: June 05, 2016, 08:57:42 pm »
Does FF2 even use DTE?

I looked at the text drawing for the prologue, and text was stored 1 byte = 1 character.  Though it does use a DTE-like system to draw the dakuten/handakuten ( ゛ / ゜) above the main glyph.  The table for that could be repurposed for traditional DTE, but you'd probably have to change all the drawing routines.

The tables themselves are at:

- Bottom half (main glyph)   = 0x3EEF2 - 0x3EF24
- Top half (dakuten/handakuten) = 0x3EF25 - 0x3EF57

With text bytes $3B-$6D reading from this table.


Relevant disassembly:

Code: [Select]
        ; input:  $3E points to text to draw
        ; output:  0780 = top half of glyph (FF space, or dakuten/handakuten)
        ; output:  07A0 = main glyph

0003EAF6: A000 LDY #$00
0003EAF8: B13E LDA ($3E),Y     ; read 1 character
0003EAFA: F0F1 BEQ $F1
0003EAFC: E63E INC $3E
0003EAFE: D002 BNE $02
0003EB00: E63F INC $3F
0003EB02: C93B CMP #$3B
0003EB04: 902A BCC $2A         ; jump ahead if < 3B
0003EB06: C96E CMP #$6E
0003EB08: 900F BCC $0F         ; jump ahead if < 6E

        ; 6E <= code                    codes 6E and up
0003EB0A: A490 LDY $90
0003EB0C: 99A007 STA $07A0,Y     ; draw glyph as-is
0003EB0F: A9FF LDA #$FF
0003EB11: 998007 STA $0780,Y     ; top half = empty space
0003EB14: E690 INC $90
0003EB16: 4CE6EA JMP $EAE6

        ; 3B <= code < 6E jumps here    ; "DTE" or 2-part glyph   (byte between 3B-6E)
0003EB19: 38 SEC
0003EB1A: E93B SBC #$3B        ; subtract 3B to zero-base the ID
0003EB1C: AA TAX
0003EB1D: A490 LDY $90
0003EB1F: BD15EF LDA $EF15,X     ; read top half from table
0003EB22: 998007 STA $0780,Y
0003EB25: BDE2EE LDA $EEE2,X     ; read bottom half from table
0003EB28: 99A007 STA $07A0,Y
0003EB2B: E690 INC $90
0003EB2D: 4CE6EA JMP $EAE6

        ; code < 3B                     ; presumably control codes.  Didn't look at this code much
0003EB30: C910 CMP #$10
0003EB32: 9003 BCC $03

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6980
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Final Fantasy II Nes
« Reply #2 on: June 05, 2016, 09:59:57 pm »
Does FF2 even use DTE?
He didn't say which version. I heard the demi translation did, and I'd imagine the US proto would, considering FF1 did.
"My watch says 30 chickens" Google, 2018

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy II Nes
« Reply #3 on: June 05, 2016, 10:03:57 pm »
I suppose.  Since he didn't specify, I assumed he meant the official Famicom release.

Leonel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Final Fantasy II Nes
« Reply #4 on: June 06, 2016, 01:53:30 am »
I need change the table DTE  in the  ROM. In this translation of DEMIFORCE 1.03.

00=
01=/
02=[02]
03=[03]
04=[04]
05=[05]
06=[06]
07=[07]
08=[08]
09=[09]
0A=[0A]
0B=[0B]
0C=[0C]
0D=[0D]
0E=[0E]
0F=[0F]
10=[10]
11=[11]
12=[12]
13=[13]
14=[14]
15=[15]
16=$
17=[17]
18=[18]
19=[19]
1A=[1A]
1B=[1B]
1C=[1C]
1D=[1D]
1E=[1E]
1F=[1F]
20=[20]
21=[21]
22=[22]
23=[23]
24=[24]
25=[25]
26=[26]
27=[27]
28=[28]
29=[29]
2A=[2A]
2B=[2B]
2C=[2C]
2D=[2D]
2E=[2E]
2F=[2F]
30=[30]
31=[31]
32=[32]
33=[33]
34=[34]
35=[35]
36=[36]
37=[37]
38=[38]
39=[39]
3A=[3A]
3B=[3B]
3C=in
3D=th
3E=ed
3F=an
40=is
41=ng
42=er
43= a
44=on
45=ou
46=ll
47=s
48=d
49= t
4A=re
4B= c
4C= w
4D=e
4E= b
4F=t
50=y
51=or
52=at
53=o
54=he
55=ha
56=ea
57=nd
58=it
59=de
5A=es
5B=st
5C= i
5D=of
5E=nt
5F=ti
60=to
61=io
62=ve
63=le
64=li
65= I
66=ar
67= y
68=gh
69= f
6A=as
6B= m
6C=me
6D=et
6E=[glove]
6F=[shield]
70=[knife]
71=[rod]
72=[lance]
73=[sword]
74=[axe]
75=[bow]
76=[trash1]
77=[trash2]
78=[
79=]
7A=[7A]
7B=[7B]
7C=[7C]
7D=[7D]
7E=[7E]
7F=[7F]
80=0
81=1
82=2
83=3
84=4
85=5
86=6
87=7
88=8
89=9
8A=A
8B=B
8C=C
8D=D
8E=E
8F=F
90=G
91=H
92=I
93=J
94=K
95=L
96=M
97=N
98=O
99=P
9A=Q
9B=R
9C=S
9D=T
9E=U
9F=V
A0=W
A1=X
A2=Y
A3=Z
A4=a
A5=b
A6=c
A7=d
A8=e
A9=f
AA=g
AB=h
AC=i
AD=j
AE=k
AF=l
B0=m
B1=n
B2=o
B3=p
B4=q
B5=r
B6=s
B7=t
B8=u
B9=v
BA=w
BB=x
BC=y
BD=z
BE='
BF=,
C0=.
C1=:
C2=-
C3=[...]
C4=!
C5=?
C6=%
C7=[C7]
C8=[C8]
C9=[C9]
CA=[armor]
CB=[helmet]
CC=[fist]
CD=[circle]
CE=[bottle]
CF=[book]
D0=[D0]
D1=[D1]
D2=[D2]
D3=[D3]
D4=[D4]
D5=[D5]
D6=[D6]
D7=[D7]
D8=[D8]
D9=[D9]
DA=[DA]
DB=[DB]
DC=[DC]
DD=[DD]
DE='s
DF='l
E0='t
E1='d
E2=[E2]
E3='r
E4='v
E5='m
E6=[E6]
E7=[E7]
E8=[E8]
E9=[E9]
EA=[EA]
EB=[EB]
EC=[EC]
ED=á
EE=é
EF=í
F0=ó
F1=ú
F2=ñ
F3=¿
F4=¡
F5=[F5]
F6=[F6]
F7=[F7]
F8=[F8]
F9=[F9]
FA=[FA]
FB=[FB]
FC=[FC]
FD=[FD]
FE=[FE]
FF=

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy II Nes
« Reply #5 on: June 06, 2016, 10:54:26 am »
Demiforce patch does in fact modify the above routine to use DTE:

Code: [Select]
        ; code between [3B..6E)
0003EB19: AA TAX
0003EB1A: A490 LDY $90
0003EB1C: BDA7EE LDA $EEA7,X     ; not zero based, so buffer starts at
0003EB1F: 99A007 STA $07A0,Y     ;   EEA7 + 3B = EEE2  -> 3EEF2
0003EB22: BDDAEE LDA $EEDA,X     ;   EEDA + 3B = EF15  -> 3EF25
0003EB25: 99A107 STA $07A1,Y
0003EB28: EA NOP
0003EB29: E690 INC $90
0003EB2B: E690 INC $90
0003EB2D: 4CE6EA JMP $EAE6

Unsurprisingly, the DTE tables are in the same spot as the dakuten tables:

0x3EEF2 - 3EF24 = First DTE character
0x3EF25 - 3EF57 = Second DTE character

Leonel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Final Fantasy II Nes
« Reply #6 on: June 07, 2016, 12:12:30 am »
Ok my friend I search in the Rom de table DTE. Thank You.

Leonel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Final Fantasy II Nes
« Reply #7 on: June 22, 2016, 01:35:19 am »
Hello, I need to expand the size of the windows menu. Is it possible? They have some information that they can provide me.

Greetings friends.

June 24, 2016, 12:33:05 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Hello my friends!

I need specifically to modify it, make it bigger friend. Do you have any idea? How can I do this.




I find routine or code this window, you help me change it?

I've already looked like crazy offset and find nothing. I want to expand the size of the window that is under the circle.
« Last Edit: June 24, 2016, 12:33:06 am by Leonel »

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Final Fantasy II Nes
« Reply #8 on: June 24, 2016, 09:19:00 am »
My usual advice here would be "set a breakpoint on the PPU write that draws the box and backtrace the code until you find the data you're looking for".

That's more than I'm willing to do here, myself, though.