CBM64 Bard's Tale 1 Disassembly
CBM64 Bard's Tale 1 Disassembly
Hi to all interested!
In this area I will step by step publish, what the people here and I identified of the BT1 engine for the C64.
So all the snippets spread widely in this forums should be collected here plus new stuff not yet known, at least not easy to be found in the web.
W A R N I N G !
This thread will contain massive spoilers!
W A N T E D
1) sound/music information for bard songs
2) any information that completes this thread
Last update: 2013-10-15
This update date tells you, that any items in this thread have been updated or new items been added.
The board will not inform you about edits, so check frequently this
post, if any updates have been done in this thread!
Items to check:
2013-10-15 Engine variables
2013-10-15 Engine functions
2010-04-16 Dungeon map file format
2010-05-12 File list of city and dungeon game disks
2011-12-03 Roster file format
2013-10-15 City map file format
2010-03-22 Text encoding table
2010-03-22 Graphic and animation file format (based upon tedious work)
2010-07-07 Disassembled game event files
2010-04-30 Hints for making your own events
Last, but by no means least: Quantum Realities parallel project for Apple II version
In this area I will step by step publish, what the people here and I identified of the BT1 engine for the C64.
So all the snippets spread widely in this forums should be collected here plus new stuff not yet known, at least not easy to be found in the web.
W A R N I N G !
This thread will contain massive spoilers!
W A N T E D
1) sound/music information for bard songs
2) any information that completes this thread
Last update: 2013-10-15
This update date tells you, that any items in this thread have been updated or new items been added.
The board will not inform you about edits, so check frequently this
post, if any updates have been done in this thread!
Items to check:
2013-10-15 Engine variables
2013-10-15 Engine functions
2010-04-16 Dungeon map file format
2010-05-12 File list of city and dungeon game disks
2011-12-03 Roster file format
2013-10-15 City map file format
2010-03-22 Text encoding table
2010-03-22 Graphic and animation file format (based upon tedious work)
2010-07-07 Disassembled game event files
2010-04-30 Hints for making your own events
Last, but by no means least: Quantum Realities parallel project for Apple II version
Last edited by ZeroZero on Sat Jul 11, 2015 5:42 pm, edited 37 times in total.
I T E M # 01
Last update: 2013-10-15
Ok, here I start with variables identified so far. No description is not identified. Many are guesses rather then identified. Check this post frequently, because I will edit it instead of adding new posts!
UiE means: used in events, i.e. if that value occurs in any loadable events
BT encoded means: text is encoded in the style BT does it. The translation table will also be published.
Last update: 2013-10-15
Ok, here I start with variables identified so far. No description is not identified. Many are guesses rather then identified. Check this post frequently, because I will edit it instead of adding new posts!
UiE means: used in events, i.e. if that value occurs in any loadable events
BT encoded means: text is encoded in the style BT does it. The translation table will also be published.
Code: Select all
1. Variables / Memory Areas used
================================================================================
Address(es) | UiE | Description
================================================================================
0002 | * | the direction the party looks/moves into (double in 0024?)
--------------------------------------------------------------------------------
000b | * |
--------------------------------------------------------------------------------
000d | * |
--------------------------------------------------------------------------------
000f - 0010 | * | often used to hold the pointer to the presently selected
| | character's roster in memory
--------------------------------------------------------------------------------
001d | * | the y position in the text window
--------------------------------------------------------------------------------
001e | * | the level within the dungeon
--------------------------------------------------------------------------------
001f | * |
--------------------------------------------------------------------------------
0024 | * | the direction the party looks/moves into (double in 0002?)
--------------------------------------------------------------------------------
0028 | * | holds the party's present N coordinate
--------------------------------------------------------------------------------
0029 | * | holds the party's present E coordinate
--------------------------------------------------------------------------------
002a | * | last pressed key, filled any time in interrupt
--------------------------------------------------------------------------------
002d | * |
--------------------------------------------------------------------------------
002f | * | often set to 0 before ae00 is called
--------------------------------------------------------------------------------
0037 | * |
--------------------------------------------------------------------------------
003a | * | index of highest set group of foes
--------------------------------------------------------------------------------
0042 | * |
--------------------------------------------------------------------------------
0044 | * | selected slot in party
--------------------------------------------------------------------------------
0045 - 0046 | * | amount of damage to apply to a character
--------------------------------------------------------------------------------
004b | * | flag or number of remaining foes in a fight (0 = all clear)
| | OR run flag, indicates if party ran away.
| | 1 = party ran away, 0 = party fought till end
--------------------------------------------------------------------------------
004d | * |
--------------------------------------------------------------------------------
0054 | * | next text output cursor y position (in whole screen width!)
--------------------------------------------------------------------------------
0055 | * | next text output cursor x position (in whole screen width!)
--------------------------------------------------------------------------------
0058 | * | lo byte of a pointer to a BT encoded text
--------------------------------------------------------------------------------
0059 | * | hi byte of a pointer to a BT encoded text
--------------------------------------------------------------------------------
005a | * | byte 1 of a 16-bit random number
--------------------------------------------------------------------------------
005b | * | byte 2 of a 16-bit random number
--------------------------------------------------------------------------------
006b | * |
--------------------------------------------------------------------------------
006e - 006f | * | pointer to the present dungeon line (N coor offset in map)
--------------------------------------------------------------------------------
006f | * |
--------------------------------------------------------------------------------
0070 | * |
--------------------------------------------------------------------------------
0071 | * |
--------------------------------------------------------------------------------
0073 | * |
--------------------------------------------------------------------------------
0075 | * |
--------------------------------------------------------------------------------
0076 | * |
--------------------------------------------------------------------------------
0077 | * |
--------------------------------------------------------------------------------
0078 | * |
--------------------------------------------------------------------------------
0079 | * | Compass spell duration: 0 = inactive, ff = infinite, else duration
--------------------------------------------------------------------------------
007a | * |
--------------------------------------------------------------------------------
007b | * |
--------------------------------------------------------------------------------
007c | * |
--------------------------------------------------------------------------------
008f | * |
--------------------------------------------------------------------------------
00c1 | * | ??? time counter ??? pass 1 round of time?
--------------------------------------------------------------------------------
00c8 | * |
--------------------------------------------------------------------------------
00c9 | * |
--------------------------------------------------------------------------------
00ce | * |
--------------------------------------------------------------------------------
00d0 | * |
--------------------------------------------------------------------------------
00da | * |
--------------------------------------------------------------------------------
00dc | * | in tavern event holds the number of the drink choosen
--------------------------------------------------------------------------------
00e0 | * | stores the dungeon level to load next
--------------------------------------------------------------------------------
00e1 | * | type of fight to be initiated: 0 = vs monsters, all other
| | values start in-party fight
--------------------------------------------------------------------------------
00eb | * | day/night flag: 0 = day, 1 = night
--------------------------------------------------------------------------------
00ec | * | present time of day: after midnite 0 - 3, midnite 4 - 7,
| | evening 8 - b, dusk c - f, afternoon 10 - 13, noon 14 - 17,
| | mid morning 18 - 1b, early morning 1c - 1f
--------------------------------------------------------------------------------
00ed | * |
--------------------------------------------------------------------------------
00f4 | * |
--------------------------------------------------------------------------------
00f5 | * | ??? for fights: holds the group that attacks first ???
| | or maybe attacks last ???
--------------------------------------------------------------------------------
00f6 | * | the bard song that is playing, or 0 if none
--------------------------------------------------------------------------------
00f7 | * | holds type of trap when stepping on one
--------------------------------------------------------------------------------
00fe | * | flag, if Mangar is dead... 0 = alive, else dead
--------------------------------------------------------------------------------
00ff | * | holds item number in shop
--------------------------------------------------------------------------------
0334 - 0343 | * | stores the chars of a player input line
--------------------------------------------------------------------------------
0380 - 038b | * | a buffer to hold 12 digit decimal numbers, like chars gold,
| | prices and alike
--------------------------------------------------------------------------------
0398 | * | cell of city building map for present party position
--------------------------------------------------------------------------------
03b0 - 03b7 | * | holds monster types for up to 8 groups of attackers.
| | However in BT only 4 groups are used.
--------------------------------------------------------------------------------
03b8 - 03bf | * | holds number of monsters for up to 8 groups of attackers.
| | However in BT only 4 groups are used.
--------------------------------------------------------------------------------
03c0 | * |
--------------------------------------------------------------------------------
0d9d - | | table with color codes for colors 1 and 2, indexed by the
| | NMxx file number - $50,valid for files NM50 to NM90.
| | If you load e.g. NM51, inside Garth, the file byte at offset
| | +1 will be 56 rather than the standard 26. Thats how gfx is
| | set the colors.
-------------------------------------------------------------------------------
18?? - | |
--------------------------------------------------------------------------------
40c2 - | | table with lo-bytes modifiers for the address of a byte
| | position in hires mem for NM50 to NM90 files
--------------------------------------------------------------------------------
4162 - | | table with hi-bytes modifiers for the address of a byte
| | position in hires mem for NM50 to NM90 files
--------------------------------------------------------------------------------
7ce5 - 7ce6 | | holds address of present party roster in memory
--------------------------------------------------------------------------------
a249 - a24d | * | buffer for unpacked character attributes
--------------------------------------------------------------------------------
a47f - a4?? | * | item function list. item number is a index into this list,
| | and here are values what this item is good for.
| | Example: at offset 70 (onxy key) is the value 0e. That is,
| | what is checked, when the party wants to enter Mangar's
| | tower: if any char has an item with function 0e.
-------------------------------------------------------------------------------
c900 - | | table with lo-bytes to address a byte position in hires mem
--------------------------------------------------------------------------------
ca00 - | | table with hi-bytes to address a byte position in hires mem
--------------------------------------------------------------------------------
Last edited by ZeroZero on Tue Oct 15, 2013 8:59 am, edited 19 times in total.
I T E M # 02
Last update: 2013-10-15
Ok, here is the next, subroutines identified so far. No description is not identified. Many are guesses rather then identified. Check this post frequently, because I will edit it instead of adding new posts!
UiE means: used in events, i.e. if that value occurs in any loadable events
BT encoded means: text is encoded in the style BT does it. The translation table will also be published.
Last update: 2013-10-15
Ok, here is the next, subroutines identified so far. No description is not identified. Many are guesses rather then identified. Check this post frequently, because I will edit it instead of adding new posts!
UiE means: used in events, i.e. if that value occurs in any loadable events
BT encoded means: text is encoded in the style BT does it. The translation table will also be published.
Code: Select all
2. Functions
================================================================================
Address | UiE | Description/Parametres
================================================================================
0800 | |
--------------------------------------------------------------------------------
0803 | * | loads a gfx file, x register contains gfx number, effective
| | load is NM50 + x, 00 <= x <= 40. Prints the gfx into gfx area.
--------------------------------------------------------------------------------
0806 | * | clears the text window
--------------------------------------------------------------------------------
0809 | * | x has lobyte, y has hibyte of a pointer to a string in BT
| | encoding. Prints that string into text area
--------------------------------------------------------------------------------
080c | * | prints a caption text under the gfx window. The pointer to the
| | caption must be in 58 lo and 59 hi byte, it is BT encoded.
--------------------------------------------------------------------------------
080f | * | waits for a key pressed
--------------------------------------------------------------------------------
0812 | * | displays a character's details, who's number is in accu (1-6)
--------------------------------------------------------------------------------
0815 | * | execute the New Order command
--------------------------------------------------------------------------------
0818 | * | execute the Check Roster command
--------------------------------------------------------------------------------
081b | * | prompts and receives a line of input into buffer at 0334. Sets
| | carry, if input was aborted. Returns in x number of chars.
--------------------------------------------------------------------------------
081e | * | test text buffer from 0334 if it already exists as a name in
| | the character rosters. Sets carry if not used, else clears the
| | carry.
--------------------------------------------------------------------------------
0821 | | clear gfx window
--------------------------------------------------------------------------------
0824 | * | tests the roster on the character disk for an empty space.
| | If the disks roster is full, sets the carry flag, else
| | clears it.
--------------------------------------------------------------------------------
0827 | * | initialze random number seed ($1911++)
--------------------------------------------------------------------------------
082a | * | creates a two-byte random number and stores it in 5a and 5b
--------------------------------------------------------------------------------
082d | * | prints out a characters attributes
--------------------------------------------------------------------------------
0830 | * | checks and handles compass spell
--------------------------------------------------------------------------------
0833 | * | outputs char in accu at next screen position, updates position
--------------------------------------------------------------------------------
0836 | * | does a line feed in the text window
--------------------------------------------------------------------------------
0839 | * | unpacks the bit-packed character attributes into a buffer at
| | address $a249 (+5)
--------------------------------------------------------------------------------
083c | * | packs the buffer at address $a249 (+5) into bit-packed
| | character attributes in roster
--------------------------------------------------------------------------------
083f | * | gets the key pressed into the accu (in BT encoding)
--------------------------------------------------------------------------------
0842 | * | add amount from buffer at $0380 to chars gold, chars roster
| | address in $67 and $68
--------------------------------------------------------------------------------
0845 | * | tests, if an empty slot is in the party. Clears the carry,
| | if YES and sets it, if NO empty slot in party.
| | The empty slot address is in zp 0f and 10
--------------------------------------------------------------------------------
0848 | * | updates the armor class of a char, depending from dexterity and
| | equipped armor and other items supporting ac
--------------------------------------------------------------------------------
084b | * | update the party's values on the screen
--------------------------------------------------------------------------------
084e | * | copy a characters amount of gold into a buffer at $0380
--------------------------------------------------------------------------------
0851 | * | prints out the number in the buffer at $0380 (up to 12 digits)
| | at the present text position
--------------------------------------------------------------------------------
0854 | * | pool the gold into the active character
--------------------------------------------------------------------------------
0857 | * | makes a pause, units in accu. Often the value 8 is used.
--------------------------------------------------------------------------------
085a | * | makes up a price in the buffer at $0380. Value in x. Compares
| | to value in y as offset in roster. If buffer smaller or equal
| | to roster value, clear carry. Carry set means: the value in
| | buffer cannot be "paid" by the value in roster.
--------------------------------------------------------------------------------
085d | * | substracts the amount of the buffer in 0380 from a roster value
| | of the presently selected character. With e.g. 24 in y as offset
| | that amount is substracted from the char's gold
--------------------------------------------------------------------------------
0860 | * | checks a long value in the roster. E.g. with 24 in y as offset
| | into the roster, it checks if the gold there is equal or more
| | than the content of the buffer at 0380. Sets carry, if less.
--------------------------------------------------------------------------------
0863 | * | a stupid wait loop
--------------------------------------------------------------------------------
0866 | * | tests experience points for next level. Sets carry, if not
| | sufficient points. Fills buffer at $0380 with XP required.
| | Level affected in cells $63 and $64.
--------------------------------------------------------------------------------
0869 | * | sets the column number value at that a line break happens, no
| | print into that column. The column number is in accu.
--------------------------------------------------------------------------------
086c | * | print out a value from roster, indexed by y, at current position
--------------------------------------------------------------------------------
086f | * | tries to give item in $70 to char. Sets carry, if no empty slot.
| | also checks, if char's class can use it and sets that too.
| | Does not charge money. Clears carry if item added.
--------------------------------------------------------------------------------
0872 | * | calculates the difference between the buffer at $0380 to a
| | characters long value (gold or XP) and stores it back into
| | that buffer
--------------------------------------------------------------------------------
0875 | * | prints out the levels of magic for a char
--------------------------------------------------------------------------------
0878 | * | prepares the price buffer at $0380 from a 2-byte integer in
| | cells $63 and $64. Then prints out the buffer at the current
| | text window position.
--------------------------------------------------------------------------------
087b | |
--------------------------------------------------------------------------------
087e | |
--------------------------------------------------------------------------------
0881 | * | ??? makes a noise. ZP ptr in 1f/20 is filled before.
--------------------------------------------------------------------------------
0884 | * | loads a city event file, e0 holds an index into a list at 1b2c
| | at which the NMxx value for the event to load is
--------------------------------------------------------------------------------
0887 | |
--------------------------------------------------------------------------------
088a | * | make value in $63 and $64 to number in buffer $0380
--------------------------------------------------------------------------------
088d | * | pick a target from party, return in accu
--------------------------------------------------------------------------------
0890 | * | loads a dungeon and handles dungeon action. The level number
| | to load is in 00e0, in the accu is 1 to address the dungeon disk
| | If the accu has 0, the city disk is addressed and the city
| | will be loaded instead. e0 then is ignored.
--------------------------------------------------------------------------------
0893 | * | starts a random fight, type of fight in 00e1
--------------------------------------------------------------------------------
0896 | * | checks a key for a party slot to be selected, then returns the
| | pointer to that characters roster into y = lobyte and
| | accu = hibyte. Sets carry if none choosen.
--------------------------------------------------------------------------------
0899 | * | cause a special attack of an enemy in 03b0 to the char in 44
--------------------------------------------------------------------------------
089c | * | cause (value of mem $45/$46) HP damage to char in accu
| | plus special damage in $c8
--------------------------------------------------------------------------------
089f | * |
--------------------------------------------------------------------------------
08a2 | * | command "Cast Spell" with input etc. Sets carry if the spell
| | casting was aborted.
--------------------------------------------------------------------------------
08a5 | * | tests, if the present char (in $d0) has sufficient spell points
| | to cast the spell in $ca. Clears carry, if sp is good, else
| | sets the carry.
--------------------------------------------------------------------------------
08a8 | * | loads the gfx and the caption for monster in slot 03b0
--------------------------------------------------------------------------------
08ab | * | make HP for monster in accu
--------------------------------------------------------------------------------
08ae | * | join monster in accu in partys special slot
--------------------------------------------------------------------------------
08b1 | * | load a dungeon file. in $eo is the file name modifier, e.g.
| | $e0 = 07, then $a0 is added ==> $a7, thus NMA7 is loaded.
| | This also works with numbers above $0f, so more than 16 dungeon
| | files are possible. $e0 = 10 ==> NMB0
--------------------------------------------------------------------------------
08b4 | |
--------------------------------------------------------------------------------
08b7 | * | give item in $70 to char in slot in accu, if an empty item
| | space. Test the usability for the char and set the item state
| | accordingly (unequipped, unusable etc).
| | Clears carry, if item was given, else sets it.
--------------------------------------------------------------------------------
08ba | |
--------------------------------------------------------------------------------
08bd | * | checks, if a given character has an item that has a given
| | function. It works like this: accu contains a value,
| | x contains a party slot #. This routine gets every item of that
| | char, uses the item # as index into a list at a47f, and if the
| | value there matches the accu, the char has a valid item...
| | This way a check for any item with the same function seemed to
| | be easier, thats probably why...
--------------------------------------------------------------------------------
08c0 | * | returns in accu the slot number of the first character that is
| | not: dead, paralyzed or stoned, or he is, but a spell is active
| | that lets the character act anyway (animate dead or such).
| | If no character who can act is there, the carry flag is set and
| | the party is unable to act.
--------------------------------------------------------------------------------
08c3 | * | load the NM file given in accu
--------------------------------------------------------------------------------
08c6 | * | y contains an offset into the chars item list in roster. This
| | routine moves up all following items 1 slot, thus deleting the
| | item at the index in y
--------------------------------------------------------------------------------
08c9 | * | save file
--------------------------------------------------------------------------------
08cc | | sets char colors for gfx output, 2 color numbers, 1 per nibble.
| | The two colors are put into the accu before calling this sub.
--------------------------------------------------------------------------------
08cf | |
--------------------------------------------------------------------------------
08d2 | * | ??? restore ac for all party members ???
--------------------------------------------------------------------------------
| |
--------------------------------------------------------------------------------
ae00 | * | handles the city... ???
--------------------------------------------------------------------------------
ae03 | * | prepare city view output; saves map cells for this cells:
| | 3 in view direction, 2 in view plus it's two neighbours,
| | 1 in view plus the two neigbours, and neighbours of this cell.
| | x x x
| | xxx xxx xxx xxx
| | xxx xxx xxx xxx
| | xxx x x xxx x
| |
| | Same applies for dungeons acordingly.
--------------------------------------------------------------------------------
ae06 | * |
--------------------------------------------------------------------------------
ae09 | * | show the present dungeon view
--------------------------------------------------------------------------------
ae0c | * | leave the dungeon and return to Skara Brae to the coordinates
| | given in the dungeon map file
--------------------------------------------------------------------------------
ae0f | * | move the party one cell into the direction of $02
--------------------------------------------------------------------------------
Last edited by ZeroZero on Tue Oct 15, 2013 9:01 am, edited 16 times in total.
I T E M # 03
Last updated: 2010-04-16
Dungeon Maps....
Maps are loaded from the files NMA0 to NMAF, More were possible, but are not used in the original BT1 game.
The files contain 2 maps each, one for the walls and one for the events.
Each map is followed by 28 unused bytes.
This is the dungeon maps format:
And here is the table from that the effective file number to be loaded for a loadable event is taken:
Last updated: 2010-04-16
Dungeon Maps....
Maps are loaded from the files NMA0 to NMAF, More were possible, but are not used in the original BT1 game.
The files contain 2 maps each, one for the walls and one for the events.
Each map is followed by 28 unused bytes.
This is the dungeon maps format:
Code: Select all
000 - 001 Load Address of file
002 - 201 Wall Map, one byte per cell (see below),
lines are encoded south to north, west to east
202 - 401 Event Map, one byte per cell (see below),
lines are encoded south to north, west to east
402 - 409 Level flags, relate to NMAx file (8 levels)
40a - 411 Lock flags, teleport protected level FF, free level 00
412 monster level for random encounters
413 PHDO lock, 01 = PHDO locked, disabled
414 wall set style: 0 = sewer, 1 = Cellar, 2 = catacomb, 3 = Mangar
415 - 416 point of return into Skara Brae map
417 dungeon direction, 00 = cellars, 03 = towers
418 - 421 dungeon name (9 chars and dc)
422 - 431 coordinates for up to 8 special events
loaded from files (8 coors)
432 - 441 indices into file load table to evaluate file
number to be loaded from there (see below)
442 - 461 anti magic (16 coors)
462 - 471 teleport FROM coors (8 coors)
472 - 481 teleport TO coors (8 coors)
482 - 491 Spinners (8 coors)
492 - 4a1 Smoke (8 coors)
4a2 - 4c1 HP damage zone (16 coors)
4c2 - 4d1 SP regeneration zone (8 coors)
4d2 - 4e1 Stasis chambers (8 coors)
4e2 - 4f1 cells with messages, same sequence as following texts (8 coors)
4f2 - 501 forced encounters, inavoidable fights (8 coors)
502 - 511 type and number of opps from 4f2
512 - 521 text offset, low/high byte, in file text starts actually
when you substract -FD20 (8 pairs)
522 - eof texts
_______________________________________________________
002 - 201 Wall Map, one byte per cell (see below)
each byte represent 1 cell. The bits 0 and 1 for the north side,
bits 2 and 3 for the south side, bits 4 and 5 east and bits
6 and 7 west.
00 = no walls
01 = wall
10 = door
11 = secret door
_______________________________________________________
202 - 401 Event flags
bit 0 set if there are stairs to previous level, depending on 417 up or down
bit 1 set if there are stairs to next level, depending on 417 up or down
bit 2 set if there is a special
bit 3 set if there's darkness
bit 4 set if there's a trap.
bit 5 set if there's a portal down
bit 6 set if there's a portal up
bit 7 set if there's a random encounter scheduled for this tile.
Code: Select all
1b 0c 0d 0e 0b 00 0f 10 1c 1d 1e 11 12 14 13 1f
20 21 22 23 24 25 15 26 27 28 29 2a 2b 2c 2d 2e
2f 16 18 17 30 31 32 33 34 19 35 36 37 38 39 3a
3b 3c 3d 3e 3f 40 41 42 43 44
Last edited by ZeroZero on Fri Apr 16, 2010 10:23 pm, edited 3 times in total.
I T E M # 04
Last update: 2010-05-12
And here is the file list, as far as it is identified yet.
NMF0 is assumed by Twoflowers to contain the bard tunes and that it is preloaded, since this lacks on the dungeon disk.
* means: I have disassembled this event.
A means: this gfx contains an animation
Last update: 2010-05-12
And here is the file list, as far as it is identified yet.
NMF0 is assumed by Twoflowers to contain the bard tunes and that it is preloaded, since this lacks on the dungeon disk.
* means: I have disassembled this event.
A means: this gfx contains an animation
Code: Select all
NM00 Character roster Part 1
NM01 Character roster Part 2
NM02 BT 1 engine/OS, ae00 routines for DUNGEON
NM03 screen: start game, copy chars and make a disk (Utilities menu)
NM04 city maps and city gfx
NM05 the dungeon wall gfx
NM06 the dungeon wall gfx
NM07 the dungeon wall gfx
NM08 the dungeon wall gfx
NM09 BT 1 engine/OS, ae00 routines for CITY
NM0A the shop equipment, each byte represents an item, see that list, FF means unlimited in stock
NM0B * EVENT: Review Board
NM0C * EVENT: Taverns, including the Scarlet Bard and the wine cellar entrance
NM0D * EVENT: Garth's equipment shop
NM0E * EVENT: Temple
NM0F * EVENT: empty building
NM10 * EVENT: pressing the ? key, contains street names
NM11 * EVENT: statue guards in city: Samurai, Stone giant, Ogre lord, Stone Golem, Grey Dragon
NM12 * EVENT: gates in city, Mangar and Kylearan
NM13 * EVENT: entrance to sewers from near Mangar's tower
NM14 * EVENT: Mad God temple in the city
NM15 * EVENT: Harkyn's castle in the city
NM16 * EVENT: game credits
NM17 * EVENT: Roscoe's energy emporium
NM18 * EVENT: Kylearan's tower in city
NM19 * EVENT: Mangar's tower in city
NM1A * EVENT: city gate, snowdrift
NM1B * EVENT: Inside Guild, with all menues
NM1C * EVENT: treasure chest
NM1D * EVENT: trap
NM1E * EVENT: wandering creature
NM1F * EVENT: Sewers 3, N 16, E 17, Long stairs up near Mangar's tower
NM20 * EVENT: Sewers 1, N 09, E 04, Spider God Statue
NM21 * EVENT: Sewers 2, N 04, E 00, Light beam
NM22 * EVENT: Sewers 2, N 04, E 03, Reveals name of mad god: TARJAN
NM23 * EVENT: Catacombs 2, N 12, E 10, Bashar Kavilor
NM24 * EVENT: Catacombs 2, N 13, E 06, Bashar Kavilor's pet dragon Sphynx
NM25 * EVENT: Catacombs 3, N 19, E 20, Witch King, get the EYE
NM26 * EVENT: Harkyn's 1, N 14, E 09, Baron's throne, Bard's only, opens secret door in N wall
NM27 * EVENT: Harkyn's 1, N 18, E 09, Captain of the guard
NM28 * EVENT: Harkyn's 1, N 06, E 16, Guards in robes... robes protect vs the 4 x 99 Berzerks
NM29 * EVENT: Harkyn's 1, N 00, E 19, get the CRYSTAL SWORD
NM2A * EVENT: Harkyn's 2, N 09, E 09, riddle VAMPYRE
NM2B * EVENT: Harkyn's 2, N 00, E 00, get the SILVER SQUARE
NM2C * EVENT: Harkyn's 2, N 00, E 19, riddle SHIELDS, get YBARRASHIELD
NM2D * EVENT: Harkyn's 3, N 05, E 12, Berzerks 4 x 99, unless you wear the robes
NM2E * EVENT: Harkyn's 3, N 01, E 21, Mad God, if you have the EYE: teleport near Kylearan's
NM2F * EVENT: Harkyn's 3, N 05, E 09, riddle SKULL
NM30 * EVENT: Kylearan's, N 10, E 13, riddle STONE GOLEM, teleport to N 08, E 09
NM31 * EVENT: Kylearan's, N 02, E 12, riddle SINISTER, opens secret door at N 06, E 01
NM32 * EVENT: Kylearan's, N 20, E 02, get the SILVER TRIANGLE
NM33 * EVENT: Kylearan's, N 01, E 04, Crystal Statue, can only be beaten by CRYSTAL SWORD
NM34 * EVENT: Kylearan's, N 13, E 17, Kylearan, get ONYX KEY to unlock Mangar's Tower (not the gates!)
NM35 * EVENT: Mangar's 1, N 13, E 20, Teleport to Mangar's 2, N 13, E 20
NM36 * EVENT: Mangar's 2, N 15, E 04, riddle CIRCLE, get SILVER CIRCLE
NM37 * EVENT: Mangar's 3, N 12, E 19, buy MASTER KEY for the gates, or have a nasty fight
NM38 * EVENT: Mangar's 3, N 04, E 10, riddle LIE WITH PASSION AND BE FOREVER DAMNED, unlocks stairs N 09, E 03
NM39 * EVENT: Mangar's 4, N 08, E 12, black coffin with a Vampyre Lord
NM3A * EVENT: Mangar's 4, N 08, E 21, two sleeping dragons
NM3B * EVENT: Mangar's 4, N 09, E 20, riddle THOR, get a thor fgn
NM3C * EVENT: Mangar's 4, N 20, E 03, switch to flip walls to doors and vice versa, opens passage to stairs
NM3D * EVENT: Mangar's 5, N 15, E 10, insert the shapes to open the secret door (btw they form the EOA logo)
NM3E * EVENT: Mangar's 5, N 21, E 10, riddle SPECTRE SNARE, get it, causes high damage + critical hit
NM3F * EVENT: Mangar's 5, N 08, E 10, when Mangar is dead, Liches appear here (if you revisit this level)
NM40 * EVENT: Mangar's 5, N 10, E 21, if you dive the pool ==> teleport to N 06, E 10
NM41 * EVENT: Mangar's 5, N 17, E 00, Mangar's tresure trove, 2 black dragons
NM42 * EVENT: Mangar's 5, N 01, E 10, HP drain
NM43 * EVENT: Mangar's 5, N 01, E 20, one party hero will get POSSESSED and starts a party fight
NM44 * EVENT: Mangar's 5, N 20, E 10, Mangar... hard fight, high reward, secret shortcuts open
.... can there be more events up to NM4F? and can the index table for events be extended for that?
NM50 GFX: Inside The Guild
NM51 GFX: Inside Garth's Equipment Shoppe
NM52 A GFX: Inside The Inn
NM53 GFX: Outside of an Inn, daytime
NM54 A GFX: Inside Temple
NM55 GFX: Inside Empty house A
NM56 GFX: Inside Review Board
NM57 GFX: Outside of a Temple, daytime
NM58 GFX: Outside of The Guild, daytime
NM59 GFX: Outside of Garth's, daytime
NM5A GFX: Outside of a house A, daytime
NM5B GFX: Outside of a house B, daytime
NM5C GFX: Outside of a house C, daytime
NM5D GFX: Outside of a house D, daytime
NM5E GFX: Barbarian
NM5F GFX: Hobbit / Goblin
NM60 GFX: Warrior
NM61 A GFX: Magician
NM62 A GFX: Zombie
NM63 A GFX: Golem?
NM64 A GFX: Dragon
NM65 A GFX: Witch?
NM66 A GFX: Skeleton
NM67 GFX: Thief
NM68 A GFX: Dog / Wolf
NM69 GFX: Old man
NM6A GFX: Spider
NM6B GFX: Orc
NM6C GFX: Eye
NM6D GFX: Priest / High Priest
NM6E GFX: Monk
NM6F GFX: Paladin
NM70 GFX: Hydra
NM71 A GFX: Poltergeist?
NM72 GFX: Crystal Golem
NM73 GFX: Chest
NM74 A GFX: Treasure
NM75 GFX: Statue, daytime
NM76 GFX: Gate, daytime
NM77 A GFX: Vampire Lord
NM78 A GFX: Lich
NM79 A GFX: Giant
NM7A GFX: Michael Cranford
NM7B GFX: Kylearan
NM7C GFX: Mangar
NM7D GFX: Magic Mouth
NM7E GFX: Man w. Sword / Mad God
NM7F GFX: Angel
NM80 A GFX: Goblin
NM81 A GFX: Barbarian
NM82 GFX: Ghoul?
NM83 GFX: Inside Empty house B
NM84 GFX: Inside Empty house C
NM85 GFX: Inside Empty house D
NM86 A GFX: Wizard with spinning globe? Roscoe?
NM87 GFX: Outside of an Inn, night
NM88 GFX: Outside of a Temple, night
NM89 GFX: Outside of The Guild, night
NM8A GFX: Outside of Garth's, night
NM8B GFX: Outside of house A, night
NM8C GFX: Outside of house B, night
NM8D GFX: Outside of house C, night
NM8E GFX: Outside of house D, night
NM8F GFX: Statue, night
NM90 GFX: Gate, night
.... can there be more gfx up to NM9F? yes, confirmed by Twoflower
NMA0 Dungeon wine cellar, connected to sewers 1 - 3
NMA1 Dungeon sewers 1, connected to wine cellar and sewers 2 and 3
NMA2 Dungeon sewers 2, connected to wine cellar and sewers 1 and 3
NMA3 Dungeon sewers 3, connected to wine cellar and sewers 1 and 2
NMA4 Dungeon Catacombs 1, connected to Catacombs 2 & 3
NMA5 Dungeon Catacombs 2, connected to Catacombs 1 & 3
NMA6 Dungeon Catacombs 3, connected to Catacombs 1 & 2
NMA7 Dungeon Harkyn's 1, connected to Harkyn's 2 & 3
NMA8 Dungeon Harkyn's 2, connected to Harkyn's 1 & 3
NMA9 Dungeon Harkyn's 3, connected to Harkyn's 1 & 2
NMAA Dungeon Kylearan's 1, one level maze
NMAB Dungeon Mangar's 1, connected to Mangar's 2,3,4,5
NMAC Dungeon Mangar's 2, connected to Mangar's 1,3,4,5
NMAD Dungeon Mangar's 3, connected to Mangar's 1,2,4,5
NMAE Dungeon Mangar's 4, connected to Mangar's 1,2,3,5
NMAF Dungeon Mangar's 5, connected to Mangar's 1,2,3,4
.... how many dungeon files more are possible? NMB0 is confirmed to be possible
NMF0 ???? music, preloaded ????
Last edited by ZeroZero on Wed May 12, 2010 3:46 pm, edited 22 times in total.
I T E M # 05
Last update: 2010-03-04
Guilds....
Technically there is no problem to create more than one guild...
Practically it's useless....
Why?
BT1 does not save a game state, but rather the characters states.
This means, that no coordinate within the city is saved to disk and recalled on restart.
So the game does not know anything about at what place you left the game and always will start in the guild event, in which you also cannot tell, what the place of the last game save was.
So, you CAN have several guilds, but will never know at game restart, which one you must be in now....
I was thinking of patching the game files to store the party's last N and E coordinates, but unfortunately the party slots have no spare room for this. The characters roster have spare room, but that makes no sense, because, if you do NOT load a party, but several single characters, you could end up in six characters loaded with each one having the coordinates of a different guild. So from which guild do you want to start?
In BT1 on the CBM 64 you better go with just one guild in the city.
E D I T
As I just see there really is empty space in party's entries in the roster,
70 to 7f. So the game engine could be patched to save the guilds N and E position together with the party. This required that not only the characters
are saved back to disk on "leave game", but also the modified party entry.
Also in the guild event, that extra bytes must be loaded and evaluated. That way a party's start position in the game can be influenced, but not if single characters are loaded as a new party, such party's should start at a specific "standard guild".
Last update: 2010-03-04
Guilds....
Technically there is no problem to create more than one guild...
Practically it's useless....
Why?
BT1 does not save a game state, but rather the characters states.
This means, that no coordinate within the city is saved to disk and recalled on restart.
So the game does not know anything about at what place you left the game and always will start in the guild event, in which you also cannot tell, what the place of the last game save was.
So, you CAN have several guilds, but will never know at game restart, which one you must be in now....
I was thinking of patching the game files to store the party's last N and E coordinates, but unfortunately the party slots have no spare room for this. The characters roster have spare room, but that makes no sense, because, if you do NOT load a party, but several single characters, you could end up in six characters loaded with each one having the coordinates of a different guild. So from which guild do you want to start?
In BT1 on the CBM 64 you better go with just one guild in the city.
E D I T
As I just see there really is empty space in party's entries in the roster,
70 to 7f. So the game engine could be patched to save the guilds N and E position together with the party. This required that not only the characters
are saved back to disk on "leave game", but also the modified party entry.
Also in the guild event, that extra bytes must be loaded and evaluated. That way a party's start position in the game can be influenced, but not if single characters are loaded as a new party, such party's should start at a specific "standard guild".
Last edited by ZeroZero on Mon Mar 22, 2010 1:05 pm, edited 4 times in total.
That's why the game is item-driven. It checks the inventory of the characters to see whether they have "keys" in order to progress throughout the area.ZeroZero wrote:Guilds....
Technically there is no problem to create more than one guild...
Practically it's useless....
Why?
BT1 does not save a game state, but rather the characters states.
This means, that no coordinate within the city is saved to disk and recalled on restart.
So the game does not know anything about at what place you left the game and always will start in the guild event, in which you also cannot tell, what the place of the last game save was.
So, you CAN have several guilds, but will never know at game restart, which one you must be in now....
I was thinking of patching the game files to store the party's last N and E coordinates, but unfortunately the party slots have no spare room for this. The characters roster have spare room, but that makes no sense, because, if you do NOT load a party, but several single characters, you could end up in six characters loaded with each one having the coordinates of a different guild. So from which guild do you want to start?
In BT1 on the CBM 64 you better go with just one guild in the city.
I T E M # 06
Last updated: 2011-12-03
Added table for character base attribute values
Rosters....
Last updated: 2011-12-03
Added table for character base attribute values
Rosters....
Code: Select all
Roster entries
each entry is 128 bytes, two files are used, NM00 and NM01, each
file can carry 16 entries. One entry can either hold party information
or character information.
--------------------------------------------------------------
1) parties
--------------------------------------------------------------
Byte Value Meaning
--------------------------------------------------------------
00 AA is a party
01 - 0e BT Text name of party
0f FF sorta end marker
10 - 1f BT txt & FF Name of char 1 in party
20 - 2f BT txt & FF Name of char 2 in party
30 - 3f BT txt & FF Name of char 3 in party
40 - 4f BT txt & FF Name of char 4 in party
50 - 5f BT txt & FF Name of char 5 in party
60 - 6f BT txt & FF Name of char 6 in party
70 - 7f 00 unused
--------------------------------------------------------------
2) characters
--------------------------------------------------------------
Byte Value Meaning
--------------------------------------------------------------
00 - 0f BT txt & FF character's name, padded by ff's
10 - 13 bit packed char values:
0000-0|000 00|0|0-0000| 0000-0|000 00|0|0-0000
ST IQ ? DX CN LK ? ?-????
14 - 1f bytes Experience, every byte represents one decimal
digit: 01 02 03 04 05 06 06 05 04 03 02 01 ==>
123,456,654,321 experience points
20 - 21 hi, lo byte natural level
22 - 23 hi, lo byte current level, like being dropped by monsters
24 - 2f like XP gold, same coding as XP
30 - 31 hi, lo byte max HP
32 - 33 hi, lo byte cur HP, condition
34 - 35 hi, lo byte max SP
36 - 37 hi, lo byte cur SP
38 byte class: 0 Warrior 5 Rogue
1 Wizard 6 Bard
2 Sorcerer 7 Paladin
3 Conjurer 8 Hunter
4 Magician 9 Monk
39 byte race: 0 Human 4 Half-Elf
1 Elf 5 Half-Orc
2 Dwarf 6 Gnome
3 Hobbit
3a - 3b ???? ????
3c - 3d byte counter for won combats
3e byte status: 0:ok, 1:pois, 2:old, 3:dead, 4:ston, 5:para, 6:poss, 7:nuts
3f byte natural armor class
40 - 43 byte level of magic classes, Sorcerer, Conjurer, Magician, Wizard
44 byte rogue values: DISARM TRAP
45 byte rogue values: DETECT TRAP
46 byte rogue values: HIDE IN SHADOWS
47 byte ????
48 byte hunter critical hit chance
49 byte remaining Bard songs before he needs a drink
4a byte ????
4b byte ????
4c byte ????
4d byte flag, that a spell is active that overcomes the conditions of being
dead, stoned or paralyzed. This means the character can still act.
4e byte holds former health state
4f byte number of attacks per round for monks, warriors, paladins
50 - 5f byte pairs equipment
1. byte: 0 = unequpd, 1 = eqp, 2 = unusable, 3 = unknown
2. byte: item no
60 - 63 byte hold org attributes on special health states
64 - 7e ???? ????
7f byte checksum, build routine in guild event
--------------------------------------------------------------
3) in guild event used table for attrib creation
--------------------------------------------------------------
Basic values per RACE for attributes
Five values per race, indexed by race value
a253 0A 06 08 08 05 08 09 09
a25b 06 06 0C 06 07 0A 03 04
a263 06 0C 05 0A 09 08 09 07
a26b 06 0B 03 08 0B 04 09 0A
a273 07 03 04
Last edited by ZeroZero on Sat Dec 03, 2011 12:23 pm, edited 11 times in total.
I T E M # 07
Last update: 2013-10-15
Re-interpretation of the map code based on the game code.
The city...
the teleport in sinister street is hard-coded in the city handler after
ae00. I will publish that later and show, where and how. It can be
removed, replaced or another one be added.
Last update: 2013-10-15
Re-interpretation of the map code based on the game code.
The city...
the teleport in sinister street is hard-coded in the city handler after
ae00. I will publish that later and show, where and how. It can be
removed, replaced or another one be added.
Code: Select all
City Mem Map, city maps are in file NM04, street names in NM10.
City is loaded into main mem @ $F800 for buildings and @ $FC00
for street name indices.
In file it is located @ $1800, and @ $1c00,
each of the to maps is 900 bytes big
The city is 30 x 30 cells big, each line has 30 cells.
1800 - 1b83 House Map, one byte per cell (see below), lines are encoded north to south, west to east
1c00 - 1f83 Street Map, one byte per cell (see below), lines are encoded north to south, west to east
(plus 2 if the load address is in bytes 0 and 1)
_______________________________________________________________
Map 1: buildings and specials
This map contains all the buildings and specials and is used to call the related
events for a map cell.
Values Event called
00 none, is no building. ? command is available
01 02 03 04 standard house types, nothing special. if stepped on,
event NM0F is called
The cell values are shifted right 3 times and are then evaluated.
Values LSR*3 Event called
0B 1 guild, event NM1B
12 2 a tavern, event NM0C
1C 3 shop, event NM0D
21 4 a standard temple, event NM0E
2B 5 Review board, event NM0B
60 C some statue, event NM11 is called
68 D gate, event NM12 is called
71 E Mad God's temple, event NM14
78 F sewer entrance, event NM13
81 10 credits, event NM16
89 11 Roscoe, event NM17
91 12 Kylearans tower, event NM18
9B 13 Harkyn's castle, event NM15
A1 14 Mangars tower, event NM19
A8 15 city gate, event NM1A
_______________________________________________________________
00 00 00 01 02 03 03 02 01 03 04 01 02 01 03 04 03 02 01 03 03 04 02 01 01 01 01 03 02 01
01 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 00 00 00 04
01 03 00 00 01 03 02 04 03 04 01 00 01 02 04 03 02 00 02 03 04 03 04 00 00 68 00 91 00 03
01 04 00 00 60 00 60 00 00 00 02 00 04 00 00 00 01 00 00 00 00 00 00 01 00 02 00 00 00 04
01 00 00 01 02 04 00 00 21 00 03 00 02 00 01 00 00 00 01 03 04 02 00 02 00 03 04 68 02 01
03 00 00 04 9B 00 60 00 00 00 02 00 03 00 00 00 00 00 00 00 00 00 00 03 00 02 03 00 03 02
01 02 00 02 03 01 00 00 01 03 04 00 04 02 01 03 00 01 02 04 00 00 01 04 00 04 01 00 04 01
01 01 00 00 00 00 60 01 00 00 00 00 00 00 00 04 00 00 00 00 00 01 00 00 00 00 00 00 00 03
04 00 00 00 00 00 00 02 00 03 01 00 89 02 00 00 04 03 02 01 00 02 00 02 01 00 02 01 04 01
03 00 02 04 03 02 00 04 00 00 04 00 00 00 04 00 00 00 00 02 00 04 00 2B 02 00 03 00 02 01
02 00 00 00 00 04 00 00 00 00 02 01 03 00 01 02 03 04 00 00 00 03 00 12 03 00 00 00 00 02
03 00 04 01 00 02 03 04 03 00 00 12 01 00 21 21 21 21 04 03 02 02 00 03 00 00 1C 00 03 01
02 00 01 00 00 00 00 00 00 04 00 02 21 00 00 00 00 00 00 00 00 04 00 02 00 00 00 00 00 03
01 02 03 00 01 00 01 02 00 01 02 04 21 00 00 00 00 00 71 03 00 01 00 01 04 00 04 01 02 01
A8 00 00 00 02 00 03 04 00 00 00 01 21 00 00 00 00 00 71 04 00 00 00 03 0B 00 81 01 01 01
01 01 02 60 04 00 00 00 02 03 00 02 21 00 00 00 00 00 71 01 04 01 00 04 02 00 02 01 03 01
03 00 04 00 03 02 01 00 00 04 00 00 00 00 00 00 00 00 71 02 03 03 00 02 00 00 00 00 00 02
04 00 02 00 00 00 00 04 00 01 02 04 03 21 21 21 21 00 04 00 00 02 00 01 00 00 01 02 04 01
04 00 00 00 04 02 00 03 00 00 00 01 02 03 04 02 03 00 02 00 00 00 00 00 04 00 00 00 00 02
03 00 00 00 00 00 00 02 00 02 00 00 00 01 03 00 00 00 01 00 01 03 02 00 00 03 02 00 03 00
00 02 03 00 01 02 00 01 00 00 03 02 00 04 02 00 02 03 04 00 00 00 00 04 00 01 21 00 00 03
00 12 02 00 04 03 00 01 00 00 01 04 00 00 00 00 00 00 00 01 00 00 01 02 00 00 03 00 04 00
01 00 00 00 00 04 00 03 00 00 01 02 04 03 02 03 04 01 04 01 02 12 04 00 04 00 01 00 00 01
00 01 03 60 01 02 60 04 00 00 00 00 00 01 02 00 00 00 00 03 12 02 00 00 01 00 02 60 01 00
00 04 00 00 03 00 00 02 00 00 01 02 00 00 00 00 02 04 00 00 00 00 00 00 02 00 01 00 12 00
00 02 68 01 00 03 00 03 00 00 04 02 03 04 04 03 00 00 00 00 00 00 00 02 03 00 04 00 03 00
01 00 00 00 04 00 00 04 00 00 00 00 00 00 00 00 00 00 02 00 00 21 60 00 01 00 03 00 01 01
02 00 A1 00 68 00 02 03 02 03 02 01 04 03 02 04 01 00 00 00 00 60 00 00 04 00 01 00 00 03
03 78 00 00 04 03 00 00 00 00 00 00 00 00 00 00 00 02 01 04 12 04 00 00 01 00 02 04 03 00
04 03 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 03 02 00 01 00 00 00
_______________________________________________________________
Map 2: streets
This map contains all the street names.
Event in NM10 uses this map to evaluate the street name.
_______________________________________________________________
01 01 01 01 02 03 03 02 01 03 04 01 02 01 03 04 03 02 01 03 03 04 02 01 01 01 01 03 02 01
01 01 02 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 02 03 0C 0C 0C 04
01 03 0C 0C 01 03 02 04 03 04 01 05 01 02 04 03 02 00 02 03 04 03 04 0C 0C 0C 0C 31 0C 03
01 04 00 00 00 00 00 00 00 00 02 05 04 06 06 06 01 06 06 06 06 06 06 01 00 02 0C 08 0C 04
01 00 00 01 02 04 00 00 21 00 03 05 02 06 01 06 06 06 01 03 04 02 06 02 00 03 04 08 02 01
03 00 00 04 03 00 00 00 00 00 02 05 03 06 06 06 06 06 06 06 06 06 06 03 00 02 03 08 03 02
01 02 00 02 03 01 00 00 01 03 04 05 04 02 01 03 00 01 02 04 00 00 01 04 00 04 01 08 04 01
01 01 11 11 11 11 11 01 0E 0E 0E 05 00 00 00 04 00 00 00 00 00 01 02 02 02 02 02 08 02 03
04 11 11 11 11 11 11 02 00 03 01 05 01 02 00 00 04 03 02 01 00 02 04 02 01 03 02 01 04 01
03 00 02 04 03 02 11 04 00 00 04 05 00 00 04 00 00 00 00 02 00 04 04 2B 02 03 03 00 02 01
02 12 12 12 12 04 11 11 11 11 02 01 03 00 01 02 03 04 00 00 00 03 04 12 03 03 00 00 00 02
03 00 04 01 12 02 03 04 03 11 11 12 01 00 21 21 21 21 04 03 02 02 04 03 03 03 1C 00 03 01
02 00 01 0D 12 12 12 12 12 04 11 02 21 FF FF FF FF FF FF FF FF 04 04 02 03 03 00 00 00 03
01 02 03 0D 01 00 01 02 12 01 02 04 21 FF FF FF FF FF 21 03 00 01 04 01 04 03 04 01 02 01
01 00 00 0D 02 00 03 04 12 12 12 01 21 FF FF FF FF FF 21 04 00 00 04 03 0B 03 03 01 01 01
01 01 02 0D 04 00 00 00 02 03 12 02 21 FF FF FF FF FF 21 01 04 01 04 04 02 03 02 01 03 01
03 00 04 0D 03 02 01 00 07 04 12 12 12 FF FF FF FF FF 21 02 03 03 04 02 03 03 00 00 00 02
04 00 02 0D 00 00 0A 04 07 01 02 04 03 21 21 21 21 00 04 09 09 02 04 01 03 03 01 02 04 01
04 00 00 0D 04 02 0A 03 07 0F 0F 01 02 03 04 02 03 00 02 09 09 00 94 09 04 03 03 01 03 02
03 00 00 0D 00 00 0A 02 07 02 0F 0F 0F 01 03 00 00 00 01 09 01 03 02 10 10 03 02 01 03 00
01 02 03 0D 01 02 0A 01 07 07 03 01 0F 04 02 00 02 03 04 00 00 00 00 04 10 01 21 01 01 03
00 12 02 0D 04 03 0A 01 07 07 01 01 0F 0F 0F 0F 0F 0F 0F 01 00 00 01 02 10 10 03 01 04 00
01 00 00 0D 00 04 0A 03 07 07 01 02 04 03 02 03 04 01 04 01 02 12 04 00 04 10 01 01 01 01
01 01 03 0D 01 02 0A 04 07 07 13 13 13 01 02 13 13 13 13 03 12 02 00 00 01 10 02 01 01 00
01 04 0D 0D 03 0A 0A 02 07 07 01 02 13 13 13 13 02 04 13 13 13 13 13 13 02 10 01 01 12 00
01 02 0D 01 02 03 0A 03 07 07 04 02 03 04 04 03 0B 0B 0B 0B 0B 0B 0B 02 03 10 04 01 03 00
01 0D 0D 0D 04 0A 0A 04 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 02 0B 0B 21 0B 0B 01 10 03 01 01 01
02 0D 01 0D 00 00 02 03 02 03 02 01 04 03 02 04 01 0B 0B 0B 0B 0B 0B 0B 04 10 01 01 01 03
03 0D 0D 0D 04 03 00 00 00 00 00 00 00 00 00 00 00 02 01 04 12 04 0B 0B 01 10 02 04 03 00
04 03 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 03 02 10 01 00 00 00
Last edited by ZeroZero on Tue Oct 15, 2013 7:06 pm, edited 6 times in total.
I T E M # 08
Last updated: 2010-03-22
several new chars have been identified.
Found ESC key (<- on C64 keyboard)
String encoding....
Last updated: 2010-03-22
several new chars have been identified.
Found ESC key (<- on C64 keyboard)
String encoding....
Code: Select all
Here is the text encoding like used in BT1 on the CBM 64:
Hex character/function
=========================================
00 new line, line feed
8D is used in "get key" for return
9B escape key
A0 space
A1 !
A2 "
A3 #
A4-A6 not used
A7 '
A8 (
A9 )
AA *
AB +
AC ,
AD -
AE .
AF non-printable, seems to hold text position to connect next print here
B0-B9 0 - 9, the 0 is represented by the uppercase O
BA :
BB ;
BC <
BD =
BE >
BF ?
C0 @
C1-DA A - Z
DB [
DC non-printable, string end
DD ]
DE special symbol for unusable item by that class
DF _
E0 ', seems to be same like A7
E1-FA a - z
FB [
FC special symbol for equipped item
FD ]
FE inverted blank, cursor symbol for line input
FF non-printable, string end, but for adding strings later
there might be more/other characters used
Last edited by ZeroZero on Mon Mar 22, 2010 1:07 pm, edited 5 times in total.
I T E M # 09
Last update: 2010-03-04
The teleport in sinister street...
... is located in file NM09, which handles the city.
It is at file-offset 5e7 (incl. 2 bytes for prg load address)
In memory it will be loaded at b3e5.
This assembler snippet shows, how the party's position
in town ($28 for north, $29 for east) will be tested for
N 2, E 25, and if it matches, positions the party at N 7, E 25.
That's the whole thing...
Last update: 2010-03-04
The teleport in sinister street...
... is located in file NM09, which handles the city.
It is at file-offset 5e7 (incl. 2 bytes for prg load address)
In memory it will be loaded at b3e5.
This assembler snippet shows, how the party's position
in town ($28 for north, $29 for east) will be tested for
N 2, E 25, and if it matches, positions the party at N 7, E 25.
That's the whole thing...
Code: Select all
b3e5:05e7:1 a5 28 lda $28
b3e7:05e9:1 c9 02 cmp #$02
b3e9:05eb:1 d0 0e bne $b3f9
b3eb:05ed:1 a5 29 lda $29
b3ed:05ef:1 c9 19 cmp #$19
b3ef:05f1:1 d0 08 bne $b3f9
b3f1:05f3:1 a9 07 lda #$07
b3f3:05f5:1 85 28 sta $28
b3f5:05f7:1 a9 19 lda #$19
b3f7:05f9:1 85 29 sta $29
b3f9:05fb:1 60 rts
Last edited by ZeroZero on Mon Mar 22, 2010 1:08 pm, edited 2 times in total.