Commit Graph

30 Commits

Author SHA1 Message Date
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 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 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 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 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 c49e1529cb Lua: add savestate save/load functions, callbacks are not implemented yet 2012-08-08 22:54:27 +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 e5d08c9a03 win32: lua-engine.cpp should use CRT fopen rather than the one replaced by _tfwopen.h
Still, lua-engine.cpp might want to use ANSIToWide function.
Therefore, I redefined those functions in lua-engine.cpp
It looks ugly. I wish I could know a better solution.
2012-07-27 10:23:47 +09:00
gocha 93b4a200b7 win32: Unicode - change Lua code page from CP_UTF8 to CP_ACP
TODO
- fopen in lua-engine.cpp can be a problem. (needs to call a real fopen in C runtime)
2012-07-25 07:30:29 +09:00
gocha 6fb8ae96b1 CRLF => LF, oops 2012-07-25 00:15:28 +09:00
gocha ae85998e81 add lua scripting engine (no useful functions yet)
Notes:
- library download link for convenience http://www.mediafire.com/?gokgoyvo6936l6b
- Unicode version passes UTF-8 string to lua51.dll, but the dll will process the string as a non-Unicode string. Therefore, Lua of Unicode version sometimes might cause a problem with multi-byte characters.
- There might be more bugs. I haven't tested it enough yet.
2012-07-25 00:01:29 +09:00