

                       Minimalistic Atari-8-Bit SDK


The SDK combines a simple Unix-like environment, the VIM text editor, and the
64TASS 6502 assembler with a customizable Atari-styled terminal for bringing
the programmer into the mood for distraction-free 6502 programming.

The component requires three file systems. The _config_ file system stores
the vim and terminal configuration. It is intended to be connected to the
recall fs. If empty, defaults will be installed automatically. The _rw_
file system contains the source code to work on. The _vm_ file system is the
bridge to a running atari800 emulator.

It is recommended to deploy the atari800 emulator alongside the a8-sdk and
assign the same directory as VM file system to each of them. Thereby, the
a8-sdk becomes able to supply the built programs to the emulator and reboot
it instantly.

Work flow
---------

You can find a small example project at _/tmp/example/_. The directory
contains a small test.s assembly program along with a Makefile. The default
rule of the Makefile builds the test.xex executable from the test.s source
using the 64TASS assembler, copies test.xex to the VM directory, and triggers
the reboot of the atari800 emulator. The latter step is done by the little
hack at /bin/reboot_atari800, blunty butchering /vm/init.config_ via sed.
In consequence, a plain 'make' command performs all steps needed for building
and running the program.

To tighten the edit-run loop a little bit more, the default VIM config
at _/config/vimrc_ maps the F2 key to the saving of the file, followed by
the invocation of make. So most of the time can be spent in vim, working
on the code, and casually pressing F2 to see the outcome.

For diving deeply into the example, you can find the 64TASS assembler
documented at /share/doc/64tass/README.

Work space
----------

Besides the a8-sdk window and the atari800 emulator window, it is useful to
have a calculator at hand because assembly programming on the 6502 often
requires dealing with hex, decimal, and binary numbers. For this, one can
use the _rcalc_ component, which is a simple interactive wrapper around
the pcalc command-line calculator. Hence, we end up with three essential
windows that should best remain in plain sight all the time.

Genode's window layouter ensures that the atari800 window appears at the same
position each time when re-spawned. However, we can go a step further by
using a dedicated virtual desktop for hosting only the essentials without any
other distraction. First, one might prefer to remove the window borders for
maximized windows. This can be achieved by connecting the 'decorator_margins'
ROM of the window layouter to the black-hole component (at _/config/deploy_).
Second, to attain a fixed layout, one can tweak the window-layouter rules at
_recall/window_layouter/_. The following example subdivides the screen 2 into
a 'left' and 'right' column, and subdivides the latter into an upper 'emu' and
a lower 'calc' row. It then assigns applications according to their labels to
the defined target. The fixed width of the right column prompts the atari800
emulator to appear at a suitable size while leaving most of the screen space
for the editing area on the left.

! <rules>
!   ...
!   <screen name="screen_2" display="primary">
!     <column name="left"/>
!     <column name="right" width="670">
!       <row name="emu" height="480"/>
!       <row name="calc"/>
!     </column>
!   </screen>
!   ...
!   <assign label="a8-sdk -> terminal -> " target="left" maximized="yes"/>
!   <assign label="rcalc -> terminal -> " target="calc"/>
!   <assign label="atari800 -> " target="emu" xpos="0" ypos="0" width="672" height="480"/>
!   ...
! </rules>

Tweaks
------

The appearance of the SDK window can be tuned by editing _/config/terminal_.
Changes take immediate effect once the file is saved. Try fiddling around
with the various font-rendering attributes and change the colors to your
liking.

Copy-and-paste
--------------

Both the a8-sdk and rcalc use Genode's regular terminal, which supports text
selection via the mouse while keeping the shift key pressed. Clipboard content
can be pasted via the middle mouse button. This is sometimes useful for coping
numbers between the editing window and the calculator. For larger exchange of
date, it is best to access the _rw_ file system from the outside of the SDK.

Limitations
-----------

* Without window borders, there is no clear visual indication of the keyboard
  focus. This can be confusing when switching back and forth between the
  editing window and the calculator.
