<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://7800.8bitdev.org/index.php?action=history&amp;feed=atom&amp;title=The_Atari_7800_BEAD_Executable_Specification</id>
		<title>The Atari 7800 BEAD Executable Specification - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://7800.8bitdev.org/index.php?action=history&amp;feed=atom&amp;title=The_Atari_7800_BEAD_Executable_Specification"/>
		<link rel="alternate" type="text/html" href="https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;action=history"/>
		<updated>2026-06-26T09:20:10Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;diff=603&amp;oldid=prev</id>
		<title>MSaarna: /* Implementation Notes */</title>
		<link rel="alternate" type="text/html" href="https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;diff=603&amp;oldid=prev"/>
				<updated>2019-07-19T16:27:10Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Implementation Notes&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:27, 19 July 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot; &gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* All reserved bits must be set to 0. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* All reserved bits must be set to 0. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The BEAD executable must be the same size as specified in the DSS field.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The BEAD executable must be the same size as specified in the DSS field.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* DSS types that don't have memory covering the 6502 reset vector will begin execution from the BEAD header. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Even for &lt;/del&gt;executables with DSS types that do cover the reset vector, it's strongly encouraged that code execution beginning at the header location works correctly, as some BEAD loader implementations may not begin execution at the reset vector address.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* DSS types that don't have memory covering the 6502 reset vector will begin execution from the BEAD header. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;For &lt;/ins&gt;executables with DSS types that do cover the reset vector, it's strongly encouraged that code execution beginning at the header location works correctly, as some BEAD loader implementations may not begin execution at the reset vector address.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* BEAD loaders won't relocate any absolute references, so executable code should be assembled specifically for the target location.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* BEAD loaders won't relocate any absolute references, so executable code should be assembled specifically for the target location.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MSaarna</name></author>	</entry>

	<entry>
		<id>https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;diff=602&amp;oldid=prev</id>
		<title>MSaarna: /* Implementation Notes */</title>
		<link rel="alternate" type="text/html" href="https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;diff=602&amp;oldid=prev"/>
				<updated>2019-07-19T16:15:12Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Implementation Notes&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:15, 19 July 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot; &gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* All reserved bits must be set to 0. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* All reserved bits must be set to 0. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The BEAD executable must be the same size as specified in the DSS field.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The BEAD executable must be the same size as specified in the DSS field.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* DSS types that don't have memory covering the 6502 reset vector will begin execution from the BEAD header.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* DSS types that don't have memory covering the 6502 reset vector will begin execution from the BEAD header&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Even for executables with DSS types that do cover the reset vector, it's strongly encouraged that code execution beginning at the header location works correctly, as some BEAD loader implementations may not begin execution at the reset vector address&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* BEAD loaders won't relocate any absolute references, so code should be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;compiled &lt;/del&gt;for the target location.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* BEAD loaders won't relocate any absolute references, so &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;executable &lt;/ins&gt;code should be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;assembled specifically &lt;/ins&gt;for the target location.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Extended BEAD Header==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Extended BEAD Header==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MSaarna</name></author>	</entry>

	<entry>
		<id>https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;diff=601&amp;oldid=prev</id>
		<title>MSaarna: Created page with &quot;==Overview==  An Atari 7800 BEAD executable consists of a BEAD header, followed by regular executable code.  The name &quot;BEAD&quot; is derived from the first two magic bytes within t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://7800.8bitdev.org/index.php?title=The_Atari_7800_BEAD_Executable_Specification&amp;diff=601&amp;oldid=prev"/>
				<updated>2019-07-19T16:04:08Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Overview==  An Atari 7800 BEAD executable consists of a BEAD header, followed by regular executable code.  The name &amp;quot;BEAD&amp;quot; is derived from the first two magic bytes within t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
An Atari 7800 BEAD executable consists of a BEAD header, followed by regular executable code.  The name &amp;quot;BEAD&amp;quot; is derived from the first two magic bytes within the header, that serve to identify the format - $BE $AD.&lt;br /&gt;
&lt;br /&gt;
The BEAD header allows a 6502-based BEAD loader to easily determine the memory and hardware requirements of the executable. BEAD executables require only the most basic storage features, so they can be easily stored and loaded directly from various media sources, such as RAM, SaveKey, and online sources. When they reside on a filesystem, the extension for BEAD executables is *.b78.&lt;br /&gt;
&lt;br /&gt;
Another notable feature of the BEAD executable, is the fact that the header is part of the program code, and completely executable by the 6502. ($BE $AD $## being the assembly comand &amp;quot;LDX $##AD,y&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Minimal BEAD Header==&lt;br /&gt;
&lt;br /&gt;
A minimal BEAD header consists of the two identifying bytes, $BE $AD, and a format specifier byte.&lt;br /&gt;
&lt;br /&gt;
 $BE,$AD,[F1]&lt;br /&gt;
&lt;br /&gt;
The [F1] bits are defined as %vHYPRDSS, where...&lt;br /&gt;
&lt;br /&gt;
 v == Reserved (set to '0')&lt;br /&gt;
 H == High Score Cartridge&lt;br /&gt;
 Y == Yamaha&lt;br /&gt;
 P == Pokey @ $450&lt;br /&gt;
 R == ROF @ $4000&lt;br /&gt;
 DSS == Data Type and Size&lt;br /&gt;
   \ %000 : 16K @ $C000 - $FFFF&lt;br /&gt;
     %001 : 32K @ $8000 - $FFFF &lt;br /&gt;
     %010 : 48K @ $4000 - $FFFF&lt;br /&gt;
     %011 : reserved&lt;br /&gt;
     %100 : reserved&lt;br /&gt;
     %101 : 4K @ $1800 - $27FF&lt;br /&gt;
     %110 : 16K @ $4000 - $7FFF&lt;br /&gt;
     %111 : reserved&lt;br /&gt;
&lt;br /&gt;
===Implementation Notes===&lt;br /&gt;
* All reserved bits must be set to 0. &lt;br /&gt;
* The BEAD executable must be the same size as specified in the DSS field.&lt;br /&gt;
* DSS types that don't have memory covering the 6502 reset vector will begin execution from the BEAD header.&lt;br /&gt;
* BEAD loaders won't relocate any absolute references, so code should be compiled for the target location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Extended BEAD Header==&lt;br /&gt;
&lt;br /&gt;
An optional extended BEAD header allows for a name or description to also be embedded in the executable.&lt;br /&gt;
&lt;br /&gt;
 $BE,$AD,[F1],$18,$90,[SS],&amp;quot;Description&amp;quot;,0&lt;br /&gt;
&lt;br /&gt;
The first three bytes are the familiar minimal BEAD header. The following bytes $18,$90 identify that a description string follows, with the [SS] byte specifying the total number of bytes in the string. (including the zero terminator.) &lt;br /&gt;
&lt;br /&gt;
The description text itself is ASCII encoded, and may contain any non-control ASCII character, though BEAD loaders may implement the display, or non-display, of any description text. For this reason it's recommended to stick to basic alphanumeric text.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the $18,$90 bytes are the 6502 CLC and BCC opcodes, so the [SS] value can easily be generated in assembly code, as with the following example.&lt;br /&gt;
&lt;br /&gt;
  .BYTE $BE,$AD,%00000010&lt;br /&gt;
  CLC&lt;br /&gt;
  BCC DescriptionEnd&lt;br /&gt;
  .BYTE &amp;quot;My Description&amp;quot;,0&lt;br /&gt;
 DescriptionEnd:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Chained BEAD Support==&lt;br /&gt;
&lt;br /&gt;
The Atari 7800 SaveKey doesn't have a native filesystem. If BEAD executables are sequentially stored on the SaveKey (ie. &amp;quot;chained&amp;quot;) loaders may optionaly support the user selecting to run a particular BEAD in the chain.&lt;br /&gt;
&lt;br /&gt;
Chained BEAD support may also be applied to other storage devices without a filesystem.&lt;br /&gt;
&lt;br /&gt;
==Defines==&lt;br /&gt;
&lt;br /&gt;
To assist with BEAD header creation, you may wish to use the following assembly definitions.&lt;br /&gt;
&lt;br /&gt;
 BDHSC   = %01000000&lt;br /&gt;
 BDYM    = %00100000&lt;br /&gt;
 BDPOKEY = %00010000&lt;br /&gt;
 BDROF   = %00001000&lt;br /&gt;
 BD16K   = %00000000&lt;br /&gt;
 BD32K   = %00000001&lt;br /&gt;
 BD48K   = %00000010&lt;br /&gt;
 BD1800  = %00000101&lt;br /&gt;
 BD4000  = %00000110&lt;br /&gt;
&lt;br /&gt;
These will allow you to generate BEAD headers with improved readability, as in the following example.&lt;br /&gt;
&lt;br /&gt;
  .byte $BE,$AD,(BDHSC|BDPOKEY|BD1800)&lt;/div&gt;</summary>
		<author><name>MSaarna</name></author>	</entry>

	</feed>