@@ -12,24 +12,29 @@ avoided in order to try to make the code as portable as possible.
12
12
The aim is to have the same source code compile without modification on
13
13
Linux, VAX/VMS, and Tru64 Unix.
14
14
15
- Unlike all the other emulators the ROM images for the HP10C, HP11C, HP12C,
16
- HP15C, HP16C are not defined in the the source code and must be loaded from
17
- a separate ROM file.
18
-
19
15
![ HP10] ( ./img/x11-calc-10c.png ) ![ HP11] ( ./img/x11-calc-11c.png )
20
16
21
17
More [ screenshots] ( ./img/#top )
22
18
23
19
24
20
### Latest News
25
21
22
+ 14 Apr 24
23
+
24
+ - Allows the size of the window to be adjusted using the ` --zoom n ` option
25
+ where n can be between 0 and 4.
26
+ - Added an install option to the makefile (by default the installer will
27
+ use ` $HOME/.local ` if it exists, but it is possible to specify another
28
+ directory by setting the directory ` prefix ` ).
29
+ - Embedded missing firmware.
30
+
26
31
24 Feb 24
27
32
- By default the application will attempt to use the X11 base fonts. But
28
33
if these are not available it will try to select an suitable alternate
29
34
font instead from a predefined list.
30
35
31
36
For all the fonts to be rendered as intended users should ensure that
32
- the X11 base fonts are installed (see prerequsites ).
37
+ the X11 base fonts are installed (see prerequisites ).
33
38
34
39
16 Feb 24
35
40
- For UNIX based systems the default location used to store the state of
@@ -53,59 +58,92 @@ More [screenshots](./img/#top)
53
58
54
59
### Compiling
55
60
56
- To build the simulator on Linux check that you have all the prerequisites
57
- installed then download the source code from github and unzip it (a new
58
- folder will be created to automatically). Then change directory to the
59
- new folder run 'make all' build all the simulators.
61
+ To build the simulator check that you have all the prerequisites installed
62
+ then download the source code from github and unzip it (this will created a
63
+ new directory automatically).
60
64
61
65
e.g:
62
66
```
63
67
$ wget https://github.com/mike632t/x11-calc/archive/refs/heads/stable.zip
64
68
$ unzip x11-calc-stable.zip
69
+ ```
70
+ Then change directory to the new folder.
71
+ ```
65
72
$ cd x11-calc-stable
66
- $ make -f makefile.linux all
67
-
73
+ ```
74
+ The to compile all the emulators you just need to invoke make.
75
+ ```
76
+ $ make clean; make all
77
+ ```
78
+ It is also possible to compile a single emulator by specifying the model on
79
+ the command line
80
+ ```
81
+ $ make hp29c
82
+ ```
83
+ By default the executable files will be created in the ` bin ` directory, and
84
+ can run either a particular emulator directly, or invoke the launcher which
85
+ will allow you to select which enulator to use by default the next time you
86
+ launch it.
87
+ ```
68
88
$ ./bin/x11-calc-29c
69
89
x11-calc-29c: Version 0.10 [Commit ID: 399d546] 01 Nov 23 23:53:00 (Build: 0114)
70
90
ROM Size : 4096 words
71
91
```
92
+ OR
93
+ ```
94
+ $ bin/x11-calc
95
+ ```
72
96
If more than one C compiler is installed or if gcc is not available you can
73
97
specify which one to use from the command line.
74
98
```
75
- $ make -f makefile.linux CC=clang VERBOSE=1 all
99
+ $ make CC=clang hp11c
76
100
77
- $ make -f makefile.linux CC=tcc VERBOSE=1 all
101
+ $ make CC=tcc
78
102
```
79
-
80
- On Tru64 UNIX a specific make file is used, and the execuitable files are
81
- saved in the same folder as the source .
103
+ #### VMS
104
+ On VMS unzip the source code archive, change the default directory and then
105
+ run ` make.com ` .
82
106
83
107
e.g:
84
108
```
85
109
$ unzip x11-calc-stable.zip
86
- $ cd x11-calc-stable
87
- $ make -f makefile.tru64 all
110
+ $ set def [. x11-calc-stable.src]
111
+ $ @ make all
88
112
89
- $ ./src/ x11-calc-29c
90
- x11-calc-29c: Version 0.10 [Commit ID: 399d546] 01 Nov 23 23:53:00 (Build: 0114)
113
+ $ mc [-.bin] x11-calc-29c
114
+ x11-calc-29c: Version 0.10 [Commit ID: 399d546] 02 Nov 23 23:52:11 (Build: 0114)
91
115
ROM Size : 4096 words
92
116
```
93
117
94
- On VMS unzip the source code archive, then run the DCL ` make ` script.
118
+ ### Installing
95
119
96
- e.g:
120
+ On Linux systems after the compilation is complete you can use the makefile
121
+ to install the emulator locally.
122
+
123
+ By default the installer will use ` $HOME/.local ` if it exists, but it is
124
+ possible to specify another directory by setting the directory ` prefix ` .
97
125
```
98
- $ unzip x11-calc-stable.zip
99
- $ set def [.x11-calc-stable.src]
100
- $ @make all
126
+ $ make install
101
127
102
- $ mc [-.bin]x11-calc-29c
103
- x11-calc-29c: Version 0.10 [Commit ID: 399d546] 02 Nov 23 23:52:11 (Build: 0114)
104
- ROM Size : 4096 words
128
+ OR
129
+
130
+ $ make install prefix=/usr
131
+ ```
132
+ Installer also supports staged installs in a custom directory defined using
133
+ DESTDIR.
134
+ ```
135
+ make DESTDIR=/tmp/staging install
105
136
```
106
137
138
+ ### Using Flatpak
139
+
140
+ If you don't want to download an compile the sources your self the emulator
141
+ is also available on [ Flathub] ( https://flathub.org/apps/io.github.mike632t.x11-calc ) and can be installed using Flatpak.
142
+
107
143
### Tested
108
144
145
+ The emulators have been tested on the following systems:
146
+
109
147
- Debian 12 (Bookworm), clang 14.0.6, x64 + arm64
110
148
111
149
- Debian 12 (Bookworm), tcc 0.9.27, x64 + arm64
@@ -130,6 +168,8 @@ ROM Size : 4096 words
130
168
131
169
- Fedora 35, gcc 11.3.1, x64
132
170
171
+ - Fedora 35, clang 13.0.1, x64
172
+
133
173
- Fedora 39, gcc 13.2.1, x64
134
174
135
175
- Gentoo, gcc 11.2.0, x64
@@ -138,6 +178,8 @@ ROM Size : 4096 words
138
178
139
179
- MacOS 13.4.1 (Venture), clang 14.0.3, arm64
140
180
181
+ - NetBSD 9.2, gcc 7.5.0, x64
182
+
141
183
- SUSE 15.4, clang 13. 0.1, x64
142
184
143
185
- SUSE 15.4, gcc 7.5.0, x64
@@ -154,16 +196,15 @@ ROM Size : 4096 words
154
196
155
197
- Windows 11 + WSL2, gcc 12.2.0, x64 + arm64
156
198
157
-
158
199
### Prerequisites
159
200
160
201
The following packages are required to build and/or run the simulator.
161
202
162
203
- Debian : gcc | clang | tcc make libc6-dev libx11-dev xfonts-base
163
204
164
- - Fedora : gcc make glibc-devel libX11-devel xorg-x11-fonts-base | xorg-x11-fonts-misc
205
+ - Fedora : gcc | clang make glibc-devel libX11-devel xorg-x11-fonts-base | xorg-x11-fonts-misc
165
206
166
- - Gentoo : gcc make libc6-dev libx11-dev font-misc-misc
207
+ - Gentoo : gcc make libc6-dev libx11-dev font-misc-misc
167
208
168
209
- MacOS : clang make [ xquartz] ( https://www.xquartz.org/ )
169
210
@@ -173,7 +214,6 @@ The following packages are required to build and/or run the simulator.
173
214
174
215
- Windows 11 + WSL2 : gcc make libc6-dev libx11-dev xfonts-base
175
216
176
-
177
217
### Keyboard Shortcuts
178
218
179
219
The following keyboard shortcuts should work on Linux:
@@ -193,7 +233,6 @@ exist and 'Space' maps to 'SST' if not shifted.
193
233
memory 'Ctrl-Z' saves the current register contents, and 'Ctrl-C' restores
194
234
them to the original saved state.
195
235
196
-
197
236
### Loading and saving
198
237
199
238
For models with continuous memory the contents of program memory and data
@@ -209,14 +248,12 @@ copies of programs to be loaded automatically when the simulator starts or
209
248
the simulator is reset using 'Ctrl-C'. However, any changes will be
210
249
saved in the hidden data file.
211
250
212
-
213
251
### Exiting
214
252
215
253
For models with a 'sliding' On/Off switch clicking on the switch will turn
216
254
the simulator on or off, but if when switching off you hold down the switch
217
255
down for two seconds the program will exit.
218
256
219
-
220
257
### Debugging
221
258
222
259
You can start the simulation in trace mode using '-t', or in single step
@@ -228,16 +265,16 @@ of the CPU registers.
228
265
229
266
When in trace mode a jump to the same instruction produces no output.
230
267
231
-
232
268
### ROM Images
233
269
234
- No ROM images are included for the HP10C, HP11C, HP12C, HP15C, and HP16C.
235
-
236
270
The '-r <filename >' command line option provides the ability to use the ROM
237
- contents held in an separate file.
271
+ contents from a separate file. The contents of the ROM are stored as pairs
272
+ values seperated by a colon containing the memory address and the opcode.
238
273
239
- For the HP10C, HP11C, HP12C, HP15C, and HP16C the ROM comprised of pairs of
240
- hexadecimal values as address: opcode .
274
+ Anything appearing after a semi colon on each line is ignored.
275
+
276
+ For the HP10C, HP11C, HP12C, HP15C and HP16C the ROM file contains pairs of
277
+ _ hexadecimal_ values.
241
278
```
242
279
0000:107
243
280
0001:04e
@@ -246,8 +283,7 @@ hexadecimal values as address:opcode.
246
283
0004:2ee
247
284
0005:13f
248
285
```
249
- Other models include the ROM as part of the program, but you can specify an
250
- alternate ROM comprising of pairs of octal values.
286
+ For other models the ROM file contains pairs of _ octal_ values.
251
287
```
252
288
00000:00255
253
289
00001:01420
@@ -256,13 +292,23 @@ alternate ROM comprising of pairs of octal values.
256
292
00004:01746
257
293
00005:00472
258
294
```
259
- This allows you to use your own ROM images with any of the simulators.
295
+ When loading a ROM from file any gaps between the memory addresses will not
296
+ be filled with zeros, and the existing ROM contents will be left unchanged.
260
297
298
+ ROM files can therefore be used to load alternative version of the firmware
299
+ for a particular model or apply a patch to the existing firmware.
261
300
262
301
### Known Issues
263
302
264
- * Keyboard shortcuts only work on Linux.
303
+ * Keyboard shortcuts only work on Linux and NetBSD .
265
304
* A 24 bit colour display is required.
305
+ * For best results you need to have the X windows core fonts installed.
306
+
307
+ * Parallel make only works on Linux.
308
+
309
+ ##### HP 29C
310
+
311
+ * All 30 registers have continuous memory.
266
312
267
313
##### HP 37E
268
314
@@ -273,17 +319,22 @@ This allows you to use your own ROM images with any of the simulators.
273
319
* Cannot read or write to magnetic cards.
274
320
* Has continuous memory.
275
321
276
- ### Raspberry Pi Specific IssuesGentoo
322
+ ### Raspberry Pi Specific Issues
277
323
278
324
* The code uses a simplified display on Arm based systems (except Apple) to
279
325
avoid the display refresh issues seen on the Raspberry Pi if either FKMS or
280
326
KMS overlays are enabled. (Note- Do not disable KMS on the latest Raspberry
281
327
Pi OS release).
282
- * The window manager on recent Raspberry Pi OS releases doesn't disable the
283
- ability to resize or maximize a window if the maximum and minimum window
284
- sizes are the same. The application will resize the window automatically it
285
- the user attempts to change the size but if it is maximized then the title
286
- bar will be hidden (by the window manager) until the window is unmaximized.
328
+
329
+ ### Wayland specific Issues
330
+
331
+ * Performance under Xwayland is generally poor, the emulator will work well
332
+ on a Raspberry Pi3 using Xwindows but a Raspberry Pi4 using Xwayland cannot
333
+ redraw the display quickly enough to allow background shading to be used to
334
+ draw the display digits. As a result the emulator's LED/LCD display doesn't
335
+ use any background shading on ARM based systems.
336
+ * The emulator window is supposed to be a fixed size. However wnen running
337
+ on Xwayland the window manager does not handle this correctly.
287
338
288
339
### VMS Specific Issues
289
340
0 commit comments