OXYGENHUB
◆ main openmsx / share / scripts / _toggle_freq.tcl
271 B · Tcl · last changed chore(): initial commit 1 month ago source blame history raw
1
set_help_text toggle_freq "Switch the VDP between PAL (50 Hz)/NTSC (60 Hz)."
2
3
proc toggle_freq {} {
4
	vdpreg 9    [expr {[vdpreg 9   ] ^ 2}]
5
	poke 0xFFE8 [expr {[peek 0xFFE8] ^ 2}]
6
7
	set freq [expr {([vdpreg 9] & 2) ? 50 : 60}]
8
	message "Frequency set to $freq Hz" info
9
}