Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenjc committed Jul 21, 2024
1 parent 0e25ddc commit 967b833
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/disk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



INDEX FILE
Index File
==========
Figure from ROS manual p. 17 gave a hint, but INDEX file does not
use the File Name field. The INDEX file descriptor resides in
Expand Down
14 changes: 14 additions & 0 deletions docs/source/hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,26 @@ setting the initial value of the program counter.
}
ros
^^^
The **ros** module provides mappings from addresses to variable names
as given in the ROS User's Manual on pages 2 - 4. It also holds
functions to print the individual fields of the INDEX nd LFILE
file descriptors.


disk
^^^^
The **disk** module is in its infancy. But the aim is to emulate a
spinning disk with loadable files on it.


Applications
============

The previous modules can be combined to achieve different functions


disassembly
^^^^^^^^^^^

Expand Down
14 changes: 8 additions & 6 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ Help wanted, please get in touch ;-)

information


.. toctree::
:caption: Emulator
:caption: System
:maxdepth: 3
:hidden:

hooks
running
q1io
disk


.. toctree::
:caption: System
:caption: Emulator
:maxdepth: 3
:hidden:

q1io
disk
hooks
running
79 changes: 79 additions & 0 deletions docs/source/running.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

Running the emulator
====================


Interactive Session
^^^^^^^^^^^^^^^^^^^

If you just want to interact with the Q1 via the keyboard you
should use the following invocation

.. code-block:: console
> python3 emulator.py -n -d # no instr. decode, no hexdump
Typed-in keys are passed to the Q1 system via fake interrupts.
Characters are echoed to the display, so you can see what you are doing,
but the implementation is not great. However it currently helps me in
my investigations.


The keyboard interaction is currently tailored to my MacBook Pro
keyboard. If you are using a different system you should make your own
bindings. In this case the printed values for non printable characters
are output during an interactive session.

On my MacBook Pro the following Q1 keys are implemented. Here,
they referenced by their variable names, not the names printed on
the keys (see emulator.py):

.. list-table:: ROMs
:header-rows: 1

* - Key Name
- MacBook key
* - GO
- Option-g
* - CORR
- Backspace
* - RETURN
- Return (LF -> CR)
* - CLEAR ENTRY
- Option-c
* - INSERT MODE
- Option-m

In addition, I use Option-b to trigger hexdumps (much used) and Option-p
to print Z80 registers (rarely used).

Execution decode
^^^^^^^^^^^^^^^^

.. code-block:: console
> python3 emulator.py -n # instruction decode, no hexdump
Breakpoint
^^^^^^^^^^
You might want to halt the program and printout various information
when the Program Counter reaches a certain address. To do this:

.. code-block:: console
> python3 emulator.py -b 0x1ff
This will do a hexdump of the RAM part of the memory, show the previous
10 instructions and dump information about INDEX and LFILE file descriptors.


Triggerpoint
^^^^^^^^^^^^
If you want detailed debug, but only starting from a certain Program Counter,
do This

.. code-block:: console
> python3 emulator.py -n -d -b 0x1ff

0 comments on commit 967b833

Please sign in to comment.