#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
#+TITLE: BASIC applications collection
#+LANGUAGE: en
#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
#+LATEX_HEADER: \usepackage{parskip}
#+LATEX_HEADER: \usepackage[none]{hyphenat}
#+OPTIONS: H:20 num:20
#+OPTIONS: author:nil
* General
This collection contains lots of applications:
- Games.
- Graphics tests (2D/3D/4D).
- Algorithms tests.
- Utilities.
I wrote those applications largely more than 20 years ago, mostly in
QBasic. Some are even written in x86 assembly for use under DOS
operating system. Because programs are old, coding style and
commenting is often times bad. I'm now using artificial intelligence
to revive and modernize them one by one.
- These programs are free software: released under Creative Commons Zero
(CC0) license.
- Programs author:
- Svjatoslav Agejenko
- Homepage: https://svjatoslav.eu
- Email: mailto://svjatoslav@svjatoslav.eu
- [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
** Source code
- [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
- [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=summary][Browse Git repository online]]
- Clone Git repository using command:
: git clone https://www3.svjatoslav.eu/git/qbasicapps.git
* Installation and Usage
There are various ways to run legacy QBasic applications under Debian
GNU/Linux:
- Full system virtualization :: One way would be to use full system
virtualization with [[https://www.qemu.org/][QEMU]], [[https://www.virtualbox.org/][VirtualBox]] or [[https://www.vmware.com/products/desktop-hypervisor.html][VMware Workstation or
Player]]. After creating virtual machine, you need to obtain and
install some distribution of DOS like [[https://en.wikipedia.org/wiki/MS-DOS][MS-DOS]] or [[https://www.freedos.org/][FreeDOS]]. Within DOS
you can then use either Microsoft *QBasic* or Microsoft
*QuickBasic*. QBasic is already included in Microsoft DOS by
default. QuickBasic is more capable but must be obtained separately.
- QB64 :: [[https://qb64.com][QB64]] is mostly compatible with Microsoft BASIC variants and
can be used too.
- [[id:97ea6094-ade6-4c7d-aea9-9874acf9dc86][DOSBox + MS BASIC]] :: Easy to install and good compatibility.
** DOSBox + MS BASIC
:PROPERTIES:
:ID: 97ea6094-ade6-4c7d-aea9-9874acf9dc86
:END:
Following tutorial focuses on using DOSBox with original Microsoft
QBasic or QuickBasic.
DOSBox is trivial to install and BASIC programs do not need to be
copied to virtual drive or operating system to run them. Using
original BASIC binaries ensures good compatibility.
Here is suggested installation and usage procedure:
1. Install DOSBox by running the following command in your terminal:
: sudo apt-get install dosbox
2. Obtain and place a copy of QuickBasic *QB.EXE* executable binary
into directory */QB45/* within project root directory.
Optionally obtain [[https://en.wikipedia.org/wiki/Volkov_Commander][Volkov Commander]] executable VC.COM and place it
under project root directory. Volkov Commander simplifies
filesystem navigation and running arbitrary BASIC program by
selecting it and pressing ENTER key. For this to work, BAS file
extension is mapped to BASIC executable within VC.EXT file (already
available in the project root directory). In case you are using
QBasic instead, feel free to fix VC.EXT to point to appropriate
BASIC executable.
3. Optionally check and apply [[id:13c7d873-f1aa-4061-88ac-dc9e43c6303d][DOSBox usage tips]].
4. Execute script that is located in the root directory of the
repository:
: ./run_dosbox.sh
5. Now project root directory appears as root directory of virtual
*C:* drive. You can navigate around and start programs.
Here is suggested project directory layout with QuickBasic and Volkov
Commander installed:
#+begin_example
├── COPYING
├── index.org
├── QB45
│ ├── QB.EXE
│ └── QB.INI
├── run_dosbox.sh
├── (... other repository files and directories)
├── VC.COM
├── VC.EXT
└── VC.INI
#+end_example
** DOSBox usage tips
:PROPERTIES:
:ID: 13c7d873-f1aa-4061-88ac-dc9e43c6303d
:END:
*** How to change keyboard layout to Dvorak
In case you want to use Dvorak keyboard layout and DOSBox fails to
auto-apply it, here is how you can set it manually:
1. Edit file:
: ~/.dosbox/dosbox-.conf
2. Modify *keyboardlayout* field as follows
: keyboardlayout=dv103
3. Save the changes and restart DOSBox for the configuration to take
effect.
*** Increase window size
If you have big high-resolution screen, by default DOSBox window could
appear small. To make it bigger:
1. Edit file:
: ~/.dosbox/dosbox-.conf
2. Set windowresolution to either of those values:
: windowresolution=1366x768
: windowresolution=1600x900
3. Save the changes and restart DOSBox for the configuration to take
effect.
* Applications
There are lot of applications. Few examples:
** Checkers
Play checkers against the computer with any board size and any amount
of caps. Does thinking by recursively testing many possible scenarios
with any depth.
Since it is slow QBasic implementation, it isn't practical to play
with many caps or big thinking depth, for reasonable responce time.
See directory:
: games/checkers
[[file:games/checkers/screenshot.png]]
** 3D Synthezier
Parses scene definition language and creates 3D world based on
it. Result will be in a [[https://en.wikipedia.org/wiki/Wavefront_.obj_file][wavefront obj file]], witch can be then
visualized using external renderer.
See directory:
: graphics/3D/3D Synthezier
[[file:graphics/3D/3D Synthezier/doc/rectangular city, 1.jpeg]]
[[file:graphics/3D/3D Synthezier/doc/hexagonal city, 2.jpeg]]
[[file:graphics/3D/3D Synthezier/doc/index.html][Read more]]