Skip to content

Commit 75274af

Browse files
committed
Clarify README for joystick usage and JDK and JRE selection.
1 parent b96e717 commit 75274af

File tree

1 file changed

+63
-22
lines changed

1 file changed

+63
-22
lines changed

README.md

Lines changed: 63 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
7. [Disk Drives](#disk-drives)
2323
1. [Loading a Disk Image](#loading-a-disk-image)
2424
2. [Saving a Disk Image](#saving-a-disk-image)
25-
8. [Configuration File](#configuration-file)
26-
9. [Keyboard](#keyboard)
25+
8. [Joysticks](#joysticks)
26+
9. [Configuration File](#configuration-file)
27+
10. [Keyboard](#keyboard)
2728
1. [Emulated Keyboard](#emulated-keyboard)
2829
2. [Pass-through Keyboard](#pass-through-keyboard)
29-
10. [Current Status](#current-status)
30+
11. [Current Status](#current-status)
3031

3132
## What Is It?
3233

@@ -113,38 +114,59 @@ library API on the system with:
113114
You will need to end your current session and restart in order for the group information
114115
to be updated. In some cases, you may need to reboot for the group change to take effect.
115116

117+
To run the emulator, see the section called [Running](#running) below.
118+
116119
### Windows
117120

118-
_Under construction._
121+
At a minimum, you will need to install the Java Runtime Environment (JRE) 17 or
122+
higher.
123+
124+
1. *Required* - a Java Runtime Environment (JRE) version 17 or higher. I recommend using
125+
Eclipse Temurin JRE (formerly AdoptJDK) as the software
126+
is licensed under the GNU license version 2 with classpath exception. The latest
127+
JRE builds are available at [https://adoptium.net/en-GB/temurin/releases](https://adoptium.net/en-GB/temurin/releases)
128+
(make sure you select _JRE_ as the type you wish to download). Run the installer
129+
and follow the directions as required to install the runtime.
130+
131+
To run the emulator, see the section called [Running](#running) below.
119132

120133
## Compiling From Source
121134

122135
_Note this section is optional - this is only if you want to compile the project
123-
yourself from source code._
136+
yourself from source code._ If you want to build the emulator from source code,
137+
you will need a copy of the Java Development Kit (JDK) version 17 or greater
138+
installed in to compile the JAR file.
139+
140+
### Linux
124141

125-
If you want to build the emulator from source code, you will need a copy of the
126-
Java Development Kit (JDK) version 17 or greater
127-
installed in to compile the JAR file. For most Linux distributions
128-
there is likely an `openjdk-17-jdk` package that will do this for you automatically.
129-
On Ubuntu and Debian based systems, this is typically:
142+
For most Linux distributions there is likely an `openjdk-17-jdk` package that will do
143+
this for you automatically. On Ubuntu and Debian based systems, this is typically:
130144

131145
```bash
132146
sudo apt update
133147
sudo apt install openjdk-17-jdk
134148
```
135149

136-
For Windows, I recommend using Eclipse Temurin (formerly AdoptJDK) as the software
137-
is licensed under the GNU license version 2 with classpath exception. The latest
138-
JDK builds are available at [https://adoptium.net/en-GB/temurin/releases](https://adoptium.net/en-GB/temurin/releases)
139-
(make sure you select _JDK_ as the type you wish to download).
150+
Next, to build the project, switch to the root of the source directory, and type:
140151

141-
To build the project, switch to the root of the source directory, and type:
142-
143152
```bash
144153
./gradlew build
145154
```
146155

147-
On Windows, switch to the root of the source directory, and type:
156+
The compiled Jar file will be placed in the `build/libs` directory. Note that
157+
for some components such as joystick detection and control to work correctly,
158+
operating-specific steps may be required. See the _Requirements_ section above
159+
to install necessary sub-systems.
160+
161+
162+
### Windows
163+
164+
For Windows, I recommend using Eclipse Temurin JDK (formerly AdoptJDK) as the software
165+
is licensed under the GNU license version 2 with classpath exception. The latest
166+
JDK builds are available at [https://adoptium.net/en-GB/temurin/releases](https://adoptium.net/en-GB/temurin/releases)
167+
(make sure you select _JDK_ as the type you wish to download).
168+
169+
Next, switch to the root of the source directory, and type:
148170

149171
```bash
150172
gradlew.bat build
@@ -267,6 +289,22 @@ select a location on your computer where the disk file will be saved to.
267289
Once entered, the contents of the drive will be saved to the virtual disk
268290
file, and can be loaded from the host computer in a future session.
269291

292+
## Joysticks
293+
294+
Joystick control is still experimental and only currently available under
295+
Linux. When running the emulator, to set the joystick to be used,
296+
click on *Joystick* and then *Left Joystick* or *Right Joystick* to select
297+
which device should be used as the left or right joystick. If no USB
298+
joystick devices are found, then *No joystick* will be the only option
299+
available.
300+
301+
To troubleshoot joystick configuration, when the emulator starts, a
302+
list of detected joysticks will be printed to the console. The
303+
`Joystick #0` device will always be `No Joystick`. Other enumerated
304+
joysticks will be printed after this one. The name of the detected joystick
305+
can be used in the configuration file below to automatically associate
306+
the left or right joystick device during emulator startup.
307+
270308

271309
## Configuration File
272310

@@ -280,19 +318,22 @@ Super Extended Color Basic ROM file).
280318
Megabug).
281319
* `cassetteROM` - the full path to the ROM file used in the cassette recorder.
282320
* `drive0Image` - the `DSK` image to be used in drive 0.
283-
* `drive1Image` - the `DSK` image to be used in drive 0.
284-
* `drive2Image` - the `DSK` image to be used in drive 0.
285-
* `drive3Image` - the `DSK` image to be used in drive 0.
321+
* `drive1Image` - the `DSK` image to be used in drive 1.
322+
* `drive2Image` - the `DSK` image to be used in drive 2.
323+
* `drive3Image` - the `DSK` image to be used in drive 3.
324+
* `leftJoystick` - the name of the detected joystick to use as the left joystick.
325+
* `rightJoystick` - the name of the detected joystick to use as the right joystick.
286326

287327
Leaving any one of the keys out will result in the emulator ignoring that particular
288-
ROM image. An example YAML configuration file that specifies ROMs to use for the
289-
system, cartridge slot, cassette, and drive 0 is as follows:
328+
configuration option. An example YAML configuration file that specifies ROMs to use for the
329+
system, cartridge slot, cassette, joystick, and drive 0 is as follows:
290330

291331
```
292332
systemROM: "C:\Users\basic3.rom"
293333
cartridgeROM: "C:\disk11.rom"
294334
cassetteROM: "C:\Users\zaxxon.cas"
295335
drive0Image: "C:\megabug.dsk"
336+
leftJoystick: "usb gamepad"
296337
```
297338

298339
If you start the emulator without command-line arguments, it will look for a configuration file named

0 commit comments

Comments
 (0)