Commit Graph

304 Commits

Author SHA1 Message Date
YoshiRulz c794d90878
Revert switch to system-wide Lua install on Linux
reverts ab355d469 and 25795d237
2022-12-17 13:35:14 +10:00
CasualPokePlayer 05962cfd93 more proper fix for compilation issue with some gcc versions with ares
fixes 2989a73430
2022-12-16 18:53:33 -08:00
CasualPokePlayer 2989a73430 workaround ares state size being blown up, fix compilation issue in some gcc versions 2022-12-16 18:18:06 -08:00
CasualPokePlayer ab355d4693 check some system lib deps on Linux and force user to provide their own liblua54 from package managers 2022-12-16 15:03:39 -08:00
CasualPokePlayer f3ee3e7956 mGBA update, various cleanups and some reorg 2022-12-15 01:00:36 -08:00
Morilli 837592ca11 BSNESv115+: apply patch to fix $4203 mul/div behavior
see https://github.com/bsnes-emu/bsnes/issues/256 or https://forums.nesdev.org/viewtopic.php?t=24087 for context
2022-12-11 17:18:01 +01:00
Morilli 74b37ab947 BSNESv115+: apply patch to fix CPUMSC reset test
see https://github.com/bsnes-emu/bsnes/issues/235
this patch fixes the test, but its correctness needs to be verified against real hardware
2022-12-11 17:01:02 +01:00
Morilli b0af99a68a BSNESv115+: pull upstream
43e42b2dcaf84c41d09c49745d82f8515e4f7771: simplify SA1 division
c0c60c83a84a49d4a2b822a0491cb258a3c5b98a: fix justifier controller
2022-12-11 16:41:55 +01:00
CasualPokePlayer 1fc08e3d95 Use NLua's MethodCache if possible for MethodBase based lua functions (see 0ed3085ec3) 2022-12-07 19:36:13 -08:00
CasualPokePlayer b04260bee7 fix unwrapped lua exceptions not being correctly thrown 2022-12-06 14:21:39 -08:00
Morilli 96cc3f8745 BSNESv115: implement an extended gamepad controller with 4 extra buttons
this is a breaking change for existing movies, but only when a non-gamepad controller was used, which is rare
2022-12-06 19:21:08 +01:00
CasualPokePlayer bc79664461 fix implicit lua number to .net conversion
fix .net exceptions not halting the running script
fix inconsistency with stdout and lua console printing errors, both should end in a newline now
print the inner exception of a lua exception (i.e. the .net extension) if possible
2022-12-06 02:52:57 -08:00
CasualPokePlayer eb00019c86 fix passing numbers for string args in .net lua functions (old engine had this behavior, granted "bad user" if they relied on this), add appropriate test
fix passing sbyte/char as args, add appropriate tests
cleanup the lua auto unlock hack, using a nice ref struct + dispose to handle it
2022-12-05 23:21:23 -08:00
Morilli 10ba45d462 BSNESv115+: actually provide IBoardInfo properly 2022-12-04 22:48:29 +01:00
CasualPokePlayer 51f01efdc4 Properly handle errors when running a lua script, using Resume/Yield methods added to the LuaThread class (see f904fa0d53) 2022-12-02 14:44:05 -08:00
CasualPokePlayer 45fbdb4844
Move to NLua/KeraLua/Lua5.4 (#3361) 2022-12-01 00:51:02 -08:00
CasualPokePlayer 92c1cdff22
RetroAchievements Support (#3407) 2022-11-30 23:51:17 -08:00
CasualPokePlayer eb1cef1ffc update mame to 0.250 2022-11-30 20:22:04 -08:00
CasualPokePlayer 137634cf89 add some missing updates to ares, cleanup build process a bit 2022-11-28 19:50:03 -08:00
CasualPokePlayer 8818f79bb0 actually make N64DD support work 2022-11-27 23:29:06 -08:00
CasualPokePlayer 9420c8b21c merge latest ares, hook up its new N64DD support, make ares use AxisContraint (see #3453), some other cleanups here 2022-11-27 05:44:00 -08:00
Morilli 589823d009 GPGX: add setting to disable per-line sprite limit
- resolves #3440
- includes manually cherry-picked e0ef0902e96bd9d71cb49c64505e755007e7452c
2022-11-22 14:44:39 +01:00
Morilli 0cb63e8d6a BSNESv115+: Implement overscan and aspect ratio correction settings 2022-11-18 13:08:27 +01:00
CasualPokePlayer 2804ad3041 fix crashes in mame due to bad single thread handling 2022-11-17 00:45:42 -08:00
CasualPokePlayer 44944e1d70 more simple string and double handling, allow SaveRAM usage with different bios files 2022-11-16 21:32:29 -08:00
CasualPokePlayer 62c3b4b8e3
Use a small dll for handling the msabi<->sysv adapter (#3451)
make a small dll for handling the msabi<->sysv adapter, using only assembly (taken from generated optimized rustc output) and handcrafted unwind information (c# exceptions in a callback seem to work fine in testing)
additionally, allow floating point arguments. this really only needs to occur on the c# side. msabi and sysv agree on the first 4 floating point args and for returns, so no work actually has to be done adapting these
with assembly being used, we can guarantee rax will not be stomped by compiler whims (and avoid potential floating point args from being trashed)
2022-11-16 09:02:13 -08:00
CasualPokePlayer 64044845a6 resolve erroneous LibMAME errors due to mame_lua_get_string returning nullptr with an empty string
(now will only do so on an error)
add back in mame_lua_get_double, to be used to resolve other issues (c# code pending...)
2022-11-15 00:37:09 -08:00
Morilli c21fedc76a BSNESv115+: add option for disabling ppu sprite limit 2022-11-10 23:22:17 +01:00
CasualPokePlayer 066297d5e7
MAME Waterbox (#3437) 2022-11-10 00:05:25 -08:00
CasualPokePlayer cc71882059
BSNES Memory Domain Fixes (#3423)
* Use SameBoy submodule symlink for BSNES

* SGB memory domains

* Fix SGB saveram issues (extra data like rtc will be saved correctly now here)

* Various cleanups, avoid unneeded unsafe use, a little better EnterExit use

Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
2022-10-28 19:22:49 -07:00
CasualPokePlayer 2d6c0af570 Fix oops from fe9e97e505 2022-10-21 18:58:08 -07:00
CasualPokePlayer fe9e97e505 Fix #3425 2022-10-21 18:52:18 -07:00
CasualPokePlayer b81728b2dc Correctly account for multiboot GBA ROMs, fixes #3421 2022-10-20 02:42:31 -07:00
CasualPokePlayer 8f1a0b9bb1 update melonds (TODO: Wire up camera) 2022-10-20 00:47:16 -07:00
Prcuvu ad85be7bed
Register TCM areas for melonDS core (#3420)
* Register TCM areas for melonDS core

* reorder mem domains a bit, add TCM to ARM9 System Bus, build

Co-authored-by: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
2022-10-19 23:47:42 -07:00
CasualPokePlayer 5382d4d345 Revert ""cheat" around the lack of pipeline emulation, delaying bankswitches/imask clears (note: branching resets the pipeline)"
This reverts commit d5a47490ff.
2022-10-04 18:10:42 -07:00
CasualPokePlayer d5a47490ff "cheat" around the lack of pipeline emulation, delaying bankswitches/imask clears (note: branching resets the pipeline) 2022-10-04 17:58:29 -07:00
CasualPokePlayer 9528a2030f GBS support using SameBoy 2022-10-03 01:55:14 -07:00
CasualPokePlayer 0c6f0523a0 Update sameboy, expose audio channel enable/disabling, cleanup settings to go through a single call/struct 2022-10-02 21:40:00 -07:00
CasualPokePlayer 71f2676ad8 more virtualjaguar cleanup, fix various bugs, have the DSP run more in sync with the CPU/GPU (makes Zoop boot, Doom is much less laggy, various missing sound issues are no longer present) 2022-10-02 06:50:11 -07:00
CasualPokePlayer 98be50057a [virtualjaguar] proper mulitwidth support, fixes Doom 2022-09-30 21:42:36 -07:00
CasualPokePlayer a59d66dfdd proper fix for mmult opcode, properly fixes Baldies music 2022-09-30 15:24:24 -07:00
CasualPokePlayer 929b034321 fix bad fix to risc jr, & 0x10 seems to be correct according to battle morph and blue lightning... 2022-09-30 04:36:40 -07:00
CasualPokePlayer 95c06e0b6e better fix for d7810f6ea9, remove incorrect comment 2022-09-30 04:18:02 -07:00
CasualPokePlayer f1a3e02e89 revert some of baa3bdf948, as it caused regressions elsewhere, make GPU interrupts not stupid (makes Myst stop crashing with NTSC) 2022-09-30 02:28:27 -07:00
CasualPokePlayer baa3bdf948 [virtualjaguar] rework dsp and gpu opcodes to come from the same source, fix some wrong opcodes (partially fixes Club Drive and Baldies music) 2022-09-29 21:53:14 -07:00
YoshiRulz 04fcf59afe
Update C++ FlatBuffers lib, check in new codegen, and rebuild cores 2022-09-30 05:33:18 +10:00
CasualPokePlayer d7810f6ea9 fix buggy TOM writes, fixes Baldies 2022-09-28 19:45:41 -07:00
CasualPokePlayer f0529fde28 [virtualjaguar] stop a CD transfer when address is greater than the end, rather than greater than or equal to, fixes battle morph 2022-09-28 04:31:06 -07:00
CasualPokePlayer 6388e4a0a8 more vjaguar cleanup 2022-09-28 03:25:53 -07:00
CasualPokePlayer 80cf3a0c48 [virtualjaguar] memtrack support, fix bug with event system, various cleanups 2022-09-28 03:25:53 -07:00
CasualPokePlayer 94bb881d00 better completely wrong cd timings, fix some bad risc opcodes, fixes FMVs in jag cd games 2022-09-26 21:49:33 -07:00
CasualPokePlayer b84ef509ec fix circular buffer, fix 24bpp mode 2022-09-25 19:54:56 -07:00
CasualPokePlayer bc83c9c917 adjust jagcd timing
this is still very wrong (needs something smarter for timing) but seems to make games intros not puke garbage sound now
2022-09-25 06:53:24 -07:00
CasualPokePlayer c2ae5bfa0e jagcd cd_initm support, fix some bugs 2022-09-25 06:05:28 -07:00
CasualPokePlayer 1f9337d225 fix loading in byteswapped jag cds 2022-09-25 01:03:45 -07:00
CasualPokePlayer ceff5f3e90 jagcd progress, fix jaguar lag when dsp is polling inputs 2022-09-25 00:38:01 -07:00
CasualPokePlayer 740cd1f8d4 more reg get/setting and tracing support for gpu/dsp 2022-09-24 04:14:28 -07:00
CasualPokePlayer ef18a76064 improve jaguar system bus, add more jaguar memory domains 2022-09-23 19:43:49 -07:00
CasualPokePlayer d8825deb8d fix non-word alignment hack 2022-09-23 06:40:13 -07:00
CasualPokePlayer 8194e5ff4b add hacks to support byteswapped and/or non-word aligned jagcds 2022-09-23 06:36:11 -07:00
CasualPokePlayer 801a783c69 fix gpu/dsp ram domains 2022-09-23 02:43:49 -07:00
CasualPokePlayer 6113f3c17b partial jagcd support (doesn't seem to completely work here)
fix some issues with vjaguar cleanup
add mem/trace callbacks and get/set reg support
2022-09-23 01:05:41 -07:00
CasualPokePlayer d50454b37a cleanup vjaguar code 2022-09-19 04:41:10 -07:00
CasualPokePlayer 38d3d36199 fix opcode address in exec callbacks + tracing (thanks prefetch)
sp/lr/pc for r13/r14/r15 for tracing
fix a bad for threaded renderer's thread start callback
2022-09-18 02:39:31 -07:00
CasualPokePlayer e242d35a22 pull latest sameboy, rework build system into a makefile 2022-09-17 18:40:30 -07:00
CasualPokePlayer 5e34dc6166 Always savestate expansion pak regardless of settings.
All the disable expansion pak setting actually does is tell the game the expansion pak is not available.
However, not all games actually abide by this, some will use the expansion pak area anyways.
Video plugins also end up just using a "segfault test" to determine if the expansion pak is present or not
So video plugins may use the expansion pak area too
This ends up causing savestates sometimes just crashing the game if the expansion pak ends up used

Resolves #3092, other state issues might be solved with this (I suspect #3328 is caused by this)
2022-09-17 13:11:31 -07:00
CasualPokePlayer 483258a04d virtualjaguar port, resolves #1907 2022-09-11 21:38:46 -07:00
CasualPokePlayer 34c504d7b9 update ds disassembler 2022-09-10 20:53:05 -07:00
Moritz Bender 6f0953aaa3
Implement snes graphics debugger for the new bsnes core (#3367)
* Partial port of graphics debugger to new BSNES

* minimal "working" copy-paste

* small fix for the previous commit

* Implement more stuff

* no idea whose responsibility "EnterExit" is but this should work

* add support for backdropcolor

i have 0% trust in this code

* implement mode7, apply backcolor on load

* 🙈

un-"implement" the nonfunctional scanlinehookmanager as well as the non-functional palette setting logic
- this may actually break config lol

* don't break libsnes config

* Provide IBSNESForGfxDebugger in the subbsnes core

* Remove redundant semicolon

* Clean up diff of `comboPalette_SelectedIndexChanged`

* Fix crash

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
2022-09-03 19:13:56 +02:00
CasualPokePlayer 13069d08f4 fix gpgx pattern cache invalidation, resolves #3363 2022-08-27 18:49:00 -07:00
CasualPokePlayer f1ef8d0887 fix oopsie in angrylion, resolves #3372 2022-08-26 14:27:26 -07:00
CasualPokePlayer 9174d17bd8 tic80 settings for enabling/disabling controllers, proper mnemonics 2022-08-19 23:43:55 -07:00
CasualPokePlayer f1fc05fe60 quick fix some graphical bugs
this isn't right but should suffice in practice most of the time
2022-08-16 17:49:54 -07:00
Moritz Bender 039d822144
BSNESv115+: Replace the 'snes_audio_sample' callback with a dynamic audio sample vector to reduce callbacks (#3010)
* BSNESv115+: Replace the 'snes_audio_sample' callback with a dynamic audio sample vector to reduce callbacks

* fix integration for subbsnes core

* reduce buffer allocations
- also make frame setter private now that it's possible
2022-08-15 20:50:26 +02:00
CasualPokePlayer 0ff4aca182 [Gambatte] Remote control controls and remote control emulation expanded to HuC1 IR and CGB IR (previously only done in HuC3) 2022-08-15 02:49:34 -07:00
Moritz Bender 929432086f
BSNESv115: add dedicated subframe core (#3281)
* BSNESv115: allow subframe inputs

* BSNESv115: Implement ICycleTiming

may be correct, not sure

* BSNESv115: add dedicated subframe core

I have probably overlooked something...

* Don't implement ICycleTiming in the non-subframe core

requires re-implementing the "FrameAdvance" function in the subframe core

* Register previously missing services in the subframe core as well

* Wire up SubBsnes everywhere in the frontend

* Change reset cycle to reset instruction

* Deduplicate some code

* Slightly rework frame advance logic. The main intent here is to prevent a case where two frames are ran within a single "frame." The current code probably wouldn't crash due to that, but best not to do that.
Also make SGB work here. A bit of a joke since you really can only abuse it for subframe resets, but might as well especially with the settings implying it's possible (and someone is bound to complain).

Co-authored-by: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
2022-08-10 23:08:44 +02:00
CasualPokePlayer 1a27aae45b update sameboy 2022-08-10 12:34:46 -07:00
CasualPokePlayer b8444f8bd2 update ares 2022-08-10 04:42:38 -07:00
CasualPokePlayer 5be8b0aab9
Zstd Compression (#3345)
Deflate compression in rewinder is now zstd compression
Binary blobs in zip files are zstd compressed (text is uncompresed for user ease).
All wbx cores and resources are re-compressed with zstd, wbx build scripts are changed to account for this. Shaves off a bit with download size and it's faster to decompress to.
2022-08-09 23:33:28 -07:00
CasualPokePlayer 32e8afcedc
Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348)
* Implement hardware accelerated CRC32 and SHA1, use them if possible.
CRC32's generic function is also replaced with zlib's as it is much more performant than our implementation
Full hash of a ~731MB disc took only ~369 ms with this, and the generic CRC32 isn't so far behind at ~659 ms
SHA1 should perform 4x faster if the user's CPU supports the SHA instructions.

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
2022-08-09 23:30:17 -07:00
CasualPokePlayer 5cd37c76b2 dobie removal cleanup
fixes 89972a3579
2022-08-05 03:32:09 -07:00
CasualPokePlayer d84da4ec4b wire up sameboy's rumble 2022-07-25 00:10:46 -07:00
CasualPokePlayer cb468ba806 pull in latest sameboy master, add stub camera pixel callback to prevent nondeterminism, wire disabling joypad bounce as a sync setting, various cleanup 2022-07-24 04:35:03 -07:00
CasualPokePlayer 480ce3b925 fix minor miscompilation of gambatte-linux, update LibGambatte to reflect API changes wrt CameraCallback 2022-07-20 23:35:29 -07:00
CasualPokePlayer a8f709a8a4 [Gambatte] ensure cameraBuf_ is signed, misc cleanup 2022-07-20 23:29:53 -07:00
CasualPokePlayer d209ba289f various gambatte updates / bugfixes 2022-07-20 22:51:28 -07:00
CasualPokePlayer c02975c757 merge aresv129, enable SIMD RSP 2022-07-17 18:52:59 -07:00
CasualPokePlayer 0d3c7b7e0c [Libretro] Implement SET_SYSTEM_AV_INFO and SET_GEOMETRY 2022-07-06 14:52:28 -07:00
CasualPokePlayer e41d1a996e fix gpgx_swap_disc, re-enable disk buttons (seems to work?) 2022-07-03 23:17:08 -07:00
CasualPokePlayer c5902bff54 update sameboy to latest upstream 2022-07-02 09:52:35 -07:00
CasualPokePlayer 5875df4b76 prevent svp dereferences when not using an svp cart (fixes #3297) 2022-06-29 13:03:55 -07:00
CasualPokePlayer 347fa24820 split arm7 polling/touch screen polling to a new "alt lag" variable and add a setting for whether to consider these sources (fixes #3278)
add in new disasm system (taken from https://github.com/MAP233224/dthumb), works much better than darm
2022-06-24 01:34:01 -07:00
CasualPokePlayer 170ea47464 wire up reset button for tic80 and make biz_time_rm tick post frame 2022-06-16 15:56:34 -07:00
CasualPokePlayer 84af66f523 fix TIC80 inputs, wire up time/clock callbacks 2022-06-16 13:01:50 -07:00
CasualPokePlayer 2c3b6b3cd4 ti80 core 2022-06-16 00:14:48 -07:00
CasualPokePlayer 90220b6506 add m161 support to gambatte 2022-06-11 03:22:38 -07:00
CasualPokePlayer 253f139731 merge in another commit from ares 2022-05-30 15:39:43 -07:00
CasualPokePlayer d201fdd62d s/DiscIndex/DiskIndex 2022-05-29 21:37:14 -07:00
CasualPokePlayer 1c27c73c86 fix nyma cd switching
also changing the make all cores script so it uses the install target
2022-05-29 21:16:23 -07:00