Mistake-proofing
This page lists many small details of implementation that improve interaction between user and the program. All these points must be considered when porting Taseditor to other platforms.
- When the user closes the emulator, emulator sends a request to Taseditor in order to allow it to close the project first. If the project contains unsaved data, Taseditor shows the Yes/No/Cancel dialog. The user can either save the changes, or save none of them, or cancel the attempt to close the emulator.
- When playing back an fm3 project outside Taseditor (like a regular movie), the user can switch the emulator to Recording mode and try rerecording. In this case, the emulator tells the user that current movie is a Taseditor project, and suggests to start editing it. In case of refuse, emulator disables the Recording mode and resumes playing back the project movie. In case of agreement, emulator sends a signal to Taseditor, and at the end of the current frame Taseditor will launch and load the currently played project.
- When a ROM is loaded into emulator, the user can launch Taseditor at any moment. If he opens the Taseditor window while playing or recording a movie, Taseditor will automatically create a nameless project containing this movie Input. But if the movie is starting from a savestate, Taseditor will display a warning about not supporting such movies and then create a blank project.
- While the project has no name, autosave function doesn't work.
- When saving a nameless project, Taseditor suggests the current ROM name as a name for the fm3 project, with the extension changed to .fm3.
- Since the FM3 format is a superstructure over the FM2 format, the user can open fm2 files just like Taseditor projects, using the "Open TAS Editor Project" dialog and choosing the filter "All Files (*.*)". When opening fm2 files, Taseditor additionally informs the user about it with the Yes/No dialog. The user can either load the fm2 file as a new project or cancel the loading.
- After opening an fm2 file or a corrupted fm3 file, the project is considered nameless, even though the TAS Editor window caption displays the name of the loaded file. At the first saving attempt (Ctrl + S) Taseditor will bring the SaveAs dialog, where the loaded fm2/fm3 file name will be suggested as a name for the project. The user can either save the project with this name or change the name. This way Taseditor draws your attention to the fact that the new project significantly differs from the file that exists on the disk under the same name.
- FM3 projects store the version number of the FM3 format used when saving the file. Different versions can be totally or partially incompatible with each other. If the loaded project version doesn't match the currently supported one, Taseditor shows the Yes/No/Cancel dialog. The user can either resume his attempt to load the whole project (not recommended), or load only the Input from the FM2 data (recommended), or cancel loading.
- FM2 format (and therefore fm3 too) stores the MD5 checksum of the ROM used when creating the movie/project. When loading a project, Taseditor compares the current ROM checksum with the project's one, and if they don't match, brings the Yes/No dialog, displaying the original and the current ROM names. The user can resume loading or cancel it. Later, when saving this project, Taseditor will notice the checksum mismatch again and suggest replacing the ROM name and the checksum in the file before saving. The user can either approve the replacing, or save the project with the old name and checksum, or cancel the saving.
- When loading a corrupted project file, Taseditor tries the best of its ability to prevent emulator crash. If an error is found in the middle of loading, the further loading stops and the rest data is replaced with the default data. Particularly, if the error occurred while loading the Greenzone, the project is left with only the Greenzone frames that were successfully pulled out of the file, the rest frames will be pale. Project loading error messages are logged into the FCEUX Message Log.
- When loading a project, Taseditor respects current settings of "Greenzone capacity" and "Undo levels". For example, if while saving a project the Greenzone capacity was 5000, but when loading the project the Greenzone capacity is 3000, some frames will be skipped when loading. It's necessary so that a project saved on a more powerful computer can be opened on a less powerful one, that doesn't have enough memory.
- When launching, Taseditor loads the data about patterns from the taseditor_patterns.txt file. If this file cannot be opened (fer example, it was removed), Taseditor creates a small set of default patterns, in order to keep the Patterns menu filled.
- Savestates used by the Greenzone differ from regular savestates a bit. They don't contain movie data, because it's useless information for the Greenzone purposes. Besides, they are always compressed, in order to save memory.
- If after a Delete or Lua Change operation the user effectively removes all Input from the movie, Taseditor will create one blank frame in the movie beginning.
- When user is selecting a range of frames by stretching, it's still possible to use hotkeys with the other hand. To avoid conflict, during DRAG_MODE_SELECTION and DRAG_MODE_DESELECTION some functions related to changing the Selection will not work:
- clearSelection()
- selectAll()
- selectBetweenMarkers() – Ctrl + A
- selection.undo() – Ctrl + Q
- selection.redo() – Ctrl + W
- reselectClipboard() – Ctrl + B
- selection.Transpose() – Ctrl + Up, Ctrl + Down, Ctrl + Home, Ctrl + End
- selection.JumpPrevMarker() – Ctrl + Page Up
- selection.JumpNextMarker() – Ctrl + Page Down
- Since the icon column is rather narrow, the user may accidentally miss clicking it. So when you click the left border of the Piano Roll or a bit to the left from it, Taseditor assumes that was a click on the icons column. As a result, the user doesn't have to precisely aim when he needs to move the Playback cursor or start dragging it.
- When emulator is paused, the middle mouse button works only under condition that the right button is released. Since the middle button is usually a wheel, the user can accidentally push it while rolling the wheel with the right button held (Playback cursor navigation). As for rolling the wheel with modifier keys held, this is used much less often, so they don't need such protection.
- Any middleclick over the FCEUX window is sent to Taseditor window. Similarly, the wheel rolling message is sent to Taseditor, when the focus is on the FCEUX window. And the rightclick on the FCEUX window doesn't work at all. Thanks to that, you can use the middle button (the wheel) even when the mouse cursor is over the FCEUX window.
- Even when the Recording mode is on, Taseditor won't rerecord Input while seeking. Thanks to that, you can safely drag the Playback cursor without disabling the Recording mode.
- When Taseditor is engaged, the following menu commands are available only when the Recording mode if on and the Playback is not seeking:
- NES -> Reset
- NES -> Power
- NES -> Eject/insert Disk
- NES -> Switch Disk Side
- NES -> Insert Coin
- When Taseditor is engaged, the following FCEUX menu commands are unavailable:
- File -> Open ROM
- File -> Close
- File -> Recent
- File -> Savestate -> Load State
- File -> Savestate -> Save State
- File -> Savestate -> Load State From
- File -> Savestate -> Save State As
- File -> Savestate -> Next save slot
- File -> Savestate -> Previous save slot
- File -> Savestate -> View save slots
- File -> Movie -> Recent
- File -> Movie -> Record Movie
- File -> Movie -> Play Movie
- File -> Movie -> Stop Movie
- Config -> Enable -> Auto-savestates (always off when Taseditor is engaged)
- Config -> Enable -> Backup Savestates (always off when Taseditor is engaged)
- Config -> Enable -> Compress Savestates (always on when Taseditor is engaged)
- Config -> PAL Emulation (set up this before launching Taseditor)
- Config -> PPU -> New PPU / Old PPU (set up this before launching Taseditor)
- It's also necessary to ensure that the user can not change the movie synchronization settings while editing the project. So when Taseditor is engaged, the following GUI elements in the "Input Configuration" window are locked:
- the "Attach four-score" checkbox
- the "Replace port 2 Start With Microphone" checkbox
- ListBox for port0
- ListBox for port1
- ListBox for port2
- When Taseditor is engaged, the following hotkeys are not working:
- Hide Menu Toggle
- Fastest Speed
- Save State As...
- Load State From...
- Record Movie To...
- Play Movie From...
- Stop Movie
- Toggle Dipswitch – because these commands are not supported by the FM2 format yet
- Load Last Auto-save
- View save slots
- Open ROM
- Close ROM
- Undo/Redo Savestate
- Toggle Fullscreen
- Hotkeys that change their behavior when Taseditor is engaged:
- Power
- Reset
- Eject or Insert FDS Disk
- Switch FDS Disk Side
- Insert Coin
- Savestate Slot 0 – Savestate Slot 9
- Save State
- Save State to Slot 0 – Save State to Slot 9
- Load State
- Load State from Slot 0 – Load State from Slot 9
- Play Movie From Beginning
- Reload ROM or TAS Editor Project
- Open TAS Editor
- Since the Alt and F10 keys are actively used in Taseditor work, their standard behavior (open main menu) is disabled.
- Since the Spacebar key is used as a hotkey by default, its standard behavior (simulate the click on the currently focused GUI element) is disabled. Also, all GUI elements of the TAS Editor window handle the middleclick message and send it to the Playback, thus the middleclick works independently of the mouse cursor position.
- Since the context menu on the rightclick at the Piano Roll is not often used, it appears only if the user clicks the selected line in the frame number column (Frame#). In all the rest cases the context menu doesn't appear, instead the rightclick-and-hold at the Piano Roll allows to drag its contents in any direction.
- Since the right button is often used for the Playback cursor navigation with the wheel, the user is encouraged to click it without caring about the current mouse cursor position. In theory it's possible that the user accidentally rightclicks a Bookmark. To avoid such unintended commands, the Bookmark List and the Branches Tree both require to press and release the right button over the same Bookmark. Also, if between pressing and releasing the user rotated the wheel, the Bookmark won't be changed.
- The user can jump to a Bookmark with a single click on the desired icon in the Branches Tree. Doing so he expects that after the click the light-blue triangle (the Playback cursor icon) will also jump to the place in the Branches Tree. It is indeed so for Bookmarks that don't contradict with the current timeline, but it's not so for Bookmarks representing alternative strategies. After jumping to the frame of such Bookmark, the Playback cursor will appear on another branch (even though it's on the same frame of the movie). To notify the user about possible misconception, the mouse cursor turns into an arrow with a question mark when the user points to such Bookmarks.
- While the Branches Tree is transforming, hovering the mouse cursor over its elements doesn't work, because the active element area is constantly moving and running away from the mouse cursor.
Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator