diff --git a/skoolkit/defaults.py b/skoolkit/defaults.py
index 17af5405..7271e8d4 100644
--- a/skoolkit/defaults.py
+++ b/skoolkit/defaults.py
@@ -65,6 +65,7 @@
Copyright=
Created=Created using SkoolKit #VERSION.
DisassemblyTableNumCols=5
+Download=
; Font=
; Game=
InputRegisterTableHeader=Input
@@ -556,6 +557,9 @@
{Game[Release]}
{Game[Copyright]}
{Game[Created]}
+<# if(Game[Download]) #>
+{Game[Download]}
+<# endif #>
"""
diff --git a/sphinx/source/changelog.rst b/sphinx/source/changelog.rst
index 2f7e2f23..7f7fe635 100644
--- a/sphinx/source/changelog.rst
+++ b/sphinx/source/changelog.rst
@@ -23,6 +23,9 @@ Changelog
variable
* Added support to the :ref:`LET` macro for setting individual key-value pairs
in dictionary variables
+* Added the ``Download`` parameter to the :ref:`ref-Game` section (for
+ specifying a download message/link to appear in the :ref:`t_footer` of every
+ page)
* Added the ``LinkInternalOperandsMinDistance`` parameter to the
:ref:`ref-Game` section (for avoiding hyperlinks to nearby instructions)
* Fixed how the 'ADC A,*', 'SBC A,*', 'ADC HL,rr' and 'SBC HL,rr' instructions
diff --git a/sphinx/source/html-templates.rst b/sphinx/source/html-templates.rst
index 0be9ec7e..891554ce 100644
--- a/sphinx/source/html-templates.rst
+++ b/sphinx/source/html-templates.rst
@@ -305,6 +305,10 @@ To see the default ``footer`` template, run the following command::
$ skool2html.py -r Template:footer
+.. versionchanged:: 9.4
+ Added the download message/link specified by the ``Download`` parameter in
+ the :ref:`ref-Game` section.
+
.. versionadded:: 5.0
.. _t_home:
diff --git a/sphinx/source/ref-files.rst b/sphinx/source/ref-files.rst
index 749e8fe9..dab747e8 100644
--- a/sphinx/source/ref-files.rst
+++ b/sphinx/source/ref-files.rst
@@ -270,6 +270,8 @@ Recognised parameters are:
* ``DisassemblyTableNumCols`` - the number of columns in the disassembly table
on disassembly pages (default: 5); this value is used by the :ref:`t_asm` and
:ref:`t_asm_single_page` templates
+* ``Download`` - the download message/link that appears in the footer of every
+ page (default: '')
* ``Font`` - the base name of the font file to use (default: None); multiple
font files can be declared by separating their names with semicolons
* ``Game`` - the name of the game, which appears in the title of every page,
@@ -324,7 +326,8 @@ hexadecimal addresses if the ``--hex`` option is used with
+---------+-------------------------------------------------------------------+
| Version | Changes |
+=========+===================================================================+
-| 9.4 | Added the ``LinkInternalOperandsMinDistance`` parameter |
+| 9.4 | Added the ``Download`` and ``LinkInternalOperandsMinDistance`` |
+| | parameters |
+---------+-------------------------------------------------------------------+
| 8.7 | Added the ``AudioFormats`` parameter |
+---------+-------------------------------------------------------------------+
diff --git a/tests/test_skoolhtml.py b/tests/test_skoolhtml.py
index 4e213bca..c6cfe408 100644
--- a/tests/test_skoolhtml.py
+++ b/tests/test_skoolhtml.py
@@ -6181,6 +6181,31 @@ def test_parameter_DisassemblyTableNumCols(self):
def test_parameter_DisassemblyTableNumCols_containing_skool_macro(self):
self._test_Game_parameter_containing_skool_macro('DisassemblyTableNumCols')
+ def test_parameter_Download(self):
+ ref = """
+ [Game]
+ Created=
+ Download=Get the source
+
+ [Template:Asm]
+ <# include(footer) #>
+ """
+ skool = "c32768 RET"
+ writer = self._get_writer(ref=ref, skool=skool)
+ writer.write_asm_entries()
+ exp_html = """
+
+ """
+ self._assert_content_equal(dedent(exp_html).strip(), 'asm/32768.html')
+
+ def test_parameter_Download_containing_skool_macro(self):
+ self._test_Game_parameter_containing_skool_macro('Download')
+
def test_parameter_Expand(self):
skool = """
; Routine