File: _toggle_freq.tcl

package info (click to toggle)
openmsx 0.10.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,628 kB
  • ctags: 19,723
  • sloc: cpp: 131,938; xml: 25,418; tcl: 15,394; python: 4,012; sh: 365; makefile: 26
file content (9 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
set_help_text toggle_freq "Switch the VDP between PAL (50 Hz)/NTSC (60 Hz)."

proc toggle_freq {} {
	vdpreg 9    [expr {[vdpreg 9   ] ^ 2}]
	poke 0xFFE8 [expr {[peek 0xFFE8] ^ 2}]

	set freq [expr {([vdpreg 9] & 2) ? 50 : 60}]
	osd::display_message "Frequency set to $freq Hz" info
}