<?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=Yo-yo-yo-jbo</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=Yo-yo-yo-jbo"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/Yo-yo-yo-jbo"/>
	<updated>2026-06-28T02:51:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11079</id>
		<title>Dangerous Dave</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11079"/>
		<updated>2023-06-23T00:56:19Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* dave.exe */&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 = None&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = None&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = None&lt;br /&gt;
 | Interface = No&lt;br /&gt;
 | Demo = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Dangerous Dave is the first installment in the popular Dangerous Dave series, preceding [[Dangerous Dave 2]] (And [[Dangerous Dave in Copyright Infringement|DDiCI]].) &lt;br /&gt;
&lt;br /&gt;
In this installment Dave navigates the lair of his nemesis, looking for the ten special trophies he needs to steal, and get out alive. The game features ten levels plus bonus areas and separate CGA, EGA and VGA graphics.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | See below for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;egadave.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | EGA tiles in [[Dangerous Dave Tileset Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scores.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | High scores in [[Dave Score format]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== dave.exe ===&lt;br /&gt;
&lt;br /&gt;
When decompressed with [[UNLZEXE]], &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt; contains the following data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Length !! Format !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0b510 || ? ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || Unknown data - UINT32LE count, UINT32LE[count] len, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0x0c620 || 0x5AD0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || CGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x120f0 || 0xA3F0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || VGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c4e0 || 0x12A0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Inverse Frequency Sound format]] || PC Speaker sound effects&lt;br /&gt;
|-&lt;br /&gt;
| 0x1d780 || 0x12C0 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || CGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x1ea40 || 0x2480 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || EGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x20ec0 || 0x4800 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || VGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x2583a || 0x14 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| UINT16LE array || Mapping between normal levels and Warp Zones&lt;br /&gt;
|-&lt;br /&gt;
| 0x25b66 || 0x320 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Monster properties for each level&lt;br /&gt;
|-&lt;br /&gt;
| 0x25ea4 || 0x46 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Small 10&amp;amp;times;7 level shown on title screen&lt;br /&gt;
|-&lt;br /&gt;
| 0x2643f || 0xE ||style=&amp;quot;background: #CCFFCC;&amp;quot;| NUL-terminated ANSI string || Intro screen title&lt;br /&gt;
|-&lt;br /&gt;
| 0x26451 || 0x17 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| NUL-terminated ANSI string || Intro screen sub-title&lt;br /&gt;
|-&lt;br /&gt;
| 0x26ea9 || 0x21 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| Raw 8bpp pixel data || Gradient border shown above and below level, with trailing 0x00&lt;br /&gt;
|-&lt;br /&gt;
| 0x26b0a || 0x300 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[VGA Palette]] || 6-bit RGB&lt;br /&gt;
|-&lt;br /&gt;
| 0x26e0a || 0x3200 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Game levels (10 @ 1280 bytes each)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are a number of variables stored in the .exe:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x92B5 || [[UINT16LE]] || Pixel offset of top map border (0 = first line, 320 = second line, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x92BE || UINT16LE || Pixel offset of bottom map border&lt;br /&gt;
|-&lt;br /&gt;
| 0z265D1 || UINT16LE[8] || Which row and column the F2 control panel elements appear on&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3| 0x26A99 || UINT16LE[10] || Initial horizontal scroll position of map at level start (only viewport though?)&lt;br /&gt;
|-&lt;br /&gt;
|| UINT16LE[10] || Something to do with the offset where the game looks for the tiles&lt;br /&gt;
|-&lt;br /&gt;
|| UINT32LE[10] || Additional map data, unknown purpose&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some EGA graphics are stored internally and use the [[Commander Keen EGA Header]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Dave can use CGA, EGA and VGA graphics, with the default being the best card available.  All of the CGA and VGA graphics are stored internally, while the EGA graphics are stored in an external file, and have no relation to the CGA/VGA graphics (i.e. the game will work fine in CGA or VGA mode even if &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; is missing.)  The font and menu graphics (for CGA/VGA and EGA) are all stored in the main .exe file (as it is still possible to press F2 to change in and out of EGA mode with a missing/corrupted &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; file.)&lt;br /&gt;
&lt;br /&gt;
== Related links ==&lt;br /&gt;
&lt;br /&gt;
* MaiZure has an excellent video tutorial series on how to write the game from scratch in C: [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html maizure.org]&lt;br /&gt;
* [https://github.com/StepS- StepS] [https://www.youtube.com/watch?v=0gHdRuEFNWg started a disassembly] of the .exe with [https://www.ghidra-sre.org/ Ghidra] which [[User:Malvineous|Malvineous]] continued with, and many of the game&#039;s functions are now documented.  [https://files.shikadi.net/malv/files/ghidra/dangerous-dave/DAVE_2021_05_02.gar The project file is available] for anyone who would like to continue the work, or use it to make patches for the game.&lt;br /&gt;
* [https://archive.org/details/GamersEdgeSampler1990SoftdiskPublishingActionCompilation Gamer&#039;s Edge Sampler] on archive.org, archived version of the original floppy on which the game was released as freeware.&lt;br /&gt;
* yo-yo-yo-jbo has an analysis on the game as well as a parser and crude level editor: [https://github.com/yo-yo-yo-jbo/dangerous_dave https://github.com/yo-yo-yo-jbo/dangerous_dave]&lt;br /&gt;
&lt;br /&gt;
[[Category:Softdisk]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave_Level_format&amp;diff=11078</id>
		<title>Dangerous Dave Level format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave_Level_format&amp;diff=11078"/>
		<updated>2023-06-21T13:25:58Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Credits */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 1&lt;br /&gt;
 | Tile size = 16&amp;amp;times;16&lt;br /&gt;
 | Viewport = 320&amp;amp;times;160&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Dangerous Dave}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Dangerous Dave]] stores its levels consecutively in the executable starting at offset 0x26E0A (after [[UNLZEXE]]&#039;ing.)  Each level is 1280 bytes long.  There is also a small 10&amp;amp;times;7 level shown on the title screen, located at offset 0x25ea4.  This small level omits the path data and padding and only contains the &amp;lt;tt&amp;gt;tiles&amp;lt;/tt&amp;gt; field shown in the next section.&lt;br /&gt;
&lt;br /&gt;
== Level structure ==&lt;br /&gt;
&lt;br /&gt;
Each level is stored in the following structure:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][256] || path || Path data&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][100*10] || tiles || Tile data, left to right, top to bottom&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][24] || padding || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Path data ===&lt;br /&gt;
&lt;br /&gt;
This block of data is used to specify a path for creatures to follow.  It is an array of up to 128 X,Y coordinate pairs, with each pair being a signed 8-bit integer (so two bytes * 128 pairs == 256 bytes max.)  Each value dictates the number of pixels the creature should move in both the X and Y direction.  The end of the path is signified by storing 0xEA in both coordinates, and upon reaching this point the path repeats from the beginning.  An example path might be&lt;br /&gt;
&lt;br /&gt;
 05 03 FB FD EA EA&lt;br /&gt;
&lt;br /&gt;
Which means:&lt;br /&gt;
&lt;br /&gt;
 05 03   # Move five pixels to the right and three pixels down&lt;br /&gt;
 FB FD   # Move five pixels left and three pixels up, i.e. return to the original position&lt;br /&gt;
 EA EA   # End of path&lt;br /&gt;
&lt;br /&gt;
This would cause the creature to oscillate between two points.  (Since the values are signed, 0xFF == -1, 0xFE == -2, etc.)&lt;br /&gt;
&lt;br /&gt;
Since the paths consist of relative movement instructions, a path that does not return the creature to its starting point at termination will cause the creature to gradually migrate off the edge of the level, as the misalignment accumulates after each loop iteration.  However this could be used for creative effect, as the creature will then reappear at the opposite edge of the level.&lt;br /&gt;
&lt;br /&gt;
It appears that only one path can be defined in each level, and all creatures follow it the same (although as the path consists of relative movement instructions, the creatures can trace out the same path at different locations in the level.)&lt;br /&gt;
&lt;br /&gt;
=== Tile data ===&lt;br /&gt;
[[Image:ddave-level01-vga.png|thumb|480px|Level 1 with VGA tiles. Often, a level and a bonus level are stored together.]]&lt;br /&gt;
&lt;br /&gt;
The level consists of 1000 bytes of tile data, one byte per tile arranged in a 100x10 array.&lt;br /&gt;
&lt;br /&gt;
The byte values are indices into the [[Dangerous Dave Tileset Format|tileset]], so a byte of value 0x02 means tile number 2 should be drawn in that location (with tile number 0 being the first image in the tileset.)  Tile number 0 is actually a black square, so a byte value of 0x00 is used for empty space the player can walk in.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Both the player starting point and the creatures which appear in each level are hard coded in the .exe file as follows, with (0,0) being the top-left corner of the level and (99,9) being the lower right tile.  See below for where these values are stored and how to change them.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Level chunk !! Start !! Creatures&lt;br /&gt;
|-&lt;br /&gt;
|  1      ||  1 || (2,8) || None&lt;br /&gt;
|-&lt;br /&gt;
|  2      ||  2 || (1,8) || None&lt;br /&gt;
|-&lt;br /&gt;
|  3      ||  3 || (2,5) || Creature 1 (spiders) at (44,4) and (59,4) - each spider is ~2x2 tiles in size&lt;br /&gt;
|-&lt;br /&gt;
|  4      ||  4 || (1,5) || Creature 2 (spiky ball) at (32, 2)&lt;br /&gt;
|-&lt;br /&gt;
|  5      ||  5 || (2,8) || 3x Creature 3 (sun) at (15,3) (33,3) (49,3)&lt;br /&gt;
|-&lt;br /&gt;
|  6      ||  6 || (2,8) || 4x Creature 4 (bones) at (10,8) (28,8) (45,2) (40,8)&lt;br /&gt;
|-&lt;br /&gt;
|  7      ||  7 || (1,2) || 4x Creature 5 (UFOs) at (5,2) (16,1) (46,2) (56,3)&lt;br /&gt;
|-&lt;br /&gt;
|  8      ||  8 || (2,8) || 3x Creature 6 at (53,5) (72,2) (84,1)&lt;br /&gt;
|-&lt;br /&gt;
|  9      ||  9 || (6,1) || 4x Creature 7 at (35, 8) (41,8) (49,8) (65,8)&lt;br /&gt;
|-&lt;br /&gt;
| 10      || 10 || (2,8) || 4x Creature 8 at (48,5) (51,2) (65,3) (82,5)&lt;br /&gt;
|-&lt;br /&gt;
|  5 warp ||  2 || (51,0) || None&lt;br /&gt;
|-&lt;br /&gt;
|  8 warp ||  6 || (71,0) || None / shares with level 6&lt;br /&gt;
|-&lt;br /&gt;
|  9 warp ||  7 || (80,0) || TODO&lt;br /&gt;
|-&lt;br /&gt;
| 10 warp ||  1 || (20,0) || None&lt;br /&gt;
|-&lt;br /&gt;
| 6 warp (bug) ||  -1 || TODO || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;spiders&amp;quot; in level 3 are the first creature found in the tileset, with each subsequent level using the next creature in the tileset, so the order the creatures appear in the tileset is the same order as they appear across all the levels.  Each level can have between zero and four creatures, but they will always be the same type of creature.  Two different creatures cannot appear in the same level.&lt;br /&gt;
&lt;br /&gt;
The level chunk in the list above is the &amp;quot;file&amp;quot; the level appears in (because some levels share the same files.)&lt;br /&gt;
&lt;br /&gt;
The level 6 warp zone is a well-known bug, and will be loaded from address 0x2932B (see more on [[Dangerous Dave/Cheats]]).&lt;br /&gt;
&lt;br /&gt;
Warp zones are mapped in the array starting at 0x2583A, each entry is a 2-word number specifying the target warp zone (or 0 if there is no warp zone): (0, 0, 0, 0, 2, 0, 0, 6, 7, 1). That is the reason for the level 6 buggy warp zone - 0 is loaded from the array, so a completely unrelated level data is loaded from address 0x2932B.&lt;br /&gt;
There is a good [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] by &#039;&#039;yo-yo-yo-jbo&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Initial level state ===&lt;br /&gt;
&lt;br /&gt;
The initial state for each level (such as player start position) is hard-coded in the .exe at offset 0x257E8.  Each value is repeated 10 times, once for each level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][10] || motionFlags || Initial flags to set for player motion, primarily to set the &#039;falling&#039; flag if the start point is in the air.  Valid values are 0x24 (stationary) and 0x28 (falling).  This is a bit field and the other flags generally are not useful, with the possible exception of 0x01 which will start with the jetpack on.  If 0x20 is omitted the game will glitch badly as it seems this flag may cause the game to scroll to that position, so without it the map does not get scrolled into position properly.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][10] || startX || X-coordinate of player&#039;s initial start position, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][10] || startY || Y-coordinate of player&#039;s initial start position, in pixels&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The warp zones are handled differently, and things like the player starting Y-coordinate is hard-coded for all warp zones at the following locations.  The 10-entry arrays use the main level number, so entering a warp zone from level 6 will use the 6th entry in the array (which has index 5 as they start from index 0).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! .exe offset !! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1710 || UINT16LE || warpZoneStartY || Y-coordinate of player&#039;s start position for ALL warp zones, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| 0x1716 || UINT16LE || warpZoneMotionFlags || Player motion flags for ALL warp zones, see &amp;lt;tt&amp;gt;motionFlags&amp;lt;/tt&amp;gt; as above&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 valign=top| 0x25862 || UINT16LE[10] || warpZoneScrollOffset || Number of tiles to scroll the map horizontally&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE[10] || warpZoneStartX || X-coordinate of player&#039;s initial start position, in pixels, relative to the screen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;warpZoneScrollOffset&amp;lt;/tt&amp;gt; controls which part of the map is drawn on the screen, and the &amp;lt;tt&amp;gt;warpZoneStartX&amp;lt;/tt&amp;gt; controls where the player appears on the screen, so the two must work in tandem to get the player to appear at the desired point within the level.&lt;br /&gt;
&lt;br /&gt;
Since in the original game entering a warp zone involves jumping off the edge of a level, followed by a &amp;quot;falling down a hole&amp;quot; animation, by default all warp zones start with the player continuing this fall.  This is why there is only one player state and motion flag for all warp zones.&lt;br /&gt;
&lt;br /&gt;
=== Monster data ===&lt;br /&gt;
&lt;br /&gt;
At offset 0x25b66 in the .exe file the following structure is repeated 10 times, once for each level.  Note that each element within the structure is further repeated four times, once for each monster within the level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][4] || monsterEnabled || Set to 0x0001 to enable this monster, 0x0000 to omit it from the level&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || pixelX || X-coordinate of each monster&#039;s start point, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || pixelY || Y-coordinate of each monster&#039;s start point, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || offset || Start the path this many points in.  Not used in the original levels.  When more than one monster is on the screen at the same time, this can help disguise the fact that they are all following the same path.  Do not set this beyond the end of the path array or the monster will fly off the screen and possibly the game may crash. {{TODO|Could this be used to fit more than one path into a level?  It would depend on where it loops back to at the end of the path.  It should at least be possible to use it to provide an initial path followed as a one-off, before the monster then returns to looping through the main path.}}&lt;br /&gt;
|-&lt;br /&gt;
| INT16LE[4] || calmness || Lower numbers cause more frequent firing, higher numbers less frequent.  0x7FFF is the max which all but prevents firing.  Negative numbers seem to act the same as 0, firing at the maximum rate.&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4&amp;amp;nbsp;*&amp;amp;nbsp;5] || padding || 40 bytes of padding.  Although these look like an additional five properties for each level&#039;s monster, changing these values appears to have no effect.  The game appears to use this area as scratch space when the .exe is in memory, writing current monster state here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tileinfo ===&lt;br /&gt;
&lt;br /&gt;
At offset 0x2590A in the .exe there is an array of 10 UINT16LE values.  These are map tile numbers of ten collectable items.  The first entry in this array is 0x0002, which is the map tile of the level exit door.&lt;br /&gt;
&lt;br /&gt;
Immediately following this is an array of another 10 UINT16LE values.  These contain the number of points awarded when each of the 10 items are collected.  The first entry in this list is 2000, which will award the player 2000 points for &amp;quot;collecting&amp;quot; the end-level door.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The initial investigation and tile data documentation was done by [[User:Levellass|Levellass]], with [[User:Malvineous|Malvineous]] discovering how the initial level info, tileinfo, path and monster data works.  [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html MaiZure] worked out most of the creature locations.&lt;br /&gt;
The Warp Zone investigation for level 6 was done by [[User:yo-yo-yo-jbo|yo-yo-yo-jbo]].&lt;br /&gt;
If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Dangerous Dave]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11077</id>
		<title>Dangerous Dave</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11077"/>
		<updated>2023-06-20T19:06:44Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Related links */&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 = None&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = None&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = None&lt;br /&gt;
 | Interface = No&lt;br /&gt;
 | Demo = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Dangerous Dave is the first installment in the popular Dangerous Dave series, preceding [[Dangerous Dave 2]] (And [[Dangerous Dave in Copyright Infringement|DDiCI]].) &lt;br /&gt;
&lt;br /&gt;
In this installment Dave navigates the lair of his nemesis, looking for the ten special trophies he needs to steal, and get out alive. The game features ten levels plus bonus areas and separate CGA, EGA and VGA graphics.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | See below for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;egadave.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | EGA tiles in [[Dangerous Dave Tileset Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scores.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | High scores in [[Dave Score format]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== dave.exe ===&lt;br /&gt;
&lt;br /&gt;
When decompressed with [[UNLZEXE]], &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt; contains the following data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Length !! Format !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0b510 || ? ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || Unknown data - UINT32LE count, UINT32LE[count] len, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0x0c620 || 0x5AD0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || CGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x120f0 || 0xA3F0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || VGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c4e0 || 0x12A0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Inverse Frequency Sound format]] || PC Speaker sound effects&lt;br /&gt;
|-&lt;br /&gt;
| 0x1d780 || 0x12C0 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || CGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x1ea40 || 0x2480 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || EGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x20ec0 || 0x4800 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || VGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x2583a || 0x14 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| UINT16LE array || Mapping between normal levels and Warp Zones&lt;br /&gt;
|-&lt;br /&gt;
| 0x25b66 || 0x320 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Monster properties for each level&lt;br /&gt;
|-&lt;br /&gt;
| 0x25ea4 || 0x46 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Small 10&amp;amp;times;7 level shown on title screen&lt;br /&gt;
|-&lt;br /&gt;
| 0x2643f || 0xE ||style=&amp;quot;background: #CCFFCC;&amp;quot;| NUL-terminated ANSI string || Intro screen title&lt;br /&gt;
|-&lt;br /&gt;
| 0x26451 || 0xE ||style=&amp;quot;background: #CCFFCC;&amp;quot;| NUL-terminated ANSI string || Intro screen sub-title&lt;br /&gt;
|-&lt;br /&gt;
| 0x26ea9 || 0x21 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| Raw 8bpp pixel data || Gradient border shown above and below level, with trailing 0x00&lt;br /&gt;
|-&lt;br /&gt;
| 0x26b0a || 0x300 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[VGA Palette]] || 6-bit RGB&lt;br /&gt;
|-&lt;br /&gt;
| 0x26e0a || 0x3200 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Game levels (10 @ 1280 bytes each)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are a number of variables stored in the .exe:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x92B5 || [[UINT16LE]] || Pixel offset of top map border (0 = first line, 320 = second line, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x92BE || UINT16LE || Pixel offset of bottom map border&lt;br /&gt;
|-&lt;br /&gt;
| 0z265D1 || UINT16LE[8] || Which row and column the F2 control panel elements appear on&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3| 0x26A99 || UINT16LE[10] || Initial horizontal scroll position of map at level start (only viewport though?)&lt;br /&gt;
|-&lt;br /&gt;
|| UINT16LE[10] || Something to do with the offset where the game looks for the tiles&lt;br /&gt;
|-&lt;br /&gt;
|| UINT32LE[10] || Additional map data, unknown purpose&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some EGA graphics are stored internally and use the [[Commander Keen EGA Header]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Dave can use CGA, EGA and VGA graphics, with the default being the best card available.  All of the CGA and VGA graphics are stored internally, while the EGA graphics are stored in an external file, and have no relation to the CGA/VGA graphics (i.e. the game will work fine in CGA or VGA mode even if &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; is missing.)  The font and menu graphics (for CGA/VGA and EGA) are all stored in the main .exe file (as it is still possible to press F2 to change in and out of EGA mode with a missing/corrupted &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; file.)&lt;br /&gt;
&lt;br /&gt;
== Related links ==&lt;br /&gt;
&lt;br /&gt;
* MaiZure has an excellent video tutorial series on how to write the game from scratch in C: [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html maizure.org]&lt;br /&gt;
* [https://github.com/StepS- StepS] [https://www.youtube.com/watch?v=0gHdRuEFNWg started a disassembly] of the .exe with [https://www.ghidra-sre.org/ Ghidra] which [[User:Malvineous|Malvineous]] continued with, and many of the game&#039;s functions are now documented.  [https://files.shikadi.net/malv/files/ghidra/dangerous-dave/DAVE_2021_05_02.gar The project file is available] for anyone who would like to continue the work, or use it to make patches for the game.&lt;br /&gt;
* [https://archive.org/details/GamersEdgeSampler1990SoftdiskPublishingActionCompilation Gamer&#039;s Edge Sampler] on archive.org, archived version of the original floppy on which the game was released as freeware.&lt;br /&gt;
* yo-yo-yo-jbo has an analysis on the game as well as a parser and crude level editor: [https://github.com/yo-yo-yo-jbo/dangerous_dave https://github.com/yo-yo-yo-jbo/dangerous_dave]&lt;br /&gt;
&lt;br /&gt;
[[Category:Softdisk]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11076</id>
		<title>Dangerous Dave</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11076"/>
		<updated>2023-06-20T19:05:25Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* dave.exe */&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 = None&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = None&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = None&lt;br /&gt;
 | Interface = No&lt;br /&gt;
 | Demo = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Dangerous Dave is the first installment in the popular Dangerous Dave series, preceding [[Dangerous Dave 2]] (And [[Dangerous Dave in Copyright Infringement|DDiCI]].) &lt;br /&gt;
&lt;br /&gt;
In this installment Dave navigates the lair of his nemesis, looking for the ten special trophies he needs to steal, and get out alive. The game features ten levels plus bonus areas and separate CGA, EGA and VGA graphics.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | See below for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;egadave.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | EGA tiles in [[Dangerous Dave Tileset Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scores.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | High scores in [[Dave Score format]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== dave.exe ===&lt;br /&gt;
&lt;br /&gt;
When decompressed with [[UNLZEXE]], &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt; contains the following data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Length !! Format !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0b510 || ? ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || Unknown data - UINT32LE count, UINT32LE[count] len, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0x0c620 || 0x5AD0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || CGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x120f0 || 0xA3F0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || VGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c4e0 || 0x12A0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Inverse Frequency Sound format]] || PC Speaker sound effects&lt;br /&gt;
|-&lt;br /&gt;
| 0x1d780 || 0x12C0 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || CGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x1ea40 || 0x2480 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || EGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x20ec0 || 0x4800 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || VGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x2583a || 0x14 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| UINT16LE array || Mapping between normal levels and Warp Zones&lt;br /&gt;
|-&lt;br /&gt;
| 0x25b66 || 0x320 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Monster properties for each level&lt;br /&gt;
|-&lt;br /&gt;
| 0x25ea4 || 0x46 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Small 10&amp;amp;times;7 level shown on title screen&lt;br /&gt;
|-&lt;br /&gt;
| 0x2643f || 0xE ||style=&amp;quot;background: #CCFFCC;&amp;quot;| NUL-terminated ANSI string || Intro screen title&lt;br /&gt;
|-&lt;br /&gt;
| 0x26451 || 0xE ||style=&amp;quot;background: #CCFFCC;&amp;quot;| NUL-terminated ANSI string || Intro screen sub-title&lt;br /&gt;
|-&lt;br /&gt;
| 0x26ea9 || 0x21 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| Raw 8bpp pixel data || Gradient border shown above and below level, with trailing 0x00&lt;br /&gt;
|-&lt;br /&gt;
| 0x26b0a || 0x300 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[VGA Palette]] || 6-bit RGB&lt;br /&gt;
|-&lt;br /&gt;
| 0x26e0a || 0x3200 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Game levels (10 @ 1280 bytes each)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are a number of variables stored in the .exe:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x92B5 || [[UINT16LE]] || Pixel offset of top map border (0 = first line, 320 = second line, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x92BE || UINT16LE || Pixel offset of bottom map border&lt;br /&gt;
|-&lt;br /&gt;
| 0z265D1 || UINT16LE[8] || Which row and column the F2 control panel elements appear on&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3| 0x26A99 || UINT16LE[10] || Initial horizontal scroll position of map at level start (only viewport though?)&lt;br /&gt;
|-&lt;br /&gt;
|| UINT16LE[10] || Something to do with the offset where the game looks for the tiles&lt;br /&gt;
|-&lt;br /&gt;
|| UINT32LE[10] || Additional map data, unknown purpose&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some EGA graphics are stored internally and use the [[Commander Keen EGA Header]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Dave can use CGA, EGA and VGA graphics, with the default being the best card available.  All of the CGA and VGA graphics are stored internally, while the EGA graphics are stored in an external file, and have no relation to the CGA/VGA graphics (i.e. the game will work fine in CGA or VGA mode even if &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; is missing.)  The font and menu graphics (for CGA/VGA and EGA) are all stored in the main .exe file (as it is still possible to press F2 to change in and out of EGA mode with a missing/corrupted &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; file.)&lt;br /&gt;
&lt;br /&gt;
== Related links ==&lt;br /&gt;
&lt;br /&gt;
* MaiZure has an excellent video tutorial series on how to write the game from scratch in C: [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html maizure.org]&lt;br /&gt;
* [https://github.com/StepS- StepS] [https://www.youtube.com/watch?v=0gHdRuEFNWg started a disassembly] of the .exe with [https://www.ghidra-sre.org/ Ghidra] which [[User:Malvineous|Malvineous]] continued with, and many of the game&#039;s functions are now documented.  [https://files.shikadi.net/malv/files/ghidra/dangerous-dave/DAVE_2021_05_02.gar The project file is available] for anyone who would like to continue the work, or use it to make patches for the game.&lt;br /&gt;
* [https://archive.org/details/GamersEdgeSampler1990SoftdiskPublishingActionCompilation Gamer&#039;s Edge Sampler] on archive.org, archived version of the original floppy on which the game was released as freeware.&lt;br /&gt;
&lt;br /&gt;
[[Category:Softdisk]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11075</id>
		<title>Dangerous Dave</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave&amp;diff=11075"/>
		<updated>2023-06-20T19:02:52Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* dave.exe */&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 = None&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = None&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = None&lt;br /&gt;
 | Interface = No&lt;br /&gt;
 | Demo = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Dangerous Dave is the first installment in the popular Dangerous Dave series, preceding [[Dangerous Dave 2]] (And [[Dangerous Dave in Copyright Infringement|DDiCI]].) &lt;br /&gt;
&lt;br /&gt;
In this installment Dave navigates the lair of his nemesis, looking for the ten special trophies he needs to steal, and get out alive. The game features ten levels plus bonus areas and separate CGA, EGA and VGA graphics.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows&lt;br /&gt;
| grp = N/A&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = N/A&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = N/A&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | See below for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;egadave.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | EGA tiles in [[Dangerous Dave Tileset Format]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scores.dav&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC;&amp;quot; | High scores in [[Dave Score format]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== dave.exe ===&lt;br /&gt;
&lt;br /&gt;
When decompressed with [[UNLZEXE]], &amp;lt;tt&amp;gt;dave.exe&amp;lt;/tt&amp;gt; contains the following data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Length !! Format !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0b510 || ? ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || Unknown data - UINT32LE count, UINT32LE[count] len, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0x0c620 || 0x5AD0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || CGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x120f0 || 0xA3F0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Tileset Format]] || VGA tiles&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c4e0 || 0x12A0 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Inverse Frequency Sound format]] || PC Speaker sound effects&lt;br /&gt;
|-&lt;br /&gt;
| 0x1d780 || 0x12C0 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || CGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x1ea40 || 0x2480 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || EGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x20ec0 || 0x4800 ||style=&amp;quot;background: #FFCCCC;&amp;quot;| ? || VGA font + menu graphics&lt;br /&gt;
|-&lt;br /&gt;
| 0x2583a || 0x14 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| UINT16LE array || Mapping between normal levels and Warp Zones&lt;br /&gt;
|-&lt;br /&gt;
| 0x25b66 || 0x320 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Monster properties for each level&lt;br /&gt;
|-&lt;br /&gt;
| 0x25ea4 || 0x46 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Small 10&amp;amp;times;7 level shown on title screen&lt;br /&gt;
|-&lt;br /&gt;
| 0x26ae9 || 0x21 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| Raw 8bpp pixel data || Gradient border shown above and below level, with trailing 0x00&lt;br /&gt;
|-&lt;br /&gt;
| 0x26b0a || 0x300 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[VGA Palette]] || 6-bit RGB&lt;br /&gt;
|-&lt;br /&gt;
| 0x26e0a || 0x3200 ||style=&amp;quot;background: #CCFFCC;&amp;quot;| [[Dangerous Dave Level format]] || Game levels (10 @ 1280 bytes each)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are a number of variables stored in the .exe:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x92B5 || [[UINT16LE]] || Pixel offset of top map border (0 = first line, 320 = second line, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x92BE || UINT16LE || Pixel offset of bottom map border&lt;br /&gt;
|-&lt;br /&gt;
| 0z265D1 || UINT16LE[8] || Which row and column the F2 control panel elements appear on&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3| 0x26A99 || UINT16LE[10] || Initial horizontal scroll position of map at level start (only viewport though?)&lt;br /&gt;
|-&lt;br /&gt;
|| UINT16LE[10] || Something to do with the offset where the game looks for the tiles&lt;br /&gt;
|-&lt;br /&gt;
|| UINT32LE[10] || Additional map data, unknown purpose&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some EGA graphics are stored internally and use the [[Commander Keen EGA Header]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Dave can use CGA, EGA and VGA graphics, with the default being the best card available.  All of the CGA and VGA graphics are stored internally, while the EGA graphics are stored in an external file, and have no relation to the CGA/VGA graphics (i.e. the game will work fine in CGA or VGA mode even if &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; is missing.)  The font and menu graphics (for CGA/VGA and EGA) are all stored in the main .exe file (as it is still possible to press F2 to change in and out of EGA mode with a missing/corrupted &amp;lt;tt&amp;gt;EGADAVE.DAV&amp;lt;/tt&amp;gt; file.)&lt;br /&gt;
&lt;br /&gt;
== Related links ==&lt;br /&gt;
&lt;br /&gt;
* MaiZure has an excellent video tutorial series on how to write the game from scratch in C: [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html maizure.org]&lt;br /&gt;
* [https://github.com/StepS- StepS] [https://www.youtube.com/watch?v=0gHdRuEFNWg started a disassembly] of the .exe with [https://www.ghidra-sre.org/ Ghidra] which [[User:Malvineous|Malvineous]] continued with, and many of the game&#039;s functions are now documented.  [https://files.shikadi.net/malv/files/ghidra/dangerous-dave/DAVE_2021_05_02.gar The project file is available] for anyone who would like to continue the work, or use it to make patches for the game.&lt;br /&gt;
* [https://archive.org/details/GamersEdgeSampler1990SoftdiskPublishingActionCompilation Gamer&#039;s Edge Sampler] on archive.org, archived version of the original floppy on which the game was released as freeware.&lt;br /&gt;
&lt;br /&gt;
[[Category:Softdisk]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave/Cheats&amp;diff=11074</id>
		<title>Dangerous Dave/Cheats</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave/Cheats&amp;diff=11074"/>
		<updated>2023-06-20T19:00:21Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Infinite lives bug */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cheats ==&lt;br /&gt;
&lt;br /&gt;
=== Trainer ===&lt;br /&gt;
&lt;br /&gt;
There is a trainer (&amp;lt;tt&amp;gt;[https://files.shikadi.net/moddingwiki/tools/ddave/dangerous-dave-trainer.zip dave-t.com]&amp;lt;/tt&amp;gt; by &#039;&#039;Dr. Detergent&#039;&#039;) that provides unlimited ammo and jetpack, and allows skipping to the next level by pressing F10.&lt;br /&gt;
&lt;br /&gt;
=== Exploitable Bugs ===&lt;br /&gt;
&lt;br /&gt;
==== Wall Climbing ====&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-wallclimb.png|right|320|thumb|Climbing up the walls without jetpack. The vertical row of four gems on the right side can be collected the same way.]]&lt;br /&gt;
The detection for being able to land on a tile when falling is slightly shifted to the left compared to the tile&#039;s normal hitbox detection. Because of this, when there is an open space under a vertical wall facing left, there is a specific point at the left edge of the wall at which you can jump straight up without getting obstructed, but which will cause you to then remain standing on a tile two tiles higher up on the straight wall. This way, it is possible to climb obstacles without needing the Jetpack. The trick only works when there are two cells of headspace above you; if you hit a ceiling, you fall down the entire way back to the real floor.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of this bug is that the opposite applies too: when you stand on the very edge of the right side of a tile, just before the point where you would fall off, and then jump straight up, you will fall through the floor when landing.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Access Level 8 Warp Zone Early ====&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-l8-warp-area.png|right|320|thumb|Plundering the Level 8 Warp Zone area with jetpack available.]]&lt;br /&gt;
Each Warp Zone in Dangerous Dave is constructed in a normally-inaccessible area at the right side of an existing level. However, in level 6, you can access this area by using the jetpack found at the start of the level to fly through the door before collecting the trophy. Without the trophy to trigger the level end, you can pass through the door tile to the area above. From there on, you can walk to the right side and get all the riches of the Warp Zone that can be accessed from level 8. Having the jetpack available makes it trivially easy to collect the trophy without dying, and the crowns area alone gives enough points to give you an extra life. Since you did not access a Warp Zone to get here, the game treats an exit through the Warp Zone&#039;s door as completing level 6. Not only is this much less dangerous than finishing the actual level 6, but the Warp Zone can be accessed again the proper way on level 8, giving you the chance to plunder it a second time.&lt;br /&gt;
&lt;br /&gt;
When going on top of the normally-accessible part of level 6, you should be careful not to touch the outer edges of the level, since these will act as Warp Zone triggers for level 6, and will make you end up in a corrupted warp zone (see &#039;&#039;Bugs&#039;&#039;).&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infinite Lives ====&lt;br /&gt;
There is a glitch in the game - if you get the maximum score of 99999, you can always refill your lives by returning from the menu (hitting ESC and then N).&lt;br /&gt;
&lt;br /&gt;
The function that checks if a new life has to be given is supposed to increase Dave&#039;s life every 20000 points, but due to a logic bug it will always try to increase the lives if you hit 99999 points. Interestingly, that function triggers when hitting a collectible item (e.g. a diamond) or when returning from the menu.&lt;br /&gt;
An interesting [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] on the subject is available.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
=== Bad Warp Zone ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-l6-warp.png|right|320|thumb|Corrupted Warp Zone accessed via level 6.]]&lt;br /&gt;
Accessing Warp Zones (bonus levels) is done by jumping off the left or right of the screen. As mentioned, in level 6, you aren&#039;t supposed to be able to access the top of the level, but it can be done by using the jetpack to fly through the door before collecting the trophy. Walking off the edge of the map, either at the left side just next to the door, or at the right side beyond the level 8 Warp Zone part, will make you end up in a corrupted Warp Zone consisting of invalid tiles, which seems to be made up of terrain from level 8. Accessing this area leaves the game in a state where you are unable to control Dave, effectively freezing the gameplay, though the menu functions (Help, Control Panel, Restart, Pause and Exit) all still work, and no corruption effects seem to remain when the game is simply restarted.&lt;br /&gt;
&lt;br /&gt;
The reason for this bug is that the [[Dangerous Dave Level format|level data]] contains invalid values for the level 6 warp zone, as the player was never meant to be able to jump off the left or right edges of this level.  Thus when the player does this, the invalid warp zone values cause a specific part of the game&#039;s data to be drawn as a level, but as it is not complete level data, it appears corrupted.  In theory this bug could be fixed by placing correct warp zone values against level 6 so that it points to a valid part of a level, such as one of the existing warp zones.  (Or by moving the door so it cannot be used to escape the level.)&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] regarding the subject is available.&lt;br /&gt;
&lt;br /&gt;
==== Information in the 2021 edition ====&lt;br /&gt;
[[Image:ddave-l3-right.png|thumb|border|upright=1|right|Actual level 3 end area (top), compared to the Treasure Map version (bottom).]]&lt;br /&gt;
According to the &amp;quot;Treasure Map&amp;quot; pdf document included in the 2021 &#039;&#039;Dangerous Dave Champion’s Edition&#039;&#039;, which was written by John Romero, the room with the flame floor to the right of the door in level 3 was added in the 1990 DOS version, and didn&#039;t exist in the 1988 Mac version. The document claims that the inaccessible top part of that area is supposed to be the Warp Zone for level 6, and shows an image of the classic level 3 where that part contains a trophy and a door. However, while this is true for the 2021 Remaster, the trophy and door don&#039;t actually exist in the 1990 DOS version, making it unusable as Warp Zone. The document never mentions the fact the level 6 Warp Zone is broken in the DOS version, and in fact shows the adapted level 3 in classic graphics. The end screen of the original game also only mentions Warp Zones on level 5, 8, 9 and 10, further indicating that the level 6 Warp Zone was not actually supposed to exist. All these elements point to the Remaster recycling the useless inaccessible part in level 3 to fix the level 6 Warp Zone bug.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Scancode ===&lt;br /&gt;
&lt;br /&gt;
There is a typo in the game and the scan code for F12 has been put in as 0x59 instead of 0x58.  As a result, when reassigning the keyboard mapping, it is not possible to assign F12 to any action.  This can be fixed by changing the byte at offset 0x5724 in the decompressed .exe from 0x59 to 0x58.&lt;br /&gt;
&lt;br /&gt;
[[Category:Dangerous Dave]]&lt;br /&gt;
&lt;br /&gt;
=== Level Numbers on Warp Zones ===&lt;br /&gt;
&lt;br /&gt;
When you enter a Warp Zone, the game UI will show your current level number as the same level you warped in from. However, if you die in a Warp Zone, the level shown on the score screen will match the real level that the Warp Zone area is located in. This is the only way to end up on the high scores screen as level 1, since you normally can&#039;t die there.&lt;br /&gt;
&lt;br /&gt;
=== Items on Top Row ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-top-items.png|right|320|thumb|Level 6 warp zone area showing the item pickup bug.]]&lt;br /&gt;
&lt;br /&gt;
Items placed on the highest tiles row on the map don&#039;t register correctly for picking them up. This can be seen in the level 8 warp zone. They can only be picked up when Dave touches them slightly below their normal hit box, which can be done by jumping at them from below, or falling down next to them.&lt;br /&gt;
&lt;br /&gt;
This also applies to interacting with doors; normally, a level ends when you touch it at any side, but if you walk into the level 8 warp zone door from the top, the level will only end when you&#039;ve fallen through to the bottom of the door tile.&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave/Cheats&amp;diff=11073</id>
		<title>Dangerous Dave/Cheats</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave/Cheats&amp;diff=11073"/>
		<updated>2023-06-20T19:00:06Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Bad Warp Zone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cheats ==&lt;br /&gt;
&lt;br /&gt;
=== Trainer ===&lt;br /&gt;
&lt;br /&gt;
There is a trainer (&amp;lt;tt&amp;gt;[https://files.shikadi.net/moddingwiki/tools/ddave/dangerous-dave-trainer.zip dave-t.com]&amp;lt;/tt&amp;gt; by &#039;&#039;Dr. Detergent&#039;&#039;) that provides unlimited ammo and jetpack, and allows skipping to the next level by pressing F10.&lt;br /&gt;
&lt;br /&gt;
=== Exploitable Bugs ===&lt;br /&gt;
&lt;br /&gt;
==== Wall Climbing ====&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-wallclimb.png|right|320|thumb|Climbing up the walls without jetpack. The vertical row of four gems on the right side can be collected the same way.]]&lt;br /&gt;
The detection for being able to land on a tile when falling is slightly shifted to the left compared to the tile&#039;s normal hitbox detection. Because of this, when there is an open space under a vertical wall facing left, there is a specific point at the left edge of the wall at which you can jump straight up without getting obstructed, but which will cause you to then remain standing on a tile two tiles higher up on the straight wall. This way, it is possible to climb obstacles without needing the Jetpack. The trick only works when there are two cells of headspace above you; if you hit a ceiling, you fall down the entire way back to the real floor.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of this bug is that the opposite applies too: when you stand on the very edge of the right side of a tile, just before the point where you would fall off, and then jump straight up, you will fall through the floor when landing.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Access Level 8 Warp Zone Early ====&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-l8-warp-area.png|right|320|thumb|Plundering the Level 8 Warp Zone area with jetpack available.]]&lt;br /&gt;
Each Warp Zone in Dangerous Dave is constructed in a normally-inaccessible area at the right side of an existing level. However, in level 6, you can access this area by using the jetpack found at the start of the level to fly through the door before collecting the trophy. Without the trophy to trigger the level end, you can pass through the door tile to the area above. From there on, you can walk to the right side and get all the riches of the Warp Zone that can be accessed from level 8. Having the jetpack available makes it trivially easy to collect the trophy without dying, and the crowns area alone gives enough points to give you an extra life. Since you did not access a Warp Zone to get here, the game treats an exit through the Warp Zone&#039;s door as completing level 6. Not only is this much less dangerous than finishing the actual level 6, but the Warp Zone can be accessed again the proper way on level 8, giving you the chance to plunder it a second time.&lt;br /&gt;
&lt;br /&gt;
When going on top of the normally-accessible part of level 6, you should be careful not to touch the outer edges of the level, since these will act as Warp Zone triggers for level 6, and will make you end up in a corrupted warp zone (see &#039;&#039;Bugs&#039;&#039;).&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infinite lives bug ====&lt;br /&gt;
There is a glitch in the game - if you get the maximum score of 99999, you can always refill your lives by returning from the menu (hitting ESC and then N).&lt;br /&gt;
&lt;br /&gt;
The function that checks if a new life has to be given is supposed to increase Dave&#039;s life every 20000 points, but due to a logic bug it will always try to increase the lives if you hit 99999 points. Interestingly, that function triggers when hitting a collectible item (e.g. a diamond) or when returning from the menu.&lt;br /&gt;
An interesting [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] on the subject is available.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
=== Bad Warp Zone ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-l6-warp.png|right|320|thumb|Corrupted Warp Zone accessed via level 6.]]&lt;br /&gt;
Accessing Warp Zones (bonus levels) is done by jumping off the left or right of the screen. As mentioned, in level 6, you aren&#039;t supposed to be able to access the top of the level, but it can be done by using the jetpack to fly through the door before collecting the trophy. Walking off the edge of the map, either at the left side just next to the door, or at the right side beyond the level 8 Warp Zone part, will make you end up in a corrupted Warp Zone consisting of invalid tiles, which seems to be made up of terrain from level 8. Accessing this area leaves the game in a state where you are unable to control Dave, effectively freezing the gameplay, though the menu functions (Help, Control Panel, Restart, Pause and Exit) all still work, and no corruption effects seem to remain when the game is simply restarted.&lt;br /&gt;
&lt;br /&gt;
The reason for this bug is that the [[Dangerous Dave Level format|level data]] contains invalid values for the level 6 warp zone, as the player was never meant to be able to jump off the left or right edges of this level.  Thus when the player does this, the invalid warp zone values cause a specific part of the game&#039;s data to be drawn as a level, but as it is not complete level data, it appears corrupted.  In theory this bug could be fixed by placing correct warp zone values against level 6 so that it points to a valid part of a level, such as one of the existing warp zones.  (Or by moving the door so it cannot be used to escape the level.)&lt;br /&gt;
&lt;br /&gt;
A [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] regarding the subject is available.&lt;br /&gt;
&lt;br /&gt;
==== Information in the 2021 edition ====&lt;br /&gt;
[[Image:ddave-l3-right.png|thumb|border|upright=1|right|Actual level 3 end area (top), compared to the Treasure Map version (bottom).]]&lt;br /&gt;
According to the &amp;quot;Treasure Map&amp;quot; pdf document included in the 2021 &#039;&#039;Dangerous Dave Champion’s Edition&#039;&#039;, which was written by John Romero, the room with the flame floor to the right of the door in level 3 was added in the 1990 DOS version, and didn&#039;t exist in the 1988 Mac version. The document claims that the inaccessible top part of that area is supposed to be the Warp Zone for level 6, and shows an image of the classic level 3 where that part contains a trophy and a door. However, while this is true for the 2021 Remaster, the trophy and door don&#039;t actually exist in the 1990 DOS version, making it unusable as Warp Zone. The document never mentions the fact the level 6 Warp Zone is broken in the DOS version, and in fact shows the adapted level 3 in classic graphics. The end screen of the original game also only mentions Warp Zones on level 5, 8, 9 and 10, further indicating that the level 6 Warp Zone was not actually supposed to exist. All these elements point to the Remaster recycling the useless inaccessible part in level 3 to fix the level 6 Warp Zone bug.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Scancode ===&lt;br /&gt;
&lt;br /&gt;
There is a typo in the game and the scan code for F12 has been put in as 0x59 instead of 0x58.  As a result, when reassigning the keyboard mapping, it is not possible to assign F12 to any action.  This can be fixed by changing the byte at offset 0x5724 in the decompressed .exe from 0x59 to 0x58.&lt;br /&gt;
&lt;br /&gt;
[[Category:Dangerous Dave]]&lt;br /&gt;
&lt;br /&gt;
=== Level Numbers on Warp Zones ===&lt;br /&gt;
&lt;br /&gt;
When you enter a Warp Zone, the game UI will show your current level number as the same level you warped in from. However, if you die in a Warp Zone, the level shown on the score screen will match the real level that the Warp Zone area is located in. This is the only way to end up on the high scores screen as level 1, since you normally can&#039;t die there.&lt;br /&gt;
&lt;br /&gt;
=== Items on Top Row ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-top-items.png|right|320|thumb|Level 6 warp zone area showing the item pickup bug.]]&lt;br /&gt;
&lt;br /&gt;
Items placed on the highest tiles row on the map don&#039;t register correctly for picking them up. This can be seen in the level 8 warp zone. They can only be picked up when Dave touches them slightly below their normal hit box, which can be done by jumping at them from below, or falling down next to them.&lt;br /&gt;
&lt;br /&gt;
This also applies to interacting with doors; normally, a level ends when you touch it at any side, but if you walk into the level 8 warp zone door from the top, the level will only end when you&#039;ve fallen through to the bottom of the door tile.&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave/Cheats&amp;diff=11072</id>
		<title>Dangerous Dave/Cheats</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave/Cheats&amp;diff=11072"/>
		<updated>2023-06-20T18:59:13Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Cheats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cheats ==&lt;br /&gt;
&lt;br /&gt;
=== Trainer ===&lt;br /&gt;
&lt;br /&gt;
There is a trainer (&amp;lt;tt&amp;gt;[https://files.shikadi.net/moddingwiki/tools/ddave/dangerous-dave-trainer.zip dave-t.com]&amp;lt;/tt&amp;gt; by &#039;&#039;Dr. Detergent&#039;&#039;) that provides unlimited ammo and jetpack, and allows skipping to the next level by pressing F10.&lt;br /&gt;
&lt;br /&gt;
=== Exploitable Bugs ===&lt;br /&gt;
&lt;br /&gt;
==== Wall Climbing ====&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-wallclimb.png|right|320|thumb|Climbing up the walls without jetpack. The vertical row of four gems on the right side can be collected the same way.]]&lt;br /&gt;
The detection for being able to land on a tile when falling is slightly shifted to the left compared to the tile&#039;s normal hitbox detection. Because of this, when there is an open space under a vertical wall facing left, there is a specific point at the left edge of the wall at which you can jump straight up without getting obstructed, but which will cause you to then remain standing on a tile two tiles higher up on the straight wall. This way, it is possible to climb obstacles without needing the Jetpack. The trick only works when there are two cells of headspace above you; if you hit a ceiling, you fall down the entire way back to the real floor.&lt;br /&gt;
&lt;br /&gt;
The disadvantage of this bug is that the opposite applies too: when you stand on the very edge of the right side of a tile, just before the point where you would fall off, and then jump straight up, you will fall through the floor when landing.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Access Level 8 Warp Zone Early ====&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-l8-warp-area.png|right|320|thumb|Plundering the Level 8 Warp Zone area with jetpack available.]]&lt;br /&gt;
Each Warp Zone in Dangerous Dave is constructed in a normally-inaccessible area at the right side of an existing level. However, in level 6, you can access this area by using the jetpack found at the start of the level to fly through the door before collecting the trophy. Without the trophy to trigger the level end, you can pass through the door tile to the area above. From there on, you can walk to the right side and get all the riches of the Warp Zone that can be accessed from level 8. Having the jetpack available makes it trivially easy to collect the trophy without dying, and the crowns area alone gives enough points to give you an extra life. Since you did not access a Warp Zone to get here, the game treats an exit through the Warp Zone&#039;s door as completing level 6. Not only is this much less dangerous than finishing the actual level 6, but the Warp Zone can be accessed again the proper way on level 8, giving you the chance to plunder it a second time.&lt;br /&gt;
&lt;br /&gt;
When going on top of the normally-accessible part of level 6, you should be careful not to touch the outer edges of the level, since these will act as Warp Zone triggers for level 6, and will make you end up in a corrupted warp zone (see &#039;&#039;Bugs&#039;&#039;).&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Infinite lives bug ====&lt;br /&gt;
There is a glitch in the game - if you get the maximum score of 99999, you can always refill your lives by returning from the menu (hitting ESC and then N).&lt;br /&gt;
&lt;br /&gt;
The function that checks if a new life has to be given is supposed to increase Dave&#039;s life every 20000 points, but due to a logic bug it will always try to increase the lives if you hit 99999 points. Interestingly, that function triggers when hitting a collectible item (e.g. a diamond) or when returning from the menu.&lt;br /&gt;
An interesting [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] on the subject is available.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
=== Bad Warp Zone ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-l6-warp.png|right|320|thumb|Corrupted Warp Zone accessed via level 6.]]&lt;br /&gt;
Accessing Warp Zones (bonus levels) is done by jumping off the left or right of the screen. As mentioned, in level 6, you aren&#039;t supposed to be able to access the top of the level, but it can be done by using the jetpack to fly through the door before collecting the trophy. Walking off the edge of the map, either at the left side just next to the door, or at the right side beyond the level 8 Warp Zone part, will make you end up in a corrupted Warp Zone consisting of invalid tiles, which seems to be made up of terrain from level 8. Accessing this area leaves the game in a state where you are unable to control Dave, effectively freezing the gameplay, though the menu functions (Help, Control Panel, Restart, Pause and Exit) all still work, and no corruption effects seem to remain when the game is simply restarted.&lt;br /&gt;
&lt;br /&gt;
The reason for this bug is that the [[Dangerous Dave Level format|level data]] contains invalid values for the level 6 warp zone, as the player was never meant to be able to jump off the left or right edges of this level.  Thus when the player does this, the invalid warp zone values cause a specific part of the game&#039;s data to be drawn as a level, but as it is not complete level data, it appears corrupted.  In theory this bug could be fixed by placing correct warp zone values against level 6 so that it points to a valid part of a level, such as one of the existing warp zones.  (Or by moving the door so it cannot be used to escape the level.)&lt;br /&gt;
&lt;br /&gt;
==== Information in the 2021 edition ====&lt;br /&gt;
[[Image:ddave-l3-right.png|thumb|border|upright=1|right|Actual level 3 end area (top), compared to the Treasure Map version (bottom).]]&lt;br /&gt;
According to the &amp;quot;Treasure Map&amp;quot; pdf document included in the 2021 &#039;&#039;Dangerous Dave Champion’s Edition&#039;&#039;, which was written by John Romero, the room with the flame floor to the right of the door in level 3 was added in the 1990 DOS version, and didn&#039;t exist in the 1988 Mac version. The document claims that the inaccessible top part of that area is supposed to be the Warp Zone for level 6, and shows an image of the classic level 3 where that part contains a trophy and a door. However, while this is true for the 2021 Remaster, the trophy and door don&#039;t actually exist in the 1990 DOS version, making it unusable as Warp Zone. The document never mentions the fact the level 6 Warp Zone is broken in the DOS version, and in fact shows the adapted level 3 in classic graphics. The end screen of the original game also only mentions Warp Zones on level 5, 8, 9 and 10, further indicating that the level 6 Warp Zone was not actually supposed to exist. All these elements point to the Remaster recycling the useless inaccessible part in level 3 to fix the level 6 Warp Zone bug.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Scancode ===&lt;br /&gt;
&lt;br /&gt;
There is a typo in the game and the scan code for F12 has been put in as 0x59 instead of 0x58.  As a result, when reassigning the keyboard mapping, it is not possible to assign F12 to any action.  This can be fixed by changing the byte at offset 0x5724 in the decompressed .exe from 0x59 to 0x58.&lt;br /&gt;
&lt;br /&gt;
[[Category:Dangerous Dave]]&lt;br /&gt;
&lt;br /&gt;
=== Level Numbers on Warp Zones ===&lt;br /&gt;
&lt;br /&gt;
When you enter a Warp Zone, the game UI will show your current level number as the same level you warped in from. However, if you die in a Warp Zone, the level shown on the score screen will match the real level that the Warp Zone area is located in. This is the only way to end up on the high scores screen as level 1, since you normally can&#039;t die there.&lt;br /&gt;
&lt;br /&gt;
=== Items on Top Row ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ddave-bug-top-items.png|right|320|thumb|Level 6 warp zone area showing the item pickup bug.]]&lt;br /&gt;
&lt;br /&gt;
Items placed on the highest tiles row on the map don&#039;t register correctly for picking them up. This can be seen in the level 8 warp zone. They can only be picked up when Dave touches them slightly below their normal hit box, which can be done by jumping at them from below, or falling down next to them.&lt;br /&gt;
&lt;br /&gt;
This also applies to interacting with doors; normally, a level ends when you touch it at any side, but if you walk into the level 8 warp zone door from the top, the level will only end when you&#039;ve fallen through to the bottom of the door tile.&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave_Level_format&amp;diff=11071</id>
		<title>Dangerous Dave Level format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave_Level_format&amp;diff=11071"/>
		<updated>2023-06-20T18:54:57Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Constants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 1&lt;br /&gt;
 | Tile size = 16&amp;amp;times;16&lt;br /&gt;
 | Viewport = 320&amp;amp;times;160&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Dangerous Dave}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Dangerous Dave]] stores its levels consecutively in the executable starting at offset 0x26E0A (after [[UNLZEXE]]&#039;ing.)  Each level is 1280 bytes long.  There is also a small 10&amp;amp;times;7 level shown on the title screen, located at offset 0x25ea4.  This small level omits the path data and padding and only contains the &amp;lt;tt&amp;gt;tiles&amp;lt;/tt&amp;gt; field shown in the next section.&lt;br /&gt;
&lt;br /&gt;
== Level structure ==&lt;br /&gt;
&lt;br /&gt;
Each level is stored in the following structure:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][256] || path || Path data&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][100*10] || tiles || Tile data, left to right, top to bottom&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][24] || padding || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Path data ===&lt;br /&gt;
&lt;br /&gt;
This block of data is used to specify a path for creatures to follow.  It is an array of up to 128 X,Y coordinate pairs, with each pair being a signed 8-bit integer (so two bytes * 128 pairs == 256 bytes max.)  Each value dictates the number of pixels the creature should move in both the X and Y direction.  The end of the path is signified by storing 0xEA in both coordinates, and upon reaching this point the path repeats from the beginning.  An example path might be&lt;br /&gt;
&lt;br /&gt;
 05 03 FB FD EA EA&lt;br /&gt;
&lt;br /&gt;
Which means:&lt;br /&gt;
&lt;br /&gt;
 05 03   # Move five pixels to the right and three pixels down&lt;br /&gt;
 FB FD   # Move five pixels left and three pixels up, i.e. return to the original position&lt;br /&gt;
 EA EA   # End of path&lt;br /&gt;
&lt;br /&gt;
This would cause the creature to oscillate between two points.  (Since the values are signed, 0xFF == -1, 0xFE == -2, etc.)&lt;br /&gt;
&lt;br /&gt;
Since the paths consist of relative movement instructions, a path that does not return the creature to its starting point at termination will cause the creature to gradually migrate off the edge of the level, as the misalignment accumulates after each loop iteration.  However this could be used for creative effect, as the creature will then reappear at the opposite edge of the level.&lt;br /&gt;
&lt;br /&gt;
It appears that only one path can be defined in each level, and all creatures follow it the same (although as the path consists of relative movement instructions, the creatures can trace out the same path at different locations in the level.)&lt;br /&gt;
&lt;br /&gt;
=== Tile data ===&lt;br /&gt;
[[Image:ddave-level01-vga.png|thumb|480px|Level 1 with VGA tiles. Often, a level and a bonus level are stored together.]]&lt;br /&gt;
&lt;br /&gt;
The level consists of 1000 bytes of tile data, one byte per tile arranged in a 100x10 array.&lt;br /&gt;
&lt;br /&gt;
The byte values are indices into the [[Dangerous Dave Tileset Format|tileset]], so a byte of value 0x02 means tile number 2 should be drawn in that location (with tile number 0 being the first image in the tileset.)  Tile number 0 is actually a black square, so a byte value of 0x00 is used for empty space the player can walk in.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Both the player starting point and the creatures which appear in each level are hard coded in the .exe file as follows, with (0,0) being the top-left corner of the level and (99,9) being the lower right tile.  See below for where these values are stored and how to change them.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Level chunk !! Start !! Creatures&lt;br /&gt;
|-&lt;br /&gt;
|  1      ||  1 || (2,8) || None&lt;br /&gt;
|-&lt;br /&gt;
|  2      ||  2 || (1,8) || None&lt;br /&gt;
|-&lt;br /&gt;
|  3      ||  3 || (2,5) || Creature 1 (spiders) at (44,4) and (59,4) - each spider is ~2x2 tiles in size&lt;br /&gt;
|-&lt;br /&gt;
|  4      ||  4 || (1,5) || Creature 2 (spiky ball) at (32, 2)&lt;br /&gt;
|-&lt;br /&gt;
|  5      ||  5 || (2,8) || 3x Creature 3 (sun) at (15,3) (33,3) (49,3)&lt;br /&gt;
|-&lt;br /&gt;
|  6      ||  6 || (2,8) || 4x Creature 4 (bones) at (10,8) (28,8) (45,2) (40,8)&lt;br /&gt;
|-&lt;br /&gt;
|  7      ||  7 || (1,2) || 4x Creature 5 (UFOs) at (5,2) (16,1) (46,2) (56,3)&lt;br /&gt;
|-&lt;br /&gt;
|  8      ||  8 || (2,8) || 3x Creature 6 at (53,5) (72,2) (84,1)&lt;br /&gt;
|-&lt;br /&gt;
|  9      ||  9 || (6,1) || 4x Creature 7 at (35, 8) (41,8) (49,8) (65,8)&lt;br /&gt;
|-&lt;br /&gt;
| 10      || 10 || (2,8) || 4x Creature 8 at (48,5) (51,2) (65,3) (82,5)&lt;br /&gt;
|-&lt;br /&gt;
|  5 warp ||  2 || (51,0) || None&lt;br /&gt;
|-&lt;br /&gt;
|  8 warp ||  6 || (71,0) || None / shares with level 6&lt;br /&gt;
|-&lt;br /&gt;
|  9 warp ||  7 || (80,0) || TODO&lt;br /&gt;
|-&lt;br /&gt;
| 10 warp ||  1 || (20,0) || None&lt;br /&gt;
|-&lt;br /&gt;
| 6 warp (bug) ||  -1 || TODO || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;spiders&amp;quot; in level 3 are the first creature found in the tileset, with each subsequent level using the next creature in the tileset, so the order the creatures appear in the tileset is the same order as they appear across all the levels.  Each level can have between zero and four creatures, but they will always be the same type of creature.  Two different creatures cannot appear in the same level.&lt;br /&gt;
&lt;br /&gt;
The level chunk in the list above is the &amp;quot;file&amp;quot; the level appears in (because some levels share the same files.)&lt;br /&gt;
&lt;br /&gt;
The level 6 warp zone is a well-known bug, and will be loaded from address 0x2932B (see more on [[Dangerous Dave/Cheats]]).&lt;br /&gt;
&lt;br /&gt;
Warp zones are mapped in the array starting at 0x2583A, each entry is a 2-word number specifying the target warp zone (or 0 if there is no warp zone): (0, 0, 0, 0, 2, 0, 0, 6, 7, 1). That is the reason for the level 6 buggy warp zone - 0 is loaded from the array, so a completely unrelated level data is loaded from address 0x2932B.&lt;br /&gt;
There is a good [https://github.com/yo-yo-yo-jbo/dangerous_dave writeup] by &#039;&#039;yo-yo-yo-jbo&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Initial level state ===&lt;br /&gt;
&lt;br /&gt;
The initial state for each level (such as player start position) is hard-coded in the .exe at offset 0x257E8.  Each value is repeated 10 times, once for each level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][10] || motionFlags || Initial flags to set for player motion, primarily to set the &#039;falling&#039; flag if the start point is in the air.  Valid values are 0x24 (stationary) and 0x28 (falling).  This is a bit field and the other flags generally are not useful, with the possible exception of 0x01 which will start with the jetpack on.  If 0x20 is omitted the game will glitch badly as it seems this flag may cause the game to scroll to that position, so without it the map does not get scrolled into position properly.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][10] || startX || X-coordinate of player&#039;s initial start position, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][10] || startY || Y-coordinate of player&#039;s initial start position, in pixels&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The warp zones are handled differently, and things like the player starting Y-coordinate is hard-coded for all warp zones at the following locations.  The 10-entry arrays use the main level number, so entering a warp zone from level 6 will use the 6th entry in the array (which has index 5 as they start from index 0).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! .exe offset !! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1710 || UINT16LE || warpZoneStartY || Y-coordinate of player&#039;s start position for ALL warp zones, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| 0x1716 || UINT16LE || warpZoneMotionFlags || Player motion flags for ALL warp zones, see &amp;lt;tt&amp;gt;motionFlags&amp;lt;/tt&amp;gt; as above&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 valign=top| 0x25862 || UINT16LE[10] || warpZoneScrollOffset || Number of tiles to scroll the map horizontally&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE[10] || warpZoneStartX || X-coordinate of player&#039;s initial start position, in pixels, relative to the screen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;warpZoneScrollOffset&amp;lt;/tt&amp;gt; controls which part of the map is drawn on the screen, and the &amp;lt;tt&amp;gt;warpZoneStartX&amp;lt;/tt&amp;gt; controls where the player appears on the screen, so the two must work in tandem to get the player to appear at the desired point within the level.&lt;br /&gt;
&lt;br /&gt;
Since in the original game entering a warp zone involves jumping off the edge of a level, followed by a &amp;quot;falling down a hole&amp;quot; animation, by default all warp zones start with the player continuing this fall.  This is why there is only one player state and motion flag for all warp zones.&lt;br /&gt;
&lt;br /&gt;
=== Monster data ===&lt;br /&gt;
&lt;br /&gt;
At offset 0x25b66 in the .exe file the following structure is repeated 10 times, once for each level.  Note that each element within the structure is further repeated four times, once for each monster within the level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][4] || monsterEnabled || Set to 0x0001 to enable this monster, 0x0000 to omit it from the level&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || pixelX || X-coordinate of each monster&#039;s start point, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || pixelY || Y-coordinate of each monster&#039;s start point, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || offset || Start the path this many points in.  Not used in the original levels.  When more than one monster is on the screen at the same time, this can help disguise the fact that they are all following the same path.  Do not set this beyond the end of the path array or the monster will fly off the screen and possibly the game may crash. {{TODO|Could this be used to fit more than one path into a level?  It would depend on where it loops back to at the end of the path.  It should at least be possible to use it to provide an initial path followed as a one-off, before the monster then returns to looping through the main path.}}&lt;br /&gt;
|-&lt;br /&gt;
| INT16LE[4] || calmness || Lower numbers cause more frequent firing, higher numbers less frequent.  0x7FFF is the max which all but prevents firing.  Negative numbers seem to act the same as 0, firing at the maximum rate.&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4&amp;amp;nbsp;*&amp;amp;nbsp;5] || padding || 40 bytes of padding.  Although these look like an additional five properties for each level&#039;s monster, changing these values appears to have no effect.  The game appears to use this area as scratch space when the .exe is in memory, writing current monster state here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tileinfo ===&lt;br /&gt;
&lt;br /&gt;
At offset 0x2590A in the .exe there is an array of 10 UINT16LE values.  These are map tile numbers of ten collectable items.  The first entry in this array is 0x0002, which is the map tile of the level exit door.&lt;br /&gt;
&lt;br /&gt;
Immediately following this is an array of another 10 UINT16LE values.  These contain the number of points awarded when each of the 10 items are collected.  The first entry in this list is 2000, which will award the player 2000 points for &amp;quot;collecting&amp;quot; the end-level door.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The initial investigation and tile data documentation was done by [[User:Levellass|Levellass]], with [[User:Malvineous|Malvineous]] discovering how the initial level info, tileinfo, path and monster data works.  [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html MaiZure] worked out most of the creature locations.  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Dangerous Dave]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave_Level_format&amp;diff=11070</id>
		<title>Dangerous Dave Level format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Dangerous_Dave_Level_format&amp;diff=11070"/>
		<updated>2023-06-20T18:48:47Z</updated>

		<summary type="html">&lt;p&gt;Yo-yo-yo-jbo: /* Constants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 1&lt;br /&gt;
 | Tile size = 16&amp;amp;times;16&lt;br /&gt;
 | Viewport = 320&amp;amp;times;160&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Dangerous Dave}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Dangerous Dave]] stores its levels consecutively in the executable starting at offset 0x26E0A (after [[UNLZEXE]]&#039;ing.)  Each level is 1280 bytes long.  There is also a small 10&amp;amp;times;7 level shown on the title screen, located at offset 0x25ea4.  This small level omits the path data and padding and only contains the &amp;lt;tt&amp;gt;tiles&amp;lt;/tt&amp;gt; field shown in the next section.&lt;br /&gt;
&lt;br /&gt;
== Level structure ==&lt;br /&gt;
&lt;br /&gt;
Each level is stored in the following structure:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][256] || path || Path data&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][100*10] || tiles || Tile data, left to right, top to bottom&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][24] || padding || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Path data ===&lt;br /&gt;
&lt;br /&gt;
This block of data is used to specify a path for creatures to follow.  It is an array of up to 128 X,Y coordinate pairs, with each pair being a signed 8-bit integer (so two bytes * 128 pairs == 256 bytes max.)  Each value dictates the number of pixels the creature should move in both the X and Y direction.  The end of the path is signified by storing 0xEA in both coordinates, and upon reaching this point the path repeats from the beginning.  An example path might be&lt;br /&gt;
&lt;br /&gt;
 05 03 FB FD EA EA&lt;br /&gt;
&lt;br /&gt;
Which means:&lt;br /&gt;
&lt;br /&gt;
 05 03   # Move five pixels to the right and three pixels down&lt;br /&gt;
 FB FD   # Move five pixels left and three pixels up, i.e. return to the original position&lt;br /&gt;
 EA EA   # End of path&lt;br /&gt;
&lt;br /&gt;
This would cause the creature to oscillate between two points.  (Since the values are signed, 0xFF == -1, 0xFE == -2, etc.)&lt;br /&gt;
&lt;br /&gt;
Since the paths consist of relative movement instructions, a path that does not return the creature to its starting point at termination will cause the creature to gradually migrate off the edge of the level, as the misalignment accumulates after each loop iteration.  However this could be used for creative effect, as the creature will then reappear at the opposite edge of the level.&lt;br /&gt;
&lt;br /&gt;
It appears that only one path can be defined in each level, and all creatures follow it the same (although as the path consists of relative movement instructions, the creatures can trace out the same path at different locations in the level.)&lt;br /&gt;
&lt;br /&gt;
=== Tile data ===&lt;br /&gt;
[[Image:ddave-level01-vga.png|thumb|480px|Level 1 with VGA tiles. Often, a level and a bonus level are stored together.]]&lt;br /&gt;
&lt;br /&gt;
The level consists of 1000 bytes of tile data, one byte per tile arranged in a 100x10 array.&lt;br /&gt;
&lt;br /&gt;
The byte values are indices into the [[Dangerous Dave Tileset Format|tileset]], so a byte of value 0x02 means tile number 2 should be drawn in that location (with tile number 0 being the first image in the tileset.)  Tile number 0 is actually a black square, so a byte value of 0x00 is used for empty space the player can walk in.&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
&lt;br /&gt;
Both the player starting point and the creatures which appear in each level are hard coded in the .exe file as follows, with (0,0) being the top-left corner of the level and (99,9) being the lower right tile.  See below for where these values are stored and how to change them.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Level !! Level chunk !! Start !! Creatures&lt;br /&gt;
|-&lt;br /&gt;
|  1      ||  1 || (2,8) || None&lt;br /&gt;
|-&lt;br /&gt;
|  2      ||  2 || (1,8) || None&lt;br /&gt;
|-&lt;br /&gt;
|  3      ||  3 || (2,5) || Creature 1 (spiders) at (44,4) and (59,4) - each spider is ~2x2 tiles in size&lt;br /&gt;
|-&lt;br /&gt;
|  4      ||  4 || (1,5) || Creature 2 (spiky ball) at (32, 2)&lt;br /&gt;
|-&lt;br /&gt;
|  5      ||  5 || (2,8) || 3x Creature 3 (sun) at (15,3) (33,3) (49,3)&lt;br /&gt;
|-&lt;br /&gt;
|  6      ||  6 || (2,8) || 4x Creature 4 (bones) at (10,8) (28,8) (45,2) (40,8)&lt;br /&gt;
|-&lt;br /&gt;
|  7      ||  7 || (1,2) || 4x Creature 5 (UFOs) at (5,2) (16,1) (46,2) (56,3)&lt;br /&gt;
|-&lt;br /&gt;
|  8      ||  8 || (2,8) || 3x Creature 6 at (53,5) (72,2) (84,1)&lt;br /&gt;
|-&lt;br /&gt;
|  9      ||  9 || (6,1) || 4x Creature 7 at (35, 8) (41,8) (49,8) (65,8)&lt;br /&gt;
|-&lt;br /&gt;
| 10      || 10 || (2,8) || 4x Creature 8 at (48,5) (51,2) (65,3) (82,5)&lt;br /&gt;
|-&lt;br /&gt;
|  5 warp ||  2 || (51,0) || None&lt;br /&gt;
|-&lt;br /&gt;
|  8 warp ||  6 || (71,0) || None / shares with level 6&lt;br /&gt;
|-&lt;br /&gt;
|  9 warp ||  7 || (80,0) || TODO&lt;br /&gt;
|-&lt;br /&gt;
| 10 warp ||  1 || (20,0) || None&lt;br /&gt;
|-&lt;br /&gt;
| 6 warp (bug) ||  -1 || TODO || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;spiders&amp;quot; in level 3 are the first creature found in the tileset, with each subsequent level using the next creature in the tileset, so the order the creatures appear in the tileset is the same order as they appear across all the levels.  Each level can have between zero and four creatures, but they will always be the same type of creature.  Two different creatures cannot appear in the same level.&lt;br /&gt;
&lt;br /&gt;
The level chunk in the list above is the &amp;quot;file&amp;quot; the level appears in (because some levels share the same files.)&lt;br /&gt;
&lt;br /&gt;
The level 6 warp zone is a well-known bug, and will be loaded from address 0x2932B (see more on [[Dangerous Dave/Cheats]]).&lt;br /&gt;
&lt;br /&gt;
=== Initial level state ===&lt;br /&gt;
&lt;br /&gt;
The initial state for each level (such as player start position) is hard-coded in the .exe at offset 0x257E8.  Each value is repeated 10 times, once for each level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][10] || motionFlags || Initial flags to set for player motion, primarily to set the &#039;falling&#039; flag if the start point is in the air.  Valid values are 0x24 (stationary) and 0x28 (falling).  This is a bit field and the other flags generally are not useful, with the possible exception of 0x01 which will start with the jetpack on.  If 0x20 is omitted the game will glitch badly as it seems this flag may cause the game to scroll to that position, so without it the map does not get scrolled into position properly.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][10] || startX || X-coordinate of player&#039;s initial start position, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][10] || startY || Y-coordinate of player&#039;s initial start position, in pixels&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The warp zones are handled differently, and things like the player starting Y-coordinate is hard-coded for all warp zones at the following locations.  The 10-entry arrays use the main level number, so entering a warp zone from level 6 will use the 6th entry in the array (which has index 5 as they start from index 0).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! .exe offset !! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1710 || UINT16LE || warpZoneStartY || Y-coordinate of player&#039;s start position for ALL warp zones, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| 0x1716 || UINT16LE || warpZoneMotionFlags || Player motion flags for ALL warp zones, see &amp;lt;tt&amp;gt;motionFlags&amp;lt;/tt&amp;gt; as above&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 valign=top| 0x25862 || UINT16LE[10] || warpZoneScrollOffset || Number of tiles to scroll the map horizontally&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE[10] || warpZoneStartX || X-coordinate of player&#039;s initial start position, in pixels, relative to the screen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;warpZoneScrollOffset&amp;lt;/tt&amp;gt; controls which part of the map is drawn on the screen, and the &amp;lt;tt&amp;gt;warpZoneStartX&amp;lt;/tt&amp;gt; controls where the player appears on the screen, so the two must work in tandem to get the player to appear at the desired point within the level.&lt;br /&gt;
&lt;br /&gt;
Since in the original game entering a warp zone involves jumping off the edge of a level, followed by a &amp;quot;falling down a hole&amp;quot; animation, by default all warp zones start with the player continuing this fall.  This is why there is only one player state and motion flag for all warp zones.&lt;br /&gt;
&lt;br /&gt;
=== Monster data ===&lt;br /&gt;
&lt;br /&gt;
At offset 0x25b66 in the .exe file the following structure is repeated 10 times, once for each level.  Note that each element within the structure is further repeated four times, once for each monster within the level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][4] || monsterEnabled || Set to 0x0001 to enable this monster, 0x0000 to omit it from the level&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || pixelX || X-coordinate of each monster&#039;s start point, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || pixelY || Y-coordinate of each monster&#039;s start point, in pixels&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4] || offset || Start the path this many points in.  Not used in the original levels.  When more than one monster is on the screen at the same time, this can help disguise the fact that they are all following the same path.  Do not set this beyond the end of the path array or the monster will fly off the screen and possibly the game may crash. {{TODO|Could this be used to fit more than one path into a level?  It would depend on where it loops back to at the end of the path.  It should at least be possible to use it to provide an initial path followed as a one-off, before the monster then returns to looping through the main path.}}&lt;br /&gt;
|-&lt;br /&gt;
| INT16LE[4] || calmness || Lower numbers cause more frequent firing, higher numbers less frequent.  0x7FFF is the max which all but prevents firing.  Negative numbers seem to act the same as 0, firing at the maximum rate.&lt;br /&gt;
|-&lt;br /&gt;
| UINT16LE[4&amp;amp;nbsp;*&amp;amp;nbsp;5] || padding || 40 bytes of padding.  Although these look like an additional five properties for each level&#039;s monster, changing these values appears to have no effect.  The game appears to use this area as scratch space when the .exe is in memory, writing current monster state here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Tileinfo ===&lt;br /&gt;
&lt;br /&gt;
At offset 0x2590A in the .exe there is an array of 10 UINT16LE values.  These are map tile numbers of ten collectable items.  The first entry in this array is 0x0002, which is the map tile of the level exit door.&lt;br /&gt;
&lt;br /&gt;
Immediately following this is an array of another 10 UINT16LE values.  These contain the number of points awarded when each of the 10 items are collected.  The first entry in this list is 2000, which will award the player 2000 points for &amp;quot;collecting&amp;quot; the end-level door.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The initial investigation and tile data documentation was done by [[User:Levellass|Levellass]], with [[User:Malvineous|Malvineous]] discovering how the initial level info, tileinfo, path and monster data works.  [http://www.maizure.org/projects/lets-make-dangerous-dave/index.html MaiZure] worked out most of the creature locations.  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Dangerous Dave]]&lt;/div&gt;</summary>
		<author><name>Yo-yo-yo-jbo</name></author>
	</entry>
</feed>