Commit Graph

416 Commits

Author SHA1 Message Date
gocha 712d2ec062 win32: fix frame count offset 2012-08-24 21:37:54 +09:00
gocha 1b8208f4a6 Add movie "finished" state. For details, see http://tasvideos.org/LawsOfTAS/OnSavestates.html 2012-08-24 20:15:22 +09:00
gocha ac53f5110e win32: fix VS2010 compilation 2012-08-24 20:11:25 +09:00
gocha 091874e324 Remove the most of compiler warnings. 2012-08-21 22:39:00 +09:00
gocha efcfa5134e Remove unused function added by the previous commit. 2012-08-21 22:23:13 +09:00
gocha 1ba100fed0 win32: fix a crash caused by WatcherThread. Lua Console must dispatch WM_DESTROY instead of WM_CLOSE. 2012-08-21 22:21:38 +09:00
gocha fd07444360 win32: prevent unintentional GUI redrawing 2012-08-20 22:16:49 +09:00
gocha 7dec44e1e3 Update cheat system. It becomes bsnes-compatible.
Notes:
- New Snes9x can read old CHT format. Aside from that, I wrote a tool that converts the old CHT to the new one. It helps you if you want to convert a lot of files at a time. http://www.mediafire.com/?v8yb0yy1czsdyxh
- New CHT format (CSV) doesn't have a field of "saved value".

Development Notes:
- I'm afraid I worked on only Windows version. Other ports might need a little modification. (especially when you uses SCheat structure on your port-specific code.) To use the new cheat code on your port, you need to call S9xAddCheat (enable, save_current_value, code, name), instead of S9xAddCheat(enable, save_current_value, address, byte, name)
2012-08-20 21:40:09 +09:00
gocha 6cd98accd9 Lua: add memory hook functions 2012-08-16 00:14:42 +09:00
gocha f18ffa3b44 Lua: add memory.getregister() and memory.setregister() 2012-08-15 23:28:57 +09:00
gocha 79f3d4de62 Lua: add APU RAM I/O functions 2012-08-15 23:19:15 +09:00
gocha f1363914a9 Lua: add emu.pause() and emu.unpause()
I am not sure if calling the function from the inside of a frame can be a problem.
2012-08-15 22:47:10 +09:00
gocha 128cd6b3d9 Fix no HAVE_LUA build, fix non-Unicode build 2012-08-15 12:11:17 +09:00
gocha 28fd42aa1b Lua: fix emu.message() not to overwrite the display string by other Lua functions. 2012-08-15 11:22:01 +09:00
gocha 3f788a3d3e Lua: fix emu.message() not to overwrite the display string by other Lua functions. 2012-08-15 11:21:18 +09:00
gocha ee99d9080f Lua: oops, fix input.get() 2012-08-15 11:12:02 +09:00
gocha 78278c8049 Lua: add input.get(), input.getdown(), input.getup()
Notes:
- xmouse, ymouse returns "Forced 1X" processed position.
- xmouse, ymouse cannot return SNES Mouse position.
2012-08-15 10:54:00 +09:00
gocha 7405faa0a9 win32: update mouse coordinates calculation, it fixes the case of non-stretched 3x filters, hi-res games (I know no hi-res games that uses mouse or superscope, though) 2012-08-15 10:39:19 +09:00
gocha 1b9385178e Lua: easiest workaround for the initial current working directory problem 2012-08-13 08:13:11 +09:00
gocha 0094a1e878 Lua: gui.text - use small font, fix tab ('\t') 2012-08-13 07:08:47 +09:00
gocha 476f5e50a8 Lua: use safer 16-bit color decomposition *cough* 2012-08-12 19:34:47 +09:00
gocha 82d02837d7 Lua: fix alpha-blending, use safer 16-bit color decomposition 2012-08-12 19:30:12 +09:00
gocha 224606757d Lua: add gui functions
Note:
- bug: when "draw messages in image" is ON, Lua drawings are drawn to the SNES image. However, keep in mind that it has a sort of "1 frame delay" problem. You won't experience the problem when the option is OFF.
- font size is larger than older versions, at this moment.
- gui.gdscreenshot() and gui.getcolor() will return the SNES image without any Lua drawings.
- gui.gdscreenshot() stretches a screenshot just as Snes9x normally does. It stretches the image if it's hi-res one or interlaced one. (i.e. same as Settings.StretchScreenshots = 1)
2012-08-12 14:56:07 +09:00
gocha e2bb669948 movie: fix movie reset desync problem again 2012-08-12 06:48:21 +09:00
gocha ebc92a6681 movie: Fix desync problem introduced by today's update, by moving the first read/write frame data process to more safer position. (give proper frame count and state before calling it) 2012-08-11 20:53:51 +09:00
gocha 8fe66bdc44 nope, at least it brings a little new problem. 2012-08-11 13:02:35 +09:00
gocha 36f2e055ab Fix movie reset desync problem (hopefully), the reset should be done at frame boundary regardless of movie play/record. 2012-08-11 12:55:22 +09:00
gocha 4afbde805f Lua: joypad.get supports movie input from now
hope we can use peripherals as well someday.
2012-08-11 11:02:13 +09:00
gocha 488cc94e77 movie: add resetFunc() callback pointer to read_frame_controller_data, for future expansion. It might be useful to solve the movie reset desync problem, well, I'm not sure. 2012-08-11 10:20:54 +09:00
gocha 17f7223706 Lua: add joypad get/set functions
Note: joypad.get() probably cannot get movie input due to the structure of snes9x. I'll try to fix it later.
2012-08-11 09:20:47 +09:00
gocha 2a5edf076d win32: fix error handling of movie drag & drop 2012-08-10 07:49:25 +09:00
gocha 41f8189560 Lua: add movie functions
As a result, some get/set functions are added to movie.h
2012-08-10 07:48:07 +09:00
gocha ffc6db4eae Lua: add memory read/write functions, they use S9xGetByteFree/S9xSetByteFree in cheats2.c
Are they desync-free really?? If not, it should be fixed.
2012-08-10 00:10:48 +09:00
gocha e6522d25c9 Lua: add savestate callbacks, apply movie.rerecordcounting to on-memory savestate
Note: "quiet" option of savestate.save is not implemented.
2012-08-09 23:00:41 +09:00
gocha be43e26824 Lua: adjust initial savestate object size 2012-08-09 07:16:54 +09:00
gocha 719eee2cd9 Merge branch 'master' of https://github.com/snes9xgit/snes9x
Conflicts:
	win32/snes9xw.vcproj
	win32/wsnes9x.cpp
2012-08-08 23:04:02 +09:00
gocha c49e1529cb Lua: add savestate save/load functions, callbacks are not implemented yet 2012-08-08 22:54:27 +09:00
gocha 7ed405d6e2 win32: drag and drop support for snes9x movie (*.smv)
Conflicts:

	win32/snes9xw.vcproj
2012-08-07 19:31:42 +02:00
gocha fb2935d454 win32: remove "Toggled fast forward mode" checkbox, and give "fast forward toggle" hotkey 2012-08-07 19:22:59 +02:00
OV2 95e71e726f win32: remove afxres.h references 2012-08-07 19:17:37 +02:00
gocha befe889303 Lua: fix emu.registerafter timing, emu.atframeboundary must return true 2012-08-07 22:09:42 +09:00
gocha 60fbe2de5b add Movie.SkipRerecordCount get/set to movie.h 2012-08-07 22:00:23 +09:00
gocha e3c5112467 add Movie.RerecordCount get/set method, and Movie.SkipRerecordCount option, for future expansion 2012-08-07 21:41:33 +09:00
gocha 2e2fc9b70d Replace "gens" 2012-08-07 07:24:00 +09:00
gocha e323ee2821 Remove lua-engine warnings 2012-08-06 23:32:29 +09:00
gocha 6752be98a0 Lua: add basic info functions; emu.framecount, emu.lagged, emu.lagcount, emu.emulating, emu.atframeboundary 2012-08-05 17:32:35 +09:00
gocha 79c50791ae Lua: add gui.register and emu.message
Note: using emu.message in the callback function of gui.register causes infinite recursive call and the script will die.
2012-08-05 17:06:21 +09:00
gocha 2afcfc4589 Lua: add basic callback functions; emu.registerbefore, emu.registerafter, emu.registerstart, emu.registerexit 2012-08-05 15:45:56 +09:00
gocha 128c544998 win32: drag and drop for *.wch and *.lua 2012-08-05 07:02:38 +09:00
gocha 3cac797bfb win32: drag and drop support for snes9x movie (*.smv) 2012-08-05 06:43:51 +09:00