6 set console input string (used in aucomompleter, for example)
15 print string to console
17 cputs ?-nonewline? string
24 print error string to console
26 errputs ?-nonewline? string
33 load and execute Tcl script from disk file.
34 the file will be first searched in current directory, and
35 then in ZXEmuT tcl/ directory.
42 load and execute Tcl script from disk file.
43 won't fail if the file is absent.
44 the file will be first searched in current directory, and
45 then in ZXEmuT tcl/ directory.
52 various command to manipulate Z80 CPU from Tcl
54 getreg <name> -- get register value
55 setreg <name> <value> -- set register value, returns old register value
59 -------------------------------------------------------------------------
60 brief explanation of some console commands of ZXEmuT.
61 please, note that all console commands are also Tcl procs.
66 the most important command. quits emulator.
73 resets emulated machine. it can also change machine type.
75 reset [forced] <model> <issue> <memory> [trdos]
77 "forced" is used to force machine type reinit even if it wasn't changed.
80 <model> is machine type:
88 <issue> is ZX Spectrum issue for 48k:
89 issue2 (or2) (default)
92 <memory> is memory amount (in kilobytes) for Pentagon:
97 "trdos" is used to resed to TR-DOS. optional.
99 returns model name (string, same as "model") or 0
104 simply prints current machine type (model).
106 returns model name (string)
111 generated Z80 NMI signal.
120 grab "set"|"reset"|"toggle"
122 returns string ("on" or "off")
127 use simplified screen update for "max speed" mode?
129 maxspeedugly "on"|"off"|"toogle"
131 ZXEmuT updates Spectrum screen with 4T precision. this guarantees that the
132 screen will look exactly as on real Spectrum, but for maxspeed mode it may
133 be not necessary. so you can switch to "ugly" updates once per frame.
135 returns string ("on" or "off")
140 show/hide FPS counter.
142 fps "on"|"off"|"toogle"
144 returns string ("on" or "off")
149 enable/disable TR-DOS.
151 trdos "on"|"off"|"toggle"
153 returns string ("on" or "off")
158 enable/disable Kempston Mouse emulation.
160 kmouse "on"|"off"|"toggle"|"normal"|"absolute"
162 returns string ("on" or "off").
164 there are two modes for kempston mouse: normal, with delta changes,
165 and absolute, when the corresponding port values are absolute screen
166 coordinates (in pixels, from the top left pixel).
168 i introduced absolute mode to make my life easier, there is no such
174 enable/disable Kempston Mouse button swapping.
176 swapbuttons "on"|"off"|"toggle"
178 there wasn't a definitive standard which bit corresponds to "left"
179 Kempston Mouse button, so you may need to swap buttons for some software.
181 returns string ("on" or "off")
186 enable/disable Kempston Joystick.
188 kjoystick "on"|"off"|"toggle"
190 returns string ("on" or "off")
195 change emulation speed.
199 <option> can be one of:
200 max -- maximum speed, no sound
201 normal -- real-time speed, with sound
202 toggle -- toggle between max and normal
203 <number> -- percents of real-time speed
206 shade|noshade -- use shading to mark unupdated screen areas when the speed is <100%
208 returns integer number (percents), "max" or "normal"
213 pause/unpause emulation.
215 pause "set"|"reset"|"toggle"
217 returns string ("set" or "reset")
222 "secondary" pause. used for some internal housekeeping.
224 temppause "set"|"reset"|"toggle"
226 returns string ("set" or "reset")
231 set ULA timings to "early" or "late".
233 timings "early"|"late"|"toggle"
235 returns string ("early" or "late")
240 show/hide console, or set console opacity.
244 <option> can be one of:
248 number -- opacity; 0 is fully transparent, 255 is fully opaque
250 returns string ("show" or "hide"), or new alpha
255 show/hide keyboard leds icon.
257 kbleds "on"|"off"|"toggle"|<alpha>
259 returns string ("on" or "off"), or new alpha
264 reset ("unpress") virtual ZX keyboard.
280 debugger "on"|"off"|"toggle"|<alpha>
282 returns string ("on" or "off"), or new alpha
287 show, hide, setup memory viewer.
290 memview [on|off|toggle|hex|text|32|42|51|64|max|7bit|cp-866|cp-1251|addr]
295 show, hide, setup sprive viewer.
298 sprview [on|off|toggle]
303 enable/disable +3 contention scheme. NOT +3 model emulation!
305 useplus3 "on"|"off"|"toggle"
307 returns string ("on" or "off")
312 affects ULA emulation. this is internal debugging command.
314 genuine "on"|"off"|"toggle"
316 returns string ("on" or "off")
321 enable/disable contended memory and ports emulation.
323 contention "on"|"off"|"toggle"
325 returns string ("on" or "off")
330 enable/disable contended memory emulation.
332 memcontention "on"|"off"|"toggle"
334 returns string ("on" or "off")
339 enable/disable contended ports emulation.
341 iocontention "on"|"off"|"toggle"
343 returns string ("on" or "off")
348 enable/disable ULA snow emulation.
349 WARNING! this is not fully implemented yet.
351 snow "on"|"off"|"toggle"
353 returns string ("on" or "off")
358 enable/disable "noflic" mode.
360 noflic "on"|"off"|"toggle"
362 some demos and games quickly swaps 128K screens to create an illusion
363 of more colors. "noflic" mode mixes colors from current and previous
364 frames to emulate this effect. the emulation is not perfect, though.
366 returns string ("on" or "off")
371 enable/disable "bright black" mode.
373 noflic "on"|"off"|"toggle"|value
375 some Speccy models (Timex, some Eastern clones) were rendering bright
376 black as gray. this option allows to emulate that. you can also set
377 default value for "gray black".
379 returns string ("on" or "off")
384 get/set RGB for ZX colors.
386 zxpalcolor index [rgb]
388 you can change default ZX Spectrum palette with this command. returns
389 previous rgb. rgb color is "#rgb" or "#rrggbb".
394 switch fullscreen mode on/off.
396 fullscreen "on"|"off"|"toggle"
398 returns string ("on" or "off")
403 show/hide a picture with ZX Spectrum keyboard (so you can look for
406 keyhelp "on"|"off"|"toggle"
408 returns string ("on" or "off")
413 allow loading snapshots for unknown/unsupported ZX Spectrum models.
415 allowother128 "on"|"off"|"toggle"
417 returns string ("on" or "off")
422 enable/disable keyboard matrix effect emulation.
424 keymatrix "on"|"off"|"toggle"
426 on the original ZX Spectrum keyboard matrix could report some
427 additional keys as pressed when you press three or more keys.
428 this emulates the effect.
430 returns string ("on" or "off")
435 enable/disable broken Pentagon #FD port emulation.
437 bad7ffd "on"|"off"|"toggle"
439 on Pentagons, #7FFD port decoding wasn't done properly, so programs
440 could use port #FD instead of full #7FFD to control memory banks.
441 you may need to emulate this effect for some Pentagon software.
443 returns string ("on" or "off")
448 enable/disable AY-8912 emulation
450 ay "on"|"off"|"toggle"
452 returns string ("on" or "off")
463 hold num -- number of frames fire should be hold
464 delay num -- number of frames fire should be released
465 key zxkeyname -- which key should be used (see keyname reference at the end of this file)
467 returns useless integer 1
472 enabble/disable sound.
474 usesound "on"|"off"|"toggle"
476 this switches emulation modes between "with sound card", and
477 "without sound card". this is not the same as simply muting the
478 sound, because sound card is used for timings too. without a
479 sound card, the emulator will use system timer for synchronisation.
481 returns string ("on" or "off")
490 returns string ("off" or "tv")
495 horizontal offset of the first Spectrum screen byte.
496 can be used to adjust border size.
498 screenofs "none"|0..16|"speccy"
500 returns integer offset, or string ("normal" or "speccy")
505 emulate various monochrome displays.
507 colormode [0..4]|"normal"|"monochrome"|"green"|"yellow"
509 returns integer, or string ("normal", "monochrome", etc.)
514 choose bit to "bright border" emulation.
516 brightborder [0|5|6|7]
518 on Pentagons, it was possible to use 15 colors for border.
519 this command can be used to select which #FE bit should
520 be used for that. "0" means "disable bright border emulation".
522 returns string "off" or integer
527 sound control command.
529 sound [off|beeper|ay|on|volume]
530 sound volume [ay|beeper] [percents]
531 sound ay <mono|acb|abc|on|off|query>
532 sound filter <tv|beeper|none>
536 "sound restart" does full sound system reinit (including sound card reinit)
541 select 48K issue to emulate.
545 returns the corresponding integer
552 snapshot <load|save|clear|reset> [name]
554 this command is used to save or load snapshots.
561 RZX playback control. for now, you can only stop RZX playback.
570 print memory byte at the given address.
572 peek addr [bank-not-yet]
579 print memory word (two bytes) at the given address.
581 wpeek addr [bank-not-yet]
588 change byte at the given memory address.
597 change word (two bytes) at the given memory address.
606 full ZX Spectrum attributes with the given value.
618 insert filename -- insert new tape
619 save filename -- not implemented yet
620 eject -- remove inserted tape
621 clear -- insert empty tape
622 start -- start tape playback
623 stop -- stop tape playback
624 rewind -- rewind tape; won't stop playback
625 list -- not yet implemented
626 option -- tape loader options
629 maxspeed "on"|"off"|"toggle"
630 activate "maximum speed" mode when tape loader detected
631 detectloader "on"|"off"|"toggle"
632 try to detect tape loading code
633 autopause "on"|"off"|"toggle"
634 pause when tape loading complete
635 flashload "on"|"off"|"toggle"
636 use "instant loading" for some known loading schemes
638 please, note that loader detection is not 100% reliable. it works
639 most of the time, though.
652 format [il=interleave] [sofs=sector_offset] (options are not supported yet)
654 boot add [name] | remove | replace [name]
662 "extract" will extract the file from TR-DOS disk, and will save it as HoBeta.
663 "add" will add HoBeta file to TR-DOS disk.
664 "format" formats TR-DOS disk.
665 supported disk formats:
666 trd, scl: fully working
667 udi, fdi: read/write, may have bugs
668 td0: only read, may have bugs
675 debugger breakpoints control.
677 bp [type] cmd [args...]
694 exec breakponts will open the debugger *BEFORE* executing Z80 instruction.
695 all other breakpoints will open the debugger *AFTER* Z80 instruction was
698 port i/o breakpoints will set bp on the exact port, and on low 8 bits.
699 i.e. port 0x7ffd will trigger breakpoint on accessing port 0x7ffd, and
700 on accessing port 0x00fd.
702 port 0 means "any port".
709 debugger label management.
717 get addr-or-name -- this doesn't error on missing label
720 with this command you can add or remove labels for debugger disassembly.
721 "goto" will change disassebly starting address.
723 returns label value or empty string
728 load/save UrAsm .ref files.
730 reffile <load|save|clear> [name]
732 UrAsm assembler can generate "reference files" (files with labels).
733 you can use this command to load those files, so the debugger will
741 internal command to help debugging FlashLoader(utm).
743 fldebug "on"|"off"|"toggle"
745 returns string ("on" or "off")
750 use OpenSE ROM instead of standard one?
752 opense "on"|"off"|"toggle"
759 use Mr.Gluck Reset Service in Pentagon mode?
761 gluck "on"|"off"|"toggle"
768 use Quick Commander ROM instead of 128 Basic on Pentagon?
770 quickcommander "on"|"off"|"toggle"
777 start t-state profiler.
781 "force" can be used to restart already started profiler.
782 see also: "tsdiff" command.
789 stop t-state profiler, show info.
793 this will stop t-state profiler (or won't stop, if "keep" is given).
794 the command will also print number of t-states passed since "tsmark".
796 this can be used to measue t-states used by some routines. open the
797 debugger, set breakpoint at routine entry, and breakpoint on routine
798 exit. then use "tsmark" on the first breakpoint, and "tsdiff" on the
801 returns number of t-states
814 ZX Spectrum Key Names
815 =====================
816 normal keys are named with their corresponding letter or digit.
820 cs -- caps shift (the same as "cap")
828 special names for Kempston Joystick:
838 zxbind <pc-key-name> <zx-key-name>
839 zxunbind <pc-key-name>
840 bind ZX Spectrum key to PC key.
842 bind <pc-key-name> "action"
844 bind action to PC key.