Skip to content

Commit 3750b11

Browse files
committed
Updated README.md with details of latest config parameters.
1 parent d0589ad commit 3750b11

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The UI of JVic has been designed primarily with mobile devices in mind, so give
2424
- e.g. [https://vic20.games/#/impossiblator-3](https://vic20.games/#/impossiblator-3)
2525
- Or into BASIC: [https://vic20.games/#/basic](https://vic20.games/#/basic)
2626
- Or into BASIC with different RAM and/or TV setting: [https://vic20.games/#/basic/16k/pal](https://vic20.games/#/basic/16k/pal)
27+
- Or into BASIC with the midpoint PAL palette: [https://vic20.games/#/basic/16k/pal/mid](https://vic20.games/#/basic/16k/pal/mid)
2728
- Support for loading games via a ?url= request parameter:
2829
- e.g. [https://vic20.games/?url=https://raw.githubusercontent.com/raspberrypioneer/VicBoulderDash/refs/heads/main/d64/Vic20%20Boulder%20Dash.d64](https://vic20.games/?url=https://raw.githubusercontent.com/raspberrypioneer/VicBoulderDash/refs/heads/main/d64/Vic20%20Boulder%20Dash.d64)
2930
- e.g. [http://vic20.games/?url=https://archive.org/download/download_20220510_2209/Vic20_gamebase_v03.zip/Games%2FGorf.zip](http://vic20.games/?url=https://archive.org/download/download_20220510_2209/Vic20_gamebase_v03.zip/Games%2FGorf.zip)
@@ -71,6 +72,13 @@ There are a handful of URL parameters that can be used when loading games. This
7172
* ram: The amount of RAM to use (0, UNEXP, 3K, 8K, 16K, 24K, 32K, 35K), e.g. ram=16K
7273
* tv: Selects between PAL and NTSC, e.g. tv=NTSC
7374
* type: Specifies the type of file being loaded, in case it isn't clear what it is (DISK, TAPE, CART, PRG), e.g. type=CART
75+
* filter: Selects the screen filtering mode. Use filter=nearest for sharp nearest-neighbour scaling, filter=linear for standard linear filtering, or a number between 0.0 and 1.0 for the soft filter blend amount, e.g. filter=0.35
76+
* palette: Selects the PAL palette mode. Currently palette=MID uses a midpoint palette instead of alternating the odd and even PAL palettes
77+
78+
Examples:
79+
80+
* [https://vic20.games/?url=https://www.gamesthatwerent.com/wp-content/uploads/2021/04/Game_Moonsweeper-1983ImagicA000.zip&tv=ntsc&filter=nearest](https://vic20.games/?url=https://www.gamesthatwerent.com/wp-content/uploads/2021/04/Game_Moonsweeper-1983ImagicA000.zip&tv=ntsc&filter=nearest)
81+
* [https://vic20.games/#/basic?tv=pal&palette=mid](https://vic20.games/#/basic?tv=pal&palette=mid)
7482

7583
## The Machine screen
7684
When a game is run, the machine screen is displayed. It shows the VIC 20 screen and various icons, which may be either at the bottom of the screen (for portrait) or to the sides (for landscape).
@@ -162,6 +170,36 @@ They mostly do the same thing, which is to add the "Cross-Origin-Opener-Policy"
162170

163171
The Simple Web Server is an Electron app, so not really designed to be used as a full web server. The theory can be applied to any web server though. All you need to do is configure those same features. For example, the vic20.games web site is hosted by Cloudflare Pages, and so it uses a Cloudflare _headers config file to apply those HTTP response headers. This file is also included in the repo, if you are interested in seeing what it does.
164172

173+
## Using autorun-config.txt for embedded deployments
174+
If you want a JVic deployment to boot straight into a bundled game instead of showing the home screen, then place an autorun-config.txt file next to index.html. This is useful when packaging a single game together with JVic for deployment on services such as itch.io, where you want the emulator to start running immediately inside an embedded page.
175+
176+
JVic will read autorun-config.txt automatically on startup, but only when no explicit hash path or URL parameters have been supplied. This means you can still override the default startup behaviour later by launching JVic with the usual URL options.
177+
178+
The file format is one key=value pair per line. Blank lines are ignored, and any line starting with # is treated as a comment.
179+
180+
Supported settings include:
181+
182+
* program: The bundled VIC-20 program to start automatically. This can be a .prg, .d64, .crt, .tap, or .zip file. Paths such as game.prg, ./game.prg, or /game.prg are all resolved relative to the deployed JVic folder.
183+
* ram: The amount of RAM to use (0, UNEXP, 3K, 8K, 16K, 24K, 32K, 35K)
184+
* tv: Selects between PAL and NTSC
185+
* type: Specifies the program type (DISK, TAPE, CART, PRG)
186+
* filter: Selects the screen filtering mode. Use nearest, linear, or a number between 0.0 and 1.0 for the soft filter blend amount
187+
* palette: Selects the PAL palette mode. Default PAL behaviour is to alternative between the odd and even line palettes. Specifying MID for the palette uses a palette that is the mid point between the odd and even palettes. Ignored for NTSC.
188+
189+
For example, the following autorun-config.txt file would boot directly into a bundled PRG with explicit machine settings:
190+
191+
```
192+
# Boot straight into the packaged game
193+
program=games/mygame.prg
194+
ram=24k
195+
type=prg
196+
tv=pal
197+
filter=0.25
198+
palette=mid
199+
```
200+
201+
With that file in place, you can deploy the whole JVic build plus your game file to a static host or embedded web game platform, and JVic will start directly in that program when the page loads.
202+
165203
## Credits and Acknowledgements
166204
This project would not have been possible without the following projects and their authors:
167205

@@ -171,6 +209,7 @@ This project would not have been possible without the following projects and the
171209
- [gwt-jszip](https://github.com/ainslec/GWTJSZip): Originally written by Aki Miyazaki, extended by Chris Ainsley.
172210
- [jszip](https://github.com/Stuk/jszip): Written by Stuart Knightley. Used by JVIC to unzip imported games.
173211
- [GWT](https://www.gwtproject.org): Google Web Toolkit, used by libgdx to transpile the JVIC Java code to JavaScript.
212+
- [TeaVM](https://teavm.org): Used by JVic to transpile the TeaVM target to JavaScript.
174213
- [ringbuf.js](https://github.com/padenot/ringbuf.js/blob/main/js/ringbuf.js): Written by Paul Adenot. Used for the keyboard matrix, audio queue and pixel array in JVIC.
175214
- [dialog.js](https://css-tricks.com/replace-javascript-dialogs-html-dialog-element/): Written by Mads Stoumann. Used for most of the dialogs.
176215

0 commit comments

Comments
 (0)