Update installation documentation
[qbasicapps.git] / index.org
1 #+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
2 #+TITLE:  BASIC applications collection
3 #+LANGUAGE: en
4 #+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
5 #+LATEX_HEADER: \usepackage{parskip}
6 #+LATEX_HEADER: \usepackage[none]{hyphenat}
7
8 #+OPTIONS: H:20 num:20
9 #+OPTIONS: author:nil
10
11 * General
12
13 This collection contains lots of applications:
14
15 - Games.
16 - Graphics tests (2D/3D/4D).
17 - Algorithms tests.
18 - Utilities.
19
20 I wrote those applications largely more than 20 years ago, mostly in
21 QBasic. Some are even written in x86 assembly for use under DOS
22 operating system. Because programs are old, coding style and
23 commenting is often times bad. I'm now using artificial intelligence
24 to revive and modernize them one by one.
25
26 - These programs are free software: released under Creative Commons Zero
27   (CC0) license.
28
29 - Programs author:
30   - Svjatoslav Agejenko
31   - Homepage: https://svjatoslav.eu
32   - Email: mailto://svjatoslav@svjatoslav.eu
33
34 - [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
35
36 ** Source code
37 - [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
38
39 - [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=summary][Browse Git repository online]]
40
41 - Clone Git repository using command:
42   : git clone https://www3.svjatoslav.eu/git/qbasicapps.git
43
44 * Installation and Usage
45
46 There are various ways to run legacy QBasic applications under Debian
47 GNU/Linux:
48
49 - Full system virtualization :: One way would be to use full system
50   virtualization with [[https://www.qemu.org/][QEMU]], [[https://www.virtualbox.org/][VirtualBox]] or [[https://www.vmware.com/products/desktop-hypervisor.html][VMware Workstation or
51   Player]]. After creating virtual machine, you need to obtain and
52   install some distribution of DOS like [[https://en.wikipedia.org/wiki/MS-DOS][MS-DOS]] or [[https://www.freedos.org/][FreeDOS]]. Within DOS
53   you can then use either Microsoft *QBasic* or Microsoft
54   *QuickBasic*. QBasic is already included in Microsoft DOS by
55   default. QuickBasic is more capable but must be obtained separately.
56
57 - QB64 :: [[https://qb64.com][QB64]] is mostly compatible with Microsoft BASIC variants and
58   can be used too.
59
60 - [[id:97ea6094-ade6-4c7d-aea9-9874acf9dc86][DOSBox + MS BASIC]] :: Easy to install and good compatibility.
61
62 ** DOSBox + MS BASIC
63 :PROPERTIES:
64 :ID:       97ea6094-ade6-4c7d-aea9-9874acf9dc86
65 :END:
66
67 Following tutorial focuses on using DOSBox with original Microsoft
68 QBasic or QuickBasic.
69
70 DOSBox is trivial to install and BASIC programs do not need to be
71 copied to virtual drive or operating system to run them. Using
72 original BASIC binaries ensures good compatibility.
73
74
75 Here is suggested installation and usage procedure:
76
77 1. Install DOSBox by running the following command in your terminal:
78    : sudo apt-get install dosbox
79
80 2. Obtain and place a copy of QuickBasic *QB.EXE* executable binary
81    into directory */QB45/* within project root directory.
82
83    Optionally obtain [[https://en.wikipedia.org/wiki/Volkov_Commander][Volkov Commander]] executable VC.COM and place it
84    under project root directory. Volkov Commander simplifies
85    filesystem navigation and running arbitrary BASIC program by
86    selecting it and pressing ENTER key. For this to work, BAS file
87    extension is mapped to BASIC executable within VC.EXT file (already
88    available in the project root directory). In case you are using
89    QBasic instead, feel free to fix VC.EXT to point to appropriate
90    BASIC executable.
91
92 3. Optionally check and apply [[id:13c7d873-f1aa-4061-88ac-dc9e43c6303d][DOSBox usage tips]].
93
94 4. Execute script that is located in the root directory of the
95    repository:
96    : ./run_dosbox.sh
97
98 5. Now project root directory appears as root directory of virtual
99    *C:* drive. You can navigate around and start programs.
100
101
102 Here is suggested project directory layout with QuickBasic and Volkov
103 Commander installed:
104 #+begin_example
105   ├── COPYING
106   ├── index.org
107   ├── QB45
108   │   ├── QB.EXE
109   │   └── QB.INI
110   ├── run_dosbox.sh
111   ├── (... other repository files and directories)
112   ├── VC.COM
113   ├── VC.EXT
114   └── VC.INI
115 #+end_example
116
117 ** DOSBox usage tips
118 :PROPERTIES:
119 :ID:       13c7d873-f1aa-4061-88ac-dc9e43c6303d
120 :END:
121 *** How to change keyboard layout to Dvorak
122
123 In case you want to use Dvorak keyboard layout and DOSBox fails to
124 auto-apply it, here is how you can set it manually:
125
126 1. Edit file:
127   : ~/.dosbox/dosbox-<version>.conf
128
129 2. Modify *keyboardlayout* field as follows
130   : keyboardlayout=dv103
131
132 3. Save the changes and restart DOSBox for the configuration to take
133    effect.
134
135 *** Increase window size
136
137 If you have big high-resolution screen, by default DOSBox window could
138 appear small. To make it bigger:
139
140 1. Edit file:
141   : ~/.dosbox/dosbox-<version>.conf
142
143 2. Set windowresolution to either of those values:
144    : windowresolution=1366x768
145    : windowresolution=1600x900
146
147 3. Save the changes and restart DOSBox for the configuration to take
148    effect.
149
150 * Applications
151
152 There are lot of applications. Few examples:
153
154 ** Checkers
155 Play checkers against the computer with any board size and any amount
156 of caps. Does thinking by recursively testing many possible scenarios
157 with any depth.
158
159 Since it is slow QBasic implementation, it isn't practical to play
160 with many caps or big thinking depth, for reasonable responce time.
161 See directory:
162 : games/checkers
163
164 [[file:games/checkers/screenshot.png]]
165
166 ** 3D Synthezier
167 Parses scene definition language and creates 3D world based on
168 it. Result will be in a [[https://en.wikipedia.org/wiki/Wavefront_.obj_file][wavefront obj file]], witch can be then
169 visualized using external renderer.
170
171 See directory:
172 : graphics/3D/3D Synthezier
173
174 [[file:graphics/3D/3D Synthezier/doc/rectangular city, 1.jpeg]]
175
176 [[file:graphics/3D/3D Synthezier/doc/hexagonal city, 2.jpeg]]
177
178 [[file:graphics/3D/3D Synthezier/doc/index.html][Read more]]