<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Theruler</id>
	<title>ModdingWiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Theruler"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/Theruler"/>
	<updated>2026-06-28T00:50:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12865</id>
		<title>HeroQuest EXE File</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12865"/>
		<updated>2026-06-26T17:15:37Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Various */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original exe is compressed with EXEPACKER, you must decompress with UNP to manipulate it.&lt;br /&gt;
&lt;br /&gt;
{{Executable Infobox&lt;br /&gt;
 | Interpreted = N&lt;br /&gt;
 | Platform = MS-DOS&lt;br /&gt;
 | Code = 16-bit x86&lt;br /&gt;
 | Games = {{Game|HeroQuest}}&lt;br /&gt;
  Memory information:&#039;&#039;&#039;&amp;lt;br&amp;gt;Code segment = 01EF&amp;lt;br&amp;gt;Data segment = 0B6B&amp;lt;br&amp;gt;Stack segment = 25F2&#039;&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= [CODE SEGMENT] Main Routines =&lt;br /&gt;
These are the main routines of the game, disassembled with DOSBOX debugger and annotated.&lt;br /&gt;
&lt;br /&gt;
== in-game main loop ==&lt;br /&gt;
 01EF:0413  E8E65F              call 000063FC ($+5fe6)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0416  E8FA5F              call 00006413 ($+5ffa)					&amp;lt;---- Checks left mouse button and everityng under it&lt;br /&gt;
 01EF:0419  C606CC40FF          mov  byte [40CC],FF         ds:[40CC]=DFFF   &lt;br /&gt;
 01EF:041E  F606923920          test byte [3992],20         ds:[3992]=9200		&amp;lt;---- Checks if right mouse button has been pressed&lt;br /&gt;
 01EF:0423  7403                je   00000428 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0425  E82E03              call 00000756 ($+32e)  					&amp;lt;---- ends the turn if right mouse button pressed&lt;br /&gt;
 01EF:0428  E85963              call 00006784 ($+6359) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:042B  E8A202              call 000006D0 ($+2a2)  					&amp;lt;---- ???&lt;br /&gt;
 01EF:042E  E8E564              call 00006916 ($+64e5) 					&amp;lt;---- draws in the correct order heroes and forniture&lt;br /&gt;
 01EF:0431  E84553              call 00005779 ($+5345) 					&amp;lt;---- same as above?&lt;br /&gt;
 01EF:0434  E8DD53              call 00005814 ($+53dd) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:043A  E87B53              call 000057B8 ($+537b) 					&amp;lt;---- draws heroes, monsters, forniture and doors (not the walls)&lt;br /&gt;
 01EF:043D  E8B454              call 000058F4 ($+54b4) 					&amp;lt;---- Checks if orthogonal tiles are walkable and updates the directional arrows&lt;br /&gt;
 01EF:0440  E8A156              call 00005AE4 ($+56a1) 					&amp;lt;---- Checks if monsters are present in the room and updates search icons&lt;br /&gt;
 01EF:0443  E81E60              call 00006464 ($+601e) 					&amp;lt;---- activates attack, magic, treasure, traps icons&lt;br /&gt;
 01EF:0446  E8CF60              call 00006518 ($+60cf) 					&amp;lt;---- draws yellow figures on top left&lt;br /&gt;
 01EF:0449  E8C859              call 00005E14 ($+59c8)					&amp;lt;---- draws glove mouse pointer&lt;br /&gt;
 01EF:044C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000   &lt;br /&gt;
 01EF:0451  7503                jne  00000456 ($+3)         (down)           &lt;br /&gt;
 01EF:0453  E88E5C              call 000060E4 ($+5c8e)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0456  E87E59              call 00005DD7 ($+597e)					&amp;lt;---- Clean the previous mouse sprite&lt;br /&gt;
 01EF:0459  E85954              call 000058B5 ($+5459)					&amp;lt;---- Clean the previous hero sprite&lt;br /&gt;
 01EF:045C  E82100              call 00000480 ($+21)					&amp;lt;---- Quest event checks&lt;br /&gt;
 01EF:045F  E8EC13              call 0000184E ($+13ec)					&amp;lt;---- Checks if the hero stands on a stair tile&lt;br /&gt;
 01EF:0462  803E973F00          cmp  byte [3F97],00         ds:[3F97]=0000   &lt;br /&gt;
 01EF:0467  7403                je   0000046C ($+3)         (no jmp)         &lt;br /&gt;
 01EF:0469  E8BA00              call 00000526 ($+ba)        				&amp;lt;---- End turn wrap up (resets registers and variables)&lt;br /&gt;
 01EF:046C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000	&lt;br /&gt;
 01EF:0471  7401                je   00000474 ($+1)         (no jmp)	&lt;br /&gt;
 01EF:0473  C3                  ret						&lt;br /&gt;
 01EF:0474  803E923940          cmp  byte [3992],40         ds:[3992]=9200&lt;br /&gt;
 01EF:0479  7503                jne  0000047E ($+3)         (down)&lt;br /&gt;
 01EF:047B  E94FFE              jmp  000002CD ($-1b1)       (up)&lt;br /&gt;
 01EF:047E  EB93                jmp  short 00000413 ($-6d)  (up)				&amp;lt;--- goes back on top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shooting routine ==&lt;br /&gt;
Shooting routine (magic and throwing weapons) is utterly broken in this game.&amp;lt;br&amp;gt;&lt;br /&gt;
The code checks the map tile the projectile is above and determine if the line of sight is blocked or free.&amp;lt;br&amp;gt;&lt;br /&gt;
The way the map is coded resulted in a convoluted code that fails to check LOS.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;You can shoot past walls&#039;&#039;&#039; and always hit the target if the hero stands in contact with one wall and the target is the adjacent room exactly above or exactly to the right.&amp;lt;br&amp;gt;&lt;br /&gt;
You can also hit the target standing in the perfect diagonal like bishop&#039;s movement, and this could happen even if there are no active rooms (solid rock, but marked with 00 like rooms&#039; inner tiles) in between.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;LOS is blocked&#039;&#039;&#039; by parallel unrevealed secret doors and opened doors.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon check:&lt;br /&gt;
 01EF:0AB2  32C0                xor  al,al&lt;br /&gt;
 01EF:0AB4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- di+11 is equipped weapon. checks if it is crossbow?&lt;br /&gt;
 01EF:0AB8  7501                jne  00000ABB ($+1)         (no jmp)&lt;br /&gt;
 01EF:0ABA  C3                  ret&lt;br /&gt;
 01EF:0ABB  B0FD                mov  al,FD					&amp;lt;-- not crossbow&lt;br /&gt;
 01EF:0ABD  C3                  ret&lt;br /&gt;
 01EF:0ABE  807D1101            cmp  byte [di+11],01        ds:[B1A7]=0000	&amp;lt;-- starts here&lt;br /&gt;
 01EF:0ABF  7D11                jge  00000AD2 ($+11)        (down)		&amp;lt;-- jump if greater or equal&lt;br /&gt;
 01EF:0AC1  0174EE              add  [si-12],si             ds:[4DBA]=260D&lt;br /&gt;
 01EF:0AC4  807D1102            cmp  byte [di+11],02        ds:[46A8]=0010	&amp;lt;-- F64511/807D11 are the test/cmp of the equipped weapon&lt;br /&gt;
 01EF:0AC8  74E8                je   00000AB2 ($-18)        (up)&lt;br /&gt;
 01EF:0ACA  807D1140            cmp  byte [di+11],40        ds:[46A8]=0010&lt;br /&gt;
 01EF:0ACE  74E2                je   00000AB2 ($-1e)        (up)&lt;br /&gt;
 01EF:0AD0  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AD2  EBE0                jmp  short 00000AB4 ($-20)  (up)&lt;br /&gt;
 01EF:0AD4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- crossbow&lt;br /&gt;
 01EF:0AD8  750F                jne  00000AE9 ($+f)         (no jmp)&lt;br /&gt;
 01EF:0ADA  F6451120            test byte [di+11],20        ds:[46A8]=0010	&amp;lt;-- throwing axe&lt;br /&gt;
 01EF:0ADE  7509                jne  00000AE9 ($+9)         (no jmp)&lt;br /&gt;
 01EF:0AE0  F6451140            test byte [di+11],40        ds:[46A8]=0010	&amp;lt;-- spear&lt;br /&gt;
 01EF:0AE4  7503                jne  00000AE9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0AE6  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AE8  C3                  ret&lt;br /&gt;
&lt;br /&gt;
SHOOTING ROUTINE STARTS HERE:&lt;br /&gt;
 01EF:0AE9  C606B73F01          mov  byte [3FB7],01         ds:[3FB7]=0301&lt;br /&gt;
 01EF:0AEE  E82B00              call 00000B1C ($+2b)&lt;br /&gt;
 01EF:0AF1  32C0                xor  al,al&lt;br /&gt;
 01EF:0AF3  803EA83F01          cmp  byte [3FA8],01         ds:[3FA8]=0001	&amp;lt;-- check if LOS is blocked (1)&lt;br /&gt;
 01EF:0AF8  7401                je   00000AFB ($+1)         (down)&lt;br /&gt;
 01EF:0AFA  C3                  ret&lt;br /&gt;
 01EF:0AFB  B0FE                mov  al,FE&lt;br /&gt;
 01EF:0AFD  C606B73F00          mov  byte [3FB7],00         ds:[3FB7]=0300&lt;br /&gt;
 01EF:0B02  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
 01EF:0B1C  E81F06              call 0000113E ($+61f)&lt;br /&gt;
 01EF:0B1F  A0A83F              mov  al,[3FA8]              ds:[3FA8]=0001&lt;br /&gt;
 01EF:0B22  3401                xor  al,01&lt;br /&gt;
 01EF:0B24  A2B23F              mov  [3FB2],al              ds:[3FB2]=0000&lt;br /&gt;
 01EF:0B27  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Set global variables (shooter and target position/distance):&lt;br /&gt;
 01EF:113E  8B36D43F            mov  si,[3FD4]              ds:[3FD4]=4DC2&lt;br /&gt;
 01EF:1142  8A7C01              mov  bh,[si+01]             ds:[4DC3]=0F0A	&amp;lt;-- Target X &lt;br /&gt;
 01EF:1145  8A5C02              mov  bl,[si+02]             ds:[4DC4]=270F	&amp;lt;-- Target Y&lt;br /&gt;
 01EF:1148  8BCB                mov  cx,bx&lt;br /&gt;
 01EF:114A  8B3E3746            mov  di,[4637]              ds:[4637]=4697&lt;br /&gt;
 01EF:114E  8A7501              mov  dh,[di+01]             ds:[4698]=120A	&amp;lt;-- Hero X &lt;br /&gt;
 01EF:1151  8A5502              mov  dl,[di+02]             ds:[4699]=1212	&amp;lt;-- Hero Y &lt;br /&gt;
 01EF:1154  8836A53F            mov  [3FA5],dh              ds:[3FA5]=0C0C	&amp;lt;-- Hero X saved at 3FA5&lt;br /&gt;
 01EF:1158  8816A63F            mov  [3FA6],dl              ds:[3FA6]=020C	&amp;lt;-- Hero Y saved at 3FA6&lt;br /&gt;
 01EF:115C  C6069F3F00          mov  byte [3F9F],00         ds:[3F9F]=0000	&amp;lt;-- reset projectile temp distance (area used for math)&lt;br /&gt;
 01EF:1161  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0002	&amp;lt;-- reset LOS 0=free, 1=blocked&lt;br /&gt;
 01EF:1166  B7FF                mov  bh,FF&lt;br /&gt;
 01EF:1168  8AC6                mov  al,dh&lt;br /&gt;
 01EF:116A  2AC5                sub  al,ch&lt;br /&gt;
 01EF:116C  7504                jne  00001172 ($+4)         (down)&lt;br /&gt;
 01EF:116E  B700                mov  bh,00					&amp;lt;-- target is on the RIGHT (&amp;gt;)&lt;br /&gt;
 01EF:1170  EB06                jmp  short 00001178 ($+6)   (down)&lt;br /&gt;
 01EF:1172  7304                jnc  00001178 ($+4)         (down)&lt;br /&gt;
 01EF:1174  F6D8                neg  al&lt;br /&gt;
 01EF:1176  B701                mov  bh,01					&amp;lt;-- target is on the LEFT (&amp;lt;)&lt;br /&gt;
 01EF:1178  A2A13F              mov  [3FA1],al              ds:[3FA1]=0301	&amp;lt;-- horizontal distance shooter-target saved at 3FA1&lt;br /&gt;
 01EF:117B  8AE8                mov  ch,al&lt;br /&gt;
 01EF:117D  B3FF                mov  bl,FF&lt;br /&gt;
 01EF:117F  8AC2                mov  al,dl&lt;br /&gt;
 01EF:1181  2AC1                sub  al,cl&lt;br /&gt;
 01EF:1183  7504                jne  00001189 ($+4)         (down)&lt;br /&gt;
 01EF:1185  B300                mov  bl,00					&amp;lt;-- target is UNDER (v)&lt;br /&gt;
 01EF:1187  EB06                jmp  short 0000118F ($+6)   (down)&lt;br /&gt;
 01EF:1189  7304                jnc  0000118F ($+4)         (down)&lt;br /&gt;
 01EF:118B  F6D8                neg  al&lt;br /&gt;
 01EF:118D  B301                mov  bl,01					&amp;lt;-- target is ABOVE (^)&lt;br /&gt;
 01EF:118F  A2A23F              mov  [3FA2],al              ds:[3FA2]=0003	&amp;lt;-- vertical distance shooter-target saved at 3FA2&lt;br /&gt;
 01EF:1192  3AC5                cmp  al,ch&lt;br /&gt;
 01EF:1194  7240                jc   000011D6 ($+40)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
bx (bh+bl) registry status based on target/shooter position:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| 0101 || 0001 || FF01&lt;br /&gt;
|-&lt;br /&gt;
| 0100 || TRGT || FF00&lt;br /&gt;
|-&lt;br /&gt;
| 01FF || 00FF || FFFF&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
VERTICAL shooting routine:&lt;br /&gt;
 01EF:1196  8ACD                mov  cl,ch&lt;br /&gt;
 01EF:1198  8AE8                mov  ch,al&lt;br /&gt;
 01EF:119A  8AD0                mov  dl,al&lt;br /&gt;
 01EF:119C  000E9F3F            add  [3F9F],cl              ds:[3F9F]=0000	&amp;lt;-- update projectile travelled distance&lt;br /&gt;
 01EF:11A0  38169F3F            cmp  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11A4  7208                jc   000011AE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11A6  28169F3F            sub  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11AA  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F0D	&amp;lt;-- Temp Projectile X (d 0:F655)&lt;br /&gt;
 01EF:11AE  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y (d 0:F656)&lt;br /&gt;
 01EF:11B2  C706E9370000        mov  word [37E9],0000       ds:[37E9]=D238	&amp;lt;-- set Vertical flag&lt;br /&gt;
 01EF:11B8  882EEB37            mov  [37EB],ch              ds:[37EB]=F1E0	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11BC  80FD01              cmp  ch,01&lt;br /&gt;
 01EF:11BF  7505                jne  000011C6 ($+5)         (down)&lt;br /&gt;
 01EF:11C1  80FBFF              cmp  bl,FF&lt;br /&gt;
 01EF:11C4  7403                je   000011C9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:11C6  E84B00              call 00001214 ($+4b)&lt;br /&gt;
 01EF:11C9  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:11CE  7401                je   000011D1 ($+1)         (no jmp)&lt;br /&gt;
 01EF:11D0  C3                  ret&lt;br /&gt;
 01EF:11D1  FECD                dec  ch&lt;br /&gt;
 01EF:11D3  75C7                jne  0000119C ($-39)        (up)&lt;br /&gt;
 01EF:11D5  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
HORIZONTAL shooting routine:&lt;br /&gt;
 01EF:11D6  8AD0                mov  dl,al				&lt;br /&gt;
 01EF:11D8  8ACD                mov  cl,ch		&amp;lt;-- it moves ch in cl&lt;br /&gt;
 01EF:11DA  32ED                xor  ch,ch		&amp;lt;-- and puts to 00 ch because uses loop (thus cx) instead of dec ch of vertical routine&lt;br /&gt;
 01EF:11DC  00169F3F            add  [3F9F],dl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E0  380E9F3F            cmp  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E4  7208                jc   000011EE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11E6  280E9F3F            sub  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11EA  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y&lt;br /&gt;
 01EF:11EE  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F03	&amp;lt;-- Temp Projectile X&lt;br /&gt;
 01EF:11F2  C706E9370100        mov  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- set Horizontal flag&lt;br /&gt;
 01EF:11F8  880EEB37            mov  [37EB],cl              ds:[37EB]=AA04	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11FC  80F901              cmp  cl,01&lt;br /&gt;
 01EF:11FF  7505                jne  00001206 ($+5)         (down)&lt;br /&gt;
 01EF:1201  80FFFF              cmp  bh,FF&lt;br /&gt;
 01EF:1204  7403                je   00001209 ($+3)         (no jmp)&lt;br /&gt;
 01EF:1206  E80B00              call 00001214 ($+b)&lt;br /&gt;
 01EF:1209  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0001	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:120E  7401                je   00001211 ($+1)         (no jmp)&lt;br /&gt;
 01EF:1210  C3                  ret&lt;br /&gt;
 01EF:1211  E2C9                loop 000011DC ($-37)&lt;br /&gt;
 01EF:1213  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
Collision check routine on current tile IN WALL/DOORS map (ds:566F):&lt;br /&gt;
 01EF:1214  53                  push bx&lt;br /&gt;
 01EF:1215  52                  push dx&lt;br /&gt;
 01EF:1216  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=0839&lt;br /&gt;
 01EF:121A  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=3936&lt;br /&gt;
 01EF:121E  E85D4E              call 0000607E ($+4e5d)&lt;br /&gt;
 01EF:1221  80BF6F5600          cmp  byte [bx+566F],00      ds:[576C]=8128	&amp;lt;-- Check if tile is 00, if true jumps to the Object map check&lt;br /&gt;
 01EF:1226  742A                je   00001252 ($+2a)        (no jmp)			at 0B6B:566F is where WALLS/DOORS map is stored&lt;br /&gt;
 01EF:1228  8A876F56            mov  al,[bx+566F]           ds:[576C]=8128	&amp;lt;-- mov into al the current TILE (28=is north secret door)&lt;br /&gt;
 01EF:122C  833EE93701          cmp  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- 1=H, 0=V check for opened door subroutines&lt;br /&gt;
 01EF:1231  7411                je   00001244 ($+11)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
Vertical shoot subroutine that checks for Horizontal walls/doors:&lt;br /&gt;
 01EF:1233  24AC                and  al,AC 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1235  0AC0                or   al,al					AC= 10101100&lt;br /&gt;
 01EF:1237  7419                je   00001252 ($+19)        (no jmp)&lt;br /&gt;
 01EF:1239  A820                test al,20					&amp;lt;-- if door is Horizontal&lt;br /&gt;
 01EF:123B  7442                je   0000127F ($+42)        (down)&lt;br /&gt;
 01EF:123D  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:123F  743E                je   0000127F ($+3e)        (down)&lt;br /&gt;
 01EF:1241  EB0F                jmp  short 00001252 ($+f)   (down)&lt;br /&gt;
 01EF:1243  90                  nop&lt;br /&gt;
 &lt;br /&gt;
Horizontal shoot subroutine that checks for Vertical walls/doors:&lt;br /&gt;
 01EF:1244  245C                and  al,5C 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1246  0AC0                or   al,al					5C= 01011100&lt;br /&gt;
 01EF:1248  7408                je   00001252 ($+8)         (down)&lt;br /&gt;
 01EF:124A  A810                test al,10					&amp;lt;-- if door is Vertical&lt;br /&gt;
 01EF:124C  7431                je   0000127F ($+31)        (down)&lt;br /&gt;
 01EF:124E  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:1250  742D                je   0000127F ($+2d)        (down)&lt;br /&gt;
&lt;br /&gt;
Collision check routine on current tile IN OBJECTS map (ds:586F):&lt;br /&gt;
 01EF:1252  803EEB3701          cmp  byte [37EB],01         ds:[37EB]=6E03	&amp;lt;-- checks if the projectile is about to hit the target&lt;br /&gt;
 01EF:1257  742B                je   00001284 ($+2b)        (down)&lt;br /&gt;
 01EF:1259  80BF6F5800          cmp  byte [bx+586F],00      ds:[1576F]=3637	&amp;lt;-- checks if the tile is passable (00)&lt;br /&gt;
 01EF:125E  740E                je   0000126E ($+e)         (down)&lt;br /&gt;
 01EF:1260  8A876F58            mov  al,[bx+586F]           ds:[1576F]=3637	&amp;lt;-- ds:586F is where OBJECTS map is stored&lt;br /&gt;
 01EF:1264  BB4649              mov  bx,4946					&amp;lt;-- ds:4946 check &lt;br /&gt;
 01EF:1267  D7                  xlat&lt;br /&gt;
 01EF:1268  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:126B  EB17                jmp  short 00001284 ($+17)  (down)&lt;br /&gt;
 01EF:126D  90                  nop&lt;br /&gt;
 01EF:126E  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=004D&lt;br /&gt;
 01EF:1272  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=4D4D&lt;br /&gt;
 01EF:1276  E80E00              call 00001287 ($+e)&lt;br /&gt;
 01EF:1279  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:127C  EB06                jmp  short 00001284 ($+6)   (down)&lt;br /&gt;
 01EF:127E  90                  nop&lt;br /&gt;
 01EF:127F  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=BA6B	&amp;lt;-- sets LOS as blocked (1) and exits&lt;br /&gt;
 01EF:1284  5A                  pop  dx&lt;br /&gt;
 01EF:1285  5B                  pop  bx&lt;br /&gt;
 01EF:1286  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Updates with random numbers the first three bytes of heroes&#039; equipment every movement (presumably used as seed for RNG):&lt;br /&gt;
 01EF:1287  51                  push cx&lt;br /&gt;
 01EF:1288  57                  push di&lt;br /&gt;
 01EF:1289  B90500              mov  cx,0005&lt;br /&gt;
 01EF:128C  BF6346              mov  di,4663	&amp;lt;-- first byte of Barbarian equipment in memory&lt;br /&gt;
 01EF:128F  33C0                xor  ax,ax&lt;br /&gt;
 01EF:1291  803D00              cmp  byte [di],00           ds:[6CAA]=0000&lt;br /&gt;
 01EF:1294  740C                je   000012A2 ($+c)         (down)&lt;br /&gt;
 01EF:1296  385501              cmp  [di+01],dl             ds:[6CAB]=0000&lt;br /&gt;
 01EF:1299  7507                jne  000012A2 ($+7)         (no jmp)&lt;br /&gt;
 01EF:129B  387502              cmp  [di+02],dh             ds:[6CAC]=0000&lt;br /&gt;
 01EF:129E  7502                jne  000012A2 ($+2)         (no jmp)&lt;br /&gt;
 01EF:12A0  B001                mov  al,01&lt;br /&gt;
 01EF:12A2  83C71A              add  di,001A	&amp;lt;-- jumps to the following hero&#039;s equipment&lt;br /&gt;
 01EF:12A5  E2EA                loop 00001291 ($-16)&lt;br /&gt;
 01EF:12A7  5F                  pop  di&lt;br /&gt;
 01EF:12A8  59                  pop  cx&lt;br /&gt;
 01EF:12A9  C3                  ret&lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh&lt;br /&gt;
 01EF:6080  B700                mov  bh,00&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5					&amp;lt;-- ds:5AC5 check &lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[FF00]=3737&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New shooting routine ===&lt;br /&gt;
Finally I came up with a proper line of sight mechanism that cover roughly 99% of the &amp;quot;impossible shots&amp;quot;. There will always be a particular combiantion of monster-door-hero position that can lead to an &amp;quot;improbable shot&amp;quot;, but that&#039;s it.  &lt;br /&gt;
&lt;br /&gt;
Direction choice routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1198:  88 D0             mov  al, dl&lt;br /&gt;
 1ef:119a:  88 CC             mov  ah, cl&lt;br /&gt;
 1ef:119c:  05 01 01          add  ax, 0x101&lt;br /&gt;
 1ef:119f:  D0 E8             shr  al, 1&lt;br /&gt;
 1ef:11a1:  D0 EC             shr  ah, 1&lt;br /&gt;
 1ef:11a3:  A3 AA 3F          mov  word ptr [0x3faa], ax        &amp;lt;-- save half distance of X and Y&lt;br /&gt;
 &lt;br /&gt;
 1ef:11a6:  30 C0             xor  al, al                    &amp;lt;-- direction choice routine&lt;br /&gt;
 1ef:11a8:  3A 0E AB 3F       cmp  cl, byte ptr [0x3fab]        &amp;lt;-- check if X distance reached it&#039;s half&lt;br /&gt;
 1ef:11ac:  74 13             je   0x11c1                    &amp;lt;-- if YES reset X half value and change direction&lt;br /&gt;
 1ef:11ae:  3A 16 AA 3F       cmp  dl, byte ptr [0x3faa]        &amp;lt;-- check if Y distance reached it&#039;s half&lt;br /&gt;
 1ef:11b2:  74 06             je   0x11ba                    &amp;lt;-- if YES reset Y half value and change direction&lt;br /&gt;
 1ef:11b4:  38 CA             cmp  dl, cl&lt;br /&gt;
 1ef:11b6:  7C 2B             jl   0x11e3&lt;br /&gt;
 1ef:11b8:  EB 0C             jmp  0x11c6&lt;br /&gt;
 1ef:11ba:  C6 06 AA 3F 00    mov  byte ptr [0x3faa], 0&lt;br /&gt;
 1ef:11bf:  EB 22             jmp  0x11e3&lt;br /&gt;
 1ef:11c1:  C6 06 AB 3F 00    mov  byte ptr [0x3fab], 0&lt;br /&gt;
&lt;br /&gt;
Vertical&lt;br /&gt;
 1ef:11c6:  84 D2             test dl, dl                    &amp;lt;-- vertical routine&lt;br /&gt;
 1ef:11c8:  74 19             je   0x11e3                    &amp;lt;-- if Y distance is zero go to horizontal routine&lt;br /&gt;
 1ef:11ca:  00 1E A6 3F       add  byte ptr [0x3fa6], bl&lt;br /&gt;
 1ef:11ce:  B8 00 00          mov  ax, 0&lt;br /&gt;
 1ef:11d1:  80 FB FF          cmp  bl, 0xff&lt;br /&gt;
 1ef:11d4:  75 02             jne  0x11d8&lt;br /&gt;
 1ef:11d6:  B4 1A             mov  ah, 0x1a&lt;br /&gt;
 1ef:11d8:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11db:  FE CA             dec  dl&lt;br /&gt;
 1ef:11dd:  88 16 EB 37       mov  byte ptr [0x37eb], dl&lt;br /&gt;
 1ef:11e1:  EB 1B             jmp  0x11fe&lt;br /&gt;
 &lt;br /&gt;
Horizontal&lt;br /&gt;
 1ef:11e3:  84 C9             test cl, cl                    &amp;lt;-- horizontal routine&lt;br /&gt;
 1ef:11e5:  74 DF             je   0x11c6                    &amp;lt;-- if X distance is zero go to vertical routine&lt;br /&gt;
 1ef:11e7:  00 3E A5 3F       add  byte ptr [0x3fa5], bh&lt;br /&gt;
 1ef:11eb:  B8 01 00          mov  ax, 1&lt;br /&gt;
 1ef:11ee:  80 FF FF          cmp  bh, 0xff&lt;br /&gt;
 1ef:11f1:  75 02             jne  0x11f5&lt;br /&gt;
 1ef:11f3:  B4 01             mov  ah, 1&lt;br /&gt;
 1ef:11f5:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11f8:  FE C9             dec  cl&lt;br /&gt;
 1ef:11fa:  88 0E EB 37       mov  byte ptr [0x37eb], cl&lt;br /&gt;
 &lt;br /&gt;
 1ef:11fe:  E8 13 00          call 0x1214                    &amp;lt;-- calls wall/object collision check routine&lt;br /&gt;
 1ef:1201:  80 3E A8 3F 00    cmp  byte ptr [0x3fa8], 0      &amp;lt;-- collision flag&lt;br /&gt;
 1ef:1206:  74 01             je   0x1209   &lt;br /&gt;
 1ef:1208:  C3                ret                            &amp;lt;-- else object or wall was HIT&lt;br /&gt;
 1ef:1209:  88 C8             mov  al, cl&lt;br /&gt;
 1ef:120b:  00 D0             add  al, dl                    &amp;lt;-- if X+Y distance is not zero&lt;br /&gt;
 1ef:120d:  75 97             jne  0x11a6                    &amp;lt;-- back to direction choice routine&lt;br /&gt;
 1ef:120f:  C3                ret                            &amp;lt;-- else target was HIT&lt;br /&gt;
 1ef:1210:  90                nop  &lt;br /&gt;
 1ef:1211:  90                nop  &lt;br /&gt;
 1ef:1212:  90                nop  &lt;br /&gt;
 1ef:1213:  90                nop&lt;br /&gt;
 &lt;br /&gt;
Wall/object collision check routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1214:  53                push bx&lt;br /&gt;
 1ef:1215:  52                push dx&lt;br /&gt;
 1ef:1216:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]&lt;br /&gt;
 1ef:121a:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:121e:  E8 5D 4E          call 0x607e&lt;br /&gt;
 1ef:1221:  A0 EA 37          mov  al, byte ptr [0x37ea]&lt;br /&gt;
 1ef:1224:  30 E4             xor  ah, ah&lt;br /&gt;
 1ef:1226:  01 C3             add  bx, ax&lt;br /&gt;
 1ef:1228:  8A 87 6F 56       mov  al, byte ptr [bx + 0x566f]    &amp;lt;-- checks if the tile is free (00) or occupied (30=rock)&lt;br /&gt;
 1ef:122c:  3C 00             cmp  al, 0&lt;br /&gt;
 1ef:122e:  74 21             je   0x1251                        &amp;lt;-- if occupied jump to specific object check&lt;br /&gt;
 1ef:1230:  80 3E E9 37 01    cmp  byte ptr [0x37e9], 1&lt;br /&gt;
 1ef:1235:  74 0C             je   0x1243&lt;br /&gt;
 1ef:1237:  A8 20             test al, 0x20                        &amp;lt;-- Horizontal Door check&lt;br /&gt;
 1ef:1239:  75 12             jne  0x124d&lt;br /&gt;
 1ef:123b:  A8 80             test al, 0x80                        &amp;lt;-- Horizontal Wall check&lt;br /&gt;
 1ef:123d:  74 12             je   0x1251&lt;br /&gt;
 1ef:123f:  EB 3E             jmp  0x127f&lt;br /&gt;
 1ef:1241:  90                nop  &lt;br /&gt;
 1ef:1242:  90                nop  &lt;br /&gt;
 &lt;br /&gt;
 1ef:1243:  A8 10             test al, 0x10                        &amp;lt;-- Vertical Door check&lt;br /&gt;
 1ef:1245:  75 06             jne  0x124d&lt;br /&gt;
 1ef:1247:  A8 40             test al, 0x40                        &amp;lt;-- Vertical Wall check&lt;br /&gt;
 1ef:1249:  74 06             je   0x1251&lt;br /&gt;
 1ef:124b:  EB 32             jmp  0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:124d:  A8 04             test al, 4                            &amp;lt;-- opened door check&lt;br /&gt;
 1ef:124f:  74 2E             je   0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:1251:  8A 87 6F 58       mov  al, byte ptr [bx + 0x586f]    &amp;lt;-- specific object check&lt;br /&gt;
 1ef:1255:  BB 86 49          mov  bx, 0x4986                    &amp;lt;-- bitmask table where object properties are stored&lt;br /&gt;
 1ef:1258:  51                push cx&lt;br /&gt;
 1ef:1259:  88 C1             mov  cl, al&lt;br /&gt;
 1ef:125b:  C0 E9 03          shr  cl, 3&lt;br /&gt;
 1ef:125e:  01 CB             add  bx, cx&lt;br /&gt;
 1ef:1260:  59                pop  cx&lt;br /&gt;
 1ef:1261:  24 07             and  al, 7&lt;br /&gt;
 1ef:1263:  0F A3 07          bt   word ptr [bx], ax                &amp;lt;-- verify if the object is passable (ie. table) or not (ie. fireplace)&lt;br /&gt;
 1ef:1266:  72 17             jb   0x127f&lt;br /&gt;
 1ef:1268:  80 3E EB 37 00    cmp  byte ptr [0x37eb], 0            &amp;lt;-- checks if the projectile hit the target&lt;br /&gt;
 1ef:126d:  74 15             je   0x1284&lt;br /&gt;
 1ef:126f:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]            &amp;lt;-- update projectile&#039;s X and Y&lt;br /&gt;
 1ef:1273:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:1277:  E8 0D 00          call 0x1287&lt;br /&gt;
 1ef:127a:  A2 A8 3F          mov  byte ptr [0x3fa8], al&lt;br /&gt;
 1ef:127d:  EB 05             jmp  0x1284&lt;br /&gt;
 1ef:127f:  C6 06 A8 3F 01    mov  byte ptr [0x3fa8], 1&lt;br /&gt;
 1ef:1284:  5A                pop  dx&lt;br /&gt;
 1ef:1285:  5B                pop  bx&lt;br /&gt;
 1ef:1286:  C3                ret&lt;br /&gt;
&lt;br /&gt;
== Monster attack routine ==&lt;br /&gt;
This first block defines the target priority: barbarian - dwarf - elf - wizard - ragnar&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to revers it forcing the monster to chose the weaker hero first reversing the logic by starting from ragnar profile and then jump backward subtracting 1A.&amp;lt;br&amp;gt;&lt;br /&gt;
See [[#Heroes&#039; default profiles|Heroes&#039; default profiles]] for reference.&lt;br /&gt;
&lt;br /&gt;
 01EF:2257  BE6346              mov  si,4663					&amp;lt;-- starting profile offset 4663=barbarian&lt;br /&gt;
 01EF:225A  B90500              mov  cx,0005					&amp;lt;-- loop repeats 5 times &lt;br /&gt;
 01EF:225D  51                  push cx&lt;br /&gt;
 01EF:225E  8936D63F            mov  [3FD6],si              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2262  8A4419              mov  al,[si+19]             ds:[46CA]=0003	&amp;lt;-- jumps to hero&#039;s ID position&lt;br /&gt;
 01EF:2265  A2BC3F              mov  [3FBC],al              ds:[3FBC]=0003&lt;br /&gt;
 01EF:2268  E85800              call 000022C3 ($+58)&lt;br /&gt;
 01EF:226B  59                  pop  cx&lt;br /&gt;
 01EF:226C  8B36D63F            mov  si,[3FD6]              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2270  83C61A              add  si,001A					&amp;lt;-- jumps to the next profile&lt;br /&gt;
 01EF:2273  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2278  7503                jne  0000227D ($+3)         (down)&lt;br /&gt;
 01EF:227A  E95102              jmp  000024CE ($+251)       (down)&lt;br /&gt;
 01EF:227D  803EA83F03          cmp  byte [3FA8],03         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2282  7503                jne  00002287 ($+3)         (down)&lt;br /&gt;
 01EF:2284  E94702              jmp  000024CE ($+247)       (down)&lt;br /&gt;
 01EF:2287  E2D4                loop 0000225D ($-2c)&lt;br /&gt;
 01EF:2289  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 01EF:22C3  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000&lt;br /&gt;
 01EF:22C8  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:22CB  7503                jne  000022D0 ($+3)         (no jmp)&lt;br /&gt;
 01EF:22CD  E98101              jmp  00002451 ($+181)       (down)&lt;br /&gt;
 01EF:22D0  8A4403              mov  al,[si+03]             ds:[4666]=C726	&amp;lt;-- hero&#039;s room&lt;br /&gt;
 01EF:22D3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room&lt;br /&gt;
 01EF:22D6  7403                je   000022DB ($+3)         (down)&lt;br /&gt;
 01EF:22D8  E97601              jmp  00002451 ($+176)       (down)&lt;br /&gt;
 01EF:22DB  F6441801            test byte [si+18],01        ds:[467B]=0000&lt;br /&gt;
 01EF:22DF  7403                je   000022E4 ($+3)         (down)&lt;br /&gt;
 01EF:22E1  E96D01              jmp  00002451 ($+16d)       (down)&lt;br /&gt;
 01EF:22E4  8B5401              mov  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:22E7  52                  push dx&lt;br /&gt;
 01EF:22E8  57                  push di&lt;br /&gt;
 01EF:22E9  E864F7              call 00001A50 ($-89c)&lt;br /&gt;
 01EF:22EC  5F                  pop  di&lt;br /&gt;
 01EF:22ED  57                  push di&lt;br /&gt;
 01EF:22EE  E84E02              call 0000253F ($+24e)&lt;br /&gt;
 01EF:22F1  E8F03D              call 000060E4 ($+3df0)&lt;br /&gt;
 01EF:22F4  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:22F7  E88D23              call 00004687 ($+238d)&lt;br /&gt;
 01EF:22FA  5F                  pop  di&lt;br /&gt;
 01EF:22FB  5A                  pop  dx&lt;br /&gt;
 01EF:22FC  8816A53F            mov  [3FA5],dl              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2300  8836A63F            mov  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2304  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:2307  891ECA40            mov  [40CA],bx              ds:[40CA]=40A2&lt;br /&gt;
 01EF:230B  E8703D              call 0000607E ($+3d70)			&amp;lt;-- 	if jumped the monster doesn&#039;t attack when in contact&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:230E  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2312  8A07                mov  al,[bx]                ds:[3F28]=4040		&lt;br /&gt;
 01EF:2314  243F                and  al,3F				&lt;br /&gt;
 01EF:2316  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room check. if removed the monster attack through walls and doors&lt;br /&gt;
 01EF:2319  7403                je   0000231E ($+3)         (down)&lt;br /&gt;
 01EF:231B  E93301              jmp  00002451 ($+133)       (down)&lt;br /&gt;
 01EF:231E  B501                mov  ch,01&lt;br /&gt;
 01EF:2320  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2323  2A4501              sub  al,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2326  7504                jne  0000232C ($+4)         (no jmp)&lt;br /&gt;
 01EF:2328  B500                mov  ch,00&lt;br /&gt;
 01EF:232A  EB08                jmp  short 00002334 ($+8)   (down)&lt;br /&gt;
 01EF:232C  3C80                cmp  al,80&lt;br /&gt;
 01EF:232E  7204                jc   00002334 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2330  F6D8                neg  al&lt;br /&gt;
 01EF:2332  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2334  A2A13F              mov  [3FA1],al              ds:[3FA1]=0100&lt;br /&gt;
 01EF:2337  882EA33F            mov  [3FA3],ch              ds:[3FA3]=0100&lt;br /&gt;
 01EF:233B  B501                mov  ch,01&lt;br /&gt;
 01EF:233D  A0A63F              mov  al,[3FA6]              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2340  2A4502              sub  al,[di+02]             ds:[4DBA]=260F&lt;br /&gt;
 01EF:2343  7504                jne  00002349 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2345  B500                mov  ch,00&lt;br /&gt;
 01EF:2347  EB08                jmp  short 00002351 ($+8)   (down)&lt;br /&gt;
 01EF:2349  3C80                cmp  al,80&lt;br /&gt;
 01EF:234B  7204                jc   00002351 ($+4)         (no jmp)&lt;br /&gt;
 01EF:234D  F6D8                neg  al&lt;br /&gt;
 01EF:234F  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2351  A2A23F              mov  [3FA2],al              ds:[3FA2]=0001&lt;br /&gt;
 01EF:2354  882EA43F            mov  [3FA4],ch              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2358  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:235B  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006&lt;br /&gt;
 01EF:235F  C606A93F00          mov  byte [3FA9],00         ds:[3FA9]=0000&lt;br /&gt;
 01EF:2364  8A5D09              mov  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:2367  02DB                add  bl,bl&lt;br /&gt;
 01EF:2369  02DB                add  bl,bl&lt;br /&gt;
 01EF:236B  025D09              add  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:236E  32FF                xor  bh,bh&lt;br /&gt;
 01EF:2370  8A870648            mov  al,[bx+4806]           [illegal]&lt;br /&gt;
 01EF:2374  A29C3F              mov  [3F9C],al              ds:[3F9C]=0003&lt;br /&gt;
 01EF:2377  8A0EA23F            mov  cl,[3FA2]              ds:[3FA2]=0001&lt;br /&gt;
 01EF:237B  A0A13F              mov  al,[3FA1]              ds:[3FA1]=0100&lt;br /&gt;
 01EF:237E  3AC1                cmp  al,cl&lt;br /&gt;
 01EF:2380  7203                jc   00002385 ($+3)         (no jmp)&lt;br /&gt;
 01EF:2382  EB6A                jmp  short 000023EE ($+6a)  (down)&lt;br /&gt;
 01EF:2384  90                  nop&lt;br /&gt;
 01EF:2385  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2389  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:238D  7425                je   000023B4 ($+25)        (down)&lt;br /&gt;
 01EF:238F  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2392  0AC0                or   al,al&lt;br /&gt;
 01EF:2394  741E                je   000023B4 ($+1e)        (down)&lt;br /&gt;
 01EF:2396  02F0                add  dh,al&lt;br /&gt;
 01EF:2398  E8DD00              call 00002478 ($+dd)&lt;br /&gt;
 01EF:239B  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:239D  7503                jne  000023A2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:239F  E9B500              jmp  00002457 ($+b5)        (down)&lt;br /&gt;
 01EF:23A2  0AC0                or   al,al&lt;br /&gt;
 01EF:23A4  750E                jne  000023B4 ($+e)         (no jmp)&lt;br /&gt;
 01EF:23A6  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:23AA  E8B000              call 0000245D ($+b0)&lt;br /&gt;
 01EF:23AD  7303                jnc  000023B2 ($+3)         (down)&lt;br /&gt;
 01EF:23AF  E99900              jmp  0000244B ($+99)        (down)&lt;br /&gt;
 01EF:23B2  EBD1                jmp  short 00002385 ($-2f)  (up)&lt;br /&gt;
 01EF:23B4  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23B8  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23BB  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23BD  7503                jne  000023C2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23BF  E98F00              jmp  00002451 ($+8f)        (down)&lt;br /&gt;
 01EF:23C2  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23C5  0AC0                or   al,al&lt;br /&gt;
 01EF:23C7  7503                jne  000023CC ($+3)         (no jmp)&lt;br /&gt;
 01EF:23C9  E98500              jmp  00002451 ($+85)        (down)&lt;br /&gt;
 01EF:23CC  02D0                add  dl,al&lt;br /&gt;
 01EF:23CE  E8A700              call 00002478 ($+a7)&lt;br /&gt;
 01EF:23D1  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:23D3  7503                jne  000023D8 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23D5  E97F00              jmp  00002457 ($+7f)        (down)&lt;br /&gt;
 01EF:23D8  0AC0                or   al,al&lt;br /&gt;
 01EF:23DA  7403                je   000023DF ($+3)         (down)&lt;br /&gt;
 01EF:23DC  EB73                jmp  short 00002451 ($+73)  (down)&lt;br /&gt;
 01EF:23DE  90                  nop&lt;br /&gt;
 01EF:23DF  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23E2  32E4                xor  ah,ah&lt;br /&gt;
 01EF:23E4  E87600              call 0000245D ($+76)&lt;br /&gt;
 01EF:23E7  7303                jnc  000023EC ($+3)         (down)&lt;br /&gt;
 01EF:23E9  EB60                jmp  short 0000244B ($+60)  (down)&lt;br /&gt;
 01EF:23EB  90                  nop&lt;br /&gt;
 01EF:23EC  EB97                jmp  short 00002385 ($-69)  (up)&lt;br /&gt;
 01EF:23EE  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23F2  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23F5  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23F7  7426                je   0000241F ($+26)        (down)&lt;br /&gt;
 01EF:23F9  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23FC  0AC0                or   al,al&lt;br /&gt;
 01EF:23FE  741F                je   0000241F ($+1f)        (down)&lt;br /&gt;
 01EF:2400  02D0                add  dl,al&lt;br /&gt;
 01EF:2402  E87300              call 00002478 ($+73)&lt;br /&gt;
 01EF:2405  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2407  7503                jne  0000240C ($+3)         (no jmp)&lt;br /&gt;
 01EF:2409  EB4C                jmp  short 00002457 ($+4c)  (down)&lt;br /&gt;
 01EF:240B  90                  nop&lt;br /&gt;
 01EF:240C  0AC0                or   al,al&lt;br /&gt;
 01EF:240E  750F                jne  0000241F ($+f)         (no jmp)&lt;br /&gt;
 01EF:2410  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:2413  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2415  E84500              call 0000245D ($+45)&lt;br /&gt;
 01EF:2418  7303                jnc  0000241D ($+3)         (down)&lt;br /&gt;
 01EF:241A  EB2F                jmp  short 0000244B ($+2f)  (down)&lt;br /&gt;
 01EF:241C  90                  nop&lt;br /&gt;
 01EF:241D  EBCF                jmp  short 000023EE ($-31)  (up)&lt;br /&gt;
 01EF:241F  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2423  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2427  7428                je   00002451 ($+28)        (down)&lt;br /&gt;
 01EF:2429  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:242C  0AC0                or   al,al&lt;br /&gt;
 01EF:242E  7421                je   00002451 ($+21)        (down)&lt;br /&gt;
 01EF:2430  02F0                add  dh,al&lt;br /&gt;
 01EF:2432  E84300              call 00002478 ($+43)&lt;br /&gt;
 01EF:2435  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2437  741E                je   00002457 ($+1e)        (down)&lt;br /&gt;
 01EF:2439  0AC0                or   al,al&lt;br /&gt;
 01EF:243B  7514                jne  00002451 ($+14)        (no jmp)&lt;br /&gt;
 01EF:243D  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2441  E81900              call 0000245D ($+19)&lt;br /&gt;
 01EF:2444  7303                jnc  00002449 ($+3)         (down)&lt;br /&gt;
 01EF:2446  EB03                jmp  short 0000244B ($+3)   (down)&lt;br /&gt;
 01EF:2448  90                  nop&lt;br /&gt;
 01EF:2449  EBA3                jmp  short 000023EE ($-5d)  (up)&lt;br /&gt;
 01EF:244B  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2450  C3                  ret&lt;br /&gt;
 01EF:2451  C606A83F02          mov  byte [3FA8],02         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2456  C3                  ret&lt;br /&gt;
 01EF:2457  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- hero is reachable&lt;br /&gt;
 01EF:245C  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:245D  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006	&amp;lt;-- called only when the monster needs to move&lt;br /&gt;
 01EF:2461  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:2465  8807                mov  [bx],al                ds:[3F28]=6148&lt;br /&gt;
 01EF:2467  886701              mov  [bx+01],ah             ds:[3F29]=0061&lt;br /&gt;
 01EF:246A  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:246F  FE06A93F            inc  byte [3FA9]            ds:[3FA9]=0000&lt;br /&gt;
 01EF:2473  FE0E9C3F            dec  byte [3F9C]            ds:[3F9C]=0003&lt;br /&gt;
 01EF:2477  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:2478  A0BC3F              mov  al,[3FBC]              ds:[3FBC]=0000&lt;br /&gt;
 01EF:247B  E80139              call 00005D7F ($+3901)&lt;br /&gt;
 01EF:247E  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:2481  7408                je   0000248B ($+8)         (down)&lt;br /&gt;
 01EF:2483  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:2486  7503                jne  0000248B ($+3)         (no jmp)&lt;br /&gt;
 01EF:2488  B0FF                mov  al,FF&lt;br /&gt;
 01EF:248A  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:248B  B500                mov  ch,00&lt;br /&gt;
 01EF:248D  382EBC3F            cmp  [3FBC],ch              ds:[3FBC]=0000&lt;br /&gt;
 01EF:2491  7412                je   000024A5 ($+12)        (down)&lt;br /&gt;
 01EF:2493  8AC5                mov  al,ch&lt;br /&gt;
 01EF:2495  E8E738              call 00005D7F ($+38e7)&lt;br /&gt;
 01EF:2498  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:249B  7408                je   000024A5 ($+8)         (down)&lt;br /&gt;
 01EF:249D  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:24A0  7503                jne  000024A5 ($+3)         (no jmp)&lt;br /&gt;
 01EF:24A2  B001                mov  al,01&lt;br /&gt;
 01EF:24A4  C3                  ret&lt;br /&gt;
 01EF:24A5  FEC5                inc  ch&lt;br /&gt;
 01EF:24A7  80FD04              cmp  ch,04&lt;br /&gt;
 01EF:24AA  75E1                jne  0000248D ($-1f)        (no jmp)&lt;br /&gt;
 01EF:24AC  52                  push dx&lt;br /&gt;
 01EF:24AD  E8CE3B              call 0000607E ($+3bce)&lt;br /&gt;
 01EF:24B0  5A                  pop  dx&lt;br /&gt;
 01EF:24B1  81C36F58            add  bx,586F&lt;br /&gt;
 01EF:24B5  803F00              cmp  byte [bx],00           ds:[3F28]=6148&lt;br /&gt;
 01EF:24B8  7403                je   000024BD ($+3)         (down)&lt;br /&gt;
 01EF:24BA  B002                mov  al,02&lt;br /&gt;
 01EF:24BC  C3                  ret&lt;br /&gt;
 01EF:24BD  8A8700FC            mov  al,[bx-0400]           ds:[3B28]=E04B&lt;br /&gt;
 01EF:24C1  243F                and  al,3F&lt;br /&gt;
 01EF:24C3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26 	&amp;lt;-- monster&#039;s room check.&lt;br /&gt;
 01EF:24C6  7503                jne  000024CB ($+3)         (no jmp)	&lt;br /&gt;
 01EF:24C8  32C0                xor  al,al&lt;br /&gt;
 01EF:24CA  C3                  ret&lt;br /&gt;
 01EF:24CB  B003                mov  al,03&lt;br /&gt;
 01EF:24CD  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:24CE  893ED43F            mov  [3FD4],di              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24D2  8A0EA93F            mov  cl,[3FA9]              ds:[3FA9]=0001&lt;br /&gt;
 01EF:24D6  0AC9                or   cl,cl&lt;br /&gt;
 01EF:24D8  7455                je   0000252F ($+55)        (down)&lt;br /&gt;
 01EF:24DA  32ED                xor  ch,ch&lt;br /&gt;
 01EF:24DC  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:24DF  891ECA40            mov  [40CA],bx              ds:[40CA]=40A4&lt;br /&gt;
 01EF:24E3  51                  push cx&lt;br /&gt;
 01EF:24E4  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24E8  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24EB  E8903B              call 0000607E ($+3b90)&lt;br /&gt;
 01EF:24EE  8A8F6F58            mov  cl,[bx+586F]           ds:[59FB]=0000&lt;br /&gt;
 01EF:24F2  C6876F5800          mov  byte [bx+586F],00      ds:[59FB]=0000&lt;br /&gt;
 01EF:24F7  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:24FB  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24FE  0217                add  dl,[bx]                ds:[018C]=1149&lt;br /&gt;
 01EF:2500  027701              add  dh,[bx+01]             ds:[018D]=0611&lt;br /&gt;
 01EF:2503  895501              mov  [di+01],dx             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2506  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:250B  E8703B              call 0000607E ($+3b70)&lt;br /&gt;
 01EF:250E  888F6F58            mov  [bx+586F],cl           ds:[AE50]=0A16&lt;br /&gt;
 01EF:2512  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2516  895D04              mov  [di+04],bx             ds:[4DBC]=55E1&lt;br /&gt;
 01EF:2519  E834F5              call 00001A50 ($-acc)		&lt;br /&gt;
 01EF:251C  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:2520  E81C00              call 0000253F ($+1c)&lt;br /&gt;
 01EF:2523  E8BE3B              call 000060E4 ($+3bbe)&lt;br /&gt;
 01EF:2526  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:2529  E85B21              call 00004687 ($+215b)						&amp;lt;-- 500.000 nop cycles, to slow down monster&#039;s animation&lt;br /&gt;
 01EF:252C  59                  pop  cx		&lt;br /&gt;
 01EF:252D  E2B4                loop 000024E3 ($-4c)&lt;br /&gt;
 01EF:252F  51                  push cx&lt;br /&gt;
 01EF:2530  B93200              mov  cx,0032&lt;br /&gt;
 01EF:2533  E86A11              call 000036A0 ($+116a)						&amp;lt;-- more nops &lt;br /&gt;
 01EF:2536  E2FB                loop 00002533 ($-5)&lt;br /&gt;
 01EF:2538  59                  pop  cx&lt;br /&gt;
 01EF:2539  E853F8              call 00001D8F ($-7ad)						&amp;lt;-- here the monster attacks whein in contact with the hero&lt;br /&gt;
 01EF:253C  E99131              jmp  000056D0 ($+3191)      (down)&lt;br /&gt;
 01EF:253F  8A4502              mov  al,[di+02]             ds:[EF42]=3736&lt;br /&gt;
 01EF:2542  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2544  BA000A              mov  dx,0A00&lt;br /&gt;
 01EF:2547  F7E2                mul  dx&lt;br /&gt;
 01EF:2549  8BD8                mov  bx,ax&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:4687  51                  push cx&lt;br /&gt;
 01EF:4688  E820EF              call 000035AB ($-10e0)&lt;br /&gt;
 01EF:468B  59                  pop  cx&lt;br /&gt;
 01EF:468C  E2F9                loop 00004687 ($-7)&lt;br /&gt;
 01EF:468E  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh	&lt;br /&gt;
 01EF:6080  B700                mov  bh,00	&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5&lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[0130]=0101&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hero&#039;s pathfinding routine ==&lt;br /&gt;
The pathfinder algorithm the programmer chose was a simple variation of the A*, and is perfectly implemented. You can click on any tiles on the screen even on the invisible ones outside the room. If there is a clean path, the hero will reach that tile.&lt;br /&gt;
&lt;br /&gt;
 01EF:6449  E8E2D4              call 0000392E ($-2b1e)&lt;br /&gt;
 01EF:644C  E85800              call 000064A7 ($+58)&lt;br /&gt;
 01EF:644F  833CFF              cmp  word [si],FFFF         ds:[3911]=0000&lt;br /&gt;
 01EF:6452  7503                jne  00006457 ($+3)         (down)&lt;br /&gt;
 01EF:6454  E95F03              jmp  000067B6 ($+35f)       (down)&lt;br /&gt;
 &lt;br /&gt;
 01EF:67B6  8B16E747            mov  dx,[47E7]              ds:[47E7]=0087&lt;br /&gt;
 01EF:67BA  8B2EE947            mov  bp,[47E9]              ds:[47E9]=0097&lt;br /&gt;
 01EF:67BE  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67C1  BE1941              mov  si,4119&lt;br /&gt;
 01EF:67C4  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67C7  51                  push cx&lt;br /&gt;
 01EF:67C8  8B4402              mov  ax,[si+02]             ds:[491E]=01C0&lt;br /&gt;
 01EF:67CB  051800              add  ax,0018&lt;br /&gt;
 01EF:67CE  2BC2                sub  ax,dx&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (down)&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67D2  F7D8                neg  ax&lt;br /&gt;
 01EF:67D4  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67D6  8B0C                mov  cx,[si]                ds:[4119]=0044&lt;br /&gt;
 01EF:67D8  83C108              add  cx,0008&lt;br /&gt;
 01EF:67DB  2BCD                sub  cx,bp&lt;br /&gt;
 01EF:67DD  7302                jnc  000067E1 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67DF  F7D9                neg  cx&lt;br /&gt;
 01EF:67E1  03C1                add  ax,cx&lt;br /&gt;
 01EF:67E3  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67E5  8907                mov  [bx],ax                ds:[402D]=0000&lt;br /&gt;
 01EF:67E7  83C302              add  bx,0002&lt;br /&gt;
 01EF:67EA  83C604              add  si,0004&lt;br /&gt;
 01EF:67ED  59                  pop  cx&lt;br /&gt;
 01EF:67EE  E2D7                loop 000067C7 ($-29)&lt;br /&gt;
 01EF:67F0  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67F3  B8FFFF              mov  ax,FFFF&lt;br /&gt;
 01EF:67F6  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67F9  3B07                cmp  ax,[bx]                ds:[402D]=0000&lt;br /&gt;
 01EF:67FB  7204                jc   00006801 ($+4)         (down)&lt;br /&gt;
 01EF:67FD  8B07                mov  ax,[bx]                ds:[4095]=0000&lt;br /&gt;
 01EF:67FF  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6801  83C302              add  bx,0002&lt;br /&gt;
 01EF:6804  E2F3                loop 000067F9 ($-d)&lt;br /&gt;
 01EF:6806  3D0800              cmp  ax,0008&lt;br /&gt;
 01EF:6809  7201                jc   0000680C ($+1)         (no jmp)&lt;br /&gt;
 01EF:680B  C3                  ret&lt;br /&gt;
 01EF:680C  BB3400              mov  bx,0034&lt;br /&gt;
 01EF:680F  2BDA                sub  bx,dx&lt;br /&gt;
 01EF:6811  83FB2D              cmp  bx,002D&lt;br /&gt;
 01EF:6814  720B                jc   00006821 ($+b)         (down)&lt;br /&gt;
 01EF:6816  83EB2D              sub  bx,002D&lt;br /&gt;
 01EF:6819  D1E3                shl  bx,1&lt;br /&gt;
 01EF:681B  8B8F034A            mov  cx,[bx+4A03]           ds:[4A14]=0E09&lt;br /&gt;
 01EF:681F  EB06                jmp  short 00006827 ($+6)   (down)&lt;br /&gt;
 01EF:6821  8A8FD649            mov  cl,[bx+49D6]           ds:[49E7]=1E37&lt;br /&gt;
 01EF:6825  32ED                xor  ch,ch&lt;br /&gt;
 01EF:6827  A1E43F              mov  ax,[3FE4]              ds:[3FE4]=5574&lt;br /&gt;
 01EF:682A  03C1                add  ax,cx&lt;br /&gt;
 01EF:682C  2D6F54              sub  ax,546F&lt;br /&gt;
 01EF:682F  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:6831  81C36F56            add  bx,566F&lt;br /&gt;
 01EF:6835  3B1E110E            cmp  bx,[0E11]              ds:[0E11]=FFFF&lt;br /&gt;
 01EF:6839  7501                jne  0000683C ($+1)         (down)&lt;br /&gt;
 01EF:683B  C3                  ret&lt;br /&gt;
 01EF:683C  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:683E  B500                mov  ch,00&lt;br /&gt;
 01EF:6840  3D1A00              cmp  ax,001A&lt;br /&gt;
 01EF:6843  7207                jc   0000684C ($+7)         (down)&lt;br /&gt;
 01EF:6845  2D1A00              sub  ax,001A&lt;br /&gt;
 01EF:6848  FEC5                inc  ch&lt;br /&gt;
 01EF:684A  EBF4                jmp  short 00006840 ($-c)   (up)&lt;br /&gt;
 01EF:684C  8AC8                mov  cl,al&lt;br /&gt;
 01EF:684E  8A876F54            mov  al,[bx+546F]           ds:[AC1A]=0200&lt;br /&gt;
 01EF:6852  243F                and  al,3F&lt;br /&gt;
 01EF:6854  7501                jne  00006857 ($+1)         (down)&lt;br /&gt;
 01EF:6856  C3                  ret&lt;br /&gt;
 01EF:6857  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:685C  7503                jne  00006861 ($+3)         (down)&lt;br /&gt;
 01EF:685E  EB11                jmp  short 00006871 ($+11)  (down)&lt;br /&gt;
 01EF:6860  90                  nop&lt;br /&gt;
 01EF:6861  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:6866  7501                jne  00006869 ($+1)         (down)&lt;br /&gt;
 01EF:6868  C3                  ret&lt;br /&gt;
 01EF:6869  80BF6F5840          cmp  byte [bx+586F],40      ds:[B01A]=0101&lt;br /&gt;
 01EF:686E  7201                jc   00006871 ($+1)         (down)&lt;br /&gt;
 01EF:6870  C3                  ret&lt;br /&gt;
 01EF:6871  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6873  51                  push cx&lt;br /&gt;
 01EF:6874  E810AA              call 00001287 ($-55f0)&lt;br /&gt;
 01EF:6877  59                  pop  cx&lt;br /&gt;
 01EF:6878  0AC0                or   al,al&lt;br /&gt;
 01EF:687A  7401                je   0000687D ($+1)         (down)&lt;br /&gt;
 01EF:687C  C3                  ret&lt;br /&gt;
 01EF:687D  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:6881  880EF03F            mov  [3FF0],cl              ds:[3FF0]=0000&lt;br /&gt;
 01EF:6885  882EF13F            mov  [3FF1],ch              ds:[3FF1]=0000&lt;br /&gt;
 01EF:6889  8A4501              mov  al,[di+01]             ds:[3913]=0000&lt;br /&gt;
 01EF:688C  A2EE3F              mov  [3FEE],al              ds:[3FEE]=0000&lt;br /&gt;
 01EF:688F  A2F53F              mov  [3FF5],al              ds:[3FF5]=0C02&lt;br /&gt;
 01EF:6892  8A4502              mov  al,[di+02]             ds:[4665]=200C&lt;br /&gt;
 01EF:6895  A2EF3F              mov  [3FEF],al              ds:[3FEF]=040C&lt;br /&gt;
 01EF:6898  A2F63F              mov  [3FF6],al              ds:[3FF6]=000C&lt;br /&gt;
 01EF:689B  E80EC5              call 00002DAC ($-3af2)&lt;br /&gt;
 01EF:689E  803EC83F00          cmp  byte [3FC8],00         ds:[3FC8]=0000&lt;br /&gt;
 01EF:68A3  7501                jne  000068A6 ($+1)         (no jmp)&lt;br /&gt;
 01EF:68A5  C3                  ret&lt;br /&gt;
 01EF:68A6  BB1340              mov  bx,4013&lt;br /&gt;
 01EF:68A9  891ECC3F            mov  [3FCC],bx              ds:[3FCC]=0000&lt;br /&gt;
 01EF:68AD  C3                  ret  &lt;br /&gt;
&lt;br /&gt;
 01EF:2DAC  A0EE3F              mov  al,[3FEE]              ds:[3FEE]=0000&lt;br /&gt;
 01EF:2DAF  2A06F03F            sub  al,[3FF0]              ds:[3FF0]=1515&lt;br /&gt;
 01EF:2DB3  7902                jns  00002DB7 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DB5  F6D8                neg  al&lt;br /&gt;
 01EF:2DB7  8A26EF3F            mov  ah,[3FEF]              ds:[3FEF]=1500&lt;br /&gt;
 01EF:2DBB  2A26F13F            sub  ah,[3FF1]              ds:[3FF1]=3915&lt;br /&gt;
 01EF:2DBF  7902                jns  00002DC3 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DC1  F6DC                neg  ah&lt;br /&gt;
 01EF:2DC3  02C4                add  al,ah&lt;br /&gt;
 01EF:2DC5  A2E937              mov  [37E9],al              ds:[37E9]=3737&lt;br /&gt;
 01EF:2DC8  A09C3F              mov  al,[3F9C]              ds:[3F9C]=3A3A&lt;br /&gt;
 01EF:2DCB  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2DCD  A3F93F              mov  [3FF9],ax              ds:[3FF9]=3F3E&lt;br /&gt;
 01EF:2DD0  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=3A3A&lt;br /&gt;
 01EF:2DD5  C606C83F00          mov  byte [3FC8],00         ds:[3FC8]=1515&lt;br /&gt;
 01EF:2DDA  C706F33F0000        mov  word [3FF3],0000       ds:[3FF3]=1515&lt;br /&gt;
 01EF:2DE0  C706CC3F0000        mov  word [3FCC],0000       ds:[3FCC]=3B3C&lt;br /&gt;
 &lt;br /&gt;
Starting from memory location 0B6B:0A0E the subsequent 512 bytes are set to 1A1A x100h (256 times) by this function: &lt;br /&gt;
 01EF:2DE6  BF0E0A              mov  di,0A0E&lt;br /&gt;
 01EF:2DE9  B90001              mov  cx,0100&lt;br /&gt;
 01EF:2DEC  50                  push ax&lt;br /&gt;
 01EF:2DED  B86B0B              mov  ax,0B6B&lt;br /&gt;
 01EF:2DF0  8EC0                mov  es,ax&lt;br /&gt;
 01EF:2DF2  58                  pop  ax&lt;br /&gt;
 01EF:2DF3  B81A1A              mov  ax,1A1A&lt;br /&gt;
 01EF:2DF6  F3AB                repe stosw&lt;br /&gt;
 &lt;br /&gt;
The code then creates a map with all possible paths of the hero: &lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 07 08 09 -- 09 08&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 06 09 0A 09 08 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 05 0A 0B 0A 09 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 04 0B -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 02 01 02 01 02 03 04&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 02 -- -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 03 -- -- -- -- 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 04 -- -- -- -- 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
&lt;br /&gt;
 01EF:2DF8  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:2DFC  EB74                jmp  short 00002E72 ($+74)  (down)&lt;br /&gt;
 01EF:2DFE  90                  nop&lt;br /&gt;
 01EF:2DFF  A0F23F              mov  al,[3FF2]              ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E02  8B1EF33F            mov  bx,[3FF3]              ds:[3FF3]=0000&lt;br /&gt;
 01EF:2E06  8887FB3F            mov  [bx+3FFB],al           ds:[411D]=0050&lt;br /&gt;
 01EF:2E0A  43                  inc  bx&lt;br /&gt;
 01EF:2E0B  3B1EF93F            cmp  bx,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E0F  7601                jbe  00002E12 ($+1)         (no jmp)&lt;br /&gt;
 01EF:2E11  C3                  ret&lt;br /&gt;
 01EF:2E12  891EF33F            mov  [3FF3],bx              ds:[3FF3]=0001&lt;br /&gt;
 01EF:2E16  8A26F93F            mov  ah,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E1A  2AE3                sub  ah,bl&lt;br /&gt;
 01EF:2E1C  A0F03F              mov  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E1F  2A06F53F            sub  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E23  7902                jns  00002E27 ($+2)         (down)&lt;br /&gt;
 01EF:2E25  F6D8                neg  al&lt;br /&gt;
 01EF:2E27  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E29  7603                jbe  00002E2E ($+3)         (down)&lt;br /&gt;
 01EF:2E2B  E98400              jmp  00002EB2 ($+84)        (down)&lt;br /&gt;
 01EF:2E2E  A0F13F              mov  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E31  2A06F63F            sub  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E35  7902                jns  00002E39 ($+2)         (down)&lt;br /&gt;
 01EF:2E37  F6D8                neg  al&lt;br /&gt;
 01EF:2E39  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E3B  7775                ja   00002EB2 ($+75)        (no jmp)&lt;br /&gt;
 01EF:2E3D  E87700              call 00002EB7 ($+77)&lt;br /&gt;
 01EF:2E40  7270                jc   00002EB2 ($+70)        (no jmp)&lt;br /&gt;
 01EF:2E42  3E885E00            mov  ds:[bp],bl             ds:[007A]=0002&lt;br /&gt;
 01EF:2E46  A0F53F              mov  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E49  3A06F03F            cmp  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E4D  7523                jne  00002E72 ($+23)        (no jmp)&lt;br /&gt;
 01EF:2E4F  A0F63F              mov  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E52  3A06F13F            cmp  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E56  751A                jne  00002E72 ($+1a)        (no jmp)&lt;br /&gt;
 01EF:2E58  881EC83F            mov  [3FC8],bl              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E5C  57                  push di&lt;br /&gt;
 01EF:2E5D  BF1340              mov  di,4013&lt;br /&gt;
 01EF:2E60  BEFB3F              mov  si,3FFB&lt;br /&gt;
 01EF:2E63  8A0EC83F            mov  cl,[3FC8]              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E67  32ED                xor  ch,ch&lt;br /&gt;
 01EF:2E69  890EF93F            mov  [3FF9],cx              ds:[3FF9]=0001&lt;br /&gt;
 01EF:2E6D  F3A4                repe movsb&lt;br /&gt;
 01EF:2E6F  5F                  pop  di&lt;br /&gt;
 01EF:2E70  EB40                jmp  short 00002EB2 ($+40)  (down)&lt;br /&gt;
 01EF:2E72  C606F23F00          mov  byte [3FF2],00         ds:[3FF2]=0100&lt;br /&gt;
 01EF:2E77  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
&lt;br /&gt;
part of 2DF8 routine this writes the temporary math:&lt;br /&gt;
 01EF:2E7B  E881FF              call 00002DFF ($-7f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E7E  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E82  C606F23F01          mov  byte [3FF2],01         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E87  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E8B  E871FF              call 00002DFF ($-8f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E8E  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E92  C606F23F02          mov  byte [3FF2],02         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E97  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E9B  E861FF              call 00002DFF ($-9f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E9E  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2EA2  C606F23F03          mov  byte [3FF2],03         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2EA7  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EAB  E851FF              call 00002DFF ($-af)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2EAE  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EB2  FF0EF33F            dec  word [3FF3]            ds:[3FF3]=0000&lt;br /&gt;
 01EF:2EB6  C3                  ret&lt;br /&gt;
&lt;br /&gt;
== Notable Memory locations for hero&#039;s and monster&#039;s movement ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 3F92 = CURRENT QUEST&lt;br /&gt;
 3F93 = Hero&#039;s current tile (see tilemap below)&lt;br /&gt;
 3F94 = ACTIVE HERO&#039;S ROOM&lt;br /&gt;
&lt;br /&gt;
 3F99 =&lt;br /&gt;
 3F9A = END TURN FLAG&lt;br /&gt;
 3F9B = action performed?&lt;br /&gt;
 3F9C = REMAINING STEPS&lt;br /&gt;
 3F9D =&lt;br /&gt;
 3F9E =&lt;br /&gt;
 3F9F = MONSTER&#039;S X position&lt;br /&gt;
 3FA0 = MONSTER&#039;S Y position&lt;br /&gt;
 3FA1 = Horizontal distance Monster-hero&lt;br /&gt;
 3FA2 = Vertical distance Monster-hero&lt;br /&gt;
 3FA3-3FA4 (word) = next monster&#039;s step (see 40A2)&lt;br /&gt;
 3FA5 = HERO&#039;S X position&lt;br /&gt;
 3FA6 = HERO&#039;S Y position&lt;br /&gt;
 3FA7 = Active hero&lt;br /&gt;
 3FA8 = LOS 00=start 01=blocked 02=free&lt;br /&gt;
 3FA9 = steps to take to reach the hero?&lt;br /&gt;
 3FB5 = Target Hero ID (FF=Monster)&lt;br /&gt;
 3FB9 = current total defense dice of the active hero during DEFENSE&lt;br /&gt;
 3FC5 = Quest specific hero counter (usually identical to 3FC6)  modified by 26E8 call&lt;br /&gt;
 3FC5 = hero counter (complementar)  1111 = 0F = all heroes OUT  modified by 26E2 call&lt;br /&gt;
 &lt;br /&gt;
 3FD0 = WORD map ID (temporary for the quest) offset of ATTACKED monster in map memory (586F)&lt;br /&gt;
 3FD2 = BYTE rolled skulls (by monsters or heroes)&lt;br /&gt;
 3FD3 = BYTE rolled shields (by monsters or heroes)&lt;br /&gt;
 3FD4 = WORD monster&#039;s profile location (during attacks)&lt;br /&gt;
 3FD6 = WORD hero&#039;s profile location (during attacks)&lt;br /&gt;
 &lt;br /&gt;
 3FE7 = QUEST specific OBJECTIVE (1=ACCOMPLISHED)&lt;br /&gt;
 &lt;br /&gt;
 Memory locations for hero&#039;s movement (pathfindig)&lt;br /&gt;
 3FEE = HERO&#039;S X STARTING POSITION&lt;br /&gt;
 3FEF = HERO&#039;S Y STARTING POSITION&lt;br /&gt;
 3FF0 = mouse click X position (X stop)&lt;br /&gt;
 3FF1 = mouse click Y position (Y stop)&lt;br /&gt;
 3FF2 = 03&lt;br /&gt;
 3FF3 = FF&lt;br /&gt;
 3FF4 = FF&lt;br /&gt;
 3FF5 = HERO&#039;S X POSITION (copy)&lt;br /&gt;
 3FF6 = HERO&#039;S Y POSITION (copy)&lt;br /&gt;
 3FF9 = rolled movement&lt;br /&gt;
 3FFB - 4012 = math locations that varies among 00,01,02,03, at the end every byte is set to 03 (bytes here are never cleared)&lt;br /&gt;
 4013 -&amp;gt; locations with definitive hero&#039;s path (bytes here are never cleared)&lt;br /&gt;
&lt;br /&gt;
 hero&#039;s directional movement values:&lt;br /&gt;
 00 = up&lt;br /&gt;
 01 = right&lt;br /&gt;
 02 = down&lt;br /&gt;
 03 = left&lt;br /&gt;
 The hero&#039;s moving animation is then delegated to the main loop routines that starts reading from 4013 till [3FF9].&lt;br /&gt;
&lt;br /&gt;
 4097 = infinite actions if set to a number different from 00&lt;br /&gt;
 402C = Wand of recall extra action 00=no 01=yes&lt;br /&gt;
 4BBC = location where TRAP special event number is put upon entering the room (FF=Searched)&lt;br /&gt;
&lt;br /&gt;
 40A2 = here is stored the path the monster will follow by 607E (?) call. A sequence of words that specify directional movement&lt;br /&gt;
 00 01 = down&lt;br /&gt;
 00 FF = up&lt;br /&gt;
 FF 00 = left&lt;br /&gt;
 01 00 = right&lt;br /&gt;
 40CA = last location of the path to follow. (A640 = 2 moves)		&lt;br /&gt;
&lt;br /&gt;
 Screen tiles layout. The tile under the current hero is saved in [3F93]&lt;br /&gt;
             /\&lt;br /&gt;
            /00\&lt;br /&gt;
           /\  /\&lt;br /&gt;
          /01\/02\&lt;br /&gt;
         /\  /\  /\&lt;br /&gt;
        /03\/04\/05\&lt;br /&gt;
       /\  /\  /\  /\&lt;br /&gt;
      /06\/07\/08\/09\&lt;br /&gt;
     /\  /\  /\  /\  /\&lt;br /&gt;
    /0A\/0B\/0C\/0D\/0E\&lt;br /&gt;
    \  /\  /\  /\  /\  /\&lt;br /&gt;
     \/0F\/10\/11\/12\/13\&lt;br /&gt;
      \  /\  /\  /\  /\  /&lt;br /&gt;
       \/14\/15\/16\/17\/&lt;br /&gt;
        \  /\  /\  /\  /&lt;br /&gt;
         \/18\/19\/1A\/&lt;br /&gt;
          \  /\  /\  /&lt;br /&gt;
           \/1B\/1C\/&lt;br /&gt;
            \  /\  /&lt;br /&gt;
             \/1D\/&lt;br /&gt;
              \  /&lt;br /&gt;
               \/&lt;br /&gt;
			   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The hero&#039;s moving animation is delegated to the in-game main loop routines.&lt;br /&gt;
&lt;br /&gt;
= [DATA SEGMENT] Main Pointers =&lt;br /&gt;
&lt;br /&gt;
The file inside the exe that represents the Data Segment (every byte that is not strictly CODE) starts at offset &#039;&#039;&#039;0x9BE0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heroes&#039; default profiles ==&lt;br /&gt;
&lt;br /&gt;
 offset  mem pointer                   BP MP                      EQ             AD DD          ID &lt;br /&gt;
 0xE243  0B6B:4663   00 00 00 00 00 00 08 02 1D 00 00 00 00 00 00 00 00 00 00 00 03 02 00 00 00 00	Barbarian&lt;br /&gt;
 0xE25D  0B6B:467D   00 00 00 00 00 00 07 03 32 00 00 00 00 00 00 80 00 00 00 00 02 02 00 00 00 01	Dwarf&lt;br /&gt;
 0xE277  0B6B:4697   00 00 00 00 00 00 06 04 35 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 00 02	Elf&lt;br /&gt;
 0xE291  0B6B:46B1   00 00 00 00 00 00 04 06 4A 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 03	Wizard&lt;br /&gt;
 0xE2AB  0B6B:46CB   00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 04	Ragnar&lt;br /&gt;
&lt;br /&gt;
The byte positions are the same of [[HeroQuest Savegame Format]]. Load and save operations read and write at these addreses.&lt;br /&gt;
&lt;br /&gt;
When initializing the heroes the default values are resetted by the function 01EF:78D3 that resets all values to zero and Body and Mind points to default&lt;br /&gt;
 0x00DF74 0B6B:4394  08 07 06 04 02    Default Body point values (last one is Ragnar&#039;s)&lt;br /&gt;
 0x0148FB 0B6B:AD1B  02 03 04 06 00    Default Mind point values&lt;br /&gt;
&lt;br /&gt;
Character initialization code:&lt;br /&gt;
 01EF:78D3  8A1E9E40            mov  bl,[409E]              ds:[409E]=0002&lt;br /&gt;
 01EF:78D7  B700                mov  bh,00&lt;br /&gt;
 01EF:78D9  8B879443            mov  ax,[bx+4394]           ds:[4396]=0406&lt;br /&gt;
 01EF:78DD  884406              mov  [si+06],al             ds:[469D]=0406	&amp;lt;-- sets default body points&lt;br /&gt;
 01EF:78E0  8A871BAD            mov  al,[bx-52E5]           ds:[FFFFAD1D]=EC8B&lt;br /&gt;
 01EF:78E4  884407              mov  [si+07],al             ds:[469E]=3804	&amp;lt;-- sets default mind points&lt;br /&gt;
 01EF:78E7  C6440E00            mov  byte [si+0E],00        ds:[46A5]=0000	&amp;lt;-- resets Owned weapon&lt;br /&gt;
 01EF:78EB  C6440F00            mov  byte [si+0F],00        ds:[46A6]=0000	&amp;lt;-- resets Owned armour&lt;br /&gt;
 01EF:78EF  C6440D00            mov  byte [si+0D],00        ds:[46A4]=0000	&amp;lt;-- resets Owned special items &lt;br /&gt;
 01EF:78F3  C744090000          mov  word [si+09],0000      ds:[46A0]=000A	&amp;lt;-- resets GOLD&lt;br /&gt;
 01EF:78F8  C6441100            mov  byte [si+11],00        ds:[46A8]=0000	&amp;lt;-- resets Equipped weapon&lt;br /&gt;
 01EF:78FC  C6441200            mov  byte [si+12],00        ds:[46A9]=0000	&amp;lt;-- resets Equipped special item&lt;br /&gt;
 01EF:7900  C6441300            mov  byte [si+13],00        ds:[46AA]=0200	&amp;lt;-- resets Equipped armour&lt;br /&gt;
 01EF:7904  885C19              mov  [si+19],bl             ds:[46B0]=0002	&amp;lt;-- refresh hero&#039;s ID&lt;br /&gt;
 01EF:7907  803E9E4001          cmp  byte [409E],01         ds:[409E]=0002	&amp;lt;-- if dwarf&lt;br /&gt;
 01EF:790C  7504                jne  00007912 ($+4)         (down)&lt;br /&gt;
 01EF:790E  804C0E80            or   byte [si+0E],80        ds:[46A5]=0000	&amp;lt;-- gives him the toolkit&lt;br /&gt;
 01EF:7912  BB0800              mov  bx,0008					&amp;lt;-- &amp;quot;The character is renewed&amp;quot; string&lt;br /&gt;
 01EF:7915  E8D50F              call 000088ED ($+fd5)				&amp;lt;-- draws the scroll&lt;br /&gt;
&lt;br /&gt;
== Searched room table ==&lt;br /&gt;
&lt;br /&gt;
The game keeps track of the &#039;&#039;searched&#039;&#039; room by storing the value FF into two tables (treasure and traps searches) using the room number as relative offset (&#039;&#039;bx&#039;&#039;).&amp;lt;br&amp;gt;&lt;br /&gt;
Room numbers go from 00 to 2A so each table is 2B bytes long and every byte of the table is set to 00 at the beginnng of the quest.&amp;lt;br&amp;gt;&lt;br /&gt;
The code that puts FF into the table:&amp;lt;br&amp;gt;&lt;br /&gt;
 mov byte ptr [bx+4B70h], 0FFh    [0B6B:4B70] starting address of TREASURE search&lt;br /&gt;
 mov byte ptr [bx+4B9Bh], 0FFh    [0B6B:4B9B] starting address of TRAPS/SECRET PASSAGES search&lt;br /&gt;
NOTE: upon starting a quest, every Special event ID is put into these tables replacing the 00.&lt;br /&gt;
&lt;br /&gt;
== Equipment screen ==&lt;br /&gt;
With &#039;&#039;position on screen&#039;&#039; is intended the string header 11XXYY&lt;br /&gt;
&lt;br /&gt;
 0x014863 Hero&#039;s classes label (ie. Barbarian) position on screen&lt;br /&gt;
 0x00DF2B pointers block to default Hero&#039;s classes (5 pointers)&lt;br /&gt;
 0x00DF35 default Hero&#039;s classes labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x014873 Hero&#039;s name label (ie. Sigmar) position on screen&lt;br /&gt;
 0x00E1B7 pointers block to default Hero&#039;s names&lt;br /&gt;
 0x00E1C5 default Hero&#039;s names labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x0141A4 first epilogue panel text (its pointer &#039;&#039;&#039;A5C4&#039;&#039;&#039; is written inside the code at offset 0x0649)&lt;br /&gt;
 0x0143A2 second epilogue panel text (its pointer &#039;&#039;&#039;A7C2&#039;&#039;&#039; is written inside the code at offset 0x0658)&lt;br /&gt;
&lt;br /&gt;
 0x0147F7 actual gear prices (hexadecimal) -  4x12 = 30 Bytes (2 bytes for equipment bit mask and 2 bytes for default price, little endian)&lt;br /&gt;
 0x01482B pointers block to single gear costs - 2xC = 18 Bytes&lt;br /&gt;
 0x014843 price (in decimal) labels - 1F Bytes&lt;br /&gt;
&lt;br /&gt;
 0x01486F &amp;quot;GOLD&amp;quot; label position on screen&lt;br /&gt;
 0x014867 gold amount position on screen (default is 0000)&lt;br /&gt;
 0x014877 equipment names position on screen&lt;br /&gt;
 0x01487B pointers block to the pointers in [language].bin where the item names are - 0x18 Bytes&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
Every WORD offsets are hexadecimal, little endian values.&lt;br /&gt;
&lt;br /&gt;
 0x00CDF3: Game font (2F0h bytes long). 8x8 - 94 chars, can be edited with Nyerguds&#039; Westwood font editor.&lt;br /&gt;
&lt;br /&gt;
 0x00DCB5: Sequence of 20 bytes (4 groups of 5 bytes) with facing codes of the heroe&#039;s sprites in the 4 directions (S-E-W-N).&lt;br /&gt;
 0x00DCC9: 4 words for sprite direction codification FF00=South ecc..&lt;br /&gt;
 0x00DF95: Sequence of 11 groups of 4 bytes used for teleportation in &amp;quot;castle of mistery&amp;quot; quest (Room, X, Y, door direction that could be 00,01,1A)&lt;br /&gt;
 0x00DFDC: Sequence of 21 groups of 3 words used to define furniture (first word: X,Y dimension of the frame - second word: Y,X offset in pixels from the origin tile - third word: offset of the frame in FURN.VGA)&lt;br /&gt;
 0x00E05B: Group of 4 offsets for the walls graphics in graphics.vga (2 wariations of the left wall and 2 of the right wall).&lt;br /&gt;
 0x00E062: 26 bytes (00 or 01) used for wall variations based on ROOM tile position number (see diamond scheme above). Basically each position has its own fixed wall texture that is displayed only if a wall is present.&lt;br /&gt;
 0x00E3E6: List of 28 (1Ch) Groups of 5 bytes each representing Movement (BYTE), Attack (BYTE), Defense (BYTE) and Death special event offset (WORD) of each monster (00-1B).&lt;br /&gt;
 0x00E8E8: 32 pointers (words) to the monster profiles in game.&lt;br /&gt;
 0x00E92A: Monster&#039;s profiles location. Monsters are numbered in-game from 00 to 20h (maximum) and profiles (10 bytes) are stored starting from here (0x4D4A in memory).&lt;br /&gt;
 0x00ED28: Sequence of 256 BYTES used as index for drawing the 2D map walls, listing all possible states of wall and doors (values from 00 to FF that refer to the graphic slot IDs inside MAPS.VGA).&lt;br /&gt;
 0x00F64F: List of 12 pointers to magic spells specific routines into code segment.&lt;br /&gt;
 0x00F669: List of 30 pointers to special events specific routines into code segment.&lt;br /&gt;
 0x00F6A5: List of 30 pointers to monster&#039;s profiles location in memory (each pointer is 1A from the other).&lt;br /&gt;
 0x00F703: VGA Palette - 300h bytes as RGB 256 colours&lt;br /&gt;
 0x00FB9D: Position on screen of the object&#039;s name in 2D map (monsters, furniture, heroes etc...) &lt;br /&gt;
&lt;br /&gt;
 0x013CDD: List of 31 (words) offsets of the HEROES frame animation (attack, defense, death) in MEN.VGA&lt;br /&gt;
 0x013D1B: List of 31 (words) frame dimensions (X,Y) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D59: List of 31 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D97: List of 8 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the monster animation frames in MONSTERS.VGA&lt;br /&gt;
 0x014125: Sequence of 42 offsets (84 bytes) to the tile graphic of the rooms and corridors of isometric map (01-13 points all to 1F80, the tile for the corridors)&lt;br /&gt;
 0x014179: Sequence of 2A bytes that are indexes of the tile graphic of the rooms and corridors of 2D map (01-13 are all 01, the index tile for the corridors)&lt;br /&gt;
&lt;br /&gt;
 0x014920: position on screen of a bar filled with 20h char used to delete the equipment names while moving the mouse over the icons&lt;br /&gt;
 0x014924: Text colour (1F is white)&lt;br /&gt;
 0x014925: Background colour (14 is transparent)&lt;br /&gt;
 0x014943: equipment names position on screen during a quest (the subsequent 28 zeroes are the placeholder)&lt;br /&gt;
&lt;br /&gt;
 0x014A42: Sequence of 7 pointers in language.bin of the potion effect texts&lt;br /&gt;
 0x00E472: Sequence of 5 pointers in language.bin of the potion finding texts (all but holy water and heroic brew, that has direct pointers inside the code)&lt;br /&gt;
 0x00E4FE: Sequence of 1Ch pointers in language.bin of the monsters names (2D map)&lt;br /&gt;
 0x00E536: Sequence of 30h index in maps.vga that assign names of the object (01=fallen rock, 00=all traps or hidden objects with no name, 03=Stairs) in OBJECT BLOCK order.&lt;br /&gt;
 0x00E566: 23h bitmasks that define which object is passable by projectiles&lt;br /&gt;
 0x00EE2D: Offsets (12) sequence of object icons in maps.vga (from ID 30 to 3B, 00D1 = fallen rock)&lt;br /&gt;
 0x00EE45: Offsets sequence of monster&#039;s icons in maps.vga (ID 00 = 40D3 = goblin)&lt;br /&gt;
 0x00EE95: Sequence of 2Ch memory pointers to the profile of the 2D furnitures icons&lt;br /&gt;
 0x00EEC1: Sequence of 2Ch profiles of the 2D furnitures icons that tells how the full picture is composed&lt;br /&gt;
&lt;br /&gt;
== Intro Sequence ==&lt;br /&gt;
Every text panel of the intro resides into &#039;&#039;&#039;INTRO.EXE&#039;&#039;&#039; and they&#039;re in English only.&amp;lt;br&amp;gt;&lt;br /&gt;
In order to translate them (or change the lenght of the text) you have to uncompress the exe first, then Locate every pointers of each panel.&amp;lt;br&amp;gt;&lt;br /&gt;
The data segment inside the exe starts at &#039;&#039;&#039;0x01C0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Panel # !! default pointer value !! pointer exe offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0603 || 0x0212&lt;br /&gt;
|-&lt;br /&gt;
| 2 || F203 || 0x0214&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 9B04 || 0x0216&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 8706 || 0x0218&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 7008 || 0x021A&lt;br /&gt;
|-&lt;br /&gt;
| 6 || CA0A || 0x021C&lt;br /&gt;
|}&lt;br /&gt;
The panels layout follows the same rules described under [[HeroQuest Strings Format]]&lt;br /&gt;
&lt;br /&gt;
 0x001675 Game font, this is the exact copy of the font in quest.exe (See various offests section above).&lt;br /&gt;
&lt;br /&gt;
= Protection screen =&lt;br /&gt;
to restore shield protection in UNCOMPRESSED QUEST.EXE modify&lt;br /&gt;
 offset 0x0541 from 90 90 90	to E8 DC FE		(if you modify these bytes only the shield screen stays and regardless of page entered the game starts anyway)&lt;br /&gt;
 offset 0x0549 from EB		to 74&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12864</id>
		<title>HeroQuest EXE File</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12864"/>
		<updated>2026-06-26T16:24:53Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Various */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original exe is compressed with EXEPACKER, you must decompress with UNP to manipulate it.&lt;br /&gt;
&lt;br /&gt;
{{Executable Infobox&lt;br /&gt;
 | Interpreted = N&lt;br /&gt;
 | Platform = MS-DOS&lt;br /&gt;
 | Code = 16-bit x86&lt;br /&gt;
 | Games = {{Game|HeroQuest}}&lt;br /&gt;
  Memory information:&#039;&#039;&#039;&amp;lt;br&amp;gt;Code segment = 01EF&amp;lt;br&amp;gt;Data segment = 0B6B&amp;lt;br&amp;gt;Stack segment = 25F2&#039;&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= [CODE SEGMENT] Main Routines =&lt;br /&gt;
These are the main routines of the game, disassembled with DOSBOX debugger and annotated.&lt;br /&gt;
&lt;br /&gt;
== in-game main loop ==&lt;br /&gt;
 01EF:0413  E8E65F              call 000063FC ($+5fe6)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0416  E8FA5F              call 00006413 ($+5ffa)					&amp;lt;---- Checks left mouse button and everityng under it&lt;br /&gt;
 01EF:0419  C606CC40FF          mov  byte [40CC],FF         ds:[40CC]=DFFF   &lt;br /&gt;
 01EF:041E  F606923920          test byte [3992],20         ds:[3992]=9200		&amp;lt;---- Checks if right mouse button has been pressed&lt;br /&gt;
 01EF:0423  7403                je   00000428 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0425  E82E03              call 00000756 ($+32e)  					&amp;lt;---- ends the turn if right mouse button pressed&lt;br /&gt;
 01EF:0428  E85963              call 00006784 ($+6359) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:042B  E8A202              call 000006D0 ($+2a2)  					&amp;lt;---- ???&lt;br /&gt;
 01EF:042E  E8E564              call 00006916 ($+64e5) 					&amp;lt;---- draws in the correct order heroes and forniture&lt;br /&gt;
 01EF:0431  E84553              call 00005779 ($+5345) 					&amp;lt;---- same as above?&lt;br /&gt;
 01EF:0434  E8DD53              call 00005814 ($+53dd) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:043A  E87B53              call 000057B8 ($+537b) 					&amp;lt;---- draws heroes, monsters, forniture and doors (not the walls)&lt;br /&gt;
 01EF:043D  E8B454              call 000058F4 ($+54b4) 					&amp;lt;---- Checks if orthogonal tiles are walkable and updates the directional arrows&lt;br /&gt;
 01EF:0440  E8A156              call 00005AE4 ($+56a1) 					&amp;lt;---- Checks if monsters are present in the room and updates search icons&lt;br /&gt;
 01EF:0443  E81E60              call 00006464 ($+601e) 					&amp;lt;---- activates attack, magic, treasure, traps icons&lt;br /&gt;
 01EF:0446  E8CF60              call 00006518 ($+60cf) 					&amp;lt;---- draws yellow figures on top left&lt;br /&gt;
 01EF:0449  E8C859              call 00005E14 ($+59c8)					&amp;lt;---- draws glove mouse pointer&lt;br /&gt;
 01EF:044C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000   &lt;br /&gt;
 01EF:0451  7503                jne  00000456 ($+3)         (down)           &lt;br /&gt;
 01EF:0453  E88E5C              call 000060E4 ($+5c8e)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0456  E87E59              call 00005DD7 ($+597e)					&amp;lt;---- Clean the previous mouse sprite&lt;br /&gt;
 01EF:0459  E85954              call 000058B5 ($+5459)					&amp;lt;---- Clean the previous hero sprite&lt;br /&gt;
 01EF:045C  E82100              call 00000480 ($+21)					&amp;lt;---- Quest event checks&lt;br /&gt;
 01EF:045F  E8EC13              call 0000184E ($+13ec)					&amp;lt;---- Checks if the hero stands on a stair tile&lt;br /&gt;
 01EF:0462  803E973F00          cmp  byte [3F97],00         ds:[3F97]=0000   &lt;br /&gt;
 01EF:0467  7403                je   0000046C ($+3)         (no jmp)         &lt;br /&gt;
 01EF:0469  E8BA00              call 00000526 ($+ba)        				&amp;lt;---- End turn wrap up (resets registers and variables)&lt;br /&gt;
 01EF:046C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000	&lt;br /&gt;
 01EF:0471  7401                je   00000474 ($+1)         (no jmp)	&lt;br /&gt;
 01EF:0473  C3                  ret						&lt;br /&gt;
 01EF:0474  803E923940          cmp  byte [3992],40         ds:[3992]=9200&lt;br /&gt;
 01EF:0479  7503                jne  0000047E ($+3)         (down)&lt;br /&gt;
 01EF:047B  E94FFE              jmp  000002CD ($-1b1)       (up)&lt;br /&gt;
 01EF:047E  EB93                jmp  short 00000413 ($-6d)  (up)				&amp;lt;--- goes back on top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shooting routine ==&lt;br /&gt;
Shooting routine (magic and throwing weapons) is utterly broken in this game.&amp;lt;br&amp;gt;&lt;br /&gt;
The code checks the map tile the projectile is above and determine if the line of sight is blocked or free.&amp;lt;br&amp;gt;&lt;br /&gt;
The way the map is coded resulted in a convoluted code that fails to check LOS.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;You can shoot past walls&#039;&#039;&#039; and always hit the target if the hero stands in contact with one wall and the target is the adjacent room exactly above or exactly to the right.&amp;lt;br&amp;gt;&lt;br /&gt;
You can also hit the target standing in the perfect diagonal like bishop&#039;s movement, and this could happen even if there are no active rooms (solid rock, but marked with 00 like rooms&#039; inner tiles) in between.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;LOS is blocked&#039;&#039;&#039; by parallel unrevealed secret doors and opened doors.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon check:&lt;br /&gt;
 01EF:0AB2  32C0                xor  al,al&lt;br /&gt;
 01EF:0AB4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- di+11 is equipped weapon. checks if it is crossbow?&lt;br /&gt;
 01EF:0AB8  7501                jne  00000ABB ($+1)         (no jmp)&lt;br /&gt;
 01EF:0ABA  C3                  ret&lt;br /&gt;
 01EF:0ABB  B0FD                mov  al,FD					&amp;lt;-- not crossbow&lt;br /&gt;
 01EF:0ABD  C3                  ret&lt;br /&gt;
 01EF:0ABE  807D1101            cmp  byte [di+11],01        ds:[B1A7]=0000	&amp;lt;-- starts here&lt;br /&gt;
 01EF:0ABF  7D11                jge  00000AD2 ($+11)        (down)		&amp;lt;-- jump if greater or equal&lt;br /&gt;
 01EF:0AC1  0174EE              add  [si-12],si             ds:[4DBA]=260D&lt;br /&gt;
 01EF:0AC4  807D1102            cmp  byte [di+11],02        ds:[46A8]=0010	&amp;lt;-- F64511/807D11 are the test/cmp of the equipped weapon&lt;br /&gt;
 01EF:0AC8  74E8                je   00000AB2 ($-18)        (up)&lt;br /&gt;
 01EF:0ACA  807D1140            cmp  byte [di+11],40        ds:[46A8]=0010&lt;br /&gt;
 01EF:0ACE  74E2                je   00000AB2 ($-1e)        (up)&lt;br /&gt;
 01EF:0AD0  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AD2  EBE0                jmp  short 00000AB4 ($-20)  (up)&lt;br /&gt;
 01EF:0AD4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- crossbow&lt;br /&gt;
 01EF:0AD8  750F                jne  00000AE9 ($+f)         (no jmp)&lt;br /&gt;
 01EF:0ADA  F6451120            test byte [di+11],20        ds:[46A8]=0010	&amp;lt;-- throwing axe&lt;br /&gt;
 01EF:0ADE  7509                jne  00000AE9 ($+9)         (no jmp)&lt;br /&gt;
 01EF:0AE0  F6451140            test byte [di+11],40        ds:[46A8]=0010	&amp;lt;-- spear&lt;br /&gt;
 01EF:0AE4  7503                jne  00000AE9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0AE6  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AE8  C3                  ret&lt;br /&gt;
&lt;br /&gt;
SHOOTING ROUTINE STARTS HERE:&lt;br /&gt;
 01EF:0AE9  C606B73F01          mov  byte [3FB7],01         ds:[3FB7]=0301&lt;br /&gt;
 01EF:0AEE  E82B00              call 00000B1C ($+2b)&lt;br /&gt;
 01EF:0AF1  32C0                xor  al,al&lt;br /&gt;
 01EF:0AF3  803EA83F01          cmp  byte [3FA8],01         ds:[3FA8]=0001	&amp;lt;-- check if LOS is blocked (1)&lt;br /&gt;
 01EF:0AF8  7401                je   00000AFB ($+1)         (down)&lt;br /&gt;
 01EF:0AFA  C3                  ret&lt;br /&gt;
 01EF:0AFB  B0FE                mov  al,FE&lt;br /&gt;
 01EF:0AFD  C606B73F00          mov  byte [3FB7],00         ds:[3FB7]=0300&lt;br /&gt;
 01EF:0B02  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
 01EF:0B1C  E81F06              call 0000113E ($+61f)&lt;br /&gt;
 01EF:0B1F  A0A83F              mov  al,[3FA8]              ds:[3FA8]=0001&lt;br /&gt;
 01EF:0B22  3401                xor  al,01&lt;br /&gt;
 01EF:0B24  A2B23F              mov  [3FB2],al              ds:[3FB2]=0000&lt;br /&gt;
 01EF:0B27  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Set global variables (shooter and target position/distance):&lt;br /&gt;
 01EF:113E  8B36D43F            mov  si,[3FD4]              ds:[3FD4]=4DC2&lt;br /&gt;
 01EF:1142  8A7C01              mov  bh,[si+01]             ds:[4DC3]=0F0A	&amp;lt;-- Target X &lt;br /&gt;
 01EF:1145  8A5C02              mov  bl,[si+02]             ds:[4DC4]=270F	&amp;lt;-- Target Y&lt;br /&gt;
 01EF:1148  8BCB                mov  cx,bx&lt;br /&gt;
 01EF:114A  8B3E3746            mov  di,[4637]              ds:[4637]=4697&lt;br /&gt;
 01EF:114E  8A7501              mov  dh,[di+01]             ds:[4698]=120A	&amp;lt;-- Hero X &lt;br /&gt;
 01EF:1151  8A5502              mov  dl,[di+02]             ds:[4699]=1212	&amp;lt;-- Hero Y &lt;br /&gt;
 01EF:1154  8836A53F            mov  [3FA5],dh              ds:[3FA5]=0C0C	&amp;lt;-- Hero X saved at 3FA5&lt;br /&gt;
 01EF:1158  8816A63F            mov  [3FA6],dl              ds:[3FA6]=020C	&amp;lt;-- Hero Y saved at 3FA6&lt;br /&gt;
 01EF:115C  C6069F3F00          mov  byte [3F9F],00         ds:[3F9F]=0000	&amp;lt;-- reset projectile temp distance (area used for math)&lt;br /&gt;
 01EF:1161  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0002	&amp;lt;-- reset LOS 0=free, 1=blocked&lt;br /&gt;
 01EF:1166  B7FF                mov  bh,FF&lt;br /&gt;
 01EF:1168  8AC6                mov  al,dh&lt;br /&gt;
 01EF:116A  2AC5                sub  al,ch&lt;br /&gt;
 01EF:116C  7504                jne  00001172 ($+4)         (down)&lt;br /&gt;
 01EF:116E  B700                mov  bh,00					&amp;lt;-- target is on the RIGHT (&amp;gt;)&lt;br /&gt;
 01EF:1170  EB06                jmp  short 00001178 ($+6)   (down)&lt;br /&gt;
 01EF:1172  7304                jnc  00001178 ($+4)         (down)&lt;br /&gt;
 01EF:1174  F6D8                neg  al&lt;br /&gt;
 01EF:1176  B701                mov  bh,01					&amp;lt;-- target is on the LEFT (&amp;lt;)&lt;br /&gt;
 01EF:1178  A2A13F              mov  [3FA1],al              ds:[3FA1]=0301	&amp;lt;-- horizontal distance shooter-target saved at 3FA1&lt;br /&gt;
 01EF:117B  8AE8                mov  ch,al&lt;br /&gt;
 01EF:117D  B3FF                mov  bl,FF&lt;br /&gt;
 01EF:117F  8AC2                mov  al,dl&lt;br /&gt;
 01EF:1181  2AC1                sub  al,cl&lt;br /&gt;
 01EF:1183  7504                jne  00001189 ($+4)         (down)&lt;br /&gt;
 01EF:1185  B300                mov  bl,00					&amp;lt;-- target is UNDER (v)&lt;br /&gt;
 01EF:1187  EB06                jmp  short 0000118F ($+6)   (down)&lt;br /&gt;
 01EF:1189  7304                jnc  0000118F ($+4)         (down)&lt;br /&gt;
 01EF:118B  F6D8                neg  al&lt;br /&gt;
 01EF:118D  B301                mov  bl,01					&amp;lt;-- target is ABOVE (^)&lt;br /&gt;
 01EF:118F  A2A23F              mov  [3FA2],al              ds:[3FA2]=0003	&amp;lt;-- vertical distance shooter-target saved at 3FA2&lt;br /&gt;
 01EF:1192  3AC5                cmp  al,ch&lt;br /&gt;
 01EF:1194  7240                jc   000011D6 ($+40)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
bx (bh+bl) registry status based on target/shooter position:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| 0101 || 0001 || FF01&lt;br /&gt;
|-&lt;br /&gt;
| 0100 || TRGT || FF00&lt;br /&gt;
|-&lt;br /&gt;
| 01FF || 00FF || FFFF&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
VERTICAL shooting routine:&lt;br /&gt;
 01EF:1196  8ACD                mov  cl,ch&lt;br /&gt;
 01EF:1198  8AE8                mov  ch,al&lt;br /&gt;
 01EF:119A  8AD0                mov  dl,al&lt;br /&gt;
 01EF:119C  000E9F3F            add  [3F9F],cl              ds:[3F9F]=0000	&amp;lt;-- update projectile travelled distance&lt;br /&gt;
 01EF:11A0  38169F3F            cmp  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11A4  7208                jc   000011AE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11A6  28169F3F            sub  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11AA  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F0D	&amp;lt;-- Temp Projectile X (d 0:F655)&lt;br /&gt;
 01EF:11AE  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y (d 0:F656)&lt;br /&gt;
 01EF:11B2  C706E9370000        mov  word [37E9],0000       ds:[37E9]=D238	&amp;lt;-- set Vertical flag&lt;br /&gt;
 01EF:11B8  882EEB37            mov  [37EB],ch              ds:[37EB]=F1E0	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11BC  80FD01              cmp  ch,01&lt;br /&gt;
 01EF:11BF  7505                jne  000011C6 ($+5)         (down)&lt;br /&gt;
 01EF:11C1  80FBFF              cmp  bl,FF&lt;br /&gt;
 01EF:11C4  7403                je   000011C9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:11C6  E84B00              call 00001214 ($+4b)&lt;br /&gt;
 01EF:11C9  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:11CE  7401                je   000011D1 ($+1)         (no jmp)&lt;br /&gt;
 01EF:11D0  C3                  ret&lt;br /&gt;
 01EF:11D1  FECD                dec  ch&lt;br /&gt;
 01EF:11D3  75C7                jne  0000119C ($-39)        (up)&lt;br /&gt;
 01EF:11D5  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
HORIZONTAL shooting routine:&lt;br /&gt;
 01EF:11D6  8AD0                mov  dl,al				&lt;br /&gt;
 01EF:11D8  8ACD                mov  cl,ch		&amp;lt;-- it moves ch in cl&lt;br /&gt;
 01EF:11DA  32ED                xor  ch,ch		&amp;lt;-- and puts to 00 ch because uses loop (thus cx) instead of dec ch of vertical routine&lt;br /&gt;
 01EF:11DC  00169F3F            add  [3F9F],dl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E0  380E9F3F            cmp  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E4  7208                jc   000011EE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11E6  280E9F3F            sub  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11EA  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y&lt;br /&gt;
 01EF:11EE  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F03	&amp;lt;-- Temp Projectile X&lt;br /&gt;
 01EF:11F2  C706E9370100        mov  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- set Horizontal flag&lt;br /&gt;
 01EF:11F8  880EEB37            mov  [37EB],cl              ds:[37EB]=AA04	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11FC  80F901              cmp  cl,01&lt;br /&gt;
 01EF:11FF  7505                jne  00001206 ($+5)         (down)&lt;br /&gt;
 01EF:1201  80FFFF              cmp  bh,FF&lt;br /&gt;
 01EF:1204  7403                je   00001209 ($+3)         (no jmp)&lt;br /&gt;
 01EF:1206  E80B00              call 00001214 ($+b)&lt;br /&gt;
 01EF:1209  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0001	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:120E  7401                je   00001211 ($+1)         (no jmp)&lt;br /&gt;
 01EF:1210  C3                  ret&lt;br /&gt;
 01EF:1211  E2C9                loop 000011DC ($-37)&lt;br /&gt;
 01EF:1213  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
Collision check routine on current tile IN WALL/DOORS map (ds:566F):&lt;br /&gt;
 01EF:1214  53                  push bx&lt;br /&gt;
 01EF:1215  52                  push dx&lt;br /&gt;
 01EF:1216  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=0839&lt;br /&gt;
 01EF:121A  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=3936&lt;br /&gt;
 01EF:121E  E85D4E              call 0000607E ($+4e5d)&lt;br /&gt;
 01EF:1221  80BF6F5600          cmp  byte [bx+566F],00      ds:[576C]=8128	&amp;lt;-- Check if tile is 00, if true jumps to the Object map check&lt;br /&gt;
 01EF:1226  742A                je   00001252 ($+2a)        (no jmp)			at 0B6B:566F is where WALLS/DOORS map is stored&lt;br /&gt;
 01EF:1228  8A876F56            mov  al,[bx+566F]           ds:[576C]=8128	&amp;lt;-- mov into al the current TILE (28=is north secret door)&lt;br /&gt;
 01EF:122C  833EE93701          cmp  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- 1=H, 0=V check for opened door subroutines&lt;br /&gt;
 01EF:1231  7411                je   00001244 ($+11)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
Vertical shoot subroutine that checks for Horizontal walls/doors:&lt;br /&gt;
 01EF:1233  24AC                and  al,AC 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1235  0AC0                or   al,al					AC= 10101100&lt;br /&gt;
 01EF:1237  7419                je   00001252 ($+19)        (no jmp)&lt;br /&gt;
 01EF:1239  A820                test al,20					&amp;lt;-- if door is Horizontal&lt;br /&gt;
 01EF:123B  7442                je   0000127F ($+42)        (down)&lt;br /&gt;
 01EF:123D  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:123F  743E                je   0000127F ($+3e)        (down)&lt;br /&gt;
 01EF:1241  EB0F                jmp  short 00001252 ($+f)   (down)&lt;br /&gt;
 01EF:1243  90                  nop&lt;br /&gt;
 &lt;br /&gt;
Horizontal shoot subroutine that checks for Vertical walls/doors:&lt;br /&gt;
 01EF:1244  245C                and  al,5C 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1246  0AC0                or   al,al					5C= 01011100&lt;br /&gt;
 01EF:1248  7408                je   00001252 ($+8)         (down)&lt;br /&gt;
 01EF:124A  A810                test al,10					&amp;lt;-- if door is Vertical&lt;br /&gt;
 01EF:124C  7431                je   0000127F ($+31)        (down)&lt;br /&gt;
 01EF:124E  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:1250  742D                je   0000127F ($+2d)        (down)&lt;br /&gt;
&lt;br /&gt;
Collision check routine on current tile IN OBJECTS map (ds:586F):&lt;br /&gt;
 01EF:1252  803EEB3701          cmp  byte [37EB],01         ds:[37EB]=6E03	&amp;lt;-- checks if the projectile is about to hit the target&lt;br /&gt;
 01EF:1257  742B                je   00001284 ($+2b)        (down)&lt;br /&gt;
 01EF:1259  80BF6F5800          cmp  byte [bx+586F],00      ds:[1576F]=3637	&amp;lt;-- checks if the tile is passable (00)&lt;br /&gt;
 01EF:125E  740E                je   0000126E ($+e)         (down)&lt;br /&gt;
 01EF:1260  8A876F58            mov  al,[bx+586F]           ds:[1576F]=3637	&amp;lt;-- ds:586F is where OBJECTS map is stored&lt;br /&gt;
 01EF:1264  BB4649              mov  bx,4946					&amp;lt;-- ds:4946 check &lt;br /&gt;
 01EF:1267  D7                  xlat&lt;br /&gt;
 01EF:1268  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:126B  EB17                jmp  short 00001284 ($+17)  (down)&lt;br /&gt;
 01EF:126D  90                  nop&lt;br /&gt;
 01EF:126E  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=004D&lt;br /&gt;
 01EF:1272  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=4D4D&lt;br /&gt;
 01EF:1276  E80E00              call 00001287 ($+e)&lt;br /&gt;
 01EF:1279  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:127C  EB06                jmp  short 00001284 ($+6)   (down)&lt;br /&gt;
 01EF:127E  90                  nop&lt;br /&gt;
 01EF:127F  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=BA6B	&amp;lt;-- sets LOS as blocked (1) and exits&lt;br /&gt;
 01EF:1284  5A                  pop  dx&lt;br /&gt;
 01EF:1285  5B                  pop  bx&lt;br /&gt;
 01EF:1286  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Updates with random numbers the first three bytes of heroes&#039; equipment every movement (presumably used as seed for RNG):&lt;br /&gt;
 01EF:1287  51                  push cx&lt;br /&gt;
 01EF:1288  57                  push di&lt;br /&gt;
 01EF:1289  B90500              mov  cx,0005&lt;br /&gt;
 01EF:128C  BF6346              mov  di,4663	&amp;lt;-- first byte of Barbarian equipment in memory&lt;br /&gt;
 01EF:128F  33C0                xor  ax,ax&lt;br /&gt;
 01EF:1291  803D00              cmp  byte [di],00           ds:[6CAA]=0000&lt;br /&gt;
 01EF:1294  740C                je   000012A2 ($+c)         (down)&lt;br /&gt;
 01EF:1296  385501              cmp  [di+01],dl             ds:[6CAB]=0000&lt;br /&gt;
 01EF:1299  7507                jne  000012A2 ($+7)         (no jmp)&lt;br /&gt;
 01EF:129B  387502              cmp  [di+02],dh             ds:[6CAC]=0000&lt;br /&gt;
 01EF:129E  7502                jne  000012A2 ($+2)         (no jmp)&lt;br /&gt;
 01EF:12A0  B001                mov  al,01&lt;br /&gt;
 01EF:12A2  83C71A              add  di,001A	&amp;lt;-- jumps to the following hero&#039;s equipment&lt;br /&gt;
 01EF:12A5  E2EA                loop 00001291 ($-16)&lt;br /&gt;
 01EF:12A7  5F                  pop  di&lt;br /&gt;
 01EF:12A8  59                  pop  cx&lt;br /&gt;
 01EF:12A9  C3                  ret&lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh&lt;br /&gt;
 01EF:6080  B700                mov  bh,00&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5					&amp;lt;-- ds:5AC5 check &lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[FF00]=3737&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New shooting routine ===&lt;br /&gt;
Finally I came up with a proper line of sight mechanism that cover roughly 99% of the &amp;quot;impossible shots&amp;quot;. There will always be a particular combiantion of monster-door-hero position that can lead to an &amp;quot;improbable shot&amp;quot;, but that&#039;s it.  &lt;br /&gt;
&lt;br /&gt;
Direction choice routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1198:  88 D0             mov  al, dl&lt;br /&gt;
 1ef:119a:  88 CC             mov  ah, cl&lt;br /&gt;
 1ef:119c:  05 01 01          add  ax, 0x101&lt;br /&gt;
 1ef:119f:  D0 E8             shr  al, 1&lt;br /&gt;
 1ef:11a1:  D0 EC             shr  ah, 1&lt;br /&gt;
 1ef:11a3:  A3 AA 3F          mov  word ptr [0x3faa], ax        &amp;lt;-- save half distance of X and Y&lt;br /&gt;
 &lt;br /&gt;
 1ef:11a6:  30 C0             xor  al, al                    &amp;lt;-- direction choice routine&lt;br /&gt;
 1ef:11a8:  3A 0E AB 3F       cmp  cl, byte ptr [0x3fab]        &amp;lt;-- check if X distance reached it&#039;s half&lt;br /&gt;
 1ef:11ac:  74 13             je   0x11c1                    &amp;lt;-- if YES reset X half value and change direction&lt;br /&gt;
 1ef:11ae:  3A 16 AA 3F       cmp  dl, byte ptr [0x3faa]        &amp;lt;-- check if Y distance reached it&#039;s half&lt;br /&gt;
 1ef:11b2:  74 06             je   0x11ba                    &amp;lt;-- if YES reset Y half value and change direction&lt;br /&gt;
 1ef:11b4:  38 CA             cmp  dl, cl&lt;br /&gt;
 1ef:11b6:  7C 2B             jl   0x11e3&lt;br /&gt;
 1ef:11b8:  EB 0C             jmp  0x11c6&lt;br /&gt;
 1ef:11ba:  C6 06 AA 3F 00    mov  byte ptr [0x3faa], 0&lt;br /&gt;
 1ef:11bf:  EB 22             jmp  0x11e3&lt;br /&gt;
 1ef:11c1:  C6 06 AB 3F 00    mov  byte ptr [0x3fab], 0&lt;br /&gt;
&lt;br /&gt;
Vertical&lt;br /&gt;
 1ef:11c6:  84 D2             test dl, dl                    &amp;lt;-- vertical routine&lt;br /&gt;
 1ef:11c8:  74 19             je   0x11e3                    &amp;lt;-- if Y distance is zero go to horizontal routine&lt;br /&gt;
 1ef:11ca:  00 1E A6 3F       add  byte ptr [0x3fa6], bl&lt;br /&gt;
 1ef:11ce:  B8 00 00          mov  ax, 0&lt;br /&gt;
 1ef:11d1:  80 FB FF          cmp  bl, 0xff&lt;br /&gt;
 1ef:11d4:  75 02             jne  0x11d8&lt;br /&gt;
 1ef:11d6:  B4 1A             mov  ah, 0x1a&lt;br /&gt;
 1ef:11d8:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11db:  FE CA             dec  dl&lt;br /&gt;
 1ef:11dd:  88 16 EB 37       mov  byte ptr [0x37eb], dl&lt;br /&gt;
 1ef:11e1:  EB 1B             jmp  0x11fe&lt;br /&gt;
 &lt;br /&gt;
Horizontal&lt;br /&gt;
 1ef:11e3:  84 C9             test cl, cl                    &amp;lt;-- horizontal routine&lt;br /&gt;
 1ef:11e5:  74 DF             je   0x11c6                    &amp;lt;-- if X distance is zero go to vertical routine&lt;br /&gt;
 1ef:11e7:  00 3E A5 3F       add  byte ptr [0x3fa5], bh&lt;br /&gt;
 1ef:11eb:  B8 01 00          mov  ax, 1&lt;br /&gt;
 1ef:11ee:  80 FF FF          cmp  bh, 0xff&lt;br /&gt;
 1ef:11f1:  75 02             jne  0x11f5&lt;br /&gt;
 1ef:11f3:  B4 01             mov  ah, 1&lt;br /&gt;
 1ef:11f5:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11f8:  FE C9             dec  cl&lt;br /&gt;
 1ef:11fa:  88 0E EB 37       mov  byte ptr [0x37eb], cl&lt;br /&gt;
 &lt;br /&gt;
 1ef:11fe:  E8 13 00          call 0x1214                    &amp;lt;-- calls wall/object collision check routine&lt;br /&gt;
 1ef:1201:  80 3E A8 3F 00    cmp  byte ptr [0x3fa8], 0      &amp;lt;-- collision flag&lt;br /&gt;
 1ef:1206:  74 01             je   0x1209   &lt;br /&gt;
 1ef:1208:  C3                ret                            &amp;lt;-- else object or wall was HIT&lt;br /&gt;
 1ef:1209:  88 C8             mov  al, cl&lt;br /&gt;
 1ef:120b:  00 D0             add  al, dl                    &amp;lt;-- if X+Y distance is not zero&lt;br /&gt;
 1ef:120d:  75 97             jne  0x11a6                    &amp;lt;-- back to direction choice routine&lt;br /&gt;
 1ef:120f:  C3                ret                            &amp;lt;-- else target was HIT&lt;br /&gt;
 1ef:1210:  90                nop  &lt;br /&gt;
 1ef:1211:  90                nop  &lt;br /&gt;
 1ef:1212:  90                nop  &lt;br /&gt;
 1ef:1213:  90                nop&lt;br /&gt;
 &lt;br /&gt;
Wall/object collision check routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1214:  53                push bx&lt;br /&gt;
 1ef:1215:  52                push dx&lt;br /&gt;
 1ef:1216:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]&lt;br /&gt;
 1ef:121a:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:121e:  E8 5D 4E          call 0x607e&lt;br /&gt;
 1ef:1221:  A0 EA 37          mov  al, byte ptr [0x37ea]&lt;br /&gt;
 1ef:1224:  30 E4             xor  ah, ah&lt;br /&gt;
 1ef:1226:  01 C3             add  bx, ax&lt;br /&gt;
 1ef:1228:  8A 87 6F 56       mov  al, byte ptr [bx + 0x566f]    &amp;lt;-- checks if the tile is free (00) or occupied (30=rock)&lt;br /&gt;
 1ef:122c:  3C 00             cmp  al, 0&lt;br /&gt;
 1ef:122e:  74 21             je   0x1251                        &amp;lt;-- if occupied jump to specific object check&lt;br /&gt;
 1ef:1230:  80 3E E9 37 01    cmp  byte ptr [0x37e9], 1&lt;br /&gt;
 1ef:1235:  74 0C             je   0x1243&lt;br /&gt;
 1ef:1237:  A8 20             test al, 0x20                        &amp;lt;-- Horizontal Door check&lt;br /&gt;
 1ef:1239:  75 12             jne  0x124d&lt;br /&gt;
 1ef:123b:  A8 80             test al, 0x80                        &amp;lt;-- Horizontal Wall check&lt;br /&gt;
 1ef:123d:  74 12             je   0x1251&lt;br /&gt;
 1ef:123f:  EB 3E             jmp  0x127f&lt;br /&gt;
 1ef:1241:  90                nop  &lt;br /&gt;
 1ef:1242:  90                nop  &lt;br /&gt;
 &lt;br /&gt;
 1ef:1243:  A8 10             test al, 0x10                        &amp;lt;-- Vertical Door check&lt;br /&gt;
 1ef:1245:  75 06             jne  0x124d&lt;br /&gt;
 1ef:1247:  A8 40             test al, 0x40                        &amp;lt;-- Vertical Wall check&lt;br /&gt;
 1ef:1249:  74 06             je   0x1251&lt;br /&gt;
 1ef:124b:  EB 32             jmp  0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:124d:  A8 04             test al, 4                            &amp;lt;-- opened door check&lt;br /&gt;
 1ef:124f:  74 2E             je   0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:1251:  8A 87 6F 58       mov  al, byte ptr [bx + 0x586f]    &amp;lt;-- specific object check&lt;br /&gt;
 1ef:1255:  BB 86 49          mov  bx, 0x4986                    &amp;lt;-- bitmask table where object properties are stored&lt;br /&gt;
 1ef:1258:  51                push cx&lt;br /&gt;
 1ef:1259:  88 C1             mov  cl, al&lt;br /&gt;
 1ef:125b:  C0 E9 03          shr  cl, 3&lt;br /&gt;
 1ef:125e:  01 CB             add  bx, cx&lt;br /&gt;
 1ef:1260:  59                pop  cx&lt;br /&gt;
 1ef:1261:  24 07             and  al, 7&lt;br /&gt;
 1ef:1263:  0F A3 07          bt   word ptr [bx], ax                &amp;lt;-- verify if the object is passable (ie. table) or not (ie. fireplace)&lt;br /&gt;
 1ef:1266:  72 17             jb   0x127f&lt;br /&gt;
 1ef:1268:  80 3E EB 37 00    cmp  byte ptr [0x37eb], 0            &amp;lt;-- checks if the projectile hit the target&lt;br /&gt;
 1ef:126d:  74 15             je   0x1284&lt;br /&gt;
 1ef:126f:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]            &amp;lt;-- update projectile&#039;s X and Y&lt;br /&gt;
 1ef:1273:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:1277:  E8 0D 00          call 0x1287&lt;br /&gt;
 1ef:127a:  A2 A8 3F          mov  byte ptr [0x3fa8], al&lt;br /&gt;
 1ef:127d:  EB 05             jmp  0x1284&lt;br /&gt;
 1ef:127f:  C6 06 A8 3F 01    mov  byte ptr [0x3fa8], 1&lt;br /&gt;
 1ef:1284:  5A                pop  dx&lt;br /&gt;
 1ef:1285:  5B                pop  bx&lt;br /&gt;
 1ef:1286:  C3                ret&lt;br /&gt;
&lt;br /&gt;
== Monster attack routine ==&lt;br /&gt;
This first block defines the target priority: barbarian - dwarf - elf - wizard - ragnar&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to revers it forcing the monster to chose the weaker hero first reversing the logic by starting from ragnar profile and then jump backward subtracting 1A.&amp;lt;br&amp;gt;&lt;br /&gt;
See [[#Heroes&#039; default profiles|Heroes&#039; default profiles]] for reference.&lt;br /&gt;
&lt;br /&gt;
 01EF:2257  BE6346              mov  si,4663					&amp;lt;-- starting profile offset 4663=barbarian&lt;br /&gt;
 01EF:225A  B90500              mov  cx,0005					&amp;lt;-- loop repeats 5 times &lt;br /&gt;
 01EF:225D  51                  push cx&lt;br /&gt;
 01EF:225E  8936D63F            mov  [3FD6],si              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2262  8A4419              mov  al,[si+19]             ds:[46CA]=0003	&amp;lt;-- jumps to hero&#039;s ID position&lt;br /&gt;
 01EF:2265  A2BC3F              mov  [3FBC],al              ds:[3FBC]=0003&lt;br /&gt;
 01EF:2268  E85800              call 000022C3 ($+58)&lt;br /&gt;
 01EF:226B  59                  pop  cx&lt;br /&gt;
 01EF:226C  8B36D63F            mov  si,[3FD6]              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2270  83C61A              add  si,001A					&amp;lt;-- jumps to the next profile&lt;br /&gt;
 01EF:2273  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2278  7503                jne  0000227D ($+3)         (down)&lt;br /&gt;
 01EF:227A  E95102              jmp  000024CE ($+251)       (down)&lt;br /&gt;
 01EF:227D  803EA83F03          cmp  byte [3FA8],03         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2282  7503                jne  00002287 ($+3)         (down)&lt;br /&gt;
 01EF:2284  E94702              jmp  000024CE ($+247)       (down)&lt;br /&gt;
 01EF:2287  E2D4                loop 0000225D ($-2c)&lt;br /&gt;
 01EF:2289  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 01EF:22C3  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000&lt;br /&gt;
 01EF:22C8  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:22CB  7503                jne  000022D0 ($+3)         (no jmp)&lt;br /&gt;
 01EF:22CD  E98101              jmp  00002451 ($+181)       (down)&lt;br /&gt;
 01EF:22D0  8A4403              mov  al,[si+03]             ds:[4666]=C726	&amp;lt;-- hero&#039;s room&lt;br /&gt;
 01EF:22D3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room&lt;br /&gt;
 01EF:22D6  7403                je   000022DB ($+3)         (down)&lt;br /&gt;
 01EF:22D8  E97601              jmp  00002451 ($+176)       (down)&lt;br /&gt;
 01EF:22DB  F6441801            test byte [si+18],01        ds:[467B]=0000&lt;br /&gt;
 01EF:22DF  7403                je   000022E4 ($+3)         (down)&lt;br /&gt;
 01EF:22E1  E96D01              jmp  00002451 ($+16d)       (down)&lt;br /&gt;
 01EF:22E4  8B5401              mov  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:22E7  52                  push dx&lt;br /&gt;
 01EF:22E8  57                  push di&lt;br /&gt;
 01EF:22E9  E864F7              call 00001A50 ($-89c)&lt;br /&gt;
 01EF:22EC  5F                  pop  di&lt;br /&gt;
 01EF:22ED  57                  push di&lt;br /&gt;
 01EF:22EE  E84E02              call 0000253F ($+24e)&lt;br /&gt;
 01EF:22F1  E8F03D              call 000060E4 ($+3df0)&lt;br /&gt;
 01EF:22F4  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:22F7  E88D23              call 00004687 ($+238d)&lt;br /&gt;
 01EF:22FA  5F                  pop  di&lt;br /&gt;
 01EF:22FB  5A                  pop  dx&lt;br /&gt;
 01EF:22FC  8816A53F            mov  [3FA5],dl              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2300  8836A63F            mov  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2304  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:2307  891ECA40            mov  [40CA],bx              ds:[40CA]=40A2&lt;br /&gt;
 01EF:230B  E8703D              call 0000607E ($+3d70)			&amp;lt;-- 	if jumped the monster doesn&#039;t attack when in contact&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:230E  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2312  8A07                mov  al,[bx]                ds:[3F28]=4040		&lt;br /&gt;
 01EF:2314  243F                and  al,3F				&lt;br /&gt;
 01EF:2316  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room check. if removed the monster attack through walls and doors&lt;br /&gt;
 01EF:2319  7403                je   0000231E ($+3)         (down)&lt;br /&gt;
 01EF:231B  E93301              jmp  00002451 ($+133)       (down)&lt;br /&gt;
 01EF:231E  B501                mov  ch,01&lt;br /&gt;
 01EF:2320  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2323  2A4501              sub  al,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2326  7504                jne  0000232C ($+4)         (no jmp)&lt;br /&gt;
 01EF:2328  B500                mov  ch,00&lt;br /&gt;
 01EF:232A  EB08                jmp  short 00002334 ($+8)   (down)&lt;br /&gt;
 01EF:232C  3C80                cmp  al,80&lt;br /&gt;
 01EF:232E  7204                jc   00002334 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2330  F6D8                neg  al&lt;br /&gt;
 01EF:2332  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2334  A2A13F              mov  [3FA1],al              ds:[3FA1]=0100&lt;br /&gt;
 01EF:2337  882EA33F            mov  [3FA3],ch              ds:[3FA3]=0100&lt;br /&gt;
 01EF:233B  B501                mov  ch,01&lt;br /&gt;
 01EF:233D  A0A63F              mov  al,[3FA6]              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2340  2A4502              sub  al,[di+02]             ds:[4DBA]=260F&lt;br /&gt;
 01EF:2343  7504                jne  00002349 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2345  B500                mov  ch,00&lt;br /&gt;
 01EF:2347  EB08                jmp  short 00002351 ($+8)   (down)&lt;br /&gt;
 01EF:2349  3C80                cmp  al,80&lt;br /&gt;
 01EF:234B  7204                jc   00002351 ($+4)         (no jmp)&lt;br /&gt;
 01EF:234D  F6D8                neg  al&lt;br /&gt;
 01EF:234F  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2351  A2A23F              mov  [3FA2],al              ds:[3FA2]=0001&lt;br /&gt;
 01EF:2354  882EA43F            mov  [3FA4],ch              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2358  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:235B  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006&lt;br /&gt;
 01EF:235F  C606A93F00          mov  byte [3FA9],00         ds:[3FA9]=0000&lt;br /&gt;
 01EF:2364  8A5D09              mov  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:2367  02DB                add  bl,bl&lt;br /&gt;
 01EF:2369  02DB                add  bl,bl&lt;br /&gt;
 01EF:236B  025D09              add  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:236E  32FF                xor  bh,bh&lt;br /&gt;
 01EF:2370  8A870648            mov  al,[bx+4806]           [illegal]&lt;br /&gt;
 01EF:2374  A29C3F              mov  [3F9C],al              ds:[3F9C]=0003&lt;br /&gt;
 01EF:2377  8A0EA23F            mov  cl,[3FA2]              ds:[3FA2]=0001&lt;br /&gt;
 01EF:237B  A0A13F              mov  al,[3FA1]              ds:[3FA1]=0100&lt;br /&gt;
 01EF:237E  3AC1                cmp  al,cl&lt;br /&gt;
 01EF:2380  7203                jc   00002385 ($+3)         (no jmp)&lt;br /&gt;
 01EF:2382  EB6A                jmp  short 000023EE ($+6a)  (down)&lt;br /&gt;
 01EF:2384  90                  nop&lt;br /&gt;
 01EF:2385  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2389  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:238D  7425                je   000023B4 ($+25)        (down)&lt;br /&gt;
 01EF:238F  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2392  0AC0                or   al,al&lt;br /&gt;
 01EF:2394  741E                je   000023B4 ($+1e)        (down)&lt;br /&gt;
 01EF:2396  02F0                add  dh,al&lt;br /&gt;
 01EF:2398  E8DD00              call 00002478 ($+dd)&lt;br /&gt;
 01EF:239B  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:239D  7503                jne  000023A2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:239F  E9B500              jmp  00002457 ($+b5)        (down)&lt;br /&gt;
 01EF:23A2  0AC0                or   al,al&lt;br /&gt;
 01EF:23A4  750E                jne  000023B4 ($+e)         (no jmp)&lt;br /&gt;
 01EF:23A6  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:23AA  E8B000              call 0000245D ($+b0)&lt;br /&gt;
 01EF:23AD  7303                jnc  000023B2 ($+3)         (down)&lt;br /&gt;
 01EF:23AF  E99900              jmp  0000244B ($+99)        (down)&lt;br /&gt;
 01EF:23B2  EBD1                jmp  short 00002385 ($-2f)  (up)&lt;br /&gt;
 01EF:23B4  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23B8  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23BB  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23BD  7503                jne  000023C2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23BF  E98F00              jmp  00002451 ($+8f)        (down)&lt;br /&gt;
 01EF:23C2  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23C5  0AC0                or   al,al&lt;br /&gt;
 01EF:23C7  7503                jne  000023CC ($+3)         (no jmp)&lt;br /&gt;
 01EF:23C9  E98500              jmp  00002451 ($+85)        (down)&lt;br /&gt;
 01EF:23CC  02D0                add  dl,al&lt;br /&gt;
 01EF:23CE  E8A700              call 00002478 ($+a7)&lt;br /&gt;
 01EF:23D1  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:23D3  7503                jne  000023D8 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23D5  E97F00              jmp  00002457 ($+7f)        (down)&lt;br /&gt;
 01EF:23D8  0AC0                or   al,al&lt;br /&gt;
 01EF:23DA  7403                je   000023DF ($+3)         (down)&lt;br /&gt;
 01EF:23DC  EB73                jmp  short 00002451 ($+73)  (down)&lt;br /&gt;
 01EF:23DE  90                  nop&lt;br /&gt;
 01EF:23DF  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23E2  32E4                xor  ah,ah&lt;br /&gt;
 01EF:23E4  E87600              call 0000245D ($+76)&lt;br /&gt;
 01EF:23E7  7303                jnc  000023EC ($+3)         (down)&lt;br /&gt;
 01EF:23E9  EB60                jmp  short 0000244B ($+60)  (down)&lt;br /&gt;
 01EF:23EB  90                  nop&lt;br /&gt;
 01EF:23EC  EB97                jmp  short 00002385 ($-69)  (up)&lt;br /&gt;
 01EF:23EE  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23F2  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23F5  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23F7  7426                je   0000241F ($+26)        (down)&lt;br /&gt;
 01EF:23F9  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23FC  0AC0                or   al,al&lt;br /&gt;
 01EF:23FE  741F                je   0000241F ($+1f)        (down)&lt;br /&gt;
 01EF:2400  02D0                add  dl,al&lt;br /&gt;
 01EF:2402  E87300              call 00002478 ($+73)&lt;br /&gt;
 01EF:2405  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2407  7503                jne  0000240C ($+3)         (no jmp)&lt;br /&gt;
 01EF:2409  EB4C                jmp  short 00002457 ($+4c)  (down)&lt;br /&gt;
 01EF:240B  90                  nop&lt;br /&gt;
 01EF:240C  0AC0                or   al,al&lt;br /&gt;
 01EF:240E  750F                jne  0000241F ($+f)         (no jmp)&lt;br /&gt;
 01EF:2410  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:2413  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2415  E84500              call 0000245D ($+45)&lt;br /&gt;
 01EF:2418  7303                jnc  0000241D ($+3)         (down)&lt;br /&gt;
 01EF:241A  EB2F                jmp  short 0000244B ($+2f)  (down)&lt;br /&gt;
 01EF:241C  90                  nop&lt;br /&gt;
 01EF:241D  EBCF                jmp  short 000023EE ($-31)  (up)&lt;br /&gt;
 01EF:241F  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2423  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2427  7428                je   00002451 ($+28)        (down)&lt;br /&gt;
 01EF:2429  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:242C  0AC0                or   al,al&lt;br /&gt;
 01EF:242E  7421                je   00002451 ($+21)        (down)&lt;br /&gt;
 01EF:2430  02F0                add  dh,al&lt;br /&gt;
 01EF:2432  E84300              call 00002478 ($+43)&lt;br /&gt;
 01EF:2435  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2437  741E                je   00002457 ($+1e)        (down)&lt;br /&gt;
 01EF:2439  0AC0                or   al,al&lt;br /&gt;
 01EF:243B  7514                jne  00002451 ($+14)        (no jmp)&lt;br /&gt;
 01EF:243D  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2441  E81900              call 0000245D ($+19)&lt;br /&gt;
 01EF:2444  7303                jnc  00002449 ($+3)         (down)&lt;br /&gt;
 01EF:2446  EB03                jmp  short 0000244B ($+3)   (down)&lt;br /&gt;
 01EF:2448  90                  nop&lt;br /&gt;
 01EF:2449  EBA3                jmp  short 000023EE ($-5d)  (up)&lt;br /&gt;
 01EF:244B  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2450  C3                  ret&lt;br /&gt;
 01EF:2451  C606A83F02          mov  byte [3FA8],02         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2456  C3                  ret&lt;br /&gt;
 01EF:2457  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- hero is reachable&lt;br /&gt;
 01EF:245C  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:245D  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006	&amp;lt;-- called only when the monster needs to move&lt;br /&gt;
 01EF:2461  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:2465  8807                mov  [bx],al                ds:[3F28]=6148&lt;br /&gt;
 01EF:2467  886701              mov  [bx+01],ah             ds:[3F29]=0061&lt;br /&gt;
 01EF:246A  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:246F  FE06A93F            inc  byte [3FA9]            ds:[3FA9]=0000&lt;br /&gt;
 01EF:2473  FE0E9C3F            dec  byte [3F9C]            ds:[3F9C]=0003&lt;br /&gt;
 01EF:2477  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:2478  A0BC3F              mov  al,[3FBC]              ds:[3FBC]=0000&lt;br /&gt;
 01EF:247B  E80139              call 00005D7F ($+3901)&lt;br /&gt;
 01EF:247E  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:2481  7408                je   0000248B ($+8)         (down)&lt;br /&gt;
 01EF:2483  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:2486  7503                jne  0000248B ($+3)         (no jmp)&lt;br /&gt;
 01EF:2488  B0FF                mov  al,FF&lt;br /&gt;
 01EF:248A  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:248B  B500                mov  ch,00&lt;br /&gt;
 01EF:248D  382EBC3F            cmp  [3FBC],ch              ds:[3FBC]=0000&lt;br /&gt;
 01EF:2491  7412                je   000024A5 ($+12)        (down)&lt;br /&gt;
 01EF:2493  8AC5                mov  al,ch&lt;br /&gt;
 01EF:2495  E8E738              call 00005D7F ($+38e7)&lt;br /&gt;
 01EF:2498  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:249B  7408                je   000024A5 ($+8)         (down)&lt;br /&gt;
 01EF:249D  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:24A0  7503                jne  000024A5 ($+3)         (no jmp)&lt;br /&gt;
 01EF:24A2  B001                mov  al,01&lt;br /&gt;
 01EF:24A4  C3                  ret&lt;br /&gt;
 01EF:24A5  FEC5                inc  ch&lt;br /&gt;
 01EF:24A7  80FD04              cmp  ch,04&lt;br /&gt;
 01EF:24AA  75E1                jne  0000248D ($-1f)        (no jmp)&lt;br /&gt;
 01EF:24AC  52                  push dx&lt;br /&gt;
 01EF:24AD  E8CE3B              call 0000607E ($+3bce)&lt;br /&gt;
 01EF:24B0  5A                  pop  dx&lt;br /&gt;
 01EF:24B1  81C36F58            add  bx,586F&lt;br /&gt;
 01EF:24B5  803F00              cmp  byte [bx],00           ds:[3F28]=6148&lt;br /&gt;
 01EF:24B8  7403                je   000024BD ($+3)         (down)&lt;br /&gt;
 01EF:24BA  B002                mov  al,02&lt;br /&gt;
 01EF:24BC  C3                  ret&lt;br /&gt;
 01EF:24BD  8A8700FC            mov  al,[bx-0400]           ds:[3B28]=E04B&lt;br /&gt;
 01EF:24C1  243F                and  al,3F&lt;br /&gt;
 01EF:24C3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26 	&amp;lt;-- monster&#039;s room check.&lt;br /&gt;
 01EF:24C6  7503                jne  000024CB ($+3)         (no jmp)	&lt;br /&gt;
 01EF:24C8  32C0                xor  al,al&lt;br /&gt;
 01EF:24CA  C3                  ret&lt;br /&gt;
 01EF:24CB  B003                mov  al,03&lt;br /&gt;
 01EF:24CD  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:24CE  893ED43F            mov  [3FD4],di              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24D2  8A0EA93F            mov  cl,[3FA9]              ds:[3FA9]=0001&lt;br /&gt;
 01EF:24D6  0AC9                or   cl,cl&lt;br /&gt;
 01EF:24D8  7455                je   0000252F ($+55)        (down)&lt;br /&gt;
 01EF:24DA  32ED                xor  ch,ch&lt;br /&gt;
 01EF:24DC  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:24DF  891ECA40            mov  [40CA],bx              ds:[40CA]=40A4&lt;br /&gt;
 01EF:24E3  51                  push cx&lt;br /&gt;
 01EF:24E4  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24E8  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24EB  E8903B              call 0000607E ($+3b90)&lt;br /&gt;
 01EF:24EE  8A8F6F58            mov  cl,[bx+586F]           ds:[59FB]=0000&lt;br /&gt;
 01EF:24F2  C6876F5800          mov  byte [bx+586F],00      ds:[59FB]=0000&lt;br /&gt;
 01EF:24F7  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:24FB  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24FE  0217                add  dl,[bx]                ds:[018C]=1149&lt;br /&gt;
 01EF:2500  027701              add  dh,[bx+01]             ds:[018D]=0611&lt;br /&gt;
 01EF:2503  895501              mov  [di+01],dx             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2506  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:250B  E8703B              call 0000607E ($+3b70)&lt;br /&gt;
 01EF:250E  888F6F58            mov  [bx+586F],cl           ds:[AE50]=0A16&lt;br /&gt;
 01EF:2512  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2516  895D04              mov  [di+04],bx             ds:[4DBC]=55E1&lt;br /&gt;
 01EF:2519  E834F5              call 00001A50 ($-acc)		&lt;br /&gt;
 01EF:251C  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:2520  E81C00              call 0000253F ($+1c)&lt;br /&gt;
 01EF:2523  E8BE3B              call 000060E4 ($+3bbe)&lt;br /&gt;
 01EF:2526  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:2529  E85B21              call 00004687 ($+215b)						&amp;lt;-- 500.000 nop cycles, to slow down monster&#039;s animation&lt;br /&gt;
 01EF:252C  59                  pop  cx		&lt;br /&gt;
 01EF:252D  E2B4                loop 000024E3 ($-4c)&lt;br /&gt;
 01EF:252F  51                  push cx&lt;br /&gt;
 01EF:2530  B93200              mov  cx,0032&lt;br /&gt;
 01EF:2533  E86A11              call 000036A0 ($+116a)						&amp;lt;-- more nops &lt;br /&gt;
 01EF:2536  E2FB                loop 00002533 ($-5)&lt;br /&gt;
 01EF:2538  59                  pop  cx&lt;br /&gt;
 01EF:2539  E853F8              call 00001D8F ($-7ad)						&amp;lt;-- here the monster attacks whein in contact with the hero&lt;br /&gt;
 01EF:253C  E99131              jmp  000056D0 ($+3191)      (down)&lt;br /&gt;
 01EF:253F  8A4502              mov  al,[di+02]             ds:[EF42]=3736&lt;br /&gt;
 01EF:2542  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2544  BA000A              mov  dx,0A00&lt;br /&gt;
 01EF:2547  F7E2                mul  dx&lt;br /&gt;
 01EF:2549  8BD8                mov  bx,ax&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:4687  51                  push cx&lt;br /&gt;
 01EF:4688  E820EF              call 000035AB ($-10e0)&lt;br /&gt;
 01EF:468B  59                  pop  cx&lt;br /&gt;
 01EF:468C  E2F9                loop 00004687 ($-7)&lt;br /&gt;
 01EF:468E  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh	&lt;br /&gt;
 01EF:6080  B700                mov  bh,00	&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5&lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[0130]=0101&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hero&#039;s pathfinding routine ==&lt;br /&gt;
The pathfinder algorithm the programmer chose was a simple variation of the A*, and is perfectly implemented. You can click on any tiles on the screen even on the invisible ones outside the room. If there is a clean path, the hero will reach that tile.&lt;br /&gt;
&lt;br /&gt;
 01EF:6449  E8E2D4              call 0000392E ($-2b1e)&lt;br /&gt;
 01EF:644C  E85800              call 000064A7 ($+58)&lt;br /&gt;
 01EF:644F  833CFF              cmp  word [si],FFFF         ds:[3911]=0000&lt;br /&gt;
 01EF:6452  7503                jne  00006457 ($+3)         (down)&lt;br /&gt;
 01EF:6454  E95F03              jmp  000067B6 ($+35f)       (down)&lt;br /&gt;
 &lt;br /&gt;
 01EF:67B6  8B16E747            mov  dx,[47E7]              ds:[47E7]=0087&lt;br /&gt;
 01EF:67BA  8B2EE947            mov  bp,[47E9]              ds:[47E9]=0097&lt;br /&gt;
 01EF:67BE  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67C1  BE1941              mov  si,4119&lt;br /&gt;
 01EF:67C4  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67C7  51                  push cx&lt;br /&gt;
 01EF:67C8  8B4402              mov  ax,[si+02]             ds:[491E]=01C0&lt;br /&gt;
 01EF:67CB  051800              add  ax,0018&lt;br /&gt;
 01EF:67CE  2BC2                sub  ax,dx&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (down)&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67D2  F7D8                neg  ax&lt;br /&gt;
 01EF:67D4  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67D6  8B0C                mov  cx,[si]                ds:[4119]=0044&lt;br /&gt;
 01EF:67D8  83C108              add  cx,0008&lt;br /&gt;
 01EF:67DB  2BCD                sub  cx,bp&lt;br /&gt;
 01EF:67DD  7302                jnc  000067E1 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67DF  F7D9                neg  cx&lt;br /&gt;
 01EF:67E1  03C1                add  ax,cx&lt;br /&gt;
 01EF:67E3  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67E5  8907                mov  [bx],ax                ds:[402D]=0000&lt;br /&gt;
 01EF:67E7  83C302              add  bx,0002&lt;br /&gt;
 01EF:67EA  83C604              add  si,0004&lt;br /&gt;
 01EF:67ED  59                  pop  cx&lt;br /&gt;
 01EF:67EE  E2D7                loop 000067C7 ($-29)&lt;br /&gt;
 01EF:67F0  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67F3  B8FFFF              mov  ax,FFFF&lt;br /&gt;
 01EF:67F6  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67F9  3B07                cmp  ax,[bx]                ds:[402D]=0000&lt;br /&gt;
 01EF:67FB  7204                jc   00006801 ($+4)         (down)&lt;br /&gt;
 01EF:67FD  8B07                mov  ax,[bx]                ds:[4095]=0000&lt;br /&gt;
 01EF:67FF  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6801  83C302              add  bx,0002&lt;br /&gt;
 01EF:6804  E2F3                loop 000067F9 ($-d)&lt;br /&gt;
 01EF:6806  3D0800              cmp  ax,0008&lt;br /&gt;
 01EF:6809  7201                jc   0000680C ($+1)         (no jmp)&lt;br /&gt;
 01EF:680B  C3                  ret&lt;br /&gt;
 01EF:680C  BB3400              mov  bx,0034&lt;br /&gt;
 01EF:680F  2BDA                sub  bx,dx&lt;br /&gt;
 01EF:6811  83FB2D              cmp  bx,002D&lt;br /&gt;
 01EF:6814  720B                jc   00006821 ($+b)         (down)&lt;br /&gt;
 01EF:6816  83EB2D              sub  bx,002D&lt;br /&gt;
 01EF:6819  D1E3                shl  bx,1&lt;br /&gt;
 01EF:681B  8B8F034A            mov  cx,[bx+4A03]           ds:[4A14]=0E09&lt;br /&gt;
 01EF:681F  EB06                jmp  short 00006827 ($+6)   (down)&lt;br /&gt;
 01EF:6821  8A8FD649            mov  cl,[bx+49D6]           ds:[49E7]=1E37&lt;br /&gt;
 01EF:6825  32ED                xor  ch,ch&lt;br /&gt;
 01EF:6827  A1E43F              mov  ax,[3FE4]              ds:[3FE4]=5574&lt;br /&gt;
 01EF:682A  03C1                add  ax,cx&lt;br /&gt;
 01EF:682C  2D6F54              sub  ax,546F&lt;br /&gt;
 01EF:682F  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:6831  81C36F56            add  bx,566F&lt;br /&gt;
 01EF:6835  3B1E110E            cmp  bx,[0E11]              ds:[0E11]=FFFF&lt;br /&gt;
 01EF:6839  7501                jne  0000683C ($+1)         (down)&lt;br /&gt;
 01EF:683B  C3                  ret&lt;br /&gt;
 01EF:683C  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:683E  B500                mov  ch,00&lt;br /&gt;
 01EF:6840  3D1A00              cmp  ax,001A&lt;br /&gt;
 01EF:6843  7207                jc   0000684C ($+7)         (down)&lt;br /&gt;
 01EF:6845  2D1A00              sub  ax,001A&lt;br /&gt;
 01EF:6848  FEC5                inc  ch&lt;br /&gt;
 01EF:684A  EBF4                jmp  short 00006840 ($-c)   (up)&lt;br /&gt;
 01EF:684C  8AC8                mov  cl,al&lt;br /&gt;
 01EF:684E  8A876F54            mov  al,[bx+546F]           ds:[AC1A]=0200&lt;br /&gt;
 01EF:6852  243F                and  al,3F&lt;br /&gt;
 01EF:6854  7501                jne  00006857 ($+1)         (down)&lt;br /&gt;
 01EF:6856  C3                  ret&lt;br /&gt;
 01EF:6857  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:685C  7503                jne  00006861 ($+3)         (down)&lt;br /&gt;
 01EF:685E  EB11                jmp  short 00006871 ($+11)  (down)&lt;br /&gt;
 01EF:6860  90                  nop&lt;br /&gt;
 01EF:6861  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:6866  7501                jne  00006869 ($+1)         (down)&lt;br /&gt;
 01EF:6868  C3                  ret&lt;br /&gt;
 01EF:6869  80BF6F5840          cmp  byte [bx+586F],40      ds:[B01A]=0101&lt;br /&gt;
 01EF:686E  7201                jc   00006871 ($+1)         (down)&lt;br /&gt;
 01EF:6870  C3                  ret&lt;br /&gt;
 01EF:6871  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6873  51                  push cx&lt;br /&gt;
 01EF:6874  E810AA              call 00001287 ($-55f0)&lt;br /&gt;
 01EF:6877  59                  pop  cx&lt;br /&gt;
 01EF:6878  0AC0                or   al,al&lt;br /&gt;
 01EF:687A  7401                je   0000687D ($+1)         (down)&lt;br /&gt;
 01EF:687C  C3                  ret&lt;br /&gt;
 01EF:687D  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:6881  880EF03F            mov  [3FF0],cl              ds:[3FF0]=0000&lt;br /&gt;
 01EF:6885  882EF13F            mov  [3FF1],ch              ds:[3FF1]=0000&lt;br /&gt;
 01EF:6889  8A4501              mov  al,[di+01]             ds:[3913]=0000&lt;br /&gt;
 01EF:688C  A2EE3F              mov  [3FEE],al              ds:[3FEE]=0000&lt;br /&gt;
 01EF:688F  A2F53F              mov  [3FF5],al              ds:[3FF5]=0C02&lt;br /&gt;
 01EF:6892  8A4502              mov  al,[di+02]             ds:[4665]=200C&lt;br /&gt;
 01EF:6895  A2EF3F              mov  [3FEF],al              ds:[3FEF]=040C&lt;br /&gt;
 01EF:6898  A2F63F              mov  [3FF6],al              ds:[3FF6]=000C&lt;br /&gt;
 01EF:689B  E80EC5              call 00002DAC ($-3af2)&lt;br /&gt;
 01EF:689E  803EC83F00          cmp  byte [3FC8],00         ds:[3FC8]=0000&lt;br /&gt;
 01EF:68A3  7501                jne  000068A6 ($+1)         (no jmp)&lt;br /&gt;
 01EF:68A5  C3                  ret&lt;br /&gt;
 01EF:68A6  BB1340              mov  bx,4013&lt;br /&gt;
 01EF:68A9  891ECC3F            mov  [3FCC],bx              ds:[3FCC]=0000&lt;br /&gt;
 01EF:68AD  C3                  ret  &lt;br /&gt;
&lt;br /&gt;
 01EF:2DAC  A0EE3F              mov  al,[3FEE]              ds:[3FEE]=0000&lt;br /&gt;
 01EF:2DAF  2A06F03F            sub  al,[3FF0]              ds:[3FF0]=1515&lt;br /&gt;
 01EF:2DB3  7902                jns  00002DB7 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DB5  F6D8                neg  al&lt;br /&gt;
 01EF:2DB7  8A26EF3F            mov  ah,[3FEF]              ds:[3FEF]=1500&lt;br /&gt;
 01EF:2DBB  2A26F13F            sub  ah,[3FF1]              ds:[3FF1]=3915&lt;br /&gt;
 01EF:2DBF  7902                jns  00002DC3 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DC1  F6DC                neg  ah&lt;br /&gt;
 01EF:2DC3  02C4                add  al,ah&lt;br /&gt;
 01EF:2DC5  A2E937              mov  [37E9],al              ds:[37E9]=3737&lt;br /&gt;
 01EF:2DC8  A09C3F              mov  al,[3F9C]              ds:[3F9C]=3A3A&lt;br /&gt;
 01EF:2DCB  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2DCD  A3F93F              mov  [3FF9],ax              ds:[3FF9]=3F3E&lt;br /&gt;
 01EF:2DD0  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=3A3A&lt;br /&gt;
 01EF:2DD5  C606C83F00          mov  byte [3FC8],00         ds:[3FC8]=1515&lt;br /&gt;
 01EF:2DDA  C706F33F0000        mov  word [3FF3],0000       ds:[3FF3]=1515&lt;br /&gt;
 01EF:2DE0  C706CC3F0000        mov  word [3FCC],0000       ds:[3FCC]=3B3C&lt;br /&gt;
 &lt;br /&gt;
Starting from memory location 0B6B:0A0E the subsequent 512 bytes are set to 1A1A x100h (256 times) by this function: &lt;br /&gt;
 01EF:2DE6  BF0E0A              mov  di,0A0E&lt;br /&gt;
 01EF:2DE9  B90001              mov  cx,0100&lt;br /&gt;
 01EF:2DEC  50                  push ax&lt;br /&gt;
 01EF:2DED  B86B0B              mov  ax,0B6B&lt;br /&gt;
 01EF:2DF0  8EC0                mov  es,ax&lt;br /&gt;
 01EF:2DF2  58                  pop  ax&lt;br /&gt;
 01EF:2DF3  B81A1A              mov  ax,1A1A&lt;br /&gt;
 01EF:2DF6  F3AB                repe stosw&lt;br /&gt;
 &lt;br /&gt;
The code then creates a map with all possible paths of the hero: &lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 07 08 09 -- 09 08&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 06 09 0A 09 08 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 05 0A 0B 0A 09 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 04 0B -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 02 01 02 01 02 03 04&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 02 -- -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 03 -- -- -- -- 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 04 -- -- -- -- 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
&lt;br /&gt;
 01EF:2DF8  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:2DFC  EB74                jmp  short 00002E72 ($+74)  (down)&lt;br /&gt;
 01EF:2DFE  90                  nop&lt;br /&gt;
 01EF:2DFF  A0F23F              mov  al,[3FF2]              ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E02  8B1EF33F            mov  bx,[3FF3]              ds:[3FF3]=0000&lt;br /&gt;
 01EF:2E06  8887FB3F            mov  [bx+3FFB],al           ds:[411D]=0050&lt;br /&gt;
 01EF:2E0A  43                  inc  bx&lt;br /&gt;
 01EF:2E0B  3B1EF93F            cmp  bx,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E0F  7601                jbe  00002E12 ($+1)         (no jmp)&lt;br /&gt;
 01EF:2E11  C3                  ret&lt;br /&gt;
 01EF:2E12  891EF33F            mov  [3FF3],bx              ds:[3FF3]=0001&lt;br /&gt;
 01EF:2E16  8A26F93F            mov  ah,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E1A  2AE3                sub  ah,bl&lt;br /&gt;
 01EF:2E1C  A0F03F              mov  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E1F  2A06F53F            sub  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E23  7902                jns  00002E27 ($+2)         (down)&lt;br /&gt;
 01EF:2E25  F6D8                neg  al&lt;br /&gt;
 01EF:2E27  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E29  7603                jbe  00002E2E ($+3)         (down)&lt;br /&gt;
 01EF:2E2B  E98400              jmp  00002EB2 ($+84)        (down)&lt;br /&gt;
 01EF:2E2E  A0F13F              mov  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E31  2A06F63F            sub  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E35  7902                jns  00002E39 ($+2)         (down)&lt;br /&gt;
 01EF:2E37  F6D8                neg  al&lt;br /&gt;
 01EF:2E39  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E3B  7775                ja   00002EB2 ($+75)        (no jmp)&lt;br /&gt;
 01EF:2E3D  E87700              call 00002EB7 ($+77)&lt;br /&gt;
 01EF:2E40  7270                jc   00002EB2 ($+70)        (no jmp)&lt;br /&gt;
 01EF:2E42  3E885E00            mov  ds:[bp],bl             ds:[007A]=0002&lt;br /&gt;
 01EF:2E46  A0F53F              mov  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E49  3A06F03F            cmp  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E4D  7523                jne  00002E72 ($+23)        (no jmp)&lt;br /&gt;
 01EF:2E4F  A0F63F              mov  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E52  3A06F13F            cmp  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E56  751A                jne  00002E72 ($+1a)        (no jmp)&lt;br /&gt;
 01EF:2E58  881EC83F            mov  [3FC8],bl              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E5C  57                  push di&lt;br /&gt;
 01EF:2E5D  BF1340              mov  di,4013&lt;br /&gt;
 01EF:2E60  BEFB3F              mov  si,3FFB&lt;br /&gt;
 01EF:2E63  8A0EC83F            mov  cl,[3FC8]              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E67  32ED                xor  ch,ch&lt;br /&gt;
 01EF:2E69  890EF93F            mov  [3FF9],cx              ds:[3FF9]=0001&lt;br /&gt;
 01EF:2E6D  F3A4                repe movsb&lt;br /&gt;
 01EF:2E6F  5F                  pop  di&lt;br /&gt;
 01EF:2E70  EB40                jmp  short 00002EB2 ($+40)  (down)&lt;br /&gt;
 01EF:2E72  C606F23F00          mov  byte [3FF2],00         ds:[3FF2]=0100&lt;br /&gt;
 01EF:2E77  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
&lt;br /&gt;
part of 2DF8 routine this writes the temporary math:&lt;br /&gt;
 01EF:2E7B  E881FF              call 00002DFF ($-7f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E7E  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E82  C606F23F01          mov  byte [3FF2],01         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E87  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E8B  E871FF              call 00002DFF ($-8f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E8E  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E92  C606F23F02          mov  byte [3FF2],02         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E97  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E9B  E861FF              call 00002DFF ($-9f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E9E  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2EA2  C606F23F03          mov  byte [3FF2],03         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2EA7  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EAB  E851FF              call 00002DFF ($-af)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2EAE  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EB2  FF0EF33F            dec  word [3FF3]            ds:[3FF3]=0000&lt;br /&gt;
 01EF:2EB6  C3                  ret&lt;br /&gt;
&lt;br /&gt;
== Notable Memory locations for hero&#039;s and monster&#039;s movement ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 3F92 = CURRENT QUEST&lt;br /&gt;
 3F93 = Hero&#039;s current tile (see tilemap below)&lt;br /&gt;
 3F94 = ACTIVE HERO&#039;S ROOM&lt;br /&gt;
&lt;br /&gt;
 3F99 =&lt;br /&gt;
 3F9A = END TURN FLAG&lt;br /&gt;
 3F9B = action performed?&lt;br /&gt;
 3F9C = REMAINING STEPS&lt;br /&gt;
 3F9D =&lt;br /&gt;
 3F9E =&lt;br /&gt;
 3F9F = MONSTER&#039;S X position&lt;br /&gt;
 3FA0 = MONSTER&#039;S Y position&lt;br /&gt;
 3FA1 = Horizontal distance Monster-hero&lt;br /&gt;
 3FA2 = Vertical distance Monster-hero&lt;br /&gt;
 3FA3-3FA4 (word) = next monster&#039;s step (see 40A2)&lt;br /&gt;
 3FA5 = HERO&#039;S X position&lt;br /&gt;
 3FA6 = HERO&#039;S Y position&lt;br /&gt;
 3FA7 = Active hero&lt;br /&gt;
 3FA8 = LOS 00=start 01=blocked 02=free&lt;br /&gt;
 3FA9 = steps to take to reach the hero?&lt;br /&gt;
 3FB5 = Target Hero ID (FF=Monster)&lt;br /&gt;
 3FB9 = current total defense dice of the active hero during DEFENSE&lt;br /&gt;
 3FC5 = Quest specific hero counter (usually identical to 3FC6)  modified by 26E8 call&lt;br /&gt;
 3FC5 = hero counter (complementar)  1111 = 0F = all heroes OUT  modified by 26E2 call&lt;br /&gt;
 &lt;br /&gt;
 3FD0 = WORD map ID (temporary for the quest) offset of ATTACKED monster in map memory (586F)&lt;br /&gt;
 3FD2 = BYTE rolled skulls (by monsters or heroes)&lt;br /&gt;
 3FD3 = BYTE rolled shields (by monsters or heroes)&lt;br /&gt;
 3FD4 = WORD monster&#039;s profile location (during attacks)&lt;br /&gt;
 3FD6 = WORD hero&#039;s profile location (during attacks)&lt;br /&gt;
 &lt;br /&gt;
 3FE7 = QUEST specific OBJECTIVE (1=ACCOMPLISHED)&lt;br /&gt;
 &lt;br /&gt;
 Memory locations for hero&#039;s movement (pathfindig)&lt;br /&gt;
 3FEE = HERO&#039;S X STARTING POSITION&lt;br /&gt;
 3FEF = HERO&#039;S Y STARTING POSITION&lt;br /&gt;
 3FF0 = mouse click X position (X stop)&lt;br /&gt;
 3FF1 = mouse click Y position (Y stop)&lt;br /&gt;
 3FF2 = 03&lt;br /&gt;
 3FF3 = FF&lt;br /&gt;
 3FF4 = FF&lt;br /&gt;
 3FF5 = HERO&#039;S X POSITION (copy)&lt;br /&gt;
 3FF6 = HERO&#039;S Y POSITION (copy)&lt;br /&gt;
 3FF9 = rolled movement&lt;br /&gt;
 3FFB - 4012 = math locations that varies among 00,01,02,03, at the end every byte is set to 03 (bytes here are never cleared)&lt;br /&gt;
 4013 -&amp;gt; locations with definitive hero&#039;s path (bytes here are never cleared)&lt;br /&gt;
&lt;br /&gt;
 hero&#039;s directional movement values:&lt;br /&gt;
 00 = up&lt;br /&gt;
 01 = right&lt;br /&gt;
 02 = down&lt;br /&gt;
 03 = left&lt;br /&gt;
 The hero&#039;s moving animation is then delegated to the main loop routines that starts reading from 4013 till [3FF9].&lt;br /&gt;
&lt;br /&gt;
 4097 = infinite actions if set to a number different from 00&lt;br /&gt;
 402C = Wand of recall extra action 00=no 01=yes&lt;br /&gt;
 4BBC = location where TRAP special event number is put upon entering the room (FF=Searched)&lt;br /&gt;
&lt;br /&gt;
 40A2 = here is stored the path the monster will follow by 607E (?) call. A sequence of words that specify directional movement&lt;br /&gt;
 00 01 = down&lt;br /&gt;
 00 FF = up&lt;br /&gt;
 FF 00 = left&lt;br /&gt;
 01 00 = right&lt;br /&gt;
 40CA = last location of the path to follow. (A640 = 2 moves)		&lt;br /&gt;
&lt;br /&gt;
 Screen tiles layout. The tile under the current hero is saved in [3F93]&lt;br /&gt;
             /\&lt;br /&gt;
            /00\&lt;br /&gt;
           /\  /\&lt;br /&gt;
          /01\/02\&lt;br /&gt;
         /\  /\  /\&lt;br /&gt;
        /03\/04\/05\&lt;br /&gt;
       /\  /\  /\  /\&lt;br /&gt;
      /06\/07\/08\/09\&lt;br /&gt;
     /\  /\  /\  /\  /\&lt;br /&gt;
    /0A\/0B\/0C\/0D\/0E\&lt;br /&gt;
    \  /\  /\  /\  /\  /\&lt;br /&gt;
     \/0F\/10\/11\/12\/13\&lt;br /&gt;
      \  /\  /\  /\  /\  /&lt;br /&gt;
       \/14\/15\/16\/17\/&lt;br /&gt;
        \  /\  /\  /\  /&lt;br /&gt;
         \/18\/19\/1A\/&lt;br /&gt;
          \  /\  /\  /&lt;br /&gt;
           \/1B\/1C\/&lt;br /&gt;
            \  /\  /&lt;br /&gt;
             \/1D\/&lt;br /&gt;
              \  /&lt;br /&gt;
               \/&lt;br /&gt;
			   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The hero&#039;s moving animation is delegated to the in-game main loop routines.&lt;br /&gt;
&lt;br /&gt;
= [DATA SEGMENT] Main Pointers =&lt;br /&gt;
&lt;br /&gt;
The file inside the exe that represents the Data Segment (every byte that is not strictly CODE) starts at offset &#039;&#039;&#039;0x9BE0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heroes&#039; default profiles ==&lt;br /&gt;
&lt;br /&gt;
 offset  mem pointer                   BP MP                      EQ             AD DD          ID &lt;br /&gt;
 0xE243  0B6B:4663   00 00 00 00 00 00 08 02 1D 00 00 00 00 00 00 00 00 00 00 00 03 02 00 00 00 00	Barbarian&lt;br /&gt;
 0xE25D  0B6B:467D   00 00 00 00 00 00 07 03 32 00 00 00 00 00 00 80 00 00 00 00 02 02 00 00 00 01	Dwarf&lt;br /&gt;
 0xE277  0B6B:4697   00 00 00 00 00 00 06 04 35 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 00 02	Elf&lt;br /&gt;
 0xE291  0B6B:46B1   00 00 00 00 00 00 04 06 4A 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 03	Wizard&lt;br /&gt;
 0xE2AB  0B6B:46CB   00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 04	Ragnar&lt;br /&gt;
&lt;br /&gt;
The byte positions are the same of [[HeroQuest Savegame Format]]. Load and save operations read and write at these addreses.&lt;br /&gt;
&lt;br /&gt;
When initializing the heroes the default values are resetted by the function 01EF:78D3 that resets all values to zero and Body and Mind points to default&lt;br /&gt;
 0x00DF74 0B6B:4394  08 07 06 04 02    Default Body point values (last one is Ragnar&#039;s)&lt;br /&gt;
 0x0148FB 0B6B:AD1B  02 03 04 06 00    Default Mind point values&lt;br /&gt;
&lt;br /&gt;
Character initialization code:&lt;br /&gt;
 01EF:78D3  8A1E9E40            mov  bl,[409E]              ds:[409E]=0002&lt;br /&gt;
 01EF:78D7  B700                mov  bh,00&lt;br /&gt;
 01EF:78D9  8B879443            mov  ax,[bx+4394]           ds:[4396]=0406&lt;br /&gt;
 01EF:78DD  884406              mov  [si+06],al             ds:[469D]=0406	&amp;lt;-- sets default body points&lt;br /&gt;
 01EF:78E0  8A871BAD            mov  al,[bx-52E5]           ds:[FFFFAD1D]=EC8B&lt;br /&gt;
 01EF:78E4  884407              mov  [si+07],al             ds:[469E]=3804	&amp;lt;-- sets default mind points&lt;br /&gt;
 01EF:78E7  C6440E00            mov  byte [si+0E],00        ds:[46A5]=0000	&amp;lt;-- resets Owned weapon&lt;br /&gt;
 01EF:78EB  C6440F00            mov  byte [si+0F],00        ds:[46A6]=0000	&amp;lt;-- resets Owned armour&lt;br /&gt;
 01EF:78EF  C6440D00            mov  byte [si+0D],00        ds:[46A4]=0000	&amp;lt;-- resets Owned special items &lt;br /&gt;
 01EF:78F3  C744090000          mov  word [si+09],0000      ds:[46A0]=000A	&amp;lt;-- resets GOLD&lt;br /&gt;
 01EF:78F8  C6441100            mov  byte [si+11],00        ds:[46A8]=0000	&amp;lt;-- resets Equipped weapon&lt;br /&gt;
 01EF:78FC  C6441200            mov  byte [si+12],00        ds:[46A9]=0000	&amp;lt;-- resets Equipped special item&lt;br /&gt;
 01EF:7900  C6441300            mov  byte [si+13],00        ds:[46AA]=0200	&amp;lt;-- resets Equipped armour&lt;br /&gt;
 01EF:7904  885C19              mov  [si+19],bl             ds:[46B0]=0002	&amp;lt;-- refresh hero&#039;s ID&lt;br /&gt;
 01EF:7907  803E9E4001          cmp  byte [409E],01         ds:[409E]=0002	&amp;lt;-- if dwarf&lt;br /&gt;
 01EF:790C  7504                jne  00007912 ($+4)         (down)&lt;br /&gt;
 01EF:790E  804C0E80            or   byte [si+0E],80        ds:[46A5]=0000	&amp;lt;-- gives him the toolkit&lt;br /&gt;
 01EF:7912  BB0800              mov  bx,0008					&amp;lt;-- &amp;quot;The character is renewed&amp;quot; string&lt;br /&gt;
 01EF:7915  E8D50F              call 000088ED ($+fd5)				&amp;lt;-- draws the scroll&lt;br /&gt;
&lt;br /&gt;
== Searched room table ==&lt;br /&gt;
&lt;br /&gt;
The game keeps track of the &#039;&#039;searched&#039;&#039; room by storing the value FF into two tables (treasure and traps searches) using the room number as relative offset (&#039;&#039;bx&#039;&#039;).&amp;lt;br&amp;gt;&lt;br /&gt;
Room numbers go from 00 to 2A so each table is 2B bytes long and every byte of the table is set to 00 at the beginnng of the quest.&amp;lt;br&amp;gt;&lt;br /&gt;
The code that puts FF into the table:&amp;lt;br&amp;gt;&lt;br /&gt;
 mov byte ptr [bx+4B70h], 0FFh    [0B6B:4B70] starting address of TREASURE search&lt;br /&gt;
 mov byte ptr [bx+4B9Bh], 0FFh    [0B6B:4B9B] starting address of TRAPS/SECRET PASSAGES search&lt;br /&gt;
NOTE: upon starting a quest, every Special event ID is put into these tables replacing the 00.&lt;br /&gt;
&lt;br /&gt;
== Equipment screen ==&lt;br /&gt;
With &#039;&#039;position on screen&#039;&#039; is intended the string header 11XXYY&lt;br /&gt;
&lt;br /&gt;
 0x014863 Hero&#039;s classes label (ie. Barbarian) position on screen&lt;br /&gt;
 0x00DF2B pointers block to default Hero&#039;s classes (5 pointers)&lt;br /&gt;
 0x00DF35 default Hero&#039;s classes labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x014873 Hero&#039;s name label (ie. Sigmar) position on screen&lt;br /&gt;
 0x00E1B7 pointers block to default Hero&#039;s names&lt;br /&gt;
 0x00E1C5 default Hero&#039;s names labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x0141A4 first epilogue panel text (its pointer &#039;&#039;&#039;A5C4&#039;&#039;&#039; is written inside the code at offset 0x0649)&lt;br /&gt;
 0x0143A2 second epilogue panel text (its pointer &#039;&#039;&#039;A7C2&#039;&#039;&#039; is written inside the code at offset 0x0658)&lt;br /&gt;
&lt;br /&gt;
 0x0147F7 actual gear prices (hexadecimal) -  4x12 = 30 Bytes (2 bytes for equipment bit mask and 2 bytes for default price, little endian)&lt;br /&gt;
 0x01482B pointers block to single gear costs - 2xC = 18 Bytes&lt;br /&gt;
 0x014843 price (in decimal) labels - 1F Bytes&lt;br /&gt;
&lt;br /&gt;
 0x01486F &amp;quot;GOLD&amp;quot; label position on screen&lt;br /&gt;
 0x014867 gold amount position on screen (default is 0000)&lt;br /&gt;
 0x014877 equipment names position on screen&lt;br /&gt;
 0x01487B pointers block to the pointers in [language].bin where the item names are - 0x18 Bytes&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
Every WORD offsets are hexadecimal, little endian values.&lt;br /&gt;
&lt;br /&gt;
 0x00CDF3: Game font (2F0h bytes long). 8x8 - 94 chars, can be edited with Nyerguds&#039; Westwood font editor.&lt;br /&gt;
&lt;br /&gt;
 0x00DCB5: Sequence of 20 bytes (4 groups of 5 bytes) with facing codes of the heroe&#039;s sprites in the 4 directions (S-E-W-N).&lt;br /&gt;
 0x00DCC9: 4 words for sprite direction codification FF00=South ecc..&lt;br /&gt;
 0x00DF95: Sequence of 11 groups of 4 bytes used for teleportation in &amp;quot;castle of mistery&amp;quot; quest (Room, X, Y, door direction that could be 00,01,1A)&lt;br /&gt;
 0x00DFDC: Sequence of 21 groups of 3 words used to define furniture (first word: X,Y dimension of the frame - second word: Y,X offset in pixels from the origin tile - third word: offset of the frame in FURN.VGA)&lt;br /&gt;
 0x00E05B: Group of 4 offsets for the walls graphics in graphics.vga (2 wariations of the left wall and 2 of the right wall).&lt;br /&gt;
 0x00E062: 26 bytes (00 or 01) used for wall variations based on ROOM tile position number (see diamond scheme above). Basically each position has its own fixed wall texture that is displayed only if a wall is present.&lt;br /&gt;
 0x00E3E6: List of 28 (1Ch) Groups of 5 bytes each representing Movement (BYTE), Attack (BYTE), Defense (BYTE) and Death special event offset (WORD) of each monster (00-1B).&lt;br /&gt;
 0x00E8E8: 32 pointers (words) to the monster profiles in game.&lt;br /&gt;
 0x00E92A: Monster&#039;s profiles location. Monsters are numbered in-game from 00 to 20h (maximum) and profiles (10 bytes) are stored starting from here (0x4D4A in memory).&lt;br /&gt;
 0x00ED28: Sequence of 256 BYTES used as index for drawing the 2D map walls, listing all possible states of wall and doors (values from 00 to FF that refer to the graphic slot IDs inside MAPS.VGA).&lt;br /&gt;
 0x00F64F: List of 12 pointers to magic spells specific routines into code segment.&lt;br /&gt;
 0x00F669: List of 30 pointers to special events specific routines into code segment.&lt;br /&gt;
 0x00F6A5: List of 30 pointers to monster&#039;s profiles location in memory (each pointer is 1A from the other).&lt;br /&gt;
 0x00F703: VGA Palette - 300h bytes as RGB 256 colours&lt;br /&gt;
 0x00FB9D: Position on screen of the object&#039;s name in 2D map (monsters, furniture, heroes etc...) &lt;br /&gt;
&lt;br /&gt;
 0x013CDD: List of 31 (words) offsets of the HEROES frame animation (attack, defense, death) in MEN.VGA&lt;br /&gt;
 0x013D1B: List of 31 (words) frame dimensions (X,Y) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D59: List of 31 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D97: List of 8 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the monster animation frames in MONSTERS.VGA&lt;br /&gt;
 0x014125: Sequence of 42 offsets (84 bytes) to the tile graphic of the rooms and corridors of isometric map (01-13 points all to 1F80, the tile for the corridors)&lt;br /&gt;
 0x014179: Sequence of 2A bytes that are indexes of the tile graphic of the rooms and corridors of 2D map (01-13 are all 01, the index tile for the corridors)&lt;br /&gt;
&lt;br /&gt;
 0x014920: position on screen of a bar filled with 20h char used to delete the equipment names while moving the mouse over the icons&lt;br /&gt;
 0x014924: Text colour (1F is white)&lt;br /&gt;
 0x014925: Background colour (14 is transparent)&lt;br /&gt;
 0x014943: equipment names position on screen during a quest (the subsequent 28 zeroes are the placeholder)&lt;br /&gt;
&lt;br /&gt;
 0x014A42: Sequence of 7 pointers in language.bin of the potion effect texts&lt;br /&gt;
 0x00E472: Sequence of 5 pointers in language.bin of the potion finding texts (all but holy water and heroic brew, that has direct pointers inside the code)&lt;br /&gt;
 0x00E4FE: Sequence of 1Ch pointers in language.bin of the monsters names (2D map)&lt;br /&gt;
 0x00E536: Sequence of 30h index in maps.vga that assign names of the object (01=fallen rock, 00=all traps or hidden objects with no name, 03=Stairs) in OBJECT BLOCK order.&lt;br /&gt;
 0x00E566: 23h bitmasks that define which object is passable by projectiles&lt;br /&gt;
 0x00EE2D: Offsets (12) sequence of object icons in maps.vga (from ID 30 to 3B, 00D1 = fallen rock)&lt;br /&gt;
 0x00EE45: Offsets sequence of monster&#039;s icons in maps.vga (ID 00 = 40D3 = goblin)&lt;br /&gt;
&lt;br /&gt;
== Intro Sequence ==&lt;br /&gt;
Every text panel of the intro resides into &#039;&#039;&#039;INTRO.EXE&#039;&#039;&#039; and they&#039;re in English only.&amp;lt;br&amp;gt;&lt;br /&gt;
In order to translate them (or change the lenght of the text) you have to uncompress the exe first, then Locate every pointers of each panel.&amp;lt;br&amp;gt;&lt;br /&gt;
The data segment inside the exe starts at &#039;&#039;&#039;0x01C0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Panel # !! default pointer value !! pointer exe offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0603 || 0x0212&lt;br /&gt;
|-&lt;br /&gt;
| 2 || F203 || 0x0214&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 9B04 || 0x0216&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 8706 || 0x0218&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 7008 || 0x021A&lt;br /&gt;
|-&lt;br /&gt;
| 6 || CA0A || 0x021C&lt;br /&gt;
|}&lt;br /&gt;
The panels layout follows the same rules described under [[HeroQuest Strings Format]]&lt;br /&gt;
&lt;br /&gt;
 0x001675 Game font, this is the exact copy of the font in quest.exe (See various offests section above).&lt;br /&gt;
&lt;br /&gt;
= Protection screen =&lt;br /&gt;
to restore shield protection in UNCOMPRESSED QUEST.EXE modify&lt;br /&gt;
 offset 0x0541 from 90 90 90	to E8 DC FE		(if you modify these bytes only the shield screen stays and regardless of page entered the game starts anyway)&lt;br /&gt;
 offset 0x0549 from EB		to 74&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12863</id>
		<title>HeroQuest EXE File</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12863"/>
		<updated>2026-06-26T12:51:42Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Various */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original exe is compressed with EXEPACKER, you must decompress with UNP to manipulate it.&lt;br /&gt;
&lt;br /&gt;
{{Executable Infobox&lt;br /&gt;
 | Interpreted = N&lt;br /&gt;
 | Platform = MS-DOS&lt;br /&gt;
 | Code = 16-bit x86&lt;br /&gt;
 | Games = {{Game|HeroQuest}}&lt;br /&gt;
  Memory information:&#039;&#039;&#039;&amp;lt;br&amp;gt;Code segment = 01EF&amp;lt;br&amp;gt;Data segment = 0B6B&amp;lt;br&amp;gt;Stack segment = 25F2&#039;&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= [CODE SEGMENT] Main Routines =&lt;br /&gt;
These are the main routines of the game, disassembled with DOSBOX debugger and annotated.&lt;br /&gt;
&lt;br /&gt;
== in-game main loop ==&lt;br /&gt;
 01EF:0413  E8E65F              call 000063FC ($+5fe6)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0416  E8FA5F              call 00006413 ($+5ffa)					&amp;lt;---- Checks left mouse button and everityng under it&lt;br /&gt;
 01EF:0419  C606CC40FF          mov  byte [40CC],FF         ds:[40CC]=DFFF   &lt;br /&gt;
 01EF:041E  F606923920          test byte [3992],20         ds:[3992]=9200		&amp;lt;---- Checks if right mouse button has been pressed&lt;br /&gt;
 01EF:0423  7403                je   00000428 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0425  E82E03              call 00000756 ($+32e)  					&amp;lt;---- ends the turn if right mouse button pressed&lt;br /&gt;
 01EF:0428  E85963              call 00006784 ($+6359) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:042B  E8A202              call 000006D0 ($+2a2)  					&amp;lt;---- ???&lt;br /&gt;
 01EF:042E  E8E564              call 00006916 ($+64e5) 					&amp;lt;---- draws in the correct order heroes and forniture&lt;br /&gt;
 01EF:0431  E84553              call 00005779 ($+5345) 					&amp;lt;---- same as above?&lt;br /&gt;
 01EF:0434  E8DD53              call 00005814 ($+53dd) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:043A  E87B53              call 000057B8 ($+537b) 					&amp;lt;---- draws heroes, monsters, forniture and doors (not the walls)&lt;br /&gt;
 01EF:043D  E8B454              call 000058F4 ($+54b4) 					&amp;lt;---- Checks if orthogonal tiles are walkable and updates the directional arrows&lt;br /&gt;
 01EF:0440  E8A156              call 00005AE4 ($+56a1) 					&amp;lt;---- Checks if monsters are present in the room and updates search icons&lt;br /&gt;
 01EF:0443  E81E60              call 00006464 ($+601e) 					&amp;lt;---- activates attack, magic, treasure, traps icons&lt;br /&gt;
 01EF:0446  E8CF60              call 00006518 ($+60cf) 					&amp;lt;---- draws yellow figures on top left&lt;br /&gt;
 01EF:0449  E8C859              call 00005E14 ($+59c8)					&amp;lt;---- draws glove mouse pointer&lt;br /&gt;
 01EF:044C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000   &lt;br /&gt;
 01EF:0451  7503                jne  00000456 ($+3)         (down)           &lt;br /&gt;
 01EF:0453  E88E5C              call 000060E4 ($+5c8e)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0456  E87E59              call 00005DD7 ($+597e)					&amp;lt;---- Clean the previous mouse sprite&lt;br /&gt;
 01EF:0459  E85954              call 000058B5 ($+5459)					&amp;lt;---- Clean the previous hero sprite&lt;br /&gt;
 01EF:045C  E82100              call 00000480 ($+21)					&amp;lt;---- Quest event checks&lt;br /&gt;
 01EF:045F  E8EC13              call 0000184E ($+13ec)					&amp;lt;---- Checks if the hero stands on a stair tile&lt;br /&gt;
 01EF:0462  803E973F00          cmp  byte [3F97],00         ds:[3F97]=0000   &lt;br /&gt;
 01EF:0467  7403                je   0000046C ($+3)         (no jmp)         &lt;br /&gt;
 01EF:0469  E8BA00              call 00000526 ($+ba)        				&amp;lt;---- End turn wrap up (resets registers and variables)&lt;br /&gt;
 01EF:046C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000	&lt;br /&gt;
 01EF:0471  7401                je   00000474 ($+1)         (no jmp)	&lt;br /&gt;
 01EF:0473  C3                  ret						&lt;br /&gt;
 01EF:0474  803E923940          cmp  byte [3992],40         ds:[3992]=9200&lt;br /&gt;
 01EF:0479  7503                jne  0000047E ($+3)         (down)&lt;br /&gt;
 01EF:047B  E94FFE              jmp  000002CD ($-1b1)       (up)&lt;br /&gt;
 01EF:047E  EB93                jmp  short 00000413 ($-6d)  (up)				&amp;lt;--- goes back on top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shooting routine ==&lt;br /&gt;
Shooting routine (magic and throwing weapons) is utterly broken in this game.&amp;lt;br&amp;gt;&lt;br /&gt;
The code checks the map tile the projectile is above and determine if the line of sight is blocked or free.&amp;lt;br&amp;gt;&lt;br /&gt;
The way the map is coded resulted in a convoluted code that fails to check LOS.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;You can shoot past walls&#039;&#039;&#039; and always hit the target if the hero stands in contact with one wall and the target is the adjacent room exactly above or exactly to the right.&amp;lt;br&amp;gt;&lt;br /&gt;
You can also hit the target standing in the perfect diagonal like bishop&#039;s movement, and this could happen even if there are no active rooms (solid rock, but marked with 00 like rooms&#039; inner tiles) in between.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;LOS is blocked&#039;&#039;&#039; by parallel unrevealed secret doors and opened doors.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon check:&lt;br /&gt;
 01EF:0AB2  32C0                xor  al,al&lt;br /&gt;
 01EF:0AB4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- di+11 is equipped weapon. checks if it is crossbow?&lt;br /&gt;
 01EF:0AB8  7501                jne  00000ABB ($+1)         (no jmp)&lt;br /&gt;
 01EF:0ABA  C3                  ret&lt;br /&gt;
 01EF:0ABB  B0FD                mov  al,FD					&amp;lt;-- not crossbow&lt;br /&gt;
 01EF:0ABD  C3                  ret&lt;br /&gt;
 01EF:0ABE  807D1101            cmp  byte [di+11],01        ds:[B1A7]=0000	&amp;lt;-- starts here&lt;br /&gt;
 01EF:0ABF  7D11                jge  00000AD2 ($+11)        (down)		&amp;lt;-- jump if greater or equal&lt;br /&gt;
 01EF:0AC1  0174EE              add  [si-12],si             ds:[4DBA]=260D&lt;br /&gt;
 01EF:0AC4  807D1102            cmp  byte [di+11],02        ds:[46A8]=0010	&amp;lt;-- F64511/807D11 are the test/cmp of the equipped weapon&lt;br /&gt;
 01EF:0AC8  74E8                je   00000AB2 ($-18)        (up)&lt;br /&gt;
 01EF:0ACA  807D1140            cmp  byte [di+11],40        ds:[46A8]=0010&lt;br /&gt;
 01EF:0ACE  74E2                je   00000AB2 ($-1e)        (up)&lt;br /&gt;
 01EF:0AD0  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AD2  EBE0                jmp  short 00000AB4 ($-20)  (up)&lt;br /&gt;
 01EF:0AD4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- crossbow&lt;br /&gt;
 01EF:0AD8  750F                jne  00000AE9 ($+f)         (no jmp)&lt;br /&gt;
 01EF:0ADA  F6451120            test byte [di+11],20        ds:[46A8]=0010	&amp;lt;-- throwing axe&lt;br /&gt;
 01EF:0ADE  7509                jne  00000AE9 ($+9)         (no jmp)&lt;br /&gt;
 01EF:0AE0  F6451140            test byte [di+11],40        ds:[46A8]=0010	&amp;lt;-- spear&lt;br /&gt;
 01EF:0AE4  7503                jne  00000AE9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0AE6  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AE8  C3                  ret&lt;br /&gt;
&lt;br /&gt;
SHOOTING ROUTINE STARTS HERE:&lt;br /&gt;
 01EF:0AE9  C606B73F01          mov  byte [3FB7],01         ds:[3FB7]=0301&lt;br /&gt;
 01EF:0AEE  E82B00              call 00000B1C ($+2b)&lt;br /&gt;
 01EF:0AF1  32C0                xor  al,al&lt;br /&gt;
 01EF:0AF3  803EA83F01          cmp  byte [3FA8],01         ds:[3FA8]=0001	&amp;lt;-- check if LOS is blocked (1)&lt;br /&gt;
 01EF:0AF8  7401                je   00000AFB ($+1)         (down)&lt;br /&gt;
 01EF:0AFA  C3                  ret&lt;br /&gt;
 01EF:0AFB  B0FE                mov  al,FE&lt;br /&gt;
 01EF:0AFD  C606B73F00          mov  byte [3FB7],00         ds:[3FB7]=0300&lt;br /&gt;
 01EF:0B02  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
 01EF:0B1C  E81F06              call 0000113E ($+61f)&lt;br /&gt;
 01EF:0B1F  A0A83F              mov  al,[3FA8]              ds:[3FA8]=0001&lt;br /&gt;
 01EF:0B22  3401                xor  al,01&lt;br /&gt;
 01EF:0B24  A2B23F              mov  [3FB2],al              ds:[3FB2]=0000&lt;br /&gt;
 01EF:0B27  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Set global variables (shooter and target position/distance):&lt;br /&gt;
 01EF:113E  8B36D43F            mov  si,[3FD4]              ds:[3FD4]=4DC2&lt;br /&gt;
 01EF:1142  8A7C01              mov  bh,[si+01]             ds:[4DC3]=0F0A	&amp;lt;-- Target X &lt;br /&gt;
 01EF:1145  8A5C02              mov  bl,[si+02]             ds:[4DC4]=270F	&amp;lt;-- Target Y&lt;br /&gt;
 01EF:1148  8BCB                mov  cx,bx&lt;br /&gt;
 01EF:114A  8B3E3746            mov  di,[4637]              ds:[4637]=4697&lt;br /&gt;
 01EF:114E  8A7501              mov  dh,[di+01]             ds:[4698]=120A	&amp;lt;-- Hero X &lt;br /&gt;
 01EF:1151  8A5502              mov  dl,[di+02]             ds:[4699]=1212	&amp;lt;-- Hero Y &lt;br /&gt;
 01EF:1154  8836A53F            mov  [3FA5],dh              ds:[3FA5]=0C0C	&amp;lt;-- Hero X saved at 3FA5&lt;br /&gt;
 01EF:1158  8816A63F            mov  [3FA6],dl              ds:[3FA6]=020C	&amp;lt;-- Hero Y saved at 3FA6&lt;br /&gt;
 01EF:115C  C6069F3F00          mov  byte [3F9F],00         ds:[3F9F]=0000	&amp;lt;-- reset projectile temp distance (area used for math)&lt;br /&gt;
 01EF:1161  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0002	&amp;lt;-- reset LOS 0=free, 1=blocked&lt;br /&gt;
 01EF:1166  B7FF                mov  bh,FF&lt;br /&gt;
 01EF:1168  8AC6                mov  al,dh&lt;br /&gt;
 01EF:116A  2AC5                sub  al,ch&lt;br /&gt;
 01EF:116C  7504                jne  00001172 ($+4)         (down)&lt;br /&gt;
 01EF:116E  B700                mov  bh,00					&amp;lt;-- target is on the RIGHT (&amp;gt;)&lt;br /&gt;
 01EF:1170  EB06                jmp  short 00001178 ($+6)   (down)&lt;br /&gt;
 01EF:1172  7304                jnc  00001178 ($+4)         (down)&lt;br /&gt;
 01EF:1174  F6D8                neg  al&lt;br /&gt;
 01EF:1176  B701                mov  bh,01					&amp;lt;-- target is on the LEFT (&amp;lt;)&lt;br /&gt;
 01EF:1178  A2A13F              mov  [3FA1],al              ds:[3FA1]=0301	&amp;lt;-- horizontal distance shooter-target saved at 3FA1&lt;br /&gt;
 01EF:117B  8AE8                mov  ch,al&lt;br /&gt;
 01EF:117D  B3FF                mov  bl,FF&lt;br /&gt;
 01EF:117F  8AC2                mov  al,dl&lt;br /&gt;
 01EF:1181  2AC1                sub  al,cl&lt;br /&gt;
 01EF:1183  7504                jne  00001189 ($+4)         (down)&lt;br /&gt;
 01EF:1185  B300                mov  bl,00					&amp;lt;-- target is UNDER (v)&lt;br /&gt;
 01EF:1187  EB06                jmp  short 0000118F ($+6)   (down)&lt;br /&gt;
 01EF:1189  7304                jnc  0000118F ($+4)         (down)&lt;br /&gt;
 01EF:118B  F6D8                neg  al&lt;br /&gt;
 01EF:118D  B301                mov  bl,01					&amp;lt;-- target is ABOVE (^)&lt;br /&gt;
 01EF:118F  A2A23F              mov  [3FA2],al              ds:[3FA2]=0003	&amp;lt;-- vertical distance shooter-target saved at 3FA2&lt;br /&gt;
 01EF:1192  3AC5                cmp  al,ch&lt;br /&gt;
 01EF:1194  7240                jc   000011D6 ($+40)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
bx (bh+bl) registry status based on target/shooter position:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| 0101 || 0001 || FF01&lt;br /&gt;
|-&lt;br /&gt;
| 0100 || TRGT || FF00&lt;br /&gt;
|-&lt;br /&gt;
| 01FF || 00FF || FFFF&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
VERTICAL shooting routine:&lt;br /&gt;
 01EF:1196  8ACD                mov  cl,ch&lt;br /&gt;
 01EF:1198  8AE8                mov  ch,al&lt;br /&gt;
 01EF:119A  8AD0                mov  dl,al&lt;br /&gt;
 01EF:119C  000E9F3F            add  [3F9F],cl              ds:[3F9F]=0000	&amp;lt;-- update projectile travelled distance&lt;br /&gt;
 01EF:11A0  38169F3F            cmp  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11A4  7208                jc   000011AE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11A6  28169F3F            sub  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11AA  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F0D	&amp;lt;-- Temp Projectile X (d 0:F655)&lt;br /&gt;
 01EF:11AE  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y (d 0:F656)&lt;br /&gt;
 01EF:11B2  C706E9370000        mov  word [37E9],0000       ds:[37E9]=D238	&amp;lt;-- set Vertical flag&lt;br /&gt;
 01EF:11B8  882EEB37            mov  [37EB],ch              ds:[37EB]=F1E0	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11BC  80FD01              cmp  ch,01&lt;br /&gt;
 01EF:11BF  7505                jne  000011C6 ($+5)         (down)&lt;br /&gt;
 01EF:11C1  80FBFF              cmp  bl,FF&lt;br /&gt;
 01EF:11C4  7403                je   000011C9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:11C6  E84B00              call 00001214 ($+4b)&lt;br /&gt;
 01EF:11C9  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:11CE  7401                je   000011D1 ($+1)         (no jmp)&lt;br /&gt;
 01EF:11D0  C3                  ret&lt;br /&gt;
 01EF:11D1  FECD                dec  ch&lt;br /&gt;
 01EF:11D3  75C7                jne  0000119C ($-39)        (up)&lt;br /&gt;
 01EF:11D5  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
HORIZONTAL shooting routine:&lt;br /&gt;
 01EF:11D6  8AD0                mov  dl,al				&lt;br /&gt;
 01EF:11D8  8ACD                mov  cl,ch		&amp;lt;-- it moves ch in cl&lt;br /&gt;
 01EF:11DA  32ED                xor  ch,ch		&amp;lt;-- and puts to 00 ch because uses loop (thus cx) instead of dec ch of vertical routine&lt;br /&gt;
 01EF:11DC  00169F3F            add  [3F9F],dl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E0  380E9F3F            cmp  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E4  7208                jc   000011EE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11E6  280E9F3F            sub  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11EA  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y&lt;br /&gt;
 01EF:11EE  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F03	&amp;lt;-- Temp Projectile X&lt;br /&gt;
 01EF:11F2  C706E9370100        mov  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- set Horizontal flag&lt;br /&gt;
 01EF:11F8  880EEB37            mov  [37EB],cl              ds:[37EB]=AA04	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11FC  80F901              cmp  cl,01&lt;br /&gt;
 01EF:11FF  7505                jne  00001206 ($+5)         (down)&lt;br /&gt;
 01EF:1201  80FFFF              cmp  bh,FF&lt;br /&gt;
 01EF:1204  7403                je   00001209 ($+3)         (no jmp)&lt;br /&gt;
 01EF:1206  E80B00              call 00001214 ($+b)&lt;br /&gt;
 01EF:1209  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0001	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:120E  7401                je   00001211 ($+1)         (no jmp)&lt;br /&gt;
 01EF:1210  C3                  ret&lt;br /&gt;
 01EF:1211  E2C9                loop 000011DC ($-37)&lt;br /&gt;
 01EF:1213  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
Collision check routine on current tile IN WALL/DOORS map (ds:566F):&lt;br /&gt;
 01EF:1214  53                  push bx&lt;br /&gt;
 01EF:1215  52                  push dx&lt;br /&gt;
 01EF:1216  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=0839&lt;br /&gt;
 01EF:121A  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=3936&lt;br /&gt;
 01EF:121E  E85D4E              call 0000607E ($+4e5d)&lt;br /&gt;
 01EF:1221  80BF6F5600          cmp  byte [bx+566F],00      ds:[576C]=8128	&amp;lt;-- Check if tile is 00, if true jumps to the Object map check&lt;br /&gt;
 01EF:1226  742A                je   00001252 ($+2a)        (no jmp)			at 0B6B:566F is where WALLS/DOORS map is stored&lt;br /&gt;
 01EF:1228  8A876F56            mov  al,[bx+566F]           ds:[576C]=8128	&amp;lt;-- mov into al the current TILE (28=is north secret door)&lt;br /&gt;
 01EF:122C  833EE93701          cmp  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- 1=H, 0=V check for opened door subroutines&lt;br /&gt;
 01EF:1231  7411                je   00001244 ($+11)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
Vertical shoot subroutine that checks for Horizontal walls/doors:&lt;br /&gt;
 01EF:1233  24AC                and  al,AC 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1235  0AC0                or   al,al					AC= 10101100&lt;br /&gt;
 01EF:1237  7419                je   00001252 ($+19)        (no jmp)&lt;br /&gt;
 01EF:1239  A820                test al,20					&amp;lt;-- if door is Horizontal&lt;br /&gt;
 01EF:123B  7442                je   0000127F ($+42)        (down)&lt;br /&gt;
 01EF:123D  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:123F  743E                je   0000127F ($+3e)        (down)&lt;br /&gt;
 01EF:1241  EB0F                jmp  short 00001252 ($+f)   (down)&lt;br /&gt;
 01EF:1243  90                  nop&lt;br /&gt;
 &lt;br /&gt;
Horizontal shoot subroutine that checks for Vertical walls/doors:&lt;br /&gt;
 01EF:1244  245C                and  al,5C 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1246  0AC0                or   al,al					5C= 01011100&lt;br /&gt;
 01EF:1248  7408                je   00001252 ($+8)         (down)&lt;br /&gt;
 01EF:124A  A810                test al,10					&amp;lt;-- if door is Vertical&lt;br /&gt;
 01EF:124C  7431                je   0000127F ($+31)        (down)&lt;br /&gt;
 01EF:124E  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:1250  742D                je   0000127F ($+2d)        (down)&lt;br /&gt;
&lt;br /&gt;
Collision check routine on current tile IN OBJECTS map (ds:586F):&lt;br /&gt;
 01EF:1252  803EEB3701          cmp  byte [37EB],01         ds:[37EB]=6E03	&amp;lt;-- checks if the projectile is about to hit the target&lt;br /&gt;
 01EF:1257  742B                je   00001284 ($+2b)        (down)&lt;br /&gt;
 01EF:1259  80BF6F5800          cmp  byte [bx+586F],00      ds:[1576F]=3637	&amp;lt;-- checks if the tile is passable (00)&lt;br /&gt;
 01EF:125E  740E                je   0000126E ($+e)         (down)&lt;br /&gt;
 01EF:1260  8A876F58            mov  al,[bx+586F]           ds:[1576F]=3637	&amp;lt;-- ds:586F is where OBJECTS map is stored&lt;br /&gt;
 01EF:1264  BB4649              mov  bx,4946					&amp;lt;-- ds:4946 check &lt;br /&gt;
 01EF:1267  D7                  xlat&lt;br /&gt;
 01EF:1268  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:126B  EB17                jmp  short 00001284 ($+17)  (down)&lt;br /&gt;
 01EF:126D  90                  nop&lt;br /&gt;
 01EF:126E  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=004D&lt;br /&gt;
 01EF:1272  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=4D4D&lt;br /&gt;
 01EF:1276  E80E00              call 00001287 ($+e)&lt;br /&gt;
 01EF:1279  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:127C  EB06                jmp  short 00001284 ($+6)   (down)&lt;br /&gt;
 01EF:127E  90                  nop&lt;br /&gt;
 01EF:127F  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=BA6B	&amp;lt;-- sets LOS as blocked (1) and exits&lt;br /&gt;
 01EF:1284  5A                  pop  dx&lt;br /&gt;
 01EF:1285  5B                  pop  bx&lt;br /&gt;
 01EF:1286  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Updates with random numbers the first three bytes of heroes&#039; equipment every movement (presumably used as seed for RNG):&lt;br /&gt;
 01EF:1287  51                  push cx&lt;br /&gt;
 01EF:1288  57                  push di&lt;br /&gt;
 01EF:1289  B90500              mov  cx,0005&lt;br /&gt;
 01EF:128C  BF6346              mov  di,4663	&amp;lt;-- first byte of Barbarian equipment in memory&lt;br /&gt;
 01EF:128F  33C0                xor  ax,ax&lt;br /&gt;
 01EF:1291  803D00              cmp  byte [di],00           ds:[6CAA]=0000&lt;br /&gt;
 01EF:1294  740C                je   000012A2 ($+c)         (down)&lt;br /&gt;
 01EF:1296  385501              cmp  [di+01],dl             ds:[6CAB]=0000&lt;br /&gt;
 01EF:1299  7507                jne  000012A2 ($+7)         (no jmp)&lt;br /&gt;
 01EF:129B  387502              cmp  [di+02],dh             ds:[6CAC]=0000&lt;br /&gt;
 01EF:129E  7502                jne  000012A2 ($+2)         (no jmp)&lt;br /&gt;
 01EF:12A0  B001                mov  al,01&lt;br /&gt;
 01EF:12A2  83C71A              add  di,001A	&amp;lt;-- jumps to the following hero&#039;s equipment&lt;br /&gt;
 01EF:12A5  E2EA                loop 00001291 ($-16)&lt;br /&gt;
 01EF:12A7  5F                  pop  di&lt;br /&gt;
 01EF:12A8  59                  pop  cx&lt;br /&gt;
 01EF:12A9  C3                  ret&lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh&lt;br /&gt;
 01EF:6080  B700                mov  bh,00&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5					&amp;lt;-- ds:5AC5 check &lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[FF00]=3737&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New shooting routine ===&lt;br /&gt;
Finally I came up with a proper line of sight mechanism that cover roughly 99% of the &amp;quot;impossible shots&amp;quot;. There will always be a particular combiantion of monster-door-hero position that can lead to an &amp;quot;improbable shot&amp;quot;, but that&#039;s it.  &lt;br /&gt;
&lt;br /&gt;
Direction choice routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1198:  88 D0             mov  al, dl&lt;br /&gt;
 1ef:119a:  88 CC             mov  ah, cl&lt;br /&gt;
 1ef:119c:  05 01 01          add  ax, 0x101&lt;br /&gt;
 1ef:119f:  D0 E8             shr  al, 1&lt;br /&gt;
 1ef:11a1:  D0 EC             shr  ah, 1&lt;br /&gt;
 1ef:11a3:  A3 AA 3F          mov  word ptr [0x3faa], ax        &amp;lt;-- save half distance of X and Y&lt;br /&gt;
 &lt;br /&gt;
 1ef:11a6:  30 C0             xor  al, al                    &amp;lt;-- direction choice routine&lt;br /&gt;
 1ef:11a8:  3A 0E AB 3F       cmp  cl, byte ptr [0x3fab]        &amp;lt;-- check if X distance reached it&#039;s half&lt;br /&gt;
 1ef:11ac:  74 13             je   0x11c1                    &amp;lt;-- if YES reset X half value and change direction&lt;br /&gt;
 1ef:11ae:  3A 16 AA 3F       cmp  dl, byte ptr [0x3faa]        &amp;lt;-- check if Y distance reached it&#039;s half&lt;br /&gt;
 1ef:11b2:  74 06             je   0x11ba                    &amp;lt;-- if YES reset Y half value and change direction&lt;br /&gt;
 1ef:11b4:  38 CA             cmp  dl, cl&lt;br /&gt;
 1ef:11b6:  7C 2B             jl   0x11e3&lt;br /&gt;
 1ef:11b8:  EB 0C             jmp  0x11c6&lt;br /&gt;
 1ef:11ba:  C6 06 AA 3F 00    mov  byte ptr [0x3faa], 0&lt;br /&gt;
 1ef:11bf:  EB 22             jmp  0x11e3&lt;br /&gt;
 1ef:11c1:  C6 06 AB 3F 00    mov  byte ptr [0x3fab], 0&lt;br /&gt;
&lt;br /&gt;
Vertical&lt;br /&gt;
 1ef:11c6:  84 D2             test dl, dl                    &amp;lt;-- vertical routine&lt;br /&gt;
 1ef:11c8:  74 19             je   0x11e3                    &amp;lt;-- if Y distance is zero go to horizontal routine&lt;br /&gt;
 1ef:11ca:  00 1E A6 3F       add  byte ptr [0x3fa6], bl&lt;br /&gt;
 1ef:11ce:  B8 00 00          mov  ax, 0&lt;br /&gt;
 1ef:11d1:  80 FB FF          cmp  bl, 0xff&lt;br /&gt;
 1ef:11d4:  75 02             jne  0x11d8&lt;br /&gt;
 1ef:11d6:  B4 1A             mov  ah, 0x1a&lt;br /&gt;
 1ef:11d8:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11db:  FE CA             dec  dl&lt;br /&gt;
 1ef:11dd:  88 16 EB 37       mov  byte ptr [0x37eb], dl&lt;br /&gt;
 1ef:11e1:  EB 1B             jmp  0x11fe&lt;br /&gt;
 &lt;br /&gt;
Horizontal&lt;br /&gt;
 1ef:11e3:  84 C9             test cl, cl                    &amp;lt;-- horizontal routine&lt;br /&gt;
 1ef:11e5:  74 DF             je   0x11c6                    &amp;lt;-- if X distance is zero go to vertical routine&lt;br /&gt;
 1ef:11e7:  00 3E A5 3F       add  byte ptr [0x3fa5], bh&lt;br /&gt;
 1ef:11eb:  B8 01 00          mov  ax, 1&lt;br /&gt;
 1ef:11ee:  80 FF FF          cmp  bh, 0xff&lt;br /&gt;
 1ef:11f1:  75 02             jne  0x11f5&lt;br /&gt;
 1ef:11f3:  B4 01             mov  ah, 1&lt;br /&gt;
 1ef:11f5:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11f8:  FE C9             dec  cl&lt;br /&gt;
 1ef:11fa:  88 0E EB 37       mov  byte ptr [0x37eb], cl&lt;br /&gt;
 &lt;br /&gt;
 1ef:11fe:  E8 13 00          call 0x1214                    &amp;lt;-- calls wall/object collision check routine&lt;br /&gt;
 1ef:1201:  80 3E A8 3F 00    cmp  byte ptr [0x3fa8], 0      &amp;lt;-- collision flag&lt;br /&gt;
 1ef:1206:  74 01             je   0x1209   &lt;br /&gt;
 1ef:1208:  C3                ret                            &amp;lt;-- else object or wall was HIT&lt;br /&gt;
 1ef:1209:  88 C8             mov  al, cl&lt;br /&gt;
 1ef:120b:  00 D0             add  al, dl                    &amp;lt;-- if X+Y distance is not zero&lt;br /&gt;
 1ef:120d:  75 97             jne  0x11a6                    &amp;lt;-- back to direction choice routine&lt;br /&gt;
 1ef:120f:  C3                ret                            &amp;lt;-- else target was HIT&lt;br /&gt;
 1ef:1210:  90                nop  &lt;br /&gt;
 1ef:1211:  90                nop  &lt;br /&gt;
 1ef:1212:  90                nop  &lt;br /&gt;
 1ef:1213:  90                nop&lt;br /&gt;
 &lt;br /&gt;
Wall/object collision check routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1214:  53                push bx&lt;br /&gt;
 1ef:1215:  52                push dx&lt;br /&gt;
 1ef:1216:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]&lt;br /&gt;
 1ef:121a:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:121e:  E8 5D 4E          call 0x607e&lt;br /&gt;
 1ef:1221:  A0 EA 37          mov  al, byte ptr [0x37ea]&lt;br /&gt;
 1ef:1224:  30 E4             xor  ah, ah&lt;br /&gt;
 1ef:1226:  01 C3             add  bx, ax&lt;br /&gt;
 1ef:1228:  8A 87 6F 56       mov  al, byte ptr [bx + 0x566f]    &amp;lt;-- checks if the tile is free (00) or occupied (30=rock)&lt;br /&gt;
 1ef:122c:  3C 00             cmp  al, 0&lt;br /&gt;
 1ef:122e:  74 21             je   0x1251                        &amp;lt;-- if occupied jump to specific object check&lt;br /&gt;
 1ef:1230:  80 3E E9 37 01    cmp  byte ptr [0x37e9], 1&lt;br /&gt;
 1ef:1235:  74 0C             je   0x1243&lt;br /&gt;
 1ef:1237:  A8 20             test al, 0x20                        &amp;lt;-- Horizontal Door check&lt;br /&gt;
 1ef:1239:  75 12             jne  0x124d&lt;br /&gt;
 1ef:123b:  A8 80             test al, 0x80                        &amp;lt;-- Horizontal Wall check&lt;br /&gt;
 1ef:123d:  74 12             je   0x1251&lt;br /&gt;
 1ef:123f:  EB 3E             jmp  0x127f&lt;br /&gt;
 1ef:1241:  90                nop  &lt;br /&gt;
 1ef:1242:  90                nop  &lt;br /&gt;
 &lt;br /&gt;
 1ef:1243:  A8 10             test al, 0x10                        &amp;lt;-- Vertical Door check&lt;br /&gt;
 1ef:1245:  75 06             jne  0x124d&lt;br /&gt;
 1ef:1247:  A8 40             test al, 0x40                        &amp;lt;-- Vertical Wall check&lt;br /&gt;
 1ef:1249:  74 06             je   0x1251&lt;br /&gt;
 1ef:124b:  EB 32             jmp  0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:124d:  A8 04             test al, 4                            &amp;lt;-- opened door check&lt;br /&gt;
 1ef:124f:  74 2E             je   0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:1251:  8A 87 6F 58       mov  al, byte ptr [bx + 0x586f]    &amp;lt;-- specific object check&lt;br /&gt;
 1ef:1255:  BB 86 49          mov  bx, 0x4986                    &amp;lt;-- bitmask table where object properties are stored&lt;br /&gt;
 1ef:1258:  51                push cx&lt;br /&gt;
 1ef:1259:  88 C1             mov  cl, al&lt;br /&gt;
 1ef:125b:  C0 E9 03          shr  cl, 3&lt;br /&gt;
 1ef:125e:  01 CB             add  bx, cx&lt;br /&gt;
 1ef:1260:  59                pop  cx&lt;br /&gt;
 1ef:1261:  24 07             and  al, 7&lt;br /&gt;
 1ef:1263:  0F A3 07          bt   word ptr [bx], ax                &amp;lt;-- verify if the object is passable (ie. table) or not (ie. fireplace)&lt;br /&gt;
 1ef:1266:  72 17             jb   0x127f&lt;br /&gt;
 1ef:1268:  80 3E EB 37 00    cmp  byte ptr [0x37eb], 0            &amp;lt;-- checks if the projectile hit the target&lt;br /&gt;
 1ef:126d:  74 15             je   0x1284&lt;br /&gt;
 1ef:126f:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]            &amp;lt;-- update projectile&#039;s X and Y&lt;br /&gt;
 1ef:1273:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:1277:  E8 0D 00          call 0x1287&lt;br /&gt;
 1ef:127a:  A2 A8 3F          mov  byte ptr [0x3fa8], al&lt;br /&gt;
 1ef:127d:  EB 05             jmp  0x1284&lt;br /&gt;
 1ef:127f:  C6 06 A8 3F 01    mov  byte ptr [0x3fa8], 1&lt;br /&gt;
 1ef:1284:  5A                pop  dx&lt;br /&gt;
 1ef:1285:  5B                pop  bx&lt;br /&gt;
 1ef:1286:  C3                ret&lt;br /&gt;
&lt;br /&gt;
== Monster attack routine ==&lt;br /&gt;
This first block defines the target priority: barbarian - dwarf - elf - wizard - ragnar&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to revers it forcing the monster to chose the weaker hero first reversing the logic by starting from ragnar profile and then jump backward subtracting 1A.&amp;lt;br&amp;gt;&lt;br /&gt;
See [[#Heroes&#039; default profiles|Heroes&#039; default profiles]] for reference.&lt;br /&gt;
&lt;br /&gt;
 01EF:2257  BE6346              mov  si,4663					&amp;lt;-- starting profile offset 4663=barbarian&lt;br /&gt;
 01EF:225A  B90500              mov  cx,0005					&amp;lt;-- loop repeats 5 times &lt;br /&gt;
 01EF:225D  51                  push cx&lt;br /&gt;
 01EF:225E  8936D63F            mov  [3FD6],si              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2262  8A4419              mov  al,[si+19]             ds:[46CA]=0003	&amp;lt;-- jumps to hero&#039;s ID position&lt;br /&gt;
 01EF:2265  A2BC3F              mov  [3FBC],al              ds:[3FBC]=0003&lt;br /&gt;
 01EF:2268  E85800              call 000022C3 ($+58)&lt;br /&gt;
 01EF:226B  59                  pop  cx&lt;br /&gt;
 01EF:226C  8B36D63F            mov  si,[3FD6]              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2270  83C61A              add  si,001A					&amp;lt;-- jumps to the next profile&lt;br /&gt;
 01EF:2273  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2278  7503                jne  0000227D ($+3)         (down)&lt;br /&gt;
 01EF:227A  E95102              jmp  000024CE ($+251)       (down)&lt;br /&gt;
 01EF:227D  803EA83F03          cmp  byte [3FA8],03         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2282  7503                jne  00002287 ($+3)         (down)&lt;br /&gt;
 01EF:2284  E94702              jmp  000024CE ($+247)       (down)&lt;br /&gt;
 01EF:2287  E2D4                loop 0000225D ($-2c)&lt;br /&gt;
 01EF:2289  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 01EF:22C3  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000&lt;br /&gt;
 01EF:22C8  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:22CB  7503                jne  000022D0 ($+3)         (no jmp)&lt;br /&gt;
 01EF:22CD  E98101              jmp  00002451 ($+181)       (down)&lt;br /&gt;
 01EF:22D0  8A4403              mov  al,[si+03]             ds:[4666]=C726	&amp;lt;-- hero&#039;s room&lt;br /&gt;
 01EF:22D3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room&lt;br /&gt;
 01EF:22D6  7403                je   000022DB ($+3)         (down)&lt;br /&gt;
 01EF:22D8  E97601              jmp  00002451 ($+176)       (down)&lt;br /&gt;
 01EF:22DB  F6441801            test byte [si+18],01        ds:[467B]=0000&lt;br /&gt;
 01EF:22DF  7403                je   000022E4 ($+3)         (down)&lt;br /&gt;
 01EF:22E1  E96D01              jmp  00002451 ($+16d)       (down)&lt;br /&gt;
 01EF:22E4  8B5401              mov  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:22E7  52                  push dx&lt;br /&gt;
 01EF:22E8  57                  push di&lt;br /&gt;
 01EF:22E9  E864F7              call 00001A50 ($-89c)&lt;br /&gt;
 01EF:22EC  5F                  pop  di&lt;br /&gt;
 01EF:22ED  57                  push di&lt;br /&gt;
 01EF:22EE  E84E02              call 0000253F ($+24e)&lt;br /&gt;
 01EF:22F1  E8F03D              call 000060E4 ($+3df0)&lt;br /&gt;
 01EF:22F4  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:22F7  E88D23              call 00004687 ($+238d)&lt;br /&gt;
 01EF:22FA  5F                  pop  di&lt;br /&gt;
 01EF:22FB  5A                  pop  dx&lt;br /&gt;
 01EF:22FC  8816A53F            mov  [3FA5],dl              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2300  8836A63F            mov  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2304  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:2307  891ECA40            mov  [40CA],bx              ds:[40CA]=40A2&lt;br /&gt;
 01EF:230B  E8703D              call 0000607E ($+3d70)			&amp;lt;-- 	if jumped the monster doesn&#039;t attack when in contact&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:230E  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2312  8A07                mov  al,[bx]                ds:[3F28]=4040		&lt;br /&gt;
 01EF:2314  243F                and  al,3F				&lt;br /&gt;
 01EF:2316  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room check. if removed the monster attack through walls and doors&lt;br /&gt;
 01EF:2319  7403                je   0000231E ($+3)         (down)&lt;br /&gt;
 01EF:231B  E93301              jmp  00002451 ($+133)       (down)&lt;br /&gt;
 01EF:231E  B501                mov  ch,01&lt;br /&gt;
 01EF:2320  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2323  2A4501              sub  al,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2326  7504                jne  0000232C ($+4)         (no jmp)&lt;br /&gt;
 01EF:2328  B500                mov  ch,00&lt;br /&gt;
 01EF:232A  EB08                jmp  short 00002334 ($+8)   (down)&lt;br /&gt;
 01EF:232C  3C80                cmp  al,80&lt;br /&gt;
 01EF:232E  7204                jc   00002334 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2330  F6D8                neg  al&lt;br /&gt;
 01EF:2332  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2334  A2A13F              mov  [3FA1],al              ds:[3FA1]=0100&lt;br /&gt;
 01EF:2337  882EA33F            mov  [3FA3],ch              ds:[3FA3]=0100&lt;br /&gt;
 01EF:233B  B501                mov  ch,01&lt;br /&gt;
 01EF:233D  A0A63F              mov  al,[3FA6]              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2340  2A4502              sub  al,[di+02]             ds:[4DBA]=260F&lt;br /&gt;
 01EF:2343  7504                jne  00002349 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2345  B500                mov  ch,00&lt;br /&gt;
 01EF:2347  EB08                jmp  short 00002351 ($+8)   (down)&lt;br /&gt;
 01EF:2349  3C80                cmp  al,80&lt;br /&gt;
 01EF:234B  7204                jc   00002351 ($+4)         (no jmp)&lt;br /&gt;
 01EF:234D  F6D8                neg  al&lt;br /&gt;
 01EF:234F  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2351  A2A23F              mov  [3FA2],al              ds:[3FA2]=0001&lt;br /&gt;
 01EF:2354  882EA43F            mov  [3FA4],ch              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2358  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:235B  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006&lt;br /&gt;
 01EF:235F  C606A93F00          mov  byte [3FA9],00         ds:[3FA9]=0000&lt;br /&gt;
 01EF:2364  8A5D09              mov  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:2367  02DB                add  bl,bl&lt;br /&gt;
 01EF:2369  02DB                add  bl,bl&lt;br /&gt;
 01EF:236B  025D09              add  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:236E  32FF                xor  bh,bh&lt;br /&gt;
 01EF:2370  8A870648            mov  al,[bx+4806]           [illegal]&lt;br /&gt;
 01EF:2374  A29C3F              mov  [3F9C],al              ds:[3F9C]=0003&lt;br /&gt;
 01EF:2377  8A0EA23F            mov  cl,[3FA2]              ds:[3FA2]=0001&lt;br /&gt;
 01EF:237B  A0A13F              mov  al,[3FA1]              ds:[3FA1]=0100&lt;br /&gt;
 01EF:237E  3AC1                cmp  al,cl&lt;br /&gt;
 01EF:2380  7203                jc   00002385 ($+3)         (no jmp)&lt;br /&gt;
 01EF:2382  EB6A                jmp  short 000023EE ($+6a)  (down)&lt;br /&gt;
 01EF:2384  90                  nop&lt;br /&gt;
 01EF:2385  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2389  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:238D  7425                je   000023B4 ($+25)        (down)&lt;br /&gt;
 01EF:238F  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2392  0AC0                or   al,al&lt;br /&gt;
 01EF:2394  741E                je   000023B4 ($+1e)        (down)&lt;br /&gt;
 01EF:2396  02F0                add  dh,al&lt;br /&gt;
 01EF:2398  E8DD00              call 00002478 ($+dd)&lt;br /&gt;
 01EF:239B  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:239D  7503                jne  000023A2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:239F  E9B500              jmp  00002457 ($+b5)        (down)&lt;br /&gt;
 01EF:23A2  0AC0                or   al,al&lt;br /&gt;
 01EF:23A4  750E                jne  000023B4 ($+e)         (no jmp)&lt;br /&gt;
 01EF:23A6  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:23AA  E8B000              call 0000245D ($+b0)&lt;br /&gt;
 01EF:23AD  7303                jnc  000023B2 ($+3)         (down)&lt;br /&gt;
 01EF:23AF  E99900              jmp  0000244B ($+99)        (down)&lt;br /&gt;
 01EF:23B2  EBD1                jmp  short 00002385 ($-2f)  (up)&lt;br /&gt;
 01EF:23B4  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23B8  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23BB  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23BD  7503                jne  000023C2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23BF  E98F00              jmp  00002451 ($+8f)        (down)&lt;br /&gt;
 01EF:23C2  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23C5  0AC0                or   al,al&lt;br /&gt;
 01EF:23C7  7503                jne  000023CC ($+3)         (no jmp)&lt;br /&gt;
 01EF:23C9  E98500              jmp  00002451 ($+85)        (down)&lt;br /&gt;
 01EF:23CC  02D0                add  dl,al&lt;br /&gt;
 01EF:23CE  E8A700              call 00002478 ($+a7)&lt;br /&gt;
 01EF:23D1  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:23D3  7503                jne  000023D8 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23D5  E97F00              jmp  00002457 ($+7f)        (down)&lt;br /&gt;
 01EF:23D8  0AC0                or   al,al&lt;br /&gt;
 01EF:23DA  7403                je   000023DF ($+3)         (down)&lt;br /&gt;
 01EF:23DC  EB73                jmp  short 00002451 ($+73)  (down)&lt;br /&gt;
 01EF:23DE  90                  nop&lt;br /&gt;
 01EF:23DF  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23E2  32E4                xor  ah,ah&lt;br /&gt;
 01EF:23E4  E87600              call 0000245D ($+76)&lt;br /&gt;
 01EF:23E7  7303                jnc  000023EC ($+3)         (down)&lt;br /&gt;
 01EF:23E9  EB60                jmp  short 0000244B ($+60)  (down)&lt;br /&gt;
 01EF:23EB  90                  nop&lt;br /&gt;
 01EF:23EC  EB97                jmp  short 00002385 ($-69)  (up)&lt;br /&gt;
 01EF:23EE  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23F2  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23F5  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23F7  7426                je   0000241F ($+26)        (down)&lt;br /&gt;
 01EF:23F9  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23FC  0AC0                or   al,al&lt;br /&gt;
 01EF:23FE  741F                je   0000241F ($+1f)        (down)&lt;br /&gt;
 01EF:2400  02D0                add  dl,al&lt;br /&gt;
 01EF:2402  E87300              call 00002478 ($+73)&lt;br /&gt;
 01EF:2405  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2407  7503                jne  0000240C ($+3)         (no jmp)&lt;br /&gt;
 01EF:2409  EB4C                jmp  short 00002457 ($+4c)  (down)&lt;br /&gt;
 01EF:240B  90                  nop&lt;br /&gt;
 01EF:240C  0AC0                or   al,al&lt;br /&gt;
 01EF:240E  750F                jne  0000241F ($+f)         (no jmp)&lt;br /&gt;
 01EF:2410  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:2413  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2415  E84500              call 0000245D ($+45)&lt;br /&gt;
 01EF:2418  7303                jnc  0000241D ($+3)         (down)&lt;br /&gt;
 01EF:241A  EB2F                jmp  short 0000244B ($+2f)  (down)&lt;br /&gt;
 01EF:241C  90                  nop&lt;br /&gt;
 01EF:241D  EBCF                jmp  short 000023EE ($-31)  (up)&lt;br /&gt;
 01EF:241F  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2423  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2427  7428                je   00002451 ($+28)        (down)&lt;br /&gt;
 01EF:2429  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:242C  0AC0                or   al,al&lt;br /&gt;
 01EF:242E  7421                je   00002451 ($+21)        (down)&lt;br /&gt;
 01EF:2430  02F0                add  dh,al&lt;br /&gt;
 01EF:2432  E84300              call 00002478 ($+43)&lt;br /&gt;
 01EF:2435  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2437  741E                je   00002457 ($+1e)        (down)&lt;br /&gt;
 01EF:2439  0AC0                or   al,al&lt;br /&gt;
 01EF:243B  7514                jne  00002451 ($+14)        (no jmp)&lt;br /&gt;
 01EF:243D  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2441  E81900              call 0000245D ($+19)&lt;br /&gt;
 01EF:2444  7303                jnc  00002449 ($+3)         (down)&lt;br /&gt;
 01EF:2446  EB03                jmp  short 0000244B ($+3)   (down)&lt;br /&gt;
 01EF:2448  90                  nop&lt;br /&gt;
 01EF:2449  EBA3                jmp  short 000023EE ($-5d)  (up)&lt;br /&gt;
 01EF:244B  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2450  C3                  ret&lt;br /&gt;
 01EF:2451  C606A83F02          mov  byte [3FA8],02         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2456  C3                  ret&lt;br /&gt;
 01EF:2457  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- hero is reachable&lt;br /&gt;
 01EF:245C  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:245D  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006	&amp;lt;-- called only when the monster needs to move&lt;br /&gt;
 01EF:2461  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:2465  8807                mov  [bx],al                ds:[3F28]=6148&lt;br /&gt;
 01EF:2467  886701              mov  [bx+01],ah             ds:[3F29]=0061&lt;br /&gt;
 01EF:246A  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:246F  FE06A93F            inc  byte [3FA9]            ds:[3FA9]=0000&lt;br /&gt;
 01EF:2473  FE0E9C3F            dec  byte [3F9C]            ds:[3F9C]=0003&lt;br /&gt;
 01EF:2477  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:2478  A0BC3F              mov  al,[3FBC]              ds:[3FBC]=0000&lt;br /&gt;
 01EF:247B  E80139              call 00005D7F ($+3901)&lt;br /&gt;
 01EF:247E  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:2481  7408                je   0000248B ($+8)         (down)&lt;br /&gt;
 01EF:2483  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:2486  7503                jne  0000248B ($+3)         (no jmp)&lt;br /&gt;
 01EF:2488  B0FF                mov  al,FF&lt;br /&gt;
 01EF:248A  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:248B  B500                mov  ch,00&lt;br /&gt;
 01EF:248D  382EBC3F            cmp  [3FBC],ch              ds:[3FBC]=0000&lt;br /&gt;
 01EF:2491  7412                je   000024A5 ($+12)        (down)&lt;br /&gt;
 01EF:2493  8AC5                mov  al,ch&lt;br /&gt;
 01EF:2495  E8E738              call 00005D7F ($+38e7)&lt;br /&gt;
 01EF:2498  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:249B  7408                je   000024A5 ($+8)         (down)&lt;br /&gt;
 01EF:249D  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:24A0  7503                jne  000024A5 ($+3)         (no jmp)&lt;br /&gt;
 01EF:24A2  B001                mov  al,01&lt;br /&gt;
 01EF:24A4  C3                  ret&lt;br /&gt;
 01EF:24A5  FEC5                inc  ch&lt;br /&gt;
 01EF:24A7  80FD04              cmp  ch,04&lt;br /&gt;
 01EF:24AA  75E1                jne  0000248D ($-1f)        (no jmp)&lt;br /&gt;
 01EF:24AC  52                  push dx&lt;br /&gt;
 01EF:24AD  E8CE3B              call 0000607E ($+3bce)&lt;br /&gt;
 01EF:24B0  5A                  pop  dx&lt;br /&gt;
 01EF:24B1  81C36F58            add  bx,586F&lt;br /&gt;
 01EF:24B5  803F00              cmp  byte [bx],00           ds:[3F28]=6148&lt;br /&gt;
 01EF:24B8  7403                je   000024BD ($+3)         (down)&lt;br /&gt;
 01EF:24BA  B002                mov  al,02&lt;br /&gt;
 01EF:24BC  C3                  ret&lt;br /&gt;
 01EF:24BD  8A8700FC            mov  al,[bx-0400]           ds:[3B28]=E04B&lt;br /&gt;
 01EF:24C1  243F                and  al,3F&lt;br /&gt;
 01EF:24C3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26 	&amp;lt;-- monster&#039;s room check.&lt;br /&gt;
 01EF:24C6  7503                jne  000024CB ($+3)         (no jmp)	&lt;br /&gt;
 01EF:24C8  32C0                xor  al,al&lt;br /&gt;
 01EF:24CA  C3                  ret&lt;br /&gt;
 01EF:24CB  B003                mov  al,03&lt;br /&gt;
 01EF:24CD  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:24CE  893ED43F            mov  [3FD4],di              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24D2  8A0EA93F            mov  cl,[3FA9]              ds:[3FA9]=0001&lt;br /&gt;
 01EF:24D6  0AC9                or   cl,cl&lt;br /&gt;
 01EF:24D8  7455                je   0000252F ($+55)        (down)&lt;br /&gt;
 01EF:24DA  32ED                xor  ch,ch&lt;br /&gt;
 01EF:24DC  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:24DF  891ECA40            mov  [40CA],bx              ds:[40CA]=40A4&lt;br /&gt;
 01EF:24E3  51                  push cx&lt;br /&gt;
 01EF:24E4  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24E8  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24EB  E8903B              call 0000607E ($+3b90)&lt;br /&gt;
 01EF:24EE  8A8F6F58            mov  cl,[bx+586F]           ds:[59FB]=0000&lt;br /&gt;
 01EF:24F2  C6876F5800          mov  byte [bx+586F],00      ds:[59FB]=0000&lt;br /&gt;
 01EF:24F7  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:24FB  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24FE  0217                add  dl,[bx]                ds:[018C]=1149&lt;br /&gt;
 01EF:2500  027701              add  dh,[bx+01]             ds:[018D]=0611&lt;br /&gt;
 01EF:2503  895501              mov  [di+01],dx             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2506  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:250B  E8703B              call 0000607E ($+3b70)&lt;br /&gt;
 01EF:250E  888F6F58            mov  [bx+586F],cl           ds:[AE50]=0A16&lt;br /&gt;
 01EF:2512  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2516  895D04              mov  [di+04],bx             ds:[4DBC]=55E1&lt;br /&gt;
 01EF:2519  E834F5              call 00001A50 ($-acc)		&lt;br /&gt;
 01EF:251C  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:2520  E81C00              call 0000253F ($+1c)&lt;br /&gt;
 01EF:2523  E8BE3B              call 000060E4 ($+3bbe)&lt;br /&gt;
 01EF:2526  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:2529  E85B21              call 00004687 ($+215b)						&amp;lt;-- 500.000 nop cycles, to slow down monster&#039;s animation&lt;br /&gt;
 01EF:252C  59                  pop  cx		&lt;br /&gt;
 01EF:252D  E2B4                loop 000024E3 ($-4c)&lt;br /&gt;
 01EF:252F  51                  push cx&lt;br /&gt;
 01EF:2530  B93200              mov  cx,0032&lt;br /&gt;
 01EF:2533  E86A11              call 000036A0 ($+116a)						&amp;lt;-- more nops &lt;br /&gt;
 01EF:2536  E2FB                loop 00002533 ($-5)&lt;br /&gt;
 01EF:2538  59                  pop  cx&lt;br /&gt;
 01EF:2539  E853F8              call 00001D8F ($-7ad)						&amp;lt;-- here the monster attacks whein in contact with the hero&lt;br /&gt;
 01EF:253C  E99131              jmp  000056D0 ($+3191)      (down)&lt;br /&gt;
 01EF:253F  8A4502              mov  al,[di+02]             ds:[EF42]=3736&lt;br /&gt;
 01EF:2542  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2544  BA000A              mov  dx,0A00&lt;br /&gt;
 01EF:2547  F7E2                mul  dx&lt;br /&gt;
 01EF:2549  8BD8                mov  bx,ax&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:4687  51                  push cx&lt;br /&gt;
 01EF:4688  E820EF              call 000035AB ($-10e0)&lt;br /&gt;
 01EF:468B  59                  pop  cx&lt;br /&gt;
 01EF:468C  E2F9                loop 00004687 ($-7)&lt;br /&gt;
 01EF:468E  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh	&lt;br /&gt;
 01EF:6080  B700                mov  bh,00	&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5&lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[0130]=0101&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hero&#039;s pathfinding routine ==&lt;br /&gt;
The pathfinder algorithm the programmer chose was a simple variation of the A*, and is perfectly implemented. You can click on any tiles on the screen even on the invisible ones outside the room. If there is a clean path, the hero will reach that tile.&lt;br /&gt;
&lt;br /&gt;
 01EF:6449  E8E2D4              call 0000392E ($-2b1e)&lt;br /&gt;
 01EF:644C  E85800              call 000064A7 ($+58)&lt;br /&gt;
 01EF:644F  833CFF              cmp  word [si],FFFF         ds:[3911]=0000&lt;br /&gt;
 01EF:6452  7503                jne  00006457 ($+3)         (down)&lt;br /&gt;
 01EF:6454  E95F03              jmp  000067B6 ($+35f)       (down)&lt;br /&gt;
 &lt;br /&gt;
 01EF:67B6  8B16E747            mov  dx,[47E7]              ds:[47E7]=0087&lt;br /&gt;
 01EF:67BA  8B2EE947            mov  bp,[47E9]              ds:[47E9]=0097&lt;br /&gt;
 01EF:67BE  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67C1  BE1941              mov  si,4119&lt;br /&gt;
 01EF:67C4  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67C7  51                  push cx&lt;br /&gt;
 01EF:67C8  8B4402              mov  ax,[si+02]             ds:[491E]=01C0&lt;br /&gt;
 01EF:67CB  051800              add  ax,0018&lt;br /&gt;
 01EF:67CE  2BC2                sub  ax,dx&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (down)&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67D2  F7D8                neg  ax&lt;br /&gt;
 01EF:67D4  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67D6  8B0C                mov  cx,[si]                ds:[4119]=0044&lt;br /&gt;
 01EF:67D8  83C108              add  cx,0008&lt;br /&gt;
 01EF:67DB  2BCD                sub  cx,bp&lt;br /&gt;
 01EF:67DD  7302                jnc  000067E1 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67DF  F7D9                neg  cx&lt;br /&gt;
 01EF:67E1  03C1                add  ax,cx&lt;br /&gt;
 01EF:67E3  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67E5  8907                mov  [bx],ax                ds:[402D]=0000&lt;br /&gt;
 01EF:67E7  83C302              add  bx,0002&lt;br /&gt;
 01EF:67EA  83C604              add  si,0004&lt;br /&gt;
 01EF:67ED  59                  pop  cx&lt;br /&gt;
 01EF:67EE  E2D7                loop 000067C7 ($-29)&lt;br /&gt;
 01EF:67F0  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67F3  B8FFFF              mov  ax,FFFF&lt;br /&gt;
 01EF:67F6  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67F9  3B07                cmp  ax,[bx]                ds:[402D]=0000&lt;br /&gt;
 01EF:67FB  7204                jc   00006801 ($+4)         (down)&lt;br /&gt;
 01EF:67FD  8B07                mov  ax,[bx]                ds:[4095]=0000&lt;br /&gt;
 01EF:67FF  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6801  83C302              add  bx,0002&lt;br /&gt;
 01EF:6804  E2F3                loop 000067F9 ($-d)&lt;br /&gt;
 01EF:6806  3D0800              cmp  ax,0008&lt;br /&gt;
 01EF:6809  7201                jc   0000680C ($+1)         (no jmp)&lt;br /&gt;
 01EF:680B  C3                  ret&lt;br /&gt;
 01EF:680C  BB3400              mov  bx,0034&lt;br /&gt;
 01EF:680F  2BDA                sub  bx,dx&lt;br /&gt;
 01EF:6811  83FB2D              cmp  bx,002D&lt;br /&gt;
 01EF:6814  720B                jc   00006821 ($+b)         (down)&lt;br /&gt;
 01EF:6816  83EB2D              sub  bx,002D&lt;br /&gt;
 01EF:6819  D1E3                shl  bx,1&lt;br /&gt;
 01EF:681B  8B8F034A            mov  cx,[bx+4A03]           ds:[4A14]=0E09&lt;br /&gt;
 01EF:681F  EB06                jmp  short 00006827 ($+6)   (down)&lt;br /&gt;
 01EF:6821  8A8FD649            mov  cl,[bx+49D6]           ds:[49E7]=1E37&lt;br /&gt;
 01EF:6825  32ED                xor  ch,ch&lt;br /&gt;
 01EF:6827  A1E43F              mov  ax,[3FE4]              ds:[3FE4]=5574&lt;br /&gt;
 01EF:682A  03C1                add  ax,cx&lt;br /&gt;
 01EF:682C  2D6F54              sub  ax,546F&lt;br /&gt;
 01EF:682F  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:6831  81C36F56            add  bx,566F&lt;br /&gt;
 01EF:6835  3B1E110E            cmp  bx,[0E11]              ds:[0E11]=FFFF&lt;br /&gt;
 01EF:6839  7501                jne  0000683C ($+1)         (down)&lt;br /&gt;
 01EF:683B  C3                  ret&lt;br /&gt;
 01EF:683C  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:683E  B500                mov  ch,00&lt;br /&gt;
 01EF:6840  3D1A00              cmp  ax,001A&lt;br /&gt;
 01EF:6843  7207                jc   0000684C ($+7)         (down)&lt;br /&gt;
 01EF:6845  2D1A00              sub  ax,001A&lt;br /&gt;
 01EF:6848  FEC5                inc  ch&lt;br /&gt;
 01EF:684A  EBF4                jmp  short 00006840 ($-c)   (up)&lt;br /&gt;
 01EF:684C  8AC8                mov  cl,al&lt;br /&gt;
 01EF:684E  8A876F54            mov  al,[bx+546F]           ds:[AC1A]=0200&lt;br /&gt;
 01EF:6852  243F                and  al,3F&lt;br /&gt;
 01EF:6854  7501                jne  00006857 ($+1)         (down)&lt;br /&gt;
 01EF:6856  C3                  ret&lt;br /&gt;
 01EF:6857  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:685C  7503                jne  00006861 ($+3)         (down)&lt;br /&gt;
 01EF:685E  EB11                jmp  short 00006871 ($+11)  (down)&lt;br /&gt;
 01EF:6860  90                  nop&lt;br /&gt;
 01EF:6861  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:6866  7501                jne  00006869 ($+1)         (down)&lt;br /&gt;
 01EF:6868  C3                  ret&lt;br /&gt;
 01EF:6869  80BF6F5840          cmp  byte [bx+586F],40      ds:[B01A]=0101&lt;br /&gt;
 01EF:686E  7201                jc   00006871 ($+1)         (down)&lt;br /&gt;
 01EF:6870  C3                  ret&lt;br /&gt;
 01EF:6871  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6873  51                  push cx&lt;br /&gt;
 01EF:6874  E810AA              call 00001287 ($-55f0)&lt;br /&gt;
 01EF:6877  59                  pop  cx&lt;br /&gt;
 01EF:6878  0AC0                or   al,al&lt;br /&gt;
 01EF:687A  7401                je   0000687D ($+1)         (down)&lt;br /&gt;
 01EF:687C  C3                  ret&lt;br /&gt;
 01EF:687D  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:6881  880EF03F            mov  [3FF0],cl              ds:[3FF0]=0000&lt;br /&gt;
 01EF:6885  882EF13F            mov  [3FF1],ch              ds:[3FF1]=0000&lt;br /&gt;
 01EF:6889  8A4501              mov  al,[di+01]             ds:[3913]=0000&lt;br /&gt;
 01EF:688C  A2EE3F              mov  [3FEE],al              ds:[3FEE]=0000&lt;br /&gt;
 01EF:688F  A2F53F              mov  [3FF5],al              ds:[3FF5]=0C02&lt;br /&gt;
 01EF:6892  8A4502              mov  al,[di+02]             ds:[4665]=200C&lt;br /&gt;
 01EF:6895  A2EF3F              mov  [3FEF],al              ds:[3FEF]=040C&lt;br /&gt;
 01EF:6898  A2F63F              mov  [3FF6],al              ds:[3FF6]=000C&lt;br /&gt;
 01EF:689B  E80EC5              call 00002DAC ($-3af2)&lt;br /&gt;
 01EF:689E  803EC83F00          cmp  byte [3FC8],00         ds:[3FC8]=0000&lt;br /&gt;
 01EF:68A3  7501                jne  000068A6 ($+1)         (no jmp)&lt;br /&gt;
 01EF:68A5  C3                  ret&lt;br /&gt;
 01EF:68A6  BB1340              mov  bx,4013&lt;br /&gt;
 01EF:68A9  891ECC3F            mov  [3FCC],bx              ds:[3FCC]=0000&lt;br /&gt;
 01EF:68AD  C3                  ret  &lt;br /&gt;
&lt;br /&gt;
 01EF:2DAC  A0EE3F              mov  al,[3FEE]              ds:[3FEE]=0000&lt;br /&gt;
 01EF:2DAF  2A06F03F            sub  al,[3FF0]              ds:[3FF0]=1515&lt;br /&gt;
 01EF:2DB3  7902                jns  00002DB7 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DB5  F6D8                neg  al&lt;br /&gt;
 01EF:2DB7  8A26EF3F            mov  ah,[3FEF]              ds:[3FEF]=1500&lt;br /&gt;
 01EF:2DBB  2A26F13F            sub  ah,[3FF1]              ds:[3FF1]=3915&lt;br /&gt;
 01EF:2DBF  7902                jns  00002DC3 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DC1  F6DC                neg  ah&lt;br /&gt;
 01EF:2DC3  02C4                add  al,ah&lt;br /&gt;
 01EF:2DC5  A2E937              mov  [37E9],al              ds:[37E9]=3737&lt;br /&gt;
 01EF:2DC8  A09C3F              mov  al,[3F9C]              ds:[3F9C]=3A3A&lt;br /&gt;
 01EF:2DCB  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2DCD  A3F93F              mov  [3FF9],ax              ds:[3FF9]=3F3E&lt;br /&gt;
 01EF:2DD0  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=3A3A&lt;br /&gt;
 01EF:2DD5  C606C83F00          mov  byte [3FC8],00         ds:[3FC8]=1515&lt;br /&gt;
 01EF:2DDA  C706F33F0000        mov  word [3FF3],0000       ds:[3FF3]=1515&lt;br /&gt;
 01EF:2DE0  C706CC3F0000        mov  word [3FCC],0000       ds:[3FCC]=3B3C&lt;br /&gt;
 &lt;br /&gt;
Starting from memory location 0B6B:0A0E the subsequent 512 bytes are set to 1A1A x100h (256 times) by this function: &lt;br /&gt;
 01EF:2DE6  BF0E0A              mov  di,0A0E&lt;br /&gt;
 01EF:2DE9  B90001              mov  cx,0100&lt;br /&gt;
 01EF:2DEC  50                  push ax&lt;br /&gt;
 01EF:2DED  B86B0B              mov  ax,0B6B&lt;br /&gt;
 01EF:2DF0  8EC0                mov  es,ax&lt;br /&gt;
 01EF:2DF2  58                  pop  ax&lt;br /&gt;
 01EF:2DF3  B81A1A              mov  ax,1A1A&lt;br /&gt;
 01EF:2DF6  F3AB                repe stosw&lt;br /&gt;
 &lt;br /&gt;
The code then creates a map with all possible paths of the hero: &lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 07 08 09 -- 09 08&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 06 09 0A 09 08 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 05 0A 0B 0A 09 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 04 0B -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 02 01 02 01 02 03 04&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 02 -- -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 03 -- -- -- -- 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 04 -- -- -- -- 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
&lt;br /&gt;
 01EF:2DF8  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:2DFC  EB74                jmp  short 00002E72 ($+74)  (down)&lt;br /&gt;
 01EF:2DFE  90                  nop&lt;br /&gt;
 01EF:2DFF  A0F23F              mov  al,[3FF2]              ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E02  8B1EF33F            mov  bx,[3FF3]              ds:[3FF3]=0000&lt;br /&gt;
 01EF:2E06  8887FB3F            mov  [bx+3FFB],al           ds:[411D]=0050&lt;br /&gt;
 01EF:2E0A  43                  inc  bx&lt;br /&gt;
 01EF:2E0B  3B1EF93F            cmp  bx,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E0F  7601                jbe  00002E12 ($+1)         (no jmp)&lt;br /&gt;
 01EF:2E11  C3                  ret&lt;br /&gt;
 01EF:2E12  891EF33F            mov  [3FF3],bx              ds:[3FF3]=0001&lt;br /&gt;
 01EF:2E16  8A26F93F            mov  ah,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E1A  2AE3                sub  ah,bl&lt;br /&gt;
 01EF:2E1C  A0F03F              mov  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E1F  2A06F53F            sub  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E23  7902                jns  00002E27 ($+2)         (down)&lt;br /&gt;
 01EF:2E25  F6D8                neg  al&lt;br /&gt;
 01EF:2E27  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E29  7603                jbe  00002E2E ($+3)         (down)&lt;br /&gt;
 01EF:2E2B  E98400              jmp  00002EB2 ($+84)        (down)&lt;br /&gt;
 01EF:2E2E  A0F13F              mov  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E31  2A06F63F            sub  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E35  7902                jns  00002E39 ($+2)         (down)&lt;br /&gt;
 01EF:2E37  F6D8                neg  al&lt;br /&gt;
 01EF:2E39  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E3B  7775                ja   00002EB2 ($+75)        (no jmp)&lt;br /&gt;
 01EF:2E3D  E87700              call 00002EB7 ($+77)&lt;br /&gt;
 01EF:2E40  7270                jc   00002EB2 ($+70)        (no jmp)&lt;br /&gt;
 01EF:2E42  3E885E00            mov  ds:[bp],bl             ds:[007A]=0002&lt;br /&gt;
 01EF:2E46  A0F53F              mov  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E49  3A06F03F            cmp  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E4D  7523                jne  00002E72 ($+23)        (no jmp)&lt;br /&gt;
 01EF:2E4F  A0F63F              mov  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E52  3A06F13F            cmp  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E56  751A                jne  00002E72 ($+1a)        (no jmp)&lt;br /&gt;
 01EF:2E58  881EC83F            mov  [3FC8],bl              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E5C  57                  push di&lt;br /&gt;
 01EF:2E5D  BF1340              mov  di,4013&lt;br /&gt;
 01EF:2E60  BEFB3F              mov  si,3FFB&lt;br /&gt;
 01EF:2E63  8A0EC83F            mov  cl,[3FC8]              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E67  32ED                xor  ch,ch&lt;br /&gt;
 01EF:2E69  890EF93F            mov  [3FF9],cx              ds:[3FF9]=0001&lt;br /&gt;
 01EF:2E6D  F3A4                repe movsb&lt;br /&gt;
 01EF:2E6F  5F                  pop  di&lt;br /&gt;
 01EF:2E70  EB40                jmp  short 00002EB2 ($+40)  (down)&lt;br /&gt;
 01EF:2E72  C606F23F00          mov  byte [3FF2],00         ds:[3FF2]=0100&lt;br /&gt;
 01EF:2E77  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
&lt;br /&gt;
part of 2DF8 routine this writes the temporary math:&lt;br /&gt;
 01EF:2E7B  E881FF              call 00002DFF ($-7f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E7E  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E82  C606F23F01          mov  byte [3FF2],01         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E87  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E8B  E871FF              call 00002DFF ($-8f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E8E  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E92  C606F23F02          mov  byte [3FF2],02         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E97  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E9B  E861FF              call 00002DFF ($-9f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E9E  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2EA2  C606F23F03          mov  byte [3FF2],03         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2EA7  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EAB  E851FF              call 00002DFF ($-af)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2EAE  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EB2  FF0EF33F            dec  word [3FF3]            ds:[3FF3]=0000&lt;br /&gt;
 01EF:2EB6  C3                  ret&lt;br /&gt;
&lt;br /&gt;
== Notable Memory locations for hero&#039;s and monster&#039;s movement ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 3F92 = CURRENT QUEST&lt;br /&gt;
 3F93 = Hero&#039;s current tile (see tilemap below)&lt;br /&gt;
 3F94 = ACTIVE HERO&#039;S ROOM&lt;br /&gt;
&lt;br /&gt;
 3F99 =&lt;br /&gt;
 3F9A = END TURN FLAG&lt;br /&gt;
 3F9B = action performed?&lt;br /&gt;
 3F9C = REMAINING STEPS&lt;br /&gt;
 3F9D =&lt;br /&gt;
 3F9E =&lt;br /&gt;
 3F9F = MONSTER&#039;S X position&lt;br /&gt;
 3FA0 = MONSTER&#039;S Y position&lt;br /&gt;
 3FA1 = Horizontal distance Monster-hero&lt;br /&gt;
 3FA2 = Vertical distance Monster-hero&lt;br /&gt;
 3FA3-3FA4 (word) = next monster&#039;s step (see 40A2)&lt;br /&gt;
 3FA5 = HERO&#039;S X position&lt;br /&gt;
 3FA6 = HERO&#039;S Y position&lt;br /&gt;
 3FA7 = Active hero&lt;br /&gt;
 3FA8 = LOS 00=start 01=blocked 02=free&lt;br /&gt;
 3FA9 = steps to take to reach the hero?&lt;br /&gt;
 3FB5 = Target Hero ID (FF=Monster)&lt;br /&gt;
 3FB9 = current total defense dice of the active hero during DEFENSE&lt;br /&gt;
 3FC5 = Quest specific hero counter (usually identical to 3FC6)  modified by 26E8 call&lt;br /&gt;
 3FC5 = hero counter (complementar)  1111 = 0F = all heroes OUT  modified by 26E2 call&lt;br /&gt;
 &lt;br /&gt;
 3FD0 = WORD map ID (temporary for the quest) offset of ATTACKED monster in map memory (586F)&lt;br /&gt;
 3FD2 = BYTE rolled skulls (by monsters or heroes)&lt;br /&gt;
 3FD3 = BYTE rolled shields (by monsters or heroes)&lt;br /&gt;
 3FD4 = WORD monster&#039;s profile location (during attacks)&lt;br /&gt;
 3FD6 = WORD hero&#039;s profile location (during attacks)&lt;br /&gt;
 &lt;br /&gt;
 3FE7 = QUEST specific OBJECTIVE (1=ACCOMPLISHED)&lt;br /&gt;
 &lt;br /&gt;
 Memory locations for hero&#039;s movement (pathfindig)&lt;br /&gt;
 3FEE = HERO&#039;S X STARTING POSITION&lt;br /&gt;
 3FEF = HERO&#039;S Y STARTING POSITION&lt;br /&gt;
 3FF0 = mouse click X position (X stop)&lt;br /&gt;
 3FF1 = mouse click Y position (Y stop)&lt;br /&gt;
 3FF2 = 03&lt;br /&gt;
 3FF3 = FF&lt;br /&gt;
 3FF4 = FF&lt;br /&gt;
 3FF5 = HERO&#039;S X POSITION (copy)&lt;br /&gt;
 3FF6 = HERO&#039;S Y POSITION (copy)&lt;br /&gt;
 3FF9 = rolled movement&lt;br /&gt;
 3FFB - 4012 = math locations that varies among 00,01,02,03, at the end every byte is set to 03 (bytes here are never cleared)&lt;br /&gt;
 4013 -&amp;gt; locations with definitive hero&#039;s path (bytes here are never cleared)&lt;br /&gt;
&lt;br /&gt;
 hero&#039;s directional movement values:&lt;br /&gt;
 00 = up&lt;br /&gt;
 01 = right&lt;br /&gt;
 02 = down&lt;br /&gt;
 03 = left&lt;br /&gt;
 The hero&#039;s moving animation is then delegated to the main loop routines that starts reading from 4013 till [3FF9].&lt;br /&gt;
&lt;br /&gt;
 4097 = infinite actions if set to a number different from 00&lt;br /&gt;
 402C = Wand of recall extra action 00=no 01=yes&lt;br /&gt;
 4BBC = location where TRAP special event number is put upon entering the room (FF=Searched)&lt;br /&gt;
&lt;br /&gt;
 40A2 = here is stored the path the monster will follow by 607E (?) call. A sequence of words that specify directional movement&lt;br /&gt;
 00 01 = down&lt;br /&gt;
 00 FF = up&lt;br /&gt;
 FF 00 = left&lt;br /&gt;
 01 00 = right&lt;br /&gt;
 40CA = last location of the path to follow. (A640 = 2 moves)		&lt;br /&gt;
&lt;br /&gt;
 Screen tiles layout. The tile under the current hero is saved in [3F93]&lt;br /&gt;
             /\&lt;br /&gt;
            /00\&lt;br /&gt;
           /\  /\&lt;br /&gt;
          /01\/02\&lt;br /&gt;
         /\  /\  /\&lt;br /&gt;
        /03\/04\/05\&lt;br /&gt;
       /\  /\  /\  /\&lt;br /&gt;
      /06\/07\/08\/09\&lt;br /&gt;
     /\  /\  /\  /\  /\&lt;br /&gt;
    /0A\/0B\/0C\/0D\/0E\&lt;br /&gt;
    \  /\  /\  /\  /\  /\&lt;br /&gt;
     \/0F\/10\/11\/12\/13\&lt;br /&gt;
      \  /\  /\  /\  /\  /&lt;br /&gt;
       \/14\/15\/16\/17\/&lt;br /&gt;
        \  /\  /\  /\  /&lt;br /&gt;
         \/18\/19\/1A\/&lt;br /&gt;
          \  /\  /\  /&lt;br /&gt;
           \/1B\/1C\/&lt;br /&gt;
            \  /\  /&lt;br /&gt;
             \/1D\/&lt;br /&gt;
              \  /&lt;br /&gt;
               \/&lt;br /&gt;
			   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The hero&#039;s moving animation is delegated to the in-game main loop routines.&lt;br /&gt;
&lt;br /&gt;
= [DATA SEGMENT] Main Pointers =&lt;br /&gt;
&lt;br /&gt;
The file inside the exe that represents the Data Segment (every byte that is not strictly CODE) starts at offset &#039;&#039;&#039;0x9BE0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heroes&#039; default profiles ==&lt;br /&gt;
&lt;br /&gt;
 offset  mem pointer                   BP MP                      EQ             AD DD          ID &lt;br /&gt;
 0xE243  0B6B:4663   00 00 00 00 00 00 08 02 1D 00 00 00 00 00 00 00 00 00 00 00 03 02 00 00 00 00	Barbarian&lt;br /&gt;
 0xE25D  0B6B:467D   00 00 00 00 00 00 07 03 32 00 00 00 00 00 00 80 00 00 00 00 02 02 00 00 00 01	Dwarf&lt;br /&gt;
 0xE277  0B6B:4697   00 00 00 00 00 00 06 04 35 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 00 02	Elf&lt;br /&gt;
 0xE291  0B6B:46B1   00 00 00 00 00 00 04 06 4A 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 03	Wizard&lt;br /&gt;
 0xE2AB  0B6B:46CB   00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 04	Ragnar&lt;br /&gt;
&lt;br /&gt;
The byte positions are the same of [[HeroQuest Savegame Format]]. Load and save operations read and write at these addreses.&lt;br /&gt;
&lt;br /&gt;
When initializing the heroes the default values are resetted by the function 01EF:78D3 that resets all values to zero and Body and Mind points to default&lt;br /&gt;
 0x00DF74 0B6B:4394  08 07 06 04 02    Default Body point values (last one is Ragnar&#039;s)&lt;br /&gt;
 0x0148FB 0B6B:AD1B  02 03 04 06 00    Default Mind point values&lt;br /&gt;
&lt;br /&gt;
Character initialization code:&lt;br /&gt;
 01EF:78D3  8A1E9E40            mov  bl,[409E]              ds:[409E]=0002&lt;br /&gt;
 01EF:78D7  B700                mov  bh,00&lt;br /&gt;
 01EF:78D9  8B879443            mov  ax,[bx+4394]           ds:[4396]=0406&lt;br /&gt;
 01EF:78DD  884406              mov  [si+06],al             ds:[469D]=0406	&amp;lt;-- sets default body points&lt;br /&gt;
 01EF:78E0  8A871BAD            mov  al,[bx-52E5]           ds:[FFFFAD1D]=EC8B&lt;br /&gt;
 01EF:78E4  884407              mov  [si+07],al             ds:[469E]=3804	&amp;lt;-- sets default mind points&lt;br /&gt;
 01EF:78E7  C6440E00            mov  byte [si+0E],00        ds:[46A5]=0000	&amp;lt;-- resets Owned weapon&lt;br /&gt;
 01EF:78EB  C6440F00            mov  byte [si+0F],00        ds:[46A6]=0000	&amp;lt;-- resets Owned armour&lt;br /&gt;
 01EF:78EF  C6440D00            mov  byte [si+0D],00        ds:[46A4]=0000	&amp;lt;-- resets Owned special items &lt;br /&gt;
 01EF:78F3  C744090000          mov  word [si+09],0000      ds:[46A0]=000A	&amp;lt;-- resets GOLD&lt;br /&gt;
 01EF:78F8  C6441100            mov  byte [si+11],00        ds:[46A8]=0000	&amp;lt;-- resets Equipped weapon&lt;br /&gt;
 01EF:78FC  C6441200            mov  byte [si+12],00        ds:[46A9]=0000	&amp;lt;-- resets Equipped special item&lt;br /&gt;
 01EF:7900  C6441300            mov  byte [si+13],00        ds:[46AA]=0200	&amp;lt;-- resets Equipped armour&lt;br /&gt;
 01EF:7904  885C19              mov  [si+19],bl             ds:[46B0]=0002	&amp;lt;-- refresh hero&#039;s ID&lt;br /&gt;
 01EF:7907  803E9E4001          cmp  byte [409E],01         ds:[409E]=0002	&amp;lt;-- if dwarf&lt;br /&gt;
 01EF:790C  7504                jne  00007912 ($+4)         (down)&lt;br /&gt;
 01EF:790E  804C0E80            or   byte [si+0E],80        ds:[46A5]=0000	&amp;lt;-- gives him the toolkit&lt;br /&gt;
 01EF:7912  BB0800              mov  bx,0008					&amp;lt;-- &amp;quot;The character is renewed&amp;quot; string&lt;br /&gt;
 01EF:7915  E8D50F              call 000088ED ($+fd5)				&amp;lt;-- draws the scroll&lt;br /&gt;
&lt;br /&gt;
== Searched room table ==&lt;br /&gt;
&lt;br /&gt;
The game keeps track of the &#039;&#039;searched&#039;&#039; room by storing the value FF into two tables (treasure and traps searches) using the room number as relative offset (&#039;&#039;bx&#039;&#039;).&amp;lt;br&amp;gt;&lt;br /&gt;
Room numbers go from 00 to 2A so each table is 2B bytes long and every byte of the table is set to 00 at the beginnng of the quest.&amp;lt;br&amp;gt;&lt;br /&gt;
The code that puts FF into the table:&amp;lt;br&amp;gt;&lt;br /&gt;
 mov byte ptr [bx+4B70h], 0FFh    [0B6B:4B70] starting address of TREASURE search&lt;br /&gt;
 mov byte ptr [bx+4B9Bh], 0FFh    [0B6B:4B9B] starting address of TRAPS/SECRET PASSAGES search&lt;br /&gt;
NOTE: upon starting a quest, every Special event ID is put into these tables replacing the 00.&lt;br /&gt;
&lt;br /&gt;
== Equipment screen ==&lt;br /&gt;
With &#039;&#039;position on screen&#039;&#039; is intended the string header 11XXYY&lt;br /&gt;
&lt;br /&gt;
 0x014863 Hero&#039;s classes label (ie. Barbarian) position on screen&lt;br /&gt;
 0x00DF2B pointers block to default Hero&#039;s classes (5 pointers)&lt;br /&gt;
 0x00DF35 default Hero&#039;s classes labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x014873 Hero&#039;s name label (ie. Sigmar) position on screen&lt;br /&gt;
 0x00E1B7 pointers block to default Hero&#039;s names&lt;br /&gt;
 0x00E1C5 default Hero&#039;s names labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x0141A4 first epilogue panel text (its pointer &#039;&#039;&#039;A5C4&#039;&#039;&#039; is written inside the code at offset 0x0649)&lt;br /&gt;
 0x0143A2 second epilogue panel text (its pointer &#039;&#039;&#039;A7C2&#039;&#039;&#039; is written inside the code at offset 0x0658)&lt;br /&gt;
&lt;br /&gt;
 0x0147F7 actual gear prices (hexadecimal) -  4x12 = 30 Bytes (2 bytes for equipment bit mask and 2 bytes for default price, little endian)&lt;br /&gt;
 0x01482B pointers block to single gear costs - 2xC = 18 Bytes&lt;br /&gt;
 0x014843 price (in decimal) labels - 1F Bytes&lt;br /&gt;
&lt;br /&gt;
 0x01486F &amp;quot;GOLD&amp;quot; label position on screen&lt;br /&gt;
 0x014867 gold amount position on screen (default is 0000)&lt;br /&gt;
 0x014877 equipment names position on screen&lt;br /&gt;
 0x01487B pointers block to the pointers in [language].bin where the item names are - 0x18 Bytes&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
Every WORD offsets are hexadecimal, little endian values.&lt;br /&gt;
&lt;br /&gt;
 0x00CDF3: Game font (2F0h bytes long). 8x8 - 94 chars, can be edited with Nyerguds&#039; Westwood font editor.&lt;br /&gt;
&lt;br /&gt;
 0x00DCB5: Sequence of 20 bytes (4 groups of 5 bytes) with facing codes of the heroe&#039;s sprites in the 4 directions (S-E-W-N).&lt;br /&gt;
 0x00DCC9: 4 words for sprite direction codification FF00=South ecc..&lt;br /&gt;
 0x00DF95: Sequence of 11 groups of 4 bytes used for teleportation in &amp;quot;castle of mistery&amp;quot; quest (Room, X, Y, door direction that could be 00,01,1A)&lt;br /&gt;
 0x00DFDC: Sequence of 21 groups of 3 words used to define furniture (first word: X,Y dimension of the frame - second word: Y,X offset in pixels from the origin tile - third word: offset of the frame in FURN.VGA)&lt;br /&gt;
 0x00E05B: Group of 4 offsets for the walls graphics in graphics.vga (2 wariations of the left wall and 2 of the right wall).&lt;br /&gt;
 0x00E062: 26 bytes (00 or 01) used for wall variations based on ROOM tile position number (see diamond scheme above). Basically each position has its own fixed wall texture that is displayed only if a wall is present.&lt;br /&gt;
 0x00E3E6: List of 28 (1Ch) Groups of 5 bytes each representing Movement (BYTE), Attack (BYTE), Defense (BYTE) and Death special event offset (WORD) of each monster (00-1B).&lt;br /&gt;
 0x00E8E8: 32 pointers (words) to the monster profiles in game.&lt;br /&gt;
 0x00E92A: Monster&#039;s profiles location. Monsters are numbered in-game from 00 to 20h (maximum) and profiles (10 bytes) are stored starting from here (0x4D4A in memory).&lt;br /&gt;
 0x00ED28: Sequence of 256 BYTES used as index for drawing the 2D map walls, listing all possible states of wall and doors (values from 00 to FF that refer to the graphic slot IDs inside MAPS.VGA).&lt;br /&gt;
 0x00F64F: List of 12 pointers to magic spells specific routines into code segment.&lt;br /&gt;
 0x00F669: List of 30 pointers to special events specific routines into code segment.&lt;br /&gt;
 0x00F6A5: List of 30 pointers to monster&#039;s profiles location in memory (each pointer is 1A from the other).&lt;br /&gt;
 0x00F703: VGA Palette - 300h bytes as RGB 256 colours&lt;br /&gt;
 0x00FB9D: Position on screen of the object&#039;s name in 2D map (monsters, furniture, heroes etc...) &lt;br /&gt;
&lt;br /&gt;
 0x013CDD: List of 31 (words) offsets of the HEROES frame animation (attack, defense, death) in MEN.VGA&lt;br /&gt;
 0x013D1B: List of 31 (words) frame dimensions (X,Y) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D59: List of 31 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D97: List of 8 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the monster animation frames in MONSTERS.VGA&lt;br /&gt;
 0x014125: Sequence of 42 offsets (84 bytes) to the tile graphic of the rooms and corridors of isometric map (01-13 points all to 1F80, the tile for the corridors)&lt;br /&gt;
 0x014179: Sequence of 2A bytes that are indexes of the tile graphic of the rooms and corridors of 2D map (01-13 are all 01, the index tile for the corridors)&lt;br /&gt;
&lt;br /&gt;
 0x014920: position on screen of a bar filled with 20h char used to delete the equipment names while moving the mouse over the icons&lt;br /&gt;
 0x014924: Text colour (1F is white)&lt;br /&gt;
 0x014925: Background colour (14 is transparent)&lt;br /&gt;
 0x014943: equipment names position on screen during a quest (the subsequent 28 zeroes are the placeholder)&lt;br /&gt;
&lt;br /&gt;
 0x014A42: Sequence of 7 pointers in language.bin of the potion effect texts&lt;br /&gt;
 0x00E472: Sequence of 5 pointers in language.bin of the potion finding texts (all but holy water and heroic brew, that has direct pointers inside the code)&lt;br /&gt;
 0x00E4FE: Sequence of 1Ch pointers in language.bin of the monsters names (2D map)&lt;br /&gt;
 0x00E536: Sequence of 30h index in maps.vga that assign names of the object (01=fallen rock, 00=all traps or hidden objects with no name, 03=Stairs) in OBJECT BLOCK order.&lt;br /&gt;
 0x00E566: 23h bitmasks that define which object is passable by projectiles&lt;br /&gt;
 0x00EE2D: Offsets (12) sequence of object icons in maps.vga (from ID 30 to 3B, 00D1 = fallen rock, goblin) 00D1&lt;br /&gt;
 0x00EE45: Offsets sequence of monster&#039;s icons in maps.vga (ID 00 = 40D3 = goblin)&lt;br /&gt;
&lt;br /&gt;
== Intro Sequence ==&lt;br /&gt;
Every text panel of the intro resides into &#039;&#039;&#039;INTRO.EXE&#039;&#039;&#039; and they&#039;re in English only.&amp;lt;br&amp;gt;&lt;br /&gt;
In order to translate them (or change the lenght of the text) you have to uncompress the exe first, then Locate every pointers of each panel.&amp;lt;br&amp;gt;&lt;br /&gt;
The data segment inside the exe starts at &#039;&#039;&#039;0x01C0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Panel # !! default pointer value !! pointer exe offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0603 || 0x0212&lt;br /&gt;
|-&lt;br /&gt;
| 2 || F203 || 0x0214&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 9B04 || 0x0216&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 8706 || 0x0218&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 7008 || 0x021A&lt;br /&gt;
|-&lt;br /&gt;
| 6 || CA0A || 0x021C&lt;br /&gt;
|}&lt;br /&gt;
The panels layout follows the same rules described under [[HeroQuest Strings Format]]&lt;br /&gt;
&lt;br /&gt;
 0x001675 Game font, this is the exact copy of the font in quest.exe (See various offests section above).&lt;br /&gt;
&lt;br /&gt;
= Protection screen =&lt;br /&gt;
to restore shield protection in UNCOMPRESSED QUEST.EXE modify&lt;br /&gt;
 offset 0x0541 from 90 90 90	to E8 DC FE		(if you modify these bytes only the shield screen stays and regardless of page entered the game starts anyway)&lt;br /&gt;
 offset 0x0549 from EB		to 74&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Quest_Format&amp;diff=12855</id>
		<title>HeroQuest Quest Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Quest_Format&amp;diff=12855"/>
		<updated>2026-06-15T20:43:52Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Monster Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D cell-based&lt;br /&gt;
 | Layers = N/A&lt;br /&gt;
 | Cell dimensions = 26&amp;amp;times;19 (isometric)&lt;br /&gt;
 | Cell viewport = max 6&amp;amp;times;5 (one single room)&lt;br /&gt;
 | Viewport = 320&amp;amp;times;200&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This page describes the mapping of the QUEST##.BIN files in [[HeroQuest]], which are used to describe one mission level. These files contain everything that is needed to generate a quest. The maps of the game, like in the board game, are always laid out as 26&amp;amp;times;19 squares.&lt;br /&gt;
&lt;br /&gt;
In theory, with this information, it could be possible to create a mission editor for the game. The only known restrictions are to stick with the Special events list, since it is hard-coded, and that no new missions can be added (at the moment) to the 2-page in-game list. So to add missions, you need to overwrite the original quests. Since the second page is for the &amp;quot;Return of the Witch Lord&amp;quot; expansion, a new expansion (fan made, or based on official expansions like &amp;quot;Kellar&#039;s Keep&amp;quot;) could be added as patch.&lt;br /&gt;
&lt;br /&gt;
== Format quirks ==&lt;br /&gt;
&lt;br /&gt;
* The game crashes if the file exceeds 2760h (10KB) in length.&lt;br /&gt;
* Some special event are hard coded in the engine, based on the quest number, and cannot be changed in the file.&lt;br /&gt;
&lt;br /&gt;
== Overall structure ==&lt;br /&gt;
&lt;br /&gt;
The overall structure of the file is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x000 || Map layer for rooms layout &lt;br /&gt;
|-&lt;br /&gt;
| 0x200 ||  Map layer for walls layout&lt;br /&gt;
|-&lt;br /&gt;
| 0x400 || Hero positions for all four heroes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40C || Special Events per room for treasures&lt;br /&gt;
|-&lt;br /&gt;
| 0x437 || Special Events per room for traps and hidden doors&lt;br /&gt;
|-&lt;br /&gt;
| 0x462 || Population block, with Monsters, Objects and Quest Text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following sections will describe each of these in detail.&lt;br /&gt;
&lt;br /&gt;
== Map Layers ==&lt;br /&gt;
&lt;br /&gt;
The file starts with two layers specifying different properties of the same map tiles; first the rooms layout, then the walls layout, with each block using one byte per tile. These blocks only need 26*19 bytes to contain all their data, but are padded to blocks of 0x200 bytes each.&lt;br /&gt;
&lt;br /&gt;
=== Rooms Layout ===&lt;br /&gt;
&lt;br /&gt;
This block starts at the beginning of the file. The rooms layout determines which area on the map is part of which room. Since the game is limited to showing rooms with a maximum dimension of 6x5, all paths are chopped up into different &#039;rooms&#039; as well. Rooms have numbers from 0 to 42. A value of 0 means the room is not used. Rooms 1 to 20 (0x14) are the pathways. The remaining range, from 21 to 42 (0x15 to 0x2A), are the main rooms.&lt;br /&gt;
&lt;br /&gt;
The default rooms layout with coordinates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19&lt;br /&gt;
    &lt;br /&gt;
00   01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04 05 05 05 05&lt;br /&gt;
01   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
02   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
03   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
04   01 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
05   06 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 08 08 18 18 18 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06   06 1B 1B 1B 1B 1C 1C 1C 1C 07 08 08 08 08 08 08 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
07   06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
08   06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
09   06 06 06 06 07 07 07 07 07 07 1F 1F 1F 1F 1F 1F 09 09 09 09 09 09 0A 0A 0A 0A&lt;br /&gt;
0A   0B 20 20 20 20 21 21 22 22 0C 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0B   0B 20 20 20 20 21 21 22 22 0C 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0C   0B 20 20 20 20 21 21 22 22 0C 0D 0D 0D 0D 0D 0D 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0D   0B 20 20 20 20 26 26 26 26 27 27 27 0D 0D 28 28 28 28 23 23 23 24 24 24 24 0F&lt;br /&gt;
0E   0B 25 25 25 25 26 26 26 26 27 27 27 0D 0D 28 28 28 28 29 29 29 2A 2A 2A 2A 0F&lt;br /&gt;
0F   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
10   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
11   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
12   10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The game only seems to accept 32 different rooms on one quest map. If a map exceeds this amount, the higher ones after 32 are used are displayed on the overhead map, and you can enter them, but no tiles are displayed. This is probably an engine limitation. Because of this, any inaccessible areas in the quest map are cleared to room 0. The numbers of the used rooms don&#039;t need to be consecutive, though, so the actual layout of the numbers is generally not changed. The few changes to room layout definitions that exist in the files all seem to be map errors. Some maps do have corridors that are shortened because of an obstruction, and in such cases the room type is generally also cleared to cut it off at that point.&lt;br /&gt;
&lt;br /&gt;
Example of the first level, &amp;quot;The Maze&amp;quot;. 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the layout. You can see that room 0x12 was cut off towards the north. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04 05 05 05 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 08 08 -- -- -- 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 08 08 08 08 08 08 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 06 06 06 07 07 07 07 07 07 1F 1F 1F 1F 1F 1F 09 09 09 09 09 09 0A 0A 0A 0A&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- -- -- -- -- 0D 0D 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 26 26 26 26 -- -- -- -- -- 28 28 28 28 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 0F&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Walls Layout ===&lt;br /&gt;
&lt;br /&gt;
This block starts at offset 0x200, and, like the room IDs, is one byte per tile. The values determine the walls around each tile, any doors set in them, and any special properties of these walls or doors. South and East walls and doors are not defined, since you can get the same effect by placing a North or West ones in the adjacent room, and the southern and eastern border of the entire map are automatically walls.&lt;br /&gt;
&lt;br /&gt;
Note that the perspective is isometric, so only the west (top left) and north (top right) walls are visible while playing. Because of this, some maps have errors where there are missing walls on openings that seem to lead to unused areas with room ID 00 when going to the east or south. In reality, the game will never indicate openings towards room 00 as passable, so the lack of wall makes no difference.&lt;br /&gt;
&lt;br /&gt;
Each byte in this block is made up of bit flags that can be combined. However, these bits are not just settings interpreted by the code; the full value made up of these bits also creates the index used to look up the corresponding sprite graphics. Because of this, the unused bit 0x02 can be used to mod alternate graphics into wall tiles, even if it has no real meaning to the game. Here are the meanings of each separate bit:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bin value !! Hex Value !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| 00000000 || 0x00 || None      &lt;br /&gt;
|-&lt;br /&gt;
| 00000001 || 0x01 || Do not draw this wall. Doors show up as a frame only. This is done with walls when the area goes around a corner behind the walls, to prevent them from overlapping the floor tiles.&lt;br /&gt;
|-&lt;br /&gt;
| 00000010 || 0x02 || Not used (only appears once in Quest 3) can be used in conjunction with 4th bit to change graphic for opened secret door&lt;br /&gt;
|-&lt;br /&gt;
| 00000100 || 0x04 || The door is Open (can&#039;t be applied if secret)&lt;br /&gt;
|-&lt;br /&gt;
| 00001000 || 0x08 || The door is Secret (can&#039;t be applied if open)&lt;br /&gt;
|-&lt;br /&gt;
| 00010000 || 0x10 || Door to the West&lt;br /&gt;
|-&lt;br /&gt;
| 00100000 || 0x20 || Door to the North&lt;br /&gt;
|-&lt;br /&gt;
| 01000000 || 0x40 || Wall to the West&lt;br /&gt;
|-&lt;br /&gt;
| 10000000 || 0x80 || Wall to the North&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example of the first level &amp;quot;The Maze&amp;quot;. 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the layout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C0 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80&lt;br /&gt;
40 C0 80 80 80 C0 80 80 80 C0 20 80 41 -- C0 80 80 80 80 80 80 80 80 80 80 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 10 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 C0 80 80 80 C0 80 80 80 40 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 18 -- -- 40 -- 40 -- -- C0 80 80 80 90 80 80 80 40&lt;br /&gt;
40 40 -- -- -- 10 -- -- -- C0 80 80 -- -- 81 81 80 40 -- -- -- 40 -- -- -- 10&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 C0 80 80 80 80 80 40 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 40 -- -- -- -- -- 40 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 81 81 29 80 80 80 80 80 -- 10 -- -- -- -- -- 10 81 81 21 81 81 80 80 80 00&lt;br /&gt;
40 C0 80 80 80 68 80 C0 80 C0 40 -- -- -- -- -- 40 C0 80 80 20 C0 80 80 80 40&lt;br /&gt;
40 40 -- -- -- 40 -- 10 -- 40 40 -- -- -- -- -- 40 18 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 10 -- -- -- 40 -- 40 -- 40 80 80 80 80 C0 80 -- 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 60 80 80 80 40 -- -- -- -- C0 80 80 20 41 -- -- 40 -- -- -- 40&lt;br /&gt;
40 C0 80 80 80 40 -- -- -- 40 -- -- -- -- 40 -- -- -- C0 80 80 -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 81 81 81 80 80 20 80 80 80 80 80 80 80 80 20 80 80 80 80 80 80 80 80 80 00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visualised as image, you get this:&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest-Quest1.png|624px]]&lt;br /&gt;
&lt;br /&gt;
Different rooms are indicated in different colours, with shades of grey used for the corridor &#039;rooms&#039;, and the room 0 (disabled) areas indicated in black. Doors are shown as white, secret doors as purple, drawn walls as dark red, and walls with the draw-suppression bit enabled are orange. To show the whole grid structure, &lt;br /&gt;
walls that are not enabled at all are indicated as dark purple.&lt;br /&gt;
&lt;br /&gt;
== Hero Positions ==&lt;br /&gt;
&lt;br /&gt;
At 0x400, after the two map layers, starts the hero positioning info. This gives the following structure for each hero:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Block Name!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]]||HeroX||Cell position X-coordinate of the barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x01||[[UINT8]]||HeroY||Cell position Y-coordinate of the barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]]||HeroFacing|| Animation frame for the hero, determining the facing.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This structure occurs four times, in this order:  Barbarian, Dwarf, Elf, Wizard.&lt;br /&gt;
&lt;br /&gt;
This table gives the facing frames for each hero:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Hero!!North!!East!!South!!West&lt;br /&gt;
|-&lt;br /&gt;
| Barbarian || 0x23 || 0x1D || 0x20 || 0x26&lt;br /&gt;
|-&lt;br /&gt;
| Dwarf     || 0x2F || 0x29 || 0x2C || 0x32&lt;br /&gt;
|-&lt;br /&gt;
| Elf       || 0x3B || 0x35 || 0x38 || 0x3E&lt;br /&gt;
|-&lt;br /&gt;
| Wizard    || 0x47 || 0x41 || 0x44 || 0x4A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Events ==&lt;br /&gt;
&lt;br /&gt;
The next sections, starting at 0x040C, are the Special Events. There are two of these: one for treasure searching (at 0x040C), and one for searching for traps and hidden doors (at 0x0437). They each take up 43 bytes, one for each of the room numbers specified in the [[#Rooms Layout|Rooms Layout]]. The lists seem to include the unused room 0.&lt;br /&gt;
&lt;br /&gt;
The list of special events:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Hex ID !! Dec ID !! Where !! Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 00 || None || No event.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || 01 || Chest || Trapped, you disarm it&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 02 || Chest || Trapped, -1 body point&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 03 || Cupboard  || 30 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 04 || Chest || Trapped, -1 body point, +100 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || 05 || Weapon rack || Spear&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 06 || Chest || 50 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 07 || Chest || 250 coins of prince magnus, the weight slows you&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 08 || Throne || Melar&#039;s key&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || 09 || Generic || Talisman of lore&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || 10 || Generic || Borin&#039;s armour&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || 11 || Chest || Karlen&#039;s 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 12 || Chest || 150 coins + wand of recall&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 13 || Chest || 100 coins (and the chest vanishes)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 14 || Generic || Shield&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 15 || Chest || Trapped, beware&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 16 || Chest || Trapped, gargoyle awakes&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 17 || Generic || Spirit blade&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 18 || Chest || 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 19 || Chest || 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 20 || Chest || 300 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 21 || Chest || 100 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 22 || Chest || Trapped, -1 body point&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 23 || Chest || Trapped, you disarm it&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 24 || Table || Agrain&#039;s keys (100 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 25 || 2 Chests || 200 coins x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 26 || Chest || 350 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 27 || Chest || 250 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 28 || Throne || 500 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 29 || Chest || Potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 30 || Generic || Mine entrance + 5000 coins, cannot attack (Coins are fake only in the &amp;quot;Castle of Mystery&amp;quot; mission)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, in QUEST17.BIN, the (hexadecimal) event contents are the following. Again, 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the data.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Room ID:  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A&lt;br /&gt;
Treasure  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 15 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 16 -- -- -- -- -- -- -- -- --&lt;br /&gt;
Traps     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 17 -- -- -- -- -- -- -- -- --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Population ==&lt;br /&gt;
&lt;br /&gt;
The population block, starting at 0x462, takes up the rest of the file. It has a header that specifies for each section where the data can be found. All pointers in this section are relative to the start of the population block.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Block Name!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||TextBlockStart||Relative pointer to where the [[#Quest Text Block|Quest Text Block]] starts. This is normally put at the end of the file.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT16LE]]||TextBlockSize||Size of the text block.&lt;br /&gt;
|-&lt;br /&gt;
|0x04||[[UINT16LE]]||MonstersBlockStart||Relative pointer to the [[#Monsters Block|Monsters Block]]. Each block is 10 bytes. This is normally put directly behind this header, at offset 0C.&lt;br /&gt;
|-&lt;br /&gt;
|0x06||[[UINT16LE]]||MonstersBlockSize||Size of the Monsters block. Divide by 10 to get the amount of monsters.&lt;br /&gt;
|-&lt;br /&gt;
|0x08||[[UINT16LE]]||ObjectsBlockStart||Relative pointer to the [[#Objects Block|Objects Block]].&lt;br /&gt;
|-&lt;br /&gt;
|0x0A||[[UINT16LE]]||NrOfObjects||Number of objects in the Objects Block.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After this come the sections, normally in the following order:&lt;br /&gt;
&lt;br /&gt;
* Monsters Block&lt;br /&gt;
* Objects block&lt;br /&gt;
* Quest Text Block&lt;br /&gt;
* A padding 0x00 byte. This is sometimes two bytes. Might be needed to serve as end of the last text item.&lt;br /&gt;
&lt;br /&gt;
=== Monsters Block ===&lt;br /&gt;
&lt;br /&gt;
Typically starts at offset 0x46E. Each monster block takes 10 bytes. The length of the full block is specified in the header in &amp;lt;tt&amp;gt;MonstersBlockSize&amp;lt;/tt&amp;gt;. Divide it by 10 to know the amount of monsters.&lt;br /&gt;
&lt;br /&gt;
The maximum amount of monsters the game can handle is 32, so that&#039;s most likely also the maximum amount that can be stored in this block.&lt;br /&gt;
&lt;br /&gt;
==== Monster Layout ====&lt;br /&gt;
&lt;br /&gt;
The monster layout is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:70px&amp;quot; | 00&lt;br /&gt;
| style=&amp;quot;width:70px&amp;quot; | [[UINT8]]&lt;br /&gt;
|| Seems to be a set of bit flags. It apparently needs to be 0x81 to have a properly functioning monster. If it is set to 0x00, the monster does not appear on the map at all. If it is set to just 0x80 or just 0x01, the monster can&#039;t be attacked except by spells. Only the Death Mist on Quest 17 uses value 0x01, but its special scripted code means it can not be interacted with at all.&lt;br /&gt;
|-&lt;br /&gt;
| 01 || [[UINT8]] || X starting position, from 0x00 to 0x19. Changes during the game as the monster moves.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || [[UINT8]] || Y starting position, from 0x00 to 0x12. Changes during the game as the monster moves.&lt;br /&gt;
|-&lt;br /&gt;
| 03 || [[UINT8]] || &#039;&#039;Placeholder&#039;&#039; for Monsters&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 04 || [[UINT16LE]] || &#039;&#039;Placeholder&#039;&#039; for Memory location of Monster&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 06 || [[UINT8]] || Monster condition bits, including spell effects. 0x00 = dead, 0x01 = alive, 0x02 = tempest, 0x04 = sleep. The Death Mist on Quest 17 has the highest bit (0x80) enabled.&lt;br /&gt;
|-&lt;br /&gt;
| 07 || [[UINT8]] || Higher 4 bits are for the Body points, and the lower 4 are for the Mind points, i.e. 0x13 = 1 BP, 3 MP. Changing BP doesn&#039;t affect the game though.&lt;br /&gt;
|-&lt;br /&gt;
| 08 || [[UINT8]] || Shown monster type; see monster types table below. This determines the graphics and name of the monster.&lt;br /&gt;
|-&lt;br /&gt;
| 09 || [[UINT8]] || Monster type stats; see monster types table below. This determines the Attack and Defense of the monster. This usually uses the same type as what it is shown as, but it can be changed to make the monster weaker or stronger than a monster of that type normally is. This also changes the Death Event of the monster.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first monster in the list is used as the &amp;quot;wandering monster&amp;quot; that might show up when you search a room. Its first byte is usually put to 0, so it won&#039;t show up on the map and acts purely as wandering monster template. However, it is perfectly possible to have a monster both serve as wandering monster &#039;&#039;and&#039;&#039; appear as physical entity on the map.&lt;br /&gt;
&lt;br /&gt;
==== Monster Types ====&lt;br /&gt;
&lt;br /&gt;
The list of monster types can be divided into four ranges:&lt;br /&gt;
&lt;br /&gt;
* The 00-0C range are the normal monsters.&lt;br /&gt;
* The 0D-13 range are special monsters only referenced in QUEST11.BIN. These are not actually used as monsters in Quest 11, but their stats are applied to the normal monsters by putting them in the &amp;quot;monster type stats&amp;quot; field. The stats themselves are actually unchanged, but this also makes them use the special death event of these new types, triggering the quest&#039;s gold reward. The Witch Lord from this range is not used.&lt;br /&gt;
* The 14-1B range contains the new monsters from the expansion.&lt;br /&gt;
* The last monster (1B), is a dummy entry containing a copy of the Orc, which is never used.&lt;br /&gt;
&lt;br /&gt;
As indicated in the previous section, the Body and Mind points can be individually changed in the monsters&#039; profiles in each QUESTXX.BIN file. The Movement, Attack, Defense and Death special event offset listed here are hardcoded in [[HeroQuest EXE File|QUEST.EXE]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
! Hex ID !! Dec ID !! Monster !! Graphic !! Body !! Mind !! Movement !! Attack !! Defense !! Death special event&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 00 || Goblin || Goblin || 01 || 01 || 0A || 02 || 01 || 0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x01 || 01 || Orc || Orc || 01 || 02 || 08 || 03 || 02 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x02 || 02 || Fimir || Fimir || 02 || 03 || 06 || 03 || 03 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x03 || 03 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x04 || 04 || Skeleton || Skeleton || 01 || 00 || 06 || 02 || 02 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x05 || 05 || Zombie || Zombie || 01 || 00 || 04 || 02 || 03 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x06 || 06 || Mummy || Mummy || 02 || 00 || 04 || 03 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x07 || 07 || Gargoyle || Gargoyle || 03 || 04 || 06 || 04 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x08 || 08 || Orc Warlord Ulag || Gargoyle || 02 || 03 || 0A || 04 || 05 ||  200C&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x09 || 09 || Orc Lord Grak || Orc || 03 || 03 || 08 || 04 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0A || 10 || Balur the Fire Mage || Gargoyle || 03 || 07 || 08 || 02 || 05 ||  2C0C&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0B || 11 || Stone Chaos Warrior || Gargoyle || 01 || 01 || 01 || 02 || 06 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0C || 12 || The Witch Lord || Gargoyle || 04 || 06 || 0A || 05 || 06 ||  0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 13 || The Witch Lord || Gargoyle || 04 || 06 || 06 || 03 || 05 || 0000&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x0E || 14 || Goblin || Goblin || 01 || 01 || 0A || 02 || 01 || 4A0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x0F || 15 || Orc || Orc || 01 || 02 || 08 || 03 || 02 || 520C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x10 || 16 || Fimir || Fimir || 02 || 03 || 06 || 03 || 03 || 7B0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x11 || 17 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 || 7B0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x12 || 18 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 || 6F0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x13 || 19 || Zombie || Zombie || 01 || 00 || 04 || 02 || 03 || 820C&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 20 || Spirit Rider || Chaos warrior || 03 || 03 || 08 || 04 || 03 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x15 || 21 || Death Mist|| No graphics || - || - || 06 || 04 || 03 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x16 || 22 || Bellthor || Gargoyle || 03 || 03 || 06 || 04 || 06 || B82B&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x17 || 23 || Skulmar || Gargoyle || 03|| 04 || 08 || 05 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x18 || 24 || Doomguard || Gargoyle || 03 || 03 || 06 || 04 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x19 || 25 || Witch Kessandria || Gargoyle || 03 || 04 || 06 || 04 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x1A || 26 || The Witch Lord || Gargoyle || 04 || 05 || 0A || 05 || 06 || DC2B&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 27 || Orc || Orc || - || - || 08 || 03 || 02 || 0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Objects Block ===&lt;br /&gt;
&lt;br /&gt;
Each object block takes 3 bytes. The length of the list of objects is specified in the header in &amp;lt;tt&amp;gt;NrOfObjects&amp;lt;/tt&amp;gt;. The full block length is &amp;lt;tt&amp;gt;NrOfObjects * 3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The object layout is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| 00 || [[UINT8]] || X position, from 0x00 to 0x19.&lt;br /&gt;
|-&lt;br /&gt;
| 01 || [[UINT8]] || Y position, from 0x00 to 0x12.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || [[UINT8]] || Object type; see table below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Objects appear to be stored in order of their ID, though it is unknown if this is a requirement.&lt;br /&gt;
&lt;br /&gt;
Multi-cell objects are made up of a defining indicator on the north-west origin-cell of the object, and filler objects on the other cells. These fillers are technically invisible objects, but they are important to ensure the entire object is considered impassable by the game. Each type has its own filler type; e.g. the tables in both directions both use the &amp;quot;table filler block&amp;quot;. It is important to use the correct type, since this determines the name that shows up when holding your mouse over these cells on the minimap. For example, Quest 5 has an Alchemy Table with Fireplace filler blocks, and the minimap will indeed show the wrong name on all tiles except the top left one. In the list below, these two types are indicated as &amp;quot;Origin&amp;quot; and &amp;quot;Filler&amp;quot; respectively.&lt;br /&gt;
&lt;br /&gt;
The Stairs that indicate the end (and sometimes start) of the Quest map are a special case in this; each of the cells is specifically defined, with its own piece of the graphics.&lt;br /&gt;
&lt;br /&gt;
Here is the full list of known object types. Types indicated with (*) are unused in the game levels, but might exist in-game for other reasons (e.g. sprung traps).&lt;br /&gt;
&lt;br /&gt;
IDs outside the range indicated in this list usually spawn bugged monsters which won&#039;t move or attack, and can&#039;t be attacked with normal weapons because they are always deemed &amp;quot;out of range&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex ID !! Dec ID !! Object&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 48 || Rock&lt;br /&gt;
|-&lt;br /&gt;
| 31 || 49 || Rock&amp;lt;sup&amp;gt;(*)&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 50 || Pit Trap - Hidden&lt;br /&gt;
|-&lt;br /&gt;
| 33 || 51 || Pit Trap - Opened&amp;lt;sup&amp;gt;(*)&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 52 || Falling Rock Trap&lt;br /&gt;
|-&lt;br /&gt;
| 35 || 53 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 54 || Spear Trap&lt;br /&gt;
|-&lt;br /&gt;
| 37 || 55 || Teleport&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 56 || Stairs Block 1 (NW)&lt;br /&gt;
|-&lt;br /&gt;
| 39 || 57 || Stairs Block 2 (SW)&lt;br /&gt;
|-&lt;br /&gt;
| 3A || 58 || Stairs Block 3 (NE)&lt;br /&gt;
|-&lt;br /&gt;
| 3B || 59 || Stairs Block 4 (SE)&lt;br /&gt;
|-&lt;br /&gt;
| 3C || 60 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3D || 61 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3E || 62 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3F || 63 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 40 || 64 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 41 || 65 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 66 || Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 43 || 67 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 44 || 68 || Torture Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 45 || 69 || Tomb (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 46 || 70 || Alchemy Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 47 || 71 || Fireplace (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 48 || 72 || Closet (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 49 || 73 || Library (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 4A || 74 || Armour Rack (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 4B || 75 || Table 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4C || 76 || Table 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4D || 77 || Torture 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4E || 78 || Torture 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4F || 79 || Alchemy 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 80 || Alchemy 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 51 || 81 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 52 || 82 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 53 || 83 || Tomb 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 54 || 84 || Closet 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 55 || 85 || Armour Rack 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 56 || 86 || Library 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 57 || 87 || Fireplace 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 58 || 88 || Library 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 59 || 89 || Fireplace 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5A || 90 || Closet 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5B || 91 || Armour Rack 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5C || 92 || Chest (South)&lt;br /&gt;
|-&lt;br /&gt;
| 5D || 93 || Chest (East)&lt;br /&gt;
|-&lt;br /&gt;
| 5E || 94 || Throne (South)&lt;br /&gt;
|-&lt;br /&gt;
| 5F || 95 || Throne (East)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Quest Text Block ===&lt;br /&gt;
&lt;br /&gt;
This block contains the briefing at the start of the Quest. Its X and Y positions are offsets on the scroll on which the text is shown.&lt;br /&gt;
&lt;br /&gt;
The full block consists of any number of text chunks, without any bytes in between the chunks. The 00 byte behind the last text chunk seems to serve as end point. If this 00 byte is not present, the game will ignore the length set in the header and will keep on reading and interpreting text entries. The 00 byte is not included in the text block length in the header.&lt;br /&gt;
&lt;br /&gt;
Each text chunk contained in this block is preceded by a small header consisting of an entry separator value and the X and Y coordinates.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Separator || Always 0x11. Is probably used to detect where the previous entry ends.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Y position || Y position in the scroll&#039;s matrix offsets; effectively the line number.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || X position || X position in the scroll&#039;s matrix offsets, to nicely center the text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This header is immediately followed by the text.&lt;br /&gt;
&lt;br /&gt;
== List of Quests ==&lt;br /&gt;
&lt;br /&gt;
The following list contains PC game specific information and differences with the boardgame version of the same quest. Quest 15-24 are from the &amp;quot;Return of the Witch Lord&amp;quot; expansion. All PC maps have a different layout than the boardgame. &amp;quot;Fixed&amp;quot; column refers to the current modding project carried out by [[User:theruler|theruler]] on [https://www.oldgamesitalia.net/forum/index.php?showtopic=27582 OldGamesItalia.net] (italian).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Dec ID !! Hex ID !! Quest name !! Quest specific rules differences with the boardgame !! Fixed&lt;br /&gt;
|-&lt;br /&gt;
| 01 || 00 || The Maze ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 02 || 01 || The Rescue of Sir Ragnar || &amp;lt;s&amp;gt;The content of the rooms is revealed but the doors remain closed.&amp;lt;/s&amp;gt; || Yes &lt;br /&gt;
|-&lt;br /&gt;
| 03 || 02 || Lair of the Orc Warlord ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 04 || 03 || Prince Magnus&#039; Gold ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 05 || 04 || Melar&#039;s Maze || &amp;lt;s&amp;gt;The Stone Gargoyle trap is not implemented&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 06 || 05 || Legacy of the Orc Warlord || &amp;lt;s&amp;gt;The equipment is correctly removed from the heroes, but they still keep the benefits.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 07 || 06 || The Lost Wizard ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 08 || 07 || The Fire Mage || &amp;lt;s&amp;gt;Balurs is a normal monster, doesn&#039;t have the ability to use fire magic or escape spell.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 09 || 08 || Race Against Time ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || 09 || Castle of Mystery || &amp;lt;s&amp;gt;Wandering monster instead of Ollar&#039;s text&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;inability to drop the mine gold&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Only one hero can take the gold&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;monsters cannot step in front of doors&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 0A || Bastion of Chaos ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || 0B || Barak Tor - Barrow of the Witch Lord || &amp;lt;s&amp;gt;The WL has standard movement instead of 1&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;the fake doors are not present.&amp;lt;/s&amp;gt;|| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 0C || Quest for the Spirit Blade || &amp;lt;s&amp;gt;The special fallen rock that blocks the backtrack of the heroes is not present.&amp;lt;/s&amp;gt; || Yes &lt;br /&gt;
|-&lt;br /&gt;
| 14 || 0D || Return to Barak Tor || &amp;lt;s&amp;gt;The WL can be killed by magic rather than being totally immune&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;epilogue text is missing&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 0E || The Gate of Doom || &amp;lt;s&amp;gt;The doors do not automatically open upon entering the first room / there are no fake doors.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 0F || The Cold Halls || Spirit raiders are weaker / and scattered on the map instead of inside their tombs || No&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 10 || The Silent Passages || The Myst cannot be killed / and have a fixed movement of 6 tiles || No&lt;br /&gt;
|-&lt;br /&gt;
| 18 || 11 || The Halls of Vision || &amp;lt;s&amp;gt;Keys of Agrain are found the very room before the stairs, the mummies are normal monsters and the doors do not disappear.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 19 || 12 || The Gate of Bellthor || The Bellthor is a normal monster, start attacking and doesn&#039;t wait till the last hero has entered the room, doesn&#039;t explode upon death and doesn&#039;t drain mind points. The door doesn&#039;t disappear || No&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 13 || Halls of the Dead || &amp;lt;s&amp;gt;All 4 heroes are not captured and start together with all the equipment&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;WL is not present and doesn&#039;t curse the heroes when entering the central room.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 21 || 14 || The Forgotten Legion || The legion is not frozen in the central room, but scattered on the map as normal monsters || No&lt;br /&gt;
|-&lt;br /&gt;
| 22 || 15 || The Forbidden Caverns || &amp;lt;s&amp;gt;There are no random monsters on the Xs&amp;lt;/s&amp;gt; / no already opened doors at the beginning || Partial&lt;br /&gt;
|-&lt;br /&gt;
| 23 || 15 || The Last Gate || Kessandria is a normal monster and does not escape if attacked / doesn&#039;t cast spells / &amp;lt;s&amp;gt;is not immune to magic&amp;lt;/s&amp;gt; || Partial&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 17 || The Court of the Witch Lord || &amp;lt;s&amp;gt;Doomguards are normal Chaos warriors&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Heroes start in the WL&#039;s room instead at the stairs&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;the WL is affected by all magic not only fire&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;WL doesn&#039;t summon monsters&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Stone orcs are normal orcs.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=map}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Engie File Converter]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canCreate = No&lt;br /&gt;
| canModify = No&lt;br /&gt;
| editHidden = No&lt;br /&gt;
| editMetadata = N/A&lt;br /&gt;
| notes = Visualization only. Cannot edit quests. Shows detailed analysis info.&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EQUESTS_Format&amp;diff=12854</id>
		<title>HeroQuest EQUESTS Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EQUESTS_Format&amp;diff=12854"/>
		<updated>2026-06-10T12:57:25Z</updated>

		<summary type="html">&lt;p&gt;Theruler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;EQUESTS.BIN contains the Quests names in each of the 5 languages.&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[UINT16LE]][10]|| Pointer block to the 10 pages (2 for each language, Page 1 Base quests, Page 2, Expansion quests)&lt;br /&gt;
|-&lt;br /&gt;
|0x014||[[UINT8]][10]|| First Page Header, contains box info and number of entries&lt;br /&gt;
|-&lt;br /&gt;
|0x01E||[[UINT8]][03]|| Line start code with coordinates: 11 YY XX&lt;br /&gt;
|-&lt;br /&gt;
|0x021||[[char]][variable]|| Title of the first quest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All the rest of the lines and pages that follow have the same structure. Only the pointer block is unique.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation project mapped the format of the strings files.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EQUESTS_Format&amp;diff=12853</id>
		<title>HeroQuest EQUESTS Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EQUESTS_Format&amp;diff=12853"/>
		<updated>2026-06-10T12:54:53Z</updated>

		<summary type="html">&lt;p&gt;Theruler: Created page with &amp;quot;EQUESTS.BIN contains the Quests names in each of the 5 languages.  The internal format is the following:  {|class=&amp;quot;wikitable&amp;quot; !Offset!!Data type!!Description |- |0x000||UINT16LE[10]|| Pointer block to the 10 pages (2 for each language, Page 1 Base quests, Page 2, Expansion quests) |- |0x014||UINT8[10]|| First Page Header, contains box info and number of entries |- |0x01E||UINT8[03]|| Line start code with coordinates: 11 YY XX |- |0x021||char[variable]|| T...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;EQUESTS.BIN contains the Quests names in each of the 5 languages.&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[UINT16LE]][10]|| Pointer block to the 10 pages (2 for each language, Page 1 Base quests, Page 2, Expansion quests)&lt;br /&gt;
|-&lt;br /&gt;
|0x014||[[UINT8]][10]|| First Page Header, contains box info and number of entries&lt;br /&gt;
|-&lt;br /&gt;
|0x01E||[[UINT8]][03]|| Line start code with coordinates: 11 YY XX&lt;br /&gt;
|-&lt;br /&gt;
|0x021||[[char]][variable]|| Title of the first quest&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest&amp;diff=12852</id>
		<title>HeroQuest</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest&amp;diff=12852"/>
		<updated>2026-06-10T12:40:14Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* File formats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = Edit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeroQuest&#039;&#039;&#039; for DOS was developed by [https://www.mobygames.com/company/3546/221b-software-development/ 221b Software Development] and Published by [https://www.mobygames.com/company/114/infogrames-studios-limited/ Gremlin Graphics Software Limited] in 1991.&lt;br /&gt;
&lt;br /&gt;
It is the earliest computer implementation of the HeroQuest board game published by Milton Bradley Company in association with Games Workshop in 1989 (europe/Australia) and in 1990 (US/Canada), where you take the role of four heroes; a Barbarian, a Dwarf, an Elf and a Mage; and dive deep into the dungeon of the Witch Lord to defeat his army of monsters and finally confront his magic. It consists of 14 quests (the DOS game includes the first expansion with 10 additional quests) where you fight, search for traps or secret passages, and collect special items and gold. Said gold can be spent between missions to buy more powerful equipment.&lt;br /&gt;
&lt;br /&gt;
The base mechanics are mostly the same as the boardgame (moving, attacking, defending, searching, performing magic) with some changes to enhance the gameplay on the new media (see link section).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) Codec by Shelwien from Encode.su]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Language and Sprite/Graphic files are LZ compressed&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/BenCastricum/unp UNP by Ben Castricum]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
| notes = EXE are compressed with EXEPACKER&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://imagej.net/ij/index.html Imagej]&lt;br /&gt;
| Platform = Multi&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Java Image editor that can import and export RAW files&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Westwood Font Editor]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Font resides in intro.exe and quest.exe and they have to be manually exported/imported&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Engie File Converter]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Read&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Quest map viewer&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
==File formats==&lt;br /&gt;
&lt;br /&gt;
The following file formats are used by this game.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList|header=false}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUESTxx.BIN&lt;br /&gt;
 | Format = [[HeroQuest Quest Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files that contains Map, Monster, Traps layouts and Quest mission text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = [language].BIN&lt;br /&gt;
 | Format = [[HeroQuest Strings Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary compressed files with in-game text in five languages (ENGLISH, GERMAN, FRENCH, SPANISH, ITALIAN).&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = EQUESTS.BIN&lt;br /&gt;
 | Format = [[HeroQuest EQUESTS Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary file with quest names.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EGA&lt;br /&gt;
 | Format = [[Raw EGA data]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 4bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.VGA&lt;br /&gt;
 | Format = [[Raw VGA Image]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 8bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUEST.SAV&lt;br /&gt;
 | Format = [[HeroQuest Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Savegame file created by QUEST.EXE&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUEST.CFG&lt;br /&gt;
 | Format = [[HeroQuest Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Configuration file created by HERO.EXE&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EXE&lt;br /&gt;
 | Format = [[HeroQuest EXE File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = QUEST.EXE contains Program-related text and the EPILOGUE, INTRO.EXE contains the INTRO panels text.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = GAME&amp;amp;FX.RLD&lt;br /&gt;
 | Format = [[HeroQuest Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Roland Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = GAME&amp;amp;FX.ALB&lt;br /&gt;
 | Format = [[HeroQuest Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Adlib Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* The decompression program was done by Shelwien from [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) encode.su forum]&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation and modding project mapped the format of the BIN and the savegame files.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* [https://www.oldgamesitalia.net/forum/index.php?showtopic=27582 OldGamesItalia.net forum discussion about the game] where everything started (in Italian), with research and development on the project by TheRuler.&lt;br /&gt;
* [http://forum.yeoldeinn.com/viewtopic.php?t=5588 Comparison forum topic on Ye Olde Inn] with all the gameplay differences between the computer game and the board game, by kurgan.&lt;br /&gt;
&lt;br /&gt;
[[Category:Turn-Based Strategy]]&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest&amp;diff=12851</id>
		<title>HeroQuest</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest&amp;diff=12851"/>
		<updated>2026-06-10T12:38:24Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* File formats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = Edit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeroQuest&#039;&#039;&#039; for DOS was developed by [https://www.mobygames.com/company/3546/221b-software-development/ 221b Software Development] and Published by [https://www.mobygames.com/company/114/infogrames-studios-limited/ Gremlin Graphics Software Limited] in 1991.&lt;br /&gt;
&lt;br /&gt;
It is the earliest computer implementation of the HeroQuest board game published by Milton Bradley Company in association with Games Workshop in 1989 (europe/Australia) and in 1990 (US/Canada), where you take the role of four heroes; a Barbarian, a Dwarf, an Elf and a Mage; and dive deep into the dungeon of the Witch Lord to defeat his army of monsters and finally confront his magic. It consists of 14 quests (the DOS game includes the first expansion with 10 additional quests) where you fight, search for traps or secret passages, and collect special items and gold. Said gold can be spent between missions to buy more powerful equipment.&lt;br /&gt;
&lt;br /&gt;
The base mechanics are mostly the same as the boardgame (moving, attacking, defending, searching, performing magic) with some changes to enhance the gameplay on the new media (see link section).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) Codec by Shelwien from Encode.su]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Language and Sprite/Graphic files are LZ compressed&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/BenCastricum/unp UNP by Ben Castricum]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
| notes = EXE are compressed with EXEPACKER&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://imagej.net/ij/index.html Imagej]&lt;br /&gt;
| Platform = Multi&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Java Image editor that can import and export RAW files&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Westwood Font Editor]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Font resides in intro.exe and quest.exe and they have to be manually exported/imported&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Engie File Converter]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Read&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Quest map viewer&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
==File formats==&lt;br /&gt;
&lt;br /&gt;
The following file formats are used by this game.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList|header=false}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUESTxx.BIN&lt;br /&gt;
 | Format = [[HeroQuest Quest Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files that contains Map, Monster, Traps layouts and Quest mission text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = [language].BIN&lt;br /&gt;
 | Format = [[HeroQuest Strings Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary compressed files with in-game text in five languages (ENGLISH, GERMAN, FRENCH, SPANISH, ITALIAN).&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = EQUESTS.BIN&lt;br /&gt;
 | Format = [[HeroQuest EQUEST Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary file with quest names.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EGA&lt;br /&gt;
 | Format = [[Raw EGA data]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 4bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.VGA&lt;br /&gt;
 | Format = [[Raw VGA Image]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 8bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUEST.SAV&lt;br /&gt;
 | Format = [[HeroQuest Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Savegame file created by QUEST.EXE&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUEST.CFG&lt;br /&gt;
 | Format = [[HeroQuest Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Configuration file created by HERO.EXE&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EXE&lt;br /&gt;
 | Format = [[HeroQuest EXE File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = QUEST.EXE contains Program-related text and the EPILOGUE, INTRO.EXE contains the INTRO panels text.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = GAME&amp;amp;FX.RLD&lt;br /&gt;
 | Format = [[HeroQuest Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Roland Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = GAME&amp;amp;FX.ALB&lt;br /&gt;
 | Format = [[HeroQuest Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Adlib Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* The decompression program was done by Shelwien from [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) encode.su forum]&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation and modding project mapped the format of the BIN and the savegame files.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* [https://www.oldgamesitalia.net/forum/index.php?showtopic=27582 OldGamesItalia.net forum discussion about the game] where everything started (in Italian), with research and development on the project by TheRuler.&lt;br /&gt;
* [http://forum.yeoldeinn.com/viewtopic.php?t=5588 Comparison forum topic on Ye Olde Inn] with all the gameplay differences between the computer game and the board game, by kurgan.&lt;br /&gt;
&lt;br /&gt;
[[Category:Turn-Based Strategy]]&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12841</id>
		<title>HeroQuest Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12841"/>
		<updated>2026-05-20T18:32:44Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Spells cast on HERO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The QUEST.SAV file in [[HeroQuest]] contains the saved character data. Characters can be saved between quests.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Character names, stats, gold, quest object, inventory. various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The file holds the 8 slots for each of the four characters of the game, split into two sections. The first section are the (in-game editable) names of all the characters, the second half contains all the characters&#039; actual information and inventories.&lt;br /&gt;
&lt;br /&gt;
Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
This is how a default savegame looks like in an hex editor:&lt;br /&gt;
&lt;br /&gt;
[[File:Savegame.jpg|320px]]&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Repeats!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[char]][17]||8||SIGMAR||Name of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x088||[[char]][17]||8||GRUNGI||Name of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x110||[[char]][17]||8||LADRIL||Name of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x198||[[char]][17]||8||ZOLTAR||Name of the Wizard&lt;br /&gt;
|-&lt;br /&gt;
|0x220||[[BYTE]][26]||8||Zeroes||Inventory of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x2F0||[[BYTE]][26]||8||Zeroes||Inventory of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x3C0||[[BYTE]][26]||8||Zeroes||Inventory of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x490||[[BYTE]][26]||8||Zeroes||Inventory of the Wizard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Name sections ==&lt;br /&gt;
&lt;br /&gt;
The names are in typical zero-terminated format, and can be a maximum of 16 characters in length. If a savegame is edited to have data in the remaining name part, it will not be read, and the space will be cleared to zeroes when re-saved.&lt;br /&gt;
&lt;br /&gt;
The name normally only accepts uppercase characters. If lowercase characters are edited into the savegame file, it becomes clear that the lowercase range of the font is used for special accented characters. Some characters in the range are completely empty, but they still offer clickable space.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_savegame_lowercase_name.png]]&lt;br /&gt;
&lt;br /&gt;
If the first byte in a name is set to a 00 byte, the entry becomes unclickable in the user interface, effectively making it permanently unusable. There is a bug in the game where this can occur when you change the name of a character and confirm without filling in anything, and then save the character data.&lt;br /&gt;
&lt;br /&gt;
== Inventory sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;4&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BAR!!style=width:2em|DWA!!style=width:2em|ELF!!style=width:2em|WIZ&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[BYTE]]||00||00||00||00||Character game status: 00=in menu  FF=in quest&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || [[UINT8]][2]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s position on the map XXYY. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT16LE]]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Memory location of Hero&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[UINT8]]||08||07||06||04||Body points, 0-9 shows a figure, higher values work but the game shows the rest of the fonts.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[UINT8]]||02||03||04||06||Mind points, same as above.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]]||26||2C||38||44||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s facing sprite. See [[HeroQuest Quest Format#Hero Positions|Hero Positions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]]||0000||0000||0000||0000||Amount of gold coins in stash (bytes &amp;quot;88 13&amp;quot; = 5000 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[BYTE]]||00||00||38||07||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Water and Air); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||00||00||00||3F||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Fire and Earth); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||00||00||00||00||Owned special items bit mask; see [[#Special Items|Special Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||00||00||00||00||Owned weapons bit mask; see [[#Weapon Items|Weapon Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||00||80||00||00||Owned armour bit mask; see [[#Armour Items|Armour Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||00||00||00||00||Owned potions bit mask; see [[#Potions|Potions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||00||00||00||00||Equipped weapon. Same values as owned weapons, but only one weapon (or special weapon) can be active.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||00||00||00||Equipped special items. Same values as owned special items. Combines any equipped special weapon and armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||00||00||00||Equipped armour. Same values as owned armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[UINT8]]||03||02||02||01||Base attack dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]]||02||02||02||02||Base defence dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast by HERO|Spells cast by HERO]] during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for used [[#Potions|Potions]] effect bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast on HERO|Spells cast on HERO]] bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[UINT8]]||00||01||02||03||Character id used for attack animation and map icon (04=Sir Ragnar/Manfred)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Upon loading a slot the equipment is copied in memory at these locations:&lt;br /&gt;
 0B6B:4663 Barbarian&lt;br /&gt;
 0B6B:467D Dwarf&lt;br /&gt;
 0B6B:4697 Elf&lt;br /&gt;
 0B6B:46B1 Mage&lt;br /&gt;
 0B6B:46CA Ragnar/Manfred&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Equipment ===&lt;br /&gt;
&lt;br /&gt;
The equipment is saved in bits, which are combined into full values. So a value of 0x00 means completely empty, and 0xFF means all are enabled. The equipment bits are used for both ownership and to store which items are currently equipped.&lt;br /&gt;
&lt;br /&gt;
There are three classes of equipment: weapons, armour, and special quest items. In terms of equipped items, there are limitations on which bits can effectively be combined together. The player can only equip one helmet on their head and one armour on their body, and can have a light weapon in their primary hand and a shield in their secondary hand, or the Battle Axe taking up both hands. These rules are enforced when the game evaluates the equipped item bits, taking both normal and special items into account.&lt;br /&gt;
&lt;br /&gt;
==== Weapon Items ====&lt;br /&gt;
&lt;br /&gt;
The Weapons follow the order of the equipment on the screen, with the lowest bit indicating the first item, but since they do not include the armour, and the Tool Kit is equipped as weapon, that one takes up the eighth weapon value.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_equipment.png]]&lt;br /&gt;
&lt;br /&gt;
Weapon items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Staff || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Short Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Broad Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Battle Axe || Primary and secondary hands&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Crossbow || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Hand Axe || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Spear || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Tool Kit || Primary hand&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Armour Items ====&lt;br /&gt;
&lt;br /&gt;
Like the weapons, the Armour types follow their order on the inventory screen, with the Shield as the lowest value. The higher bits are used for special situations. &lt;br /&gt;
&lt;br /&gt;
Armour items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Shield || Secondary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Helmet || Head&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Chain Mail || Body&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Plate Armour || Body&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Unknown / not used ||  &lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || The hero cannot attack or defend || Used in Mine&#039;s gold quest and Manfred&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Only one die for movement || Used when carrying treasure chests&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Dwarf&#039;s Tool Kit || Dwarf only (this special item appears during quests but not in armoury)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Special Items ====&lt;br /&gt;
&lt;br /&gt;
Like the normal items, special items are saved as single bits that can be combined into a full value. They follow the layout of the special items on screen, with the lowest bit indicating the first item.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_Special.png]]&lt;br /&gt;
&lt;br /&gt;
The special items are:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on !! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Borin&#039;s Armour || Body || Despite showing a helmet as icon, this item is considered body armour and can be combined with the helmet.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Wand of Recall || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Talisman of Lore || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Orc&#039;s Bane || Primary hand ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Spirit Blade || Primary hand ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000001 = 01 = Borin&#039;s Armour Only&lt;br /&gt;
* 00010100 = 14 = Talisman of Lore and Spirit Blade&lt;br /&gt;
* 00011111 = 1F = everything&lt;br /&gt;
&lt;br /&gt;
==== Spells ====&lt;br /&gt;
&lt;br /&gt;
Like the other items, spells are saved as single bits that can be combined into a full value. In the save file, though, these bytes are only a placeholders for the spells once the file is loaded into memory. There are two separate 8 bit masks; the first for Water and Air, and the second for Fire and Earth.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! 0x0B Spell name (Type) !! 0x0C Spell name (Type)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist (Water) || Courage (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Water of healing (Water) || Ball of flame (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Sleep (Water) || Fire of wrath (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Tempest (Air) || Pass through rock (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Swift wind (Air) || Rock skin (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Genie /attack (Air) || Body healing (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || not used || Genie /reveal (air)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used || not used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000111 = 07 = all three Water (0B) or Fire (0C) spells&lt;br /&gt;
* 00111000 = 38 = all three Air (0B) or Earth (0C) spells&lt;br /&gt;
* 00111111 = 3F = all Water and Air (0B) or Fire and Earth (0C) spells&lt;br /&gt;
* 00000100 = 04 = only sleep (0B) or fire of wrath (0C) spell&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Spells cast by HERO ====&lt;br /&gt;
&lt;br /&gt;
This time it doesn&#039;t seem to be a bit mask, just plain hex values used to populate the effect slot (0x18), remove the spell in 0x0B or 0x0C and then erased.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Spell Name !! Spell effect !! LOS required !! Duration&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Veil of mist (Water) || Invisibility || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Water of healing (Water) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Sleep (Water) || Lose N turns || yes || until attacked or if he rolls a 6&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Tempest (Air) || Lose a turn || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Swift wind (Air) || 2x movement || yes || next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Genie (Air) || 5 Attack dice  || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Courage (Fire) || +2 Attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Ball of flame (Fire) || 2 attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Fire of wrath (Fire) || 1 Attack dice || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Pass through rock (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Rock skin (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Body healing (Earth) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Genie (Air) || Reveal a room || no || hero attack phase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Potions ====&lt;br /&gt;
&lt;br /&gt;
Potions follow the same principle of all other bit masks. The only exceptions is they get wiped once you start a new quest. This can be bypassed with a simple hack since the save and load features correctly process that byte.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Potion Name !! Potion effect&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Potion of Strength || +2 attack dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Potion of Resilience || +2 defence dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Holy Water || Kills every undead in the room&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Potion of Speed || 2x movement in the next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Heroic Brew || 2x attack in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* 01111111 = 7F = All potions&lt;br /&gt;
* 00001100 = 0C = Two potions of Healing&lt;br /&gt;
* 00000011 = 03 = Strength and Resilience&lt;br /&gt;
&lt;br /&gt;
==== Spells cast on HERO ====&lt;br /&gt;
&lt;br /&gt;
Only the effects that last at least one round appear in this bit mask (0x18).&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Spell Name !! Spell effect !! Duration (PC) !! Duration (board game)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist || Invisibility || next monster phase || next monster phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Sleep || Lose a turn || until you throw a 6|| until you throw a 6 or if attacked &lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Tempest || Lose a turn || next hero phase || next hero phase&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Swift wind || Double movement || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Courage || +2 Attack dice || next attack phase || until no monster are visible by the hero anymore&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Pass through rock || Self explanatory || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Rock skin || +2 Defense dice || next defense phase || until the hero suffers a wound&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Pass through rock  || delayed effect if casted on the caster || next turn || next movement phase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Courage, Rock skin and sleep effects differ from the original board game.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12835</id>
		<title>HeroQuest Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12835"/>
		<updated>2026-04-30T16:02:52Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Inventory sections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The QUEST.SAV file in [[HeroQuest]] contains the saved character data. Characters can be saved between quests.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Character names, stats, gold, quest object, inventory. various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The file holds the 8 slots for each of the four characters of the game, split into two sections. The first section are the (in-game editable) names of all the characters, the second half contains all the characters&#039; actual information and inventories.&lt;br /&gt;
&lt;br /&gt;
Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
This is how a default savegame looks like in an hex editor:&lt;br /&gt;
&lt;br /&gt;
[[File:Savegame.jpg|320px]]&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Repeats!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[char]][17]||8||SIGMAR||Name of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x088||[[char]][17]||8||GRUNGI||Name of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x110||[[char]][17]||8||LADRIL||Name of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x198||[[char]][17]||8||ZOLTAR||Name of the Wizard&lt;br /&gt;
|-&lt;br /&gt;
|0x220||[[BYTE]][26]||8||Zeroes||Inventory of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x2F0||[[BYTE]][26]||8||Zeroes||Inventory of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x3C0||[[BYTE]][26]||8||Zeroes||Inventory of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x490||[[BYTE]][26]||8||Zeroes||Inventory of the Wizard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Name sections ==&lt;br /&gt;
&lt;br /&gt;
The names are in typical zero-terminated format, and can be a maximum of 16 characters in length. If a savegame is edited to have data in the remaining name part, it will not be read, and the space will be cleared to zeroes when re-saved.&lt;br /&gt;
&lt;br /&gt;
The name normally only accepts uppercase characters. If lowercase characters are edited into the savegame file, it becomes clear that the lowercase range of the font is used for special accented characters. Some characters in the range are completely empty, but they still offer clickable space.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_savegame_lowercase_name.png]]&lt;br /&gt;
&lt;br /&gt;
If the first byte in a name is set to a 00 byte, the entry becomes unclickable in the user interface, effectively making it permanently unusable. There is a bug in the game where this can occur when you change the name of a character and confirm without filling in anything, and then save the character data.&lt;br /&gt;
&lt;br /&gt;
== Inventory sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;4&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BAR!!style=width:2em|DWA!!style=width:2em|ELF!!style=width:2em|WIZ&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[BYTE]]||00||00||00||00||Character game status: 00=in menu  FF=in quest&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || [[UINT8]][2]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s position on the map XXYY. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT16LE]]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Memory location of Hero&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[UINT8]]||08||07||06||04||Body points, 0-9 shows a figure, higher values work but the game shows the rest of the fonts.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[UINT8]]||02||03||04||06||Mind points, same as above.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]]||26||2C||38||44||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s facing sprite. See [[HeroQuest Quest Format#Hero Positions|Hero Positions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]]||0000||0000||0000||0000||Amount of gold coins in stash (bytes &amp;quot;88 13&amp;quot; = 5000 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[BYTE]]||00||00||38||07||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Water and Air); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||00||00||00||3F||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Fire and Earth); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||00||00||00||00||Owned special items bit mask; see [[#Special Items|Special Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||00||00||00||00||Owned weapons bit mask; see [[#Weapon Items|Weapon Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||00||80||00||00||Owned armour bit mask; see [[#Armour Items|Armour Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||00||00||00||00||Owned potions bit mask; see [[#Potions|Potions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||00||00||00||00||Equipped weapon. Same values as owned weapons, but only one weapon (or special weapon) can be active.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||00||00||00||Equipped special items. Same values as owned special items. Combines any equipped special weapon and armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||00||00||00||Equipped armour. Same values as owned armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[UINT8]]||03||02||02||01||Base attack dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]]||02||02||02||02||Base defence dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast by HERO|Spells cast by HERO]] during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for used [[#Potions|Potions]] effect bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast on HERO|Spells cast on HERO]] bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[UINT8]]||00||01||02||03||Character id used for attack animation and map icon (04=Sir Ragnar/Manfred)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Upon loading a slot the equipment is copied in memory at these locations:&lt;br /&gt;
 0B6B:4663 Barbarian&lt;br /&gt;
 0B6B:467D Dwarf&lt;br /&gt;
 0B6B:4697 Elf&lt;br /&gt;
 0B6B:46B1 Mage&lt;br /&gt;
 0B6B:46CA Ragnar/Manfred&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Equipment ===&lt;br /&gt;
&lt;br /&gt;
The equipment is saved in bits, which are combined into full values. So a value of 0x00 means completely empty, and 0xFF means all are enabled. The equipment bits are used for both ownership and to store which items are currently equipped.&lt;br /&gt;
&lt;br /&gt;
There are three classes of equipment: weapons, armour, and special quest items. In terms of equipped items, there are limitations on which bits can effectively be combined together. The player can only equip one helmet on their head and one armour on their body, and can have a light weapon in their primary hand and a shield in their secondary hand, or the Battle Axe taking up both hands. These rules are enforced when the game evaluates the equipped item bits, taking both normal and special items into account.&lt;br /&gt;
&lt;br /&gt;
==== Weapon Items ====&lt;br /&gt;
&lt;br /&gt;
The Weapons follow the order of the equipment on the screen, with the lowest bit indicating the first item, but since they do not include the armour, and the Tool Kit is equipped as weapon, that one takes up the eighth weapon value.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_equipment.png]]&lt;br /&gt;
&lt;br /&gt;
Weapon items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Staff || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Short Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Broad Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Battle Axe || Primary and secondary hands&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Crossbow || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Hand Axe || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Spear || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Tool Kit || Primary hand&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Armour Items ====&lt;br /&gt;
&lt;br /&gt;
Like the weapons, the Armour types follow their order on the inventory screen, with the Shield as the lowest value. The higher bits are used for special situations. &lt;br /&gt;
&lt;br /&gt;
Armour items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Shield || Secondary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Helmet || Head&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Chain Mail || Body&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Plate Armour || Body&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Unknown / not used ||  &lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || The hero cannot attack or defend || Used in Mine&#039;s gold quest and Manfred&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Only one die for movement || Used when carrying treasure chests&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Dwarf&#039;s Tool Kit || Dwarf only (this special item appears during quests but not in armoury)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Special Items ====&lt;br /&gt;
&lt;br /&gt;
Like the normal items, special items are saved as single bits that can be combined into a full value. They follow the layout of the special items on screen, with the lowest bit indicating the first item.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_Special.png]]&lt;br /&gt;
&lt;br /&gt;
The special items are:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on !! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Borin&#039;s Armour || Body || Despite showing a helmet as icon, this item is considered body armour and can be combined with the helmet.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Wand of Recall || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Talisman of Lore || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Orc&#039;s Bane || Primary hand ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Spirit Blade || Primary hand ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000001 = 01 = Borin&#039;s Armour Only&lt;br /&gt;
* 00010100 = 14 = Talisman of Lore and Spirit Blade&lt;br /&gt;
* 00011111 = 1F = everything&lt;br /&gt;
&lt;br /&gt;
==== Spells ====&lt;br /&gt;
&lt;br /&gt;
Like the other items, spells are saved as single bits that can be combined into a full value. In the save file, though, these bytes are only a placeholders for the spells once the file is loaded into memory. There are two separate 8 bit masks; the first for Water and Air, and the second for Fire and Earth.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! 0x0B Spell name (Type) !! 0x0C Spell name (Type)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist (Water) || Courage (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Water of healing (Water) || Ball of flame (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Sleep (Water) || Fire of wrath (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Tempest (Air) || Pass through rock (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Swift wind (Air) || Rock skin (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Genie /attack (Air) || Body healing (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || not used || Genie /reveal (air)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used || not used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000111 = 07 = all three Water (0B) or Fire (0C) spells&lt;br /&gt;
* 00111000 = 38 = all three Air (0B) or Earth (0C) spells&lt;br /&gt;
* 00111111 = 3F = all Water and Air (0B) or Fire and Earth (0C) spells&lt;br /&gt;
* 00000100 = 04 = only sleep (0B) or fire of wrath (0C) spell&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Spells cast by HERO ====&lt;br /&gt;
&lt;br /&gt;
This time it doesn&#039;t seem to be a bit mask, just plain hex values used to populate the effect slot (0x18), remove the spell in 0x0B or 0x0C and then erased.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Spell Name !! Spell effect !! LOS required !! Duration&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Veil of mist (Water) || Invisibility || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Water of healing (Water) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Sleep (Water) || Lose N turns || yes || until attacked or if he rolls a 6&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Tempest (Air) || Lose a turn || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Swift wind (Air) || 2x movement || yes || next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Genie (Air) || 5 Attack dice  || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Courage (Fire) || +2 Attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Ball of flame (Fire) || 2 attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Fire of wrath (Fire) || 1 Attack dice || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Pass through rock (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Rock skin (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Body healing (Earth) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Genie (Air) || Reveal a room || no || hero attack phase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Potions ====&lt;br /&gt;
&lt;br /&gt;
Potions follow the same principle of all other bit masks. The only exceptions is they get wiped once you start a new quest. This can be bypassed with a simple hack since the save and load features correctly process that byte.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Potion Name !! Potion effect&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Potion of Strength || +2 attack dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Potion of Resilience || +2 defence dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Holy Water || Kills every undead in the room&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Potion of Speed || 2x movement in the next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Heroic Brew || 2x attack in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* 01111111 = 7F = All potions&lt;br /&gt;
* 00001100 = 0C = Two potions of Healing&lt;br /&gt;
* 00000011 = 03 = Strength and Resilience&lt;br /&gt;
&lt;br /&gt;
==== Spells cast on HERO ====&lt;br /&gt;
&lt;br /&gt;
Only the effects that last at least one round appear in this bit mask (0x18).&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Spell Name !! Spell effect !! Duration (PC) !! Duration (board game)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist || Invisibility || next monster phase || next monster phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Sleep || Lose a turn || until you throw a 6|| until you throw a 6 or if attacked &lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Tempest || Lose a turn || next hero phase || next hero phase&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Swift wind || Double movement || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Courage || +2 Attack dice || next attack phase || until no monster are visible by the hero anymore&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Pass through rock || Self explanatory || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Rock skin || +2 Defense dice || next defense phase || until the hero suffers a wound&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || -- || -- || --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Courage, Rock skin and sleep effects differ from the original board game.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12831</id>
		<title>HeroQuest Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12831"/>
		<updated>2026-04-11T08:25:51Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Armour Items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The QUEST.SAV file in [[HeroQuest]] contains the saved character data. Characters can be saved between quests.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Character names, stats, gold, quest object, inventory. various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The file holds the 8 slots for each of the four characters of the game, split into two sections. The first section are the (in-game editable) names of all the characters, the second half contains all the characters&#039; actual information and inventories.&lt;br /&gt;
&lt;br /&gt;
Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
This is how a default savegame looks like in an hex editor:&lt;br /&gt;
&lt;br /&gt;
[[File:Savegame.jpg|320px]]&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Repeats!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[char]][17]||8||SIGMAR||Name of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x088||[[char]][17]||8||GRUNGI||Name of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x110||[[char]][17]||8||LADRIL||Name of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x198||[[char]][17]||8||ZOLTAR||Name of the Wizard&lt;br /&gt;
|-&lt;br /&gt;
|0x220||[[BYTE]][26]||8||Zeroes||Inventory of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x2F0||[[BYTE]][26]||8||Zeroes||Inventory of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x3C0||[[BYTE]][26]||8||Zeroes||Inventory of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x490||[[BYTE]][26]||8||Zeroes||Inventory of the Wizard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Name sections ==&lt;br /&gt;
&lt;br /&gt;
The names are in typical zero-terminated format, and can be a maximum of 16 characters in length. If a savegame is edited to have data in the remaining name part, it will not be read, and the space will be cleared to zeroes when re-saved.&lt;br /&gt;
&lt;br /&gt;
The name normally only accepts uppercase characters. If lowercase characters are edited into the savegame file, it becomes clear that the lowercase range of the font is used for special accented characters. Some characters in the range are completely empty, but they still offer clickable space.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_savegame_lowercase_name.png]]&lt;br /&gt;
&lt;br /&gt;
If the first byte in a name is set to a 00 byte, the entry becomes unclickable in the user interface, effectively making it permanently unusable. There is a bug in the game where this can occur when you change the name of a character and confirm without filling in anything, and then save the character data.&lt;br /&gt;
&lt;br /&gt;
== Inventory sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;4&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BAR!!style=width:2em|DWA!!style=width:2em|ELF!!style=width:2em|WIZ&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[BYTE]]||00||00||00||00||Character game status: 00=in menu  FF=in quest&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || [[UINT8]][2]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s position on the map XXYY. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT16LE]]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Memory location of Hero&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[UINT8]]||08||07||06||04||Body points, 0-9 shows a figure, higher values work but the game shows the rest of the fonts.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[UINT8]]||02||03||04||06||Mind points, same as above.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]]||26||2C||38||44||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s facing sprite. See [[HeroQuest Quest Format#Hero Positions|Hero Positions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]]||0000||0000||0000||0000||Amount of gold coins in stash (bytes &amp;quot;88 13&amp;quot; = 5000 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[BYTE]]||00||00||38||07||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Water and Air); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||00||00||00||3F||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Fire and Earth); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||00||00||00||00||Owned special items bit mask; see [[#Special Items|Special Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||00||00||00||00||Owned weapons bit mask; see [[#Weapon Items|Weapon Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||00||00||00||00||Owned armour bit mask; see [[#Armour Items|Armour Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||00||00||00||00||Owned potions bit mask; see [[#Potions|Potions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||00||00||00||00||Equipped weapon. Same values as owned weapons, but only one weapon (or special weapon) can be active.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||00||00||00||Equipped special items. Same values as owned special items. Combines any equipped special weapon and armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||00||00||00||Equipped armour. Same values as owned armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[UINT8]]||03||02||02||01||Base attack dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]]||02||02||02||02||Base defence dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast by HERO|Spells cast by HERO]] during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for used [[#Potions|Potions]] effect bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast on HERO|Spells cast on HERO]] bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[UINT8]]||00||01||02||03||Character id used for attack animation and map icon (04=Sir Ragnar/Manfred)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Upon loading a slot the equipment is copied in memory at these locations:&lt;br /&gt;
 0B6B:4663 Barbarian&lt;br /&gt;
 0B6B:467D Dwarf&lt;br /&gt;
 0B6B:4697 Elf&lt;br /&gt;
 0B6B:46B1 Mage&lt;br /&gt;
 0B6B:46CA Ragnar/Manfred&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Equipment ===&lt;br /&gt;
&lt;br /&gt;
The equipment is saved in bits, which are combined into full values. So a value of 0x00 means completely empty, and 0xFF means all are enabled. The equipment bits are used for both ownership and to store which items are currently equipped.&lt;br /&gt;
&lt;br /&gt;
There are three classes of equipment: weapons, armour, and special quest items. In terms of equipped items, there are limitations on which bits can effectively be combined together. The player can only equip one helmet on their head and one armour on their body, and can have a light weapon in their primary hand and a shield in their secondary hand, or the Battle Axe taking up both hands. These rules are enforced when the game evaluates the equipped item bits, taking both normal and special items into account.&lt;br /&gt;
&lt;br /&gt;
==== Weapon Items ====&lt;br /&gt;
&lt;br /&gt;
The Weapons follow the order of the equipment on the screen, with the lowest bit indicating the first item, but since they do not include the armour, and the Tool Kit is equipped as weapon, that one takes up the eighth weapon value.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_equipment.png]]&lt;br /&gt;
&lt;br /&gt;
Weapon items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Staff || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Short Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Broad Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Battle Axe || Primary and secondary hands&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Crossbow || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Hand Axe || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Spear || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Tool Kit || Primary hand&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Armour Items ====&lt;br /&gt;
&lt;br /&gt;
Like the weapons, the Armour types follow their order on the inventory screen, with the Shield as the lowest value. The higher bits are used for special situations. &lt;br /&gt;
&lt;br /&gt;
Armour items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Shield || Secondary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Helmet || Head&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Chain Mail || Body&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Plate Armour || Body&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Unknown / not used ||  &lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || The hero cannot attack or defend || Used in Mine&#039;s gold quest and Manfred&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Only one die for movement || Used when carrying treasure chests&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Dwarf&#039;s Tool Kit || Dwarf only (this special item appears during quests but not in armoury)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Special Items ====&lt;br /&gt;
&lt;br /&gt;
Like the normal items, special items are saved as single bits that can be combined into a full value. They follow the layout of the special items on screen, with the lowest bit indicating the first item.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_Special.png]]&lt;br /&gt;
&lt;br /&gt;
The special items are:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on !! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Borin&#039;s Armour || Body || Despite showing a helmet as icon, this item is considered body armour and can be combined with the helmet.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Wand of Recall || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Talisman of Lore || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Orc&#039;s Bane || Primary hand ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Spirit Blade || Primary hand ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000001 = 01 = Borin&#039;s Armour Only&lt;br /&gt;
* 00010100 = 14 = Talisman of Lore and Spirit Blade&lt;br /&gt;
* 00011111 = 1F = everything&lt;br /&gt;
&lt;br /&gt;
==== Spells ====&lt;br /&gt;
&lt;br /&gt;
Like the other items, spells are saved as single bits that can be combined into a full value. In the save file, though, these bytes are only a placeholders for the spells once the file is loaded into memory. There are two separate 8 bit masks; the first for Water and Air, and the second for Fire and Earth.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! 0x0B Spell name (Type) !! 0x0C Spell name (Type)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist (Water) || Courage (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Water of healing (Water) || Ball of flame (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Sleep (Water) || Fire of wrath (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Tempest (Air) || Pass through rock (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Swift wind (Air) || Rock skin (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Genie /attack (Air) || Body healing (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || not used || Genie /reveal (air)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used || not used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000111 = 07 = all three Water (0B) or Fire (0C) spells&lt;br /&gt;
* 00111000 = 38 = all three Air (0B) or Earth (0C) spells&lt;br /&gt;
* 00111111 = 3F = all Water and Air (0B) or Fire and Earth (0C) spells&lt;br /&gt;
* 00000100 = 04 = only sleep (0B) or fire of wrath (0C) spell&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Spells cast by HERO ====&lt;br /&gt;
&lt;br /&gt;
This time it doesn&#039;t seem to be a bit mask, just plain hex values used to populate the effect slot (0x18), remove the spell in 0x0B or 0x0C and then erased.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Spell Name !! Spell effect !! LOS required !! Duration&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Veil of mist (Water) || Invisibility || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Water of healing (Water) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Sleep (Water) || Lose N turns || yes || until attacked or if he rolls a 6&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Tempest (Air) || Lose a turn || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Swift wind (Air) || 2x movement || yes || next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Genie (Air) || 5 Attack dice  || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Courage (Fire) || +2 Attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Ball of flame (Fire) || 2 attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Fire of wrath (Fire) || 1 Attack dice || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Pass through rock (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Rock skin (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Body healing (Earth) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Genie (Air) || Reveal a room || no || hero attack phase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Potions ====&lt;br /&gt;
&lt;br /&gt;
Potions follow the same principle of all other bit masks. The only exceptions is they get wiped once you start a new quest. This can be bypassed with a simple hack since the save and load features correctly process that byte.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Potion Name !! Potion effect&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Potion of Strength || +2 attack dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Potion of Resilience || +2 defence dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Holy Water || Kills every undead in the room&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Potion of Speed || 2x movement in the next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Heroic Brew || 2x attack in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* 01111111 = 7F = All potions&lt;br /&gt;
* 00001100 = 0C = Two potions of Healing&lt;br /&gt;
* 00000011 = 03 = Strength and Resilience&lt;br /&gt;
&lt;br /&gt;
==== Spells cast on HERO ====&lt;br /&gt;
&lt;br /&gt;
Only the effects that last at least one round appear in this bit mask (0x18).&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Spell Name !! Spell effect !! Duration (PC) !! Duration (board game)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist || Invisibility || next monster phase || next monster phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Sleep || Lose a turn || until you throw a 6|| until you throw a 6 or if attacked &lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Tempest || Lose a turn || next hero phase || next hero phase&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Swift wind || Double movement || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Courage || +2 Attack dice || next attack phase || until no monster are visible by the hero anymore&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Pass through rock || Self explanatory || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Rock skin || +2 Defense dice || next defense phase || until the hero suffers a wound&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || -- || -- || --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Courage, Rock skin and sleep effects differ from the original board game.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12830</id>
		<title>HeroQuest Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12830"/>
		<updated>2026-04-11T08:23:14Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Armour Items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The QUEST.SAV file in [[HeroQuest]] contains the saved character data. Characters can be saved between quests.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Character names, stats, gold, quest object, inventory. various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The file holds the 8 slots for each of the four characters of the game, split into two sections. The first section are the (in-game editable) names of all the characters, the second half contains all the characters&#039; actual information and inventories.&lt;br /&gt;
&lt;br /&gt;
Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
This is how a default savegame looks like in an hex editor:&lt;br /&gt;
&lt;br /&gt;
[[File:Savegame.jpg|320px]]&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Repeats!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[char]][17]||8||SIGMAR||Name of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x088||[[char]][17]||8||GRUNGI||Name of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x110||[[char]][17]||8||LADRIL||Name of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x198||[[char]][17]||8||ZOLTAR||Name of the Wizard&lt;br /&gt;
|-&lt;br /&gt;
|0x220||[[BYTE]][26]||8||Zeroes||Inventory of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x2F0||[[BYTE]][26]||8||Zeroes||Inventory of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x3C0||[[BYTE]][26]||8||Zeroes||Inventory of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x490||[[BYTE]][26]||8||Zeroes||Inventory of the Wizard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Name sections ==&lt;br /&gt;
&lt;br /&gt;
The names are in typical zero-terminated format, and can be a maximum of 16 characters in length. If a savegame is edited to have data in the remaining name part, it will not be read, and the space will be cleared to zeroes when re-saved.&lt;br /&gt;
&lt;br /&gt;
The name normally only accepts uppercase characters. If lowercase characters are edited into the savegame file, it becomes clear that the lowercase range of the font is used for special accented characters. Some characters in the range are completely empty, but they still offer clickable space.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_savegame_lowercase_name.png]]&lt;br /&gt;
&lt;br /&gt;
If the first byte in a name is set to a 00 byte, the entry becomes unclickable in the user interface, effectively making it permanently unusable. There is a bug in the game where this can occur when you change the name of a character and confirm without filling in anything, and then save the character data.&lt;br /&gt;
&lt;br /&gt;
== Inventory sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;4&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BAR!!style=width:2em|DWA!!style=width:2em|ELF!!style=width:2em|WIZ&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[BYTE]]||00||00||00||00||Character game status: 00=in menu  FF=in quest&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || [[UINT8]][2]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s position on the map XXYY. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT16LE]]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Memory location of Hero&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[UINT8]]||08||07||06||04||Body points, 0-9 shows a figure, higher values work but the game shows the rest of the fonts.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[UINT8]]||02||03||04||06||Mind points, same as above.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]]||26||2C||38||44||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s facing sprite. See [[HeroQuest Quest Format#Hero Positions|Hero Positions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]]||0000||0000||0000||0000||Amount of gold coins in stash (bytes &amp;quot;88 13&amp;quot; = 5000 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[BYTE]]||00||00||38||07||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Water and Air); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||00||00||00||3F||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Fire and Earth); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||00||00||00||00||Owned special items bit mask; see [[#Special Items|Special Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||00||00||00||00||Owned weapons bit mask; see [[#Weapon Items|Weapon Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||00||00||00||00||Owned armour bit mask; see [[#Armour Items|Armour Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||00||00||00||00||Owned potions bit mask; see [[#Potions|Potions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||00||00||00||00||Equipped weapon. Same values as owned weapons, but only one weapon (or special weapon) can be active.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||00||00||00||Equipped special items. Same values as owned special items. Combines any equipped special weapon and armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||00||00||00||Equipped armour. Same values as owned armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[UINT8]]||03||02||02||01||Base attack dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]]||02||02||02||02||Base defence dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast by HERO|Spells cast by HERO]] during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for used [[#Potions|Potions]] effect bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast on HERO|Spells cast on HERO]] bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[UINT8]]||00||01||02||03||Character id used for attack animation and map icon (04=Sir Ragnar/Manfred)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Upon loading a slot the equipment is copied in memory at these locations:&lt;br /&gt;
 0B6B:4663 Barbarian&lt;br /&gt;
 0B6B:467D Dwarf&lt;br /&gt;
 0B6B:4697 Elf&lt;br /&gt;
 0B6B:46B1 Mage&lt;br /&gt;
 0B6B:46CA Ragnar/Manfred&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Equipment ===&lt;br /&gt;
&lt;br /&gt;
The equipment is saved in bits, which are combined into full values. So a value of 0x00 means completely empty, and 0xFF means all are enabled. The equipment bits are used for both ownership and to store which items are currently equipped.&lt;br /&gt;
&lt;br /&gt;
There are three classes of equipment: weapons, armour, and special quest items. In terms of equipped items, there are limitations on which bits can effectively be combined together. The player can only equip one helmet on their head and one armour on their body, and can have a light weapon in their primary hand and a shield in their secondary hand, or the Battle Axe taking up both hands. These rules are enforced when the game evaluates the equipped item bits, taking both normal and special items into account.&lt;br /&gt;
&lt;br /&gt;
==== Weapon Items ====&lt;br /&gt;
&lt;br /&gt;
The Weapons follow the order of the equipment on the screen, with the lowest bit indicating the first item, but since they do not include the armour, and the Tool Kit is equipped as weapon, that one takes up the eighth weapon value.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_equipment.png]]&lt;br /&gt;
&lt;br /&gt;
Weapon items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Staff || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Short Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Broad Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Battle Axe || Primary and secondary hands&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Crossbow || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Hand Axe || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Spear || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Tool Kit || Primary hand&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Armour Items ====&lt;br /&gt;
&lt;br /&gt;
Like the weapons, the Armour types follow their order on the inventory screen, with the Shield as the lowest value. The higher bits are used for special situations. &lt;br /&gt;
&lt;br /&gt;
Armour items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Shield || Secondary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Helmet || Head&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Chain Mail || Body&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Plate Armour || Body&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Unknown / not used ||  &lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || The hero cannot attack or defend || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Only one die for movement || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Dwarf&#039;s toolkit || dwarf only (this special toolkit appears during quests but not in armoury)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Special Items ====&lt;br /&gt;
&lt;br /&gt;
Like the normal items, special items are saved as single bits that can be combined into a full value. They follow the layout of the special items on screen, with the lowest bit indicating the first item.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_Special.png]]&lt;br /&gt;
&lt;br /&gt;
The special items are:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on !! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Borin&#039;s Armour || Body || Despite showing a helmet as icon, this item is considered body armour and can be combined with the helmet.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Wand of Recall || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Talisman of Lore || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Orc&#039;s Bane || Primary hand ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Spirit Blade || Primary hand ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000001 = 01 = Borin&#039;s Armour Only&lt;br /&gt;
* 00010100 = 14 = Talisman of Lore and Spirit Blade&lt;br /&gt;
* 00011111 = 1F = everything&lt;br /&gt;
&lt;br /&gt;
==== Spells ====&lt;br /&gt;
&lt;br /&gt;
Like the other items, spells are saved as single bits that can be combined into a full value. In the save file, though, these bytes are only a placeholders for the spells once the file is loaded into memory. There are two separate 8 bit masks; the first for Water and Air, and the second for Fire and Earth.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! 0x0B Spell name (Type) !! 0x0C Spell name (Type)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist (Water) || Courage (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Water of healing (Water) || Ball of flame (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Sleep (Water) || Fire of wrath (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Tempest (Air) || Pass through rock (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Swift wind (Air) || Rock skin (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Genie /attack (Air) || Body healing (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || not used || Genie /reveal (air)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used || not used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000111 = 07 = all three Water (0B) or Fire (0C) spells&lt;br /&gt;
* 00111000 = 38 = all three Air (0B) or Earth (0C) spells&lt;br /&gt;
* 00111111 = 3F = all Water and Air (0B) or Fire and Earth (0C) spells&lt;br /&gt;
* 00000100 = 04 = only sleep (0B) or fire of wrath (0C) spell&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Spells cast by HERO ====&lt;br /&gt;
&lt;br /&gt;
This time it doesn&#039;t seem to be a bit mask, just plain hex values used to populate the effect slot (0x18), remove the spell in 0x0B or 0x0C and then erased.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Spell Name !! Spell effect !! LOS required !! Duration&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Veil of mist (Water) || Invisibility || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Water of healing (Water) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Sleep (Water) || Lose N turns || yes || until attacked or if he rolls a 6&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Tempest (Air) || Lose a turn || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Swift wind (Air) || 2x movement || yes || next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Genie (Air) || 5 Attack dice  || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Courage (Fire) || +2 Attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Ball of flame (Fire) || 2 attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Fire of wrath (Fire) || 1 Attack dice || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Pass through rock (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Rock skin (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Body healing (Earth) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Genie (Air) || Reveal a room || no || hero attack phase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Potions ====&lt;br /&gt;
&lt;br /&gt;
Potions follow the same principle of all other bit masks. The only exceptions is they get wiped once you start a new quest. This can be bypassed with a simple hack since the save and load features correctly process that byte.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Potion Name !! Potion effect&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Potion of Strength || +2 attack dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Potion of Resilience || +2 defence dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Holy Water || Kills every undead in the room&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Potion of Speed || 2x movement in the next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Heroic Brew || 2x attack in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* 01111111 = 7F = All potions&lt;br /&gt;
* 00001100 = 0C = Two potions of Healing&lt;br /&gt;
* 00000011 = 03 = Strength and Resilience&lt;br /&gt;
&lt;br /&gt;
==== Spells cast on HERO ====&lt;br /&gt;
&lt;br /&gt;
Only the effects that last at least one round appear in this bit mask (0x18).&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Spell Name !! Spell effect !! Duration (PC) !! Duration (board game)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist || Invisibility || next monster phase || next monster phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Sleep || Lose a turn || until you throw a 6|| until you throw a 6 or if attacked &lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Tempest || Lose a turn || next hero phase || next hero phase&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Swift wind || Double movement || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Courage || +2 Attack dice || next attack phase || until no monster are visible by the hero anymore&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Pass through rock || Self explanatory || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Rock skin || +2 Defense dice || next defense phase || until the hero suffers a wound&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || -- || -- || --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Courage, Rock skin and sleep effects differ from the original board game.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12829</id>
		<title>HeroQuest Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Savegame_Format&amp;diff=12829"/>
		<updated>2026-04-11T07:37:52Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Armour Items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The QUEST.SAV file in [[HeroQuest]] contains the saved character data. Characters can be saved between quests.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Character names, stats, gold, quest object, inventory. various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The file holds the 8 slots for each of the four characters of the game, split into two sections. The first section are the (in-game editable) names of all the characters, the second half contains all the characters&#039; actual information and inventories.&lt;br /&gt;
&lt;br /&gt;
Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
This is how a default savegame looks like in an hex editor:&lt;br /&gt;
&lt;br /&gt;
[[File:Savegame.jpg|320px]]&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Repeats!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x000||[[char]][17]||8||SIGMAR||Name of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x088||[[char]][17]||8||GRUNGI||Name of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x110||[[char]][17]||8||LADRIL||Name of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x198||[[char]][17]||8||ZOLTAR||Name of the Wizard&lt;br /&gt;
|-&lt;br /&gt;
|0x220||[[BYTE]][26]||8||Zeroes||Inventory of the Barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x2F0||[[BYTE]][26]||8||Zeroes||Inventory of the Dwarf&lt;br /&gt;
|-&lt;br /&gt;
|0x3C0||[[BYTE]][26]||8||Zeroes||Inventory of the Elf&lt;br /&gt;
|-&lt;br /&gt;
|0x490||[[BYTE]][26]||8||Zeroes||Inventory of the Wizard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Name sections ==&lt;br /&gt;
&lt;br /&gt;
The names are in typical zero-terminated format, and can be a maximum of 16 characters in length. If a savegame is edited to have data in the remaining name part, it will not be read, and the space will be cleared to zeroes when re-saved.&lt;br /&gt;
&lt;br /&gt;
The name normally only accepts uppercase characters. If lowercase characters are edited into the savegame file, it becomes clear that the lowercase range of the font is used for special accented characters. Some characters in the range are completely empty, but they still offer clickable space.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_savegame_lowercase_name.png]]&lt;br /&gt;
&lt;br /&gt;
If the first byte in a name is set to a 00 byte, the entry becomes unclickable in the user interface, effectively making it permanently unusable. There is a bug in the game where this can occur when you change the name of a character and confirm without filling in anything, and then save the character data.&lt;br /&gt;
&lt;br /&gt;
== Inventory sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;4&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BAR!!style=width:2em|DWA!!style=width:2em|ELF!!style=width:2em|WIZ&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[BYTE]]||00||00||00||00||Character game status: 00=in menu  FF=in quest&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || [[UINT8]][2]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s position on the map XXYY. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT16LE]]||0000||0000||0000||0000||&#039;&#039;Placeholder&#039;&#039; for Memory location of Hero&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[UINT8]]||08||07||06||04||Body points, 0-9 shows a figure, higher values work but the game shows the rest of the fonts.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[UINT8]]||02||03||04||06||Mind points, same as above.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]]||26||2C||38||44||&#039;&#039;Placeholder&#039;&#039; for Hero&#039;s facing sprite. See [[HeroQuest Quest Format#Hero Positions|Hero Positions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]]||0000||0000||0000||0000||Amount of gold coins in stash (bytes &amp;quot;88 13&amp;quot; = 5000 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[BYTE]]||00||00||38||07||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Water and Air); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||00||00||00||3F||&#039;&#039;Placeholder&#039;&#039; for spells bit mask during the game (Fire and Earth); see [[#Spells|Spells]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||00||00||00||00||Owned special items bit mask; see [[#Special Items|Special Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||00||00||00||00||Owned weapons bit mask; see [[#Weapon Items|Weapon Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||00||00||00||00||Owned armour bit mask; see [[#Armour Items|Armour Items]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||00||00||00||00||Owned potions bit mask; see [[#Potions|Potions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||00||00||00||00||Equipped weapon. Same values as owned weapons, but only one weapon (or special weapon) can be active.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||00||00||00||Equipped special items. Same values as owned special items. Combines any equipped special weapon and armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||00||00||00||Equipped armour. Same values as owned armour.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[UINT8]]||03||02||02||01||Base attack dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]]||02||02||02||02||Base defence dice number&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast by HERO|Spells cast by HERO]] during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for used [[#Potions|Potions]] effect bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]]||00||00||00||00||&#039;&#039;Placeholder&#039;&#039; for [[#Spells cast on HERO|Spells cast on HERO]] bit mask during the game&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[UINT8]]||00||01||02||03||Character id used for attack animation and map icon (04=Sir Ragnar/Manfred)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Upon loading a slot the equipment is copied in memory at these locations:&lt;br /&gt;
 0B6B:4663 Barbarian&lt;br /&gt;
 0B6B:467D Dwarf&lt;br /&gt;
 0B6B:4697 Elf&lt;br /&gt;
 0B6B:46B1 Mage&lt;br /&gt;
 0B6B:46CA Ragnar/Manfred&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Equipment ===&lt;br /&gt;
&lt;br /&gt;
The equipment is saved in bits, which are combined into full values. So a value of 0x00 means completely empty, and 0xFF means all are enabled. The equipment bits are used for both ownership and to store which items are currently equipped.&lt;br /&gt;
&lt;br /&gt;
There are three classes of equipment: weapons, armour, and special quest items. In terms of equipped items, there are limitations on which bits can effectively be combined together. The player can only equip one helmet on their head and one armour on their body, and can have a light weapon in their primary hand and a shield in their secondary hand, or the Battle Axe taking up both hands. These rules are enforced when the game evaluates the equipped item bits, taking both normal and special items into account.&lt;br /&gt;
&lt;br /&gt;
==== Weapon Items ====&lt;br /&gt;
&lt;br /&gt;
The Weapons follow the order of the equipment on the screen, with the lowest bit indicating the first item, but since they do not include the armour, and the Tool Kit is equipped as weapon, that one takes up the eighth weapon value.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_equipment.png]]&lt;br /&gt;
&lt;br /&gt;
Weapon items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Staff || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Short Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Broad Sword || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Battle Axe || Primary and secondary hands&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Crossbow || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Hand Axe || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Spear || Primary hand&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Tool Kit || Primary hand&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Armour Items ====&lt;br /&gt;
&lt;br /&gt;
Like the weapons, the Armour types follow their order on the inventory screen, with the Shield as the lowest value. The higher bits are used for special situations. &lt;br /&gt;
&lt;br /&gt;
Armour items:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Shield || Secondary hand&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Helmet || Head&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Chain Mail || Body&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Plate Armour || Body&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Unknown / not used ||  &lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || The hero cannot attack or defend || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Only one die for movement || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || Dwarf&#039;s toolkit || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Special Items ====&lt;br /&gt;
&lt;br /&gt;
Like the normal items, special items are saved as single bits that can be combined into a full value. They follow the layout of the special items on screen, with the lowest bit indicating the first item.&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest_Special.png]]&lt;br /&gt;
&lt;br /&gt;
The special items are:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Item !! Equipped on !! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Borin&#039;s Armour || Body || Despite showing a helmet as icon, this item is considered body armour and can be combined with the helmet.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Wand of Recall || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Talisman of Lore || None || Can&#039;t be equipped.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Orc&#039;s Bane || Primary hand ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Spirit Blade || Primary hand ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000001 = 01 = Borin&#039;s Armour Only&lt;br /&gt;
* 00010100 = 14 = Talisman of Lore and Spirit Blade&lt;br /&gt;
* 00011111 = 1F = everything&lt;br /&gt;
&lt;br /&gt;
==== Spells ====&lt;br /&gt;
&lt;br /&gt;
Like the other items, spells are saved as single bits that can be combined into a full value. In the save file, though, these bytes are only a placeholders for the spells once the file is loaded into memory. There are two separate 8 bit masks; the first for Water and Air, and the second for Fire and Earth.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! 0x0B Spell name (Type) !! 0x0C Spell name (Type)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist (Water) || Courage (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Water of healing (Water) || Ball of flame (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Sleep (Water) || Fire of wrath (Fire)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Tempest (Air) || Pass through rock (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Swift wind (Air) || Rock skin (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Genie /attack (Air) || Body healing (Earth)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || not used || Genie /reveal (air)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used || not used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples for the ownership bits:&lt;br /&gt;
&lt;br /&gt;
* 00000111 = 07 = all three Water (0B) or Fire (0C) spells&lt;br /&gt;
* 00111000 = 38 = all three Air (0B) or Earth (0C) spells&lt;br /&gt;
* 00111111 = 3F = all Water and Air (0B) or Fire and Earth (0C) spells&lt;br /&gt;
* 00000100 = 04 = only sleep (0B) or fire of wrath (0C) spell&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Spells cast by HERO ====&lt;br /&gt;
&lt;br /&gt;
This time it doesn&#039;t seem to be a bit mask, just plain hex values used to populate the effect slot (0x18), remove the spell in 0x0B or 0x0C and then erased.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Spell Name !! Spell effect !! LOS required !! Duration&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Veil of mist (Water) || Invisibility || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Water of healing (Water) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Sleep (Water) || Lose N turns || yes || until attacked or if he rolls a 6&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Tempest (Air) || Lose a turn || yes || one monster turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Swift wind (Air) || 2x movement || yes || next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Genie (Air) || 5 Attack dice  || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Courage (Fire) || +2 Attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Ball of flame (Fire) || 2 attack dice || yes || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Fire of wrath (Fire) || 1 Attack dice || no || hero attack phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Pass through rock (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Rock skin (Earth) || +2 Defense dice || yes || next defense phase&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Body healing (Earth) || Cure 4 body points || yes || permanent&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Genie (Air) || Reveal a room || no || hero attack phase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Potions ====&lt;br /&gt;
&lt;br /&gt;
Potions follow the same principle of all other bit masks. The only exceptions is they get wiped once you start a new quest. This can be bypassed with a simple hack since the save and load features correctly process that byte.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Potion Name !! Potion effect&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Potion of Strength || +2 attack dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Potion of Resilience || +2 defence dice in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Potion of Healing || +4 body points&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Holy Water || Kills every undead in the room&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Potion of Speed || 2x movement in the next movement phase&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Heroic Brew || 2x attack in the next combat phase&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* 01111111 = 7F = All potions&lt;br /&gt;
* 00001100 = 0C = Two potions of Healing&lt;br /&gt;
* 00000011 = 03 = Strength and Resilience&lt;br /&gt;
&lt;br /&gt;
==== Spells cast on HERO ====&lt;br /&gt;
&lt;br /&gt;
Only the effects that last at least one round appear in this bit mask (0x18).&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Binary value !! Hex value !! Spell Name !! Spell effect !! Duration (PC) !! Duration (board game)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 00000001 || 0x01 || Veil of mist || Invisibility || next monster phase || next monster phase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 00000010 || 0x02 || Sleep || Lose a turn || until you throw a 6|| until you throw a 6 or if attacked &lt;br /&gt;
|-&lt;br /&gt;
| 3 || 00000100 || 0x04 || Tempest || Lose a turn || next hero phase || next hero phase&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 00001000 || 0x08 || Swift wind || Double movement || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 5 || 00010000 || 0x10 || Courage || +2 Attack dice || next attack phase || until no monster are visible by the hero anymore&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 00100000 || 0x20 || Pass through rock || Self explanatory || next movement phase || next movement phase &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 01000000 || 0x40 || Rock skin || +2 Defense dice || next defense phase || until the hero suffers a wound&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 10000000 || 0x80 || not used  || -- || -- || --&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Courage, Rock skin and sleep effects differ from the original board game.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12827</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12827"/>
		<updated>2026-03-21T08:32:39Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play. The very first is the temporary profile.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!SI+Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 0x3C || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 0x3E || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 0x3F || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 0x40 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 0x41 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 0x42 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 0x43 || [[BYTE]]||00||80 = temporary flag that states Marine has been killed&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || 0x44 || [[BYTE]]||00||80 = ATTACK! order issued&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || 0x45 || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || 0x46 || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 0x47 || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 0x48 || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 0x49 || [[BYTE]]||80||Melta bomb selected (adds 2 red dice)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 0x4A || [[BYTE]]||00||80= Marine is inside the docking bay&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4B || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x4C || [[BYTE]]||00||80=Experimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x4D || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12826</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12826"/>
		<updated>2026-03-13T09:10:25Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play. The very first is the temporary profile.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!SI+Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 0x3C || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 0x3D || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 0x3E || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 0x3F || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 0x41 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 0x42 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 0x43 || [[BYTE]]||00||80 = temporary flag that states Marine has been killed&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || 0x44 || [[BYTE]]||00||80 = ATTACK! order issued&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || 0x45 || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || 0x46 || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 0x47 || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 0x48 || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 0x49 || [[BYTE]]||80||Melta bomb selected (adds 2 red dice)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 0x4A || [[BYTE]]||00||80= Marine is inside the docking bay&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4B || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x4C || [[BYTE]]||00||80=Experimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x4D || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12824</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12824"/>
		<updated>2026-03-10T17:56:02Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play. The very first is the temporary profile.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!SI+Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 0x3C || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 0x3D || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 0x3E || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 0x3F || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 0x41 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 0x42 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 0x43 || [[BYTE]]||00||80 = temporary flag that states Marine has been killed&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || 0x44 || [[BYTE]]||00||80 = ATTACK! order issued&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || 0x45 || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || 0x46 || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 0x47 || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 0x48 || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 0x49 || [[BYTE]]||80||Melta bomb selected (adds 2 red dice)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 0x4A || [[BYTE]]||80||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4B || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x4C || [[BYTE]]||00||80=Experimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x4D || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12823</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12823"/>
		<updated>2026-03-09T18:46:16Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play. The very first is the temporary profile.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!SI+Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 0x3C || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 0x3D || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 0x3E || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 0x3F || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 0x41 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 0x42 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 0x43 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 0x46 || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 0x47 || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 0x48 || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 0x49 || [[BYTE]]||80||Melta bomb selected (adds 2 red dice)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4A || [[BYTE]]||80||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x4B || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x4C || [[BYTE]]||00||80=Experimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x4D || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12816</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12816"/>
		<updated>2026-02-18T15:45:24Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||80||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||80=Experimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12815</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12815"/>
		<updated>2026-02-16T14:54:55Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||80||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||80=Sperimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12814</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12814"/>
		<updated>2026-02-16T14:54:30Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||80||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||0B||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[BYTE]]||00||Sperimental weapon owned&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || [[BYTE]]||00||UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12808</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12808"/>
		<updated>2026-02-12T15:36:28Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Genestealer&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12807</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12807"/>
		<updated>2026-02-12T14:20:31Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| 80 = The squad participated in the mission, 00 = did not.&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with higher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12806</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12806"/>
		<updated>2026-02-12T13:48:52Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| Secondary mission completed (80 = yes)&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12805</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12805"/>
		<updated>2026-02-12T10:04:39Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Savegame slot sections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||Savegame slot ID||Progressive number&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]][60]||Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
In code this offset is always referred using SI+X pointer.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-        &lt;br /&gt;
| 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12804</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12804"/>
		<updated>2026-02-12T09:52:49Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Weapon types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x06 || 0x04 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x07 || 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12803</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12803"/>
		<updated>2026-02-12T09:49:28Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Space Marine info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x06 || 0x04 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x07 || 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points (6 for commanders)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps (6 for commanders o light weapon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12802</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12802"/>
		<updated>2026-02-12T09:46:53Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x06 || 0x04 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x07 || 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| played missions (FE1F = all) (this info is not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12801</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12801"/>
		<updated>2026-02-11T19:47:03Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]] ||00||00||00|| Primary mission completed (80 = yes)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x06 || 0x04 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x07 || 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| Accomplished secondary missions (FE1F = all) (not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12800</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12800"/>
		<updated>2026-02-09T13:06:38Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x06 || 0x04 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x07 || 0x05 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-    &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| Accomplished secondary missions (FE1F = all) (not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12799</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12799"/>
		<updated>2026-02-09T10:28:45Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]][3] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| Accomplished secondary missions (FE1F = all) (not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12798</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12798"/>
		<updated>2026-02-09T10:20:10Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */  FIX OFFSETS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]][3] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| Accomplished secondary missions (FE1F = all) (not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80|| UNKNOWN&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT16LE]] ||0000||0000||0000||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x13 || 0x11 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-  &lt;br /&gt;
| 0x14 || 0x12 || [[UINT16LE]] ||A001||8384||A051|| Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2D || 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2E || 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30|| [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3C || 0x3A || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3D || 0x3B || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12791</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12791"/>
		<updated>2026-02-08T20:14:38Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]][3] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000|| Accomplished primary missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| Accomplished secondary missions (FE1F = all) (not used)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||84||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT8]] ||86||00||00||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x12 || 0x10 || [[UINT16LE]] ||A001||8384||A051|| Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || 0x12 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || 0x13 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30 || 0x2E || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || 0x2F || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12790</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12790"/>
		<updated>2026-02-08T19:53:04Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]][3] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT16LE]] ||0000||0000||0000|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||84||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT8]] ||86||00||00||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x12 || 0x10 || [[UINT16LE]] ||A001||8384||A051|| Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || 0x12 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || 0x13 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30 || 0x2E || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || 0x2F || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12789</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12789"/>
		<updated>2026-02-08T17:44:44Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||80||80||80||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges owned&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||84||00||00||PADDING (?)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT8]] ||86||00||00||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x12 || 0x10 || [[UINT16LE]] ||A001||8384||A051|| Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || 0x12 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || 0x13 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30 || 0x2E || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || 0x2F || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12780</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12780"/>
		<updated>2026-02-08T10:33:43Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */ ADDED SI+OFFSET CODE REFERENCE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|SI+x!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || -- || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-        &lt;br /&gt;
| 0x02 || 0x00 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-        &lt;br /&gt;
| 0x03 || 0x01 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-        &lt;br /&gt;
| 0x04 || 0x02 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x05 || 0x03 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x08 || 0x06 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-        &lt;br /&gt;
| 0x09 || 0x07 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0B || 0x09 || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0D || 0x0B || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0E || 0x0C || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x0F || 0x0D || [[UINT8]] ||80||80||80||Unknown&lt;br /&gt;
|-     &lt;br /&gt;
| 0x10 || 0x0E || [[UINT8]] ||84||00||00||PADDING (?)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x11 || 0x0F || [[UINT8]] ||86||00||00||Last mission score&lt;br /&gt;
|-        &lt;br /&gt;
| 0x12 || 0x10 || [[UINT16LE]] ||A001||8384||A051|| Unknown&lt;br /&gt;
|-        &lt;br /&gt;
| 0x14 || 0x12 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-        &lt;br /&gt;
| 0x15 || 0x13 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-        &lt;br /&gt;
| 0x16 || 0x14 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x17 || 0x15 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x18 || 0x16 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x19 || 0x17 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1A || 0x18 || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1B || 0x19 || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1C || 0x1A || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1D || 0x1B || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1E || 0x1C || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x1F || 0x1D || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-        &lt;br /&gt;
| 0x20 || 0x1E || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x21 || 0x1F || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-        &lt;br /&gt;
| 0x22 || 0x20 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-        &lt;br /&gt;
| 0x23 || 0x21 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-        &lt;br /&gt;
| 0x24 || 0x22 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-        &lt;br /&gt;
| 0x25 || 0x23 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-        &lt;br /&gt;
| 0x26 || 0x24 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-        &lt;br /&gt;
| 0x27 || 0x25 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-        &lt;br /&gt;
| 0x28 || 0x26 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x29 || 0x27 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2A || 0x28 || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2B || 0x29 || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-        &lt;br /&gt;
| 0x2C || 0x2A || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-        &lt;br /&gt;
| 0x30 || 0x2E || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-        &lt;br /&gt;
| 0x31 || 0x2F || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-        &lt;br /&gt;
| 0x32 || 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-        &lt;br /&gt;
| 0x33 || 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-        &lt;br /&gt;
| 0x34 || 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-        &lt;br /&gt;
| 0x35 || 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-        &lt;br /&gt;
| 0x36 || 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-        &lt;br /&gt;
| 0x37 || 0x35 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x38 || 0x36 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x39 || 0x37 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3A || 0x38 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|-        &lt;br /&gt;
| 0x3B || 0x39 || [[UINT8]] ||00||00||00|| UNKNOWN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12725</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12725"/>
		<updated>2026-02-01T18:55:45Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-&lt;br /&gt;
| 0x0e || [[UINT8]][2] ||8080||8080||8080||Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[UINT8]] ||84||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[UINT8]] ||86||00||00||Last mission score&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A001||8384||A051|| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-&lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-&lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-&lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-&lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| 37-3B to be discovered&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12724</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12724"/>
		<updated>2026-02-01T15:41:44Z</updated>

		<summary type="html">&lt;p&gt;Theruler: added more savegame info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-&lt;br /&gt;
| 0x0e || [[UINT8]][2] ||8080||8080||8080||Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[UINT8]] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00||Last mission score&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[UINT16LE]] ||A051||8384||00|| Unknown&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 0x14 || [[UINT8]] ||01||01||01|| COMMANDER ORDERS slots available&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[UINT8]] ||04||04||04|| EQUIPMENT slots avialable&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || [[UINT8]] ||00||00||00|| COMMANDER ORDERS slots selected&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || [[BYTE]] ||00||00||00|| Fire! order (bitmask with hihìgher bit selected, 80=order selected)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[BYTE]] ||00||00||00|| Move it! order&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || [[BYTE]] ||00||00||00|| Photon granades&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || [[BYTE]] ||00||00||00|| Close assualt order&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || [[BYTE]] ||00||00||00|| By sections order&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || [[BYTE]] ||00||00||00|| Heavy weapon order&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || [[UINT8]] ||00||00||00|| EQUIPMENT slots selected&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || [[BYTE]] ||00||00||00|| Targeter 1 (87= targeter on bolt rifle)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || [[BYTE]] ||00||00||00|| Targeter 2 (84= targeter on Assault Cannon)&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || [[BYTE]] ||00||00||00|| Blind granades&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || [[BYTE]] ||00||00||00|| Bolt pistols&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || [[BYTE]] ||00||00||00|| Melta bomb&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || [[BYTE]] ||00||00||00|| Bionic arm&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || [[BYTE]] ||00||00||00|| Close assault blades&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || [[BYTE]] ||00||00||00|| Force field&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || [[BYTE]] ||00||00||00|| Bionic eye&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 || [[BYTE]] ||00||00||00|| Suspensors&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || [[BYTE]] ||00||00||00|| Combi-weapon&lt;br /&gt;
|-&lt;br /&gt;
| 0x29 || [[BYTE]] ||00||00||00|| Bio-scanner&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A || [[BYTE]] ||00||00||00|| Digital weapons&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B || [[BYTE]] ||00||00||00|| Medi-kit&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || [[BYTE]][4] ||00||00||00|| IN-GAME squad conditions, higher bit is deselected each turn&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-&lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-&lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-&lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| 37-3B to be discovered&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12723</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12723"/>
		<updated>2026-02-01T11:54:56Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Squad info section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-&lt;br /&gt;
| 0x0e || [[UINT8]][2] ||8080||8080||8080||Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[UINT8]] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00||Last mission score&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || [[UINT8]] ||00||00||00|| 12-2F to be discovered&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Gretchins&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Orcs&lt;br /&gt;
|-&lt;br /&gt;
| 0x32 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x33 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine with heavy weapon&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Chaos Marine Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x35 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Androids&lt;br /&gt;
|-&lt;br /&gt;
| 0x36 || [[UINT8]] ||00||00||00|| Sum of the points collected by killing Dreadnought&lt;br /&gt;
|-&lt;br /&gt;
| 0x37 || [[UINT8]] ||00||00||00|| 37-3B to be discovered&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12720</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12720"/>
		<updated>2026-01-31T14:04:43Z</updated>

		<summary type="html">&lt;p&gt;Theruler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-&lt;br /&gt;
| 0x0e || [[UINT8]][2] ||8080||8080||8080||Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[UINT8]] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00||Last mission score&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 ||   ||00||00||00|| wip...&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[#Weapon types|Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12719</id>
		<title>Space Crusade Savegame Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Space_Crusade_Savegame_Format&amp;diff=12719"/>
		<updated>2026-01-31T14:02:26Z</updated>

		<summary type="html">&lt;p&gt;Theruler: initial draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The *.SAV file in [[SpaceCrusade]] contains the saved Chapters data. Chapters can be saved between Missions.&lt;br /&gt;
&lt;br /&gt;
{{Playerdata Infobox&lt;br /&gt;
 | Config = No&lt;br /&gt;
 | Savegame = Yes&lt;br /&gt;
 | Where = Hub&lt;br /&gt;
 | Elements = Rank, medals, inventory, various stats&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|SpaceCrusade}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV&lt;br /&gt;
&lt;br /&gt;
Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.&lt;br /&gt;
&lt;br /&gt;
Each Chapter&#039;s slot is loaded in memory at different locations:&lt;br /&gt;
* BA DS:5491&lt;br /&gt;
* IF DS:557A&lt;br /&gt;
* UM DS:5663&lt;br /&gt;
&lt;br /&gt;
The internal format is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]][2]||2 Bytes Header||Incremental number, contains the latest slot number that increments upon each save&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[char]][1700]||Savegame slots|| There are 10 slots, 170 (0xAA) bytes each&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Savegame slot sections ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Section name!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]][62]||Slot and Squad info||Commander rank, achievements and squad selected equipment&lt;br /&gt;
|-&lt;br /&gt;
|0x40||[[char]][18]||Last used Space Marine||here is stored the current space marine in use&lt;br /&gt;
|-&lt;br /&gt;
|0x52||[[char]][18]||Space Marine Commander||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x64||[[char]][18]||Space Marine 1||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x76||[[char]][18]||Space Marine 2||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x88||[[char]][18]||Space Marine 3||Equipment, status, game flags and position on map&lt;br /&gt;
|-&lt;br /&gt;
|0x9A||[[char]][18]||Space Marine 4||Equipment, status, game flags and position on map&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Squad info section ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!rowspan=&amp;quot;2&amp;quot;|Offset!!rowspan=&amp;quot;2&amp;quot;|Data type!!colspan=&amp;quot;3&amp;quot;|Default values!!rowspan=&amp;quot;2&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
!style=width:2em|BA!!style=width:2em|IF!!style=width:2em|UM&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT16LE]] ||00||00||00||savegame progressive number&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[UINT8]] ||01||02||03||Chapter number, automatically changes the Marine&#039;s names and starting positions&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[UINT8]] ||00||00||00||Commander&#039;s rank 01-seargent, 06-supremus&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || [[UINT8]][3] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[UINT8]] ||00||00||00||Badges available for trade = 01&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || [[UINT16LE]] ||0000||0000||0000||Accomplished missions (FE1F = all)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || [[UINT8]][2] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[UINT8]] ||00||00||00||Last mission kills&lt;br /&gt;
|-&lt;br /&gt;
| 0x0e || [[UINT8]][2] ||8080||8080||8080||Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[UINT8]] ||00||00||00||PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[UINT8]] ||00||00||00||Last mission score&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 ||   ||00||00||00|| wip...&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Space Marine info section ===&lt;br /&gt;
&lt;br /&gt;
all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Default value!!Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || [[UINT8]][2]|||0000||X Y position on map grid&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || [[BYTE]]||00||2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || [[BYTE]]||00||equipped weapon (see [[Weapon types]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[BYTE]]||02||armour class&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || [[BYTE]]||80||marine present on map (alive)&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || [[BYTE]]||01||life points&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || [[BYTE]][3]||00|| PADDING (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || [[BYTE]]||01||Combat action (range or close combat) available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || [[BYTE]]||01||Movement action available (00=performed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || [[BYTE]]||04||Maximum steps&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || [[BYTE]]||80||Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || [[BYTE]]||04||UNKNOWN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || [[BYTE]]||04||Various order condition (1=fire twice, 07=a rapporto) see [[Alien Events]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Weapon types =&lt;br /&gt;
&lt;br /&gt;
Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex value !! Weapon name !! Close combat dice !! Ranged combat dice !! Description !! Available for&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Bolter and Power Axe || 2 RED || 2 WHITE || - || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Power Glove and Power Sword || 2 RED and 2 WHITE || none || Close combat only || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Heavy Bolter || 2 WHITE || 2 RED || One target || Commander&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Assault Cannon || 2 WHITE || 2 RED || Result can be splitted among multiple targets || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Missile Launcher || 2 WHITE || 2 RED || Hits an area of 3x3 || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Plasma Gun || 2 WHITE || 2 RED || Shoots only orthogonally or diagonally and hits everything in line || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Bolter 1 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Bolter 2 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Bolter 3 || 2 WHITE || 2 WHITE || One target || Space Marine&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine.&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SpaceCrusade&amp;diff=12718</id>
		<title>SpaceCrusade</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SpaceCrusade&amp;diff=12718"/>
		<updated>2026-01-31T13:02:41Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* File formats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = Edit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Space Crusade&#039;&#039;&#039; for DOS was developed and Published by [https://www.mobygames.com/company/114/infogrames-studios-limited/ Gremlin Graphics Software Limited] in 1992.&lt;br /&gt;
&lt;br /&gt;
Space Crusade is a science fiction strategy game converted from the Games Workshop/Milton Bradley boardgame, in which you control a commander and four marines who are sent on different missions aboard hostile alien starships. Your commander starts off as a sergeant, but he can work his way through the ranks. The game allows three players, each commanding one marine chapter each. The alien team is played by the computer.&lt;br /&gt;
&lt;br /&gt;
The game is a literal conversion of the board game in the same vein as Gremlin&#039;s earlier Hero Quest. It can be best described as a turn-based board game in which the player must fulfill the primary and secondary objectives to complete the mission, which usually involves elimination of entire alien force on board or destruction of mothership etc. This game features unique 3D close-ups during the battle scenes, a feature which was later adopted by games like the X-Com series.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) Codec by Shelwien from Encode.su]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Language and Sprite/Graphic files are LZ compressed&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/BenCastricum/unp UNP by Ben Castricum]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
| notes = EXE are compressed with EXEPACKER&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://www.oldgamesitalia.net/forum/index.php?showtopic=27618&amp;amp;hl= GremlinUT]&lt;br /&gt;
| Platform = Multi&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = Yes&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = A string editor for unnpacked .bin language files by DK (OldGamesItalia)&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://justsolve.archiveteam.org/wiki/Pro-Pack ProPack RNC de/compressor]&lt;br /&gt;
| Platform = DOS 16bit&lt;br /&gt;
| grp = Yes&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = PPIBM.exe is needed to extract/import VGA/EGA files inside the GRAPH.RNC archive&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Westwood Font Editor]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Font resides in space.exe and they have to be manually exported/imported&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
==File formats==&lt;br /&gt;
&lt;br /&gt;
The following file formats are used by this game.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList|header=false}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = MAPS.BIN&lt;br /&gt;
 | Format = [[Space Crusade Map Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files that contains all the game Maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.BIN&lt;br /&gt;
 | Format = [[Space Crusade Strings Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files with in-game text in four languages (ENGLISH, GERMAN, FRENCH, ITALIAN).&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EGA&lt;br /&gt;
 | Format = [[Raw EGA data]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 4bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.VGA&lt;br /&gt;
 | Format = [[Raw VGA Image]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 8bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.SAV&lt;br /&gt;
 | Format = [[Space Crusade Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 3 Savegames file created by space.EXE, one for each of the three playable &amp;quot;Chapters&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = SPACE.CFG&lt;br /&gt;
 | Format = [[Space Crusade Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Configuration file created by space.exe&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EXE&lt;br /&gt;
 | Format = [[Space Crusade EXE File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = SPACE.EXE contains Program-related text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.RLD&lt;br /&gt;
 | Format = [[Space Crusade Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Roland Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ALB&lt;br /&gt;
 | Format = [[Space Crusade Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Adlib Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* The decompression program was done by Shelwien from [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) encode.su forum]&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation and modding project mapped the format of the BIN and the savegame files.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* [https://www.oldgamesitalia.net/forum/index.php?showtopic=27618 OldGamesItalia.net forum discussion about the game] where everything started (in Italian), with research and development on the project by TheRuler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Turn-Based Strategy]]&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SpaceCrusade&amp;diff=12717</id>
		<title>SpaceCrusade</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SpaceCrusade&amp;diff=12717"/>
		<updated>2026-01-31T10:59:25Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = Edit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Space Crusade&#039;&#039;&#039; for DOS was developed and Published by [https://www.mobygames.com/company/114/infogrames-studios-limited/ Gremlin Graphics Software Limited] in 1992.&lt;br /&gt;
&lt;br /&gt;
Space Crusade is a science fiction strategy game converted from the Games Workshop/Milton Bradley boardgame, in which you control a commander and four marines who are sent on different missions aboard hostile alien starships. Your commander starts off as a sergeant, but he can work his way through the ranks. The game allows three players, each commanding one marine chapter each. The alien team is played by the computer.&lt;br /&gt;
&lt;br /&gt;
The game is a literal conversion of the board game in the same vein as Gremlin&#039;s earlier Hero Quest. It can be best described as a turn-based board game in which the player must fulfill the primary and secondary objectives to complete the mission, which usually involves elimination of entire alien force on board or destruction of mothership etc. This game features unique 3D close-ups during the battle scenes, a feature which was later adopted by games like the X-Com series.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) Codec by Shelwien from Encode.su]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Language and Sprite/Graphic files are LZ compressed&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/BenCastricum/unp UNP by Ben Castricum]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
| notes = EXE are compressed with EXEPACKER&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://www.oldgamesitalia.net/forum/index.php?showtopic=27618&amp;amp;hl= GremlinUT]&lt;br /&gt;
| Platform = Multi&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = Yes&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = A string editor for unnpacked .bin language files by DK (OldGamesItalia)&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://justsolve.archiveteam.org/wiki/Pro-Pack ProPack RNC de/compressor]&lt;br /&gt;
| Platform = DOS 16bit&lt;br /&gt;
| grp = Yes&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = PPIBM.exe is needed to extract/import VGA/EGA files inside the GRAPH.RNC archive&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Westwood Font Editor]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Font resides in space.exe and they have to be manually exported/imported&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
==File formats==&lt;br /&gt;
&lt;br /&gt;
The following file formats are used by this game.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList|header=false}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = MAPS.BIN&lt;br /&gt;
 | Format = [[SpaceCrusade Quest Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files that contains all the game Maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.BIN&lt;br /&gt;
 | Format = [[SpaceCrusade Strings Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files with in-game text in four languages (ENGLISH, GERMAN, FRENCH, ITALIAN).&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EGA&lt;br /&gt;
 | Format = [[Raw EGA data]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 4bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.VGA&lt;br /&gt;
 | Format = [[Raw VGA Image]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 8bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.SAV&lt;br /&gt;
 | Format = [[SpaceCrusade Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 3 Savegames file created by space.EXE, one for each of the three playable &amp;quot;Chapters&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = SPACE.CFG&lt;br /&gt;
 | Format = [[SpaceCrusade Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Configuration file created by space.exe&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EXE&lt;br /&gt;
 | Format = [[SpaceCrusade EXE File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = SPACE.EXE contains Program-related text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.RLD&lt;br /&gt;
 | Format = [[SpaceCrusade Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Roland Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ALB&lt;br /&gt;
 | Format = [[SpaceCrusade Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Adlib Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* The decompression program was done by Shelwien from [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) encode.su forum]&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation and modding project mapped the format of the BIN and the savegame files.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* [https://www.oldgamesitalia.net/forum/index.php?showtopic=27618 OldGamesItalia.net forum discussion about the game] where everything started (in Italian), with research and development on the project by TheRuler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Turn-Based Strategy]]&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=File:Mod-SpaceCrusade.png&amp;diff=12716</id>
		<title>File:Mod-SpaceCrusade.png</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=File:Mod-SpaceCrusade.png&amp;diff=12716"/>
		<updated>2026-01-31T10:52:10Z</updated>

		<summary type="html">&lt;p&gt;Theruler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=File:SpaceCrusade.png&amp;diff=12715</id>
		<title>File:SpaceCrusade.png</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=File:SpaceCrusade.png&amp;diff=12715"/>
		<updated>2026-01-31T10:51:16Z</updated>

		<summary type="html">&lt;p&gt;Theruler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=SpaceCrusade&amp;diff=12714</id>
		<title>SpaceCrusade</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=SpaceCrusade&amp;diff=12714"/>
		<updated>2026-01-31T10:48:26Z</updated>

		<summary type="html">&lt;p&gt;Theruler: initial draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = Edit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Space Crusade&#039;&#039;&#039; for DOS was developed and Published by [https://www.mobygames.com/company/114/infogrames-studios-limited/ Gremlin Graphics Software Limited] in 1992.&lt;br /&gt;
&lt;br /&gt;
Space Crusade is a science fiction strategy game converted from the Games Workshop/Milton Bradley boardgame, in which you control a commander and four marines who are sent on different missions aboard hostile alien starships. Your commander starts off as a sergeant, but he can work his way through the ranks. The game allows three players, each commanding one marine chapter each. The alien team is played by the computer.&lt;br /&gt;
&lt;br /&gt;
The game is a literal conversion of the board game in the same vein as Gremlin&#039;s earlier Hero Quest. It can be best described as a turn-based board game in which the player must fulfill the primary and secondary objectives to complete the mission, which usually involves elimination of entire alien force on board or destruction of mothership etc. This game features unique 3D close-ups during the battle scenes, a feature which was later adopted by games like the X-Com series.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) Codec by Shelwien from Encode.su]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Language and Sprite/Graphic files are LZ compressed&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/BenCastricum/unp UNP by Ben Castricum]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
| notes = EXE are compressed with EXEPACKER&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://www.oldgamesitalia.net/forum/index.php?showtopic=27618&amp;amp;hl= GremlinUT]&lt;br /&gt;
| Platform = Multi&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = Yes&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = A string editor for unnpacked .bin language files by DK (OldGamesItalia)&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://justsolve.archiveteam.org/wiki/Pro-Pack ProPack RNC de/compressor]&lt;br /&gt;
| Platform = DOS 16bit&lt;br /&gt;
| grp = Yes&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = PPIBM.exe is needed to extract/import VGA/EGA files inside the GRAPH.RNC archive&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Westwood Font Editor]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Font resides in space.exe and they have to be manually exported/imported&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Engie File Converter]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Read&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Quest map viewer&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
==File formats==&lt;br /&gt;
&lt;br /&gt;
The following file formats are used by this game.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList|header=false}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = MAPS.BIN&lt;br /&gt;
 | Format = [[SpaceCrusade Quest Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files that contains all the game Maps&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.BIN&lt;br /&gt;
 | Format = [[SpaceCrusade Strings Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files with in-game text in four languages (ENGLISH, GERMAN, FRENCH, ITALIAN).&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EGA&lt;br /&gt;
 | Format = [[Raw EGA data]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 4bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.VGA&lt;br /&gt;
 | Format = [[Raw VGA Image]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 8bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.SAV&lt;br /&gt;
 | Format = [[SpaceCrusade Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 3 Savegames file created by space.EXE, one for each of the three playable &amp;quot;Chapters&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = SPACE.CFG&lt;br /&gt;
 | Format = [[SpaceCrusade Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Configuration file created by space.exe&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EXE&lt;br /&gt;
 | Format = [[SpaceCrusade EXE File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = SPACE.EXE contains Program-related text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.RLD&lt;br /&gt;
 | Format = [[SpaceCrusade Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Roland Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.ALB&lt;br /&gt;
 | Format = [[SpaceCrusade Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Adlib Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* The decompression program was done by Shelwien from [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) encode.su forum]&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation and modding project mapped the format of the BIN and the savegame files.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* [https://www.oldgamesitalia.net/forum/index.php?showtopic=27618 OldGamesItalia.net forum discussion about the game] where everything started (in Italian), with research and development on the project by TheRuler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Turn-Based Strategy]]&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest&amp;diff=12712</id>
		<title>HeroQuest</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest&amp;diff=12712"/>
		<updated>2026-01-29T18:03:14Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = Edit&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = Edit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeroQuest&#039;&#039;&#039; for DOS was developed by [https://www.mobygames.com/company/3546/221b-software-development/ 221b Software Development] and Published by [https://www.mobygames.com/company/114/infogrames-studios-limited/ Gremlin Graphics Software Limited] in 1991.&lt;br /&gt;
&lt;br /&gt;
It is the earliest computer implementation of the HeroQuest board game published by Milton Bradley Company in association with Games Workshop in 1989 (europe/Australia) and in 1990 (US/Canada), where you take the role of four heroes; a Barbarian, a Dwarf, an Elf and a Mage; and dive deep into the dungeon of the Witch Lord to defeat his army of monsters and finally confront his magic. It consists of 14 quests (the DOS game includes the first expansion with 10 additional quests) where you fight, search for traps or secret passages, and collect special items and gold. Said gold can be spent between missions to buy more powerful equipment.&lt;br /&gt;
&lt;br /&gt;
The base mechanics are mostly the same as the boardgame (moving, attacking, defending, searching, performing magic) with some changes to enhance the gameplay on the new media (see link section).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) Codec by Shelwien from Encode.su]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Language and Sprite/Graphic files are LZ compressed&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://github.com/BenCastricum/unp UNP by Ben Castricum]&lt;br /&gt;
| Platform = DOS&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = Edit&lt;br /&gt;
| notes = EXE are compressed with EXEPACKER&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://imagej.net/ij/index.html Imagej]&lt;br /&gt;
| Platform = Multi&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Java Image editor that can import and export RAW files&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Westwood Font Editor]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Font resides in intro.exe and quest.exe and they have to be manually exported/imported&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Engie File Converter]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Read&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
| notes = Quest map viewer&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
==File formats==&lt;br /&gt;
&lt;br /&gt;
The following file formats are used by this game.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList|header=false}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUESTxx.BIN&lt;br /&gt;
 | Format = [[HeroQuest Quest Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files that contains Map, Monster, Traps layouts and Quest mission text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.BIN&lt;br /&gt;
 | Format = [[HeroQuest Strings Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Binary files with in-game text in five languages (ENGLISH, GERMAN, FRENCH, SPANISH, ITALIAN) and EQUEST.BIN with quest names.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EGA&lt;br /&gt;
 | Format = [[Raw EGA data]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 4bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.VGA&lt;br /&gt;
 | Format = [[Raw VGA Image]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen images (320&amp;amp;times;200) and sprites RAW 8bpp&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUEST.SAV&lt;br /&gt;
 | Format = [[HeroQuest Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Savegame file created by QUEST.EXE&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = QUEST.CFG&lt;br /&gt;
 | Format = [[HeroQuest Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Configuration file created by HERO.EXE&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.EXE&lt;br /&gt;
 | Format = [[HeroQuest EXE File]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = QUEST.EXE contains Program-related text and the EPILOGUE, INTRO.EXE contains the INTRO panels text.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = GAME&amp;amp;FX.RLD&lt;br /&gt;
 | Format = [[HeroQuest Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Roland Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = GAME&amp;amp;FX.ALB&lt;br /&gt;
 | Format = [[HeroQuest Music Format]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Archive for Adlib Sound effects and Music&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
==Research credits==&lt;br /&gt;
&lt;br /&gt;
* The decompression program was done by Shelwien from [https://encode.su/threads/4069-HELP-on-a-light-compression-from-an-old-DOS-game-(HEROQUEST) encode.su forum]&lt;br /&gt;
* [[user:Theruler|TheRuler]] from the OldGamesItalia translation and modding project mapped the format of the BIN and the savegame files.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* [https://www.oldgamesitalia.net/forum/index.php?showtopic=27582 OldGamesItalia.net forum discussion about the game] where everything started (in Italian), with research and development on the project by TheRuler.&lt;br /&gt;
* [http://forum.yeoldeinn.com/viewtopic.php?t=5588 Comparison forum topic on Ye Olde Inn] with all the gameplay differences between the computer game and the board game, by kurgan.&lt;br /&gt;
&lt;br /&gt;
[[Category:Turn-Based Strategy]]&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12660</id>
		<title>HeroQuest EXE File</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12660"/>
		<updated>2025-12-01T20:07:04Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Various */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original exe is compressed with EXEPACKER, you must decompress with UNP to manipulate it.&lt;br /&gt;
&lt;br /&gt;
{{Executable Infobox&lt;br /&gt;
 | Interpreted = N&lt;br /&gt;
 | Platform = MS-DOS&lt;br /&gt;
 | Code = 16-bit x86&lt;br /&gt;
 | Games = {{Game|HeroQuest}}&lt;br /&gt;
  Memory information:&#039;&#039;&#039;&amp;lt;br&amp;gt;Code segment = 01EF&amp;lt;br&amp;gt;Data segment = 0B6B&amp;lt;br&amp;gt;Stack segment = 25F2&#039;&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= [CODE SEGMENT] Main Routines =&lt;br /&gt;
These are the main routines of the game, disassembled with DOSBOX debugger and annotated.&lt;br /&gt;
&lt;br /&gt;
== in-game main loop ==&lt;br /&gt;
 01EF:0413  E8E65F              call 000063FC ($+5fe6)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0416  E8FA5F              call 00006413 ($+5ffa)					&amp;lt;---- Checks left mouse button and everityng under it&lt;br /&gt;
 01EF:0419  C606CC40FF          mov  byte [40CC],FF         ds:[40CC]=DFFF   &lt;br /&gt;
 01EF:041E  F606923920          test byte [3992],20         ds:[3992]=9200		&amp;lt;---- Checks if right mouse button has been pressed&lt;br /&gt;
 01EF:0423  7403                je   00000428 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0425  E82E03              call 00000756 ($+32e)  					&amp;lt;---- ends the turn if right mouse button pressed&lt;br /&gt;
 01EF:0428  E85963              call 00006784 ($+6359) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:042B  E8A202              call 000006D0 ($+2a2)  					&amp;lt;---- ???&lt;br /&gt;
 01EF:042E  E8E564              call 00006916 ($+64e5) 					&amp;lt;---- draws in the correct order heroes and forniture&lt;br /&gt;
 01EF:0431  E84553              call 00005779 ($+5345) 					&amp;lt;---- same as above?&lt;br /&gt;
 01EF:0434  E8DD53              call 00005814 ($+53dd) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:043A  E87B53              call 000057B8 ($+537b) 					&amp;lt;---- draws heroes, monsters, forniture and doors (not the walls)&lt;br /&gt;
 01EF:043D  E8B454              call 000058F4 ($+54b4) 					&amp;lt;---- Checks if orthogonal tiles are walkable and updates the directional arrows&lt;br /&gt;
 01EF:0440  E8A156              call 00005AE4 ($+56a1) 					&amp;lt;---- Checks if monsters are present in the room and updates search icons&lt;br /&gt;
 01EF:0443  E81E60              call 00006464 ($+601e) 					&amp;lt;---- activates attack, magic, treasure, traps icons&lt;br /&gt;
 01EF:0446  E8CF60              call 00006518 ($+60cf) 					&amp;lt;---- draws yellow figures on top left&lt;br /&gt;
 01EF:0449  E8C859              call 00005E14 ($+59c8)					&amp;lt;---- draws glove mouse pointer&lt;br /&gt;
 01EF:044C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000   &lt;br /&gt;
 01EF:0451  7503                jne  00000456 ($+3)         (down)           &lt;br /&gt;
 01EF:0453  E88E5C              call 000060E4 ($+5c8e)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0456  E87E59              call 00005DD7 ($+597e)					&amp;lt;---- Clean the previous mouse sprite&lt;br /&gt;
 01EF:0459  E85954              call 000058B5 ($+5459)					&amp;lt;---- Clean the previous hero sprite&lt;br /&gt;
 01EF:045C  E82100              call 00000480 ($+21)					&amp;lt;---- Quest event checks&lt;br /&gt;
 01EF:045F  E8EC13              call 0000184E ($+13ec)					&amp;lt;---- Checks if the hero stands on a stair tile&lt;br /&gt;
 01EF:0462  803E973F00          cmp  byte [3F97],00         ds:[3F97]=0000   &lt;br /&gt;
 01EF:0467  7403                je   0000046C ($+3)         (no jmp)         &lt;br /&gt;
 01EF:0469  E8BA00              call 00000526 ($+ba)        				&amp;lt;---- End turn wrap up (resets registers and variables)&lt;br /&gt;
 01EF:046C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000	&lt;br /&gt;
 01EF:0471  7401                je   00000474 ($+1)         (no jmp)	&lt;br /&gt;
 01EF:0473  C3                  ret						&lt;br /&gt;
 01EF:0474  803E923940          cmp  byte [3992],40         ds:[3992]=9200&lt;br /&gt;
 01EF:0479  7503                jne  0000047E ($+3)         (down)&lt;br /&gt;
 01EF:047B  E94FFE              jmp  000002CD ($-1b1)       (up)&lt;br /&gt;
 01EF:047E  EB93                jmp  short 00000413 ($-6d)  (up)				&amp;lt;--- goes back on top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shooting routine ==&lt;br /&gt;
Shooting routine (magic and throwing weapons) is utterly broken in this game.&amp;lt;br&amp;gt;&lt;br /&gt;
The code checks the map tile the projectile is above and determine if the line of sight is blocked or free.&amp;lt;br&amp;gt;&lt;br /&gt;
The way the map is coded resulted in a convoluted code that fails to check LOS.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;You can shoot past walls&#039;&#039;&#039; and always hit the target if the hero stands in contact with one wall and the target is the adjacent room exactly above or exactly to the right.&amp;lt;br&amp;gt;&lt;br /&gt;
You can also hit the target standing in the perfect diagonal like bishop&#039;s movement, and this could happen even if there are no active rooms (solid rock, but marked with 00 like rooms&#039; inner tiles) in between.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;LOS is blocked&#039;&#039;&#039; by parallel unrevealed secret doors and opened doors.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon check:&lt;br /&gt;
 01EF:0AB2  32C0                xor  al,al&lt;br /&gt;
 01EF:0AB4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- di+11 is equipped weapon. checks if it is crossbow?&lt;br /&gt;
 01EF:0AB8  7501                jne  00000ABB ($+1)         (no jmp)&lt;br /&gt;
 01EF:0ABA  C3                  ret&lt;br /&gt;
 01EF:0ABB  B0FD                mov  al,FD					&amp;lt;-- not crossbow&lt;br /&gt;
 01EF:0ABD  C3                  ret&lt;br /&gt;
 01EF:0ABE  807D1101            cmp  byte [di+11],01        ds:[B1A7]=0000	&amp;lt;-- starts here&lt;br /&gt;
 01EF:0ABF  7D11                jge  00000AD2 ($+11)        (down)		&amp;lt;-- jump if greater or equal&lt;br /&gt;
 01EF:0AC1  0174EE              add  [si-12],si             ds:[4DBA]=260D&lt;br /&gt;
 01EF:0AC4  807D1102            cmp  byte [di+11],02        ds:[46A8]=0010	&amp;lt;-- F64511/807D11 are the test/cmp of the equipped weapon&lt;br /&gt;
 01EF:0AC8  74E8                je   00000AB2 ($-18)        (up)&lt;br /&gt;
 01EF:0ACA  807D1140            cmp  byte [di+11],40        ds:[46A8]=0010&lt;br /&gt;
 01EF:0ACE  74E2                je   00000AB2 ($-1e)        (up)&lt;br /&gt;
 01EF:0AD0  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AD2  EBE0                jmp  short 00000AB4 ($-20)  (up)&lt;br /&gt;
 01EF:0AD4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- crossbow&lt;br /&gt;
 01EF:0AD8  750F                jne  00000AE9 ($+f)         (no jmp)&lt;br /&gt;
 01EF:0ADA  F6451120            test byte [di+11],20        ds:[46A8]=0010	&amp;lt;-- throwing axe&lt;br /&gt;
 01EF:0ADE  7509                jne  00000AE9 ($+9)         (no jmp)&lt;br /&gt;
 01EF:0AE0  F6451140            test byte [di+11],40        ds:[46A8]=0010	&amp;lt;-- spear&lt;br /&gt;
 01EF:0AE4  7503                jne  00000AE9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0AE6  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AE8  C3                  ret&lt;br /&gt;
&lt;br /&gt;
SHOOTING ROUTINE STARTS HERE:&lt;br /&gt;
 01EF:0AE9  C606B73F01          mov  byte [3FB7],01         ds:[3FB7]=0301&lt;br /&gt;
 01EF:0AEE  E82B00              call 00000B1C ($+2b)&lt;br /&gt;
 01EF:0AF1  32C0                xor  al,al&lt;br /&gt;
 01EF:0AF3  803EA83F01          cmp  byte [3FA8],01         ds:[3FA8]=0001	&amp;lt;-- check if LOS is blocked (1)&lt;br /&gt;
 01EF:0AF8  7401                je   00000AFB ($+1)         (down)&lt;br /&gt;
 01EF:0AFA  C3                  ret&lt;br /&gt;
 01EF:0AFB  B0FE                mov  al,FE&lt;br /&gt;
 01EF:0AFD  C606B73F00          mov  byte [3FB7],00         ds:[3FB7]=0300&lt;br /&gt;
 01EF:0B02  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
 01EF:0B1C  E81F06              call 0000113E ($+61f)&lt;br /&gt;
 01EF:0B1F  A0A83F              mov  al,[3FA8]              ds:[3FA8]=0001&lt;br /&gt;
 01EF:0B22  3401                xor  al,01&lt;br /&gt;
 01EF:0B24  A2B23F              mov  [3FB2],al              ds:[3FB2]=0000&lt;br /&gt;
 01EF:0B27  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Set global variables (shooter and target position/distance):&lt;br /&gt;
 01EF:113E  8B36D43F            mov  si,[3FD4]              ds:[3FD4]=4DC2&lt;br /&gt;
 01EF:1142  8A7C01              mov  bh,[si+01]             ds:[4DC3]=0F0A	&amp;lt;-- Target X &lt;br /&gt;
 01EF:1145  8A5C02              mov  bl,[si+02]             ds:[4DC4]=270F	&amp;lt;-- Target Y&lt;br /&gt;
 01EF:1148  8BCB                mov  cx,bx&lt;br /&gt;
 01EF:114A  8B3E3746            mov  di,[4637]              ds:[4637]=4697&lt;br /&gt;
 01EF:114E  8A7501              mov  dh,[di+01]             ds:[4698]=120A	&amp;lt;-- Hero X &lt;br /&gt;
 01EF:1151  8A5502              mov  dl,[di+02]             ds:[4699]=1212	&amp;lt;-- Hero Y &lt;br /&gt;
 01EF:1154  8836A53F            mov  [3FA5],dh              ds:[3FA5]=0C0C	&amp;lt;-- Hero X saved at 3FA5&lt;br /&gt;
 01EF:1158  8816A63F            mov  [3FA6],dl              ds:[3FA6]=020C	&amp;lt;-- Hero Y saved at 3FA6&lt;br /&gt;
 01EF:115C  C6069F3F00          mov  byte [3F9F],00         ds:[3F9F]=0000	&amp;lt;-- reset projectile temp distance (area used for math)&lt;br /&gt;
 01EF:1161  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0002	&amp;lt;-- reset LOS 0=free, 1=blocked&lt;br /&gt;
 01EF:1166  B7FF                mov  bh,FF&lt;br /&gt;
 01EF:1168  8AC6                mov  al,dh&lt;br /&gt;
 01EF:116A  2AC5                sub  al,ch&lt;br /&gt;
 01EF:116C  7504                jne  00001172 ($+4)         (down)&lt;br /&gt;
 01EF:116E  B700                mov  bh,00					&amp;lt;-- target is on the RIGHT (&amp;gt;)&lt;br /&gt;
 01EF:1170  EB06                jmp  short 00001178 ($+6)   (down)&lt;br /&gt;
 01EF:1172  7304                jnc  00001178 ($+4)         (down)&lt;br /&gt;
 01EF:1174  F6D8                neg  al&lt;br /&gt;
 01EF:1176  B701                mov  bh,01					&amp;lt;-- target is on the LEFT (&amp;lt;)&lt;br /&gt;
 01EF:1178  A2A13F              mov  [3FA1],al              ds:[3FA1]=0301	&amp;lt;-- horizontal distance shooter-target saved at 3FA1&lt;br /&gt;
 01EF:117B  8AE8                mov  ch,al&lt;br /&gt;
 01EF:117D  B3FF                mov  bl,FF&lt;br /&gt;
 01EF:117F  8AC2                mov  al,dl&lt;br /&gt;
 01EF:1181  2AC1                sub  al,cl&lt;br /&gt;
 01EF:1183  7504                jne  00001189 ($+4)         (down)&lt;br /&gt;
 01EF:1185  B300                mov  bl,00					&amp;lt;-- target is UNDER (v)&lt;br /&gt;
 01EF:1187  EB06                jmp  short 0000118F ($+6)   (down)&lt;br /&gt;
 01EF:1189  7304                jnc  0000118F ($+4)         (down)&lt;br /&gt;
 01EF:118B  F6D8                neg  al&lt;br /&gt;
 01EF:118D  B301                mov  bl,01					&amp;lt;-- target is ABOVE (^)&lt;br /&gt;
 01EF:118F  A2A23F              mov  [3FA2],al              ds:[3FA2]=0003	&amp;lt;-- vertical distance shooter-target saved at 3FA2&lt;br /&gt;
 01EF:1192  3AC5                cmp  al,ch&lt;br /&gt;
 01EF:1194  7240                jc   000011D6 ($+40)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
bx (bh+bl) registry status based on target/shooter position:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| 0101 || 0001 || FF01&lt;br /&gt;
|-&lt;br /&gt;
| 0100 || TRGT || FF00&lt;br /&gt;
|-&lt;br /&gt;
| 01FF || 00FF || FFFF&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
VERTICAL shooting routine:&lt;br /&gt;
 01EF:1196  8ACD                mov  cl,ch&lt;br /&gt;
 01EF:1198  8AE8                mov  ch,al&lt;br /&gt;
 01EF:119A  8AD0                mov  dl,al&lt;br /&gt;
 01EF:119C  000E9F3F            add  [3F9F],cl              ds:[3F9F]=0000	&amp;lt;-- update projectile travelled distance&lt;br /&gt;
 01EF:11A0  38169F3F            cmp  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11A4  7208                jc   000011AE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11A6  28169F3F            sub  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11AA  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F0D	&amp;lt;-- Temp Projectile X (d 0:F655)&lt;br /&gt;
 01EF:11AE  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y (d 0:F656)&lt;br /&gt;
 01EF:11B2  C706E9370000        mov  word [37E9],0000       ds:[37E9]=D238	&amp;lt;-- set Vertical flag&lt;br /&gt;
 01EF:11B8  882EEB37            mov  [37EB],ch              ds:[37EB]=F1E0	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11BC  80FD01              cmp  ch,01&lt;br /&gt;
 01EF:11BF  7505                jne  000011C6 ($+5)         (down)&lt;br /&gt;
 01EF:11C1  80FBFF              cmp  bl,FF&lt;br /&gt;
 01EF:11C4  7403                je   000011C9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:11C6  E84B00              call 00001214 ($+4b)&lt;br /&gt;
 01EF:11C9  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:11CE  7401                je   000011D1 ($+1)         (no jmp)&lt;br /&gt;
 01EF:11D0  C3                  ret&lt;br /&gt;
 01EF:11D1  FECD                dec  ch&lt;br /&gt;
 01EF:11D3  75C7                jne  0000119C ($-39)        (up)&lt;br /&gt;
 01EF:11D5  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
HORIZONTAL shooting routine:&lt;br /&gt;
 01EF:11D6  8AD0                mov  dl,al				&lt;br /&gt;
 01EF:11D8  8ACD                mov  cl,ch		&amp;lt;-- it moves ch in cl&lt;br /&gt;
 01EF:11DA  32ED                xor  ch,ch		&amp;lt;-- and puts to 00 ch because uses loop (thus cx) instead of dec ch of vertical routine&lt;br /&gt;
 01EF:11DC  00169F3F            add  [3F9F],dl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E0  380E9F3F            cmp  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E4  7208                jc   000011EE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11E6  280E9F3F            sub  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11EA  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y&lt;br /&gt;
 01EF:11EE  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F03	&amp;lt;-- Temp Projectile X&lt;br /&gt;
 01EF:11F2  C706E9370100        mov  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- set Horizontal flag&lt;br /&gt;
 01EF:11F8  880EEB37            mov  [37EB],cl              ds:[37EB]=AA04	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11FC  80F901              cmp  cl,01&lt;br /&gt;
 01EF:11FF  7505                jne  00001206 ($+5)         (down)&lt;br /&gt;
 01EF:1201  80FFFF              cmp  bh,FF&lt;br /&gt;
 01EF:1204  7403                je   00001209 ($+3)         (no jmp)&lt;br /&gt;
 01EF:1206  E80B00              call 00001214 ($+b)&lt;br /&gt;
 01EF:1209  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0001	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:120E  7401                je   00001211 ($+1)         (no jmp)&lt;br /&gt;
 01EF:1210  C3                  ret&lt;br /&gt;
 01EF:1211  E2C9                loop 000011DC ($-37)&lt;br /&gt;
 01EF:1213  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
Collision check routine on current tile IN WALL/DOORS map (ds:566F):&lt;br /&gt;
 01EF:1214  53                  push bx&lt;br /&gt;
 01EF:1215  52                  push dx&lt;br /&gt;
 01EF:1216  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=0839&lt;br /&gt;
 01EF:121A  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=3936&lt;br /&gt;
 01EF:121E  E85D4E              call 0000607E ($+4e5d)&lt;br /&gt;
 01EF:1221  80BF6F5600          cmp  byte [bx+566F],00      ds:[576C]=8128	&amp;lt;-- Check if tile is 00, if true jumps to the Object map check&lt;br /&gt;
 01EF:1226  742A                je   00001252 ($+2a)        (no jmp)			at 0B6B:566F is where WALLS/DOORS map is stored&lt;br /&gt;
 01EF:1228  8A876F56            mov  al,[bx+566F]           ds:[576C]=8128	&amp;lt;-- mov into al the current TILE (28=is north secret door)&lt;br /&gt;
 01EF:122C  833EE93701          cmp  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- 1=H, 0=V check for opened door subroutines&lt;br /&gt;
 01EF:1231  7411                je   00001244 ($+11)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
Vertical shoot subroutine that checks for Horizontal walls/doors:&lt;br /&gt;
 01EF:1233  24AC                and  al,AC 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1235  0AC0                or   al,al					AC= 10101100&lt;br /&gt;
 01EF:1237  7419                je   00001252 ($+19)        (no jmp)&lt;br /&gt;
 01EF:1239  A820                test al,20					&amp;lt;-- if door is Horizontal&lt;br /&gt;
 01EF:123B  7442                je   0000127F ($+42)        (down)&lt;br /&gt;
 01EF:123D  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:123F  743E                je   0000127F ($+3e)        (down)&lt;br /&gt;
 01EF:1241  EB0F                jmp  short 00001252 ($+f)   (down)&lt;br /&gt;
 01EF:1243  90                  nop&lt;br /&gt;
 &lt;br /&gt;
Horizontal shoot subroutine that checks for Vertical walls/doors:&lt;br /&gt;
 01EF:1244  245C                and  al,5C 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1246  0AC0                or   al,al					5C= 01011100&lt;br /&gt;
 01EF:1248  7408                je   00001252 ($+8)         (down)&lt;br /&gt;
 01EF:124A  A810                test al,10					&amp;lt;-- if door is Vertical&lt;br /&gt;
 01EF:124C  7431                je   0000127F ($+31)        (down)&lt;br /&gt;
 01EF:124E  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:1250  742D                je   0000127F ($+2d)        (down)&lt;br /&gt;
&lt;br /&gt;
Collision check routine on current tile IN OBJECTS map (ds:586F):&lt;br /&gt;
 01EF:1252  803EEB3701          cmp  byte [37EB],01         ds:[37EB]=6E03	&amp;lt;-- checks if the projectile is about to hit the target&lt;br /&gt;
 01EF:1257  742B                je   00001284 ($+2b)        (down)&lt;br /&gt;
 01EF:1259  80BF6F5800          cmp  byte [bx+586F],00      ds:[1576F]=3637	&amp;lt;-- checks if the tile is passable (00)&lt;br /&gt;
 01EF:125E  740E                je   0000126E ($+e)         (down)&lt;br /&gt;
 01EF:1260  8A876F58            mov  al,[bx+586F]           ds:[1576F]=3637	&amp;lt;-- ds:586F is where OBJECTS map is stored&lt;br /&gt;
 01EF:1264  BB4649              mov  bx,4946					&amp;lt;-- ds:4946 check &lt;br /&gt;
 01EF:1267  D7                  xlat&lt;br /&gt;
 01EF:1268  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:126B  EB17                jmp  short 00001284 ($+17)  (down)&lt;br /&gt;
 01EF:126D  90                  nop&lt;br /&gt;
 01EF:126E  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=004D&lt;br /&gt;
 01EF:1272  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=4D4D&lt;br /&gt;
 01EF:1276  E80E00              call 00001287 ($+e)&lt;br /&gt;
 01EF:1279  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:127C  EB06                jmp  short 00001284 ($+6)   (down)&lt;br /&gt;
 01EF:127E  90                  nop&lt;br /&gt;
 01EF:127F  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=BA6B	&amp;lt;-- sets LOS as blocked (1) and exits&lt;br /&gt;
 01EF:1284  5A                  pop  dx&lt;br /&gt;
 01EF:1285  5B                  pop  bx&lt;br /&gt;
 01EF:1286  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Updates with random numbers the first three bytes of heroes&#039; equipment every movement (presumably used as seed for RNG):&lt;br /&gt;
 01EF:1287  51                  push cx&lt;br /&gt;
 01EF:1288  57                  push di&lt;br /&gt;
 01EF:1289  B90500              mov  cx,0005&lt;br /&gt;
 01EF:128C  BF6346              mov  di,4663	&amp;lt;-- first byte of Barbarian equipment in memory&lt;br /&gt;
 01EF:128F  33C0                xor  ax,ax&lt;br /&gt;
 01EF:1291  803D00              cmp  byte [di],00           ds:[6CAA]=0000&lt;br /&gt;
 01EF:1294  740C                je   000012A2 ($+c)         (down)&lt;br /&gt;
 01EF:1296  385501              cmp  [di+01],dl             ds:[6CAB]=0000&lt;br /&gt;
 01EF:1299  7507                jne  000012A2 ($+7)         (no jmp)&lt;br /&gt;
 01EF:129B  387502              cmp  [di+02],dh             ds:[6CAC]=0000&lt;br /&gt;
 01EF:129E  7502                jne  000012A2 ($+2)         (no jmp)&lt;br /&gt;
 01EF:12A0  B001                mov  al,01&lt;br /&gt;
 01EF:12A2  83C71A              add  di,001A	&amp;lt;-- jumps to the following hero&#039;s equipment&lt;br /&gt;
 01EF:12A5  E2EA                loop 00001291 ($-16)&lt;br /&gt;
 01EF:12A7  5F                  pop  di&lt;br /&gt;
 01EF:12A8  59                  pop  cx&lt;br /&gt;
 01EF:12A9  C3                  ret&lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh&lt;br /&gt;
 01EF:6080  B700                mov  bh,00&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5					&amp;lt;-- ds:5AC5 check &lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[FF00]=3737&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New shooting routine ===&lt;br /&gt;
Finally I came up with a proper line of sight mechanism that cover roughly 99% of the &amp;quot;impossible shots&amp;quot;. There will always be a particular combiantion of monster-door-hero position that can lead to an &amp;quot;improbable shot&amp;quot;, but that&#039;s it.  &lt;br /&gt;
&lt;br /&gt;
Direction choice routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1198:  88 D0             mov  al, dl&lt;br /&gt;
 1ef:119a:  88 CC             mov  ah, cl&lt;br /&gt;
 1ef:119c:  05 01 01          add  ax, 0x101&lt;br /&gt;
 1ef:119f:  D0 E8             shr  al, 1&lt;br /&gt;
 1ef:11a1:  D0 EC             shr  ah, 1&lt;br /&gt;
 1ef:11a3:  A3 AA 3F          mov  word ptr [0x3faa], ax        &amp;lt;-- save half distance of X and Y&lt;br /&gt;
 &lt;br /&gt;
 1ef:11a6:  30 C0             xor  al, al                    &amp;lt;-- direction choice routine&lt;br /&gt;
 1ef:11a8:  3A 0E AB 3F       cmp  cl, byte ptr [0x3fab]        &amp;lt;-- check if X distance reached it&#039;s half&lt;br /&gt;
 1ef:11ac:  74 13             je   0x11c1                    &amp;lt;-- if YES reset X half value and change direction&lt;br /&gt;
 1ef:11ae:  3A 16 AA 3F       cmp  dl, byte ptr [0x3faa]        &amp;lt;-- check if Y distance reached it&#039;s half&lt;br /&gt;
 1ef:11b2:  74 06             je   0x11ba                    &amp;lt;-- if YES reset Y half value and change direction&lt;br /&gt;
 1ef:11b4:  38 CA             cmp  dl, cl&lt;br /&gt;
 1ef:11b6:  7C 2B             jl   0x11e3&lt;br /&gt;
 1ef:11b8:  EB 0C             jmp  0x11c6&lt;br /&gt;
 1ef:11ba:  C6 06 AA 3F 00    mov  byte ptr [0x3faa], 0&lt;br /&gt;
 1ef:11bf:  EB 22             jmp  0x11e3&lt;br /&gt;
 1ef:11c1:  C6 06 AB 3F 00    mov  byte ptr [0x3fab], 0&lt;br /&gt;
&lt;br /&gt;
Vertical&lt;br /&gt;
 1ef:11c6:  84 D2             test dl, dl                    &amp;lt;-- vertical routine&lt;br /&gt;
 1ef:11c8:  74 19             je   0x11e3                    &amp;lt;-- if Y distance is zero go to horizontal routine&lt;br /&gt;
 1ef:11ca:  00 1E A6 3F       add  byte ptr [0x3fa6], bl&lt;br /&gt;
 1ef:11ce:  B8 00 00          mov  ax, 0&lt;br /&gt;
 1ef:11d1:  80 FB FF          cmp  bl, 0xff&lt;br /&gt;
 1ef:11d4:  75 02             jne  0x11d8&lt;br /&gt;
 1ef:11d6:  B4 1A             mov  ah, 0x1a&lt;br /&gt;
 1ef:11d8:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11db:  FE CA             dec  dl&lt;br /&gt;
 1ef:11dd:  88 16 EB 37       mov  byte ptr [0x37eb], dl&lt;br /&gt;
 1ef:11e1:  EB 1B             jmp  0x11fe&lt;br /&gt;
 &lt;br /&gt;
Horizontal&lt;br /&gt;
 1ef:11e3:  84 C9             test cl, cl                    &amp;lt;-- horizontal routine&lt;br /&gt;
 1ef:11e5:  74 DF             je   0x11c6                    &amp;lt;-- if X distance is zero go to vertical routine&lt;br /&gt;
 1ef:11e7:  00 3E A5 3F       add  byte ptr [0x3fa5], bh&lt;br /&gt;
 1ef:11eb:  B8 01 00          mov  ax, 1&lt;br /&gt;
 1ef:11ee:  80 FF FF          cmp  bh, 0xff&lt;br /&gt;
 1ef:11f1:  75 02             jne  0x11f5&lt;br /&gt;
 1ef:11f3:  B4 01             mov  ah, 1&lt;br /&gt;
 1ef:11f5:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11f8:  FE C9             dec  cl&lt;br /&gt;
 1ef:11fa:  88 0E EB 37       mov  byte ptr [0x37eb], cl&lt;br /&gt;
 &lt;br /&gt;
 1ef:11fe:  E8 13 00          call 0x1214                    &amp;lt;-- calls wall/object collision check routine&lt;br /&gt;
 1ef:1201:  80 3E A8 3F 00    cmp  byte ptr [0x3fa8], 0      &amp;lt;-- collision flag&lt;br /&gt;
 1ef:1206:  74 01             je   0x1209   &lt;br /&gt;
 1ef:1208:  C3                ret                            &amp;lt;-- else object or wall was HIT&lt;br /&gt;
 1ef:1209:  88 C8             mov  al, cl&lt;br /&gt;
 1ef:120b:  00 D0             add  al, dl                    &amp;lt;-- if X+Y distance is not zero&lt;br /&gt;
 1ef:120d:  75 97             jne  0x11a6                    &amp;lt;-- back to direction choice routine&lt;br /&gt;
 1ef:120f:  C3                ret                            &amp;lt;-- else target was HIT&lt;br /&gt;
 1ef:1210:  90                nop  &lt;br /&gt;
 1ef:1211:  90                nop  &lt;br /&gt;
 1ef:1212:  90                nop  &lt;br /&gt;
 1ef:1213:  90                nop&lt;br /&gt;
 &lt;br /&gt;
Wall/object collision check routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1214:  53                push bx&lt;br /&gt;
 1ef:1215:  52                push dx&lt;br /&gt;
 1ef:1216:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]&lt;br /&gt;
 1ef:121a:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:121e:  E8 5D 4E          call 0x607e&lt;br /&gt;
 1ef:1221:  A0 EA 37          mov  al, byte ptr [0x37ea]&lt;br /&gt;
 1ef:1224:  30 E4             xor  ah, ah&lt;br /&gt;
 1ef:1226:  01 C3             add  bx, ax&lt;br /&gt;
 1ef:1228:  8A 87 6F 56       mov  al, byte ptr [bx + 0x566f]    &amp;lt;-- checks if the tile is free (00) or occupied (30=rock)&lt;br /&gt;
 1ef:122c:  3C 00             cmp  al, 0&lt;br /&gt;
 1ef:122e:  74 21             je   0x1251                        &amp;lt;-- if occupied jump to specific object check&lt;br /&gt;
 1ef:1230:  80 3E E9 37 01    cmp  byte ptr [0x37e9], 1&lt;br /&gt;
 1ef:1235:  74 0C             je   0x1243&lt;br /&gt;
 1ef:1237:  A8 20             test al, 0x20                        &amp;lt;-- Horizontal Door check&lt;br /&gt;
 1ef:1239:  75 12             jne  0x124d&lt;br /&gt;
 1ef:123b:  A8 80             test al, 0x80                        &amp;lt;-- Horizontal Wall check&lt;br /&gt;
 1ef:123d:  74 12             je   0x1251&lt;br /&gt;
 1ef:123f:  EB 3E             jmp  0x127f&lt;br /&gt;
 1ef:1241:  90                nop  &lt;br /&gt;
 1ef:1242:  90                nop  &lt;br /&gt;
 &lt;br /&gt;
 1ef:1243:  A8 10             test al, 0x10                        &amp;lt;-- Vertical Door check&lt;br /&gt;
 1ef:1245:  75 06             jne  0x124d&lt;br /&gt;
 1ef:1247:  A8 40             test al, 0x40                        &amp;lt;-- Vertical Wall check&lt;br /&gt;
 1ef:1249:  74 06             je   0x1251&lt;br /&gt;
 1ef:124b:  EB 32             jmp  0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:124d:  A8 04             test al, 4                            &amp;lt;-- opened door check&lt;br /&gt;
 1ef:124f:  74 2E             je   0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:1251:  8A 87 6F 58       mov  al, byte ptr [bx + 0x586f]    &amp;lt;-- specific object check&lt;br /&gt;
 1ef:1255:  BB 86 49          mov  bx, 0x4986                    &amp;lt;-- bitmask table where object properties are stored&lt;br /&gt;
 1ef:1258:  51                push cx&lt;br /&gt;
 1ef:1259:  88 C1             mov  cl, al&lt;br /&gt;
 1ef:125b:  C0 E9 03          shr  cl, 3&lt;br /&gt;
 1ef:125e:  01 CB             add  bx, cx&lt;br /&gt;
 1ef:1260:  59                pop  cx&lt;br /&gt;
 1ef:1261:  24 07             and  al, 7&lt;br /&gt;
 1ef:1263:  0F A3 07          bt   word ptr [bx], ax                &amp;lt;-- verify if the object is passable (ie. table) or not (ie. fireplace)&lt;br /&gt;
 1ef:1266:  72 17             jb   0x127f&lt;br /&gt;
 1ef:1268:  80 3E EB 37 00    cmp  byte ptr [0x37eb], 0            &amp;lt;-- checks if the projectile hit the target&lt;br /&gt;
 1ef:126d:  74 15             je   0x1284&lt;br /&gt;
 1ef:126f:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]            &amp;lt;-- update projectile&#039;s X and Y&lt;br /&gt;
 1ef:1273:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:1277:  E8 0D 00          call 0x1287&lt;br /&gt;
 1ef:127a:  A2 A8 3F          mov  byte ptr [0x3fa8], al&lt;br /&gt;
 1ef:127d:  EB 05             jmp  0x1284&lt;br /&gt;
 1ef:127f:  C6 06 A8 3F 01    mov  byte ptr [0x3fa8], 1&lt;br /&gt;
 1ef:1284:  5A                pop  dx&lt;br /&gt;
 1ef:1285:  5B                pop  bx&lt;br /&gt;
 1ef:1286:  C3                ret&lt;br /&gt;
&lt;br /&gt;
== Monster attack routine ==&lt;br /&gt;
This first block defines the target priority: barbarian - dwarf - elf - wizard - ragnar&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to revers it forcing the monster to chose the weaker hero first reversing the logic by starting from ragnar profile and then jump backward subtracting 1A.&amp;lt;br&amp;gt;&lt;br /&gt;
See [[#Heroes&#039; default profiles|Heroes&#039; default profiles]] for reference.&lt;br /&gt;
&lt;br /&gt;
 01EF:2257  BE6346              mov  si,4663					&amp;lt;-- starting profile offset 4663=barbarian&lt;br /&gt;
 01EF:225A  B90500              mov  cx,0005					&amp;lt;-- loop repeats 5 times &lt;br /&gt;
 01EF:225D  51                  push cx&lt;br /&gt;
 01EF:225E  8936D63F            mov  [3FD6],si              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2262  8A4419              mov  al,[si+19]             ds:[46CA]=0003	&amp;lt;-- jumps to hero&#039;s ID position&lt;br /&gt;
 01EF:2265  A2BC3F              mov  [3FBC],al              ds:[3FBC]=0003&lt;br /&gt;
 01EF:2268  E85800              call 000022C3 ($+58)&lt;br /&gt;
 01EF:226B  59                  pop  cx&lt;br /&gt;
 01EF:226C  8B36D63F            mov  si,[3FD6]              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2270  83C61A              add  si,001A					&amp;lt;-- jumps to the next profile&lt;br /&gt;
 01EF:2273  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2278  7503                jne  0000227D ($+3)         (down)&lt;br /&gt;
 01EF:227A  E95102              jmp  000024CE ($+251)       (down)&lt;br /&gt;
 01EF:227D  803EA83F03          cmp  byte [3FA8],03         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2282  7503                jne  00002287 ($+3)         (down)&lt;br /&gt;
 01EF:2284  E94702              jmp  000024CE ($+247)       (down)&lt;br /&gt;
 01EF:2287  E2D4                loop 0000225D ($-2c)&lt;br /&gt;
 01EF:2289  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 01EF:22C3  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000&lt;br /&gt;
 01EF:22C8  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:22CB  7503                jne  000022D0 ($+3)         (no jmp)&lt;br /&gt;
 01EF:22CD  E98101              jmp  00002451 ($+181)       (down)&lt;br /&gt;
 01EF:22D0  8A4403              mov  al,[si+03]             ds:[4666]=C726	&amp;lt;-- hero&#039;s room&lt;br /&gt;
 01EF:22D3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room&lt;br /&gt;
 01EF:22D6  7403                je   000022DB ($+3)         (down)&lt;br /&gt;
 01EF:22D8  E97601              jmp  00002451 ($+176)       (down)&lt;br /&gt;
 01EF:22DB  F6441801            test byte [si+18],01        ds:[467B]=0000&lt;br /&gt;
 01EF:22DF  7403                je   000022E4 ($+3)         (down)&lt;br /&gt;
 01EF:22E1  E96D01              jmp  00002451 ($+16d)       (down)&lt;br /&gt;
 01EF:22E4  8B5401              mov  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:22E7  52                  push dx&lt;br /&gt;
 01EF:22E8  57                  push di&lt;br /&gt;
 01EF:22E9  E864F7              call 00001A50 ($-89c)&lt;br /&gt;
 01EF:22EC  5F                  pop  di&lt;br /&gt;
 01EF:22ED  57                  push di&lt;br /&gt;
 01EF:22EE  E84E02              call 0000253F ($+24e)&lt;br /&gt;
 01EF:22F1  E8F03D              call 000060E4 ($+3df0)&lt;br /&gt;
 01EF:22F4  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:22F7  E88D23              call 00004687 ($+238d)&lt;br /&gt;
 01EF:22FA  5F                  pop  di&lt;br /&gt;
 01EF:22FB  5A                  pop  dx&lt;br /&gt;
 01EF:22FC  8816A53F            mov  [3FA5],dl              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2300  8836A63F            mov  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2304  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:2307  891ECA40            mov  [40CA],bx              ds:[40CA]=40A2&lt;br /&gt;
 01EF:230B  E8703D              call 0000607E ($+3d70)			&amp;lt;-- 	if jumped the monster doesn&#039;t attack when in contact&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:230E  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2312  8A07                mov  al,[bx]                ds:[3F28]=4040		&lt;br /&gt;
 01EF:2314  243F                and  al,3F				&lt;br /&gt;
 01EF:2316  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room check. if removed the monster attack through walls and doors&lt;br /&gt;
 01EF:2319  7403                je   0000231E ($+3)         (down)&lt;br /&gt;
 01EF:231B  E93301              jmp  00002451 ($+133)       (down)&lt;br /&gt;
 01EF:231E  B501                mov  ch,01&lt;br /&gt;
 01EF:2320  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2323  2A4501              sub  al,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2326  7504                jne  0000232C ($+4)         (no jmp)&lt;br /&gt;
 01EF:2328  B500                mov  ch,00&lt;br /&gt;
 01EF:232A  EB08                jmp  short 00002334 ($+8)   (down)&lt;br /&gt;
 01EF:232C  3C80                cmp  al,80&lt;br /&gt;
 01EF:232E  7204                jc   00002334 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2330  F6D8                neg  al&lt;br /&gt;
 01EF:2332  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2334  A2A13F              mov  [3FA1],al              ds:[3FA1]=0100&lt;br /&gt;
 01EF:2337  882EA33F            mov  [3FA3],ch              ds:[3FA3]=0100&lt;br /&gt;
 01EF:233B  B501                mov  ch,01&lt;br /&gt;
 01EF:233D  A0A63F              mov  al,[3FA6]              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2340  2A4502              sub  al,[di+02]             ds:[4DBA]=260F&lt;br /&gt;
 01EF:2343  7504                jne  00002349 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2345  B500                mov  ch,00&lt;br /&gt;
 01EF:2347  EB08                jmp  short 00002351 ($+8)   (down)&lt;br /&gt;
 01EF:2349  3C80                cmp  al,80&lt;br /&gt;
 01EF:234B  7204                jc   00002351 ($+4)         (no jmp)&lt;br /&gt;
 01EF:234D  F6D8                neg  al&lt;br /&gt;
 01EF:234F  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2351  A2A23F              mov  [3FA2],al              ds:[3FA2]=0001&lt;br /&gt;
 01EF:2354  882EA43F            mov  [3FA4],ch              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2358  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:235B  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006&lt;br /&gt;
 01EF:235F  C606A93F00          mov  byte [3FA9],00         ds:[3FA9]=0000&lt;br /&gt;
 01EF:2364  8A5D09              mov  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:2367  02DB                add  bl,bl&lt;br /&gt;
 01EF:2369  02DB                add  bl,bl&lt;br /&gt;
 01EF:236B  025D09              add  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:236E  32FF                xor  bh,bh&lt;br /&gt;
 01EF:2370  8A870648            mov  al,[bx+4806]           [illegal]&lt;br /&gt;
 01EF:2374  A29C3F              mov  [3F9C],al              ds:[3F9C]=0003&lt;br /&gt;
 01EF:2377  8A0EA23F            mov  cl,[3FA2]              ds:[3FA2]=0001&lt;br /&gt;
 01EF:237B  A0A13F              mov  al,[3FA1]              ds:[3FA1]=0100&lt;br /&gt;
 01EF:237E  3AC1                cmp  al,cl&lt;br /&gt;
 01EF:2380  7203                jc   00002385 ($+3)         (no jmp)&lt;br /&gt;
 01EF:2382  EB6A                jmp  short 000023EE ($+6a)  (down)&lt;br /&gt;
 01EF:2384  90                  nop&lt;br /&gt;
 01EF:2385  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2389  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:238D  7425                je   000023B4 ($+25)        (down)&lt;br /&gt;
 01EF:238F  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2392  0AC0                or   al,al&lt;br /&gt;
 01EF:2394  741E                je   000023B4 ($+1e)        (down)&lt;br /&gt;
 01EF:2396  02F0                add  dh,al&lt;br /&gt;
 01EF:2398  E8DD00              call 00002478 ($+dd)&lt;br /&gt;
 01EF:239B  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:239D  7503                jne  000023A2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:239F  E9B500              jmp  00002457 ($+b5)        (down)&lt;br /&gt;
 01EF:23A2  0AC0                or   al,al&lt;br /&gt;
 01EF:23A4  750E                jne  000023B4 ($+e)         (no jmp)&lt;br /&gt;
 01EF:23A6  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:23AA  E8B000              call 0000245D ($+b0)&lt;br /&gt;
 01EF:23AD  7303                jnc  000023B2 ($+3)         (down)&lt;br /&gt;
 01EF:23AF  E99900              jmp  0000244B ($+99)        (down)&lt;br /&gt;
 01EF:23B2  EBD1                jmp  short 00002385 ($-2f)  (up)&lt;br /&gt;
 01EF:23B4  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23B8  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23BB  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23BD  7503                jne  000023C2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23BF  E98F00              jmp  00002451 ($+8f)        (down)&lt;br /&gt;
 01EF:23C2  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23C5  0AC0                or   al,al&lt;br /&gt;
 01EF:23C7  7503                jne  000023CC ($+3)         (no jmp)&lt;br /&gt;
 01EF:23C9  E98500              jmp  00002451 ($+85)        (down)&lt;br /&gt;
 01EF:23CC  02D0                add  dl,al&lt;br /&gt;
 01EF:23CE  E8A700              call 00002478 ($+a7)&lt;br /&gt;
 01EF:23D1  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:23D3  7503                jne  000023D8 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23D5  E97F00              jmp  00002457 ($+7f)        (down)&lt;br /&gt;
 01EF:23D8  0AC0                or   al,al&lt;br /&gt;
 01EF:23DA  7403                je   000023DF ($+3)         (down)&lt;br /&gt;
 01EF:23DC  EB73                jmp  short 00002451 ($+73)  (down)&lt;br /&gt;
 01EF:23DE  90                  nop&lt;br /&gt;
 01EF:23DF  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23E2  32E4                xor  ah,ah&lt;br /&gt;
 01EF:23E4  E87600              call 0000245D ($+76)&lt;br /&gt;
 01EF:23E7  7303                jnc  000023EC ($+3)         (down)&lt;br /&gt;
 01EF:23E9  EB60                jmp  short 0000244B ($+60)  (down)&lt;br /&gt;
 01EF:23EB  90                  nop&lt;br /&gt;
 01EF:23EC  EB97                jmp  short 00002385 ($-69)  (up)&lt;br /&gt;
 01EF:23EE  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23F2  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23F5  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23F7  7426                je   0000241F ($+26)        (down)&lt;br /&gt;
 01EF:23F9  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23FC  0AC0                or   al,al&lt;br /&gt;
 01EF:23FE  741F                je   0000241F ($+1f)        (down)&lt;br /&gt;
 01EF:2400  02D0                add  dl,al&lt;br /&gt;
 01EF:2402  E87300              call 00002478 ($+73)&lt;br /&gt;
 01EF:2405  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2407  7503                jne  0000240C ($+3)         (no jmp)&lt;br /&gt;
 01EF:2409  EB4C                jmp  short 00002457 ($+4c)  (down)&lt;br /&gt;
 01EF:240B  90                  nop&lt;br /&gt;
 01EF:240C  0AC0                or   al,al&lt;br /&gt;
 01EF:240E  750F                jne  0000241F ($+f)         (no jmp)&lt;br /&gt;
 01EF:2410  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:2413  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2415  E84500              call 0000245D ($+45)&lt;br /&gt;
 01EF:2418  7303                jnc  0000241D ($+3)         (down)&lt;br /&gt;
 01EF:241A  EB2F                jmp  short 0000244B ($+2f)  (down)&lt;br /&gt;
 01EF:241C  90                  nop&lt;br /&gt;
 01EF:241D  EBCF                jmp  short 000023EE ($-31)  (up)&lt;br /&gt;
 01EF:241F  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2423  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2427  7428                je   00002451 ($+28)        (down)&lt;br /&gt;
 01EF:2429  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:242C  0AC0                or   al,al&lt;br /&gt;
 01EF:242E  7421                je   00002451 ($+21)        (down)&lt;br /&gt;
 01EF:2430  02F0                add  dh,al&lt;br /&gt;
 01EF:2432  E84300              call 00002478 ($+43)&lt;br /&gt;
 01EF:2435  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2437  741E                je   00002457 ($+1e)        (down)&lt;br /&gt;
 01EF:2439  0AC0                or   al,al&lt;br /&gt;
 01EF:243B  7514                jne  00002451 ($+14)        (no jmp)&lt;br /&gt;
 01EF:243D  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2441  E81900              call 0000245D ($+19)&lt;br /&gt;
 01EF:2444  7303                jnc  00002449 ($+3)         (down)&lt;br /&gt;
 01EF:2446  EB03                jmp  short 0000244B ($+3)   (down)&lt;br /&gt;
 01EF:2448  90                  nop&lt;br /&gt;
 01EF:2449  EBA3                jmp  short 000023EE ($-5d)  (up)&lt;br /&gt;
 01EF:244B  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2450  C3                  ret&lt;br /&gt;
 01EF:2451  C606A83F02          mov  byte [3FA8],02         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2456  C3                  ret&lt;br /&gt;
 01EF:2457  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- hero is reachable&lt;br /&gt;
 01EF:245C  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:245D  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006	&amp;lt;-- called only when the monster needs to move&lt;br /&gt;
 01EF:2461  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:2465  8807                mov  [bx],al                ds:[3F28]=6148&lt;br /&gt;
 01EF:2467  886701              mov  [bx+01],ah             ds:[3F29]=0061&lt;br /&gt;
 01EF:246A  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:246F  FE06A93F            inc  byte [3FA9]            ds:[3FA9]=0000&lt;br /&gt;
 01EF:2473  FE0E9C3F            dec  byte [3F9C]            ds:[3F9C]=0003&lt;br /&gt;
 01EF:2477  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:2478  A0BC3F              mov  al,[3FBC]              ds:[3FBC]=0000&lt;br /&gt;
 01EF:247B  E80139              call 00005D7F ($+3901)&lt;br /&gt;
 01EF:247E  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:2481  7408                je   0000248B ($+8)         (down)&lt;br /&gt;
 01EF:2483  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:2486  7503                jne  0000248B ($+3)         (no jmp)&lt;br /&gt;
 01EF:2488  B0FF                mov  al,FF&lt;br /&gt;
 01EF:248A  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:248B  B500                mov  ch,00&lt;br /&gt;
 01EF:248D  382EBC3F            cmp  [3FBC],ch              ds:[3FBC]=0000&lt;br /&gt;
 01EF:2491  7412                je   000024A5 ($+12)        (down)&lt;br /&gt;
 01EF:2493  8AC5                mov  al,ch&lt;br /&gt;
 01EF:2495  E8E738              call 00005D7F ($+38e7)&lt;br /&gt;
 01EF:2498  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:249B  7408                je   000024A5 ($+8)         (down)&lt;br /&gt;
 01EF:249D  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:24A0  7503                jne  000024A5 ($+3)         (no jmp)&lt;br /&gt;
 01EF:24A2  B001                mov  al,01&lt;br /&gt;
 01EF:24A4  C3                  ret&lt;br /&gt;
 01EF:24A5  FEC5                inc  ch&lt;br /&gt;
 01EF:24A7  80FD04              cmp  ch,04&lt;br /&gt;
 01EF:24AA  75E1                jne  0000248D ($-1f)        (no jmp)&lt;br /&gt;
 01EF:24AC  52                  push dx&lt;br /&gt;
 01EF:24AD  E8CE3B              call 0000607E ($+3bce)&lt;br /&gt;
 01EF:24B0  5A                  pop  dx&lt;br /&gt;
 01EF:24B1  81C36F58            add  bx,586F&lt;br /&gt;
 01EF:24B5  803F00              cmp  byte [bx],00           ds:[3F28]=6148&lt;br /&gt;
 01EF:24B8  7403                je   000024BD ($+3)         (down)&lt;br /&gt;
 01EF:24BA  B002                mov  al,02&lt;br /&gt;
 01EF:24BC  C3                  ret&lt;br /&gt;
 01EF:24BD  8A8700FC            mov  al,[bx-0400]           ds:[3B28]=E04B&lt;br /&gt;
 01EF:24C1  243F                and  al,3F&lt;br /&gt;
 01EF:24C3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26 	&amp;lt;-- monster&#039;s room check.&lt;br /&gt;
 01EF:24C6  7503                jne  000024CB ($+3)         (no jmp)	&lt;br /&gt;
 01EF:24C8  32C0                xor  al,al&lt;br /&gt;
 01EF:24CA  C3                  ret&lt;br /&gt;
 01EF:24CB  B003                mov  al,03&lt;br /&gt;
 01EF:24CD  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:24CE  893ED43F            mov  [3FD4],di              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24D2  8A0EA93F            mov  cl,[3FA9]              ds:[3FA9]=0001&lt;br /&gt;
 01EF:24D6  0AC9                or   cl,cl&lt;br /&gt;
 01EF:24D8  7455                je   0000252F ($+55)        (down)&lt;br /&gt;
 01EF:24DA  32ED                xor  ch,ch&lt;br /&gt;
 01EF:24DC  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:24DF  891ECA40            mov  [40CA],bx              ds:[40CA]=40A4&lt;br /&gt;
 01EF:24E3  51                  push cx&lt;br /&gt;
 01EF:24E4  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24E8  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24EB  E8903B              call 0000607E ($+3b90)&lt;br /&gt;
 01EF:24EE  8A8F6F58            mov  cl,[bx+586F]           ds:[59FB]=0000&lt;br /&gt;
 01EF:24F2  C6876F5800          mov  byte [bx+586F],00      ds:[59FB]=0000&lt;br /&gt;
 01EF:24F7  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:24FB  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24FE  0217                add  dl,[bx]                ds:[018C]=1149&lt;br /&gt;
 01EF:2500  027701              add  dh,[bx+01]             ds:[018D]=0611&lt;br /&gt;
 01EF:2503  895501              mov  [di+01],dx             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2506  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:250B  E8703B              call 0000607E ($+3b70)&lt;br /&gt;
 01EF:250E  888F6F58            mov  [bx+586F],cl           ds:[AE50]=0A16&lt;br /&gt;
 01EF:2512  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2516  895D04              mov  [di+04],bx             ds:[4DBC]=55E1&lt;br /&gt;
 01EF:2519  E834F5              call 00001A50 ($-acc)		&lt;br /&gt;
 01EF:251C  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:2520  E81C00              call 0000253F ($+1c)&lt;br /&gt;
 01EF:2523  E8BE3B              call 000060E4 ($+3bbe)&lt;br /&gt;
 01EF:2526  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:2529  E85B21              call 00004687 ($+215b)						&amp;lt;-- 500.000 nop cycles, to slow down monster&#039;s animation&lt;br /&gt;
 01EF:252C  59                  pop  cx		&lt;br /&gt;
 01EF:252D  E2B4                loop 000024E3 ($-4c)&lt;br /&gt;
 01EF:252F  51                  push cx&lt;br /&gt;
 01EF:2530  B93200              mov  cx,0032&lt;br /&gt;
 01EF:2533  E86A11              call 000036A0 ($+116a)						&amp;lt;-- more nops &lt;br /&gt;
 01EF:2536  E2FB                loop 00002533 ($-5)&lt;br /&gt;
 01EF:2538  59                  pop  cx&lt;br /&gt;
 01EF:2539  E853F8              call 00001D8F ($-7ad)						&amp;lt;-- here the monster attacks whein in contact with the hero&lt;br /&gt;
 01EF:253C  E99131              jmp  000056D0 ($+3191)      (down)&lt;br /&gt;
 01EF:253F  8A4502              mov  al,[di+02]             ds:[EF42]=3736&lt;br /&gt;
 01EF:2542  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2544  BA000A              mov  dx,0A00&lt;br /&gt;
 01EF:2547  F7E2                mul  dx&lt;br /&gt;
 01EF:2549  8BD8                mov  bx,ax&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:4687  51                  push cx&lt;br /&gt;
 01EF:4688  E820EF              call 000035AB ($-10e0)&lt;br /&gt;
 01EF:468B  59                  pop  cx&lt;br /&gt;
 01EF:468C  E2F9                loop 00004687 ($-7)&lt;br /&gt;
 01EF:468E  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh	&lt;br /&gt;
 01EF:6080  B700                mov  bh,00	&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5&lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[0130]=0101&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hero&#039;s pathfinding routine ==&lt;br /&gt;
The pathfinder algorithm the programmer chose was a simple variation of the A*, and is perfectly implemented. You can click on any tiles on the screen even on the invisible ones outside the room. If there is a clean path, the hero will reach that tile.&lt;br /&gt;
&lt;br /&gt;
 01EF:6449  E8E2D4              call 0000392E ($-2b1e)&lt;br /&gt;
 01EF:644C  E85800              call 000064A7 ($+58)&lt;br /&gt;
 01EF:644F  833CFF              cmp  word [si],FFFF         ds:[3911]=0000&lt;br /&gt;
 01EF:6452  7503                jne  00006457 ($+3)         (down)&lt;br /&gt;
 01EF:6454  E95F03              jmp  000067B6 ($+35f)       (down)&lt;br /&gt;
 &lt;br /&gt;
 01EF:67B6  8B16E747            mov  dx,[47E7]              ds:[47E7]=0087&lt;br /&gt;
 01EF:67BA  8B2EE947            mov  bp,[47E9]              ds:[47E9]=0097&lt;br /&gt;
 01EF:67BE  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67C1  BE1941              mov  si,4119&lt;br /&gt;
 01EF:67C4  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67C7  51                  push cx&lt;br /&gt;
 01EF:67C8  8B4402              mov  ax,[si+02]             ds:[491E]=01C0&lt;br /&gt;
 01EF:67CB  051800              add  ax,0018&lt;br /&gt;
 01EF:67CE  2BC2                sub  ax,dx&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (down)&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67D2  F7D8                neg  ax&lt;br /&gt;
 01EF:67D4  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67D6  8B0C                mov  cx,[si]                ds:[4119]=0044&lt;br /&gt;
 01EF:67D8  83C108              add  cx,0008&lt;br /&gt;
 01EF:67DB  2BCD                sub  cx,bp&lt;br /&gt;
 01EF:67DD  7302                jnc  000067E1 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67DF  F7D9                neg  cx&lt;br /&gt;
 01EF:67E1  03C1                add  ax,cx&lt;br /&gt;
 01EF:67E3  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67E5  8907                mov  [bx],ax                ds:[402D]=0000&lt;br /&gt;
 01EF:67E7  83C302              add  bx,0002&lt;br /&gt;
 01EF:67EA  83C604              add  si,0004&lt;br /&gt;
 01EF:67ED  59                  pop  cx&lt;br /&gt;
 01EF:67EE  E2D7                loop 000067C7 ($-29)&lt;br /&gt;
 01EF:67F0  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67F3  B8FFFF              mov  ax,FFFF&lt;br /&gt;
 01EF:67F6  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67F9  3B07                cmp  ax,[bx]                ds:[402D]=0000&lt;br /&gt;
 01EF:67FB  7204                jc   00006801 ($+4)         (down)&lt;br /&gt;
 01EF:67FD  8B07                mov  ax,[bx]                ds:[4095]=0000&lt;br /&gt;
 01EF:67FF  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6801  83C302              add  bx,0002&lt;br /&gt;
 01EF:6804  E2F3                loop 000067F9 ($-d)&lt;br /&gt;
 01EF:6806  3D0800              cmp  ax,0008&lt;br /&gt;
 01EF:6809  7201                jc   0000680C ($+1)         (no jmp)&lt;br /&gt;
 01EF:680B  C3                  ret&lt;br /&gt;
 01EF:680C  BB3400              mov  bx,0034&lt;br /&gt;
 01EF:680F  2BDA                sub  bx,dx&lt;br /&gt;
 01EF:6811  83FB2D              cmp  bx,002D&lt;br /&gt;
 01EF:6814  720B                jc   00006821 ($+b)         (down)&lt;br /&gt;
 01EF:6816  83EB2D              sub  bx,002D&lt;br /&gt;
 01EF:6819  D1E3                shl  bx,1&lt;br /&gt;
 01EF:681B  8B8F034A            mov  cx,[bx+4A03]           ds:[4A14]=0E09&lt;br /&gt;
 01EF:681F  EB06                jmp  short 00006827 ($+6)   (down)&lt;br /&gt;
 01EF:6821  8A8FD649            mov  cl,[bx+49D6]           ds:[49E7]=1E37&lt;br /&gt;
 01EF:6825  32ED                xor  ch,ch&lt;br /&gt;
 01EF:6827  A1E43F              mov  ax,[3FE4]              ds:[3FE4]=5574&lt;br /&gt;
 01EF:682A  03C1                add  ax,cx&lt;br /&gt;
 01EF:682C  2D6F54              sub  ax,546F&lt;br /&gt;
 01EF:682F  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:6831  81C36F56            add  bx,566F&lt;br /&gt;
 01EF:6835  3B1E110E            cmp  bx,[0E11]              ds:[0E11]=FFFF&lt;br /&gt;
 01EF:6839  7501                jne  0000683C ($+1)         (down)&lt;br /&gt;
 01EF:683B  C3                  ret&lt;br /&gt;
 01EF:683C  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:683E  B500                mov  ch,00&lt;br /&gt;
 01EF:6840  3D1A00              cmp  ax,001A&lt;br /&gt;
 01EF:6843  7207                jc   0000684C ($+7)         (down)&lt;br /&gt;
 01EF:6845  2D1A00              sub  ax,001A&lt;br /&gt;
 01EF:6848  FEC5                inc  ch&lt;br /&gt;
 01EF:684A  EBF4                jmp  short 00006840 ($-c)   (up)&lt;br /&gt;
 01EF:684C  8AC8                mov  cl,al&lt;br /&gt;
 01EF:684E  8A876F54            mov  al,[bx+546F]           ds:[AC1A]=0200&lt;br /&gt;
 01EF:6852  243F                and  al,3F&lt;br /&gt;
 01EF:6854  7501                jne  00006857 ($+1)         (down)&lt;br /&gt;
 01EF:6856  C3                  ret&lt;br /&gt;
 01EF:6857  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:685C  7503                jne  00006861 ($+3)         (down)&lt;br /&gt;
 01EF:685E  EB11                jmp  short 00006871 ($+11)  (down)&lt;br /&gt;
 01EF:6860  90                  nop&lt;br /&gt;
 01EF:6861  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:6866  7501                jne  00006869 ($+1)         (down)&lt;br /&gt;
 01EF:6868  C3                  ret&lt;br /&gt;
 01EF:6869  80BF6F5840          cmp  byte [bx+586F],40      ds:[B01A]=0101&lt;br /&gt;
 01EF:686E  7201                jc   00006871 ($+1)         (down)&lt;br /&gt;
 01EF:6870  C3                  ret&lt;br /&gt;
 01EF:6871  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6873  51                  push cx&lt;br /&gt;
 01EF:6874  E810AA              call 00001287 ($-55f0)&lt;br /&gt;
 01EF:6877  59                  pop  cx&lt;br /&gt;
 01EF:6878  0AC0                or   al,al&lt;br /&gt;
 01EF:687A  7401                je   0000687D ($+1)         (down)&lt;br /&gt;
 01EF:687C  C3                  ret&lt;br /&gt;
 01EF:687D  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:6881  880EF03F            mov  [3FF0],cl              ds:[3FF0]=0000&lt;br /&gt;
 01EF:6885  882EF13F            mov  [3FF1],ch              ds:[3FF1]=0000&lt;br /&gt;
 01EF:6889  8A4501              mov  al,[di+01]             ds:[3913]=0000&lt;br /&gt;
 01EF:688C  A2EE3F              mov  [3FEE],al              ds:[3FEE]=0000&lt;br /&gt;
 01EF:688F  A2F53F              mov  [3FF5],al              ds:[3FF5]=0C02&lt;br /&gt;
 01EF:6892  8A4502              mov  al,[di+02]             ds:[4665]=200C&lt;br /&gt;
 01EF:6895  A2EF3F              mov  [3FEF],al              ds:[3FEF]=040C&lt;br /&gt;
 01EF:6898  A2F63F              mov  [3FF6],al              ds:[3FF6]=000C&lt;br /&gt;
 01EF:689B  E80EC5              call 00002DAC ($-3af2)&lt;br /&gt;
 01EF:689E  803EC83F00          cmp  byte [3FC8],00         ds:[3FC8]=0000&lt;br /&gt;
 01EF:68A3  7501                jne  000068A6 ($+1)         (no jmp)&lt;br /&gt;
 01EF:68A5  C3                  ret&lt;br /&gt;
 01EF:68A6  BB1340              mov  bx,4013&lt;br /&gt;
 01EF:68A9  891ECC3F            mov  [3FCC],bx              ds:[3FCC]=0000&lt;br /&gt;
 01EF:68AD  C3                  ret  &lt;br /&gt;
&lt;br /&gt;
 01EF:2DAC  A0EE3F              mov  al,[3FEE]              ds:[3FEE]=0000&lt;br /&gt;
 01EF:2DAF  2A06F03F            sub  al,[3FF0]              ds:[3FF0]=1515&lt;br /&gt;
 01EF:2DB3  7902                jns  00002DB7 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DB5  F6D8                neg  al&lt;br /&gt;
 01EF:2DB7  8A26EF3F            mov  ah,[3FEF]              ds:[3FEF]=1500&lt;br /&gt;
 01EF:2DBB  2A26F13F            sub  ah,[3FF1]              ds:[3FF1]=3915&lt;br /&gt;
 01EF:2DBF  7902                jns  00002DC3 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DC1  F6DC                neg  ah&lt;br /&gt;
 01EF:2DC3  02C4                add  al,ah&lt;br /&gt;
 01EF:2DC5  A2E937              mov  [37E9],al              ds:[37E9]=3737&lt;br /&gt;
 01EF:2DC8  A09C3F              mov  al,[3F9C]              ds:[3F9C]=3A3A&lt;br /&gt;
 01EF:2DCB  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2DCD  A3F93F              mov  [3FF9],ax              ds:[3FF9]=3F3E&lt;br /&gt;
 01EF:2DD0  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=3A3A&lt;br /&gt;
 01EF:2DD5  C606C83F00          mov  byte [3FC8],00         ds:[3FC8]=1515&lt;br /&gt;
 01EF:2DDA  C706F33F0000        mov  word [3FF3],0000       ds:[3FF3]=1515&lt;br /&gt;
 01EF:2DE0  C706CC3F0000        mov  word [3FCC],0000       ds:[3FCC]=3B3C&lt;br /&gt;
 &lt;br /&gt;
Starting from memory location 0B6B:0A0E the subsequent 512 bytes are set to 1A1A x100h (256 times) by this function: &lt;br /&gt;
 01EF:2DE6  BF0E0A              mov  di,0A0E&lt;br /&gt;
 01EF:2DE9  B90001              mov  cx,0100&lt;br /&gt;
 01EF:2DEC  50                  push ax&lt;br /&gt;
 01EF:2DED  B86B0B              mov  ax,0B6B&lt;br /&gt;
 01EF:2DF0  8EC0                mov  es,ax&lt;br /&gt;
 01EF:2DF2  58                  pop  ax&lt;br /&gt;
 01EF:2DF3  B81A1A              mov  ax,1A1A&lt;br /&gt;
 01EF:2DF6  F3AB                repe stosw&lt;br /&gt;
 &lt;br /&gt;
The code then creates a map with all possible paths of the hero: &lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 07 08 09 -- 09 08&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 06 09 0A 09 08 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 05 0A 0B 0A 09 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 04 0B -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 02 01 02 01 02 03 04&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 02 -- -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 03 -- -- -- -- 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 04 -- -- -- -- 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
&lt;br /&gt;
 01EF:2DF8  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:2DFC  EB74                jmp  short 00002E72 ($+74)  (down)&lt;br /&gt;
 01EF:2DFE  90                  nop&lt;br /&gt;
 01EF:2DFF  A0F23F              mov  al,[3FF2]              ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E02  8B1EF33F            mov  bx,[3FF3]              ds:[3FF3]=0000&lt;br /&gt;
 01EF:2E06  8887FB3F            mov  [bx+3FFB],al           ds:[411D]=0050&lt;br /&gt;
 01EF:2E0A  43                  inc  bx&lt;br /&gt;
 01EF:2E0B  3B1EF93F            cmp  bx,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E0F  7601                jbe  00002E12 ($+1)         (no jmp)&lt;br /&gt;
 01EF:2E11  C3                  ret&lt;br /&gt;
 01EF:2E12  891EF33F            mov  [3FF3],bx              ds:[3FF3]=0001&lt;br /&gt;
 01EF:2E16  8A26F93F            mov  ah,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E1A  2AE3                sub  ah,bl&lt;br /&gt;
 01EF:2E1C  A0F03F              mov  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E1F  2A06F53F            sub  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E23  7902                jns  00002E27 ($+2)         (down)&lt;br /&gt;
 01EF:2E25  F6D8                neg  al&lt;br /&gt;
 01EF:2E27  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E29  7603                jbe  00002E2E ($+3)         (down)&lt;br /&gt;
 01EF:2E2B  E98400              jmp  00002EB2 ($+84)        (down)&lt;br /&gt;
 01EF:2E2E  A0F13F              mov  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E31  2A06F63F            sub  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E35  7902                jns  00002E39 ($+2)         (down)&lt;br /&gt;
 01EF:2E37  F6D8                neg  al&lt;br /&gt;
 01EF:2E39  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E3B  7775                ja   00002EB2 ($+75)        (no jmp)&lt;br /&gt;
 01EF:2E3D  E87700              call 00002EB7 ($+77)&lt;br /&gt;
 01EF:2E40  7270                jc   00002EB2 ($+70)        (no jmp)&lt;br /&gt;
 01EF:2E42  3E885E00            mov  ds:[bp],bl             ds:[007A]=0002&lt;br /&gt;
 01EF:2E46  A0F53F              mov  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E49  3A06F03F            cmp  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E4D  7523                jne  00002E72 ($+23)        (no jmp)&lt;br /&gt;
 01EF:2E4F  A0F63F              mov  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E52  3A06F13F            cmp  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E56  751A                jne  00002E72 ($+1a)        (no jmp)&lt;br /&gt;
 01EF:2E58  881EC83F            mov  [3FC8],bl              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E5C  57                  push di&lt;br /&gt;
 01EF:2E5D  BF1340              mov  di,4013&lt;br /&gt;
 01EF:2E60  BEFB3F              mov  si,3FFB&lt;br /&gt;
 01EF:2E63  8A0EC83F            mov  cl,[3FC8]              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E67  32ED                xor  ch,ch&lt;br /&gt;
 01EF:2E69  890EF93F            mov  [3FF9],cx              ds:[3FF9]=0001&lt;br /&gt;
 01EF:2E6D  F3A4                repe movsb&lt;br /&gt;
 01EF:2E6F  5F                  pop  di&lt;br /&gt;
 01EF:2E70  EB40                jmp  short 00002EB2 ($+40)  (down)&lt;br /&gt;
 01EF:2E72  C606F23F00          mov  byte [3FF2],00         ds:[3FF2]=0100&lt;br /&gt;
 01EF:2E77  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
&lt;br /&gt;
part of 2DF8 routine this writes the temporary math:&lt;br /&gt;
 01EF:2E7B  E881FF              call 00002DFF ($-7f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E7E  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E82  C606F23F01          mov  byte [3FF2],01         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E87  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E8B  E871FF              call 00002DFF ($-8f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E8E  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E92  C606F23F02          mov  byte [3FF2],02         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E97  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E9B  E861FF              call 00002DFF ($-9f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E9E  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2EA2  C606F23F03          mov  byte [3FF2],03         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2EA7  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EAB  E851FF              call 00002DFF ($-af)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2EAE  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EB2  FF0EF33F            dec  word [3FF3]            ds:[3FF3]=0000&lt;br /&gt;
 01EF:2EB6  C3                  ret&lt;br /&gt;
&lt;br /&gt;
== Notable Memory locations for hero&#039;s and monster&#039;s movement ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 3F92 = CURRENT QUEST&lt;br /&gt;
 3F93 = Hero&#039;s current tile (see tilemap below)&lt;br /&gt;
 3F94 = ACTIVE HERO&#039;S ROOM&lt;br /&gt;
&lt;br /&gt;
 3F99 =&lt;br /&gt;
 3F9A = END TURN FLAG&lt;br /&gt;
 3F9B = action performed?&lt;br /&gt;
 3F9C = REMAINING STEPS&lt;br /&gt;
 3F9D =&lt;br /&gt;
 3F9E =&lt;br /&gt;
 3F9F = MONSTER&#039;S X position&lt;br /&gt;
 3FA0 = MONSTER&#039;S Y position&lt;br /&gt;
 3FA1 = Horizontal distance Monster-hero&lt;br /&gt;
 3FA2 = Vertical distance Monster-hero&lt;br /&gt;
 3FA3-3FA4 (word) = next monster&#039;s step (see 40A2)&lt;br /&gt;
 3FA5 = HERO&#039;S X position&lt;br /&gt;
 3FA6 = HERO&#039;S Y position&lt;br /&gt;
 3FA7 = Active hero&lt;br /&gt;
 3FA8 = LOS 00=start 01=blocked 02=free&lt;br /&gt;
 3FA9 = steps to take to reach the hero?&lt;br /&gt;
 3FB5 = Target Hero ID (FF=Monster)&lt;br /&gt;
 3FB9 = current total defense dice of the active hero during DEFENSE&lt;br /&gt;
 3FC5 = Quest specific hero counter (usually identical to 3FC6)  modified by 26E8 call&lt;br /&gt;
 3FC5 = hero counter (complementar)  1111 = 0F = all heroes OUT  modified by 26E2 call&lt;br /&gt;
 &lt;br /&gt;
 3FD0 = WORD map ID (temporary for the quest) offset of ATTACKED monster in map memory (586F)&lt;br /&gt;
 3FD2 = BYTE rolled skulls (by monsters or heroes)&lt;br /&gt;
 3FD3 = BYTE rolled shields (by monsters or heroes)&lt;br /&gt;
 3FD4 = WORD monster&#039;s profile location (during attacks)&lt;br /&gt;
 3FD6 = WORD hero&#039;s profile location (during attacks)&lt;br /&gt;
 &lt;br /&gt;
 3FE7 = QUEST specific OBJECTIVE (1=ACCOMPLISHED)&lt;br /&gt;
 &lt;br /&gt;
 Memory locations for hero&#039;s movement (pathfindig)&lt;br /&gt;
 3FEE = HERO&#039;S X STARTING POSITION&lt;br /&gt;
 3FEF = HERO&#039;S Y STARTING POSITION&lt;br /&gt;
 3FF0 = mouse click X position (X stop)&lt;br /&gt;
 3FF1 = mouse click Y position (Y stop)&lt;br /&gt;
 3FF2 = 03&lt;br /&gt;
 3FF3 = FF&lt;br /&gt;
 3FF4 = FF&lt;br /&gt;
 3FF5 = HERO&#039;S X POSITION (copy)&lt;br /&gt;
 3FF6 = HERO&#039;S Y POSITION (copy)&lt;br /&gt;
 3FF9 = rolled movement&lt;br /&gt;
 3FFB - 4012 = math locations that varies among 00,01,02,03, at the end every byte is set to 03 (bytes here are never cleared)&lt;br /&gt;
 4013 -&amp;gt; locations with definitive hero&#039;s path (bytes here are never cleared)&lt;br /&gt;
&lt;br /&gt;
 hero&#039;s directional movement values:&lt;br /&gt;
 00 = up&lt;br /&gt;
 01 = right&lt;br /&gt;
 02 = down&lt;br /&gt;
 03 = left&lt;br /&gt;
 The hero&#039;s moving animation is then delegated to the main loop routines that starts reading from 4013 till [3FF9].&lt;br /&gt;
&lt;br /&gt;
 4097 = infinite actions if set to a number different from 00&lt;br /&gt;
 402C = Wand of recall extra action 00=no 01=yes&lt;br /&gt;
 4BBC = location where TRAP special event number is put upon entering the room (FF=Searched)&lt;br /&gt;
&lt;br /&gt;
 40A2 = here is stored the path the monster will follow by 607E (?) call. A sequence of words that specify directional movement&lt;br /&gt;
 00 01 = down&lt;br /&gt;
 00 FF = up&lt;br /&gt;
 FF 00 = left&lt;br /&gt;
 01 00 = right&lt;br /&gt;
 40CA = last location of the path to follow. (A640 = 2 moves)		&lt;br /&gt;
&lt;br /&gt;
 Screen tiles layout. The tile under the current hero is saved in [3F93]&lt;br /&gt;
             /\&lt;br /&gt;
            /00\&lt;br /&gt;
           /\  /\&lt;br /&gt;
          /01\/02\&lt;br /&gt;
         /\  /\  /\&lt;br /&gt;
        /03\/04\/05\&lt;br /&gt;
       /\  /\  /\  /\&lt;br /&gt;
      /06\/07\/08\/09\&lt;br /&gt;
     /\  /\  /\  /\  /\&lt;br /&gt;
    /0A\/0B\/0C\/0D\/0E\&lt;br /&gt;
    \  /\  /\  /\  /\  /\&lt;br /&gt;
     \/0F\/10\/11\/12\/13\&lt;br /&gt;
      \  /\  /\  /\  /\  /&lt;br /&gt;
       \/14\/15\/16\/17\/&lt;br /&gt;
        \  /\  /\  /\  /&lt;br /&gt;
         \/18\/19\/1A\/&lt;br /&gt;
          \  /\  /\  /&lt;br /&gt;
           \/1B\/1C\/&lt;br /&gt;
            \  /\  /&lt;br /&gt;
             \/1D\/&lt;br /&gt;
              \  /&lt;br /&gt;
               \/&lt;br /&gt;
			   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The hero&#039;s moving animation is delegated to the in-game main loop routines.&lt;br /&gt;
&lt;br /&gt;
= [DATA SEGMENT] Main Pointers =&lt;br /&gt;
&lt;br /&gt;
The file inside the exe that represents the Data Segment (every byte that is not strictly CODE) starts at offset &#039;&#039;&#039;0x9BE0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heroes&#039; default profiles ==&lt;br /&gt;
&lt;br /&gt;
 offset  mem pointer                   BP MP                      EQ             AD DD          ID &lt;br /&gt;
 0xE243  0B6B:4663   00 00 00 00 00 00 08 02 1D 00 00 00 00 00 00 00 00 00 00 00 03 02 00 00 00 00	Barbarian&lt;br /&gt;
 0xE25D  0B6B:467D   00 00 00 00 00 00 07 03 32 00 00 00 00 00 00 80 00 00 00 00 02 02 00 00 00 01	Dwarf&lt;br /&gt;
 0xE277  0B6B:4697   00 00 00 00 00 00 06 04 35 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 00 02	Elf&lt;br /&gt;
 0xE291  0B6B:46B1   00 00 00 00 00 00 04 06 4A 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 03	Wizard&lt;br /&gt;
 0xE2AB  0B6B:46CB   00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 04	Ragnar&lt;br /&gt;
&lt;br /&gt;
The byte positions are the same of [[HeroQuest Savegame Format]]. Load and save operations read and write at these addreses.&lt;br /&gt;
&lt;br /&gt;
When initializing the heroes the default values are resetted by the function 01EF:78D3 that resets all values to zero and Body and Mind points to default&lt;br /&gt;
 0x00DF74 0B6B:4394  08 07 06 04 02    Default Body point values (last one is Ragnar&#039;s)&lt;br /&gt;
 0x0148FB 0B6B:AD1B  02 03 04 06 00    Default Mind point values&lt;br /&gt;
&lt;br /&gt;
Character initialization code:&lt;br /&gt;
 01EF:78D3  8A1E9E40            mov  bl,[409E]              ds:[409E]=0002&lt;br /&gt;
 01EF:78D7  B700                mov  bh,00&lt;br /&gt;
 01EF:78D9  8B879443            mov  ax,[bx+4394]           ds:[4396]=0406&lt;br /&gt;
 01EF:78DD  884406              mov  [si+06],al             ds:[469D]=0406	&amp;lt;-- sets default body points&lt;br /&gt;
 01EF:78E0  8A871BAD            mov  al,[bx-52E5]           ds:[FFFFAD1D]=EC8B&lt;br /&gt;
 01EF:78E4  884407              mov  [si+07],al             ds:[469E]=3804	&amp;lt;-- sets default mind points&lt;br /&gt;
 01EF:78E7  C6440E00            mov  byte [si+0E],00        ds:[46A5]=0000	&amp;lt;-- resets Owned weapon&lt;br /&gt;
 01EF:78EB  C6440F00            mov  byte [si+0F],00        ds:[46A6]=0000	&amp;lt;-- resets Owned armour&lt;br /&gt;
 01EF:78EF  C6440D00            mov  byte [si+0D],00        ds:[46A4]=0000	&amp;lt;-- resets Owned special items &lt;br /&gt;
 01EF:78F3  C744090000          mov  word [si+09],0000      ds:[46A0]=000A	&amp;lt;-- resets GOLD&lt;br /&gt;
 01EF:78F8  C6441100            mov  byte [si+11],00        ds:[46A8]=0000	&amp;lt;-- resets Equipped weapon&lt;br /&gt;
 01EF:78FC  C6441200            mov  byte [si+12],00        ds:[46A9]=0000	&amp;lt;-- resets Equipped special item&lt;br /&gt;
 01EF:7900  C6441300            mov  byte [si+13],00        ds:[46AA]=0200	&amp;lt;-- resets Equipped armour&lt;br /&gt;
 01EF:7904  885C19              mov  [si+19],bl             ds:[46B0]=0002	&amp;lt;-- refresh hero&#039;s ID&lt;br /&gt;
 01EF:7907  803E9E4001          cmp  byte [409E],01         ds:[409E]=0002	&amp;lt;-- if dwarf&lt;br /&gt;
 01EF:790C  7504                jne  00007912 ($+4)         (down)&lt;br /&gt;
 01EF:790E  804C0E80            or   byte [si+0E],80        ds:[46A5]=0000	&amp;lt;-- gives him the toolkit&lt;br /&gt;
 01EF:7912  BB0800              mov  bx,0008					&amp;lt;-- &amp;quot;The character is renewed&amp;quot; string&lt;br /&gt;
 01EF:7915  E8D50F              call 000088ED ($+fd5)				&amp;lt;-- draws the scroll&lt;br /&gt;
&lt;br /&gt;
== Searched room table ==&lt;br /&gt;
&lt;br /&gt;
The game keeps track of the &#039;&#039;searched&#039;&#039; room by storing the value FF into two tables (treasure and traps searches) using the room number as relative offset (&#039;&#039;bx&#039;&#039;).&amp;lt;br&amp;gt;&lt;br /&gt;
Room numbers go from 00 to 2A so each table is 2B bytes long and every byte of the table is set to 00 at the beginnng of the quest.&amp;lt;br&amp;gt;&lt;br /&gt;
The code that puts FF into the table:&amp;lt;br&amp;gt;&lt;br /&gt;
 mov byte ptr [bx+4B70h], 0FFh    [0B6B:4B70] starting address of TREASURE search&lt;br /&gt;
 mov byte ptr [bx+4B9Bh], 0FFh    [0B6B:4B9B] starting address of TRAPS/SECRET PASSAGES search&lt;br /&gt;
NOTE: upon starting a quest, every Special event ID is put into these tables replacing the 00.&lt;br /&gt;
&lt;br /&gt;
== Equipment screen ==&lt;br /&gt;
With &#039;&#039;position on screen&#039;&#039; is intended the string header 11XXYY&lt;br /&gt;
&lt;br /&gt;
 0x014863 Hero&#039;s classes label (ie. Barbarian) position on screen&lt;br /&gt;
 0x00DF2B pointers block to default Hero&#039;s classes (5 pointers)&lt;br /&gt;
 0x00DF35 default Hero&#039;s classes labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x014873 Hero&#039;s name label (ie. Sigmar) position on screen&lt;br /&gt;
 0x00E1B7 pointers block to default Hero&#039;s names&lt;br /&gt;
 0x00E1C5 default Hero&#039;s names labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x0141A4 first epilogue panel text (its pointer &#039;&#039;&#039;A5C4&#039;&#039;&#039; is written inside the code at offset 0x0649)&lt;br /&gt;
 0x0143A2 second epilogue panel text (its pointer &#039;&#039;&#039;A7C2&#039;&#039;&#039; is written inside the code at offset 0x0658)&lt;br /&gt;
&lt;br /&gt;
 0x0147F7 actual gear prices (hexadecimal) -  4x12 = 30 Bytes (2 bytes for equipment bit mask and 2 bytes for default price, little endian)&lt;br /&gt;
 0x01482B pointers block to single gear costs - 2xC = 18 Bytes&lt;br /&gt;
 0x014843 price (in decimal) labels - 1F Bytes&lt;br /&gt;
&lt;br /&gt;
 0x01486F &amp;quot;GOLD&amp;quot; label position on screen&lt;br /&gt;
 0x014867 gold amount position on screen (default is 0000)&lt;br /&gt;
 0x014877 equipment names position on screen&lt;br /&gt;
 0x01487B pointers block to the pointers in [language].bin where the item names are - 0x18 Bytes&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
Every WORD offsets are hexadecimal, little endian values.&lt;br /&gt;
&lt;br /&gt;
 0x00CDF3: Game font (2F0h bytes long). 8x8 - 94 chars, can be edited with Nyerguds&#039; Westwood font editor.&lt;br /&gt;
&lt;br /&gt;
 0x00DCB5: Sequence of 20 bytes (4 groups of 5 bytes) with facing codes of the heroe&#039;s sprites in the 4 directions (S-E-W-N).&lt;br /&gt;
 0x00DCC9: 4 words for sprite direction codification FF00=South ecc..&lt;br /&gt;
 0x00DF95: Sequence of 11 groups of 4 bytes used for teleportation in &amp;quot;castle of mistery&amp;quot; quest (Room, X, Y, door direction that could be 00,01,1A)&lt;br /&gt;
 0x00DFDC: Sequence of 21 groups of 6 words used to define furniture (first word: X,Y dimension of the frame - second word: Y,X offset in pixels from the origin tile - third word: offset of the frame in FURN.VGA)&lt;br /&gt;
 0x00E05B: Group of 4 offsets for the walls graphics in graphics.vga (2 wariations of the left wall and 2 of the right wall).&lt;br /&gt;
 0x00E062: 26 bytes (00 or 01) used for wall variations based on ROOM tile position number (see diamond scheme above). Basically each position has its own fixed wall texture that is displayed only if a wall is present.&lt;br /&gt;
 0x00E3E6: List of 28 (1Ch) Groups of 5 bytes each representing Movement (BYTE), Attack (BYTE), Defense (BYTE) and Death special event offset (WORD) of each monster (00-1B).&lt;br /&gt;
 0x00E8E8: 32 pointers (words) to the monster profiles in game.&lt;br /&gt;
 0x00E92A: Monster&#039;s profiles location. Monsters are numbered in-game from 00 to 20h (maximum) and profiles (10 bytes) are stored starting from here (0x4D4A in memory).&lt;br /&gt;
 0x00ED28: Sequence of 256 BYTES used as index for drawing the 2D map walls, listing all possible states of wall and doors (values from 00 to FF that refer to the graphic slot IDs inside MAPS.VGA).&lt;br /&gt;
 0x00F64F: List of 12 pointers to magic spells specific routines into code segment.&lt;br /&gt;
 0x00F669: List of 30 pointers to special events specific routines into code segment.&lt;br /&gt;
 0x00F6A5: List of 30 pointers to monster&#039;s profiles location in memory (each pointer is 1A from the other).&lt;br /&gt;
 0x00F703: VGA Palette - 300h bytes as RGB 256 colours&lt;br /&gt;
 0x00FB9D: Position on screen of the object&#039;s name in 2D map (monsters, furniture, heroes etc...) &lt;br /&gt;
&lt;br /&gt;
 0x013CDD: List of 31 (words) offsets of the HEROES frame animation (attack, defense, death) in MEN.VGA&lt;br /&gt;
 0x013D1B: List of 31 (words) frame dimensions (X,Y) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D59: List of 31 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
 0x013D97: List of 8 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the monster animation frames in MONSTERS.VGA&lt;br /&gt;
 0x014125: Sequence of 42 offsets (84 bytes) to the tile graphic of the rooms and corridors of isometric map (01-13 points all to 1F80, the tile for the corridors)&lt;br /&gt;
 0x014179: Sequence of 2A bytes that are indexes of the tile graphic of the rooms and corridors of 2D map (01-13 are all 01, the index tile for the corridors)&lt;br /&gt;
&lt;br /&gt;
 0x014920: position on screen of a bar filled with 20h char used to delete the equipment names while moving the mouse over the icons&lt;br /&gt;
 0x014924: Text colour (1F is white)&lt;br /&gt;
 0x014925: Background colour (14 is transparent)&lt;br /&gt;
 0x014943: equipment names position on screen during a quest (the subsequent 28 zeroes are the placeholder)&lt;br /&gt;
&lt;br /&gt;
 0x014A42: Sequence of 7 pointers in language.bin of the potion effect texts&lt;br /&gt;
 0x00E472: Sequence of 5 pointers in language.bin of the potion finding texts (all but holy water and heroic brew, that has direct pointers inside the code)&lt;br /&gt;
 0x00E4FE: Sequence of 1Ch pointers in language.bin of the monsters names (2D map)&lt;br /&gt;
 0x00E536: Sequence of 30h index in maps.vga that assign names of the object (01=fallen rock, 00=all traps or hidden objects with no name, 03=Stairs) in OBJECT BLOCK order.&lt;br /&gt;
 0x00E566: 23h bitmasks that define which object is passable by projectiles&lt;br /&gt;
 0x00EE2D: Offsets (12) sequence of object icons in maps.vga (from ID 30 to 3B, 00D1 = fallen rock, goblin) 00D1&lt;br /&gt;
 0x00EE45: Offsets sequence of monster&#039;s icons in maps.vga (ID 00 = 40D3 = goblin)&lt;br /&gt;
&lt;br /&gt;
== Intro Sequence ==&lt;br /&gt;
Every text panel of the intro resides into &#039;&#039;&#039;INTRO.EXE&#039;&#039;&#039; and they&#039;re in English only.&amp;lt;br&amp;gt;&lt;br /&gt;
In order to translate them (or change the lenght of the text) you have to uncompress the exe first, then Locate every pointers of each panel.&amp;lt;br&amp;gt;&lt;br /&gt;
The data segment inside the exe starts at &#039;&#039;&#039;0x01C0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Panel # !! default pointer value !! pointer exe offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0603 || 0x0212&lt;br /&gt;
|-&lt;br /&gt;
| 2 || F203 || 0x0214&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 9B04 || 0x0216&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 8706 || 0x0218&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 7008 || 0x021A&lt;br /&gt;
|-&lt;br /&gt;
| 6 || CA0A || 0x021C&lt;br /&gt;
|}&lt;br /&gt;
The panels layout follows the same rules described under [[HeroQuest Strings Format]]&lt;br /&gt;
&lt;br /&gt;
 0x001675 Game font, this is the exact copy of the font in quest.exe (See various offests section above).&lt;br /&gt;
&lt;br /&gt;
= Protection screen =&lt;br /&gt;
to restore shield protection in UNCOMPRESSED QUEST.EXE modify&lt;br /&gt;
 offset 0x0541 from 90 90 90	to E8 DC FE		(if you modify these bytes only the shield screen stays and regardless of page entered the game starts anyway)&lt;br /&gt;
 offset 0x0549 from EB		to 74&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Quest_Format&amp;diff=12658</id>
		<title>HeroQuest Quest Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Quest_Format&amp;diff=12658"/>
		<updated>2025-11-17T17:46:27Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* List of Quests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D cell-based&lt;br /&gt;
 | Layers = N/A&lt;br /&gt;
 | Cell dimensions = 26&amp;amp;times;19 (isometric)&lt;br /&gt;
 | Cell viewport = max 6&amp;amp;times;5 (one single room)&lt;br /&gt;
 | Viewport = 320&amp;amp;times;200&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This page describes the mapping of the QUEST##.BIN files in [[HeroQuest]], which are used to describe one mission level. These files contain everything that is needed to generate a quest. The maps of the game, like in the board game, are always laid out as 26&amp;amp;times;19 squares.&lt;br /&gt;
&lt;br /&gt;
In theory, with this information, it could be possible to create a mission editor for the game. The only known restrictions are to stick with the Special events list, since it is hard-coded, and that no new missions can be added (at the moment) to the 2-page in-game list. So to add missions, you need to overwrite the original quests. Since the second page is for the &amp;quot;Return of the Witch Lord&amp;quot; expansion, a new expansion (fan made, or based on official expansions like &amp;quot;Kellar&#039;s Keep&amp;quot;) could be added as patch.&lt;br /&gt;
&lt;br /&gt;
== Format quirks ==&lt;br /&gt;
&lt;br /&gt;
* The game crashes if the file exceeds 2760h (10KB) in length.&lt;br /&gt;
* Some special event are hard coded in the engine, and not in the file.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Nyerguds&#039;s edit note: Not sure what to do with this information; it seems unrelated to this actual format, and while it is called &amp;quot;welcome behaviour&amp;quot; it also says it crashes the game??&lt;br /&gt;
&lt;br /&gt;
The game crashes if set higher than 2760h (10KB), but produce a strange change in the random events: they became ACTUALLY random.&lt;br /&gt;
The normal events in the original game are pseudo-random, they always start with a fixed list of gold coins find events, then all the potions, then traps, then wandering monster and then repeats. Enlarging the Quest Text Block size probably overwrites some memory portions dedicated to these &amp;quot;random&amp;quot; events, messing that up. The fact is that the list remain the same, but on each quest, the first event of the list is chosen randomly, after which it continues down the list as usual. (Thanks to Rhaul for finding this unexpected but welcome behaviour.)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overall structure ==&lt;br /&gt;
&lt;br /&gt;
The overall structure of the file is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x000 || Map layer for rooms layout &lt;br /&gt;
|-&lt;br /&gt;
| 0x200 ||  Map layer for walls layout&lt;br /&gt;
|-&lt;br /&gt;
| 0x400 || Hero positions for all four heroes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40C || Special Events per room for treasures&lt;br /&gt;
|-&lt;br /&gt;
| 0x437 || Special Events per room for traps and hidden doors&lt;br /&gt;
|-&lt;br /&gt;
| 0x462 || Population block, with Monsters, Objects and Quest Text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following sections will describe each of these in detail.&lt;br /&gt;
&lt;br /&gt;
== Map Layers ==&lt;br /&gt;
&lt;br /&gt;
The file starts with two layers specifying different properties of the same map tiles; first the rooms layout, then the walls layout, with each block using one byte per tile. These blocks only need 26*19 bytes to contain all their data, but are padded to blocks of 0x200 bytes each.&lt;br /&gt;
&lt;br /&gt;
=== Rooms Layout ===&lt;br /&gt;
&lt;br /&gt;
This block starts at the beginning of the file. The rooms layout determines which area on the map is part of which room. Since the game is limited to showing rooms with a maximum dimension of 6x5, all paths are chopped up into different &#039;rooms&#039; as well. Rooms have numbers from 0 to 42. A value of 0 means the room is not used. Rooms 1 to 20 (0x14) are the pathways. The remaining range, from 21 to 42 (0x15 to 0x2A), are the main rooms.&lt;br /&gt;
&lt;br /&gt;
The default rooms layout with coordinates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19&lt;br /&gt;
    &lt;br /&gt;
00   01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04 05 05 05 05&lt;br /&gt;
01   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
02   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
03   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
04   01 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
05   06 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 08 08 18 18 18 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06   06 1B 1B 1B 1B 1C 1C 1C 1C 07 08 08 08 08 08 08 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
07   06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
08   06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
09   06 06 06 06 07 07 07 07 07 07 1F 1F 1F 1F 1F 1F 09 09 09 09 09 09 0A 0A 0A 0A&lt;br /&gt;
0A   0B 20 20 20 20 21 21 22 22 0C 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0B   0B 20 20 20 20 21 21 22 22 0C 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0C   0B 20 20 20 20 21 21 22 22 0C 0D 0D 0D 0D 0D 0D 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0D   0B 20 20 20 20 26 26 26 26 27 27 27 0D 0D 28 28 28 28 23 23 23 24 24 24 24 0F&lt;br /&gt;
0E   0B 25 25 25 25 26 26 26 26 27 27 27 0D 0D 28 28 28 28 29 29 29 2A 2A 2A 2A 0F&lt;br /&gt;
0F   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
10   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
11   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
12   10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The game only seems to accept 32 different rooms on one quest map. If a map exceeds this amount, the higher ones after 32 are used are displayed on the overhead map, and you can enter them, but no tiles are displayed. This is probably an engine limitation. Because of this, any inaccessible areas in the quest map are cleared to room 0. The numbers of the used rooms don&#039;t need to be consecutive, though, so the actual layout of the numbers is generally not changed. The few changes to room layout definitions that exist in the files all seem to be map errors. Some maps do have corridors that are shortened because of an obstruction, and in such cases the room type is generally also cleared to cut it off at that point.&lt;br /&gt;
&lt;br /&gt;
Example of the first level, &amp;quot;The Maze&amp;quot;. 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the layout. You can see that room 0x12 was cut off towards the north. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04 05 05 05 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 08 08 -- -- -- 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 08 08 08 08 08 08 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 06 06 06 07 07 07 07 07 07 1F 1F 1F 1F 1F 1F 09 09 09 09 09 09 0A 0A 0A 0A&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- -- -- -- -- 0D 0D 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 26 26 26 26 -- -- -- -- -- 28 28 28 28 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 0F&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Walls Layout ===&lt;br /&gt;
&lt;br /&gt;
This block starts at offset 0x200, and, like the room IDs, is one byte per tile. The values determine the walls around each tile, any doors set in them, and any special properties of these walls or doors. South and East walls and doors are not defined, since you can get the same effect by placing a North or West ones in the adjacent room, and the southern and eastern border of the entire map are automatically walls.&lt;br /&gt;
&lt;br /&gt;
Note that the perspective is isometric, so only the west (top left) and north (top right) walls are visible while playing. Because of this, some maps have errors where there are missing walls on openings that seem to lead to unused areas with room ID 00 when going to the east or south. In reality, the game will never indicate openings towards room 00 as passable, so the lack of wall makes no difference.&lt;br /&gt;
&lt;br /&gt;
Each byte in this block is made up of bit flags that can be combined. However, these bits are not just settings interpreted by the code; the full value made up of these bits also creates the index used to look up the corresponding sprite graphics. Because of this, the unused bit 0x02 can be used to mod alternate graphics into wall tiles, even if it has no real meaning to the game. Here are the meanings of each separate bit:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bin value !! Hex Value !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| 00000000 || 0x00 || None      &lt;br /&gt;
|-&lt;br /&gt;
| 00000001 || 0x01 || Do not draw this wall. Doors show up as a frame only. This is done with walls when the area goes around a corner behind the walls, to prevent them from overlapping the floor tiles.&lt;br /&gt;
|-&lt;br /&gt;
| 00000010 || 0x02 || Not used (only appears once in Quest 3) can be used in conjunction with 4th bit to change graphic for opened secret door&lt;br /&gt;
|-&lt;br /&gt;
| 00000100 || 0x04 || The door is Open (can&#039;t be applied if secret)&lt;br /&gt;
|-&lt;br /&gt;
| 00001000 || 0x08 || The door is Secret (can&#039;t be applied if open)&lt;br /&gt;
|-&lt;br /&gt;
| 00010000 || 0x10 || Door to the West&lt;br /&gt;
|-&lt;br /&gt;
| 00100000 || 0x20 || Door to the North&lt;br /&gt;
|-&lt;br /&gt;
| 01000000 || 0x40 || Wall to the West&lt;br /&gt;
|-&lt;br /&gt;
| 10000000 || 0x80 || Wall to the North&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example of the first level &amp;quot;The Maze&amp;quot;. 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the layout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C0 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80&lt;br /&gt;
40 C0 80 80 80 C0 80 80 80 C0 20 80 41 -- C0 80 80 80 80 80 80 80 80 80 80 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 10 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 C0 80 80 80 C0 80 80 80 40 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 18 -- -- 40 -- 40 -- -- C0 80 80 80 90 80 80 80 40&lt;br /&gt;
40 40 -- -- -- 10 -- -- -- C0 80 80 -- -- 81 81 80 40 -- -- -- 40 -- -- -- 10&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 C0 80 80 80 80 80 40 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 40 -- -- -- -- -- 40 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 81 81 29 80 80 80 80 80 -- 10 -- -- -- -- -- 10 81 81 21 81 81 80 80 80 00&lt;br /&gt;
40 C0 80 80 80 68 80 C0 80 C0 40 -- -- -- -- -- 40 C0 80 80 20 C0 80 80 80 40&lt;br /&gt;
40 40 -- -- -- 40 -- 10 -- 40 40 -- -- -- -- -- 40 18 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 10 -- -- -- 40 -- 40 -- 40 80 80 80 80 C0 80 -- 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 60 80 80 80 40 -- -- -- -- C0 80 80 20 41 -- -- 40 -- -- -- 40&lt;br /&gt;
40 C0 80 80 80 40 -- -- -- 40 -- -- -- -- 40 -- -- -- C0 80 80 -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 81 81 81 80 80 20 80 80 80 80 80 80 80 80 20 80 80 80 80 80 80 80 80 80 00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visualised as image, you get this:&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest-Quest1.png|624px]]&lt;br /&gt;
&lt;br /&gt;
Different rooms are indicated in different colours, with shades of grey used for the corridor &#039;rooms&#039;, and the room 0 (disabled) areas indicated in black. Doors are shown as white, secret doors as purple, drawn walls as dark red, and walls with the draw-suppression bit enabled are orange. To show the whole grid structure, &lt;br /&gt;
walls that are not enabled at all are indicated as dark purple.&lt;br /&gt;
&lt;br /&gt;
== Hero Positions ==&lt;br /&gt;
&lt;br /&gt;
At 0x400, after the two map layers, starts the hero positioning info. This gives the following structure for each hero:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Block Name!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]]||HeroX||Cell position X-coordinate of the barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x01||[[UINT8]]||HeroY||Cell position Y-coordinate of the barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]]||HeroFacing|| Animation frame for the hero, determining the facing.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This structure occurs four times, in this order:  Barbarian, Dwarf, Elf, Wizard.&lt;br /&gt;
&lt;br /&gt;
This table gives the facing frames for each hero:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Hero!!North!!East!!South!!West&lt;br /&gt;
|-&lt;br /&gt;
| Barbarian || 0x23 || 0x1D || 0x20 || 0x26&lt;br /&gt;
|-&lt;br /&gt;
| Dwarf     || 0x2F || 0x29 || 0x2C || 0x32&lt;br /&gt;
|-&lt;br /&gt;
| Elf       || 0x3B || 0x35 || 0x38 || 0x3E&lt;br /&gt;
|-&lt;br /&gt;
| Wizard    || 0x47 || 0x41 || 0x44 || 0x4A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Events ==&lt;br /&gt;
&lt;br /&gt;
The next sections, starting at 0x040C, are the Special Events. There are two of these: one for treasure searching (at 0x040C), and one for searching for traps and hidden doors (at 0x0437). They each take up 43 bytes, one for each of the room numbers specified in the [[#Rooms Layout|Rooms Layout]]. The lists seem to include the unused room 0.&lt;br /&gt;
&lt;br /&gt;
The list of special events:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Hex ID !! Dec ID !! Where !! Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 00 || None || No event.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || 01 || Chest || Trapped, you disarm it&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 02 || Chest || Trapped, -1 body point&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 03 || Cupboard  || 30 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 04 || Chest || Trapped, -1 body point, +100 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || 05 || Weapon rack || Spear&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 06 || Chest || 50 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 07 || Chest || 250 coins of prince magnus, the weight slows you&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 08 || Throne || Melar&#039;s key&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || 09 || Generic || Talisman of lore&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || 10 || Generic || Borin&#039;s armour&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || 11 || Chest || Karlen&#039;s 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 12 || Chest || 150 coins + wand of recall&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 13 || Chest || 100 coins (and the chest vanishes)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 14 || Generic || Shield&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 15 || Chest || Trapped, beware&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 16 || Chest || Trapped, gargoyle awakes&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 17 || Generic || Spirit blade&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 18 || Chest || 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 19 || Chest || 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 20 || Chest || 300 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 21 || Chest || 100 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 22 || Chest || Trapped, -1 body point&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 23 || Chest || Trapped, you disarm it&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 24 || Table || Agrain&#039;s keys (100 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 25 || 2 Chests || 200 coins x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 26 || Chest || 350 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 27 || Chest || 250 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 28 || Throne || 500 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 29 || Chest || Potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 30 || Generic || Mine entrance + 5000 coins, cannot attack (Coins are fake only in the &amp;quot;Castle of Mystery&amp;quot; mission)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, in QUEST17.BIN, the (hexadecimal) event contents are the following. Again, 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the data.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Room ID:  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A&lt;br /&gt;
Treasure  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 15 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 16 -- -- -- -- -- -- -- -- --&lt;br /&gt;
Traps     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 17 -- -- -- -- -- -- -- -- --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Population ==&lt;br /&gt;
&lt;br /&gt;
The population block, starting at 0x462, takes up the rest of the file. It has a header that specifies for each section where the data can be found. All pointers in this section are relative to the start of the population block.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Block Name!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||TextBlockStart||Relative pointer to where the [[#Quest Text Block|Quest Text Block]] starts. This is normally put at the end of the file.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT16LE]]||TextBlockSize||Size of the text block.&lt;br /&gt;
|-&lt;br /&gt;
|0x04||[[UINT16LE]]||MonstersBlockStart||Relative pointer to the [[#Monsters Block|Monsters Block]]. Each block is 10 bytes. This is normally put directly behind this header, at offset 0C.&lt;br /&gt;
|-&lt;br /&gt;
|0x06||[[UINT16LE]]||MonstersBlockSize||Size of the Monsters block. Divide by 10 to get the amount of monsters.&lt;br /&gt;
|-&lt;br /&gt;
|0x08||[[UINT16LE]]||ObjectsBlockStart||Relative pointer to the [[#Objects Block|Objects Block]].&lt;br /&gt;
|-&lt;br /&gt;
|0x0A||[[UINT16LE]]||NrOfObjects||Number of objects in the Objects Block.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After this come the sections, normally in the following order:&lt;br /&gt;
&lt;br /&gt;
* Monsters Block&lt;br /&gt;
* Objects block&lt;br /&gt;
* Quest Text Block&lt;br /&gt;
* A padding 0x00 byte. This is sometimes two bytes. Might be needed to serve as end of the last text item.&lt;br /&gt;
&lt;br /&gt;
=== Monsters Block ===&lt;br /&gt;
&lt;br /&gt;
Typically starts at offset 0x46E. Each monster block takes 10 bytes. The length of the full block is specified in the header in &amp;lt;tt&amp;gt;MonstersBlockSize&amp;lt;/tt&amp;gt;. Divide it by 10 to know the amount of monsters.&lt;br /&gt;
&lt;br /&gt;
The maximum amount of monsters the game can handle is 32, so that&#039;s most likely also the maximum amount that can be stored in this block.&lt;br /&gt;
&lt;br /&gt;
==== Monster Layout ====&lt;br /&gt;
&lt;br /&gt;
The monster layout is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:70px&amp;quot; | 00&lt;br /&gt;
| style=&amp;quot;width:70px&amp;quot; | [[UINT8]]&lt;br /&gt;
|| Seems to be a set of bit flags. It apparently needs to be 0x81 to have a properly functioning monster. If it is set to 0x00, the monster does not appear on the map at all. If it is set to just 0x80 or just 0x01, the monster can&#039;t be attacked except by spells. Only the Death Mist on Quest 17 uses value 0x01, but its special scripted code means it can not be interacted with at all.&lt;br /&gt;
|-&lt;br /&gt;
| 01 || [[UINT8]] || X starting position, from 0x00 to 0x19. Changes during the game as the monster moves.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || [[UINT8]] || Y starting position, from 0x00 to 0x12. Changes during the game as the monster moves.&lt;br /&gt;
|-&lt;br /&gt;
| 03 || [[UINT8]] || &#039;&#039;Placeholder&#039;&#039; for Monsters&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 04 || [[UINT16LE]] || &#039;&#039;Placeholder&#039;&#039; for Memory location of Monster&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 06 || [[UINT8]] || Monster condition bits, including spell effects. 0x00 = dead, 0x01 = alive, 0x02 = tempest, 0x04 = sleep. The Death Mist on Quest 17 has the highest bit (0x80) enabled.&lt;br /&gt;
|-&lt;br /&gt;
| 07 || [[UINT8]] || Higher 4 bits are for the Body points, and the lower 4 are for the Mind points, i.e. 0x13 = 1 BP, 3 MP. Changing BP doesn&#039;t affect the game though.&lt;br /&gt;
|-&lt;br /&gt;
| 08 || [[UINT8]] || Shown monster type; see monster types table below. This determines the graphics and name of the monster.&lt;br /&gt;
|-&lt;br /&gt;
| 09 || [[UINT8]] || Monster type stats; see monster types table below. This determines the Attack and Defense of the monster. This usually uses the same type as what it is shown as, but it can be changed to make the monster weaker or stronger than a monster of that type normally is. This also changes the Death Event of the monster.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first monster in the list is used as the &amp;quot;wandering monster&amp;quot; that might show up when you search a room. Its first byte is usually put to 0, so it won&#039;t show up on the map and acts purely as wandering monster template. However, it is perfectly possible to have a monster both serve as wandering monster &#039;&#039;and&#039;&#039; appear as physical entity on the map.&lt;br /&gt;
&lt;br /&gt;
==== Monster Types ====&lt;br /&gt;
&lt;br /&gt;
The list of monster types can be divided into four ranges:&lt;br /&gt;
&lt;br /&gt;
* The 00-0C range are the normal monsters.&lt;br /&gt;
* The 0D-13 range are special monsters only referenced in QUEST11.BIN. These are not actually used as monsters in Quest 11, but their stats are applied to the normal monsters by putting them in the &amp;quot;monster type stats&amp;quot; field. The stats themselves are actually unchanged, but this also makes them use the special death event of these new types, triggering the quest&#039;s gold reward. The Witch Lord from this range is not used.&lt;br /&gt;
* The 14-1B range contains the new monsters from the expansion.&lt;br /&gt;
* The last monster (1B), is a dummy entry containing a copy of the Orc, which is never used.&lt;br /&gt;
&lt;br /&gt;
As indicated in the previous section, the Body and Mind points can be individually changed in the monsters&#039; profiles in each QUESTXX.BIN file. The Movement, Attack, Defense and Death special event offset listed here are hardcoded in [[HeroQuest EXE File|QUEST.EXE]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
! Hex ID !! Dec ID !! Monster !! Graphic !! Body !! Mind !! Movement !! Attack !! Defense !! Death special event&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 00 || Goblin || Goblin || 01 || 01 || 0A || 02 || 01 || 0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x01 || 01 || Orc || Orc || 01 || 02 || 08 || 03 || 02 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x02 || 02 || Fimir || Fimir || 02 || 03 || 06 || 03 || 03 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x03 || 03 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x04 || 04 || Skeleton || Skeleton || 01 || 00 || 06 || 02 || 02 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x05 || 05 || Zombie || Zombie || 01 || 00 || 04 || 02 || 03 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x06 || 06 || Mummy || Mummy || 02 || 00 || 04 || 03 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x07 || 07 || Gargoyle || Gargoyle || 03 || 04 || 06 || 04 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x08 || 08 || Orc Warlord Ulag || Gargoyle || 02 || 03 || 0A || 04 || 05 ||  200C&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x09 || 09 || Orc Lord Grak || Orc || 03 || 03 || 08 || 04 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0A || 10 || Balur the Fire Mage || Gargoyle || 03 || 07 || 08 || 02 || 05 ||  2C0C&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0B || 11 || Stone Chaos Warrior || Gargoyle || 01 || 01 || 01 || 02 || 06 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0C || 12 || The Witch Lord || Gargoyle || 04 || 06 || 0A || 05 || 06 ||  0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 13 || The Witch Lord || Gargoyle || 04 || 06 || 06 || 03 || 05 || 0000&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x0E || 14 || Goblin || Goblin || 01 || 01 || 0A || 02 || 01 || 4A0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x0F || 15 || Orc || Orc || 01 || 02 || 08 || 03 || 02 || 520C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x10 || 16 || Fimir || Fimir || 02 || 03 || 06 || 03 || 03 || 7B0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x11 || 17 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 || 7B0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x12 || 18 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 || 6F0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x13 || 19 || Zombie || Zombie || 01 || 00 || 04 || 02 || 03 || 820C&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 20 || Spirit Rider || Chaos warrior || 03 || 03 || 08 || 04 || 03 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x15 || 21 || Death Mist|| No graphics || || || 06 || 04 || 03 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x16 || 22 || Bellthor || Gargoyle || || || 06 || 04 || 06 || B82B&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x17 || 23 || Skulmar || Gargoyle || || || 08 || 05 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x18 || 24 || Doomguard || Gargoyle || || || 06 || 04 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x19 || 25 || Witch Kessandria || Gargoyle || || || 06 || 04 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x1A || 26 || The Witch Lord || Gargoyle || || || 0A || 05 || 06 || DC2B&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 27 || Orc || Orc || || || 08 || 03 || 02 || 0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Objects Block ===&lt;br /&gt;
&lt;br /&gt;
Each object block takes 3 bytes. The length of the list of objects is specified in the header in &amp;lt;tt&amp;gt;NrOfObjects&amp;lt;/tt&amp;gt;. The full block length is &amp;lt;tt&amp;gt;NrOfObjects * 3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The object layout is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| 00 || [[UINT8]] || X position, from 0x00 to 0x19.&lt;br /&gt;
|-&lt;br /&gt;
| 01 || [[UINT8]] || Y position, from 0x00 to 0x12.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || [[UINT8]] || Object type; see table below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Objects appear to be stored in order of their ID, though it is unknown if this is a requirement.&lt;br /&gt;
&lt;br /&gt;
Multi-cell objects are made up of a defining indicator on the north-west origin-cell of the object, and filler objects on the other cells. These fillers are technically invisible objects, but they are important to ensure the entire object is considered impassable by the game. Each type has its own filler type; e.g. the tables in both directions both use the &amp;quot;table filler block&amp;quot;. It is important to use the correct type, since this determines the name that shows up when holding your mouse over these cells on the minimap. For example, Quest 5 has an Alchemy Table with Fireplace filler blocks, and the minimap will indeed show the wrong name on all tiles except the top left one.&lt;br /&gt;
&lt;br /&gt;
The Stairs that indicate the end (and sometimes start) of the Quest map are a special case in this; each of the cells is specifically defined.&lt;br /&gt;
&lt;br /&gt;
Here is the full list of known object types. Types indicated with (*) are unused in the game levels, but might exist in-game for other reasons (e.g. sprung traps).&lt;br /&gt;
&lt;br /&gt;
IDs outside the range indicated in this list usually spawn bugged monsters which won&#039;t move or attack, and can&#039;t be attacked with normal weapons because they are always deemed &amp;quot;out of range&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex ID !! Dec ID !! Object&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 48 || Rock&lt;br /&gt;
|-&lt;br /&gt;
| 31 || 49 || Rock&amp;lt;sup&amp;gt;(*)&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 50 || Pit Trap - Hidden&lt;br /&gt;
|-&lt;br /&gt;
| 33 || 51 || Pit Trap - Opened&amp;lt;sup&amp;gt;(*)&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 52 || Falling Rock Trap&lt;br /&gt;
|-&lt;br /&gt;
| 35 || 53 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 54 || Spear Trap&lt;br /&gt;
|-&lt;br /&gt;
| 37 || 55 || Teleport&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 56 || Stairs Block 1 (NW)&lt;br /&gt;
|-&lt;br /&gt;
| 39 || 57 || Stairs Block 2 (SW)&lt;br /&gt;
|-&lt;br /&gt;
| 3A || 58 || Stairs Block 3 (NE)&lt;br /&gt;
|-&lt;br /&gt;
| 3B || 59 || Stairs Block 4 (SE)&lt;br /&gt;
|-&lt;br /&gt;
| 3C || 60 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3D || 61 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3E || 62 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3F || 63 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 40 || 64 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 41 || 65 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 66 || Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 43 || 67 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 44 || 68 || Torture Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 45 || 69 || Tomb (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 46 || 70 || Alchemy Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 47 || 71 || Fireplace (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 48 || 72 || Closet (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 49 || 73 || Library (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 4A || 74 || Armour Rack (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 4B || 75 || Table 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4C || 76 || Table 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4D || 77 || Torture 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4E || 78 || Torture 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4F || 79 || Alchemy 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 80 || Alchemy 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 51 || 81 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 52 || 82 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 53 || 83 || Tomb 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 54 || 84 || Closet 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 55 || 85 || Armour Rack 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 56 || 86 || Library 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 57 || 87 || Fireplace 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 58 || 88 || Library 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 59 || 89 || Fireplace 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5A || 90 || Closet 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5B || 91 || Armour Rack 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5C || 92 || Chest (South)&lt;br /&gt;
|-&lt;br /&gt;
| 5D || 93 || Chest (East)&lt;br /&gt;
|-&lt;br /&gt;
| 5E || 94 || Throne (South)&lt;br /&gt;
|-&lt;br /&gt;
| 5F || 95 || Throne (East)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Quest Text Block ===&lt;br /&gt;
&lt;br /&gt;
This block contains the briefing at the start of the Quest. Its X and Y positions are offsets on the scroll on which the text is shown.&lt;br /&gt;
&lt;br /&gt;
The full block consists of any number of text chunks, without any bytes in between the chunks. The 00 byte behind the last text chunk seems to serve as end point. If this 00 byte is not present, the game will ignore the length set in the header and will keep on reading and interpreting text entries. The 00 byte is not included in the text block length in the header.&lt;br /&gt;
&lt;br /&gt;
Each text chunk contained in this block is preceded by a small header consisting of an entry separator value and the X and Y coordinates.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Separator || Always 0x11. Is probably used to detect where the previous entry ends.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Y position || Y position in the scroll&#039;s matrix offsets; effectively the line number.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || X position || X position in the scroll&#039;s matrix offsets, to nicely center the text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This header is immediately followed by the text.&lt;br /&gt;
&lt;br /&gt;
== List of Quests ==&lt;br /&gt;
&lt;br /&gt;
The following list contains PC game specific information and differences with the boardgame version of the same quest. Quest 15-24 are from the &amp;quot;Return of the Witch Lord&amp;quot; expansion. All PC maps have a different layout than the boardgame. &amp;quot;Fixed&amp;quot; column refers to the current modding project carried out by [[User:theruler|theruler]] on [https://www.oldgamesitalia.net/forum/index.php?showtopic=27582 OldGamesItalia.net] (italian).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Dec ID !! Hex ID !! Quest name !! Quest specific rules differences with the boardgame !! Fixed&lt;br /&gt;
|-&lt;br /&gt;
| 01 || 00 || The Maze ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 02 || 01 || The Rescue of Sir Ragnar || &amp;lt;s&amp;gt;The content of the rooms is revealed but the doors remain closed.&amp;lt;/s&amp;gt; || Yes &lt;br /&gt;
|-&lt;br /&gt;
| 03 || 02 || Lair of the Orc Warlord ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 04 || 03 || Prince Magnus&#039; Gold ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 05 || 04 || Melar&#039;s Maze || &amp;lt;s&amp;gt;The Stone Gargoyle trap is not implemented&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 06 || 05 || Legacy of the Orc Warlord || &amp;lt;s&amp;gt;The equipment is correctly removed from the heroes, but they still keep the benefits.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 07 || 06 || The Lost Wizard ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 08 || 07 || The Fire Mage || &amp;lt;s&amp;gt;Balurs is a normal monster, doesn&#039;t have the ability to use fire magic or escape spell.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 09 || 08 || Race Against Time ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || 09 || Castle of Mystery || &amp;lt;s&amp;gt;Wandering monster instead of Ollar&#039;s text&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;inability to drop the mine gold&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Only one hero can take the gold&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;monsters cannot step in front of doors&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 0A || Bastion of Chaos ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || 0B || Barak Tor - Barrow of the Witch Lord || &amp;lt;s&amp;gt;The WL has standard movement instead of 1&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;the fake doors are not present.&amp;lt;/s&amp;gt;|| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 0C || Quest for the Spirit Blade || &amp;lt;s&amp;gt;The special fallen rock that blocks the backtrack of the heroes is not present.&amp;lt;/s&amp;gt; || Yes &lt;br /&gt;
|-&lt;br /&gt;
| 14 || 0D || Return to Barak Tor || &amp;lt;s&amp;gt;The WL can be killed by magic rather than being totally immune&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;epilogue text is missing&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 0E || The Gate of Doom || &amp;lt;s&amp;gt;The doors do not automatically open upon entering the first room / there are no fake doors.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 0F || The Cold Halls || Spirit raiders are weaker / and scattered on the map instead of inside their tombs || No&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 10 || The Silent Passages || The Myst cannot be killed / and have a fixed movement of 6 tiles || No&lt;br /&gt;
|-&lt;br /&gt;
| 18 || 11 || The Halls of Vision || &amp;lt;s&amp;gt;Keys of Agrain are found the very room before the stairs, the mummies are normal monsters and the doors do not disappear.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 19 || 12 || The Gate of Bellthor || The Bellthor is a normal monster, start attacking and doesn&#039;t wait till the last hero has entered the room, doesn&#039;t explode upon death and doesn&#039;t drain mind points. The door doesn&#039;t disappear || No&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 13 || Halls of the Dead || &amp;lt;s&amp;gt;All 4 heroes are not captured and start together with all the equipment&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;WL is not present and doesn&#039;t curse the heroes when entering the central room.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 21 || 14 || The Forgotten Legion || The legion is not frozen in the central room, but scattered on the map as normal monsters || No&lt;br /&gt;
|-&lt;br /&gt;
| 22 || 15 || The Forbidden Caverns || &amp;lt;s&amp;gt;There are no random monsters on the Xs&amp;lt;/s&amp;gt; / no already opened doors at the beginning || Partial&lt;br /&gt;
|-&lt;br /&gt;
| 23 || 15 || The Last Gate || Kessandria is a normal monster and does not escape if attacked / doesn&#039;t cast spells / &amp;lt;s&amp;gt;is not immune to magic&amp;lt;/s&amp;gt; || Partial&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 17 || The Court of the Witch Lord || &amp;lt;s&amp;gt;Doomguards are normal Chaos warriors&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Heroes start in the WL&#039;s room instead at the stairs&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;the WL is affected by all magic not only fire&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;WL doesn&#039;t summon monsters&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Stone orcs are normal orcs.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Quest_Format&amp;diff=12657</id>
		<title>HeroQuest Quest Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_Quest_Format&amp;diff=12657"/>
		<updated>2025-11-17T17:44:34Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* List of Quests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D cell-based&lt;br /&gt;
 | Layers = N/A&lt;br /&gt;
 | Cell dimensions = 26&amp;amp;times;19 (isometric)&lt;br /&gt;
 | Cell viewport = max 6&amp;amp;times;5 (one single room)&lt;br /&gt;
 | Viewport = 320&amp;amp;times;200&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|HeroQuest}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This page describes the mapping of the QUEST##.BIN files in [[HeroQuest]], which are used to describe one mission level. These files contain everything that is needed to generate a quest. The maps of the game, like in the board game, are always laid out as 26&amp;amp;times;19 squares.&lt;br /&gt;
&lt;br /&gt;
In theory, with this information, it could be possible to create a mission editor for the game. The only known restrictions are to stick with the Special events list, since it is hard-coded, and that no new missions can be added (at the moment) to the 2-page in-game list. So to add missions, you need to overwrite the original quests. Since the second page is for the &amp;quot;Return of the Witch Lord&amp;quot; expansion, a new expansion (fan made, or based on official expansions like &amp;quot;Kellar&#039;s Keep&amp;quot;) could be added as patch.&lt;br /&gt;
&lt;br /&gt;
== Format quirks ==&lt;br /&gt;
&lt;br /&gt;
* The game crashes if the file exceeds 2760h (10KB) in length.&lt;br /&gt;
* Some special event are hard coded in the engine, and not in the file.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Nyerguds&#039;s edit note: Not sure what to do with this information; it seems unrelated to this actual format, and while it is called &amp;quot;welcome behaviour&amp;quot; it also says it crashes the game??&lt;br /&gt;
&lt;br /&gt;
The game crashes if set higher than 2760h (10KB), but produce a strange change in the random events: they became ACTUALLY random.&lt;br /&gt;
The normal events in the original game are pseudo-random, they always start with a fixed list of gold coins find events, then all the potions, then traps, then wandering monster and then repeats. Enlarging the Quest Text Block size probably overwrites some memory portions dedicated to these &amp;quot;random&amp;quot; events, messing that up. The fact is that the list remain the same, but on each quest, the first event of the list is chosen randomly, after which it continues down the list as usual. (Thanks to Rhaul for finding this unexpected but welcome behaviour.)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overall structure ==&lt;br /&gt;
&lt;br /&gt;
The overall structure of the file is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x000 || Map layer for rooms layout &lt;br /&gt;
|-&lt;br /&gt;
| 0x200 ||  Map layer for walls layout&lt;br /&gt;
|-&lt;br /&gt;
| 0x400 || Hero positions for all four heroes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40C || Special Events per room for treasures&lt;br /&gt;
|-&lt;br /&gt;
| 0x437 || Special Events per room for traps and hidden doors&lt;br /&gt;
|-&lt;br /&gt;
| 0x462 || Population block, with Monsters, Objects and Quest Text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following sections will describe each of these in detail.&lt;br /&gt;
&lt;br /&gt;
== Map Layers ==&lt;br /&gt;
&lt;br /&gt;
The file starts with two layers specifying different properties of the same map tiles; first the rooms layout, then the walls layout, with each block using one byte per tile. These blocks only need 26*19 bytes to contain all their data, but are padded to blocks of 0x200 bytes each.&lt;br /&gt;
&lt;br /&gt;
=== Rooms Layout ===&lt;br /&gt;
&lt;br /&gt;
This block starts at the beginning of the file. The rooms layout determines which area on the map is part of which room. Since the game is limited to showing rooms with a maximum dimension of 6x5, all paths are chopped up into different &#039;rooms&#039; as well. Rooms have numbers from 0 to 42. A value of 0 means the room is not used. Rooms 1 to 20 (0x14) are the pathways. The remaining range, from 21 to 42 (0x15 to 0x2A), are the main rooms.&lt;br /&gt;
&lt;br /&gt;
The default rooms layout with coordinates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19&lt;br /&gt;
    &lt;br /&gt;
00   01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04 05 05 05 05&lt;br /&gt;
01   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
02   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
03   01 15 15 15 15 16 16 16 16 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
04   01 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 03 03 18 18 18 19 19 19 19 1A 1A 1A 1A 05&lt;br /&gt;
05   06 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 08 08 18 18 18 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06   06 1B 1B 1B 1B 1C 1C 1C 1C 07 08 08 08 08 08 08 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
07   06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
08   06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
09   06 06 06 06 07 07 07 07 07 07 1F 1F 1F 1F 1F 1F 09 09 09 09 09 09 0A 0A 0A 0A&lt;br /&gt;
0A   0B 20 20 20 20 21 21 22 22 0C 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0B   0B 20 20 20 20 21 21 22 22 0C 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0C   0B 20 20 20 20 21 21 22 22 0C 0D 0D 0D 0D 0D 0D 0E 23 23 23 23 24 24 24 24 0F&lt;br /&gt;
0D   0B 20 20 20 20 26 26 26 26 27 27 27 0D 0D 28 28 28 28 23 23 23 24 24 24 24 0F&lt;br /&gt;
0E   0B 25 25 25 25 26 26 26 26 27 27 27 0D 0D 28 28 28 28 29 29 29 2A 2A 2A 2A 0F&lt;br /&gt;
0F   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
10   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
11   10 25 25 25 25 26 26 26 26 27 27 27 12 12 28 28 28 28 29 29 29 2A 2A 2A 2A 14&lt;br /&gt;
12   10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The game only seems to accept 32 different rooms on one quest map. If a map exceeds this amount, the higher ones after 32 are used are displayed on the overhead map, and you can enter them, but no tiles are displayed. This is probably an engine limitation. Because of this, any inaccessible areas in the quest map are cleared to room 0. The numbers of the used rooms don&#039;t need to be consecutive, though, so the actual layout of the numbers is generally not changed. The few changes to room layout definitions that exist in the files all seem to be map errors. Some maps do have corridors that are shortened because of an obstruction, and in such cases the room type is generally also cleared to cut it off at that point.&lt;br /&gt;
&lt;br /&gt;
Example of the first level, &amp;quot;The Maze&amp;quot;. 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the layout. You can see that room 0x12 was cut off towards the north. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04 05 05 05 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 -- -- -- -- 16 16 16 16 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
01 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 03 03 -- -- -- -- -- -- -- -- -- -- -- 05&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 17 17 17 08 08 -- -- -- 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 08 08 08 08 08 08 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 1B 1B 1B 1B 1C 1C 1C 1C 07 1F 1F 1F 1F 1F 1F 09 1D 1D 1D 1D 1E 1E 1E 1E 0A&lt;br /&gt;
06 06 06 06 07 07 07 07 07 07 1F 1F 1F 1F 1F 1F 09 09 09 09 09 09 0A 0A 0A 0A&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- 1F 1F 1F 1F 1F 1F 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 21 21 22 22 -- -- -- -- -- 0D 0D 0E 23 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B 20 20 20 20 26 26 26 26 -- -- -- -- -- 28 28 28 28 23 23 23 -- -- -- -- 0F&lt;br /&gt;
0B -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 0F&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 -- -- -- -- 26 26 26 26 -- -- -- -- -- 28 28 28 28 -- -- -- -- -- -- -- 14&lt;br /&gt;
10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 13 13 14 14 14 14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Walls Layout ===&lt;br /&gt;
&lt;br /&gt;
This block starts at offset 0x200, and, like the room IDs, is one byte per tile. The values determine the walls around each tile, any doors set in them, and any special properties of these walls or doors. South and East walls and doors are not defined, since you can get the same effect by placing a North or West ones in the adjacent room, and the southern and eastern border of the entire map are automatically walls.&lt;br /&gt;
&lt;br /&gt;
Note that the perspective is isometric, so only the west (top left) and north (top right) walls are visible while playing. Because of this, some maps have errors where there are missing walls on openings that seem to lead to unused areas with room ID 00 when going to the east or south. In reality, the game will never indicate openings towards room 00 as passable, so the lack of wall makes no difference.&lt;br /&gt;
&lt;br /&gt;
Each byte in this block is made up of bit flags that can be combined. However, these bits are not just settings interpreted by the code; the full value made up of these bits also creates the index used to look up the corresponding sprite graphics. Because of this, the unused bit 0x02 can be used to mod alternate graphics into wall tiles, even if it has no real meaning to the game. Here are the meanings of each separate bit:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bin value !! Hex Value !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| 00000000 || 0x00 || None      &lt;br /&gt;
|-&lt;br /&gt;
| 00000001 || 0x01 || Do not draw this wall. Doors show up as a frame only. This is done with walls when the area goes around a corner behind the walls, to prevent them from overlapping the floor tiles.&lt;br /&gt;
|-&lt;br /&gt;
| 00000010 || 0x02 || Not used (only appears once in Quest 3) can be used in conjunction with 4th bit to change graphic for opened secret door&lt;br /&gt;
|-&lt;br /&gt;
| 00000100 || 0x04 || The door is Open (can&#039;t be applied if secret)&lt;br /&gt;
|-&lt;br /&gt;
| 00001000 || 0x08 || The door is Secret (can&#039;t be applied if open)&lt;br /&gt;
|-&lt;br /&gt;
| 00010000 || 0x10 || Door to the West&lt;br /&gt;
|-&lt;br /&gt;
| 00100000 || 0x20 || Door to the North&lt;br /&gt;
|-&lt;br /&gt;
| 01000000 || 0x40 || Wall to the West&lt;br /&gt;
|-&lt;br /&gt;
| 10000000 || 0x80 || Wall to the North&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example of the first level &amp;quot;The Maze&amp;quot;. 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the layout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C0 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80&lt;br /&gt;
40 C0 80 80 80 C0 80 80 80 C0 20 80 41 -- C0 80 80 80 80 80 80 80 80 80 80 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 10 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 C0 80 80 80 C0 80 80 80 40 -- -- 41 -- 40 -- -- -- -- -- -- -- -- -- -- 41&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 18 -- -- 40 -- 40 -- -- C0 80 80 80 90 80 80 80 40&lt;br /&gt;
40 40 -- -- -- 10 -- -- -- C0 80 80 -- -- 81 81 80 40 -- -- -- 40 -- -- -- 10&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 C0 80 80 80 80 80 40 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 40 -- -- -- -- -- 40 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 81 81 29 80 80 80 80 80 -- 10 -- -- -- -- -- 10 81 81 21 81 81 80 80 80 00&lt;br /&gt;
40 C0 80 80 80 68 80 C0 80 C0 40 -- -- -- -- -- 40 C0 80 80 20 C0 80 80 80 40&lt;br /&gt;
40 40 -- -- -- 40 -- 10 -- 40 40 -- -- -- -- -- 40 18 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 10 -- -- -- 40 -- 40 -- 40 80 80 80 80 C0 80 -- 40 -- -- -- 40 -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 60 80 80 80 40 -- -- -- -- C0 80 80 20 41 -- -- 40 -- -- -- 40&lt;br /&gt;
40 C0 80 80 80 40 -- -- -- 40 -- -- -- -- 40 -- -- -- C0 80 80 -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 40 -- -- -- 40 -- -- -- 40 -- -- -- -- 40 -- -- -- 40 -- -- -- -- -- -- 40&lt;br /&gt;
40 81 81 81 80 80 20 80 80 80 80 80 80 80 80 20 80 80 80 80 80 80 80 80 80 00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visualised as image, you get this:&lt;br /&gt;
&lt;br /&gt;
[[File:HeroQuest-Quest1.png|624px]]&lt;br /&gt;
&lt;br /&gt;
Different rooms are indicated in different colours, with shades of grey used for the corridor &#039;rooms&#039;, and the room 0 (disabled) areas indicated in black. Doors are shown as white, secret doors as purple, drawn walls as dark red, and walls with the draw-suppression bit enabled are orange. To show the whole grid structure, &lt;br /&gt;
walls that are not enabled at all are indicated as dark purple.&lt;br /&gt;
&lt;br /&gt;
== Hero Positions ==&lt;br /&gt;
&lt;br /&gt;
At 0x400, after the two map layers, starts the hero positioning info. This gives the following structure for each hero:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Block Name!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT8]]||HeroX||Cell position X-coordinate of the barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x01||[[UINT8]]||HeroY||Cell position Y-coordinate of the barbarian&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT8]]||HeroFacing|| Animation frame for the hero, determining the facing.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This structure occurs four times, in this order:  Barbarian, Dwarf, Elf, Wizard.&lt;br /&gt;
&lt;br /&gt;
This table gives the facing frames for each hero:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Hero!!North!!East!!South!!West&lt;br /&gt;
|-&lt;br /&gt;
| Barbarian || 0x23 || 0x1D || 0x20 || 0x26&lt;br /&gt;
|-&lt;br /&gt;
| Dwarf     || 0x2F || 0x29 || 0x2C || 0x32&lt;br /&gt;
|-&lt;br /&gt;
| Elf       || 0x3B || 0x35 || 0x38 || 0x3E&lt;br /&gt;
|-&lt;br /&gt;
| Wizard    || 0x47 || 0x41 || 0x44 || 0x4A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special Events ==&lt;br /&gt;
&lt;br /&gt;
The next sections, starting at 0x040C, are the Special Events. There are two of these: one for treasure searching (at 0x040C), and one for searching for traps and hidden doors (at 0x0437). They each take up 43 bytes, one for each of the room numbers specified in the [[#Rooms Layout|Rooms Layout]]. The lists seem to include the unused room 0.&lt;br /&gt;
&lt;br /&gt;
The list of special events:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Hex ID !! Dec ID !! Where !! Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 00 || None || No event.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || 01 || Chest || Trapped, you disarm it&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || 02 || Chest || Trapped, -1 body point&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || 03 || Cupboard  || 30 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || 04 || Chest || Trapped, -1 body point, +100 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || 05 || Weapon rack || Spear&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || 06 || Chest || 50 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || 07 || Chest || 250 coins of prince magnus, the weight slows you&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 08 || Throne || Melar&#039;s key&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || 09 || Generic || Talisman of lore&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || 10 || Generic || Borin&#039;s armour&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || 11 || Chest || Karlen&#039;s 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 12 || Chest || 150 coins + wand of recall&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 13 || Chest || 100 coins (and the chest vanishes)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || 14 || Generic || Shield&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || 15 || Chest || Trapped, beware&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 16 || Chest || Trapped, gargoyle awakes&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 17 || Generic || Spirit blade&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 18 || Chest || 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 19 || Chest || 200 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 20 || Chest || 300 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 21 || Chest || 100 coins + potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 22 || Chest || Trapped, -1 body point&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 23 || Chest || Trapped, you disarm it&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 24 || Table || Agrain&#039;s keys (100 coins)&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 25 || 2 Chests || 200 coins x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 26 || Chest || 350 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 27 || Chest || 250 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 28 || Throne || 500 coins&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 29 || Chest || Potion of healing&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 30 || Generic || Mine entrance + 5000 coins, cannot attack (Coins are fake only in the &amp;quot;Castle of Mystery&amp;quot; mission)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, in QUEST17.BIN, the (hexadecimal) event contents are the following. Again, 00 bytes have been replaced by &amp;quot;--&amp;quot; to more clearly show the data.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Room ID:  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A&lt;br /&gt;
Treasure  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 15 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 16 -- -- -- -- -- -- -- -- --&lt;br /&gt;
Traps     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 17 -- -- -- -- -- -- -- -- --&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Population ==&lt;br /&gt;
&lt;br /&gt;
The population block, starting at 0x462, takes up the rest of the file. It has a header that specifies for each section where the data can be found. All pointers in this section are relative to the start of the population block.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Block Name!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x00||[[UINT16LE]]||TextBlockStart||Relative pointer to where the [[#Quest Text Block|Quest Text Block]] starts. This is normally put at the end of the file.&lt;br /&gt;
|-&lt;br /&gt;
|0x02||[[UINT16LE]]||TextBlockSize||Size of the text block.&lt;br /&gt;
|-&lt;br /&gt;
|0x04||[[UINT16LE]]||MonstersBlockStart||Relative pointer to the [[#Monsters Block|Monsters Block]]. Each block is 10 bytes. This is normally put directly behind this header, at offset 0C.&lt;br /&gt;
|-&lt;br /&gt;
|0x06||[[UINT16LE]]||MonstersBlockSize||Size of the Monsters block. Divide by 10 to get the amount of monsters.&lt;br /&gt;
|-&lt;br /&gt;
|0x08||[[UINT16LE]]||ObjectsBlockStart||Relative pointer to the [[#Objects Block|Objects Block]].&lt;br /&gt;
|-&lt;br /&gt;
|0x0A||[[UINT16LE]]||NrOfObjects||Number of objects in the Objects Block.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After this come the sections, normally in the following order:&lt;br /&gt;
&lt;br /&gt;
* Monsters Block&lt;br /&gt;
* Objects block&lt;br /&gt;
* Quest Text Block&lt;br /&gt;
* A padding 0x00 byte. This is sometimes two bytes. Might be needed to serve as end of the last text item.&lt;br /&gt;
&lt;br /&gt;
=== Monsters Block ===&lt;br /&gt;
&lt;br /&gt;
Typically starts at offset 0x46E. Each monster block takes 10 bytes. The length of the full block is specified in the header in &amp;lt;tt&amp;gt;MonstersBlockSize&amp;lt;/tt&amp;gt;. Divide it by 10 to know the amount of monsters.&lt;br /&gt;
&lt;br /&gt;
The maximum amount of monsters the game can handle is 32, so that&#039;s most likely also the maximum amount that can be stored in this block.&lt;br /&gt;
&lt;br /&gt;
==== Monster Layout ====&lt;br /&gt;
&lt;br /&gt;
The monster layout is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:70px&amp;quot; | 00&lt;br /&gt;
| style=&amp;quot;width:70px&amp;quot; | [[UINT8]]&lt;br /&gt;
|| Seems to be a set of bit flags. It apparently needs to be 0x81 to have a properly functioning monster. If it is set to 0x00, the monster does not appear on the map at all. If it is set to just 0x80 or just 0x01, the monster can&#039;t be attacked except by spells. Only the Death Mist on Quest 17 uses value 0x01, but its special scripted code means it can not be interacted with at all.&lt;br /&gt;
|-&lt;br /&gt;
| 01 || [[UINT8]] || X starting position, from 0x00 to 0x19. Changes during the game as the monster moves.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || [[UINT8]] || Y starting position, from 0x00 to 0x12. Changes during the game as the monster moves.&lt;br /&gt;
|-&lt;br /&gt;
| 03 || [[UINT8]] || &#039;&#039;Placeholder&#039;&#039; for Monsters&#039;s current room. See [[HeroQuest Quest Format#Rooms Layout|Rooms Layout]]&lt;br /&gt;
|-&lt;br /&gt;
| 04 || [[UINT16LE]] || &#039;&#039;Placeholder&#039;&#039; for Memory location of Monster&#039;s position on the [[HeroQuest Quest Format#Walls Layout|Walls Layout]] in memory at [0B6B:546F]&lt;br /&gt;
|-&lt;br /&gt;
| 06 || [[UINT8]] || Monster condition bits, including spell effects. 0x00 = dead, 0x01 = alive, 0x02 = tempest, 0x04 = sleep. The Death Mist on Quest 17 has the highest bit (0x80) enabled.&lt;br /&gt;
|-&lt;br /&gt;
| 07 || [[UINT8]] || Higher 4 bits are for the Body points, and the lower 4 are for the Mind points, i.e. 0x13 = 1 BP, 3 MP. Changing BP doesn&#039;t affect the game though.&lt;br /&gt;
|-&lt;br /&gt;
| 08 || [[UINT8]] || Shown monster type; see monster types table below. This determines the graphics and name of the monster.&lt;br /&gt;
|-&lt;br /&gt;
| 09 || [[UINT8]] || Monster type stats; see monster types table below. This determines the Attack and Defense of the monster. This usually uses the same type as what it is shown as, but it can be changed to make the monster weaker or stronger than a monster of that type normally is. This also changes the Death Event of the monster.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first monster in the list is used as the &amp;quot;wandering monster&amp;quot; that might show up when you search a room. Its first byte is usually put to 0, so it won&#039;t show up on the map and acts purely as wandering monster template. However, it is perfectly possible to have a monster both serve as wandering monster &#039;&#039;and&#039;&#039; appear as physical entity on the map.&lt;br /&gt;
&lt;br /&gt;
==== Monster Types ====&lt;br /&gt;
&lt;br /&gt;
The list of monster types can be divided into four ranges:&lt;br /&gt;
&lt;br /&gt;
* The 00-0C range are the normal monsters.&lt;br /&gt;
* The 0D-13 range are special monsters only referenced in QUEST11.BIN. These are not actually used as monsters in Quest 11, but their stats are applied to the normal monsters by putting them in the &amp;quot;monster type stats&amp;quot; field. The stats themselves are actually unchanged, but this also makes them use the special death event of these new types, triggering the quest&#039;s gold reward. The Witch Lord from this range is not used.&lt;br /&gt;
* The 14-1B range contains the new monsters from the expansion.&lt;br /&gt;
* The last monster (1B), is a dummy entry containing a copy of the Orc, which is never used.&lt;br /&gt;
&lt;br /&gt;
As indicated in the previous section, the Body and Mind points can be individually changed in the monsters&#039; profiles in each QUESTXX.BIN file. The Movement, Attack, Defense and Death special event offset listed here are hardcoded in [[HeroQuest EXE File|QUEST.EXE]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
! Hex ID !! Dec ID !! Monster !! Graphic !! Body !! Mind !! Movement !! Attack !! Defense !! Death special event&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 00 || Goblin || Goblin || 01 || 01 || 0A || 02 || 01 || 0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x01 || 01 || Orc || Orc || 01 || 02 || 08 || 03 || 02 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x02 || 02 || Fimir || Fimir || 02 || 03 || 06 || 03 || 03 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x03 || 03 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x04 || 04 || Skeleton || Skeleton || 01 || 00 || 06 || 02 || 02 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x05 || 05 || Zombie || Zombie || 01 || 00 || 04 || 02 || 03 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x06 || 06 || Mummy || Mummy || 02 || 00 || 04 || 03 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x07 || 07 || Gargoyle || Gargoyle || 03 || 04 || 06 || 04 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x08 || 08 || Orc Warlord Ulag || Gargoyle || 02 || 03 || 0A || 04 || 05 ||  200C&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x09 || 09 || Orc Lord Grak || Orc || 03 || 03 || 08 || 04 || 04 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0A || 10 || Balur the Fire Mage || Gargoyle || 03 || 07 || 08 || 02 || 05 ||  2C0C&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0B || 11 || Stone Chaos Warrior || Gargoyle || 01 || 01 || 01 || 02 || 06 ||  0000&lt;br /&gt;
|-                                               &lt;br /&gt;
| 0x0C || 12 || The Witch Lord || Gargoyle || 04 || 06 || 0A || 05 || 06 ||  0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || 13 || The Witch Lord || Gargoyle || 04 || 06 || 06 || 03 || 05 || 0000&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x0E || 14 || Goblin || Goblin || 01 || 01 || 0A || 02 || 01 || 4A0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x0F || 15 || Orc || Orc || 01 || 02 || 08 || 03 || 02 || 520C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x10 || 16 || Fimir || Fimir || 02 || 03 || 06 || 03 || 03 || 7B0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x11 || 17 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 || 7B0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x12 || 18 || Chaos Warrior || Chaos Warrior || 03 || 03 || 06 || 03 || 04 || 6F0C&lt;br /&gt;
|-                                                   &lt;br /&gt;
| 0x13 || 19 || Zombie || Zombie || 01 || 00 || 04 || 02 || 03 || 820C&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 20 || Spirit Rider || Chaos warrior || 03 || 03 || 08 || 04 || 03 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x15 || 21 || Death Mist|| No graphics || || || 06 || 04 || 03 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x16 || 22 || Bellthor || Gargoyle || || || 06 || 04 || 06 || B82B&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x17 || 23 || Skulmar || Gargoyle || || || 08 || 05 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x18 || 24 || Doomguard || Gargoyle || || || 06 || 04 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x19 || 25 || Witch Kessandria || Gargoyle || || || 06 || 04 || 06 || 0000&lt;br /&gt;
|-                                                 &lt;br /&gt;
| 0x1A || 26 || The Witch Lord || Gargoyle || || || 0A || 05 || 06 || DC2B&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 27 || Orc || Orc || || || 08 || 03 || 02 || 0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Objects Block ===&lt;br /&gt;
&lt;br /&gt;
Each object block takes 3 bytes. The length of the list of objects is specified in the header in &amp;lt;tt&amp;gt;NrOfObjects&amp;lt;/tt&amp;gt;. The full block length is &amp;lt;tt&amp;gt;NrOfObjects * 3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The object layout is the following:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| 00 || [[UINT8]] || X position, from 0x00 to 0x19.&lt;br /&gt;
|-&lt;br /&gt;
| 01 || [[UINT8]] || Y position, from 0x00 to 0x12.&lt;br /&gt;
|-&lt;br /&gt;
| 02 || [[UINT8]] || Object type; see table below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Objects appear to be stored in order of their ID, though it is unknown if this is a requirement.&lt;br /&gt;
&lt;br /&gt;
Multi-cell objects are made up of a defining indicator on the north-west origin-cell of the object, and filler objects on the other cells. These fillers are technically invisible objects, but they are important to ensure the entire object is considered impassable by the game. Each type has its own filler type; e.g. the tables in both directions both use the &amp;quot;table filler block&amp;quot;. It is important to use the correct type, since this determines the name that shows up when holding your mouse over these cells on the minimap. For example, Quest 5 has an Alchemy Table with Fireplace filler blocks, and the minimap will indeed show the wrong name on all tiles except the top left one.&lt;br /&gt;
&lt;br /&gt;
The Stairs that indicate the end (and sometimes start) of the Quest map are a special case in this; each of the cells is specifically defined.&lt;br /&gt;
&lt;br /&gt;
Here is the full list of known object types. Types indicated with (*) are unused in the game levels, but might exist in-game for other reasons (e.g. sprung traps).&lt;br /&gt;
&lt;br /&gt;
IDs outside the range indicated in this list usually spawn bugged monsters which won&#039;t move or attack, and can&#039;t be attacked with normal weapons because they are always deemed &amp;quot;out of range&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hex ID !! Dec ID !! Object&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 48 || Rock&lt;br /&gt;
|-&lt;br /&gt;
| 31 || 49 || Rock&amp;lt;sup&amp;gt;(*)&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 50 || Pit Trap - Hidden&lt;br /&gt;
|-&lt;br /&gt;
| 33 || 51 || Pit Trap - Opened&amp;lt;sup&amp;gt;(*)&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 52 || Falling Rock Trap&lt;br /&gt;
|-&lt;br /&gt;
| 35 || 53 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 54 || Spear Trap&lt;br /&gt;
|-&lt;br /&gt;
| 37 || 55 || Teleport&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 56 || Stairs Block 1 (NW)&lt;br /&gt;
|-&lt;br /&gt;
| 39 || 57 || Stairs Block 2 (SW)&lt;br /&gt;
|-&lt;br /&gt;
| 3A || 58 || Stairs Block 3 (NE)&lt;br /&gt;
|-&lt;br /&gt;
| 3B || 59 || Stairs Block 4 (SE)&lt;br /&gt;
|-&lt;br /&gt;
| 3C || 60 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3D || 61 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3E || 62 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 3F || 63 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 40 || 64 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 41 || 65 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 66 || Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 43 || 67 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 44 || 68 || Torture Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 45 || 69 || Tomb (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 46 || 70 || Alchemy Table (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 47 || 71 || Fireplace (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 48 || 72 || Closet (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 49 || 73 || Library (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 4A || 74 || Armour Rack (Filler)&lt;br /&gt;
|-&lt;br /&gt;
| 4B || 75 || Table 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4C || 76 || Table 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4D || 77 || Torture 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4E || 78 || Torture 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 4F || 79 || Alchemy 2x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 80 || Alchemy 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 51 || 81 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 52 || 82 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 53 || 83 || Tomb 3x2 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 54 || 84 || Closet 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 55 || 85 || Armour Rack 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 56 || 86 || Library 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 57 || 87 || Fireplace 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 58 || 88 || Library 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 59 || 89 || Fireplace 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5A || 90 || Closet 3x1 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5B || 91 || Armour Rack 1x3 (Origin)&lt;br /&gt;
|-&lt;br /&gt;
| 5C || 92 || Chest (South)&lt;br /&gt;
|-&lt;br /&gt;
| 5D || 93 || Chest (East)&lt;br /&gt;
|-&lt;br /&gt;
| 5E || 94 || Throne (South)&lt;br /&gt;
|-&lt;br /&gt;
| 5F || 95 || Throne (East)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Quest Text Block ===&lt;br /&gt;
&lt;br /&gt;
This block contains the briefing at the start of the Quest. Its X and Y positions are offsets on the scroll on which the text is shown.&lt;br /&gt;
&lt;br /&gt;
The full block consists of any number of text chunks, without any bytes in between the chunks. The 00 byte behind the last text chunk seems to serve as end point. If this 00 byte is not present, the game will ignore the length set in the header and will keep on reading and interpreting text entries. The 00 byte is not included in the text block length in the header.&lt;br /&gt;
&lt;br /&gt;
Each text chunk contained in this block is preceded by a small header consisting of an entry separator value and the X and Y coordinates.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset!!Data type!!Description &amp;amp; Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Separator || Always 0x11. Is probably used to detect where the previous entry ends.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Y position || Y position in the scroll&#039;s matrix offsets; effectively the line number.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || X position || X position in the scroll&#039;s matrix offsets, to nicely center the text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This header is immediately followed by the text.&lt;br /&gt;
&lt;br /&gt;
== List of Quests ==&lt;br /&gt;
&lt;br /&gt;
The following list contains PC game specific information and differences with the boardgame version of the same quest. Quest 15-24 are from the &amp;quot;Return of the Witch Lord&amp;quot; expansion. All PC maps have a different layout than the boardgame. &amp;quot;Fixed&amp;quot; column refers to the current modding project carried out by [[User:theruler|theruler]] on [https://www.oldgamesitalia.net/forum/index.php?showtopic=27582 OldGamesItalia.net] (italian).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Dec ID !! Hex ID !! Quest name !! Quest specific rules differences with the boardgame !! Fixed&lt;br /&gt;
|-&lt;br /&gt;
| 01 || 00 || The Maze ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 02 || 01 || The Rescue of Sir Ragnar ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 03 || 02 || Lair of the Orc Warlord ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 04 || 03 || Prince Magnus&#039; Gold ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 05 || 04 || Melar&#039;s Maze || &amp;lt;s&amp;gt;The Stone Gargoyle trap is not implemented&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 06 || 05 || Legacy of the Orc Warlord || &amp;lt;s&amp;gt;The equipment is correctly removed from the heroes, but they still keep the benefits.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 07 || 06 || The Lost Wizard ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 08 || 07 || The Fire Mage || &amp;lt;s&amp;gt;Balurs is a normal monster, doesn&#039;t have the ability to use fire magic or escape spell.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 09 || 08 || Race Against Time ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || 09 || Castle of Mystery || &amp;lt;s&amp;gt;Wandering monster instead of Ollar&#039;s text&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;inability to drop the mine gold&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Only one hero can take the gold&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;monsters cannot step in front of doors&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 0A || Bastion of Chaos ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || 0B || Barak Tor - Barrow of the Witch Lord || &amp;lt;s&amp;gt;The WL has standard movement instead of 1&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;the fake doors are not present.&amp;lt;/s&amp;gt;|| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 0C || Quest for the Spirit Blade || &amp;lt;s&amp;gt;The special fallen rock that blocks the backtrack of the heroes is not present.&amp;lt;/s&amp;gt; || Yes &lt;br /&gt;
|-&lt;br /&gt;
| 14 || 0D || Return to Barak Tor || &amp;lt;s&amp;gt;The WL can be killed by magic rather than being totally immune&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;epilogue text is missing&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 0E || The Gate of Doom || &amp;lt;s&amp;gt;The doors do not automatically open upon entering the first room / there are no fake doors.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 0F || The Cold Halls || Spirit raiders are weaker / and scattered on the map instead of inside their tombs || No&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 10 || The Silent Passages || The Myst cannot be killed / and have a fixed movement of 6 tiles || No&lt;br /&gt;
|-&lt;br /&gt;
| 18 || 11 || The Halls of Vision || &amp;lt;s&amp;gt;Keys of Agrain are found the very room before the stairs, the mummies are normal monsters and the doors do not disappear.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 19 || 12 || The Gate of Bellthor || The Bellthor is a normal monster, start attacking and doesn&#039;t wait till the last hero has entered the room, doesn&#039;t explode upon death and doesn&#039;t drain mind points. The door doesn&#039;t disappear || No&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 13 || Halls of the Dead || &amp;lt;s&amp;gt;All 4 heroes are not captured and start together with all the equipment&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;WL is not present and doesn&#039;t curse the heroes when entering the central room.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 21 || 14 || The Forgotten Legion || The legion is not frozen in the central room, but scattered on the map as normal monsters || No&lt;br /&gt;
|-&lt;br /&gt;
| 22 || 15 || The Forbidden Caverns || &amp;lt;s&amp;gt;There are no random monsters on the Xs&amp;lt;/s&amp;gt; / no already opened doors at the beginning || Partial&lt;br /&gt;
|-&lt;br /&gt;
| 23 || 15 || The Last Gate || Kessandria is a normal monster and does not escape if attacked / doesn&#039;t cast spells / &amp;lt;s&amp;gt;is not immune to magic&amp;lt;/s&amp;gt; || Partial&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 17 || The Court of the Witch Lord || &amp;lt;s&amp;gt;Doomguards are normal Chaos warriors&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Heroes start in the WL&#039;s room instead at the stairs&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;the WL is affected by all magic not only fire&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;WL doesn&#039;t summon monsters&amp;lt;/s&amp;gt; / &amp;lt;s&amp;gt;Stone orcs are normal orcs.&amp;lt;/s&amp;gt; || Yes&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12654</id>
		<title>HeroQuest EXE File</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=HeroQuest_EXE_File&amp;diff=12654"/>
		<updated>2025-11-16T08:38:44Z</updated>

		<summary type="html">&lt;p&gt;Theruler: /* Various */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original exe is compressed with EXEPACKER, you must decompress with UNP to manipulate it.&lt;br /&gt;
&lt;br /&gt;
{{Executable Infobox&lt;br /&gt;
 | Interpreted = N&lt;br /&gt;
 | Platform = MS-DOS&lt;br /&gt;
 | Code = 16-bit x86&lt;br /&gt;
 | Games = {{Game|HeroQuest}}&lt;br /&gt;
  Memory information:&#039;&#039;&#039;&amp;lt;br&amp;gt;Code segment = 01EF&amp;lt;br&amp;gt;Data segment = 0B6B&amp;lt;br&amp;gt;Stack segment = 25F2&#039;&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= [CODE SEGMENT] Main Routines =&lt;br /&gt;
These are the main routines of the game, disassembled with DOSBOX debugger and annotated.&lt;br /&gt;
&lt;br /&gt;
== in-game main loop ==&lt;br /&gt;
 01EF:0413  E8E65F              call 000063FC ($+5fe6)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0416  E8FA5F              call 00006413 ($+5ffa)					&amp;lt;---- Checks left mouse button and everityng under it&lt;br /&gt;
 01EF:0419  C606CC40FF          mov  byte [40CC],FF         ds:[40CC]=DFFF   &lt;br /&gt;
 01EF:041E  F606923920          test byte [3992],20         ds:[3992]=9200		&amp;lt;---- Checks if right mouse button has been pressed&lt;br /&gt;
 01EF:0423  7403                je   00000428 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0425  E82E03              call 00000756 ($+32e)  					&amp;lt;---- ends the turn if right mouse button pressed&lt;br /&gt;
 01EF:0428  E85963              call 00006784 ($+6359) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:042B  E8A202              call 000006D0 ($+2a2)  					&amp;lt;---- ???&lt;br /&gt;
 01EF:042E  E8E564              call 00006916 ($+64e5) 					&amp;lt;---- draws in the correct order heroes and forniture&lt;br /&gt;
 01EF:0431  E84553              call 00005779 ($+5345) 					&amp;lt;---- same as above?&lt;br /&gt;
 01EF:0434  E8DD53              call 00005814 ($+53dd) 					&amp;lt;---- ???&lt;br /&gt;
 01EF:043A  E87B53              call 000057B8 ($+537b) 					&amp;lt;---- draws heroes, monsters, forniture and doors (not the walls)&lt;br /&gt;
 01EF:043D  E8B454              call 000058F4 ($+54b4) 					&amp;lt;---- Checks if orthogonal tiles are walkable and updates the directional arrows&lt;br /&gt;
 01EF:0440  E8A156              call 00005AE4 ($+56a1) 					&amp;lt;---- Checks if monsters are present in the room and updates search icons&lt;br /&gt;
 01EF:0443  E81E60              call 00006464 ($+601e) 					&amp;lt;---- activates attack, magic, treasure, traps icons&lt;br /&gt;
 01EF:0446  E8CF60              call 00006518 ($+60cf) 					&amp;lt;---- draws yellow figures on top left&lt;br /&gt;
 01EF:0449  E8C859              call 00005E14 ($+59c8)					&amp;lt;---- draws glove mouse pointer&lt;br /&gt;
 01EF:044C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000   &lt;br /&gt;
 01EF:0451  7503                jne  00000456 ($+3)         (down)           &lt;br /&gt;
 01EF:0453  E88E5C              call 000060E4 ($+5c8e)					&amp;lt;---- ???&lt;br /&gt;
 01EF:0456  E87E59              call 00005DD7 ($+597e)					&amp;lt;---- Clean the previous mouse sprite&lt;br /&gt;
 01EF:0459  E85954              call 000058B5 ($+5459)					&amp;lt;---- Clean the previous hero sprite&lt;br /&gt;
 01EF:045C  E82100              call 00000480 ($+21)					&amp;lt;---- Quest event checks&lt;br /&gt;
 01EF:045F  E8EC13              call 0000184E ($+13ec)					&amp;lt;---- Checks if the hero stands on a stair tile&lt;br /&gt;
 01EF:0462  803E973F00          cmp  byte [3F97],00         ds:[3F97]=0000   &lt;br /&gt;
 01EF:0467  7403                je   0000046C ($+3)         (no jmp)         &lt;br /&gt;
 01EF:0469  E8BA00              call 00000526 ($+ba)        				&amp;lt;---- End turn wrap up (resets registers and variables)&lt;br /&gt;
 01EF:046C  803E9A3F00          cmp  byte [3F9A],00         ds:[3F9A]=0000	&lt;br /&gt;
 01EF:0471  7401                je   00000474 ($+1)         (no jmp)	&lt;br /&gt;
 01EF:0473  C3                  ret						&lt;br /&gt;
 01EF:0474  803E923940          cmp  byte [3992],40         ds:[3992]=9200&lt;br /&gt;
 01EF:0479  7503                jne  0000047E ($+3)         (down)&lt;br /&gt;
 01EF:047B  E94FFE              jmp  000002CD ($-1b1)       (up)&lt;br /&gt;
 01EF:047E  EB93                jmp  short 00000413 ($-6d)  (up)				&amp;lt;--- goes back on top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shooting routine ==&lt;br /&gt;
Shooting routine (magic and throwing weapons) is utterly broken in this game.&amp;lt;br&amp;gt;&lt;br /&gt;
The code checks the map tile the projectile is above and determine if the line of sight is blocked or free.&amp;lt;br&amp;gt;&lt;br /&gt;
The way the map is coded resulted in a convoluted code that fails to check LOS.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;You can shoot past walls&#039;&#039;&#039; and always hit the target if the hero stands in contact with one wall and the target is the adjacent room exactly above or exactly to the right.&amp;lt;br&amp;gt;&lt;br /&gt;
You can also hit the target standing in the perfect diagonal like bishop&#039;s movement, and this could happen even if there are no active rooms (solid rock, but marked with 00 like rooms&#039; inner tiles) in between.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;LOS is blocked&#039;&#039;&#039; by parallel unrevealed secret doors and opened doors.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon check:&lt;br /&gt;
 01EF:0AB2  32C0                xor  al,al&lt;br /&gt;
 01EF:0AB4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- di+11 is equipped weapon. checks if it is crossbow?&lt;br /&gt;
 01EF:0AB8  7501                jne  00000ABB ($+1)         (no jmp)&lt;br /&gt;
 01EF:0ABA  C3                  ret&lt;br /&gt;
 01EF:0ABB  B0FD                mov  al,FD					&amp;lt;-- not crossbow&lt;br /&gt;
 01EF:0ABD  C3                  ret&lt;br /&gt;
 01EF:0ABE  807D1101            cmp  byte [di+11],01        ds:[B1A7]=0000	&amp;lt;-- starts here&lt;br /&gt;
 01EF:0ABF  7D11                jge  00000AD2 ($+11)        (down)		&amp;lt;-- jump if greater or equal&lt;br /&gt;
 01EF:0AC1  0174EE              add  [si-12],si             ds:[4DBA]=260D&lt;br /&gt;
 01EF:0AC4  807D1102            cmp  byte [di+11],02        ds:[46A8]=0010	&amp;lt;-- F64511/807D11 are the test/cmp of the equipped weapon&lt;br /&gt;
 01EF:0AC8  74E8                je   00000AB2 ($-18)        (up)&lt;br /&gt;
 01EF:0ACA  807D1140            cmp  byte [di+11],40        ds:[46A8]=0010&lt;br /&gt;
 01EF:0ACE  74E2                je   00000AB2 ($-1e)        (up)&lt;br /&gt;
 01EF:0AD0  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AD2  EBE0                jmp  short 00000AB4 ($-20)  (up)&lt;br /&gt;
 01EF:0AD4  F6451110            test byte [di+11],10        ds:[46A8]=0010	&amp;lt;-- crossbow&lt;br /&gt;
 01EF:0AD8  750F                jne  00000AE9 ($+f)         (no jmp)&lt;br /&gt;
 01EF:0ADA  F6451120            test byte [di+11],20        ds:[46A8]=0010	&amp;lt;-- throwing axe&lt;br /&gt;
 01EF:0ADE  7509                jne  00000AE9 ($+9)         (no jmp)&lt;br /&gt;
 01EF:0AE0  F6451140            test byte [di+11],40        ds:[46A8]=0010	&amp;lt;-- spear&lt;br /&gt;
 01EF:0AE4  7503                jne  00000AE9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:0AE6  B0FC                mov  al,FC&lt;br /&gt;
 01EF:0AE8  C3                  ret&lt;br /&gt;
&lt;br /&gt;
SHOOTING ROUTINE STARTS HERE:&lt;br /&gt;
 01EF:0AE9  C606B73F01          mov  byte [3FB7],01         ds:[3FB7]=0301&lt;br /&gt;
 01EF:0AEE  E82B00              call 00000B1C ($+2b)&lt;br /&gt;
 01EF:0AF1  32C0                xor  al,al&lt;br /&gt;
 01EF:0AF3  803EA83F01          cmp  byte [3FA8],01         ds:[3FA8]=0001	&amp;lt;-- check if LOS is blocked (1)&lt;br /&gt;
 01EF:0AF8  7401                je   00000AFB ($+1)         (down)&lt;br /&gt;
 01EF:0AFA  C3                  ret&lt;br /&gt;
 01EF:0AFB  B0FE                mov  al,FE&lt;br /&gt;
 01EF:0AFD  C606B73F00          mov  byte [3FB7],00         ds:[3FB7]=0300&lt;br /&gt;
 01EF:0B02  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
 01EF:0B1C  E81F06              call 0000113E ($+61f)&lt;br /&gt;
 01EF:0B1F  A0A83F              mov  al,[3FA8]              ds:[3FA8]=0001&lt;br /&gt;
 01EF:0B22  3401                xor  al,01&lt;br /&gt;
 01EF:0B24  A2B23F              mov  [3FB2],al              ds:[3FB2]=0000&lt;br /&gt;
 01EF:0B27  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Set global variables (shooter and target position/distance):&lt;br /&gt;
 01EF:113E  8B36D43F            mov  si,[3FD4]              ds:[3FD4]=4DC2&lt;br /&gt;
 01EF:1142  8A7C01              mov  bh,[si+01]             ds:[4DC3]=0F0A	&amp;lt;-- Target X &lt;br /&gt;
 01EF:1145  8A5C02              mov  bl,[si+02]             ds:[4DC4]=270F	&amp;lt;-- Target Y&lt;br /&gt;
 01EF:1148  8BCB                mov  cx,bx&lt;br /&gt;
 01EF:114A  8B3E3746            mov  di,[4637]              ds:[4637]=4697&lt;br /&gt;
 01EF:114E  8A7501              mov  dh,[di+01]             ds:[4698]=120A	&amp;lt;-- Hero X &lt;br /&gt;
 01EF:1151  8A5502              mov  dl,[di+02]             ds:[4699]=1212	&amp;lt;-- Hero Y &lt;br /&gt;
 01EF:1154  8836A53F            mov  [3FA5],dh              ds:[3FA5]=0C0C	&amp;lt;-- Hero X saved at 3FA5&lt;br /&gt;
 01EF:1158  8816A63F            mov  [3FA6],dl              ds:[3FA6]=020C	&amp;lt;-- Hero Y saved at 3FA6&lt;br /&gt;
 01EF:115C  C6069F3F00          mov  byte [3F9F],00         ds:[3F9F]=0000	&amp;lt;-- reset projectile temp distance (area used for math)&lt;br /&gt;
 01EF:1161  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0002	&amp;lt;-- reset LOS 0=free, 1=blocked&lt;br /&gt;
 01EF:1166  B7FF                mov  bh,FF&lt;br /&gt;
 01EF:1168  8AC6                mov  al,dh&lt;br /&gt;
 01EF:116A  2AC5                sub  al,ch&lt;br /&gt;
 01EF:116C  7504                jne  00001172 ($+4)         (down)&lt;br /&gt;
 01EF:116E  B700                mov  bh,00					&amp;lt;-- target is on the RIGHT (&amp;gt;)&lt;br /&gt;
 01EF:1170  EB06                jmp  short 00001178 ($+6)   (down)&lt;br /&gt;
 01EF:1172  7304                jnc  00001178 ($+4)         (down)&lt;br /&gt;
 01EF:1174  F6D8                neg  al&lt;br /&gt;
 01EF:1176  B701                mov  bh,01					&amp;lt;-- target is on the LEFT (&amp;lt;)&lt;br /&gt;
 01EF:1178  A2A13F              mov  [3FA1],al              ds:[3FA1]=0301	&amp;lt;-- horizontal distance shooter-target saved at 3FA1&lt;br /&gt;
 01EF:117B  8AE8                mov  ch,al&lt;br /&gt;
 01EF:117D  B3FF                mov  bl,FF&lt;br /&gt;
 01EF:117F  8AC2                mov  al,dl&lt;br /&gt;
 01EF:1181  2AC1                sub  al,cl&lt;br /&gt;
 01EF:1183  7504                jne  00001189 ($+4)         (down)&lt;br /&gt;
 01EF:1185  B300                mov  bl,00					&amp;lt;-- target is UNDER (v)&lt;br /&gt;
 01EF:1187  EB06                jmp  short 0000118F ($+6)   (down)&lt;br /&gt;
 01EF:1189  7304                jnc  0000118F ($+4)         (down)&lt;br /&gt;
 01EF:118B  F6D8                neg  al&lt;br /&gt;
 01EF:118D  B301                mov  bl,01					&amp;lt;-- target is ABOVE (^)&lt;br /&gt;
 01EF:118F  A2A23F              mov  [3FA2],al              ds:[3FA2]=0003	&amp;lt;-- vertical distance shooter-target saved at 3FA2&lt;br /&gt;
 01EF:1192  3AC5                cmp  al,ch&lt;br /&gt;
 01EF:1194  7240                jc   000011D6 ($+40)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
bx (bh+bl) registry status based on target/shooter position:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| 0101 || 0001 || FF01&lt;br /&gt;
|-&lt;br /&gt;
| 0100 || TRGT || FF00&lt;br /&gt;
|-&lt;br /&gt;
| 01FF || 00FF || FFFF&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
VERTICAL shooting routine:&lt;br /&gt;
 01EF:1196  8ACD                mov  cl,ch&lt;br /&gt;
 01EF:1198  8AE8                mov  ch,al&lt;br /&gt;
 01EF:119A  8AD0                mov  dl,al&lt;br /&gt;
 01EF:119C  000E9F3F            add  [3F9F],cl              ds:[3F9F]=0000	&amp;lt;-- update projectile travelled distance&lt;br /&gt;
 01EF:11A0  38169F3F            cmp  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11A4  7208                jc   000011AE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11A6  28169F3F            sub  [3F9F],dl              ds:[3F9F]=0000&lt;br /&gt;
 01EF:11AA  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F0D	&amp;lt;-- Temp Projectile X (d 0:F655)&lt;br /&gt;
 01EF:11AE  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y (d 0:F656)&lt;br /&gt;
 01EF:11B2  C706E9370000        mov  word [37E9],0000       ds:[37E9]=D238	&amp;lt;-- set Vertical flag&lt;br /&gt;
 01EF:11B8  882EEB37            mov  [37EB],ch              ds:[37EB]=F1E0	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11BC  80FD01              cmp  ch,01&lt;br /&gt;
 01EF:11BF  7505                jne  000011C6 ($+5)         (down)&lt;br /&gt;
 01EF:11C1  80FBFF              cmp  bl,FF&lt;br /&gt;
 01EF:11C4  7403                je   000011C9 ($+3)         (no jmp)&lt;br /&gt;
 01EF:11C6  E84B00              call 00001214 ($+4b)&lt;br /&gt;
 01EF:11C9  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:11CE  7401                je   000011D1 ($+1)         (no jmp)&lt;br /&gt;
 01EF:11D0  C3                  ret&lt;br /&gt;
 01EF:11D1  FECD                dec  ch&lt;br /&gt;
 01EF:11D3  75C7                jne  0000119C ($-39)        (up)&lt;br /&gt;
 01EF:11D5  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
HORIZONTAL shooting routine:&lt;br /&gt;
 01EF:11D6  8AD0                mov  dl,al				&lt;br /&gt;
 01EF:11D8  8ACD                mov  cl,ch		&amp;lt;-- it moves ch in cl&lt;br /&gt;
 01EF:11DA  32ED                xor  ch,ch		&amp;lt;-- and puts to 00 ch because uses loop (thus cx) instead of dec ch of vertical routine&lt;br /&gt;
 01EF:11DC  00169F3F            add  [3F9F],dl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E0  380E9F3F            cmp  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11E4  7208                jc   000011EE ($+8)         (no jmp)&lt;br /&gt;
 01EF:11E6  280E9F3F            sub  [3F9F],cl              ds:[3F9F]=0001&lt;br /&gt;
 01EF:11EA  001EA63F            add  [3FA6],bl              ds:[3FA6]=020F	&amp;lt;-- Temp Projectile Y&lt;br /&gt;
 01EF:11EE  003EA53F            add  [3FA5],bh              ds:[3FA5]=0F03	&amp;lt;-- Temp Projectile X&lt;br /&gt;
 01EF:11F2  C706E9370100        mov  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- set Horizontal flag&lt;br /&gt;
 01EF:11F8  880EEB37            mov  [37EB],cl              ds:[37EB]=AA04	&amp;lt;-- distance between projectile and target&lt;br /&gt;
 01EF:11FC  80F901              cmp  cl,01&lt;br /&gt;
 01EF:11FF  7505                jne  00001206 ($+5)         (down)&lt;br /&gt;
 01EF:1201  80FFFF              cmp  bh,FF&lt;br /&gt;
 01EF:1204  7403                je   00001209 ($+3)         (no jmp)&lt;br /&gt;
 01EF:1206  E80B00              call 00001214 ($+b)&lt;br /&gt;
 01EF:1209  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0001	&amp;lt;-- check if LOS is still free (0), if 1 exits&lt;br /&gt;
 01EF:120E  7401                je   00001211 ($+1)         (no jmp)&lt;br /&gt;
 01EF:1210  C3                  ret&lt;br /&gt;
 01EF:1211  E2C9                loop 000011DC ($-37)&lt;br /&gt;
 01EF:1213  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
Collision check routine on current tile IN WALL/DOORS map (ds:566F):&lt;br /&gt;
 01EF:1214  53                  push bx&lt;br /&gt;
 01EF:1215  52                  push dx&lt;br /&gt;
 01EF:1216  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=0839&lt;br /&gt;
 01EF:121A  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=3936&lt;br /&gt;
 01EF:121E  E85D4E              call 0000607E ($+4e5d)&lt;br /&gt;
 01EF:1221  80BF6F5600          cmp  byte [bx+566F],00      ds:[576C]=8128	&amp;lt;-- Check if tile is 00, if true jumps to the Object map check&lt;br /&gt;
 01EF:1226  742A                je   00001252 ($+2a)        (no jmp)			at 0B6B:566F is where WALLS/DOORS map is stored&lt;br /&gt;
 01EF:1228  8A876F56            mov  al,[bx+566F]           ds:[576C]=8128	&amp;lt;-- mov into al the current TILE (28=is north secret door)&lt;br /&gt;
 01EF:122C  833EE93701          cmp  word [37E9],0001       ds:[37E9]=0001	&amp;lt;-- 1=H, 0=V check for opened door subroutines&lt;br /&gt;
 01EF:1231  7411                je   00001244 ($+11)        (no jmp)&lt;br /&gt;
 &lt;br /&gt;
Vertical shoot subroutine that checks for Horizontal walls/doors:&lt;br /&gt;
 01EF:1233  24AC                and  al,AC 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1235  0AC0                or   al,al					AC= 10101100&lt;br /&gt;
 01EF:1237  7419                je   00001252 ($+19)        (no jmp)&lt;br /&gt;
 01EF:1239  A820                test al,20					&amp;lt;-- if door is Horizontal&lt;br /&gt;
 01EF:123B  7442                je   0000127F ($+42)        (down)&lt;br /&gt;
 01EF:123D  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:123F  743E                je   0000127F ($+3e)        (down)&lt;br /&gt;
 01EF:1241  EB0F                jmp  short 00001252 ($+f)   (down)&lt;br /&gt;
 01EF:1243  90                  nop&lt;br /&gt;
 &lt;br /&gt;
Horizontal shoot subroutine that checks for Vertical walls/doors:&lt;br /&gt;
 01EF:1244  245C                and  al,5C 					&amp;lt;-- binary AND check if Horizontal walls/doors are present (block LOS)&lt;br /&gt;
 01EF:1246  0AC0                or   al,al					5C= 01011100&lt;br /&gt;
 01EF:1248  7408                je   00001252 ($+8)         (down)&lt;br /&gt;
 01EF:124A  A810                test al,10					&amp;lt;-- if door is Vertical&lt;br /&gt;
 01EF:124C  7431                je   0000127F ($+31)        (down)&lt;br /&gt;
 01EF:124E  A804                test al,04					&amp;lt;-- if door is opened&lt;br /&gt;
 01EF:1250  742D                je   0000127F ($+2d)        (down)&lt;br /&gt;
&lt;br /&gt;
Collision check routine on current tile IN OBJECTS map (ds:586F):&lt;br /&gt;
 01EF:1252  803EEB3701          cmp  byte [37EB],01         ds:[37EB]=6E03	&amp;lt;-- checks if the projectile is about to hit the target&lt;br /&gt;
 01EF:1257  742B                je   00001284 ($+2b)        (down)&lt;br /&gt;
 01EF:1259  80BF6F5800          cmp  byte [bx+586F],00      ds:[1576F]=3637	&amp;lt;-- checks if the tile is passable (00)&lt;br /&gt;
 01EF:125E  740E                je   0000126E ($+e)         (down)&lt;br /&gt;
 01EF:1260  8A876F58            mov  al,[bx+586F]           ds:[1576F]=3637	&amp;lt;-- ds:586F is where OBJECTS map is stored&lt;br /&gt;
 01EF:1264  BB4649              mov  bx,4946					&amp;lt;-- ds:4946 check &lt;br /&gt;
 01EF:1267  D7                  xlat&lt;br /&gt;
 01EF:1268  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:126B  EB17                jmp  short 00001284 ($+17)  (down)&lt;br /&gt;
 01EF:126D  90                  nop&lt;br /&gt;
 01EF:126E  8A36A63F            mov  dh,[3FA6]              ds:[3FA6]=004D&lt;br /&gt;
 01EF:1272  8A16A53F            mov  dl,[3FA5]              ds:[3FA5]=4D4D&lt;br /&gt;
 01EF:1276  E80E00              call 00001287 ($+e)&lt;br /&gt;
 01EF:1279  A2A83F              mov  [3FA8],al              ds:[3FA8]=0000&lt;br /&gt;
 01EF:127C  EB06                jmp  short 00001284 ($+6)   (down)&lt;br /&gt;
 01EF:127E  90                  nop&lt;br /&gt;
 01EF:127F  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=BA6B	&amp;lt;-- sets LOS as blocked (1) and exits&lt;br /&gt;
 01EF:1284  5A                  pop  dx&lt;br /&gt;
 01EF:1285  5B                  pop  bx&lt;br /&gt;
 01EF:1286  C3                  ret&lt;br /&gt;
&lt;br /&gt;
Updates with random numbers the first three bytes of heroes&#039; equipment every movement (presumably used as seed for RNG):&lt;br /&gt;
 01EF:1287  51                  push cx&lt;br /&gt;
 01EF:1288  57                  push di&lt;br /&gt;
 01EF:1289  B90500              mov  cx,0005&lt;br /&gt;
 01EF:128C  BF6346              mov  di,4663	&amp;lt;-- first byte of Barbarian equipment in memory&lt;br /&gt;
 01EF:128F  33C0                xor  ax,ax&lt;br /&gt;
 01EF:1291  803D00              cmp  byte [di],00           ds:[6CAA]=0000&lt;br /&gt;
 01EF:1294  740C                je   000012A2 ($+c)         (down)&lt;br /&gt;
 01EF:1296  385501              cmp  [di+01],dl             ds:[6CAB]=0000&lt;br /&gt;
 01EF:1299  7507                jne  000012A2 ($+7)         (no jmp)&lt;br /&gt;
 01EF:129B  387502              cmp  [di+02],dh             ds:[6CAC]=0000&lt;br /&gt;
 01EF:129E  7502                jne  000012A2 ($+2)         (no jmp)&lt;br /&gt;
 01EF:12A0  B001                mov  al,01&lt;br /&gt;
 01EF:12A2  83C71A              add  di,001A	&amp;lt;-- jumps to the following hero&#039;s equipment&lt;br /&gt;
 01EF:12A5  E2EA                loop 00001291 ($-16)&lt;br /&gt;
 01EF:12A7  5F                  pop  di&lt;br /&gt;
 01EF:12A8  59                  pop  cx&lt;br /&gt;
 01EF:12A9  C3                  ret&lt;br /&gt;
&lt;br /&gt;
TBD &lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh&lt;br /&gt;
 01EF:6080  B700                mov  bh,00&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5					&amp;lt;-- ds:5AC5 check &lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[FF00]=3737&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New shooting routine ===&lt;br /&gt;
Finally I came up with a proper line of sight mechanism that cover roughly 99% of the &amp;quot;impossible shots&amp;quot;. There will always be a particular combiantion of monster-door-hero position that can lead to an &amp;quot;improbable shot&amp;quot;, but that&#039;s it.  &lt;br /&gt;
&lt;br /&gt;
Direction choice routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1198:  88 D0             mov  al, dl&lt;br /&gt;
 1ef:119a:  88 CC             mov  ah, cl&lt;br /&gt;
 1ef:119c:  05 01 01          add  ax, 0x101&lt;br /&gt;
 1ef:119f:  D0 E8             shr  al, 1&lt;br /&gt;
 1ef:11a1:  D0 EC             shr  ah, 1&lt;br /&gt;
 1ef:11a3:  A3 AA 3F          mov  word ptr [0x3faa], ax        &amp;lt;-- save half distance of X and Y&lt;br /&gt;
 &lt;br /&gt;
 1ef:11a6:  30 C0             xor  al, al                    &amp;lt;-- direction choice routine&lt;br /&gt;
 1ef:11a8:  3A 0E AB 3F       cmp  cl, byte ptr [0x3fab]        &amp;lt;-- check if X distance reached it&#039;s half&lt;br /&gt;
 1ef:11ac:  74 13             je   0x11c1                    &amp;lt;-- if YES reset X half value and change direction&lt;br /&gt;
 1ef:11ae:  3A 16 AA 3F       cmp  dl, byte ptr [0x3faa]        &amp;lt;-- check if Y distance reached it&#039;s half&lt;br /&gt;
 1ef:11b2:  74 06             je   0x11ba                    &amp;lt;-- if YES reset Y half value and change direction&lt;br /&gt;
 1ef:11b4:  38 CA             cmp  dl, cl&lt;br /&gt;
 1ef:11b6:  7C 2B             jl   0x11e3&lt;br /&gt;
 1ef:11b8:  EB 0C             jmp  0x11c6&lt;br /&gt;
 1ef:11ba:  C6 06 AA 3F 00    mov  byte ptr [0x3faa], 0&lt;br /&gt;
 1ef:11bf:  EB 22             jmp  0x11e3&lt;br /&gt;
 1ef:11c1:  C6 06 AB 3F 00    mov  byte ptr [0x3fab], 0&lt;br /&gt;
&lt;br /&gt;
Vertical&lt;br /&gt;
 1ef:11c6:  84 D2             test dl, dl                    &amp;lt;-- vertical routine&lt;br /&gt;
 1ef:11c8:  74 19             je   0x11e3                    &amp;lt;-- if Y distance is zero go to horizontal routine&lt;br /&gt;
 1ef:11ca:  00 1E A6 3F       add  byte ptr [0x3fa6], bl&lt;br /&gt;
 1ef:11ce:  B8 00 00          mov  ax, 0&lt;br /&gt;
 1ef:11d1:  80 FB FF          cmp  bl, 0xff&lt;br /&gt;
 1ef:11d4:  75 02             jne  0x11d8&lt;br /&gt;
 1ef:11d6:  B4 1A             mov  ah, 0x1a&lt;br /&gt;
 1ef:11d8:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11db:  FE CA             dec  dl&lt;br /&gt;
 1ef:11dd:  88 16 EB 37       mov  byte ptr [0x37eb], dl&lt;br /&gt;
 1ef:11e1:  EB 1B             jmp  0x11fe&lt;br /&gt;
 &lt;br /&gt;
Horizontal&lt;br /&gt;
 1ef:11e3:  84 C9             test cl, cl                    &amp;lt;-- horizontal routine&lt;br /&gt;
 1ef:11e5:  74 DF             je   0x11c6                    &amp;lt;-- if X distance is zero go to vertical routine&lt;br /&gt;
 1ef:11e7:  00 3E A5 3F       add  byte ptr [0x3fa5], bh&lt;br /&gt;
 1ef:11eb:  B8 01 00          mov  ax, 1&lt;br /&gt;
 1ef:11ee:  80 FF FF          cmp  bh, 0xff&lt;br /&gt;
 1ef:11f1:  75 02             jne  0x11f5&lt;br /&gt;
 1ef:11f3:  B4 01             mov  ah, 1&lt;br /&gt;
 1ef:11f5:  A3 E9 37          mov  word ptr [0x37e9], ax&lt;br /&gt;
 1ef:11f8:  FE C9             dec  cl&lt;br /&gt;
 1ef:11fa:  88 0E EB 37       mov  byte ptr [0x37eb], cl&lt;br /&gt;
 &lt;br /&gt;
 1ef:11fe:  E8 13 00          call 0x1214                    &amp;lt;-- calls wall/object collision check routine&lt;br /&gt;
 1ef:1201:  80 3E A8 3F 00    cmp  byte ptr [0x3fa8], 0      &amp;lt;-- collision flag&lt;br /&gt;
 1ef:1206:  74 01             je   0x1209   &lt;br /&gt;
 1ef:1208:  C3                ret                            &amp;lt;-- else object or wall was HIT&lt;br /&gt;
 1ef:1209:  88 C8             mov  al, cl&lt;br /&gt;
 1ef:120b:  00 D0             add  al, dl                    &amp;lt;-- if X+Y distance is not zero&lt;br /&gt;
 1ef:120d:  75 97             jne  0x11a6                    &amp;lt;-- back to direction choice routine&lt;br /&gt;
 1ef:120f:  C3                ret                            &amp;lt;-- else target was HIT&lt;br /&gt;
 1ef:1210:  90                nop  &lt;br /&gt;
 1ef:1211:  90                nop  &lt;br /&gt;
 1ef:1212:  90                nop  &lt;br /&gt;
 1ef:1213:  90                nop&lt;br /&gt;
 &lt;br /&gt;
Wall/object collision check routine&lt;br /&gt;
&lt;br /&gt;
 1ef:1214:  53                push bx&lt;br /&gt;
 1ef:1215:  52                push dx&lt;br /&gt;
 1ef:1216:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]&lt;br /&gt;
 1ef:121a:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:121e:  E8 5D 4E          call 0x607e&lt;br /&gt;
 1ef:1221:  A0 EA 37          mov  al, byte ptr [0x37ea]&lt;br /&gt;
 1ef:1224:  30 E4             xor  ah, ah&lt;br /&gt;
 1ef:1226:  01 C3             add  bx, ax&lt;br /&gt;
 1ef:1228:  8A 87 6F 56       mov  al, byte ptr [bx + 0x566f]    &amp;lt;-- checks if the tile is free (00) or occupied (30=rock)&lt;br /&gt;
 1ef:122c:  3C 00             cmp  al, 0&lt;br /&gt;
 1ef:122e:  74 21             je   0x1251                        &amp;lt;-- if occupied jump to specific object check&lt;br /&gt;
 1ef:1230:  80 3E E9 37 01    cmp  byte ptr [0x37e9], 1&lt;br /&gt;
 1ef:1235:  74 0C             je   0x1243&lt;br /&gt;
 1ef:1237:  A8 20             test al, 0x20                        &amp;lt;-- Horizontal Door check&lt;br /&gt;
 1ef:1239:  75 12             jne  0x124d&lt;br /&gt;
 1ef:123b:  A8 80             test al, 0x80                        &amp;lt;-- Horizontal Wall check&lt;br /&gt;
 1ef:123d:  74 12             je   0x1251&lt;br /&gt;
 1ef:123f:  EB 3E             jmp  0x127f&lt;br /&gt;
 1ef:1241:  90                nop  &lt;br /&gt;
 1ef:1242:  90                nop  &lt;br /&gt;
 &lt;br /&gt;
 1ef:1243:  A8 10             test al, 0x10                        &amp;lt;-- Vertical Door check&lt;br /&gt;
 1ef:1245:  75 06             jne  0x124d&lt;br /&gt;
 1ef:1247:  A8 40             test al, 0x40                        &amp;lt;-- Vertical Wall check&lt;br /&gt;
 1ef:1249:  74 06             je   0x1251&lt;br /&gt;
 1ef:124b:  EB 32             jmp  0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:124d:  A8 04             test al, 4                            &amp;lt;-- opened door check&lt;br /&gt;
 1ef:124f:  74 2E             je   0x127f&lt;br /&gt;
 &lt;br /&gt;
 1ef:1251:  8A 87 6F 58       mov  al, byte ptr [bx + 0x586f]    &amp;lt;-- specific object check&lt;br /&gt;
 1ef:1255:  BB 86 49          mov  bx, 0x4986                    &amp;lt;-- bitmask table where object properties are stored&lt;br /&gt;
 1ef:1258:  51                push cx&lt;br /&gt;
 1ef:1259:  88 C1             mov  cl, al&lt;br /&gt;
 1ef:125b:  C0 E9 03          shr  cl, 3&lt;br /&gt;
 1ef:125e:  01 CB             add  bx, cx&lt;br /&gt;
 1ef:1260:  59                pop  cx&lt;br /&gt;
 1ef:1261:  24 07             and  al, 7&lt;br /&gt;
 1ef:1263:  0F A3 07          bt   word ptr [bx], ax                &amp;lt;-- verify if the object is passable (ie. table) or not (ie. fireplace)&lt;br /&gt;
 1ef:1266:  72 17             jb   0x127f&lt;br /&gt;
 1ef:1268:  80 3E EB 37 00    cmp  byte ptr [0x37eb], 0            &amp;lt;-- checks if the projectile hit the target&lt;br /&gt;
 1ef:126d:  74 15             je   0x1284&lt;br /&gt;
 1ef:126f:  8A 36 A6 3F       mov  dh, byte ptr [0x3fa6]            &amp;lt;-- update projectile&#039;s X and Y&lt;br /&gt;
 1ef:1273:  8A 16 A5 3F       mov  dl, byte ptr [0x3fa5]&lt;br /&gt;
 1ef:1277:  E8 0D 00          call 0x1287&lt;br /&gt;
 1ef:127a:  A2 A8 3F          mov  byte ptr [0x3fa8], al&lt;br /&gt;
 1ef:127d:  EB 05             jmp  0x1284&lt;br /&gt;
 1ef:127f:  C6 06 A8 3F 01    mov  byte ptr [0x3fa8], 1&lt;br /&gt;
 1ef:1284:  5A                pop  dx&lt;br /&gt;
 1ef:1285:  5B                pop  bx&lt;br /&gt;
 1ef:1286:  C3                ret&lt;br /&gt;
&lt;br /&gt;
== Monster attack routine ==&lt;br /&gt;
This first block defines the target priority: barbarian - dwarf - elf - wizard - ragnar&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to revers it forcing the monster to chose the weaker hero first reversing the logic by starting from ragnar profile and then jump backward subtracting 1A.&amp;lt;br&amp;gt;&lt;br /&gt;
See [[#Heroes&#039; default profiles|Heroes&#039; default profiles]] for reference.&lt;br /&gt;
&lt;br /&gt;
 01EF:2257  BE6346              mov  si,4663					&amp;lt;-- starting profile offset 4663=barbarian&lt;br /&gt;
 01EF:225A  B90500              mov  cx,0005					&amp;lt;-- loop repeats 5 times &lt;br /&gt;
 01EF:225D  51                  push cx&lt;br /&gt;
 01EF:225E  8936D63F            mov  [3FD6],si              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2262  8A4419              mov  al,[si+19]             ds:[46CA]=0003	&amp;lt;-- jumps to hero&#039;s ID position&lt;br /&gt;
 01EF:2265  A2BC3F              mov  [3FBC],al              ds:[3FBC]=0003&lt;br /&gt;
 01EF:2268  E85800              call 000022C3 ($+58)&lt;br /&gt;
 01EF:226B  59                  pop  cx&lt;br /&gt;
 01EF:226C  8B36D63F            mov  si,[3FD6]              ds:[3FD6]=46B1&lt;br /&gt;
 01EF:2270  83C61A              add  si,001A					&amp;lt;-- jumps to the next profile&lt;br /&gt;
 01EF:2273  803EA83F00          cmp  byte [3FA8],00         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2278  7503                jne  0000227D ($+3)         (down)&lt;br /&gt;
 01EF:227A  E95102              jmp  000024CE ($+251)       (down)&lt;br /&gt;
 01EF:227D  803EA83F03          cmp  byte [3FA8],03         ds:[3FA8]=0102&lt;br /&gt;
 01EF:2282  7503                jne  00002287 ($+3)         (down)&lt;br /&gt;
 01EF:2284  E94702              jmp  000024CE ($+247)       (down)&lt;br /&gt;
 01EF:2287  E2D4                loop 0000225D ($-2c)&lt;br /&gt;
 01EF:2289  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 01EF:22C3  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000&lt;br /&gt;
 01EF:22C8  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:22CB  7503                jne  000022D0 ($+3)         (no jmp)&lt;br /&gt;
 01EF:22CD  E98101              jmp  00002451 ($+181)       (down)&lt;br /&gt;
 01EF:22D0  8A4403              mov  al,[si+03]             ds:[4666]=C726	&amp;lt;-- hero&#039;s room&lt;br /&gt;
 01EF:22D3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room&lt;br /&gt;
 01EF:22D6  7403                je   000022DB ($+3)         (down)&lt;br /&gt;
 01EF:22D8  E97601              jmp  00002451 ($+176)       (down)&lt;br /&gt;
 01EF:22DB  F6441801            test byte [si+18],01        ds:[467B]=0000&lt;br /&gt;
 01EF:22DF  7403                je   000022E4 ($+3)         (down)&lt;br /&gt;
 01EF:22E1  E96D01              jmp  00002451 ($+16d)       (down)&lt;br /&gt;
 01EF:22E4  8B5401              mov  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:22E7  52                  push dx&lt;br /&gt;
 01EF:22E8  57                  push di&lt;br /&gt;
 01EF:22E9  E864F7              call 00001A50 ($-89c)&lt;br /&gt;
 01EF:22EC  5F                  pop  di&lt;br /&gt;
 01EF:22ED  57                  push di&lt;br /&gt;
 01EF:22EE  E84E02              call 0000253F ($+24e)&lt;br /&gt;
 01EF:22F1  E8F03D              call 000060E4 ($+3df0)&lt;br /&gt;
 01EF:22F4  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:22F7  E88D23              call 00004687 ($+238d)&lt;br /&gt;
 01EF:22FA  5F                  pop  di&lt;br /&gt;
 01EF:22FB  5A                  pop  dx&lt;br /&gt;
 01EF:22FC  8816A53F            mov  [3FA5],dl              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2300  8836A63F            mov  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2304  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:2307  891ECA40            mov  [40CA],bx              ds:[40CA]=40A2&lt;br /&gt;
 01EF:230B  E8703D              call 0000607E ($+3d70)			&amp;lt;-- 	if jumped the monster doesn&#039;t attack when in contact&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:230E  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2312  8A07                mov  al,[bx]                ds:[3F28]=4040		&lt;br /&gt;
 01EF:2314  243F                and  al,3F				&lt;br /&gt;
 01EF:2316  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26	&amp;lt;-- monster&#039;s room check. if removed the monster attack through walls and doors&lt;br /&gt;
 01EF:2319  7403                je   0000231E ($+3)         (down)&lt;br /&gt;
 01EF:231B  E93301              jmp  00002451 ($+133)       (down)&lt;br /&gt;
 01EF:231E  B501                mov  ch,01&lt;br /&gt;
 01EF:2320  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:2323  2A4501              sub  al,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2326  7504                jne  0000232C ($+4)         (no jmp)&lt;br /&gt;
 01EF:2328  B500                mov  ch,00&lt;br /&gt;
 01EF:232A  EB08                jmp  short 00002334 ($+8)   (down)&lt;br /&gt;
 01EF:232C  3C80                cmp  al,80&lt;br /&gt;
 01EF:232E  7204                jc   00002334 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2330  F6D8                neg  al&lt;br /&gt;
 01EF:2332  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2334  A2A13F              mov  [3FA1],al              ds:[3FA1]=0100&lt;br /&gt;
 01EF:2337  882EA33F            mov  [3FA3],ch              ds:[3FA3]=0100&lt;br /&gt;
 01EF:233B  B501                mov  ch,01&lt;br /&gt;
 01EF:233D  A0A63F              mov  al,[3FA6]              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2340  2A4502              sub  al,[di+02]             ds:[4DBA]=260F&lt;br /&gt;
 01EF:2343  7504                jne  00002349 ($+4)         (no jmp)&lt;br /&gt;
 01EF:2345  B500                mov  ch,00&lt;br /&gt;
 01EF:2347  EB08                jmp  short 00002351 ($+8)   (down)&lt;br /&gt;
 01EF:2349  3C80                cmp  al,80&lt;br /&gt;
 01EF:234B  7204                jc   00002351 ($+4)         (no jmp)&lt;br /&gt;
 01EF:234D  F6D8                neg  al&lt;br /&gt;
 01EF:234F  B5FF                mov  ch,FF&lt;br /&gt;
 01EF:2351  A2A23F              mov  [3FA2],al              ds:[3FA2]=0001&lt;br /&gt;
 01EF:2354  882EA43F            mov  [3FA4],ch              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2358  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:235B  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006&lt;br /&gt;
 01EF:235F  C606A93F00          mov  byte [3FA9],00         ds:[3FA9]=0000&lt;br /&gt;
 01EF:2364  8A5D09              mov  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:2367  02DB                add  bl,bl&lt;br /&gt;
 01EF:2369  02DB                add  bl,bl&lt;br /&gt;
 01EF:236B  025D09              add  bl,[di+09]             ds:[4DC1]=8100&lt;br /&gt;
 01EF:236E  32FF                xor  bh,bh&lt;br /&gt;
 01EF:2370  8A870648            mov  al,[bx+4806]           [illegal]&lt;br /&gt;
 01EF:2374  A29C3F              mov  [3F9C],al              ds:[3F9C]=0003&lt;br /&gt;
 01EF:2377  8A0EA23F            mov  cl,[3FA2]              ds:[3FA2]=0001&lt;br /&gt;
 01EF:237B  A0A13F              mov  al,[3FA1]              ds:[3FA1]=0100&lt;br /&gt;
 01EF:237E  3AC1                cmp  al,cl&lt;br /&gt;
 01EF:2380  7203                jc   00002385 ($+3)         (no jmp)&lt;br /&gt;
 01EF:2382  EB6A                jmp  short 000023EE ($+6a)  (down)&lt;br /&gt;
 01EF:2384  90                  nop&lt;br /&gt;
 01EF:2385  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2389  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:238D  7425                je   000023B4 ($+25)        (down)&lt;br /&gt;
 01EF:238F  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2392  0AC0                or   al,al&lt;br /&gt;
 01EF:2394  741E                je   000023B4 ($+1e)        (down)&lt;br /&gt;
 01EF:2396  02F0                add  dh,al&lt;br /&gt;
 01EF:2398  E8DD00              call 00002478 ($+dd)&lt;br /&gt;
 01EF:239B  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:239D  7503                jne  000023A2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:239F  E9B500              jmp  00002457 ($+b5)        (down)&lt;br /&gt;
 01EF:23A2  0AC0                or   al,al&lt;br /&gt;
 01EF:23A4  750E                jne  000023B4 ($+e)         (no jmp)&lt;br /&gt;
 01EF:23A6  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:23AA  E8B000              call 0000245D ($+b0)&lt;br /&gt;
 01EF:23AD  7303                jnc  000023B2 ($+3)         (down)&lt;br /&gt;
 01EF:23AF  E99900              jmp  0000244B ($+99)        (down)&lt;br /&gt;
 01EF:23B2  EBD1                jmp  short 00002385 ($-2f)  (up)&lt;br /&gt;
 01EF:23B4  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23B8  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23BB  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23BD  7503                jne  000023C2 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23BF  E98F00              jmp  00002451 ($+8f)        (down)&lt;br /&gt;
 01EF:23C2  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23C5  0AC0                or   al,al&lt;br /&gt;
 01EF:23C7  7503                jne  000023CC ($+3)         (no jmp)&lt;br /&gt;
 01EF:23C9  E98500              jmp  00002451 ($+85)        (down)&lt;br /&gt;
 01EF:23CC  02D0                add  dl,al&lt;br /&gt;
 01EF:23CE  E8A700              call 00002478 ($+a7)&lt;br /&gt;
 01EF:23D1  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:23D3  7503                jne  000023D8 ($+3)         (no jmp)&lt;br /&gt;
 01EF:23D5  E97F00              jmp  00002457 ($+7f)        (down)&lt;br /&gt;
 01EF:23D8  0AC0                or   al,al&lt;br /&gt;
 01EF:23DA  7403                je   000023DF ($+3)         (down)&lt;br /&gt;
 01EF:23DC  EB73                jmp  short 00002451 ($+73)  (down)&lt;br /&gt;
 01EF:23DE  90                  nop&lt;br /&gt;
 01EF:23DF  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23E2  32E4                xor  ah,ah&lt;br /&gt;
 01EF:23E4  E87600              call 0000245D ($+76)&lt;br /&gt;
 01EF:23E7  7303                jnc  000023EC ($+3)         (down)&lt;br /&gt;
 01EF:23E9  EB60                jmp  short 0000244B ($+60)  (down)&lt;br /&gt;
 01EF:23EB  90                  nop&lt;br /&gt;
 01EF:23EC  EB97                jmp  short 00002385 ($-69)  (up)&lt;br /&gt;
 01EF:23EE  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:23F2  A0A53F              mov  al,[3FA5]              ds:[3FA5]=1106&lt;br /&gt;
 01EF:23F5  3AC2                cmp  al,dl&lt;br /&gt;
 01EF:23F7  7426                je   0000241F ($+26)        (down)&lt;br /&gt;
 01EF:23F9  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:23FC  0AC0                or   al,al&lt;br /&gt;
 01EF:23FE  741F                je   0000241F ($+1f)        (down)&lt;br /&gt;
 01EF:2400  02D0                add  dl,al&lt;br /&gt;
 01EF:2402  E87300              call 00002478 ($+73)&lt;br /&gt;
 01EF:2405  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2407  7503                jne  0000240C ($+3)         (no jmp)&lt;br /&gt;
 01EF:2409  EB4C                jmp  short 00002457 ($+4c)  (down)&lt;br /&gt;
 01EF:240B  90                  nop&lt;br /&gt;
 01EF:240C  0AC0                or   al,al&lt;br /&gt;
 01EF:240E  750F                jne  0000241F ($+f)         (no jmp)&lt;br /&gt;
 01EF:2410  A0A33F              mov  al,[3FA3]              ds:[3FA3]=0100&lt;br /&gt;
 01EF:2413  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2415  E84500              call 0000245D ($+45)&lt;br /&gt;
 01EF:2418  7303                jnc  0000241D ($+3)         (down)&lt;br /&gt;
 01EF:241A  EB2F                jmp  short 0000244B ($+2f)  (down)&lt;br /&gt;
 01EF:241C  90                  nop&lt;br /&gt;
 01EF:241D  EBCF                jmp  short 000023EE ($-31)  (up)&lt;br /&gt;
 01EF:241F  8B169F3F            mov  dx,[3F9F]              ds:[3F9F]=1006&lt;br /&gt;
 01EF:2423  3836A63F            cmp  [3FA6],dh              ds:[3FA6]=0411&lt;br /&gt;
 01EF:2427  7428                je   00002451 ($+28)        (down)&lt;br /&gt;
 01EF:2429  A0A43F              mov  al,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:242C  0AC0                or   al,al&lt;br /&gt;
 01EF:242E  7421                je   00002451 ($+21)        (down)&lt;br /&gt;
 01EF:2430  02F0                add  dh,al&lt;br /&gt;
 01EF:2432  E84300              call 00002478 ($+43)&lt;br /&gt;
 01EF:2435  3CFF                cmp  al,FF&lt;br /&gt;
 01EF:2437  741E                je   00002457 ($+1e)        (down)&lt;br /&gt;
 01EF:2439  0AC0                or   al,al&lt;br /&gt;
 01EF:243B  7514                jne  00002451 ($+14)        (no jmp)&lt;br /&gt;
 01EF:243D  8A26A43F            mov  ah,[3FA4]              ds:[3FA4]=0601&lt;br /&gt;
 01EF:2441  E81900              call 0000245D ($+19)&lt;br /&gt;
 01EF:2444  7303                jnc  00002449 ($+3)         (down)&lt;br /&gt;
 01EF:2446  EB03                jmp  short 0000244B ($+3)   (down)&lt;br /&gt;
 01EF:2448  90                  nop&lt;br /&gt;
 01EF:2449  EBA3                jmp  short 000023EE ($-5d)  (up)&lt;br /&gt;
 01EF:244B  C606A83F01          mov  byte [3FA8],01         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2450  C3                  ret&lt;br /&gt;
 01EF:2451  C606A83F02          mov  byte [3FA8],02         ds:[3FA8]=0000	&amp;lt;-- hero is not reachable&lt;br /&gt;
 01EF:2456  C3                  ret&lt;br /&gt;
 01EF:2457  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=0000	&amp;lt;-- hero is reachable&lt;br /&gt;
 01EF:245C  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:245D  89169F3F            mov  [3F9F],dx              ds:[3F9F]=1006	&amp;lt;-- called only when the monster needs to move&lt;br /&gt;
 01EF:2461  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:2465  8807                mov  [bx],al                ds:[3F28]=6148&lt;br /&gt;
 01EF:2467  886701              mov  [bx+01],ah             ds:[3F29]=0061&lt;br /&gt;
 01EF:246A  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:246F  FE06A93F            inc  byte [3FA9]            ds:[3FA9]=0000&lt;br /&gt;
 01EF:2473  FE0E9C3F            dec  byte [3F9C]            ds:[3F9C]=0003&lt;br /&gt;
 01EF:2477  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:2478  A0BC3F              mov  al,[3FBC]              ds:[3FBC]=0000&lt;br /&gt;
 01EF:247B  E80139              call 00005D7F ($+3901)&lt;br /&gt;
 01EF:247E  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:2481  7408                je   0000248B ($+8)         (down)&lt;br /&gt;
 01EF:2483  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:2486  7503                jne  0000248B ($+3)         (no jmp)&lt;br /&gt;
 01EF:2488  B0FF                mov  al,FF&lt;br /&gt;
 01EF:248A  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:248B  B500                mov  ch,00&lt;br /&gt;
 01EF:248D  382EBC3F            cmp  [3FBC],ch              ds:[3FBC]=0000&lt;br /&gt;
 01EF:2491  7412                je   000024A5 ($+12)        (down)&lt;br /&gt;
 01EF:2493  8AC5                mov  al,ch&lt;br /&gt;
 01EF:2495  E8E738              call 00005D7F ($+38e7)&lt;br /&gt;
 01EF:2498  803C00              cmp  byte [si],00           ds:[4663]=06FF&lt;br /&gt;
 01EF:249B  7408                je   000024A5 ($+8)         (down)&lt;br /&gt;
 01EF:249D  3B5401              cmp  dx,[si+01]             ds:[4664]=0D06&lt;br /&gt;
 01EF:24A0  7503                jne  000024A5 ($+3)         (no jmp)&lt;br /&gt;
 01EF:24A2  B001                mov  al,01&lt;br /&gt;
 01EF:24A4  C3                  ret&lt;br /&gt;
 01EF:24A5  FEC5                inc  ch&lt;br /&gt;
 01EF:24A7  80FD04              cmp  ch,04&lt;br /&gt;
 01EF:24AA  75E1                jne  0000248D ($-1f)        (no jmp)&lt;br /&gt;
 01EF:24AC  52                  push dx&lt;br /&gt;
 01EF:24AD  E8CE3B              call 0000607E ($+3bce)&lt;br /&gt;
 01EF:24B0  5A                  pop  dx&lt;br /&gt;
 01EF:24B1  81C36F58            add  bx,586F&lt;br /&gt;
 01EF:24B5  803F00              cmp  byte [bx],00           ds:[3F28]=6148&lt;br /&gt;
 01EF:24B8  7403                je   000024BD ($+3)         (down)&lt;br /&gt;
 01EF:24BA  B002                mov  al,02&lt;br /&gt;
 01EF:24BC  C3                  ret&lt;br /&gt;
 01EF:24BD  8A8700FC            mov  al,[bx-0400]           ds:[3B28]=E04B&lt;br /&gt;
 01EF:24C1  243F                and  al,3F&lt;br /&gt;
 01EF:24C3  3A4503              cmp  al,[di+03]             ds:[4DBB]=FB26 	&amp;lt;-- monster&#039;s room check.&lt;br /&gt;
 01EF:24C6  7503                jne  000024CB ($+3)         (no jmp)	&lt;br /&gt;
 01EF:24C8  32C0                xor  al,al&lt;br /&gt;
 01EF:24CA  C3                  ret&lt;br /&gt;
 01EF:24CB  B003                mov  al,03&lt;br /&gt;
 01EF:24CD  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:24CE  893ED43F            mov  [3FD4],di              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24D2  8A0EA93F            mov  cl,[3FA9]              ds:[3FA9]=0001&lt;br /&gt;
 01EF:24D6  0AC9                or   cl,cl&lt;br /&gt;
 01EF:24D8  7455                je   0000252F ($+55)        (down)&lt;br /&gt;
 01EF:24DA  32ED                xor  ch,ch&lt;br /&gt;
 01EF:24DC  BBA240              mov  bx,40A2&lt;br /&gt;
 01EF:24DF  891ECA40            mov  [40CA],bx              ds:[40CA]=40A4&lt;br /&gt;
 01EF:24E3  51                  push cx&lt;br /&gt;
 01EF:24E4  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:24E8  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24EB  E8903B              call 0000607E ($+3b90)&lt;br /&gt;
 01EF:24EE  8A8F6F58            mov  cl,[bx+586F]           ds:[59FB]=0000&lt;br /&gt;
 01EF:24F2  C6876F5800          mov  byte [bx+586F],00      ds:[59FB]=0000&lt;br /&gt;
 01EF:24F7  8B1ECA40            mov  bx,[40CA]              ds:[40CA]=40A2&lt;br /&gt;
 01EF:24FB  8B5501              mov  dx,[di+01]             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:24FE  0217                add  dl,[bx]                ds:[018C]=1149&lt;br /&gt;
 01EF:2500  027701              add  dh,[bx+01]             ds:[018D]=0611&lt;br /&gt;
 01EF:2503  895501              mov  [di+01],dx             ds:[4DB9]=0F06&lt;br /&gt;
 01EF:2506  8306CA4002          add  word [40CA],0002       ds:[40CA]=40A2&lt;br /&gt;
 01EF:250B  E8703B              call 0000607E ($+3b70)&lt;br /&gt;
 01EF:250E  888F6F58            mov  [bx+586F],cl           ds:[AE50]=0A16&lt;br /&gt;
 01EF:2512  81C36F54            add  bx,546F&lt;br /&gt;
 01EF:2516  895D04              mov  [di+04],bx             ds:[4DBC]=55E1&lt;br /&gt;
 01EF:2519  E834F5              call 00001A50 ($-acc)		&lt;br /&gt;
 01EF:251C  8B3ED43F            mov  di,[3FD4]              ds:[3FD4]=4DB8&lt;br /&gt;
 01EF:2520  E81C00              call 0000253F ($+1c)&lt;br /&gt;
 01EF:2523  E8BE3B              call 000060E4 ($+3bbe)&lt;br /&gt;
 01EF:2526  B9F401              mov  cx,01F4&lt;br /&gt;
 01EF:2529  E85B21              call 00004687 ($+215b)						&amp;lt;-- 500.000 nop cycles, to slow down monster&#039;s animation&lt;br /&gt;
 01EF:252C  59                  pop  cx		&lt;br /&gt;
 01EF:252D  E2B4                loop 000024E3 ($-4c)&lt;br /&gt;
 01EF:252F  51                  push cx&lt;br /&gt;
 01EF:2530  B93200              mov  cx,0032&lt;br /&gt;
 01EF:2533  E86A11              call 000036A0 ($+116a)						&amp;lt;-- more nops &lt;br /&gt;
 01EF:2536  E2FB                loop 00002533 ($-5)&lt;br /&gt;
 01EF:2538  59                  pop  cx&lt;br /&gt;
 01EF:2539  E853F8              call 00001D8F ($-7ad)						&amp;lt;-- here the monster attacks whein in contact with the hero&lt;br /&gt;
 01EF:253C  E99131              jmp  000056D0 ($+3191)      (down)&lt;br /&gt;
 01EF:253F  8A4502              mov  al,[di+02]             ds:[EF42]=3736&lt;br /&gt;
 01EF:2542  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2544  BA000A              mov  dx,0A00&lt;br /&gt;
 01EF:2547  F7E2                mul  dx&lt;br /&gt;
 01EF:2549  8BD8                mov  bx,ax&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:4687  51                  push cx&lt;br /&gt;
 01EF:4688  E820EF              call 000035AB ($-10e0)&lt;br /&gt;
 01EF:468B  59                  pop  cx&lt;br /&gt;
 01EF:468C  E2F9                loop 00004687 ($-7)&lt;br /&gt;
 01EF:468E  C3                  ret&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 01EF:607E  8ADE                mov  bl,dh	&lt;br /&gt;
 01EF:6080  B700                mov  bh,00	&lt;br /&gt;
 01EF:6082  03DB                add  bx,bx&lt;br /&gt;
 01EF:6084  81C3C55A            add  bx,5AC5&lt;br /&gt;
 01EF:6088  8B07                mov  ax,[bx]                ds:[0130]=0101&lt;br /&gt;
 01EF:608A  B600                mov  dh,00&lt;br /&gt;
 01EF:608C  03D0                add  dx,ax&lt;br /&gt;
 01EF:608E  8BDA                mov  bx,dx&lt;br /&gt;
 01EF:6090  C3                  ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hero&#039;s pathfinding routine ==&lt;br /&gt;
The pathfinder algorithm the programmer chose was a simple variation of the A*, and is perfectly implemented. You can click on any tiles on the screen even on the invisible ones outside the room. If there is a clean path, the hero will reach that tile.&lt;br /&gt;
&lt;br /&gt;
 01EF:6449  E8E2D4              call 0000392E ($-2b1e)&lt;br /&gt;
 01EF:644C  E85800              call 000064A7 ($+58)&lt;br /&gt;
 01EF:644F  833CFF              cmp  word [si],FFFF         ds:[3911]=0000&lt;br /&gt;
 01EF:6452  7503                jne  00006457 ($+3)         (down)&lt;br /&gt;
 01EF:6454  E95F03              jmp  000067B6 ($+35f)       (down)&lt;br /&gt;
 &lt;br /&gt;
 01EF:67B6  8B16E747            mov  dx,[47E7]              ds:[47E7]=0087&lt;br /&gt;
 01EF:67BA  8B2EE947            mov  bp,[47E9]              ds:[47E9]=0097&lt;br /&gt;
 01EF:67BE  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67C1  BE1941              mov  si,4119&lt;br /&gt;
 01EF:67C4  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67C7  51                  push cx&lt;br /&gt;
 01EF:67C8  8B4402              mov  ax,[si+02]             ds:[491E]=01C0&lt;br /&gt;
 01EF:67CB  051800              add  ax,0018&lt;br /&gt;
 01EF:67CE  2BC2                sub  ax,dx&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (down)&lt;br /&gt;
 01EF:67D0  7302                jnc  000067D4 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67D2  F7D8                neg  ax&lt;br /&gt;
 01EF:67D4  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67D6  8B0C                mov  cx,[si]                ds:[4119]=0044&lt;br /&gt;
 01EF:67D8  83C108              add  cx,0008&lt;br /&gt;
 01EF:67DB  2BCD                sub  cx,bp&lt;br /&gt;
 01EF:67DD  7302                jnc  000067E1 ($+2)         (no jmp)&lt;br /&gt;
 01EF:67DF  F7D9                neg  cx&lt;br /&gt;
 01EF:67E1  03C1                add  ax,cx&lt;br /&gt;
 01EF:67E3  D1E8                shr  ax,1&lt;br /&gt;
 01EF:67E5  8907                mov  [bx],ax                ds:[402D]=0000&lt;br /&gt;
 01EF:67E7  83C302              add  bx,0002&lt;br /&gt;
 01EF:67EA  83C604              add  si,0004&lt;br /&gt;
 01EF:67ED  59                  pop  cx&lt;br /&gt;
 01EF:67EE  E2D7                loop 000067C7 ($-29)&lt;br /&gt;
 01EF:67F0  BB2D40              mov  bx,402D&lt;br /&gt;
 01EF:67F3  B8FFFF              mov  ax,FFFF&lt;br /&gt;
 01EF:67F6  B93400              mov  cx,0034&lt;br /&gt;
 01EF:67F9  3B07                cmp  ax,[bx]                ds:[402D]=0000&lt;br /&gt;
 01EF:67FB  7204                jc   00006801 ($+4)         (down)&lt;br /&gt;
 01EF:67FD  8B07                mov  ax,[bx]                ds:[4095]=0000&lt;br /&gt;
 01EF:67FF  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6801  83C302              add  bx,0002&lt;br /&gt;
 01EF:6804  E2F3                loop 000067F9 ($-d)&lt;br /&gt;
 01EF:6806  3D0800              cmp  ax,0008&lt;br /&gt;
 01EF:6809  7201                jc   0000680C ($+1)         (no jmp)&lt;br /&gt;
 01EF:680B  C3                  ret&lt;br /&gt;
 01EF:680C  BB3400              mov  bx,0034&lt;br /&gt;
 01EF:680F  2BDA                sub  bx,dx&lt;br /&gt;
 01EF:6811  83FB2D              cmp  bx,002D&lt;br /&gt;
 01EF:6814  720B                jc   00006821 ($+b)         (down)&lt;br /&gt;
 01EF:6816  83EB2D              sub  bx,002D&lt;br /&gt;
 01EF:6819  D1E3                shl  bx,1&lt;br /&gt;
 01EF:681B  8B8F034A            mov  cx,[bx+4A03]           ds:[4A14]=0E09&lt;br /&gt;
 01EF:681F  EB06                jmp  short 00006827 ($+6)   (down)&lt;br /&gt;
 01EF:6821  8A8FD649            mov  cl,[bx+49D6]           ds:[49E7]=1E37&lt;br /&gt;
 01EF:6825  32ED                xor  ch,ch&lt;br /&gt;
 01EF:6827  A1E43F              mov  ax,[3FE4]              ds:[3FE4]=5574&lt;br /&gt;
 01EF:682A  03C1                add  ax,cx&lt;br /&gt;
 01EF:682C  2D6F54              sub  ax,546F&lt;br /&gt;
 01EF:682F  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:6831  81C36F56            add  bx,566F&lt;br /&gt;
 01EF:6835  3B1E110E            cmp  bx,[0E11]              ds:[0E11]=FFFF&lt;br /&gt;
 01EF:6839  7501                jne  0000683C ($+1)         (down)&lt;br /&gt;
 01EF:683B  C3                  ret&lt;br /&gt;
 01EF:683C  8BD8                mov  bx,ax&lt;br /&gt;
 01EF:683E  B500                mov  ch,00&lt;br /&gt;
 01EF:6840  3D1A00              cmp  ax,001A&lt;br /&gt;
 01EF:6843  7207                jc   0000684C ($+7)         (down)&lt;br /&gt;
 01EF:6845  2D1A00              sub  ax,001A&lt;br /&gt;
 01EF:6848  FEC5                inc  ch&lt;br /&gt;
 01EF:684A  EBF4                jmp  short 00006840 ($-c)   (up)&lt;br /&gt;
 01EF:684C  8AC8                mov  cl,al&lt;br /&gt;
 01EF:684E  8A876F54            mov  al,[bx+546F]           ds:[AC1A]=0200&lt;br /&gt;
 01EF:6852  243F                and  al,3F&lt;br /&gt;
 01EF:6854  7501                jne  00006857 ($+1)         (down)&lt;br /&gt;
 01EF:6856  C3                  ret&lt;br /&gt;
 01EF:6857  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:685C  7503                jne  00006861 ($+3)         (down)&lt;br /&gt;
 01EF:685E  EB11                jmp  short 00006871 ($+11)  (down)&lt;br /&gt;
 01EF:6860  90                  nop&lt;br /&gt;
 01EF:6861  80BF6F5800          cmp  byte [bx+586F],00      ds:[B01A]=0101&lt;br /&gt;
 01EF:6866  7501                jne  00006869 ($+1)         (down)&lt;br /&gt;
 01EF:6868  C3                  ret&lt;br /&gt;
 01EF:6869  80BF6F5840          cmp  byte [bx+586F],40      ds:[B01A]=0101&lt;br /&gt;
 01EF:686E  7201                jc   00006871 ($+1)         (down)&lt;br /&gt;
 01EF:6870  C3                  ret&lt;br /&gt;
 01EF:6871  8BD1                mov  dx,cx&lt;br /&gt;
 01EF:6873  51                  push cx&lt;br /&gt;
 01EF:6874  E810AA              call 00001287 ($-55f0)&lt;br /&gt;
 01EF:6877  59                  pop  cx&lt;br /&gt;
 01EF:6878  0AC0                or   al,al&lt;br /&gt;
 01EF:687A  7401                je   0000687D ($+1)         (down)&lt;br /&gt;
 01EF:687C  C3                  ret&lt;br /&gt;
 01EF:687D  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:6881  880EF03F            mov  [3FF0],cl              ds:[3FF0]=0000&lt;br /&gt;
 01EF:6885  882EF13F            mov  [3FF1],ch              ds:[3FF1]=0000&lt;br /&gt;
 01EF:6889  8A4501              mov  al,[di+01]             ds:[3913]=0000&lt;br /&gt;
 01EF:688C  A2EE3F              mov  [3FEE],al              ds:[3FEE]=0000&lt;br /&gt;
 01EF:688F  A2F53F              mov  [3FF5],al              ds:[3FF5]=0C02&lt;br /&gt;
 01EF:6892  8A4502              mov  al,[di+02]             ds:[4665]=200C&lt;br /&gt;
 01EF:6895  A2EF3F              mov  [3FEF],al              ds:[3FEF]=040C&lt;br /&gt;
 01EF:6898  A2F63F              mov  [3FF6],al              ds:[3FF6]=000C&lt;br /&gt;
 01EF:689B  E80EC5              call 00002DAC ($-3af2)&lt;br /&gt;
 01EF:689E  803EC83F00          cmp  byte [3FC8],00         ds:[3FC8]=0000&lt;br /&gt;
 01EF:68A3  7501                jne  000068A6 ($+1)         (no jmp)&lt;br /&gt;
 01EF:68A5  C3                  ret&lt;br /&gt;
 01EF:68A6  BB1340              mov  bx,4013&lt;br /&gt;
 01EF:68A9  891ECC3F            mov  [3FCC],bx              ds:[3FCC]=0000&lt;br /&gt;
 01EF:68AD  C3                  ret  &lt;br /&gt;
&lt;br /&gt;
 01EF:2DAC  A0EE3F              mov  al,[3FEE]              ds:[3FEE]=0000&lt;br /&gt;
 01EF:2DAF  2A06F03F            sub  al,[3FF0]              ds:[3FF0]=1515&lt;br /&gt;
 01EF:2DB3  7902                jns  00002DB7 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DB5  F6D8                neg  al&lt;br /&gt;
 01EF:2DB7  8A26EF3F            mov  ah,[3FEF]              ds:[3FEF]=1500&lt;br /&gt;
 01EF:2DBB  2A26F13F            sub  ah,[3FF1]              ds:[3FF1]=3915&lt;br /&gt;
 01EF:2DBF  7902                jns  00002DC3 ($+2)         (no jmp)&lt;br /&gt;
 01EF:2DC1  F6DC                neg  ah&lt;br /&gt;
 01EF:2DC3  02C4                add  al,ah&lt;br /&gt;
 01EF:2DC5  A2E937              mov  [37E9],al              ds:[37E9]=3737&lt;br /&gt;
 01EF:2DC8  A09C3F              mov  al,[3F9C]              ds:[3F9C]=3A3A&lt;br /&gt;
 01EF:2DCB  32E4                xor  ah,ah&lt;br /&gt;
 01EF:2DCD  A3F93F              mov  [3FF9],ax              ds:[3FF9]=3F3E&lt;br /&gt;
 01EF:2DD0  C606A83F00          mov  byte [3FA8],00         ds:[3FA8]=3A3A&lt;br /&gt;
 01EF:2DD5  C606C83F00          mov  byte [3FC8],00         ds:[3FC8]=1515&lt;br /&gt;
 01EF:2DDA  C706F33F0000        mov  word [3FF3],0000       ds:[3FF3]=1515&lt;br /&gt;
 01EF:2DE0  C706CC3F0000        mov  word [3FCC],0000       ds:[3FCC]=3B3C&lt;br /&gt;
 &lt;br /&gt;
Starting from memory location 0B6B:0A0E the subsequent 512 bytes are set to 1A1A x100h (256 times) by this function: &lt;br /&gt;
 01EF:2DE6  BF0E0A              mov  di,0A0E&lt;br /&gt;
 01EF:2DE9  B90001              mov  cx,0100&lt;br /&gt;
 01EF:2DEC  50                  push ax&lt;br /&gt;
 01EF:2DED  B86B0B              mov  ax,0B6B&lt;br /&gt;
 01EF:2DF0  8EC0                mov  es,ax&lt;br /&gt;
 01EF:2DF2  58                  pop  ax&lt;br /&gt;
 01EF:2DF3  B81A1A              mov  ax,1A1A&lt;br /&gt;
 01EF:2DF6  F3AB                repe stosw&lt;br /&gt;
 &lt;br /&gt;
The code then creates a map with all possible paths of the hero: &lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 07 08 09 -- 09 08&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 06 09 0A 09 08 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 05 0A 0B 0A 09 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 04 0B -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 02 01 02 01 02 03 04&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 05 04 03 02 -- -- -- -- 05&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 06 05 04 03 -- -- -- -- 06&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 04 -- -- -- -- 07&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 07 06 05 -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --&lt;br /&gt;
&lt;br /&gt;
 01EF:2DF8  8B3E3746            mov  di,[4637]              ds:[4637]=4663&lt;br /&gt;
 01EF:2DFC  EB74                jmp  short 00002E72 ($+74)  (down)&lt;br /&gt;
 01EF:2DFE  90                  nop&lt;br /&gt;
 01EF:2DFF  A0F23F              mov  al,[3FF2]              ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E02  8B1EF33F            mov  bx,[3FF3]              ds:[3FF3]=0000&lt;br /&gt;
 01EF:2E06  8887FB3F            mov  [bx+3FFB],al           ds:[411D]=0050&lt;br /&gt;
 01EF:2E0A  43                  inc  bx&lt;br /&gt;
 01EF:2E0B  3B1EF93F            cmp  bx,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E0F  7601                jbe  00002E12 ($+1)         (no jmp)&lt;br /&gt;
 01EF:2E11  C3                  ret&lt;br /&gt;
 01EF:2E12  891EF33F            mov  [3FF3],bx              ds:[3FF3]=0001&lt;br /&gt;
 01EF:2E16  8A26F93F            mov  ah,[3FF9]              ds:[3FF9]=0009&lt;br /&gt;
 01EF:2E1A  2AE3                sub  ah,bl&lt;br /&gt;
 01EF:2E1C  A0F03F              mov  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E1F  2A06F53F            sub  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E23  7902                jns  00002E27 ($+2)         (down)&lt;br /&gt;
 01EF:2E25  F6D8                neg  al&lt;br /&gt;
 01EF:2E27  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E29  7603                jbe  00002E2E ($+3)         (down)&lt;br /&gt;
 01EF:2E2B  E98400              jmp  00002EB2 ($+84)        (down)&lt;br /&gt;
 01EF:2E2E  A0F13F              mov  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E31  2A06F63F            sub  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E35  7902                jns  00002E39 ($+2)         (down)&lt;br /&gt;
 01EF:2E37  F6D8                neg  al&lt;br /&gt;
 01EF:2E39  3AC4                cmp  al,ah&lt;br /&gt;
 01EF:2E3B  7775                ja   00002EB2 ($+75)        (no jmp)&lt;br /&gt;
 01EF:2E3D  E87700              call 00002EB7 ($+77)&lt;br /&gt;
 01EF:2E40  7270                jc   00002EB2 ($+70)        (no jmp)&lt;br /&gt;
 01EF:2E42  3E885E00            mov  ds:[bp],bl             ds:[007A]=0002&lt;br /&gt;
 01EF:2E46  A0F53F              mov  al,[3FF5]              ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E49  3A06F03F            cmp  al,[3FF0]              ds:[3FF0]=0B04&lt;br /&gt;
 01EF:2E4D  7523                jne  00002E72 ($+23)        (no jmp)&lt;br /&gt;
 01EF:2E4F  A0F63F              mov  al,[3FF6]              ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E52  3A06F13F            cmp  al,[3FF1]              ds:[3FF1]=000B&lt;br /&gt;
 01EF:2E56  751A                jne  00002E72 ($+1a)        (no jmp)&lt;br /&gt;
 01EF:2E58  881EC83F            mov  [3FC8],bl              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E5C  57                  push di&lt;br /&gt;
 01EF:2E5D  BF1340              mov  di,4013&lt;br /&gt;
 01EF:2E60  BEFB3F              mov  si,3FFB&lt;br /&gt;
 01EF:2E63  8A0EC83F            mov  cl,[3FC8]              ds:[3FC8]=0000&lt;br /&gt;
 01EF:2E67  32ED                xor  ch,ch&lt;br /&gt;
 01EF:2E69  890EF93F            mov  [3FF9],cx              ds:[3FF9]=0001&lt;br /&gt;
 01EF:2E6D  F3A4                repe movsb&lt;br /&gt;
 01EF:2E6F  5F                  pop  di&lt;br /&gt;
 01EF:2E70  EB40                jmp  short 00002EB2 ($+40)  (down)&lt;br /&gt;
 01EF:2E72  C606F23F00          mov  byte [3FF2],00         ds:[3FF2]=0100&lt;br /&gt;
 01EF:2E77  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
&lt;br /&gt;
part of 2DF8 routine this writes the temporary math:&lt;br /&gt;
 01EF:2E7B  E881FF              call 00002DFF ($-7f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E7E  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E82  C606F23F01          mov  byte [3FF2],01         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E87  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E8B  E871FF              call 00002DFF ($-8f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E8E  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2E92  C606F23F02          mov  byte [3FF2],02         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2E97  FE06F63F            inc  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2E9B  E861FF              call 00002DFF ($-9f)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2E9E  FE0EF63F            dec  byte [3FF6]            ds:[3FF6]=000B&lt;br /&gt;
 01EF:2EA2  C606F23F03          mov  byte [3FF2],03         ds:[3FF2]=0000&lt;br /&gt;
 01EF:2EA7  FE0EF53F            dec  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EAB  E851FF              call 00002DFF ($-af)                        &amp;lt;-- call itself again&lt;br /&gt;
 01EF:2EAE  FE06F53F            inc  byte [3FF5]            ds:[3FF5]=0B04&lt;br /&gt;
 01EF:2EB2  FF0EF33F            dec  word [3FF3]            ds:[3FF3]=0000&lt;br /&gt;
 01EF:2EB6  C3                  ret&lt;br /&gt;
&lt;br /&gt;
== Notable Memory locations for hero&#039;s and monster&#039;s movement ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 3F92 = CURRENT QUEST&lt;br /&gt;
 3F93 = Hero&#039;s current tile (see tilemap below)&lt;br /&gt;
 3F94 = ACTIVE HERO&#039;S ROOM&lt;br /&gt;
&lt;br /&gt;
 3F99 =&lt;br /&gt;
 3F9A = END TURN FLAG&lt;br /&gt;
 3F9B = action performed?&lt;br /&gt;
 3F9C = REMAINING STEPS&lt;br /&gt;
 3F9D =&lt;br /&gt;
 3F9E =&lt;br /&gt;
 3F9F = MONSTER&#039;S X position&lt;br /&gt;
 3FA0 = MONSTER&#039;S Y position&lt;br /&gt;
 3FA1 = Horizontal distance Monster-hero&lt;br /&gt;
 3FA2 = Vertical distance Monster-hero&lt;br /&gt;
 3FA3-3FA4 (word) = next monster&#039;s step (see 40A2)&lt;br /&gt;
 3FA5 = HERO&#039;S X position&lt;br /&gt;
 3FA6 = HERO&#039;S Y position&lt;br /&gt;
 3FA7 = Active hero&lt;br /&gt;
 3FA8 = LOS 00=start 01=blocked 02=free&lt;br /&gt;
 3FA9 = steps to take to reach the hero?&lt;br /&gt;
 3FB5 = Target Hero ID (FF=Monster)&lt;br /&gt;
 3FB9 = current total defense dice of the active hero during DEFENSE&lt;br /&gt;
 3FC5 = Quest specific hero counter (usually identical to 3FC6)  modified by 26E8 call&lt;br /&gt;
 3FC5 = hero counter (complementar)  1111 = 0F = all heroes OUT  modified by 26E2 call&lt;br /&gt;
 &lt;br /&gt;
 3FD0 = WORD map ID (temporary for the quest) offset of ATTACKED monster in map memory (586F)&lt;br /&gt;
 3FD2 = BYTE rolled skulls (by monsters or heroes)&lt;br /&gt;
 3FD3 = BYTE rolled shields (by monsters or heroes)&lt;br /&gt;
 3FD4 = WORD monster&#039;s profile location (during attacks)&lt;br /&gt;
 3FD6 = WORD hero&#039;s profile location (during attacks)&lt;br /&gt;
 &lt;br /&gt;
 3FE7 = QUEST specific OBJECTIVE (1=ACCOMPLISHED)&lt;br /&gt;
 &lt;br /&gt;
 Memory locations for hero&#039;s movement (pathfindig)&lt;br /&gt;
 3FEE = HERO&#039;S X STARTING POSITION&lt;br /&gt;
 3FEF = HERO&#039;S Y STARTING POSITION&lt;br /&gt;
 3FF0 = mouse click X position (X stop)&lt;br /&gt;
 3FF1 = mouse click Y position (Y stop)&lt;br /&gt;
 3FF2 = 03&lt;br /&gt;
 3FF3 = FF&lt;br /&gt;
 3FF4 = FF&lt;br /&gt;
 3FF5 = HERO&#039;S X POSITION (copy)&lt;br /&gt;
 3FF6 = HERO&#039;S Y POSITION (copy)&lt;br /&gt;
 3FF9 = rolled movement&lt;br /&gt;
 3FFB - 4012 = math locations that varies among 00,01,02,03, at the end every byte is set to 03 (bytes here are never cleared)&lt;br /&gt;
 4013 -&amp;gt; locations with definitive hero&#039;s path (bytes here are never cleared)&lt;br /&gt;
&lt;br /&gt;
 hero&#039;s directional movement values:&lt;br /&gt;
 00 = up&lt;br /&gt;
 01 = right&lt;br /&gt;
 02 = down&lt;br /&gt;
 03 = left&lt;br /&gt;
 The hero&#039;s moving animation is then delegated to the main loop routines that starts reading from 4013 till [3FF9].&lt;br /&gt;
&lt;br /&gt;
 4097 = infinite actions if set to a number different from 00&lt;br /&gt;
 402C = Wand of recall extra action 00=no 01=yes&lt;br /&gt;
 4BBC = location where TRAP special event number is put upon entering the room (FF=Searched)&lt;br /&gt;
&lt;br /&gt;
 40A2 = here is stored the path the monster will follow by 607E (?) call. A sequence of words that specify directional movement&lt;br /&gt;
 00 01 = down&lt;br /&gt;
 00 FF = up&lt;br /&gt;
 FF 00 = left&lt;br /&gt;
 01 00 = right&lt;br /&gt;
 40CA = last location of the path to follow. (A640 = 2 moves)		&lt;br /&gt;
&lt;br /&gt;
 Screen tiles layout. The tile under the current hero is saved in [3F93]&lt;br /&gt;
             /\&lt;br /&gt;
            /00\&lt;br /&gt;
           /\  /\&lt;br /&gt;
          /01\/02\&lt;br /&gt;
         /\  /\  /\&lt;br /&gt;
        /03\/04\/05\&lt;br /&gt;
       /\  /\  /\  /\&lt;br /&gt;
      /06\/07\/08\/09\&lt;br /&gt;
     /\  /\  /\  /\  /\&lt;br /&gt;
    /0A\/0B\/0C\/0D\/0E\&lt;br /&gt;
    \  /\  /\  /\  /\  /\&lt;br /&gt;
     \/0F\/10\/11\/12\/13\&lt;br /&gt;
      \  /\  /\  /\  /\  /&lt;br /&gt;
       \/14\/15\/16\/17\/&lt;br /&gt;
        \  /\  /\  /\  /&lt;br /&gt;
         \/18\/19\/1A\/&lt;br /&gt;
          \  /\  /\  /&lt;br /&gt;
           \/1B\/1C\/&lt;br /&gt;
            \  /\  /&lt;br /&gt;
             \/1D\/&lt;br /&gt;
              \  /&lt;br /&gt;
               \/&lt;br /&gt;
			   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The hero&#039;s moving animation is delegated to the in-game main loop routines.&lt;br /&gt;
&lt;br /&gt;
= [DATA SEGMENT] Main Pointers =&lt;br /&gt;
&lt;br /&gt;
The file inside the exe that represents the Data Segment (every byte that is not strictly CODE) starts at offset &#039;&#039;&#039;0x9BE0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heroes&#039; default profiles ==&lt;br /&gt;
&lt;br /&gt;
 offset  mem pointer                   BP MP                      EQ             AD DD          ID &lt;br /&gt;
 0xE243  0B6B:4663   00 00 00 00 00 00 08 02 1D 00 00 00 00 00 00 00 00 00 00 00 03 02 00 00 00 00	Barbarian&lt;br /&gt;
 0xE25D  0B6B:467D   00 00 00 00 00 00 07 03 32 00 00 00 00 00 00 80 00 00 00 00 02 02 00 00 00 01	Dwarf&lt;br /&gt;
 0xE277  0B6B:4697   00 00 00 00 00 00 06 04 35 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 00 02	Elf&lt;br /&gt;
 0xE291  0B6B:46B1   00 00 00 00 00 00 04 06 4A 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 03	Wizard&lt;br /&gt;
 0xE2AB  0B6B:46CB   00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 01 02 00 00 00 04	Ragnar&lt;br /&gt;
&lt;br /&gt;
The byte positions are the same of [[HeroQuest Savegame Format]]. Load and save operations read and write at these addreses.&lt;br /&gt;
&lt;br /&gt;
When initializing the heroes the default values are resetted by the function 01EF:78D3 that resets all values to zero and Body and Mind points to default&lt;br /&gt;
 0x00DF74 0B6B:4394  08 07 06 04 02    Default Body point values (last one is Ragnar&#039;s)&lt;br /&gt;
 0x0148FB 0B6B:AD1B  02 03 04 06 00    Default Mind point values&lt;br /&gt;
&lt;br /&gt;
Character initialization code:&lt;br /&gt;
 01EF:78D3  8A1E9E40            mov  bl,[409E]              ds:[409E]=0002&lt;br /&gt;
 01EF:78D7  B700                mov  bh,00&lt;br /&gt;
 01EF:78D9  8B879443            mov  ax,[bx+4394]           ds:[4396]=0406&lt;br /&gt;
 01EF:78DD  884406              mov  [si+06],al             ds:[469D]=0406	&amp;lt;-- sets default body points&lt;br /&gt;
 01EF:78E0  8A871BAD            mov  al,[bx-52E5]           ds:[FFFFAD1D]=EC8B&lt;br /&gt;
 01EF:78E4  884407              mov  [si+07],al             ds:[469E]=3804	&amp;lt;-- sets default mind points&lt;br /&gt;
 01EF:78E7  C6440E00            mov  byte [si+0E],00        ds:[46A5]=0000	&amp;lt;-- resets Owned weapon&lt;br /&gt;
 01EF:78EB  C6440F00            mov  byte [si+0F],00        ds:[46A6]=0000	&amp;lt;-- resets Owned armour&lt;br /&gt;
 01EF:78EF  C6440D00            mov  byte [si+0D],00        ds:[46A4]=0000	&amp;lt;-- resets Owned special items &lt;br /&gt;
 01EF:78F3  C744090000          mov  word [si+09],0000      ds:[46A0]=000A	&amp;lt;-- resets GOLD&lt;br /&gt;
 01EF:78F8  C6441100            mov  byte [si+11],00        ds:[46A8]=0000	&amp;lt;-- resets Equipped weapon&lt;br /&gt;
 01EF:78FC  C6441200            mov  byte [si+12],00        ds:[46A9]=0000	&amp;lt;-- resets Equipped special item&lt;br /&gt;
 01EF:7900  C6441300            mov  byte [si+13],00        ds:[46AA]=0200	&amp;lt;-- resets Equipped armour&lt;br /&gt;
 01EF:7904  885C19              mov  [si+19],bl             ds:[46B0]=0002	&amp;lt;-- refresh hero&#039;s ID&lt;br /&gt;
 01EF:7907  803E9E4001          cmp  byte [409E],01         ds:[409E]=0002	&amp;lt;-- if dwarf&lt;br /&gt;
 01EF:790C  7504                jne  00007912 ($+4)         (down)&lt;br /&gt;
 01EF:790E  804C0E80            or   byte [si+0E],80        ds:[46A5]=0000	&amp;lt;-- gives him the toolkit&lt;br /&gt;
 01EF:7912  BB0800              mov  bx,0008					&amp;lt;-- &amp;quot;The character is renewed&amp;quot; string&lt;br /&gt;
 01EF:7915  E8D50F              call 000088ED ($+fd5)				&amp;lt;-- draws the scroll&lt;br /&gt;
&lt;br /&gt;
== Searched room table ==&lt;br /&gt;
&lt;br /&gt;
The game keeps track of the &#039;&#039;searched&#039;&#039; room by storing the value FF into two tables (treasure and traps searches) using the room number as relative offset (&#039;&#039;bx&#039;&#039;).&amp;lt;br&amp;gt;&lt;br /&gt;
Room numbers go from 00 to 2A so each table is 2B bytes long and every byte of the table is set to 00 at the beginnng of the quest.&amp;lt;br&amp;gt;&lt;br /&gt;
The code that puts FF into the table:&amp;lt;br&amp;gt;&lt;br /&gt;
 mov byte ptr [bx+4B70h], 0FFh    [0B6B:4B70] starting address of TREASURE search&lt;br /&gt;
 mov byte ptr [bx+4B9Bh], 0FFh    [0B6B:4B9B] starting address of TRAPS/SECRET PASSAGES search&lt;br /&gt;
NOTE: upon starting a quest, every Special event ID is put into these tables replacing the 00.&lt;br /&gt;
&lt;br /&gt;
== Equipment screen ==&lt;br /&gt;
With &#039;&#039;position on screen&#039;&#039; is intended the string header 11XXYY&lt;br /&gt;
&lt;br /&gt;
 0x014863 Hero&#039;s classes label (ie. Barbarian) position on screen&lt;br /&gt;
 0x00DF2B pointers block to default Hero&#039;s classes (5 pointers)&lt;br /&gt;
 0x00DF35 default Hero&#039;s classes labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x014873 Hero&#039;s name label (ie. Sigmar) position on screen&lt;br /&gt;
 0x00E1B7 pointers block to default Hero&#039;s names&lt;br /&gt;
 0x00E1C5 default Hero&#039;s names labels (5 Labels)&lt;br /&gt;
&lt;br /&gt;
 0x0141A4 first epilogue panel text (its pointer &#039;&#039;&#039;A5C4&#039;&#039;&#039; is written inside the code at offset 0x0649)&lt;br /&gt;
 0x0143A2 second epilogue panel text (its pointer &#039;&#039;&#039;A7C2&#039;&#039;&#039; is written inside the code at offset 0x0658)&lt;br /&gt;
&lt;br /&gt;
 0x0147F7 actual gear prices (hexadecimal) -  4x12 = 30 Bytes (2 bytes for equipment bit mask and 2 bytes for default price, little endian)&lt;br /&gt;
 0x01482B pointers block to single gear costs - 2xC = 18 Bytes&lt;br /&gt;
 0x014843 price (in decimal) labels - 1F Bytes&lt;br /&gt;
&lt;br /&gt;
 0x01486F &amp;quot;GOLD&amp;quot; label position on screen&lt;br /&gt;
 0x014867 gold amount position on screen (default is 0000)&lt;br /&gt;
 0x014877 equipment names position on screen&lt;br /&gt;
 0x01487B pointers block to the pointers in [language].bin where the item names are - 0x18 Bytes&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
Every WORD offsets are hexadecimal, little endian values.&lt;br /&gt;
&lt;br /&gt;
* 0x00CDF3: Game font (2F0h bytes long). 8x8 - 94 chars, can be edited with Nyerguds&#039; Westwood font editor.&lt;br /&gt;
 &lt;br /&gt;
* 0x00DCB5: Sequence of 20 bytes (4 groups of 5 bytes) with facing codes of the heroe&#039;s sprites in the 4 directions (S-E-W-N).&lt;br /&gt;
* 0x00DCC9: 4 words for sprite direction codification FF00=South ecc..&lt;br /&gt;
* 0x00DF95: Sequence of 11 groups of 4 bytes used for teleportation in &amp;quot;castle of mistery&amp;quot; quest (Room, X, Y, door direction that could be 00,01,1A)&lt;br /&gt;
* 0x00DFDC: Sequence of 21 groups of 6 words used to define furniture (first word: X,Y dimension of the frame - second word: Y,X offset in pixels from the origin tile - third word: offset of the frame in FURN.VGA)&lt;br /&gt;
* 0x00E05B: Group of 4 offsets for the walls graphics in graphics.vga (2 wariations of the left wall and 2 of the right wall).&lt;br /&gt;
* 0x00E062: 26 bytes (00 or 01) used for wall variations based on ROOM tile position number (see diamond scheme above). Basically each position has its own fixed wall texture that is displayed only if a wall is present.&lt;br /&gt;
* 0x00E3E6: List of 28 (1Ch) Groups of 5 bytes each representing Movement (BYTE), Attack (BYTE), Defense (BYTE) and Death special event offset (WORD) of each monster (00-1B).&lt;br /&gt;
* 0x00E8E8: 32 pointers (words) to the monster profiles in game.&lt;br /&gt;
* 0x00E92A: Monster&#039;s profiles location. Monsters are numbered in-game from 00 to 20h (maximum) and profiles (10 bytes) are stored starting from here (0x4D4A in memory).&lt;br /&gt;
* 0x00ED28: Sequence of 256 BYTES used as index for drawing the 2D map walls, listing all possible states of wall and doors (values from 00 to FF that refer to the graphic slot IDs inside MAPS.VGA).&lt;br /&gt;
* 0x00F64F: List of 12 pointers to magic spells specific routines into code segment.&lt;br /&gt;
* 0x00F669: List of 30 pointers to special events specific routines into code segment.&lt;br /&gt;
* 0x00F6A5: List of 30 pointers to monster&#039;s profiles location in memory (each pointer is 1A from the other).&lt;br /&gt;
* 0x00F703: VGA Palette - 300h bytes as RGB 256 colours&lt;br /&gt;
&lt;br /&gt;
* 0x013CDD: List of 31 (words) offsets of the HEROES frame animation (attack, defense, death) in MEN.VGA&lt;br /&gt;
* 0x013D1B: List of 31 (words) frame dimensions (X,Y) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
* 0x013D59: List of 31 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the previous corresponding frames in MEN.VGA&lt;br /&gt;
* 0x013D97: List of 8 (words) SCREEN offsets (in linear pixels starting from the origin top-left) of the monster animation frames in MONSTERS.VGA&lt;br /&gt;
&lt;br /&gt;
* 0x014125: Sequence of 42 offsets (84 bytes) to the tile graphic of the rooms and corridors of isometric map (01-13 points all to 1F80, the tile for the corridors)&lt;br /&gt;
* 0x014179: Sequence of 2A bytes that are indexes of the tile graphic of the rooms and corridors of 2D map (01-13 are all 01, the index tile for the corridors)&lt;br /&gt;
&lt;br /&gt;
* 0x014920: position on screen of a bar filled with 20h char used to delete the equipment names while moving the mouse over the icons&lt;br /&gt;
* 0x014924: Text colour (1F is white)&lt;br /&gt;
* 0x014925: Background colour (14 is transparent)&lt;br /&gt;
* 0x014943: equipment names position on screen during a quest (the subsequent 28 zeroes are the placeholder)&lt;br /&gt;
&lt;br /&gt;
* 0x014A42: Sequence of 7 pointers in language.bin of the potion effect texts&lt;br /&gt;
* 0x00E472: Sequence of 5 pointers in language.bin of the potion finding texts (all but holy water and heroic brew, that has direct pointers inside the code)&lt;br /&gt;
* 0x00E4FE: Sequence of 1Ch pointers in language.bin of the monsters names (2D map)&lt;br /&gt;
* 0x00E536: Sequence of 30h index in maps.vga that assign names of the object (01=fallen rock, 00=all traps or hidden objects with no name, 03=Stairs) in OBJECT BLOCK order.&lt;br /&gt;
* 0x00E566: 23h bitmasks that define which object is passable by projectiles&lt;br /&gt;
* 0x00EE2D: Offsets (12) sequence of object icons in maps.vga (from ID 30 to 3B, 00D1 = fallen rock, goblin) 00D1&lt;br /&gt;
* 0x00EE45: Offsets sequence of monster&#039;s icons in maps.vga (ID 00 = 40D3 = goblin)&lt;br /&gt;
&lt;br /&gt;
== Intro Sequence ==&lt;br /&gt;
Every text panel of the intro resides into &#039;&#039;&#039;INTRO.EXE&#039;&#039;&#039; and they&#039;re in English only.&amp;lt;br&amp;gt;&lt;br /&gt;
In order to translate them (or change the lenght of the text) you have to uncompress the exe first, then Locate every pointers of each panel.&amp;lt;br&amp;gt;&lt;br /&gt;
The data segment inside the exe starts at &#039;&#039;&#039;0x01C0&#039;&#039;&#039;. Every pointer is relative to this address.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Panel # !! default pointer value !! pointer exe offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0603 || 0x0212&lt;br /&gt;
|-&lt;br /&gt;
| 2 || F203 || 0x0214&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 9B04 || 0x0216&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 8706 || 0x0218&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 7008 || 0x021A&lt;br /&gt;
|-&lt;br /&gt;
| 6 || CA0A || 0x021C&lt;br /&gt;
|}&lt;br /&gt;
The panels layout follows the same rules described under [[HeroQuest Strings Format]]&lt;br /&gt;
&lt;br /&gt;
 0x001675 Game font, this is the exact copy of the font in quest.exe (See various offests section above).&lt;br /&gt;
&lt;br /&gt;
= Protection screen =&lt;br /&gt;
to restore shield protection in UNCOMPRESSED QUEST.EXE modify&lt;br /&gt;
 offset 0x0541 from 90 90 90	to E8 DC FE		(if you modify these bytes only the shield screen stays and regardless of page entered the game starts anyway)&lt;br /&gt;
 offset 0x0549 from EB		to 74&lt;/div&gt;</summary>
		<author><name>Theruler</name></author>
	</entry>
</feed>