Jump to content
IGNORED

Treasure of Tarmin - Dungeon Maps


wavemotion

Recommended Posts

As a follow-up to my Tarmin cheat-sheet... I've started the first few sections of a new guide:

image.thumb.png.5ceaa8b294e8ed2e1072599fde7a202f.png

I'm starting to expand it out and add the details for anyone who wants to know more about the game. Part of this is gathering all the bits and parts that are scattered out on the internet and part of it is playing endless hours of my favorite game to fill in some gaps.

 

First up is the Dungeon Maps:
 

image.thumb.png.1c9a4a2d67a59da8a2f3e139ca429dec.png

Image taken from speedrun/imgur with corrections for some of previously missing secret doors. I’m 98.3% sure this is now accurate. Blue doors are normal (visible) doors… light green doors are secret.

 

Each of the sixteen grids above is 5x5 squares.  When you enter a new dungeon level of the game, 4 of these grids are chosen at random (and possibly in rotated orientations) and “glued together” into a 10x10 grid that makes up the interior dungeon level.  Around this 10x10 grid is a pathway that surrounds all of the interior rooms. There will never be any monsters on this outer path – nor any items (except those you drop yourself). You know you’re in that corridor because it contains eye-murals evenly spaced on the floor.

image.png.b27719b96ac0099f6e437f2e8bdbbd98.png

Wherever there is an eye mural on the floor, there is also a doorway/hallway into the interior dungeon. If you don’t see a door where there is an eye mural – then the door is secret (hit OPEN to reveal it while facing the interior wall).


Speaking of eye murals – the color the mural tells you what to expect in the interior dungeon sections of this level.


Green Eye Mural:     War Monsters
Blue Eye Mural:        Spiritual Monsters
Brown/Tan Mural:     Mix of War/Spiritual Monsters


Occasionally there will be a gate in this outer hallway. The gate will warp you to a parallel level of the dungeon - think of it like a sideways ladder which keeps you on the same level but generates a new dungeon.  See the GATES section for more details on what going through a gate means.
 

In two random locations in this 10x10 interior of this new level will be placed blue ladders that lead down to the next level. Very rarely there is only one ladder – it’s rare enough that I suspect it may just be that two ladders got randomly spawned in the same (or adjacent which doesn’t seem to be allowed) spot.

image.png.6a7937a4176dc0e951073a07678a8e71.png


The grids don’t have to be memorized but knowing some of the key layouts will help you with the game. For example – there are two “long hallways” that look similar. One has 10 normal doors – and there will be no secret doors in this area (except, possibly, a secret door that leads to the outside eye mural hallway). The other one has 9 normal doors – and the door (and room) opposite the solid wall will always have a secret door.  No matter what orientation the rooms are in – if you can anchor yourself to a few of the key patterns, you will be able to navigate more easily.

 

Fun fact: you always start the game in the northwest corner of the first dungeon level and you will always be facing East.  I find that comforting.

If you have any other information that might be of interest regarding the Dungeon Maps and layouts for Treasure of Tarmin, please let me know!

Edited by llabnip
  • Like 16
  • Thanks 1
Link to comment
Share on other sites

  • 6 months later...

This is very useful.  It's a bit similar to the Cloudy Mountain dungeon deconstruction I did two years ago.  I'll see if I can find out more from ROM disassembly.  Perhaps I can expand upon this by numbering all the quadrants and giving you default rotation orientations.

Link to comment
Share on other sites

On 10/14/2021 at 2:46 PM, llabnip said:

image.thumb.png.1c9a4a2d67a59da8a2f3e139ca429dec.png

 

If you have any other information that might be of interest regarding the Dungeon Maps and layouts for Treasure of Tarmin, please let me know!

 

I deciphered most of the dungeon map data through disassembly, but I've got a little more work to do.

 

When the game begins, the World Map data is randomly generated and saved to address $33c.  The World Map includes the layout of the levels as they are seen beneath the castle on the Map Screen, as well as what colors each level represents.  This is a 16-bit variable.  I haven't deciphered these bits yet.

 

The value of $33c is copied into $35c at the start of the game.  This is another 16-bit memory address, which contains the data for which rooms to use in each quadrant.  It is broken up into 4 nybbles: the NW quadrant for the high-order nybble, then NE, SW, and SE.

 

There is also an 8-bit variable, $17f, which is updated every time you start a level.  I only deciphered the two low bits here so far.  Bit 1 places a gate in the outer hallway on the west side, and Bit 0 places a gate in the outer hallway on the east side.

 

Every time you pass through a gate or descend to a lower level, the value of $17f is updated, and the value of $35c is randomized.

 

The orientation of each room has to do with which quadrant it is located in.  If the same room were to be used in all four quadrants, the map would be kaleidoscopic.  The NE quadrant is horizontally mirrored against the NW quadrant, SW is vertically mirrored against NW, and SE is mirrored on both axes against NW.

 

Now to give you the ID of each room according to your image.  That's why I included it in the quote:

4 D E A
1 0 C 5
6 8 2 7
3 B 9 F

I'll take some time to update your image so each room is sorted by ID and oriented as if they were in the NW quadrant (since you start in the NW corner in the outer hall when the game begins), but that will have to wait until tomorrow.

 

I've also got more information ready about item and enemy placement, as well as a couple juicy ROM pokes, but I'll save that for later as well.  This is more than enough information for everybody to digest all at once.

  • Like 2
Link to comment
Share on other sites

Okay, it's "later" now.

 

First, I'll explain how locations are stored in 8-bit memory.  The high-order nybble represents Latitude: 0 is all the way North and $b (11) is all the way South.  The low-order nybble represents Longitude: 0 is all the way West and $b (11) is all the way East.

 

For example, your starting location is $00 (NW corner).  If you go East, your new location is $01.  If you go South instead, your new location is $10.  The SE corner is $bb.  Entrances into rooms from the outer hallway are at $3 and $8.

 

Second, here is a listing of all the objects in the game:

[Miscellaneous]
   00 = Nothing
   01 = Quiver of arrows
   02 = Sack of flour
   03 = Ladder

[Armor]
04-09 = Hauberk
0A-0F = Gauntlet
10-15 = Helmet
16-1B = Breastplate
1C-21 = Large Shield
22-27 = Small Shield

[Weapons]
28-2D = Bow
2E-33 = Crossbow
34-39 = Knife
3A-3F = Axe
40-45 = Dart
46-4B = Spear

[Containers]
4C-4E = Box (locked)
4F-51 = Pack (locked)
52-54 = Chest (locked)
55-57 = Large Bag
58-5A = Money Belt
5B-5D = Small Bag

[Treasure]
5E-60 = Ingot
61-63 = Lamp
64-66 = Chalice
67-69 = Crown
6A-6C = Necklace
6D-6F = Coins

[Magic Items] (3 colors available)
70-72 = Small Potion
73-75 = Large Potion
76-78 = Special Book
79-7B = War Book
7C-7E = Spiritual Book

[Keys]
7F-81 = Key

[Magic Items II] (6 colors available)
82-87 = Scroll (reusable Spiritual weapon)
88-8D = Book (other reusable Spiritual weapon)
8E-93 = Small Fireball
94-99 = Small Lightning Bolt
9A-9F = Large Fireball
A0-A5 = Large Lightning Bolt
A6-AB = Small Ring
AC-B1 = Large Ring

[Other]
B2-B4 = Bomb
   B5 = Tarmin Treasure
B6-B9 = Glyph {tan, tan, blue, green}

(BA-C0 are not used)

[Monsters]
C1-C3 = Giant Ant
C4-C6 = Giant Scorpion
C7-C9 = Giant Snake
CA-CC = Alligator
CD-CF = Dragon
D0-D5 = Skeleton*
D6-DB = Cloaked Skeleton*
DC-E1 = Giant*
E2-E7 = Wraith*
E8-ED = Dwarf*
EE-F0 = Ghoul**
F1-F3 = Enchanted Door (spawns Special Book (items 76-78) when defeated)
   F4 = Minotaur (spawns Tarmin Treasure (item B5) when defeated)
 * High three values in this range adds a shield.
** There is no Ghoul With Shield despite the manual.

[Gates]
F5-F8 = Gate {tan, tan, blue, green}

(F9-FF are not used)

72 contiguous 8-bit memory locations (out of the 147 available!) are used for item and monster placement, ranging from $1A4-1EB:

  • 20 records for items in the current level
  • 8 blank records, in case you unload all your inventory
  • 8 records for monsters in the current level

Two bytes are used in each record.  First is location, and second is the object ID.

 

Your current location is saved at $183, and the direction you are facing is saved at $184 {0 = North, 1 = East, 2 = South, 3 = West}.  When you take a step forward, the Current Location variable (which I'll call "CurrLoc") is copied to $181 before it is updated.  I'll call this other variable "PrevLoc".  $184 ("CurrDir") is also copied into $182 ("PrevDir").

 

Whenever you press the '0' key ("Retreat" if in a fight, else "Retract"), the game compares the values of CurrLoc and PrevLoc.  If they are different, then CurrLoc is restored to the value of PrevLoc, and CurrDir is restored to the value of PrevDir.

 

It seems that if you attack a monster and then retreat, addresses $1EC-1ED temporarily store PrevLoc and PrevDir, so you can resume a fight after resting or finding a replacement weapon.  These are probably junked if you fight a different monster, or possibly fight the same monster from another direction.

 

I'll wait a bit before I post some more data.  I know this is a lot to take in all at once.

  • Like 2
Link to comment
Share on other sites

And now, for all of your insomniacs, here is even more data guaranteed to put you to sleep:

 

Pressing 1, 2, or 3 on the title screen, for games that use the Executive ROM, adds that number to variable $103, which is initialized to 3.  This is the number of video frames the Executive ROM uses to do its thing.  That means at game start, this location will contain a value in the range 3-6, providing the familiar time delay.  But this game takes this value and subtracts it from 6, giving us a number in the range 0-3, which represents the difficulty level.  This value is then stored at address $139, and $103 is set to 4.

 

As with Auto Racing, it's set to 4 because there is another function of the game engine which runs every fourth video frame.  Although the game is supposedly turn-based, this function continually updates the screen with images of objects in your vicinity, as well as certain stats like your equipped weapon's Attack Score.  This is why you often see temporarily visual artifacts; because it only updates the display every four video frames.

 

Here is a listing of the remaining 8-bit and 16-values and their functions:

[8-bit]
    $15D - (not used?)
    $15E - State of game:
           Bit 0 is raised while you are viewing the World Map.
           Bit 1 is raised when you win.
           Bit 2 is raised when you lose.
           Bit 7 is used temporarily to indicate screen transition is in progress.
    $15F - Horizontal position of the blinking dot on the World Map, measured in background cards.  Range $0-b.
    $160 - ID of object at your feet.
    $161 - ID of object one step in front of you.
    $162 - ID of object two steps in front of you.
    $163 - ID of object one step ahead of you and to the right.
    $164 - ID of object one step ahead of you and to the left.
    $165 - Monster HP (set when fight begins)
    $166 - Monster Attack Score (set when monster attacks)
    $167 - War HP
    $168 - Spiritual HP
    $169 - Max Spiritual HP
    $16A - Max War HP
    $16B - ID of best hauberk equipped
    $16C - ID of best helmet equipped
    $16D - ID of best gauntlet equipped
    $16E - ID of best breastplate equipped
    $16F - ID of best ring equipped
$170-171 - (used temporarily during fights)
    $172 - War Defense Score
    $173 - Spiritual Defense Score
    $174 - ID of item in left hand
    $175 - ID of item in right hand
$176-17B - ID of items in pack {E, SE, SW, W, NW, NE}
    $17C - Arrow count
    $17D - Food count
    $17E - When a War Book or Spiritual Book is active, one less than the ID of that book.
    $17F - Level parameters
           Bit 0 places a gate at location $6B (East outer hallway).
           Bit 1 places a gate at location $50 (West outer hallway).
           Other bits not yet known.
    $180 - (temp value used when moving forward or retracting/retreating)
    $181 - Previous Location
    $182 - Previous Direction
    $183 - Current Location
    $184 - Current Direction
    $185 - One less than the current level
$186-1A3 - (temp values used to draw the display?)
$1A4-1CB - Level Item record table
$1CC-1DB - Additional records in the above table, set aside in case you drop items obtained in a previous level
$1DC-1EB - Monster record table
$1EC-1ED - Previous Location and Previous Direction if you retreat from a fight in progress

[16-bit]
$33C - Seed used for World Map data; Bits not yet known.
$344 - (temp value used when updating the display)
$34C - (No touchy!)
$354 - One-tenth of your displayed Treasure Score (the zero at the end has no significance).
$35C - Current Dungeon Map data

I'll post a ROM hack tomorrow, but for now, here are a couple pokes if you know how to do it yourself:

p 50d6 63  ; Start with more War & Spiritual Strength (HP), arrows, and food!
p 50eb 33  ; Change ID of equipped weapon at game start (Platinum Crossbow)

 

  • Like 4
Link to comment
Share on other sites

I decided to draw my own maps of each individual room.  This shows what the dungeon would look like if all four quadrants had the same room.  I included the ID of the room in each of the four corners.

 

I used black pixels for the hidden doors and blue pixels for the regular doors.  Dark green walls are the ones that are set nonrandomly, and light green walls are the ones unique to that room.

 

I'm not sure how the game determines whether each of the 12 entrance points (the 8 on the outside and the 4 between rooms) should have a door, hidden door, or no door.  It seems to be bound to the room itself.

 

I also don't know whether rotation is applied.  Perhaps it's part of the World Map variable, or perhaps it has to do with the level you're on.  I was on Level 1 as I mapped these out.

 

Sit tight for the ROM hack.  I know I promised that, but I want to see if I can add anything else useful first.

Room 0.bmp Room 1.bmp Room 2.bmp Room 3.bmp Room 4.bmp Room 5.bmp Room 6.bmp Room 7.bmp Room 8.bmp Room 9.bmp Room A.bmp Room B.bmp Room C.bmp Room D.bmp Room E.bmp Room F.bmp

  • Like 5
Link to comment
Share on other sites

First, here are those image files from yesterday converted into .png format, so everybody can see previews of them.

 

Second, here is an alternate .cfg file with the current hacks in it.  One code I added was to start you with a Large Gold Shield on the two higher difficulties, or a Large Platinum Shield on the two lower difficulties.

 

I had to fix the amount of starting War & Spiritual HP to get this code to work just right.  Basically what I did was swap a little of the object code which normally starts you facing East by setting the value (4 >> 2), or 1, into CurrDir, which as I mentioned before represents East.

 

Instead, what I'm doing is using the value $87 to start you with 135/67 HP on the lowest difficulty, or 129/64 HP on the highest difficulty.  Then I tweaked one of the opcodes to take that value and shift it right one place instead of two.  So depending on your difficulty level, we end up with one of these values:

  • $43 >> 1 = $21 (Platinum Shield) ($43 = 67, your Spiritual HP, arrows, and food on the lowest difficulty)
  • $42 >> 1 = $21 (Platinum Shield) ($42 = 66, save as above for second difficulty)
  • $41 >> 1 = $20 (Gold Shield) ($41 = 65, same as above for third difficulty)
  • $40 >> 1 = $20 (Gold Shield) $40 = 64, same as above for highest difficulty)

With a higher value than $87, lower difficulties would start you with item $22, which is the Wooden Small Shield.  The reason I had to use ">> 1" instead of ">> 2" is that I would then need to use a starting value which is out of range for 8 bits.  If I could have gone on using ">> 2", I could set a value that would allow for the same item across all 4 difficulties.

 

So why not set a distinct value instead of using the Shift operator?  Because it saved one decle in the ROM.  After setting the value 4 to $103, which fixes the game speed, the register was shifted right two places, giving us the value 1, which was then saved to CurrDir.  Since I'm writing to some other variable instead, CurrDir ends up being 0, which represents North.

 

I'll see if I can add anything else before I post this to my website.

Room 0.png

Room 1.png

Room 2.png

Room 3.png

Room 4.png

Room 5.png

Room 6.png

Room 7.png

Room 8.png

Room 9.png

Room A.png

Room B.png

Room C.png

Room D.png

Room E.png

Room F.png

Advanced Dungeons & Dragons Treasure of Tarmin (Hack).cfg

  • Like 2
Link to comment
Share on other sites

On 4/26/2022 at 8:37 PM, Numan said:

I had always hoped there were additional monster types at the lowest levels, believe I made it to the 200s but no new ones.

Nothing that isn't already documented in the manual.  The exception is that I didn't find any shield-carrying Ghouls.  There are only the three colors of Ghouls without shields, followed by the three colors of Enchanted Doors.

  • Like 1
Link to comment
Share on other sites

I don't have any additional info on the game or maps but I found these pics on the net many years ago. I don't know who made them. I added the ID to them for easy printing.  They are just a different formant than what has already been posted.

 

784066157_ToTMap-1.thumb.jpg.bb323bc1f18c8f29b7a2c6f1163fbcaf.jpg

 

309968471_ToTMap-2.thumb.jpg.f2644b452753d168510703055cb08be0.jpg

 

1150046707_ToTMap-3.thumb.jpg.226903358e2e0ea485f33514c638c8c5.jpg

 

1105288096_ToTMap-4.thumb.jpg.153ab4ea6c2313648762738bdde9000a.jpg

 

626837077_ToTMap-5.thumb.jpg.fff4d556208544ff7db17199241227c5.jpg

 

1087596367_ToTMap-6.thumb.jpg.da32d6d641c759aa313b76b632ff414b.jpg

 

1314990413_ToTMap-7.thumb.jpg.1123f3db84a93e4272877cc7737917d9.jpg

 

1246956170_ToTMap-8.thumb.jpg.ef478b7feeeef80b6122b2b8fb3ba8ca.jpg

 

1149526280_ToTMap-9.thumb.jpg.4c43712a63e8cf833957bddc39066b96.jpg

 

182408063_ToTMap-10.thumb.jpg.75730e418cd83f3b08cbc3e27b52598d.jpg

 

1174072122_ToTMap-11.thumb.jpg.f0ae5ae4230cdd994cadaba7abbee6ee.jpg

 

318632274_ToTMap-12.thumb.jpg.5828f5558d1f21c405ec453018259c2f.jpg

 

1800551767_ToTMap-13.thumb.jpg.c1983521c5889eea73851ca8794df4ee.jpg

 

425578146_ToTMap-14.thumb.jpg.c67080c6e3d1c0ae68fe679587f7ada2.jpg

 

2077178771_ToTMap-15.thumb.jpg.f95efdfab7699af8c3a4a611e175e8d0.jpg

 

1324192361_ToTMap-16.thumb.jpg.8ea4d38bc6a6ec246d22b474be23d6ef.jpg

  • Like 7
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Zendocon said:

These look great, much better than mine.  But where's the ID?  At a glance, I see some of the Map #s are out of order.

Hi There, I'm not sure what you mean, the maps are numbered 1 through 16.  I'm not sure what ID you are referring to. The map numbers are what I put on with the header when I got the maps and printed them out.  I don't know there is a specific order that they have to appear in, these are just the way I got them. Let me know if they need renumbered.

Thanks,

HJ

Link to comment
Share on other sites

From 2014...

 

 

https://3dwarehouse.sketchup.com/user.html?id=1239298327011389285819623

 

If memory serves I thought I detected a few inaccuracies on some of the tiles but never got around to comparing them to gameplay. The SketchUp user name has changed but the account is the same. The 3D viewer function seems to be gone.

 

tarmin map tiles.png

Edited by The Eyeball Mural
Link to comment
Share on other sites

7 hours ago, Zendocon said:

These look great, much better than mine.  But where's the ID?  At a glance, I see some of the Map #s are out of order.

 

Yours are very useful in showing not only the layouts but the kaleidoscopic motif which indicates the axial reflections and how the tiles are arranged and "glued" together. That is an interesting insight which I had never noticed.

  • Like 1
Link to comment
Share on other sites

9 hours ago, Humblejack said:

Hi There, I'm not sure what you mean, the maps are numbered 1 through 16.  I'm not sure what ID you are referring to. The map numbers are what I put on with the header when I got the maps and printed them out.  I don't know there is a specific order that they have to appear in, these are just the way I got them. Let me know if they need renumbered.

Thanks,

HJ

What I mean is that each room is internally indexed by a hexadecimal character, starting with 0-9 and ending with A-F.  They just need to be renamed as follows:

  • "Map - 1." → "ID 0"
  • "Map - 2." → "ID D"
  • "Map - 3." → "ID 2"
  • "Map - 4." → "ID 8"
  • "Map - 5." → "ID 6"
  • "Map - 6." → "ID F"
  • "Map - 7." → "ID A"
  • "Map - 8." → "ID 1"
  • "Map - 9." → "ID 9"
  • "Map - 10." → "ID C"
  • "Map - 11." → "ID 5"
  • "Map - 12." → "ID E"
  • "Map - 13." → "ID B"
  • "Map - 14." → "ID 3"
  • "Map - 15." → "ID 4"
  • "Map - 16." → "ID 7"

Again, I like these pictures a lot more than the ones I drew.  It would make sense that they would be nonrandomly flipped the way they are.  It implies that the outer hallway with the glyphs actually forms part of each room.  That probably will turn out to be the case when I dig up the room data in the ROM.

 

Having the 3D view with the corner facing the foreground is also a great idea.  That way, one side of each wall is clearly visible, with either a door, hidden door, or no door.

Link to comment
Share on other sites

2 hours ago, Zendocon said:

Again, I like these pictures a lot more than the ones I drew.  It would make sense that they would be nonrandomly flipped the way they are.  It implies that the outer hallway with the glyphs actually forms part of each room.  That probably will turn out to be the case when I dig up the room data in the ROM.

When I get a little more time I will renumber and repost them. Thanks for straightening things out.

HJ

  • Like 1
Link to comment
Share on other sites

I posted the ROM hack on my website.  There is something new there: all weapons are now reusable and never break.

 

Before the weekend, I used a series of ROM pokes to rewrite a chunk of the disassembled code and start you with two extra weapons and the blue key (which can open any lock).  It works, but with a weird visual side effect that all the inventory items appear as solid color blocks.

 

What I was trying to do was handle the fact these strong weapons seem to break way too easily, even on the lower difficulties.  So I isolated the line of code that writes a 0 to $175 during a fight, where the ID of your right-hand item is stored, and replaced it with a pair of NOP instructions.

 

As it turns out, that's the same code that removes single-use weapons from your inventory.  So those are basically weapons with a 100% probability of breakage.  Not anymore, of course.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

On 5/2/2022 at 2:06 PM, Zendocon said:

I posted the ROM hack on my website.  There is something new there: all weapons are now reusable and never break.

 

Before the weekend, I used a series of ROM pokes to rewrite a chunk of the disassembled code and start you with two extra weapons and the blue key (which can open any lock).  It works, but with a weird visual side effect that all the inventory items appear as solid color blocks.

 

What I was trying to do was handle the fact these strong weapons seem to break way too easily, even on the lower difficulties.  So I isolated the line of code that writes a 0 to $175 during a fight, where the ID of your right-hand item is stored, and replaced it with a pair of NOP instructions.

 

As it turns out, that's the same code that removes single-use weapons from your inventory.  So those are basically weapons with a 100% probability of breakage.  Not anymore, of course.

Very cool site by the way

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...