Ilari Liusvaara
8d1889c116
Revert initializing globalwrap state
...
Leave globalwrap state as uninitialized, even if that causes a compile
warning as initializing breaks AVI dumping on Windows. All globalwraps
should have static storage duration anyway, and C++ can not have
uninitialized variables with static storage duration.
2021-02-15 23:31:14 +02:00
Ilari Liusvaara
b642237e96
SNES: Actually make L=0 be full black
...
Turns out there are three copies of LRGB->RGB routine (two 8-bit and one
16-bit). Merge the 8-bit ones and remove L+1 causing L=0 to be not fully
black. Fixes fade afterimages in Super Mario World.
2021-02-13 14:54:15 +02:00
Ilari Liusvaara
fb28e30fcc
Fix Lua register* callback list corruption
...
Turns out nothing was setting the prev pointer on doubly linked list when
creating callback nodes, so Lua GC'ing any node from the middle corrupted
the list, leading to unregister* intermittently failing to actually
unregister the callback.
2021-02-10 08:46:08 +02:00
Ilari Liusvaara
6fb4e1396d
Lua: Delay freeing callback handles if executing
...
If callback is executing, its callback handle must not be freed as freeing
it would trigger UAF. So if currently running callback is unregistered,
delay freeing the handle until the callback finishes running.
2020-10-15 15:34:06 +03:00
Ilari Liusvaara
dfcba814a9
At least compile with Lua 5.4
2020-09-28 23:40:32 +03:00
Ilari Liusvaara
f537f4943c
Lua: Guard against Lua returning non-string error
...
Turns out that if Lua throws e.g. a table as error, tostring (and
tolstring) returns NULL. And trying to print NULL into message stream
causes it to hang). Guard against tolstring returning NULL, and print
(null) instead of trying to print the NULL pointer.
2020-04-05 20:55:44 +03:00
Ilari Liusvaara
1b582c8fbd
Allow just-in-time override of input to be recorded from Lua
...
This is useful e.g., for implementing .r16m playback.
2020-03-31 18:22:39 +03:00
Ilari Liusvaara
436b1d183d
Remove partial exception specifiers
...
These are deprecated in newer C++ versions.
2019-01-30 19:26:21 +02:00
Ilari Liusvaara
323db52b6b
Add <functional> to files that use std::function
2017-10-26 04:41:20 +03:00
Ilari Liusvaara
6fd18bd0f0
Make wrapper for boost::lexical_cast
...
This makes it easier to eventually get rid of boost::lexical_cast.
2017-10-25 14:11:43 +03:00
Ilari Liusvaara
7be5215c08
When redrawing screen, read the last written frame
...
This should fix the bug with loadstates, where wrong screenshot was
displayed in certain race condition.
2017-05-23 11:11:32 +03:00
Ilari Liusvaara
8ac8304824
Lua: Fix type confusion between signed and unsigned
...
This bug seemed to cause all hell to break lose with negative numbers
2017-04-18 19:25:07 +03:00
Ilari Liusvaara
6d1a67719b
Add movie.subframe_to_frame
2015-07-03 22:24:47 +03:00
Ilari Liusvaara
4a4c71acf4
ss_int24_t and ss_uint24_t are integers
...
Fixes memory.readhword pushing the result as a float instead of integer.
2015-06-27 02:45:43 +03:00
Ilari Liusvaara
0b3743e258
Lua: CUSTOMFONT:dump(): Dump font to file
...
This can be used in conjuction with edit() method for editing fonts and
then dumping those back into file.
2015-06-11 05:31:23 +03:00
Ilari Liusvaara
d86f713aa4
Eliminate sloppy types from headers
...
This should give identical layouts on all platforms (modulo 32/64 bit)
2015-06-07 12:49:19 +03:00
Ilari Liusvaara
2da23de987
Small whitespace cleanup
2015-05-27 23:08:54 +03:00
Ilari Liusvaara
0d83c3aba6
Rework how memory tracking works
...
Also adds a few new tracking categories, like movie storage
2015-05-27 17:59:00 +03:00
Ilari Liusvaara
0960e967ea
Memory tracker: Add tracking of render objects
2015-05-27 16:28:01 +03:00
Ilari Liusvaara
c2a7eed9d8
Clean up system font drawing
...
Refactor font reading to fewer places
2015-05-27 15:38:22 +03:00
Ilari Liusvaara
1dd19faaeb
Make git diff --check happier
2015-05-27 11:14:56 +03:00
Ilari Liusvaara
0c0156647b
Redo text rendering (adds halo support to gui.text())
...
Now gui.text() and friends support halos. Also fixes a bug with partially
opaque halos in CUSTOMFONT rendering.
2015-05-27 10:44:50 +03:00
Ilari Liusvaara
56deafcd4a
Framework for memory usage tracking
...
Adds tracking for Lua VM and ROM images. The rest comes later.
2015-05-26 13:16:09 +03:00
Ilari Liusvaara
82a7c255a4
Lua: Memory usage limit
...
This allows limiting memory usage by Lua, which might very well be useful,
given the behaviour of accumulating garbage in memory if one does not
garbage-collect.
2015-05-25 23:44:51 +03:00
Ilari Liusvaara
478472e883
Have only one main Lua function trampoline
...
This makes it easier to have special modes when Lua functions are running
later...
2015-05-25 21:16:45 +03:00
Ilari Liusvaara
04d7e60fe1
Fix race between killing object and drawing object
...
Previously, it was possible to draw and kill object queue at the same
time, possibly leading to crashes from accessing object state after
destroying it. Fix this.
2015-05-14 19:20:21 +03:00
Ilari Liusvaara
63b59e35f7
Lua: Don't run class destructor if constructor failed
2015-03-04 22:34:03 +02:00
Ilari Liusvaara
54cbe456b4
Move all regex matching to library/string.cpp
...
This is in preparation to having an option to use std::regex. Also should
fix a few bugs with trace log.
2015-02-07 14:37:18 +02:00
Ilari Liusvaara
94b603c9f2
Fix some compilation errors on Mac OS X
2015-02-04 21:28:25 +02:00
Ilari Liusvaara
346ea41e0d
Fix Win32 build
2015-01-13 22:49:32 +02:00
Ilari Liusvaara
71b57756ca
Cleanup Lua multiversion support
2015-01-06 08:13:10 +02:00
Ilari Liusvaara
f4c1bc6e84
Lua 5.3 support
2015-01-06 05:19:39 +02:00
Ilari Liusvaara
50fd1b6b5f
Don't let one unload currently used core (crashes the emulator)
2015-01-06 02:55:03 +02:00
Ilari Liusvaara
9fdd0bdd38
Tweak format of command help files and do some further command cleanup
2014-11-18 16:19:01 +02:00
Ilari Liusvaara
028a51066c
Show VMA relative hex address when dumping debug hook list
2014-11-18 07:43:05 +02:00
Ilari Liusvaara
5ddf119ef0
Reinitialize gamepads command and fix EVDEV going bonkers on gamepad suddenly disconnecting
2014-11-17 20:12:20 +02:00
Ilari Liusvaara
3b2298180a
Allow binding commands to class instance
2014-11-17 15:55:14 +02:00
Ilari Liusvaara
b218c1aaa0
Allow memory watch to read registers
2014-11-11 20:56:54 +02:00
Ilari Liusvaara
e2589db8b7
Rename token_iterator_foreach to token_iterator::foreach
2014-11-10 16:54:18 +02:00
Ilari Liusvaara
b0c08d3a9f
Make workthread a class in top namespace and move some stuff under it
2014-11-10 16:26:16 +02:00
Ilari Liusvaara
3c2b0402b2
Refactor memory_region{,_direct} to be subclasses of memory_space
2014-11-10 16:19:27 +02:00
Ilari Liusvaara
b5ed0f73b1
Refactor library GC to its own namespace
2014-11-10 16:06:04 +02:00
Ilari Liusvaara
9a69dc3511
Namespace library port-controller stuff
2014-11-10 05:13:34 +02:00
Ilari Liusvaara
6639ab0437
Refactor controller runtime code generation
2014-11-10 02:53:58 +02:00
Ilari Liusvaara
50215d8c01
Print messages about loaded libraries
2014-10-31 23:24:23 +02:00
Ilari Liusvaara
b7d0fe9eb1
Opus: Support some newly added stuff
2014-08-09 17:31:38 +03:00
Ilari Liusvaara
5c84507e22
Revert "Remove Lua 5.1 support"
...
This reverts commit c87c5de458
.
2014-08-08 04:04:14 +03:00
Ilari Liusvaara
c87c5de458
Remove Lua 5.1 support
2014-06-06 16:09:43 +03:00
Ilari Liusvaara
7f271989d9
When panicing, show last message (as it is presumably related)
2014-06-06 15:38:56 +03:00
Ilari Liusvaara
6bad138d8b
Instancefy base mmio stuff
2014-05-31 17:16:45 +03:00