From: <man...@us...> - 2010-05-22 20:15:55
|
Revision: 11440 http://openmsx.svn.sourceforge.net/openmsx/?rev=11440&view=rev Author: manuelbi Date: 2010-05-22 20:15:49 +0000 (Sat, 22 May 2010) Log Message: ----------- Cleanups in initial TAS script (no updates anymore before the release) Modified Paths: -------------- openmsx/trunk/share/scripts/tas_tools.tcl Modified: openmsx/trunk/share/scripts/tas_tools.tcl =================================================================== --- openmsx/trunk/share/scripts/tas_tools.tcl 2010-05-22 19:17:21 UTC (rev 11439) +++ openmsx/trunk/share/scripts/tas_tools.tcl 2010-05-22 20:15:49 UTC (rev 11440) @@ -1,31 +1,26 @@ namespace eval tas { set_help_text toggle_frame_counter\ -{toggle_frame_counter let's you toggle(on/off) a frame counter in the lower right corner +{Toggles display of a frame counter in the lower right corner. The frame counter will be wrong if at any time there is a change of VDP -register 9 bit 1 during the run time of the machine! (aka switching between 50/60hz) +register 9 bit 1 during the run time of the machine! (So switching between 50/60Hz.) } proc toggle_frame_counter {} { -# Note: the frame counter will be wrong if at any time there is a change of VDP -# register 9 bit 1 during the run time of the machine! - - variable frame_trigger_id - if {![catch {osd info framecount}]} { osd destroy framecount return "" } - osd create rectangle framecount -x 280 -y 235 -h 6 -w 50 -rgba 0x0077FF80 -scaled true - osd create text framecount.text -text "" -size 5 -rgba 0xffffffff - - framecount_update - return "" - } + osd create rectangle framecount -x 280 -y 235 -h 6 -w 50 -rgba 0x0077FF80 -scaled true + osd create text framecount.text -text "" -size 5 -rgba 0xffffffff + framecount_update + return "" +} + proc framecount_current {} { set freq [expr {(6 * 3579545) / (1368 * (([vdpreg 9] & 1) ? 313 : 262))}] return [expr int([machine_info time] * $freq)] @@ -38,20 +33,23 @@ return "" } -set_help_text frame_advance_mode\ -{frame_advance_mode let's you go through frames by pushing f7} +# TODO: this doesn't work properly, why? +# The best way is to enable some kind of global TAS mode (a boolean setting), +# which if enabled sets up some useful key bindings for TAS +# +#set_help_text frame_advance_mode \ +#{frame_advance_mode let's you go through frames by pushing f7} +# +#proc frame_advance_mode {} { +# bind_default f7 "set pause off;after frame \"set pause on\"" +#} -proc frame_advance_mode {} { - bind_default f7 "set pause off;after frame \"set pause on\"" -} - -# TODO: +# more TODO: # real time OSD memory watch -# TAS mode indactors +# TAS mode indicators - namespace export toggle_frame_counter - namespace export frame_advance_mode +namespace export toggle_frame_counter +#namespace export frame_advance_mode } - -namespace import tas::* \ No newline at end of file +namespace import tas::* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |