Commit Graph

1713 Commits

Author SHA1 Message Date
Suuper 1f4b0d5d77 -More work on TasStateManager
-Fix: SaveStateSettingsForm was setting the disk capacity to 1 mb on load if it had been set to 0.
2015-08-17 11:32:46 -05:00
Suuper f76c49ce1b -Fix: Loading a TasProj caued it to be saved immediately after. (Some old TasProj files are now broken.)
(Saving process for movies still needs some cleaning.)
-Fixed setting input log by reference when loading a branch
-Fix: TasStateManager wouldn't decrease Used when deleting a RAM state from a branch.
-Removed a useless call to Movie.Save()
-Fixed a bug with creating a savestate anchored tasproj.
2015-08-17 09:14:08 -05:00
Suuper b054032694 TasStateManager: Improve performance of StateToRemove
A lot of work on tracking states, still lots to do.
2015-08-16 11:28:03 -05:00
Suuper 65a9b0bfdd Fix my last commit. 2015-08-15 10:16:00 -05:00
Suuper d6e3553449 TAStudio: Fixed displayed maximum state capacity.
Clear states to stay within the new limit when settings are changed.
2015-08-15 10:07:56 -05:00
zeromus 5bf21e391c TasStateManager uses a new data structure to write all states to one auto-deleting file per TasStateManager instance. TasStateManager is now IDisposable; this needs to be followed rigorously (I didn't do that). 2015-08-13 21:51:51 -05:00
Suuper 078bd102e8 TasStateManager should work with branch states on disk now.
Also now tracks the RAM/disk space used by branch states.
Added bookmarks to branches.
2015-08-13 13:03:22 -05:00
Suuper 4ce346661b Branch states on RAM should work. (Disk states will break things.) 2015-08-13 09:42:04 -05:00
zeromus d0f56ac98d lua - add client.SetGameExtraPadding(left,top,right,bottom) 2015-08-09 13:57:45 -05:00
feos 551acd8c9e tastudio: shift is occupied, alt is not. use alt for marker drag!
the need to draw selection in patterns is too weak, so we can safely leave alt-clicks and alt-draws to input columns only (when it's implemented).
2015-08-06 20:24:56 +03:00
feos e687c4ab1a tastudio: don't count rerecords while drawing 2015-08-06 20:03:30 +03:00
zeromus b981e00889 fully support read-only movie opening. I hope this fixes #453 2015-08-05 17:00:39 -05:00
zeromus 3ec314d20b TasStateManager: don't touch disk unless opened for 'write access' 2015-08-05 16:36:44 -05:00
zeromus 5402f1ff9e dont reorder cheats list when editing cheats 2015-08-04 22:25:58 -05:00
adelikat 15303fd49f Tastudio - branches - fix crash when dropping a branch onto an invalid area 2015-08-04 21:54:43 -04:00
adelikat 226fcbb829 Tastudio - when showing branch number on a frame and there are multiple branches, grab the most recent by timestamp 2015-08-04 21:45:11 -04:00
adelikat a686465911 Tastudio - Branches - show timestamp not movie length, and save/load the timestamp to the .tasproj 2015-08-04 21:41:31 -04:00
adelikat 64126fbad3 issue #469 - lua - forms.newform() - add an onclosed callback optional parameter 2015-08-04 20:17:04 -04:00
adelikat 2373e5bcd5 Support .xml disc bundling for PSX, note: this is sloppy code and mostly copy pasta, sorry. 2015-08-04 17:19:21 -04:00
adelikat ad821c90d5 lua - implement client.exit() 2015-07-31 18:44:53 -04:00
feos a8fc79910f tastudio: clamp newCell for dragged branches.
this fixes another OOB crash.
2015-07-31 00:30:40 +03:00
Suuper 0d87c8330c TAStudio: -Put lag log and change log back into branches.
-Bugfix: clearing states in a savestate-anchored movie threw an exception
-Clear disk states when clearing states
2015-07-30 15:14:34 -05:00
Suuper e78b39208b InputRoll: Bugfix with my new code. 2015-07-30 15:14:32 -05:00
feos 78f4084411 tastudio: color frame column the same as player 2.
this visually separates frame number column from input.
could have been done by aligning frame text to the right, but it's not possible right now.
2015-07-30 21:09:07 +03:00
Suuper a0eea10de5 InputRoll: Fix a bug with cell highlight colors, and make highlighted shading weaker. 2015-07-30 13:01:52 -05:00
adelikat 09f472ea91 Tastudio - ability to click drag branches to reorder them 2015-07-29 22:15:00 -04:00
adelikat 23b1199bbd Tastudio - show branch numbers on the navigation column for frames that correspond to branches 2015-07-29 19:45:51 -04:00
feos e6fdac6923 tastudio: current branch tweaks.
- make bg color readable, and match the plaback cursor one
- set last updated or added branch as current
2015-07-29 21:38:10 +03:00
adelikat fd8d4e4678 Tastudio - branches - cap the framebuffer display size to 320 width 2015-07-28 20:46:11 -04:00
adelikat 6e9b10d4fd remove debugging try/catch 2015-07-28 20:04:25 -04:00
adelikat 6bcbf82b7c Tastudio - ability to move markers by shift+click dragging them 2015-07-28 20:03:03 -04:00
adelikat a219e7150e Tastudio - add an option to create a saveram anchored movie from a selected frame, just like the savestate anchored movie feature, it uses the current movie to create a verification log 2015-07-27 19:25:48 -04:00
Suuper 2d64e0d115 TAStudio: -Scroll by painting doesn't require FollowCursor anymore
-Undo History form display bug fixes.
-Removed menu item to combine consecutive recordings/draws
2015-07-26 14:54:31 -05:00
Suuper d22a0db61e TASTudio: Fix hovering over column headers 2015-07-26 13:44:30 -05:00
adelikat d6d901820f Tastudio - undo dialog - don't show default icon 2015-07-26 08:16:04 -04:00
Suuper f72eadb76e TAStudio: -Fix: Undo/Redo didn't always jump back to valid frame.
-Performance boosts with multiple selected rows
2015-07-25 22:49:52 -05:00
Suuper 7a0103963d TAStudio: -History form's Auto Scroll now scrolls to current undo step instead of the last item in the list
-Allow user to cancel setting wheel scroll speed
2015-07-25 22:49:51 -05:00
adelikat db1130a8a3 Tastudio branches - ability to update a branch 2015-07-25 21:56:24 -04:00
adelikat a2edd3a018 Tastudio - Branches - fix screenshot hover, and also set the screenshot hover size to a "1x" resolution for the given core 2015-07-25 21:31:06 -04:00
Suuper 91c12d06b6 TAStudio: -Show button name and frame of painted input in undo log.
-Don't scroll to follow cursor while mouse button is held.
2015-07-25 20:15:35 -05:00
Suuper 00f38094b2 TAStudio: -Gave default values to my recently added TAStudioSettings settings.
-Properly check Always Folor Cursor menu item.
2015-07-25 20:01:02 -05:00
Suuper 6ca7080a85 TAStudio: Fixes to how scrolling while painting input works. 2015-07-25 19:56:13 -05:00
adelikat 0963c17206 Tastudio branches - when removing the selected branch, clear the selection color 2015-07-25 20:55:23 -04:00
adelikat c969c57ee9 Tastudio - remember split container settings, and also restore defaults 2015-07-25 20:21:31 -04:00
adelikat 4564cc5c6b Tastudio - make right side fixed when resizing 2015-07-25 18:48:46 -04:00
adelikat f747563f74 Tastudio - split container between input log and the right side controls 2015-07-25 18:33:58 -04:00
adelikat ce6623ba39 Tastudio - split container for bookmarks vs markers 2015-07-25 17:03:13 -04:00
adelikat aeccf2e310 Tastudio Branches - Fix null reference excepting when navigating after branch load 2015-07-25 16:36:36 -04:00
adelikat 3ffd7a528f Tastudio branches - give the length column a bit more length 2015-07-25 16:28:51 -04:00
adelikat bac2ba42a6 Tastudio branches - a slight code improvement 2015-07-25 15:42:28 -04:00
adelikat 1070fceaa5 Tastudio Branches - when removing the current branch, clear the CurrentBranch flag 2015-07-25 12:07:22 -04:00
adelikat 1a5814b7a8 Tastudio branches - tweaks to hover effect 2015-07-25 12:01:26 -04:00
adelikat 59c7349900 Tastudio branches - screenshot hover - fixes and cleanups 2015-07-25 11:08:23 -04:00
adelikat b67fda05f5 Tastudio - Branches - show frame buffer when hovering on the branch #, still a lot of tweaking to do 2015-07-25 08:59:39 -04:00
adelikat 3ea0d66785 InputRoll - support a cell hover event 2015-07-25 08:57:44 -04:00
Suuper 70538adfac -Follow Cursor settings are now saved. 2015-07-25 03:33:23 -05:00
Suuper f20da940fa TAStudio: Right-click shift+ctrl didn't jump to greenzone. 2015-07-25 03:28:21 -05:00
Suuper 4b669662b4 InputPromt: Signed and Unsigned behavior was backwards.
TAStudio: -Handle wheel scroll speed when changing orientation.
-Save wheel scroll speed setting.
-DrawInput setting was not being properly loaded.
2015-07-25 03:20:16 -05:00
Suuper 072aeb93d5 TAStudio: added an option to have the mouse wheel scroll TasView faster 2015-07-24 15:13:39 -05:00
Suuper e499503a60 TAStudio bugfixes: -Invalidated 'green' frames were displaying as white; also removed two unused color variables.
-When painting input upwards, the last frame hovered over wasn't set.
2015-07-24 14:49:00 -05:00
scrimpeh 9b6ff71cac Enably NES Music Ripper only with NESHawk, also throw out vestigial method in HotkeyConfig. 2015-07-24 18:26:14 +02:00
Suuper 3c3cdc4590 Fixed a display bug cauased by player highlighting
(also renamed a variable and changed comment lines)
2015-07-23 13:30:25 -05:00
Suuper f9cd2f4075 -TAStudio: Players' 2, 4, etc input columns have darkened bg colors.
-LagLog is now moved over to new savestate-anchored movies
2015-07-23 12:55:22 -05:00
adelikat 72d73cd754 Tastudio - branches - convert listview to inputroll 2015-07-22 17:26:25 -04:00
Suuper 01290d2e59 -Allow creating savestate-anchored movie from savestate-anchored movie
-Fix marker placement in savestate-anchored movies
2015-07-22 15:08:50 -05:00
Suuper 52544efec9 -Branches now have their own undo history 2015-07-22 14:31:47 -05:00
Suuper 6f105f6ee8 -Better fix of lag log clearing.
-Current branch is now highlighted in BranchView
2015-07-22 14:14:33 -05:00
Suuper 635ad9c01d -Fixed LagLog.Clone (was putting LagLog in the new WasLag)
-Fixed lag log being cleared on re-loading branch
2015-07-22 13:17:24 -05:00
zeromus 50aaa61d2c case insensitive lua functions library docs search 2015-07-22 12:13:30 -05:00
adelikat 8a4e33981c Ram Watch - only show the Read/Write breakpoints context menu items if the selected address(es) are on the system bus, and only show if all the criteria to use them are available rather than showing and disabling them. 2015-07-21 22:30:38 -04:00
adelikat dca259fff2 Tastudio branches - progress on loading the frame buffer when loading a branch 2015-07-21 20:31:51 -04:00
adelikat 4629233c74 Merge branch 'master' of https://github.com/TASVideos/bizhawk 2015-07-21 19:45:26 -04:00
nattthebear 862f82b1b2 Screenshots on tasproj branches 2015-07-21 19:41:57 -04:00
adelikat dbd545c0cd Merge branch 'master' of https://github.com/TASVideos/bizhawk 2015-07-20 20:10:04 -04:00
zeromus 0787a3be47 rework virtual pad analog widget to support n64 and psx simultaneously 2015-07-19 21:46:52 -05:00
adelikat 952b8f267a Tastudio - branches - purty icons for the context menu 2015-07-19 22:12:35 -04:00
adelikat 6000a499e7 Tastudio - Branch context menu item available if pointing at the current frame 2015-07-19 21:57:41 -04:00
adelikat 125a16ec67 Tastudio - refresh branches listview when loading a new/existing tasproj 2015-07-19 20:49:23 -04:00
adelikat bcab41c676 Tastudio - branches - show branch time calculation 2015-07-19 10:50:14 -04:00
adelikat 4188f2105e Tastudio - branches - ability to load a branch, currently the frame buffer does not have OSD info 2015-07-19 10:37:53 -04:00
adelikat 2201d01982 Merge branch 'master' of https://github.com/TASVideos/bizhawk 2015-07-18 22:20:51 -04:00
adelikat 1af28239dc Tastudio - lots of progress on branches 2015-07-18 22:20:38 -04:00
adelikat bf3587bd5b Tastudio - wire an instance of tastudio into Bookmark control 2015-07-18 16:13:38 -04:00
adelikat 2c7fd7edea Tastudio - add a bookmark widget, doesn't do anything yet 2015-07-18 16:10:56 -04:00
scrimpeh 7e23b06dd3 Debugger/Breakpoints - Add edit and duplicate Breakpoint buttons, refine AddBreakpoint dialog 2015-07-18 20:41:06 +02:00
zeromus f8497507f7 proof of concept: handle VirtualItemsSelectionRangeChanged on VirtualListView to fix some bugs when shift+clicking. Better fix is to correct all this stuff at the base class level and turn it into a more normalized event that works the way you expect. 2015-07-18 12:32:48 -05:00
adelikat 140ce0af16 TASTudio - when showing the marker naming pop up, clear out all the states that would have been done by the mouse up event that hasn't happened yet, prevents being able to highlight frames while the pop up is open 2015-07-18 12:33:03 -04:00
adelikat aebd7f3dae Tastudio - fix column click 2015-07-18 11:07:36 -04:00
adelikat bc553605ac Tastudio - when drawing auto-held column background, take horizontal scrollbar into account 2015-07-18 10:47:20 -04:00
Suuper 194d988a5f Put frame clears and macro placements in undo batches
Better undo descriptions for right-click edits
2015-07-16 14:40:00 -05:00
scrimpeh 73686d53dc Debugger/Disassembler - Fix adding one blank row to the disassembler view. 2015-07-16 21:18:13 +02:00
Suuper bc8717c9f9 Fixed right-click input painting in TAStudio. Also removed mouseWheelTimer as it is no longer needed. 2015-07-16 13:57:51 -05:00
Suuper 46e8bdeefa A quick attempt at fixing frame scrolling up with wheel. Not perfect, but better. 2015-07-15 15:11:32 -05:00
Suuper b9865db397 Fix: TAStudio was still seeking after edits with "Auto restore" disabled and while unpaused.
Fix: The bug where editing while seeking changed PauseOnFrame came back again.
2015-07-15 15:01:08 -05:00
Suuper 07a8a4c1d3 Removed SuppressGreenzoning because TAStudio should not allow the user to be on a frame that isn't "greenzoned". It will now jump back to the greenzoned area immediately when an edit invalidates part of the greenzone, and pause there until mouse up.
This fixes a bug which caused TAStudio to generate and keep invalid savestates.
2015-07-15 14:26:56 -05:00
Suuper f1b23b9ed3 Bugfix: Editing while seeking could set the seek frame to an earlier frame. 2015-07-14 15:14:00 -05:00
adelikat a9af8e4f3c InputRoll - wire up RowScroll and ColumnScroll events, still todo: make a custom EventArgs argument and pass useful info through it 2015-07-14 14:13:21 -04:00
Suuper e3a8c33be5 -Fixed typo in variable name (SupressGeenzonging)
-Removed state capture from TasMovie.RecordFrame
-Fixed: States weren't captured while left mouse button was still down from clicking a frame.
-TAStudio now automatically captures after loading a new movie.
2015-07-13 22:06:21 -05:00
feos 510ebf519a tastudio: moved scrolling catch up and refresh to the end of TasView_PointedCellChanged().
can drag selection offscreen too now.
todo: drag things above the view.
2015-07-14 00:40:05 +03:00
feos a2cb4373a9 tastudio: scroll to frame appended by offscreen dragging.
need to figure out scroll speed, as it is too high unless drawing VERY slowly.
2015-07-13 22:06:24 +03:00
Suuper 228a24efb0 Fixed my previous commit/push; feos' change is back.
Improved "StartAtNearestFrameAndEmulate".
2015-07-13 14:02:21 -05:00
Suuper d84da62432 Tidied up TAStudio's "GoToFrame" and fixed a runaway seek in "StartAtNearestFrameAndEmulate" 2015-07-13 13:49:12 -05:00
feos feb14ad948 tastudio: don't jump to playback when advancing/rewinding
offscreen marker goto is the only SetVisibleIndex() call that should show playback
tastudio: cursor is not a marker anymore
2015-07-13 20:37:12 +03:00
feos de699656d6 tastudio: introduce fast scroll idea via timer
seek frame is reset only if paused OR 100ms since last scroll haven't elapsed
2015-07-12 21:54:31 +03:00
adelikat f9dad99484 Tastudio - fix crash when loading a tasproj with a different controller configuration than the current 2015-07-12 12:45:30 -04:00
adelikat 58f8ad7c12 Issue #422: Virtual Pads - analog stick - when sticky option is off, and the emulator is unpaused, do not snap to 0 until the mouse button is released 2015-07-10 14:36:29 -04:00
adelikat a8bf7f1828 oops 2015-07-10 10:26:51 -04:00
adelikat a9c460802b add an option to run lua scripts while turboing instead of bypassing them. Make this option true by default (a change to the current behavior). Add a checkbox in the customize dialog to toggle this option. 2015-07-09 20:14:52 -04:00
adelikat 7ecf96772c tastudio/lua - implement tastudio.setlag() 2015-07-09 13:16:55 -04:00
adelikat 9455aec767 Tastudio/lua - implement tastudio.onqueryitemicon() 2015-07-09 12:47:59 -04:00
adelikat b0ea42f5a7 Tstudio - some reorg 2015-07-09 12:35:48 -04:00
feos 53c415a843 tastudio: keep track of rerecords, increment them in InvalidateAfter()
markers: fix input roll context menu command removing Markers
gpgx: updated dll
2015-07-09 00:48:04 +03:00
scrimpeh 60c3734e8c Ram Watch - Fix moving up and down blocks of identical Watches 2015-07-05 18:55:43 +02:00
adelikat 19423092cd Tastudio/lua - implement tastudio.ongreenzoneinvalidated 2015-07-02 14:51:42 -04:00
adelikat 105b8d3a64 Tastudio - cell height padding of 0 instead of 1 2015-07-02 14:37:28 -04:00
Tom Rochette a783ef75f6 Simple Lua sandbox.
Uses an EnvironmentSandbox to restore the Environment.CurrentDirectory. Will also catch any script exception and redirect them to the Lua console.

With this change, I've tried to replace all the places where Lua is executed so that if an exception occurs, it is catched, sent to the console and a callback is executed if necessary.

This also fixes a small issue where any callback generating an exception would crash BizHawk.
2015-07-01 22:38:19 -04:00
adelikat c53cef6cf9 tastudio/lua - implement tastudio.onqueryitemtext 2015-07-01 19:46:14 -04:00
adelikat f847e905d2 tastudio/lua - add onqueryitembg event to the lua library, this is called during each cell's background color drawing callback, and gives the opportunity for lua to override the color. 2015-07-01 19:01:29 -04:00
Tom Rochette de98e0ed66 [#405] Set Environment.CurrentDirectory when executing Lua events within a WinForm.
Since events are not executed within the LuaConsole.ResumeScripts method, those did not have Environment.CurrentDirectory available for the executing script.

The fix is simple: when a lua script instantiates a LuaWinForm (through forms.newform), we store the current Environment.CurrentDirectory in the LuaWinForm object.
When a button or checkbox is triggered, it calls WinForm.DoLuaEvent which will set up the Environment.CurrentDirectory for the duration of the callback and then set it back to the initial Environment.CurrentDirectory.
2015-06-30 22:35:59 -04:00
adelikat e50f81d54c Tastudio - remove a line of code that makes the emulator spaz out when mousewheeling up very fast, I don't think removing this breaks anything, I suspect it was only there from some defensive programming and overthinking 2015-06-29 22:08:31 -04:00
adelikat 8911049f68 Merge pull request #447 from TomzxForks/fixes/lua-console-output-resize
Add a split container to LUA console window.
2015-06-29 21:35:46 -04:00
adelikat b991493c97 backing out of last change, it was not well thought out 2015-06-29 17:09:47 -04:00
adelikat 947f18d971 Hex Editor - super hack, allow keyboard events even when scrollbar has focus, to workaround the fact that the scrollbar mysteriously gets focus from numpad buttons 2015-06-29 17:06:46 -04:00
adelikat a2c73eb793 Remove some commented and useless 2015-06-29 16:23:59 -04:00
Tom Rochette c03a162bc1 Add a split container to LUA console window.
With the split container, resizing the window will properly reformat the output section as well as allow users to resize it.
2015-06-29 00:28:35 -04:00
ConHuevosGuey d97d94ecbc Made size nullable...now requires a size input. 2015-06-28 13:25:28 -05:00
ConHuevosGuey 229865c443 Added a 'Draw Axis' function to lua GUI library 2015-06-28 13:23:07 -05:00
adelikat 13044547e4 Tastudio - fix issue #446 - don't greenzone between the mouse down and mouse up events when editing input 2015-06-28 10:43:45 -04:00
adelikat cd4955fbe5 Tastudio - fix autoload 2015-06-27 07:49:37 -04:00
scrimpeh 716cf12f6a Debugger - Tiny insignificant fixes 2015-06-27 13:03:24 +02:00
scrimpeh 0e4a641a81 Debugger - Fix a lot of stuff regarding Breakpoints 2015-06-26 22:12:09 +02:00
pasky1382 703dc33cc0 Small correction.
Removed the link to the key names that did not contain correct information, this list of key names is not used in Bizhawk for lua's input.get()
2015-06-22 13:40:22 +00:00
adelikat 46feea39cd TAStudio - account for a button name of "P" rather than assume it is a player number indicator, fixes issue #431 2015-06-21 16:13:35 +00:00
adelikat 7e2cfa0dd5 Multi-Disk bundler - fix various issues with the form, most significantly the wrong system Id for AppleII 2015-06-21 12:51:48 +00:00
adelikat aa75bd52e9 When adding an address to ram watch from another ram tool, don't load ram watch if it is already open 2015-06-21 00:21:36 +00:00
scrimpey 17ce177e5f Debugger - Make Register Boxes use Hex input. 2015-06-19 20:32:05 +00:00
adelikat 1631297cdd Start AutoHawk, just a stub with the anticipated required services and a config object 2015-06-15 22:12:24 +00:00
adelikat 6517178e6d lua - savestate.looad() - if path does not exist put a helpful error message rather than a vague .net error 2015-06-15 01:17:02 +00:00
adelikat 59eb3dc2f2 Fix SNES Game Genie Add button (issue #420) 2015-06-06 22:26:32 +00:00
adelikat 9f0e4f0735 Apple II VirtualPad - fix up names now that we have them 2015-05-18 01:34:35 +00:00
adelikat 549e9650ae oops, didn't mean to check this in 2015-05-18 00:38:27 +00:00
adelikat 9024df91f5 Virtual pad for Apple II, many of the names will have to be cross referenced with the core when those buttons are added 2015-05-17 23:05:12 +00:00
adelikat 7af274c1cc MultiDiskBundler - don't autofill stuff if the current "rom" is a .xml file 2015-05-17 20:37:19 +00:00
adelikat a04a80bfce add "new" to LuaCanvas.Refresh() because I"m tired of seeing the warning 2015-05-17 20:33:27 +00:00
adelikat 5354be978a remove DualGBFileSelector tool 2015-05-17 20:32:49 +00:00
adelikat c9f4a27fcd Multi-Disk bundler - add a system picker, with GB and Apple II as they are currently the only systems that support this 2015-05-17 20:26:25 +00:00
adelikat f912103914 Add a tools folder and map paths of things like watch files, debug stuff, etc there rather than defaulting to cluttering up the bizhawk root folder 2015-05-17 17:06:23 +00:00
adelikat 5f2e2f39b2 MultiDiskBundler - use relative paths when possible 2015-05-10 22:17:00 +00:00
adelikat c80fb97bc9 MultiDiskBundler - fix exception on load when the current rom is in an archive 2015-05-10 20:04:27 +00:00
adelikat ea72da9f89 Refector xml game, it now has a List of keyvalue pairs instead of dictionary, and the schema is now LoadAssets with an array of Asset tags. MultiDiskBundler changes to account for this, also remove restriction of using current rom based on system type, isntead it will assume any system is ok 2015-05-10 18:58:00 +00:00
adelikat 99e3c688bc progress on MultiDiskBundler 2015-05-09 13:05:19 +00:00
zeromus 6833a24638 add NES music ripper tool prototype 2015-05-08 00:56:46 +00:00
adelikat d604c89de5 MultiDiskBundler - progress 2015-04-23 01:41:56 +00:00
adelikat 732bc5389c progress on MultiDiskBundler 2015-04-19 22:34:08 +00:00
adelikat 64c588ea5a start the MultiDiskBundler tool, that will make it easy to make multi-game xml files such as for Apple II and dual gameboy (and eventually other systems) 2015-04-19 21:02:22 +00:00
adelikat 5d5a4d10f2 Ram Search - make IInputPollable an optional service not a required one 2015-04-17 15:21:19 +00:00
adelikat e57d15d85b oops, remove some debugging code 2015-04-12 17:47:34 +00:00
adelikat 53341ee24a Lua - add client.CreateInstance() which receives a type name available to EmuHawk and will construct and return the given object, currently it is limited to objects that have a parameterless constructor but we should be able to improve upon that limitation 2015-04-12 17:46:27 +00:00
adelikat a0d56df06b Lua - client library - change GetOpenTools() to GetAvailableTools() which returns a list of tools available to the currently loaded core, change GetTool() to receive any avaialble tool, if the tool isn't open, GetTool() opens it 2015-04-12 17:37:06 +00:00
adelikat 8d86ee012e Lua - implement client.GetOpenTools() to return a list of currently open tools. And client.GetTool(string name) which return an object to lua representing a currently loaded tool, lua then has access to any public methods of that object 2015-04-10 21:56:03 +00:00
scepheo abf1e55934 A bit of testing with Lua. 2015-04-10 14:11:01 +00:00
pjgat09 57fa633a9e Lua Forms: Fixed a bug with SetProperty 2015-04-05 04:11:00 +00:00
adelikat c01bd0d5ef Hex Editor - fix text search in the find box 2015-04-01 13:59:40 +00:00
zeromus e12c711a0e try to manage lua memory leak prevention in a way thats safer from re-entrancy during finalization thread 2015-03-28 05:53:03 +00:00
adelikat 6982df8035 Lua console - add a null check on close, LuaImp should never be null unless something went bonkers on load 2015-03-28 01:09:50 +00:00
adelikat b74e0a3b3d Lua - apply CrazyTB's patch to fix gui.drawImageRegion() 2015-03-24 22:15:36 +00:00
adelikat 16e9bc7d38 Fix some lua documentation 2015-03-23 22:22:02 +00:00
SuuperW 7da9efe3c2 Feature: Apply auto-fire patterns to painted input 2015-03-23 22:11:55 +00:00
adelikat e4b613d9f7 Lua - add gui.drawImageRegion() 2015-03-23 21:27:24 +00:00
SuuperW 52659ac9a9 -Hacky removal of a useless save when loading a TasProj
-Made ControlsOrdered much faster
2015-03-23 21:16:13 +00:00
SuuperW 9d7a522576 Fix, fix, fix... 2015-03-23 20:15:35 +00:00
SuuperW 9b8d2f70ab Various fixes 2015-03-22 16:55:34 +00:00
SuuperW 7e29f04f01 -Macros work without a TasMovie
-Bugfix: Display showed movie still playing after last frame
-Bugfix: Autorestore frame was lost when making rapid changes
-Bugfix: Canceling conversion of movie to TasProj stopped movie.
2015-03-20 16:53:42 +00:00
SuuperW 9328dd2f3a -TAStudio automatically set Read-Only
-TAStudio no longer refreshes every frame if playback cursor isn't visible; slight performance boost
-Editing while in playback won't mess up the LagLog (states still do)
-Fixes to rotated display and HBar scrolling
2015-03-19 19:55:38 +00:00
SuuperW 91dc780103 Fixes/changed to state history saving.
State History Integrity Check now stops at the last state.
2015-03-17 01:02:38 +00:00
SuuperW 6783978f49 Bugfix: Extending movie by painting invalidated last frame
Moved GreenzoneCurrentFrame call to a new method called after frame advance.
Feature: Scroll to marker
Page up/down now scrolls by one page
Scrolling via dragging bar and via wheel now both have the same max value.
2015-03-16 20:42:14 +00:00
SuuperW 84acda3bbc A couple bugfixes for float editing autorestore 2015-03-16 17:04:10 +00:00
SuuperW a3eadc8e5f Various bug fixes, most to TasStateManager. 2015-03-16 16:36:00 +00:00
SuuperW 37590e7ea4 TasStateManager can now save states to disk. 2015-03-15 06:26:57 +00:00
pjgat09 876bb5adf4 Ram search: fix searching for a specific value >= 0x80000000 2015-03-15 02:35:47 +00:00
SuuperW c661591c5c Smarter state management.
Don't focus on TasView if TAStudio doesn't have focus.
Bugfix: Scrolling with wheel didn't update pointed cell
Setting: Scroll to top/bottom/center
Follow cursor hotkey
2015-03-14 16:38:07 +00:00
SuuperW 1a0476892f Bugfix: TasProjects without states loaded without a power on state.
Bugfix: There were several ways to edit movie in TAStudio without rewinding to edited frame.
Smarter state management.
2015-03-12 18:31:28 +00:00
scepheo ab0547ddea Fix Trace Logger not restarting properly. 2015-03-11 20:58:49 +00:00
SuuperW c283f2d55a Macro tool button select works
-Recent macros list now saves
-Macros can now be saved/loaded from TAStudio.
2015-03-11 16:14:02 +00:00
SuuperW 04fafd910d Macro tool now seems to work when TAStudio is open. 2015-03-10 20:06:34 +00:00
SuuperW 6013b9ed2b Implemented feature: Auto-adjust Input according to Lag;
Added option: Hide WasLag Frames
-Changed implementation of TasLagLog
-Removed single-line Marker functions from TAStudio.
2015-03-10 17:11:29 +00:00
SuuperW 9891e73313 Added a couple Refreshes to TAStudio; Lag History is no longer completely cleared on making an edit. 2015-03-10 06:14:14 +00:00
SuuperW 5fd1f6912b TAStudio:
Fixed the Greenzone Integiry Check feature.
Bugfix: Right-click menu didn't show up.
2015-03-10 05:12:13 +00:00
SuuperW e2f79254be Changed TAStudio to not reference the no longer used StickyXORAdapter.
Chagned GetFloatValue to GetFloatState (to match SetFloatState)
2015-03-10 04:16:42 +00:00
SuuperW 36c7d50528 TAStudio: Columns menu set up during initialization; toggling visibility of a player's input keeps individual column selections; toggling a button's visibility leaves the menu open. 2015-03-10 00:33:58 +00:00
SuuperW 0322e3bdbe TAStudio: Grouped column display options by player, added mass toggle by player. 2015-03-09 23:27:01 +00:00
SuuperW 6fd8aad86b Lots of work on the Macro Tool. 2015-03-09 22:30:54 +00:00
adelikat aaa615533b Start a Macro Input tool 2015-03-08 20:11:02 +00:00
SuuperW 7360badb4a Added AutoFire support in TAStudio, fixed/improved patterns.
-A couple minor fixes
2015-03-08 04:42:04 +00:00
jdpurcell 67802eca8f (Issue 403) Fix misaligned highlighting in Hex Editor at non-default DPI settings. 2015-03-06 02:45:53 +00:00
SuuperW 49c3fe2449 TAStudio HistoryBox deleted. 2015-03-04 19:05:44 +00:00
SuuperW 189ecfeb2e TAStudio:
-Undo History UI, some history bugfixes
-Painting input past the movie no longer moves markers
2015-03-04 19:03:00 +00:00
adelikat dfe5b40ba9 Tastudio - hide undo history box for now 2015-03-03 23:28:30 +00:00
SuuperW 1e0ce3b7c1 -Feature: Changing input past the movie now extends the movie.
-Implemented max undo levels feature.
-Started making TAStudio UI for undo history.
2015-03-03 21:10:48 +00:00
SuuperW e4c4910b37 TAStudio:
-Several buggixes
-Feature: Right-click dragging frames to move/copy/clone. (Combine with Shift and/or Ctrl.)
2015-03-03 18:22:54 +00:00
SuuperW e40b10a0b6 -marker undo code moved to proper place
-undo history fixes
-feature: binding markers to input
-bugfix: TasView wasn't always refreshing when inserting/deleting frames
2015-03-03 08:32:39 +00:00
SuuperW 25e54f4390 -More StateHistory names
-Smarter state history management
TAStudio: A few bugfixes and performance boosts
2015-03-03 06:56:45 +00:00
SuuperW 2c876858f2 -Bugfix: TAStudio couldn't re-save a project.
-Bugfix: tasproj files without StateHistory couldn't load.
-Gave a bunch of StateHistory stuff proper names.
2015-03-02 23:43:52 +00:00
SuuperW bff3d64a4a -Various fixes, mostly to Undo/Redo.
-Changed Program.cs to not use a couple try statements when debugger is attached.
-Implemented the Undo/Redo menu item buttons.
-Ctrl-deselecting frames in TasView now supports dragging.
2015-03-01 19:29:33 +00:00
SuuperW cf081ce1fc TAStudio:
-Moved Toggle/SetStates from TasMovie.cs to TasMovie.Editing.cs
-bugfix: Yet another bug in setting LastVisibleFrame
-Removed unused declaration
-Fixed MarkerControl to not mess up display when a deleted marker is still selected.
-feature: Basic undo/redo history functions seem to work. (Ctrl+Z/Y in TasView)
2015-03-01 05:47:32 +00:00
SuuperW c12d715c12 TAStudio:
-Bugfix: Didn't refresh when changing lag frames to hide.
-Bugfix: Another error with setting LastVisisbleFrame.
-Bugfix: Truncating a movie didn't remove truncated marker selection.
2015-02-27 19:34:31 +00:00
SuuperW 836659264d TAStudio:
-Bugfix: Dragging to change a float was backwards.
-Fix: Setting LastVisibleRow with lag frames hidden now goes to the correct frame.
-TasView now sets FirstVisibleRow when jumping backwards
-Bugfix: Deleting a marker didn't remove selection; refresh messed up.
-Moved InputRoll.cs, SelectAll/DeselectAll to the Api region.
-Bugfix: Couldn't edit next-frame float values.
2015-02-27 19:06:02 +00:00
SuuperW 7624a92021 TAStudio edits:
-Bugfix: TAStudio was refreshing before autoscrolling to cursor.
-Partial fix: Made setting last visible frame more accurate when lag frames are hidden.
-Removed a line that set an unused local variable.
-Bugfix: Scrolling away from selection with lag frames hidden messed up the display.
2015-02-26 21:12:12 +00:00
adelikat f305ca5666 Don't crash if user elected to autoload Ram Watch but not autoload a Rom 2015-02-25 22:32:50 +00:00
SuuperW 81a8d38ca4 TAStudio work:
-Fixed InputRoll.VisibleRows property.
-Removed useless check for NeedsScrollbar.
-Removed TAStudio.ListView.cs property for hiding lag frames; changed InputRoll.cs to do that work more efficiently.
-Feature: User can now edit float values by holding the mouse button and dragging up/down.
-Bugfix: Moving the cursor past first displayed row while painting would not cause first displayed row to be painted. (and similarly with last)
2015-02-25 21:17:50 +00:00
adelikat aa2984dd96 Tastudio - Columns menu - show button names in addition to the column mnemonics 2015-02-24 22:46:35 +00:00
adelikat 0055bc1949 Tastudio - hack to remove N64 "fake analog" buttons from the list 2015-02-24 22:44:47 +00:00
adelikat 8af99c9066 Tastudio - make < and > buttons repeatable buttons 2015-02-24 21:44:26 +00:00
adelikat 6a02656417 Tastudio - track lag log history (1 level deep) and color "invalidated greenzone" using this information (a lighter shade of normal greezone colors) 2015-02-24 21:23:16 +00:00
SuuperW 734101a8fd TAStudio: Fixed arrow keys not being picked up in KeyPress, plus minor edits/bugfixes to arrow key editing of float values. 2015-02-24 20:55:24 +00:00
adelikat a4ce9de091 Tastudio - wire up the Lag Frames to Hide UI, and have it save in the Tasproj file 2015-02-24 20:38:46 +00:00
SuuperW 369c883ac0 TAStudio feature added:
-Hiding lag frames feature implemented. (Still needs a user interface to change the settings.)
2015-02-24 19:00:12 +00:00
scepheo 32b788b352 Hex Editor and new RAM Watch now default to memory domain byte size. 2015-02-24 10:18:20 +00:00
SuuperW db09b12925 More updates to TAStudio: (again all my changes marked with SuuperW)
-bugfix: Local variable hid another; float input couldn't be painted.
-bugfix: Bool input couldn't be painted starting from past the last frame.
-feature: Double-clicking a float input allows user to type value in. (arrow keys would also work, but those aren't seen by the InputRoll, no idea why)
-change: Selected cells are now half-highlighted, so user can still see the non-highlighed color.
2015-02-24 06:47:32 +00:00
SuuperW e3b9b7c795 A few edits to TAStudio:
-Double-click markers to jump to that frame.
-Drag painting input was one frame behind cursor.
-Some commented-out code for stuff I was messing with may also be present. (All edits were marked with SuuperW comment line.)
2015-02-24 03:06:57 +00:00
adelikat 5a2146bde2 Lua - fix fill behavior in drawBox, drawRectangle, drawEllipse, and drawPie 2015-02-24 00:37:56 +00:00
adelikat b45d3820be Lua - gui library - make all colors optional parameters and use defaults if not provided (initially white foreground and transparent background). Add gui.defaultForeground(color) and gui.defaultBackground(color) to change those defaults 2015-02-23 03:10:38 +00:00
adelikat ecaf95f400 ToolManager - a small cleanup now that there is an owner variable 2015-02-22 04:06:40 +00:00
adelikat 41950cb9e0 ToolManager - take a Form owner in the constructor and pass it in to any tools that are also Form objects (all of them). ToolBox - use the Parent property instead of GlobalWin.MainForm now that it is populated 2015-02-22 04:02:30 +00:00
adelikat 1514faf300 Move PresentationPanel from GlobalWin to Mainform, since it was primarily used there (and the few other places knew about GlobaWin.MainForm anyway) 2015-02-22 03:53:07 +00:00
adelikat 2bc68b99c7 Hex Editor - fix Load .tbl file menu item when rom is in an archive 2015-02-22 03:36:54 +00:00
adelikat c759eb80d5 mark Debugger tool as released 2015-02-17 00:55:21 +00:00
adelikat 73c1bedd9e Virtual Pad buttons - don't do anything on space, tab, and shift+tab 2015-02-14 03:51:29 +00:00
scepheo 48a6686f31 Lua Console: Command window gives slightly more sensible output now. 2015-02-08 23:47:15 +00:00
scepheo 152323d891 Lua Console: Console and immediate fields now use Courier New. 2015-02-08 23:09:58 +00:00
adelikat abbfcad071 Fix Ram Watch designer file 2015-02-08 22:30:18 +00:00
scepheo 714f4a9687 RAM Watch: Added read/write breakpoint setting to context menu. 2015-02-08 17:39:59 +00:00
jdpurcell b3ecd5dd28 Debugger / Trace Logger: Clean up newline handling in Copy code (newline may not be 2 characters on different platforms). 2015-02-08 15:32:56 +00:00
jdpurcell a1dcd9928e Fix empty DisassemblerView with non-standard DPI settings. 2015-02-08 15:16:28 +00:00
scepheo 0ff1808101 RAM Search: Fixed go-to using index instead of address. 2015-02-08 00:35:32 +00:00
adelikat 0ee999dde4 Lua - drawImage - speed up by caching images instead of reading them from disk on every call 2015-02-07 15:39:16 +00:00
adelikat 20a92686f9 Debugger - the Seek To feature requires Disassembling to be available in the core 2015-02-06 01:01:34 +00:00
adelikat 133723e50f Debugger - clean up some code 2015-02-06 00:56:54 +00:00
adelikat 8427a9db7e Debugger - add context menu item on Disassembler "Add Breakpoint" that will add an execute breakpoint on the selected address 2015-02-06 00:41:50 +00:00
adelikat e211cfdcf3 PSX - virtualpad support for non-dualshock controllers 2015-02-05 21:42:28 +00:00
adelikat 3ebd9bb2df Lua functions list - greatly speedup drawing 2015-02-05 00:04:05 +00:00
adelikat 4eda12a8b0 PSX - Virtualpad - pay attention to the number of conntected controllers - still todo: schema for Gamepad and DualAnalog 2015-02-01 14:02:01 +00:00
adelikat 5188c43e07 Debugger - Use proper PC register property on load - Fixes issue 380 2015-01-31 23:34:28 +00:00
adelikat 53cda95ca5 Lua Console - don't nag to save a session, unless a session exists 2015-01-31 01:52:29 +00:00
adelikat dba610d5d7 Hex Find - focus and highlight on load 2015-01-31 01:25:08 +00:00
adelikat 29a6c7369b Hex Find - even more simple 2015-01-31 01:23:03 +00:00
adelikat 8b48bd3e26 Hex Find - simplify some code 2015-01-31 01:16:41 +00:00
scepheo bdfdd96686 RAM Poke: Pressing the "Poke" button now also closes the dialog. 2015-01-30 16:15:08 +00:00
scepheo 860227ee66 LuaConsole: Actually stop and restart script upon tool restart. 2015-01-29 14:50:09 +00:00
adelikat 6f2488aa57 Lua - clear out lua drawing surface on restart 2015-01-29 03:36:19 +00:00
adelikat 307845b3b5 Lua - recover from a locked drawing surface exception and log to the console, rather than crash the emulator 2015-01-29 02:14:39 +00:00
adelikat 24a517d293 Lua - properly re-inject core dependencies on restart 2015-01-28 14:38:06 +00:00
adelikat 09072acb3b Lua Console - immediate box - in some situations wrap the text in a console.log(), such as if the user simply types a variable name 2015-01-27 23:27:44 +00:00
adelikat 3b13ea4a8f spaces to tabs, good ol whitespace commit 2015-01-27 23:18:48 +00:00
adelikat 5636c1b6a1 Ram Search - support copy similarly to ram watch 2015-01-27 03:09:13 +00:00
adelikat f547dfbb21 some fixes to last commit 2015-01-27 02:53:57 +00:00
adelikat bb2cd1b476 Ram Watch - support copy and paste (generates and receives the same text as would be in a .wch file) 2015-01-27 02:37:18 +00:00
adelikat 82bda9006a Cheats dialog - never ask to save changes, the cheat system is independent of the dialog and makes intelligent decisions already, no need to annoy the user 2015-01-27 00:44:13 +00:00
adelikat 8246de14aa IMemoryCallbackSystem - add a flag to indicate whether execute callbacks are available, in lua and the debugger, take this flag into account, also improve some availability checking in Lua memory callbacks. Flag N64 as not having execute callbacks available 2015-01-25 22:14:58 +00:00
adelikat e1f59363f2 Debugger - on refresh, check for new non-debugger made breakpoints and display them 2015-01-25 19:50:54 +00:00
adelikat d4d966680d Debugger - tweak positioning of register labels when registers are not settable 2015-01-25 16:56:18 +00:00
adelikat e1811371e4 Cheats - only allow writable domains in the domains dropdown 2015-01-25 16:20:53 +00:00
adelikat e51ffd95d8 Ram Watch/Search - disable poke and freeze toolbar items based on writability of a domain, also smarter enabling/disabling of them in general 2015-01-25 16:07:15 +00:00
adelikat 4a39b5a619 Hex Editor - if a domain is not writable, switch to a "read only" mode 2015-01-25 15:42:07 +00:00
adelikat 71d7c2537a Ram Watch/Search - also disable freezing if a domain is not writable 2015-01-25 15:15:56 +00:00
adelikat 7ed8704555 add a CanPoke() extension method for memory domains, checks for a null or not implemented Poke Poke delegate, use it to disable Poke on Ram Search and Ram Watch, still todo - hex editor and lua 2015-01-25 14:37:37 +00:00
adelikat d200c1be38 HexEditor.cs - fix line endings 2015-01-25 13:24:18 +00:00
adelikat e4800cb8f3 debugger - fix ability to set write and execute breakpoints 2015-01-24 19:50:18 +00:00
adelikat d9c7e09445 Debugger - fix sound stutter on add breakpoint dialog pop up 2015-01-24 18:23:04 +00:00
adelikat 7b87f666a1 MemoryDomains - rename CheatDomain to SystemBus 2015-01-24 15:49:02 +00:00
adelikat f89f8fc457 add a PauseChanged event to mainform, have the debugger subscribe to it and refresh instead of refreshing every frame, add a refresh menu item with F5 hotkey just in case 2015-01-24 03:10:21 +00:00
adelikat 027706be70 Debugger - to PC button 2015-01-24 02:50:22 +00:00
adelikat 652640d580 Debugger - disassembler - support ctrl+C to copy selected rows to the clipboard 2015-01-24 00:02:22 +00:00
adelikat 5d2eb17771 debugger - fix scrollbars on register panel 2015-01-23 23:51:37 +00:00
adelikat 19450e50f7 Debugger - Register box - make label spacing dynamic based on the largest register name 2015-01-23 23:17:24 +00:00
zeromus 773826049f fix bug in disassembler 2015-01-23 20:29:07 +00:00
zeromus 2a1f40982c dont know how valuable it will be, but just in case.. 16.16 fixed point support 2015-01-22 01:24:20 +00:00
zeromus 3a8fcec1bf HexEditor: add a bit of a hacky n64 matrix viewer test code to context menu 2015-01-22 01:15:06 +00:00
zeromus c445dcf183 HexFind: respond to escape key 2015-01-22 01:14:49 +00:00
adelikat aff2e9544e Ram Search - change "Add to Ram Watch" hotkey from ctrl+R to ctrl+W for consistency 2015-01-21 23:20:58 +00:00
adelikat 69b2e51e7c Debugger - add a cancel seek button 2015-01-21 23:04:47 +00:00
goyuken af451143bf a bit of memory domain cleanup 2015-01-21 17:36:22 +00:00
adelikat 4b2d116738 Debugger - implement the Seek To button 2015-01-21 02:12:59 +00:00
adelikat 1fadcdd9f0 Debugger - add a SeekTo button/textbox, doesn't do anything yet, other than intelligently enable/disable based on availability and set the textbox properties based on the properties of the PC register 2015-01-21 00:46:13 +00:00
adelikat 5462e16b91 Hex Editor - fix a bunch more int to long conversions 2015-01-19 02:42:58 +00:00
adelikat a8b1fc609a Ram Poke - handle the case of an absurd amount of addresses picked 2015-01-19 02:04:04 +00:00
adelikat 1c6d6f57bc Hex Editor - better location for the poke dialog, don't attempt to highlight non-visible addresses (fixes some bad drawing when highlighting and scrolling) 2015-01-19 01:49:56 +00:00
adelikat ebf7273cbe Hex Editor - open poke dialog in a logical location, update the hex editor when Poke is clicked on the Poke pop up dialog 2015-01-19 01:39:47 +00:00
adelikat 0620246ef4 Hex Editor - fix highlighting of addresses greater than 7FFFFFFF in 32 bit domains 2015-01-18 20:15:03 +00:00
adelikat f647f16592 Ram Watch - add/edit watch - support 32 bit domains 2015-01-18 19:50:31 +00:00
adelikat f6b757e7fd Add Breakpoint dialog - fix a slight logic error 2015-01-18 19:08:25 +00:00
adelikat 515a41592c Convert a whole bunch of ram stuff from int to long 2015-01-18 18:59:23 +00:00
adelikat 89b3c31872 Hex Editor - more long conversion, highlighting will now work until the scrollbar value itself overflows 2015-01-18 18:13:38 +00:00
adelikat 6507fa5d92 Hex Editor - convert addresses from int to long, fixes Go to address on 32bit domains, highlighting on addresses after 7FFFFFFF is still busted though 2015-01-18 18:01:27 +00:00
adelikat 27d30df0cf Rip out the MemoryDomain.Size hack, and fix up the hex editor. Hex editor now works for N64 System bus, but will very much fail as soon as we have a domain greater than 32 bits 2015-01-18 16:00:20 +00:00
adelikat 91ffc17aae Refacotor MemoryDomain.Size to be long instead of int, still some small todos, but it compiles and seems to work 2015-01-18 15:25:47 +00:00
goyuken 82fcd0bc5e refactor IVideoProvider into a service. uses in mainform and friends are still hacky 2015-01-14 22:37:37 +00:00
adelikat fbdb29b64c refactor IMemorydomains to be a domain list instead of having a domain property, refactor cores to register an IMemoryDomains instead of being one 2015-01-14 21:55:48 +00:00
adelikat 9c8bb5ff1f Hex Editor - remove some bad code, still plenty to be found in here, but this should be better at least 2015-01-14 00:08:20 +00:00
adelikat d62ba4e2b4 Change IMemoryDomains to have an IMemoryDomainList instead of a MemoryDomainList, this is an incremental step into eventually having IMemoryDomains take over the properties of IMemoryDomainList, still todo: reduce the amount of needed functionality in IMemoryDomainList from old and not good code 2015-01-13 22:18:07 +00:00