Commit Graph

6110 Commits

Author SHA1 Message Date
negativeExponent 8d0fe851bf
QT: Fix volume adjustment for APU
Volume adjustments for the apu channel has a range of 0-256. With a value of 256, this acts as a bypass (toggle) and skips the computation entirely when set. This fixes issues when the original signal is too low already that passing it through volume controls will attunuate the signal instead and silence it.

The main volume does not behave the same way and 256 is not a toggle, so left it as-is.

@thor2016 feel free to make it better if necessary, maybe a toggle instead of a 256 max value or something.
2024-02-09 10:19:47 +08:00
harry 8ebb560d1c Added emulator save state JS interface. 2024-02-06 22:44:08 -05:00
harry 2f2482e950 Minor null check fix. 2024-02-05 18:34:03 -05:00
harry 401110bae8 Added ppu interface functions to JS engine. 2024-02-05 18:29:25 -05:00
harry a5071f10f0 Implemented ROM JS interface object. 2024-02-05 06:43:27 -05:00
harry 61da515f11 Finished remaining JS interface functions for JS emu object. 2024-02-05 05:56:40 -05:00
harry 1fc813803e Added JS script monitoring thread to prevent bad scripts from hanging the gui. 2024-02-04 22:09:59 -05:00
thor2016 5495c7eddc
Merge pull request #699 from TheRealQuantam/luafixes2
Multiple Lua Implementation Fixes
2024-02-04 09:07:23 -05:00
harry 4fa0d0651a Added vsync timer logic to Qt OpenGL video driver. 2024-01-31 07:08:08 -05:00
harry 01358407fd For Qt GUI, changed onFrameFinished callback to only update video buffer. Don't do any input processing as this will mess up when running turbo mode. Added a draw timer to SDL video renderer to better align is scheduling with the next vsync. 2024-01-31 06:49:54 -05:00
harry d363d04dbb For Qt GUI, add video buffer mutex to ensure clean transfer between emulation and GUI threads. Use common FCEU::mutex wrapper for cleaner code. 2024-01-31 05:28:41 -05:00
thor2016 cb0edc5a21
Merge pull request #695 from negativeExponent/mapper413
Mapper413
2024-01-31 04:29:21 -05:00
TheRealQuantam f702b5b989 Retriggering checks 2024-01-30 14:25:06 -08:00
harry 19abb0b249 Fix for build break, QJSEngine::setObjectOwnership does not exist in Qt5. Only in version 6. 2024-01-30 06:50:40 -05:00
TheRealQuantam c56b234b85 Multiple Lua support fixes:
- Do not crash when a Lua script calls rom.gethash when no ROM is loaded
- Do NOT assume the error message from lua_pcall will always be in stack slot 1, as sometimes it won't be
2024-01-30 02:41:42 -08:00
TheRealQuantam c7330d4543 Revert bad fix for not terminating script on initial error 2024-01-30 01:41:13 -08:00
harry 6b96016047 JS scripting in work. 2024-01-29 23:17:15 -05:00
harry 813d4c0c4b Added nullptr check in the event QStyle factory fails. 2024-01-29 20:19:36 -05:00
TheRealQuantam 5ff4edbdad Multiple Lua support fixes:
- Move call to info_onstop from FCEU_LuaStop to FCEU_LuaOnStop so it will always get called
- Do NOT assume the error message from lua_pcall will always be in stack slot 1, as sometimes it won't be
- After calling HandleCallbackError ensure L still exists before calling lua_settop
2024-01-28 19:01:49 -08:00
negative 5631e488f4
fix indents 2024-01-29 07:57:43 +08:00
harry a85f348e50 For Qt GUI, edit frame throttling logic when using turbo mode or really fast emulation speed to not be so wasteful when emulation is paused. Don't make sense to waste CPU resources spinning on nothing. Fixes #681. 2024-01-28 08:15:00 -05:00
harry c50c1d570c Change linear filter checkbox text to not include OpenGL. This function not specific to OpenGL and works for all supported video drivers. 2024-01-27 19:35:01 -05:00
harry b03c9c9c8b Removed const qualifiers to fix Qt build. Different versions of Qt QJSValue don't allow the call method to called from a const object. 2024-01-27 01:04:48 -05:00
harry fe0496a6cf Bug fix for issue in new LUA memory hook scheme where the callbacks get unregistered from the x6502 while still running. Fixes #693 2024-01-27 00:39:23 -05:00
harry a02ae8d3e0 Added memory hooks to JS engine. 2024-01-26 22:57:54 -05:00
thor2016 4f604b7708
Merge pull request #690 from negativeExponent/fix_ntsc_clip
Clip Left/Right Sides option now taken into account when using NTSC s…
2024-01-26 22:04:15 -05:00
harry 23cf99afe5 Added source listing to gdb debug output. 2024-01-26 22:00:20 -05:00
harry 3e8978c2aa Added debug script to aid in getting crash callstacks from users. 2024-01-26 20:33:40 -05:00
negative 82a99060e5
Use macro and minor offset adjustment 2024-01-25 18:10:48 +08:00
negative 8e935a05a6
Clip Left/Right Sides option now taken into account when using NTSC scaler 2024-01-24 14:52:45 +08:00
harry 2fce5ffe74 Added memory access functions for JS script interface. 2024-01-19 16:54:56 -05:00
harry 7a0be296fa Added logic to realtime update js global variable viewer. 2024-01-17 07:14:10 -05:00
harry 1dde9e7e75 Minor fixes for JS global variable viewer. 2024-01-16 22:04:00 -05:00
harry dc2d3c26aa Added global JS property tree to allow exploring of engine data. 2024-01-16 21:48:13 -05:00
harry 9a9f9541d6 Build fix for systems without Qt QML installed. 2024-01-15 20:09:25 -05:00
harry 198cdafbf8 Qt JS script engine interface in work. 2024-01-15 14:17:13 -05:00
harry 8e7e5e8c05 Minor refactor of script memory hook interface so that both lua and js script can coexist nicely. Script engines now register themselves with the CPU module for their functions to be called. 2024-01-15 09:31:53 -05:00
harry f90a269386 Build fix for Qt6. 2024-01-15 05:57:24 -05:00
harry e51a748a05 Qt JS engine in work. 2024-01-15 05:34:13 -05:00
harry ecda95ed70 Qt JS engine in work. 2024-01-15 04:33:27 -05:00
harry 3436e221de For Qt GUI, added initial framework for use of the Qt built-in ECMAScript (javascript based) engine. This scripting capability will allow users to load their own custom UI windows (created using Qt Creator tool) in the GUI. This is intended to serve as a the Qt GUI's functional replacement for building GUI elements using IUP in LUA scripts. This is a work in progress. 2024-01-14 08:58:10 -05:00
negative d742620d72
Fix 128K CHR-ROM variants for VRC5 2024-01-13 09:30:42 +08:00
negative aace08d0b6
Add mapper 413 support 2024-01-07 22:03:33 +08:00
negative 647c08e1e6
Add support for misc rom area 2024-01-07 21:59:25 +08:00
harry b53d087fca Changed Qt Win64 1px fullscreen window border to be a configuration option. Doesn't seem to be necessary for all users and maybe not at all anymore. We will see if the QOpenGLWidget issue resurfaces with this setting off. Fixes #514 2023-12-12 21:27:55 -05:00
Alexey Cluster e806a5a25a
Merge pull request #676 from negativeExponent/master
Fix handling of roms with  prg size below 16K
2023-12-09 22:46:54 +04:00
negative 1bd7e2f5b9
Fix handling of roms with prg size below 16K
Fix https://github.com/TASEmulators/fceux/issues/675
2023-12-08 18:39:15 +08:00
harry 72b949efcd For Qt GUI, added hot keys for certain emulation speed presets. Presets are: 1/4x, 1/2x, Normal 1x, 2x, 4x, 8x, and 16x. These hot keys can be mapped to gamepads using advanced key bindings. 2023-11-30 21:09:52 -05:00
harry 8600679636 Comment out warning message about debug file not being able to be opened for reading. It is normal for the file to not exist so it seems silly to warn about not being able to open it. 2023-11-24 09:02:50 -05:00
harry 2909846446 Upgrade appveyor macos build environment to monterey. Also auto build macos app with Qt6. 2023-11-17 21:57:16 -05:00