Commit Graph

2350 Commits

Author SHA1 Message Date
brandman211 40e2d5f543 Refactored for the register functions. This seems to work fairly well, but when loading a state, joypad.get() contains the button states for the frame you were on BEFORE loading instead of the frame you are now on. This results in small errors. The issue might be deeper than my script or even the Lua implementation, so I can't do anything about this. 2012-03-28 03:41:46 +00:00
adelikat 9c40367fa8 Increase/Decrease Window Size hotkeys (mapped to Alt+Up/Alt+Down by default) 2012-03-28 02:32:05 +00:00
adelikat b585a0a23a fix savestate.registerload 2012-03-28 01:24:32 +00:00
adelikat c88a6b4b7a Lua - savestate.registersave/load - pass state name as a string (ex:"quicksave0"). Put event after the save/load not before. Event no longer fires on non-saveslot events 2012-03-28 01:03:50 +00:00
adelikat 397f289493 Lua - savestate.registersave/load - show exception message on error 2012-03-28 00:13:25 +00:00
adelikat 8bc8ec0e5b Lua - output registersave/load error messages to the lua console not the screen 2012-03-27 23:58:56 +00:00
andres.delikat 251c169cf3 Play Movie - small dialog tweaks - fix anchoring of a checkbox, better minimum size values 2012-03-27 21:44:04 +00:00
andres.delikat 655af69326 Lua - savestate.registerload() implemented 2012-03-27 21:17:20 +00:00
brandman211 be807c3def -Used the new movie.getinput() function to simplify parse(), now frames().
--TODO: Disallow Reset, Lag, and other non-buttons. Pause?
--If this works like adelikat says, my missing load state idea will be possible.
-Made the loading information show up on the console instead of the gui.

Note: Still need savestate.registersave/load!
2012-03-27 21:11:34 +00:00
andres.delikat 0330e1f742 Lua - implement savestate.registersave() 2012-03-27 21:09:36 +00:00
andres.delikat 83fe222ba9 Lua - movie.getinput() - fix 2012-03-27 20:10:05 +00:00
andres.delikat 489086716d Lua - Better output for movie.getinput() 2012-03-27 19:21:10 +00:00
rolanmen1 3e84fc9936 Lua - Implemented movie.getinput()
NOTE: There may be uknown errors.
2012-03-27 15:45:50 +00:00
rolanmen1 5e25b15100 Lua Console - Save Menu Option Now Enables Even When There's No Session Loaded
ListView Refreshes When Loading A Session From Recent
When Clicking On New Lua Session Option, It Now Cleans The CurrentLuaSession String. This Will Prevent Some Unwanted Results When Saving A Session.
2012-03-27 13:54:29 +00:00
rolanmen1 5337fb2213 Lua Console Now Saves And Loads Sessions With Separators 2012-03-27 13:31:30 +00:00
brandman211 9ff5f10a70 Resolving Issue 13. Easy fix; just needed to check if the string was empty before doing substring operations on it. 2012-03-27 07:48:05 +00:00
zeromus 46a638ee96 fix bug in lua coroutines which made error propagation get mixed up and possibly result in a bunch of other subtle bugs 2012-03-27 07:25:36 +00:00
brandman211 d1b00e6d4d Added my converted ButtonCount.lua script (Original here: http://code.google.com/p/brandon-evans-tas/source/browse/Lua/ButtonCount.lua)
-As you'll recall, the script has 3 methods of keeping track of input:
--1. Tracking the button counts in real time. This took some minor adjustments, but seems to work fine.
--2. Parsing the button presses from a loaded, read-only TAS file when starting the script, if possible.
---This works well enough after a good amount of refactoring, but I only have it rigged to work for NES.
---As always, note that this method is very slow for big movies, which is why we only use it once.
--3. Caching the counts when saving a state and loading them when loading a state.
---savestate.registerload and savestate.registersave are not currently supported by BizHawk, so this is not functioning at all.
-I propose that a function called movie.getframe(frame) be added that gets status of all of the buttons, just like joypad.get(), for a given frame of a movie.
--This makes the would make method 2 trivial and fast.
--It would allow me to generalize the function for all platforms easily.
---Certainly there might be some discrepancies about which buttons should be disallowed, if any (Is Reset a button press?), but still. 
--If this method could somehow work for non-readonly movies, then I'd be able to use the movie to get the counts when I load a state that doesn't have cached data.
---Trust me when I tell you that this would be immensely useful for minimum button TASing. The process would be seamless, and all of these methods combined would provide perfect accuracy while being fairly efficient and only using intensive routines when absolutely necessary.

Note: Earlier, I came up with the idea for a function that lets you set what frame of the movie you are on, which would be useful for endless TASes like we've already discussed, adelikat. Do you still think this is worth having?
2012-03-27 06:44:47 +00:00
rolanmen1 36c4dee7b8 Show Errors On Lua In The Output Box More Accurately 2012-03-27 03:34:21 +00:00
zeromus b7eaa1eaf7 luainterface - throw exceptions when lua_resume errors 2012-03-27 03:15:57 +00:00
adelikat 5d483b9e55 revamp rbi baseball script for bizhawk special functions, such as sending script info to the output window. And right aligning display stuff 2012-03-27 02:56:59 +00:00
adelikat 701e0823d5 Really fix PunchOutStats.lua 2012-03-27 02:26:01 +00:00
adelikat 9e0e6407b3 Revamp the Punchout stats using the anchor property of gui.text() 2012-03-27 02:17:17 +00:00
Rolanmen1 adfa18694e Text Alignment Parameter Can Be Either Int Or Either A String 2012-03-27 01:49:27 +00:00
brandman211 e9bb960902 Removed .fm2 / .mc2 from the Play Movie dialog. 2012-03-27 01:39:06 +00:00
adelikat 3f83614629 Overhaul anchoring of messages on screen, anchor right now right aligns, and the x value is the number of pixels from the right edge. This fixes the behavior of the messages config as well as gui.text() and Ram Watch on screen option. 2012-03-27 00:46:58 +00:00
adelikat f145d8e655 Cheat Window, Ram Watc, Lua Console - fix exception when clicking Move Up on the first item in the list. 2012-03-26 23:38:29 +00:00
adelikat 602ee06ffc Lua Cosnole - output message at bottom of dialog to show if changes have occured and saved messages (same as other tool dialogs such as ram watch). Better minimize size parameters of dialog. 2012-03-26 23:31:21 +00:00
brandman211 cba68551d0 -Removed LuaVarArgs from gui_text. I think this function is pointless and over complicates things; let me know if you agree based on this example.
-Fixed DrawMessages, which was setting y = x, making the y parameter of gui.text useless.
2012-03-26 14:48:05 +00:00
rolanmen1 908a9a11c5 Lua Console - Save Session Menu Option Should Now Enable/Disable Correctly. Also Added The Condition That There Should Be At Least One Script To Be Able To Save. 2012-03-26 13:46:28 +00:00
rolanmen1 e2e3ee3301 Loading A Script With Errors Via Load Lua File Now Disables And Shows Error In Output Box. Toggling On A Script With Errors Disables Itself Right Away. 2012-03-26 08:52:06 +00:00
adelikat c5334cc639 gui.text() - fix so that screen is clearned at the beginning of each frame, so that the text stays drawn when paused 2012-03-26 03:01:39 +00:00
adelikat 7daf318134 gui.text() - add a 5th parameters "anchor" that will anchor the text to top, left, bottom, or right. Same functionality as the message config anchor option. 2012-03-26 02:58:24 +00:00
adelikat 74648bd806 add punchout stats lua script 2012-03-26 02:06:04 +00:00
adelikat 588888d439 check in my RBIBaseball luaScript modified for bizhawk (only had to change memory.writebyte to mainmemory.write_u8 and it worked fine) 2012-03-26 01:58:04 +00:00
adelikat f72fce15fd Lua Console - fix anchoring properties 2012-03-26 01:41:39 +00:00
adelikat 81f0f031f3 Coleco - very minor mostly useless changes 2012-03-25 17:39:50 +00:00
rolanmen1 5283b4c06c Avoid Crashing After Trying To Delete A Script With Errors. 2012-03-25 15:34:09 +00:00
rolanmen1 35f42b94f3 Dragging A Lua Session Now Works. Script Errors From Dragging Sessions Now Appears In The Output Box. 2012-03-25 14:51:35 +00:00
rolanmen1 75c0a9f7d3 Script Errors Now Appears In OutputBox. 2012-03-25 09:47:31 +00:00
zeromus d3321f552f nes accuracy fixes
- pass more apu_test 4-jitter and 6-irq_flag_timing (necessary for timing on other tests)
- pass all cpu interrupt tests
- pass all sprite hit tests
2012-03-25 09:25:27 +00:00
zeromus f694959da9 cleanup some transient junk in mainform, fix nametable viewer screenshots garbage pixels off by one bug, add shortcut buttons for common display area sizes (this last part was tricky since the nes graphics control dialog has a feature which prevents its size from changing in visual studio) 2012-03-25 08:52:52 +00:00
brandman211 81586afc20 Finished merging...499 lines. Not as good as I had hoped, but the file would have been significantly smaller if controller templates just used dictionaries and had just a little bit more consistency. 2012-03-25 07:10:11 +00:00
brandman211 da65f8bdd4 -Merged Atari.
-Line count: 583.

TODO: The one I really didn't want to deal with...Gameboy. Why did you have to make this a NESControllerTemplate instead of a GameboyControllerTemplate[]?
2012-03-25 07:00:21 +00:00
brandman211 bc1804dcdb -Made it so that the right controllers use the default settings.
-Merged Genesis.
--This was completely broken beforehand.
---Update updated PCE.
---It had 8 joypads instead of 1.
-Line count: 661.

Note: Atari Auto 2 throws an exception.
2012-03-25 06:42:31 +00:00
brandman211 b28cfca204 -Merged TI-83.
--As it'd be obnoxious to make CONTROLS a string, object dictionary and have casts all over the place, I just made a TI83Controls string array to match CONTROLS["TI-83"].
--Positioned the fields as well as I could.
--The config for ( and ) were switched. Fixed. Yet another example of redundant code failing! :)
-Line count: 741.
2012-03-25 06:05:13 +00:00
brandman211 5e126bf04f -Made the last two TI-83 buttons visible in the Config by increasing the height from 556 to 580.
-Started merging TI-83 to Do:
--This is going to be difficult because the field names are not the same as the label names, meaning that I'm going to have to use a dictionary for TI-83, if not for all of the controls.
--I have to create a formula that calculates the proper row / column for a given field to be placed. Sounds like fun.
2012-03-25 02:36:20 +00:00
brandman211 a07165cffd -"PC Engine / SGX" -> "PC Engine / SuperGrafx".
-Line count: 978.
2012-03-25 02:11:26 +00:00
brandman211 4f2ebdfbd4 -Fixed InputConfig_Load...forgot that the switch syntax from before acts like an OR statement; I thought it meant "don't do anything".
-PCE.
2012-03-25 01:58:33 +00:00
adelikat 6b9024dd5c Start colecohawk (skeleton) 2012-03-25 01:33:05 +00:00