openMSX palette cycle script

By ren

Paragon (1883)

Аватар пользователя ren

25-08-2021, 19:30

Preliminary, simply put in your scripts directory, see script for default key bindings.

I'd rather bind to rctrl or something, but that's another discussion ;)

So I didn't study Tcl properly, this is more based on looking things up swiftly / by example + trial & error.

Some things I wonder about though:

* doesn't seem to matter whether I use variable or set at top ns level (both are accessible via namespace::);
* doesn't seem to matter whether I export (everything or a single proc) or not, everything is just accessible via the console. I did notice that for _ (underscore) scripts you have to explicate state what you (want to) export (/ have visible) via lazy.tcl

But, as I stated, I didn't study everything properly.

When I was working on this I thought it would be actually a neat emu toy/feature to be able to set palettes using 24bit RGB colors? Would be pretty easy to implement? :)

_Wolverine is based on Setting up a palette (:face:)

Only tested on latest openMSX dev build.

If anyone has a palette to share, or improvements, bring it! ;)

https://stuff.retrodb.net/msx/openmsx/scripts/

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By Manuel

Ascended (18240)

Аватар пользователя Manuel

26-08-2021, 00:21

The import tells which names to import in the global namespace. So these names become directly available in the console.
Export tells which names may be imported. All:AFAIK. There is a lot of documentation on Tcl. This is generic Tcl stuff. Also set Vs variable.
All names are always accessible by specifying the namespace like::this.

The lazy stuff is to prevent loading and parsing a lot of scripts at start up, by telling which commands need which script loaded, so they can be loaded on demand.