Skip to content

Commit

Permalink
zeta86 1.0.3 actual
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Mar 19, 2023
1 parent 881e33a commit e20257a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/res/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The entrypoint is "ZetaLoad(options, callback);". The callback is optional, and
* charset: the character set (8x14 only!) to initially load, as one of:
* string - filename of a Zeta-supported format,
* array - of bytes as would be contained in such a .chr file.
* lock_charset: if true and a custom charset is provided, the charset cannot be changed by the emulated engine,
* palette: the palette, to initially load, as one of:
* string - filename of a Zeta-supported format,
* object, with the following fields:
Expand All @@ -47,6 +48,7 @@ The entrypoint is "ZetaLoad(options, callback);". The callback is optional, and
* colors - an array of sixteen colors, either:
* 3-component arrays of range min - max (inclusive),
* "#012345" or "#012"-format strings.
* lock_palette: if true and a custom palette is provided, the palette cannot be changed by the emulated engine,
* memory_limit: the memory limit, in kilobytes (64-640)
* extended_memory_limit: the extended (EMS) memory limit, in kilobytes
* render:
Expand Down
4 changes: 4 additions & 0 deletions web/src/emulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,15 @@ export function createEmulator(render, audio, vfs, options) {
if (options.engine.charset) {
if (!emuObj.loadCharset(options.engine.charset)) {
console.error("Could not load charset from options!");
} else {
emu._zzt_set_lock_charset(options.engine.lock_charset);
}
}
if (options.engine.palette) {
if (!emuObj.loadPalette(options.engine.palette)) {
console.error("Could not load palette from options!");
} else {
emu._zzt_set_lock_palette(options.engine.lock_palette);
}
}
}
Expand Down

0 comments on commit e20257a

Please sign in to comment.