This file is indexed.

/usr/share/openmsx/scripts/cashandler.tcl is in openmsx-data 0.12.0-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
namespace eval cashandler {

user_setting create boolean fast_cas_load_hack_enabled \
"Whether you want to enable a hack that enables you to quickly load CAS files
with the cassetteplayer, without converting them to WAV first. This is not
recommended and several cassetteplayer functions will not work anymore (motor
control, position indication, size indication). Also note that this hack only
works when inserting cassettes when the MSX is already started up, not when
inserting them via the openMSX command line." false

variable old_value $::fast_cas_load_hack_enabled
variable hack_is_already_enabled false

proc set_hack {} {
	variable hack_is_already_enabled
	# example: turboR..
	# for now, ignore the commands... it's quite complex to
	# get this 100% water tight with adding/removing machines
	# at run time
	if {[catch "machine_info connector cassetteport"]} return
	
	if {$::fast_cas_load_hack_enabled && !$hack_is_already_enabled} {
		interp hide {} cassetteplayer
		interp alias {} cassetteplayer {} cashandler::tapedeck
		set hack_is_already_enabled true
		puts "Fast cas load hack installed."
	} elseif {!$::fast_cas_load_hack_enabled && $hack_is_already_enabled} {
		interp alias {} cassetteplayer {}
		interp expose {} cassetteplayer
		set hack_is_already_enabled false
		puts "Fast cas load hack uninstalled."
	}
}

proc setting_changed {name1 name2 op} {
	variable old_value

	if {$::fast_cas_load_hack_enabled != $old_value} {
		set_hack
		set old_value $::fast_cas_load_hack_enabled
	}
}

trace add variable ::fast_cas_load_hack_enabled write [namespace code setting_changed]

proc initial_set {} {
	if {$::fast_cas_load_hack_enabled} {
		set_hack
	}
}

after realtime 0 [namespace code initial_set]

} ;# namespace cashandler