Skip to content

Commit

Permalink
Add the 'housenka' tape-sampling loop accelerator
Browse files Browse the repository at this point in the history
  • Loading branch information
skoolkid committed Sep 24, 2023
1 parent c80ec34 commit 2fd7269
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
21 changes: 21 additions & 0 deletions skoolkit/loadsample.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,27 @@ def __init__(self, name, code, offset, in_time, loop_time, loop_r_inc, ear_mask,
0 # Zero flag is reset upon edge detection by AND $40
),

'housenka': Accelerator(
'housenka',
[
0x04, # LD_SAMPLE INC B [4]
0xC8, # RET Z [11/5]
0x3E, 0xFE, # LD A,$FE [7]
0xDB, 0xFE, # IN A,($FE) [11]
0x1F, # RRA [4]
0xD0, # RET NC [11/5]
0xA9, # XOR C [4]
0xE6, 0x20, # AND $20 [7]
0x28, 0xF3, # JR Z,LD_SAMPLE [12/7]
],
0, # Offset of INC B instruction from start of loop
16, # 16 T-states from INC B until IN A,($FE)
59, # 59 T-states per loop iteration
9, # R register increment per loop iteration
0x20, # EAR mask
0 # Zero flag is reset upon edge detection by AND $20
),

'microprose': Accelerator(
'microprose',
[
Expand Down
4 changes: 2 additions & 2 deletions sphinx/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Changelog
* The output snapshot argument of :ref:`tap2sna.py` is now optional
* Added support to :ref:`tap2sna.py <tap2sna-conf>` for register pairs
(``r[bc]``, ``r[de]`` etc.) in the ``TraceLine`` configuration parameter
* Added the ``ernieware`` tape-sampling loop
:ref:`accelerator <tap2sna-accelerators>`
* Added the ``ernieware`` and ``housenka`` tape-sampling loop
:ref:`accelerators <tap2sna-accelerators>`
* Added support to :ref:`trace.py` for executing machine code in 128K snapshots
* Added support to :ref:`trace.py <trace-conf>` for reading configuration
from `skoolkit.ini`
Expand Down
3 changes: 2 additions & 1 deletion sphinx/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,7 @@ loop accelerators are:
* ``gargoyle2`` (various games created or published by Gargoyle Games)
* ``gremlin`` (various games published by Gremlin Graphics)
* ``gremlin2`` (Super Cars)
* ``housenka`` (Housenka)
* ``microprose`` (F-15 Strike Eagle)
* ``microsphere`` (Back to Skool, Contact Sam Cruise, Skool Daze, Sky Ranger)
* ``micro-style`` (Xenophobe)
Expand Down Expand Up @@ -1603,7 +1604,7 @@ Configuration parameters may also be set on the command line by using the
| | SZX snapshots; added the ``fe`` hardware state attribute; added |
| | support for register pairs (``r[bc]``, ``r[de]`` etc.) in the |
| | ``TraceLine`` configuration parameter; added the ``ernieware`` |
| | tape-sampling loop accelerator |
| | and ``housenka`` tape-sampling loop accelerators |
+---------+-------------------------------------------------------------------+
| 8.10 | Configuration is read from `skoolkit.ini` if present; added the |
| | ``--ini``, ``--show-config`` and ``--tape-analysis`` options; |
Expand Down
1 change: 1 addition & 0 deletions sphinx/source/man/tap2sna.py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ loop accelerators are:
| ``gargoyle2`` (various games created or published by Gargoyle Games)
| ``gremlin`` (various games published by Gremlin Graphics)
| ``gremlin2`` (Super Cars)
| ``housenka`` (Housenka)
| ``microprose`` (F-15 Strike Eagle)
| ``microsphere`` (Back to Skool, Contact Sam Cruise, Skool Daze, Sky Ranger)
| ``micro-style`` (Xenophobe)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tap2sna.py
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,7 @@ def test_sim_load_config_parameter_default_values(self):
output, error = self.run_tap2sna(tapfile)
self.assertEqual(error, '')
self.assertIsNone(kbtracer)
self.assertEqual(len(load_tracer.accelerators_in), 44)
self.assertEqual(len(load_tracer.accelerators_in), 45)
self.assertTrue(load_tracer.pause)
self.assertEqual(load_tracer.first_edge, 0)
self.assertEqual(load_tracer.polarity, 0)
Expand Down

0 comments on commit 2fd7269

Please sign in to comment.