Deprecated: Function get_magic_quotes_gpc() is deprecated in /home2/jludwig/public_html/finalfantasy/hacking/textpattern/lib/constants.php on line 29
Final Fantasy GBA Hacking Notes: Shop Merchandise
JeffLudwig.com
GOG.com

Shop Merchandise

Shop Merchandise Table locations

0×1e09b00×1e0a95. This is the important table, the one that the game seems to use exclusively.

0×1dfc9c0×1dfd81. It is unclear to me why this bit-for-bit equivalent table is found in the ROM, but it does not seem to serve any purpose.

The data structure size is variable, and is driven by the shop pointer table. Again, this will be discussed later.

Shop Data

To illustrate the merchandise available in all the shops in Final Fantasy 1 DOS, I’ve decided to list the data in a table format that shows exactly where to find the data, and the data you’ll find there. I have not ascertained exactly where some of the shops are, as some of them are in Dawn of Souls dungeons. There are 51 shops in the game.

Hex Location Merchandise Hex Data
0×1e09b0 Coneria Weapons FD 01 02 03 04 05
0×1e09b6 Coneria Armor FC 01 02 03
0×1e09ba Coneria Items FE 01 0b 09 10
0×1e09bf Coneria White Magic 01 02 03 04
0×1e09c3 Coneria Black Magic 21 22 23 24
0×1e09c7 Pravoka Weapons FD 05 06 07 08
0×1e09cc Pravoka Armor FC 02 03 04 1c 3a
0×1e09d2 Pravoka Items FE 01 04 0b 0d 09
0×1e09d8 Pravoka White Magic 05 06 07 08
0×1e09dc Pravoka Black Magic 25 26 27 28
0×1e09e0 Elfheim Weapons FD090a0b0c
0×1e09e5 Elfheim Armor FC040b1d2a2b
0×1e09eb Elfheim Items FE010b0c0e11
0×1e09f1 Elfheim White Magic, Lv. 3 090a0b0c
0×1e09f5 Elfheim White Magic, Lv. 4 0d0e0f10
0×1e09f9 Elfheim Black Magic, Lv. 3 29 2a 2b 2c
0×1e09fd Elfheim Black Magic, Lv. 4 2d 2e 2f 30
0×1e0a01 Melmond Weapons FD 0b 0c 0d 0f
0×1e0a06 Melmond Armor FC 05 0c 2c 3b 3c
0×1e0a0c Melmond White Magic 11 12 13 14
0×1e0a10 Melmond Black Magic 31 32 33 34
0×1e0a14 Crescent Lake Weapons FD 10 11 12 13
0×1e0a19 Crescent Lake Armor FC 06 1e 23 2d 3d
0×1e0a1f Crescent Lake Items FE 01 02 04 09 11
0×1e0a25 Crescent Lake White Magic 15 16 17 18
0×1e0a29 Crescent Lake Black Magic 35 36 37 38
0×1e0a2d Onlac Items FE 02 04 0a 0c 12
0×1e0a33 Onlac White Magic 1b 1c
0×1e0a35 Onlac Black Magic 3b 3c
0×1e0a37 Gaia Weapons FD 23
0×1e0a39 Gaia Armor FC 0d 41
0×1e0a3c Gaia Items FE 02 04 09 11 12
0×1e0a42 Gaia White Magic, Lv. 7 19 1a
0×1e0a44 Gaia White Magic, Lv. 8 1e 1f 20
0×1e0a47 Gaia Black Magic, Lv. 7 39 3a
0×1e0a49 Gaia Black Magic, Lv. 8 3e 3f 40
0×1e0a4c Lefein White Magic 1d
0×1e0a4d Lefein Black Magic 3d
0×1e0a4e Caravan Bottle 0f
0×1e0a4f Caravan Items 1f 20 21 22 23
0×1e0a54 Dawn of Souls Items FD 30 3f FC 1a FE 02 22
0×1e0a5c Dawn of Souls Items FD 35 3e FC 17 FE 05 09
0×1e0a64 Dawn of Souls Items FD 3a FC 14 28 38 FE 0a
0×1e0a6c Dawn of Souls Items FD 3b 37 FC 39 29 FE 1c
0×1e0a74 Dawn of Souls White Magic 19 1a 1b 1c
0×1e0a78 Dawn of Souls White Magic 1d 1e 1f 20
0×1e0a7c Dawn of Souls Black Magic 39 3a 3b 3c
0×1e0a80 Dawn of Souls Black Magic 3d 3e 3f 40
0×1e0a84 Dawn of Souls Weapons FD 21 24 1e 1f 1d
0×1e0a8a Dawn of Souls Armor FC 0f 10 24 41 3e
0×1e0a90 Dawn of Souls Items FE 17 18 19 1a 1b

Merchandise specification conventions

Merchandise can be preceded by one of three special characters, as can be deduced from the above table. FD denotes that the IDs to follow will denote weapons. FC denotes that the IDs to follow will specify armor, shields, helmets, or gauntlets. FE denotes that the IDs to follow will denote a non-equipable item. If the merchandise is not preceded by one of these special IDs, they pertain to magic spells.

It is possible to have different merchandise types in a store. It is also possible to have more than five items in a store, as the developers allowed for scrolling merchandise windows without any extra hacking!

Shop Pointer Table

0×1e070c0×1e08a3. This is the real pointer table, that the game uses.

0×1dfb040×1dfc8b. As above, this bit-for-bit equivalent of the table above is found in the ROM and I do not know why it is there. In my mod, I actually made this table point to the same table as the first pointer table above, without ill effects.

Data structure size: 8 bytes

Let’s take a look at the first record, at 0×1e070c:

15 00 00 00 b0 09 1e 08
Contents Zeroes Pointer

The “Contents” byte

This byte is broken up into two 4-bit sections. The first four bits in the above example, rendered as 1, specifies the graphic to be displayed when navigating shop menus. The last four bits, rendered as 5, specify how many bytes to read for this shop. This is not necessarily the number of items sold! This count does not account for any FC’s, FD’s, and FE’s present in the data string. Therefore, a 5 could signify an shop string like this: FD 01 02 03 04 05.

Here’s a list of the Graphic IDs:

  • 1— Weapon Shop
  • 2— Armor Shop
  • 3— Item Shop
  • 4— Caravan
  • 5— White Magic
  • 6— Black Magic

The pointer

Remember, all pointers are stored in Little Endian style, so the above pointer would read data from 0×081e09b0.

ludmeister

Date published: 2011-12-01

Leave a comment ->

  1. Sorry to bug you but I have been trying to locate the address of the items shop in Corneria. You say that the address is 0×1e09ba but the items listed aren’t those listed in the actual game. In the game’s item shop, potions, antidotes, mind balms, phoenix downs, as well as sleeping bags are sold. However, at the aforementioned address, only four items are listed: fe 01 0d 09 10. So, obviously, the modded DoS doesn’t use the address you specified. So, what would be the correct address for this items shop in the modded DoS?

    — Slish · Jun 23, 02:22 AM · #