Commit Graph

604 Commits

Author SHA1 Message Date
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
YoshiRulz cf0053fd3c
Update FlatBuffers codegen script for Nyma cores
uses latest (they switched from SemVer to dates, so 22.9.24 follows 2.0.8)
works on real Linux, using Nix if installed
2022-09-30 05:33:17 +10:00
YoshiRulz ddac50eb30
Pull musl submodule 2022-09-30 05:32:19 +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 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 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
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 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 c02975c757 merge aresv129, enable SIMD RSP 2022-07-17 18:52:59 -07:00
nattthebear 89972a3579 Remove dobie core
This never really worked.  Besides being unusuably slow and not very accurate, there was a miscompliation problem that caused release builds to not function.
2022-07-17 15:02:42 -04:00
CasualPokePlayer e41d1a996e fix gpgx_swap_disc, re-enable disk buttons (seems to work?) 2022-07-03 23:17:08 -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 cb3bd6af72 update waterbox build scripts/instructions to reflect vb move to nyma and new tic80 core
also undo a fuckup i did with nyma scripts, note $1 means param passed in command line
2022-06-16 14:37:18 -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 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
CasualPokePlayer 3b09f822b7 more vb nyma modifications, also push repo 2022-05-29 19:44:08 -07:00
CasualPokePlayer 0c95088e02 vb move to nyma 2022-05-29 17:21:01 -07:00
CasualPokePlayer e6d74c3167 merge mednafen 1.29.0 for nyma cores 2022-05-29 00:31:24 -07:00
CasualPokePlayer 59d011334f fix ares64 tracer, pull in some more commits from upstream 2022-05-27 21:14:04 -07:00
CasualPokePlayer b773a3f163 merge latest melonDS master 2022-05-27 17:52:09 -07:00
CasualPokePlayer 009bff30d7 merge aresv128 2022-05-26 22:26:56 -07:00
CasualPokePlayer 20ecfb81ea Add tracer + disassembler + get registers + system bus to Ares64, mark Ares64 as released
Squashed commit of the following:

commit 2e29aee13276412b2832e8f0efa10d9c57ed9d78
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Apr 14 22:44:33 2022 -0700

    .

commit be73cf5e2204405a84b42948fd104d18c75be45a
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Apr 14 22:37:34 2022 -0700

    hook up debug stuff + disassembler + tracer, mark Ares64 as released

commit fdd440703ecef48c94bb2bb1ad9c2d3dc5c96e42
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Apr 14 20:36:08 2022 -0700

    maybe fix disassembly

commit d0808551c60fe3c03506b1ad89766a0d397e06dd
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Apr 14 20:06:36 2022 -0700

    system bus

commit 60d1df8f33043fb656f90c1cf4ace8788489c3e1
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Apr 14 16:40:11 2022 -0700

    regs

commit c64be2df293ea44694868355747061a952bd54aa
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Apr 14 15:31:08 2022 -0700

    tracing and disasembly for ares, needs to be hooked up to frontend
2022-04-14 22:45:10 -07:00
Morilli 3d039934af BSNESv115+: expose fast dsp and fast coprocessor options 2022-03-29 02:16:42 +02:00
Moritz Bender 339d34413f
Implement msu1 handling for bsnes115+ (#3190)
* Implement msu1 handling for bsnes115+

* RomPath->RomDirectory for clarity

* Remove unnecessary include
2022-03-28 23:52:13 +02:00
Morilli da2a20e55b BSNESv115+: Some general cleanup, remove nonfunctional msu1 code 2022-03-25 08:36:11 +01:00
CasualPokePlayer 64ac7253f6 Add transfer pak support to ares, add n64 mouse support to ares, various cleanups all around
Squashed commit of the following:

commit 1f6cdb99a8486b3f89395b2bd3f13f730e21f743
Merge: bcef146d7 ecd428898
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 03:05:12 2022 -0700

    Merge branch 'transfer_pak_ares' of https://github.com/CasualPokePlayer/BizHawk into transfer_pak_ares

commit bcef146d7d62e5ce435ae3fc4d585d71d98bec52
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 03:05:05 2022 -0700

    a

commit ecd4288980f7311eba3bdd0a9d1a3fca02e42e43
Merge: 86a7e3e85 ccb24cc79
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 02:57:00 2022 -0700

    Merge branch 'transfer_pak_ares' of https://github.com/CasualPokePlayer/BizHawk into transfer_pak_ares

commit 86a7e3e85bc1b3cb979671edcbfca66e69d5212b
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 02:56:50 2022 -0700

    a

commit ccb24cc79fd922b1e3e3b80d660c7b7696f0cf84
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 02:51:36 2022 -0700

    a

commit 285fd66f9240dfa502a269adb19cc1f3d11236c5
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 02:02:31 2022 -0700

    misc

commit 9fb76345e4507cbd53ab5e4c2c61a5cb992b7241
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 01:50:46 2022 -0700

    frontend hookup

commit dabee3a4d63c5801e3147dd758e3c187be0ab8bd
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Mon Mar 21 01:26:48 2022 -0700

    actually hook other shit up also delete some shit

commit df632d6ddf6eaeb61ad3ad640851709c2614bfbd
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 21:37:18 2022 -0700

    a

commit 143c4039453290ef1e8a4cf53ddea534efa0cea3
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 21:28:07 2022 -0700

    a

commit fd75dcc5150860171e3d96fd0bcb4749eeb99378
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 21:03:51 2022 -0700

    a

commit ea039643e9a093f63f8dc8c7446e9e70f7f965f0
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 19:56:46 2022 -0700

    a

commit 8b373d2ba547cd1ab61360e8129f31452014c728
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 19:33:47 2022 -0700

    a

commit dc18a90bebcae013aca4494c1e0a83603dbdbea6
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 19:18:34 2022 -0700

    a

commit 3d0eba5f57d95f7cfd74b662f70a40cac5638539
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 19:16:56 2022 -0700

    a

commit d97ea34753c007663ea0e629df8830e6aae98e91
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 18:28:01 2022 -0700

    a

commit 7a1fe0442c7dd6425048207a19b1b18f9dc3e344
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 17:22:10 2022 -0700

    a

commit 421de8ebb8c02736e65f28a88a17cabf297c6e10
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 16:57:47 2022 -0700

    is this right?

commit 9fcaa1905b6e3b6bc73c8e8c15c55cab06ddb7f4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 15:57:32 2022 -0700

    rework audio

commit 602577ded89f2fd7d4514792e4f9f485235ce2f1
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:54:29 2022 -0700

    doh

commit 5521dab709551d9f02bd0cf0d979d8a3860541c6
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:42:50 2022 -0700

    a

commit bc10461eb9d47bea5acc7cc22963b8e7025b9a31
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:41:17 2022 -0700

    a

commit d088719299bc0946962bba9404469fe9628633c6
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:25:07 2022 -0700

    a

commit d425c49bc2ea7925f485379dad33326fa8566754
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:18:33 2022 -0700

    a

commit ea7c69a512ce84977ad92be0c3f97f396dcf13a7
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:13:41 2022 -0700

    a

commit b350580b5c8ce455d6ffa41237c2564e8fa76a58
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 14:05:46 2022 -0700

    a

commit 5983b23e760e5ca8a3c8141075f383275da570b4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 13:57:25 2022 -0700

    a

commit 12de82e8841284cb70ec02765d86e3729661dcb4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 13:46:58 2022 -0700

    a

commit 992bdf114c24a8a3d37c110629f9a66bfaf21cf8
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 13:05:28 2022 -0700

    a

commit 3637649dde95ff4fb24474ee0d1dde795cbc5fe3
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 12:49:52 2022 -0700

    o

commit 7d7264b92822ce34ba5412f4cf869c6a4e6fb9b9
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 12:41:55 2022 -0700

    testing time

commit bb3a2f89861cdf429091d8253a656e782b68e33b
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 12:14:30 2022 -0700

    bleh

commit df46cc34d6edc312b519c98b6c7be3ac6ab89bd2
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 06:18:28 2022 -0700

    bleh

commit 21c28a81726ab9a9f206a58424e5434cd0bac1a8
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 05:43:39 2022 -0700

    hack test time

commit 3d9e462addc20d6b6d8ffc41595c4751d6fc2975
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 05:36:51 2022 -0700

    oh right need to build it

commit a970194f64ac0652f97236debd39e142b01d4dcf
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 05:32:07 2022 -0700

    guessing not endianess, maybe need more reset state work?

commit 5d4c11dbf2f767e63d505da22d6bbdef76a4e28b
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 05:23:52 2022 -0700

    is this a endianess issue?

commit c5fcd687f5e2c62b1f0f065a3b9c9ffa30867eeb
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 05:11:43 2022 -0700

    debug time

commit 437071710ea040a466dd25d7fe691fcdbdb95030
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 05:03:58 2022 -0700

    better emulate reset thingie

commit e02503c3f74aa89784b5cc43d1fe5daa6fedf5d3
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Sun Mar 20 04:31:42 2022 -0700

    initial mouse and transfer pak support
2022-03-21 03:08:23 -07:00
CasualPokePlayer 31b30210b3 [Ares64] fix A/V sync getting screwed up in interlaced mode 2022-03-18 01:11:25 -07:00
CasualPokePlayer 7150a97e07 get render threading working in melon
Squashed commit of the following:

commit 6c54b59f5f8f8bbf8698eebbc2a7e39079b0e726
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Wed Mar 16 19:19:12 2022 -0700

    update submodule

commit 2c65d4375b64d8e729ebc0d35fd34865627bc494
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Wed Mar 16 19:14:36 2022 -0700

    frontend stuff

commit 4566edcc623061beb6e3a7b2ead5571b42abdf3e
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Wed Mar 16 18:10:45 2022 -0700

    probably hacky bullshit

commit 1fb9427c56a8d1af60378163cc2cafe6b36149c9
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Wed Mar 16 00:59:58 2022 -0700

    more mt testing
2022-03-16 19:19:36 -07:00
CasualPokePlayer 01e59f658c don't know how that submodule got pushed back 2022-03-11 19:42:58 -08:00
CasualPokePlayer ccac4d1000 Squashed commit of the following:
commit 15611308c2c6ed5e4f46bd840ade8700e3768527
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 19:29:57 2022 -0800

    derp

commit 3c0546cdd8f08004c1ad82bdb72910498dddac91
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 19:28:06 2022 -0800

    bob

commit 8e24ef7adc9ccee5405f8618bb8ddb165ff9cf8f
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 19:10:45 2022 -0800

    removing perf core here now

commit 66225df3b175544d28d91c6ede53861c74e71239
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 18:51:14 2022 -0800

    delete perf core, cleanups, get submodule pushed

commit 06b627bd949f15aac4749a33762ec5cb47e5aea9
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 17:46:36 2022 -0800

    oh fucking please don't tell me this was it

commit 0bd0625d172a74a82e30b89e2f10702394e74491
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 17:21:22 2022 -0800

    bleh

commit 20c1497fd1fb25eb6ac6c44fe2490b71009fc9e0
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 16:36:02 2022 -0800

    bleh

commit 4ccd7982d97f8c4c85c5b18801bb9784df9772e8
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 15:55:43 2022 -0800

    testing

commit ab9e14bc7bb3e533f903a003b80f8e6a006cd819
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 15:44:24 2022 -0800

    bleh

commit 6d2de266825ac23df25466fdd6154e60ec6132de
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Fri Mar 11 00:08:45 2022 -0800

    bleh

commit f55c3e3277b979a8535667312fdb988a1f70bc01
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Mar 10 23:54:49 2022 -0800

    oh derp

commit 16e3c87d7ab06947da208feb88b3f3fd96874621
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Mar 10 23:43:27 2022 -0800

    bleh

commit 1630845d46af7dc048b8c5dcfc7b0359d7f3133a
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Mar 10 23:36:14 2022 -0800

    gross hack

commit ff1ef0ac6da559e0ce0e7cad10583b70a63c3551
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Thu Mar 10 23:10:54 2022 -0800

    angrylion integration into ares.
2022-03-11 19:36:56 -08:00
Moritz Bender 3726cc6291
Fix #3173 by only calling bus.map() on initial power, not subsequent calls (#3176)
* Fix #3173 by only calling bus.map() on initial power, not subsequent calls

* yeah screw that, we'll just lock the bus to prevent map calls from going through

* initialize peekable in reset with false, just for safety i guess
2022-03-09 04:31:30 +01:00
CasualPokePlayer 8b6f1c96d6 [melonDS] don't state sound buffers too 2022-03-06 01:46:26 -08:00
CasualPokePlayer 4bfb3ba48e [melonDS] don't state these big caches 2022-03-06 01:20:15 -08:00
CasualPokePlayer 46c2d6faf1
Melon Cleanups & Updates & Prep For Multithread Rendering Support & Prep For DSi NAND bs (#3174)
* prep for handling multi-threaded renderer in melon, along with some other cleanups

* initial core side support for mt rendering, probably crashes?

* oops

* ok use ref not in

* testing

* poor man's semaphore

* clean this up, hopefully fix a deadlock?

* update submodule

* reduce submodule diff

* cleanup

* hook up thread wait cb

* maybe make shutdown not hardlock?

* oops

* oops

* testing

* testing

* a

* lol

* fuck

* a

* oops

* a

* a

* a

* a

* a

* a

* a

* a

* a

* if false this

* a

* a

* a

* bleh

* a

* update to upstream

* oh right lua
2022-03-06 00:43:30 -08:00
CasualPokePlayer 114124c82e
BSNES Region Override (#3169)
* region override for bsnes

* hook up SnesInitData right. still needs region override sync setting

* settings stuff, also need to make sure sameboy is using the right region for sgb

* and build

* clearer struct definition; move struct to header file

Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
2022-03-04 14:21:53 +01:00
CasualPokePlayer 8e233a0e3b alloc_invisible internal framebuffers in melon 2022-03-04 01:26:58 -08:00
CasualPokePlayer 4bac1bbf1b fix #3165 and fix the tabbing/space mixup here 2022-03-04 01:20:40 -08:00
CasualPokePlayer 406b76a023 fix mem domains 2022-02-17 02:48:40 -08:00
CasualPokePlayer 655ed7949e
Ares64 Performance Core (#3149)
* prep for performance ares64 core, needs work unmanaged side

* get this going

* rebuild this

* apparently build didnt get cp'd? need to investigate

* fix build, other shit

* suppress these warnings

* tweaks and builds

* apparently bizinvoker doesnt like having LibAres64 class shared between non-waterbox and waterboxed, so split it.
also states for performance core

* builds

* fix this option, describe supersampling properly

* penguin64
2022-02-16 02:15:27 -08:00
ShinobiWannabe 05f11be191
Genesis GPGX SRAM support for games larger than 8MB (#3139)
* Large SRAM

Cherry pick changes in order to run games with SRAM support for games larger than 8MB based on the existing commit by ekeeke in Genesis-Plus-GX.

e6ab7563e7

* Revert "Large SRAM"

Removes changes to the cd cart files and contains the newly built  gpgx.wbx.gz.
2022-02-15 23:25:38 +03:00
CasualPokePlayer 1330fdeaa1 Probably a hack to make lag detection work? 2022-02-13 14:38:44 -08:00
CasualPokePlayer 28cfb1aa74 make ares64 comply with mupen's analog input scheme, allow for disabling the physical limitation / circle thingie 2022-02-13 02:45:48 -08:00
CasualPokePlayer f48f9dba9f change PI DMA to use 16 bit fetches (275ba735de) 2022-02-12 02:33:41 -08:00
CasualPokePlayer 682111f377
Ares64 (#3125)
* ares64

* build, currently cherry picking c9af34027b to build this

* some work

* commit the frontend work. crashes on some NR_SCHED_GETAFFINITY syscall

* delete this

* fix oopsie, add debugging shit

* getting closer...

* what the fuck is this mame shit doing???

* fuck

* it's one of these isn't it

* fucking hell

* at least it's not crashing on init now

* bleh

* let's see if this works?

* audio i think?

* oh right, need to disable threading here since that's not wbx supported

* testing

* testing

* testing...

* testing

* wtf?

* lol

* it's doing something now i guess?

* let's try this

* maybe this will catch this bullshit?

* lol

* the fuck?

* what

* meh

* bleh

* let's have some fun

* bleh

* bleh

* bleh

* maybe this works better

* let's try this?

* meh

* this probably will break

* lol

* meh

* a

* a

* a

* a

* a

* meh

* a

* a

* b

* alloc invisible these video buffers

* a

* actually build

* bleh

* well uhhhhhhhh let's see if this blows up for fun i guess?

* bleh

* yeah that when as well as expected

* push this

* bleh

* bleh

* bleh

* a

* dirty hackery

* fuck space/tabs

* hook up input

* hook up input frontend side

* reset/power

* going to have to commit to dumb workaround here i guess?

* fuck this bullshit crash

* cic stuff

* oops

* testing

* hook up save detection

* memory domains and saveram shit

* oops

* someday i'll get macros right

* let's get this kinda reproducable

* build

* bleh

* frontend shit

* bleh

* testing

* a

* fucking

* a

* a

* a

* workaround C# bullshit marshalling maybe?

* revert that, let's hack it on c# side instead

* disgusting hack

* fuck c#

* fix oopsies for eeprom/flash and fuck c#

* apparently explicit layout just dont work, thanks c#!

* correct orientation

* actually fix orientation

* testing

* bleh

* b

* a

* fix crash here

* rumble getter

* hook up rumble with frontend, cache readonly controller settings on core init

* remove old experiment

* make clean make install
2022-02-11 18:22:16 -08:00
CasualPokePlayer f060fdaa60
hack a peek into bsnesv115 (#3118) 2022-02-07 08:00:48 -08:00
CasualPokePlayer c8c8b1c05c oops, pretend this didn't happen 2022-02-03 19:05:27 -08:00
CasualPokePlayer dd3cf6091f add memory callbacks to melon, cleanup some code 2022-02-03 18:59:51 -08:00
CasualPokePlayer 3f7c80a950 prep for ICycleTiming for Nyma 2022-02-02 21:12:50 -08:00
CasualPokePlayer 33a4dda6b7
Melon DSi (#3114)
* update melon

* frontend work

* make this work (i think?)

* fucking merge conflicts

* bleh

* hack up DSi support, very hardcoded atm, but at least states are reasonable

* add IS_DSI load flag

* frontend work bleh

* oops forgot to push

* ok fine apparently that doesnt display right

* oops

* prevent zealous release screen calls, DSi firmware seems to not like it?

* support for loading DSiWare title

* dsiware

* oh right this bullshit

* oops

* will this work

* why the fuck was this signed

* 0 out these hashes, these are also unique per console, no hope verifying these
2022-02-01 23:40:32 -08:00
CasualPokePlayer 096f24e7c6
Reduce bsnes115 state size (#3105)
* testing...

* more testing...

* this is probably a bad idea

* well this probably fixes state size issues

* time to debug this

* oh derp it's just not enough memory in invis heap

* let's see if this works?

* apparently this breaks slow ppu?

* testing...

* testing...

* testing...

* sanity checking

* let's try again

* i do not know what the fuck is up with this emulator nor do i care enough, state size is still under a mb anyways with slow ppu

* oops forgot to commit this

* resolve some issues

* tweak memory allocation sizes

* dont save more cache stuff

* wtf was i even thinking here

* move comment back to original pos, comment on double loading
2022-01-31 19:00:04 -08:00
CasualPokePlayer 7ac2e97cb7
update melon (#3113)
* update melon

* frontend work

* make this work (i think?)

* fucking merge conflicts

* bleh
2022-01-31 17:18:42 -08:00
CasualPokePlayer d6b33fbec6
Nymashock (#3093)
* nymashock wbx

* shit

* lagflag stuff

* saveram stuff

* debugging how this works

* lets see if this works better

* fuck strings

* ok let's do this right i think

* probably have this all working

* get repo in

* add nymashock to build scripts

* also update this readme

* get rid of this default, seems to break internally anyways?

* ""fix"" dualshock (wtf to do with rumble???), make override defaults actually default, add hack to allow for overriding default controllers

* hide useless rtc settings

* hack fix override defaults for controllers, get something going for nyma psx schema

* oops dont forget this

* make fucking default controllers hack work (what the fuck is this code???) also complete schema and mnemonics

* FUCKING FIX THIS BULLSHIT DEFAULT

* let's make this a little nicer

* add mnemonics for □/△/○, fixes weirdness with input display

* fix weird overscan issues when multiwidth + no-interlacing happens at the same time

* do this "properly"

* analog mnemonics

* default controls for dualshock/gamepad filled

* set nymashock as preferred core

* apparently this didnt get committed?

* update README too

* control name fix

* Revert "control name fix"

This reverts commit a3cae89b18.

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
2022-01-30 08:52:49 -08:00
Morilli bde5ee5167 Fix waterboxhost for version 1.60.0-nightly
closes #2750
2022-01-29 00:22:54 +01:00
Moritz Bender 0d7de83d4b
BSNESv115+: Implement snes_controller_latch function, cleanup input polling behavior (#3084)
* BSNESv115+: get rid of input_state + input_poll; just poll

* call `snes_controller_latch` on latches done in the core,

- this now also actually calls the InputCallbackSystem
- needed some edits in the core to support executing the callback even when no controller is connected in port 1

* Fix and somewhat normalize the SnesCallbacks order
2022-01-22 00:29:47 +03:00
Morilli d24629f3ad BSNESv115+: ram and rom memory domain fixes
- saveram was not working at all on certain roms, as the "CARTRIDGE_RAM" memory domain was returning a null pointer (similar thing for "CARTRIDGE_ROM"; changed it to correctly return the current rom)
- add sa1_bwram domain for clarity and an SGB_ROM domain
2021-12-15 09:10:37 +01:00
Morilli fce0f7a911 BSNESv115: Improve speed of fast ppu check 2021-12-01 19:40:53 +01:00
Moritz Bender cc38f4bcba
Implement memory callbacks for the new bsnes core (#2797)
* Actually working callbacks
now actually work after natt's changes
* Set whether memory hooks exist every frame to prevent unnecessary function calls if not
2021-11-29 19:59:47 +03:00
nattthebear 2ea62ffea6
Handle reentrant calls in waterbox (#3007)
Fixes #2585
2021-11-23 14:20:12 -05:00
CasualPokePlayer 600ee6c913 Squashed commit of the following:
commit af7cadfce4b750f8b1b23476c281bd2dfe027225
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Tue Nov 2 22:43:21 2021 -0700

    right, rename these too

commit e27197d18ad33af53729b1a57ee4a048189c41c4
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Tue Nov 2 22:40:42 2021 -0700

    build

commit 1af068f11f553ade70999fb2c640ee98e054aa36
Author: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
Date:   Tue Nov 2 22:37:28 2021 -0700

    new way to do mic input for melonds
2021-11-02 22:54:36 -07:00
CasualPokePlayer 463ef90fd2 build and comment this crap out (nice build error lol) 2021-10-29 23:07:34 -07:00
CasualPokePlayer 7a30cce55f melon merge upstream 2021-10-29 22:57:58 -07:00
CasualPokePlayer 9138859bf5 am/pm flag fix? 2021-10-26 18:04:41 -07:00
CasualPokePlayer 41128abc37
[melonDS] Redo porting, waterbox style now (#2945)
Co-authored-by: nattthebear <goyuken@gmail.com>
2021-10-24 21:40:23 +03:00
CasualPokePlayer 9a87a0f586
nuke sameboy (#2934) 2021-10-18 21:38:23 -04:00
mooware 55a8936a30
add options for virtualboy to only show left or right screen (#2842) 2021-09-01 20:41:02 -05:00
CasualPokePlayer 036e349337
[BSNESv115+] Fix Lag Frames For SGB (#2886)
* better lag detection for sgb. todo: might want to toggle this?

* correct logic and don't fail build this time
2021-08-01 09:54:59 -04:00
Moritz Bender 2ff7e4d39b
Add sa1_iram memory domain for new bsnes (#2803) 2021-07-16 18:41:53 -05:00
CasualPokePlayer 488fd2c6af
Add support for more SGB firmware + Use homebrew bootroms instead of bsnes' illegally provided official ones (#2837)
* add support for more SGB firmware

* replace illegally provided bootroms with legal homebrew bootroms

* let's swap these with homebrew bootroms too

* add builds

* this should probably be preferred

* Fix incorrect assignment

* Fix whitespace changes to Designer files

Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
2021-07-14 12:48:02 -05:00
nattthebear 9488e19d38
Update mednafen cores to 1.27.1 (#2831) 2021-07-03 10:01:04 -04:00
nattthebear 90a12a8e73 Update virtual boy core with a mednafen 1.27.1 fix. 2021-06-19 08:32:50 -04:00
nattthebear 2c0c6aa0bb rename a bunch of shit because someone has a fetish for RFCs
rust maintains its reputation as a less annoying language to write systems code in than C, but only just barely.

yeets #2750
2021-05-26 16:07:07 -04:00
Morilli 38bc953e22 Add a designated payload controller based on the multitapcontroller in the new bsnes core
- also patched out the left/right and up/down handling in the core, where it didn't belong
- also fixed the existing payloadcontroller because it wasn't working at all lol
2021-05-26 02:27:54 +02:00
Morilli 24c74c0e36 Implement IDebuggable for the new bsnes core 2021-05-23 05:02:05 +02:00
Moritz Bender 5d20862f26
Implement bsnes version 115 as a new core (#2740)
* Slam all this shit in here i don't care

* no lzma pls

* un-hack things that i hacked earlier (closer to bsnes source now)

* remove more unused files

* remove more files

* get some stuff working on this weird ass branch

* do this to get actual video (holy shit it works) while palette is incorrect

* make video look correct and hopefully fix stack waterbox allocation size uh ?

* Move the new bsnes core to its own dir as a new core and get input working

* remove leftover files from old bsnes

* fix some shit for now

* make lag frame detection work

* Improve cartridge loading to hopefully make sgb work (haven't tested)

- also changes some audio buffer stuff, might be better or worse than before idk
- need to figure out the saveram stuff
- path requests might actually completely fail atm, no idea how to verify that

* refactor to use a switch instead of some weird array with function pointers

- and implement snes_get_mapper, might be helpful or smth idk

* implement entropy c++-side and delete all this useless code holy

* delete dumb unnecessary code

* implement snes_peek_logical_register c++-side

* normalize all indentation

* attempt to properly support sharprtc and epsonrtc data loading and writing

* Duplicate winforms code to add entropy support c#-side and implement layer_enable functionality

The duplicated code is just so i can have a proper window for the new bsnes core. I do not like duplicating code like this, so this should be improved if possible

* Checkpoint for the start of getting rid of the ugly api wrapper stuff

* Next checkpoint for a full api refactor

* bullshit denied

just no.
every file is either copied or manually edited or written from scratch etc.
do not. force. one indent_style on every single file.
It just does not work.

* remove the entire eMessage_CMD handling and convert to native function calls

* general improvements regarding functionality

- adds hotfixes and fast_ppu core options
- add back the alwaysDoubleSize setting
- use bsnes's own serialize function for savestating now
- generate and use the color palette only in c# cause it doesn't need to be on the c++-side
- and more cleanup like always

* somewhat implement IMemoryDomains

* Implement trace logger and cleanup more unused stuff

* Implement ISaveRam, fix controller mapping for TAStudio and remove the pwrap stuff

* Fix ISaveRam, add a controller configuration box for the new core, (hopefully) fix controller inputs

- also differentiates BG prio0 and prio1 now (with options for it)
- some minor irrelevant edits in bsnes source

* Cleanup some more and optimize a bit

* Support firmware loading and make sgb work (hopefully)

* Remove all unused files

* Add back CropSGBFrame option and cleanup snes_video_refresh logic

* Some hopefully sensible changes

* One more cleanup pass

* Change to new PortedCore attribute

necessary after the changes in 98b07c42d5

Co-authored-by: nattthebear <goyuken@gmail.com>
2021-05-14 20:06:13 -05:00
YoshiRulz 8e7f171ae9
Copy to Assets and output when building wbox cores and host 2021-04-28 16:06:41 +10:00
nattthebear e6c33e676a Update notes on debugging
We fixed SEH unwinds on callbacks some time ago
2021-04-09 20:59:22 -04:00
YoshiRulz 7ec1008621
Update output path of NymaTypes shell script
fixes 65d5e3f7d
2021-04-10 08:49:07 +10:00
YoshiRulz 359cb0d17b Fix executable bits on some wbox scripts 2021-03-20 08:11:48 +10:00
YoshiRulz c75ea8efd1 Cleanup libcxx scripts 2021-03-20 08:11:48 +10:00
YoshiRulz 4697c56a3b Pull musl submodule, complete script refactor and update readme 2021-03-20 08:11:48 +10:00
nattthebear 1c27943707 Make SNES rom memory domain writeable
Use at your own risk
2020-12-13 20:11:58 -05:00
nattthebear 72ea5ce866
Waterbox: Allow SEH unwinding through guest calls. (#2519)
The goal of the separate stacks was to allow this, but I never quite finished the job.  Now, when a SEH exception (generally a Rust panic in a guest syscall handler, or a C# Exception in a callback) tries to unwind through guest code, it works.  Note that we don't actually unwind the guest stack, as there's nothing useful to be gained from that;  When an emulator core throws an exception like this, it should be considered completely hosed.  Throw it out and get a new one.

There were two bugs stopping this from working.

First of all, we had custom thunks that lacked sufficient unwind information for RtlUnwind to get through.  For the sysv <-> msabi adapter, this was fixed by making it regular Rust code instead of hand assembled junkus.  So the compiler generates valid unwind information for all of that.  Then we just JIT a small stub on top in the MsHostSysVGuest code, which needs no unwind information because it won't throw an exception itself and transparently passes execution to something with valid unwind information without invalidating that information.  (NB:  Clr JIT stubs use the same strategy.)  For the host <-> guest stack transition code, a small hand generated unwind stub was added to interop.s that is registered with `RtlAddFunctionTable`.  I've seen the unwind work successfully without this second set of unwind information, but better safe than sorry.

Secondly, our misuse of SubSystemTib caught up with us.  It's an old field, allegedly from OS/2, that we repurposed to hold TLS information needed for the waterbox stack transitions.  Most people think nothing uses it any more, but in fact if it's set to a non-NULL value, but doesn't contain valid information, `KERNELBASE!GetModuleFileNameW` will crash when it tries to get a module name from there.  The fix here was to simply tighten up our usage of SubSystemTib:  We were already nulling it out when returning from guest code, but not when calling back to host code in guest code.

Fixes #2487.  Unwinding of this sort has never worked well in waterbox; the reason why that issue is more recent is that the particular reproducing case of firmware didn't cause an exception in a callback in older code; the exception happened in pure managed code.
2020-12-13 19:12:16 -05:00
nattthebear 6130a7241f Fix Saturn cart detection
Closes #2513.
Similar to ddd229e03d, Mednafen internals expect enumeration setting types to work with MDFN_GetSettingI, but we weren't doing that.
2020-12-12 13:40:33 -05:00
nattthebear 2f2f104e3d Update nyma cores to Mednafen 1.26.1
See Mednafen release notes for full changes.  Mostly just Sega Saturn stuff.

Closes #2464
Closes #2162
2020-12-12 10:50:18 -05:00
zeromus 96aa3e85c0 libsnes - remove pointless registers 2020-12-05 23:37:16 -05:00
zeromus f580773342 add CARTROM-DB and CARTROM-D blocks to libsnes CDL 2020-12-05 23:37:16 -05:00
zeromus ffdb19e99a update waterbox readme a bit 2020-12-04 15:41:16 -05:00
nattthebear 98ad14ff47 Fix two semi-related savestate bugs in waterbox.
We had two instances where the act of sealing could lose snapshots that were never recovered.  It's oof.
2020-10-13 09:10:46 -04:00
nattthebear 27e600c1ac Fix some confusions in no-dirty-detection mode
This caused some awful crashes, but doesn't affect any real release builds of waterboxhost
2020-10-13 09:10:40 -04:00
James Groom a5d166cf71
Partial fix for #2353 (files in dev builds) (#2410)
* Move .so libraries to dll dir, update some build scripts

* Move OpenTK.dll.config with OpenTK.dll

* Keep EmuHawkMono.sh in Windows-built artifacts

* Add Package.sh to match QuickTestBuildAndPackage.bat

used as `Dist/BuildRelease.sh && Dist/Package.sh`

* Update GitLab CI to use Package.sh
2020-09-18 20:08:34 -05:00
nattthebear 507e818374 Fix the faust core so it actually runs again 2020-09-14 07:23:00 -04:00
nattthebear ddd229e03d Fix two mostly unrelated nyma settings issues
Mednafen has extra aliases of enum values that we don't need here and were confusing the system.  Now, NGP no longer has three different "English" options for language.
Internal Mednafen code expects MDFN_GetSettingB ("bool") to work with enum values, so long as those enums are 0 and 1, but we weren't handling that.

Fixes #2385
2020-09-10 08:05:11 -04:00
nattthebear 6047a12ad8 Rework and fix up invisible allocations and sound/video format init in nyma cores.
See the submodule commits for the tech details.  Fixes #2365.  As a side effect, Faust state sizes should be moderately smaller now.
2020-09-07 11:08:09 -04:00
nattthebear 25bdeb7f69 Use alloc_plain to allocate the md_cart space so it will be writable if needed
This lets us support mapper32k_w without needing extra hacks.  Because of lazystates, this doesn't hurt us on state size either (lazystates did not exists when we did 722358c1b1
2020-08-07 07:17:14 -04:00
Sappharad db0f2a65a1 Migrate to latest GPGX MD Cart mapper support 2020-08-06 21:40:43 -05:00
zeromus eee7d52c80 add waterbox readme notes concerning autocrlf and submodules 2020-08-06 15:56:05 -04:00
nattthebear 9600bc2ce0 ps2 - add fenv support and recompile dobie with it
This isn't so great, and could lead to nondeterminism or abi violations depending on how things use fenv.  For now it's just a dobie experiment
2020-08-06 07:28:24 -04:00
nattthebear 3db2818eb2 Rework a waterbox script slightly 2020-08-05 22:33:23 -04:00
nattthebear 96bee60cda nyma -- only ask the frontend for firmwares the core actually requests
Fixes #2240
2020-08-01 09:16:01 -04:00
nattthebear 78bf2285fc
Waterbox: Add pseudo-thread implementation and experimental DobieStation (PS2) core (#2263)
Waterbox supports threads now, but they're not real threads on the host side because that's complicated and can be nondeterministic. Instead, everything is scheduled to share one host thread. This means that scheduling is actually cooperative and certain patterns of spinlocks and other nonsense can fail to work at all, but "regular" code probably will.

With this, add DobieStation PS2 core. This core was selected because it has threads and is otherwise simple to port; easy to build and a good core/frontend separation. It's not a wonderful core however, with low speed (made abysmally lower by our lack of real threads) and low compatibility, so it remains a curiosity for now.
2020-08-01 07:03:29 -04:00
zeromus fd30826655 experimental ffmpeg downloading: in place of the ffmpeg encode settings is a download form. This downloads it to the prescribed local location. It then checks to make sure it is the EXACT required version -- the only version we support 2020-07-24 22:25:00 -04:00
nattthebear 1c606c1eb6 waterbox - expose read-only information about the guest memory page table 2020-07-23 16:08:24 -04:00
nattthebear 356abf6c43 Really, actually, truly fix the waterbox savestate snafu, probably
The description in the previous commit is accurate, but the problem runs deeper and was on the whole a complete failure for me to appreciate the difference between active and swapped in on memoryblocks.  Bleeecch.
2020-07-23 15:20:04 -04:00
nattthebear e343f6bd26 Fix a complete savestate snafu in waterbox
This was broken by 175556529e, with two related issues:  When we allowed for some operations to happen even when the block is inactive, we didn't account for the fact that in swapin, the block technically is not active yet (the lock is not on the self), and similarly in swapout, the lock has already been moved out of self.  The former caused all memory areas to revert to RWX at the host OS level after a swap, so no dirty detection was done.  After the former was fixed, the latter caused saved costacks to still get missed.

At the same time we ran into a perfect storm with costacks on Windows; if a stack page is not yet dirty, but we hit a fault for something else, Windows will not call our VEH handler unless the TIB stack extents are satisfactory, since it needs userspace to fix up the TIB extents via VEH or SEH handler, but there's already an exception pending.
2020-07-23 13:30:58 -04:00
nattthebear 07c7c329d3
Experiment to speed up libco and hence libsnes (#2248)
The compiler now can fully inline the co_switch, and with most registers being specified as clobbers and not saved explicitly, the compiler can choose to save only what it needs to (we don't have to defensively save everything).

Practically speaking, the co_switch calls are usually inlined, but the functions they're in don't seem to be that big and don't make direct use of r12..r15 too much anyway, so (push r12..r15, switch, pop r12..r15) is a common emit.  But I see a miniscule FPS increase.
2020-07-22 16:13:19 -04:00
nattthebear c7e8744664 Add an extra exclamation point to indicate that code is VERY IMPORTANT
This broke any waterbox core that called in to native code in the same EnterExit() right after sealing.  All nyma cores were broken, 32x was not, didn't check the rest.  Regressed in 175556529e.

It worked fine in release mode, theoretically
2020-07-18 11:54:05 -04:00
nattthebear 175556529e waterboxhost refactor
Set up a second mirror of guest memory; easily accomplished because we were already using memfd_create / CreateFileMappingW.
This lets us simplify a lot of host code that has to access guest memory that may not be active right now, or might have been mprotect()ed to something weird.  Activate is only needed now to run guest code, or when the C# side wants to peer into guest memory for memory domains and such (waterboxhost does not share the mirror address with the C# side).
2020-07-13 19:38:29 -04:00
nattthebear beb51ab286 Fix a linux waterbox-releated crash
Repro steps:
1) Load any waterbox core
2) Do anything that would trigger a NullReferenceException on C# side that you'd normally expect to be caught
2020-07-12 11:03:12 -04:00
nattthebear d354faeec1 probably fix linux waterbox issue 2020-07-12 07:49:18 -04:00
nattthebear 4639c1f2ca minor cleanup of calling convention adapters
sync the generator code with the generated code, remove useless endbr64 shit
2020-07-11 11:09:48 -04:00
nattthebear b0e6174467 minor cleanup 2020-07-08 13:54:47 -04:00
nattthebear a67fa70632 waterbox linux - rework to avoid possible memory leak
Bizhawk never would hit this because it only ever runs waterboxes in one host thread, but an application that spun up many threads and ran waterboxes in each would leak 32 bytes of heap for each native thread destroyed, which is super duper not really meaningful at all
2020-07-08 07:22:15 -04:00
nattthebear c8985e3007
Waterbox: Stack Marshalling (#2209)
Waterbox guest code now runs on a stack inside the guest memory space. This removes some potential opportunities for nondeterminism and makes future porting of libco-enabled cores easier.
2020-07-07 17:48:12 -04:00
nattthebear 3a18f6356d Rebuild all of waterbox as sysvabi, not msabi
This helps linux at the expense of windows, except it seems like windows gets a nice little speed up as well
2020-07-03 18:21:48 -04:00
nattthebear 2ee3125724 Refactor gpgx init method to use fewer arguments
Upcoming waterbox changes will likely limit the number of arguments a function can take to 6, which should be enough for anybody
2020-07-03 13:24:54 -04:00
nattthebear fa5885d7a1
Rewrite WaterboxHost in rust. (#2190)
This replaces the old managed one.  The only direct effect of this is to fix some hard to reproduce crashes in bsnes.

In the long run, we'll use this new code to help build more waterbox features.
2020-07-03 11:45:59 -04:00
nattthebear c1caa3e346 More crusty progress 2020-06-28 10:21:36 -04:00
nattthebear 6ff2d801e6 memoryblock experiments continue 2020-06-23 15:01:49 -04:00
nattthebear 92525576cc more krusty krab 2020-06-22 18:15:11 -04:00
nattthebear b0007c83f4 more musings 2020-06-21 14:09:38 -04:00
zeromus 687704dc3c updated waterbox docs 2020-06-20 20:13:00 -04:00
zeromus 316aafed40 ss and pcfx dirs can be whacked (they belong to numa now) 2020-06-20 20:13:00 -04:00
zeromus 2fc8b91e45 rename pce and pce-fast to turbo and hyper 2020-06-20 20:12:46 -04:00
zeromus 27f9a70085 clean nyma zlib building stuff 2020-06-20 20:12:45 -04:00
nattthebear 3f6ffeb573 krusty 2020-06-20 18:07:17 -04:00
nattthebear 440a340cb5 remove what should have been ignored 2020-06-20 13:49:58 -04:00
nattthebear be81bc12c2 more wip 2020-06-20 10:30:41 -04:00
nattthebear 4f09ffcda9 doc cleanup 2020-06-20 05:59:43 -04:00
zeromus b842f3ed16 remove cgc (step 1) 2020-06-20 00:48:42 -04:00
nattthebear ffcb7cefb1 Move llvm to submodule 2020-06-19 20:56:17 -04:00
nattthebear ee6c2ba679 Watch babby's first rust program... one commit at a time
Working on some ideas to potentially replace WaterboxHost
2020-06-19 20:56:16 -04:00
nattthebear 23f8c2bbe6 waterbox: move location of llvm-project 2020-06-18 14:06:23 -04:00
nattthebear ecdfc66617 nyma big setting update
Moves a lot of settings around, hopefully addressing some concerns
2020-06-14 16:02:33 -04:00
nattthebear a28f2b2a45 waterbox buildscript changes 2020-06-14 12:35:18 -04:00
nattthebear 7ba3f6db03 saturn - fix crash in dead or alive
It does look pretty awful with interlacing, but that's not something bizhawk is equipped to solve at present
2020-06-14 10:15:05 -04:00
nattthebear f2b461bed1 nyma - overhaul some input stuff to support some more things
saturn guns and keyboards now work
2020-06-13 18:19:41 -04:00
nattthebear f2b79bb0c1 Fix saturn compilation issue
fixes #2124
2020-06-12 13:20:04 -04:00
nattthebear 8c06de56c2 saturn - support lag flag again 2020-06-11 14:47:26 -04:00
nattthebear f14dace4a0 Move saturn over to nyma, get latest version. 2020-06-11 12:17:10 -04:00
nattthebear 69e30ee33f Decrease state size in pcfx, pce, pce-fast 2020-06-09 10:09:17 -04:00
nattthebear 9bb56f0b5c move pcfx to nymacore 2020-06-09 08:15:06 -04:00
nattthebear 11e1019590 nyma -- support cd switching
motorcycle shifter, but neutral is before 1st instead of between 1st and second
Yes, I had to rebuild the non cd cores here, and I am sorry
2020-06-08 20:24:30 -04:00
nattthebear b11b50a950 all nyma cores: support constant size framebuffer
this will do lossless integer scaling using mednafen provided screen geometry data
2020-06-08 13:05:31 -04:00
nattthebear 2952ac24aa savestates on waterbox 2020-06-07 09:26:08 -04:00
nattthebear aa48af9c94 linux: support gpgx
as before, do not load state even if your life depends on it
2020-06-06 18:25:59 -04:00
nattthebear 4d3ef71c8a Remove some old junk 2020-06-06 16:18:06 -04:00
nattthebear dcaf504202 Some progress on loonix waterbox
It doesn't work
2020-06-06 14:39:55 -04:00
nattthebear b3c3a3a4bb waterbox sgb sameboy - fix stereo audio
WHOOPS
2020-06-06 07:55:21 -04:00
nattthebear 7792eb2e80 Improve waterbox "lazystates"
Cores that used the .invisible section to store data were saving it; this was a regression from before, so PCFX states should be back down to the previous release size, or perhaps a bit smaller.

Add the ability to dirty track libco cothreads, as used in the bsnes core.  This saves a lot of space in those states and they're now quite competitive in size.
2020-06-04 12:13:28 -04:00
nattthebear 3bc1ed4bbc snes9x - take advantage of new waterbox change tracking to fix special chip games 2020-06-03 19:25:58 -04:00
nattthebear 842a7df215 waterbox: minor makefile tweak
allows fiddling with linkscript to be easier
2020-06-03 17:57:31 -04:00
nattthebear 6e366b7590 waterbox libsnes cothreads: set TEB/TIB stuff
some bsnes cothreads call callbacks that hit managed threads.  We shouldn't do that, but we do, and sometimes those threads run MSVC's __stkchk which can, depending on circumstances, blow up if the thread extents aren't set.

This also means that we cannot save space on a lot of cothread stacks because __stkchck will blow up any detection guards we try
2020-06-03 15:48:06 -04:00
nattthebear 69ade58d2a waterbox: enable -fcf-protection=none, recompile pce fast 2020-06-03 12:16:18 -04:00
nattthebear 885b86e1b2 waterbox: add the ability to compile but not assemble individual files for debugging purposes 2020-06-03 12:02:56 -04:00
nattthebear d06ed05929 waterbox - track writes for smaller savestates
The waterbox system now uses host os facilities to track whether memory has been written to, to automatically choose what thing to savestate.  This results in a large size decrease for some cores, like snes9x or gpgx (when running cartridge games).  Doesn't do much for cores that were already memory efficient, or for bsnes because of libco compatibility issues; but those cores don't regress either.
2020-06-03 07:13:40 -04:00
nattthebear d57e3d768a commit new builds of all the nyma cores because of something i changed with faust
fixes #2083 (presumably?  the user didn't provide any description so i'm not sure)
2020-06-01 12:18:15 -04:00
nattthebear 474d41bd8a add mednafen's pce fast core
~1.6x the speed of the mednafen pce core, or something
Supports all of the same features except ADPCM ram view
TODO: romloader hookups
2020-06-01 11:23:18 -04:00
nattthebear 6c9b42a526 faust: Support MT renderer
and who said waterbox can't thread.  well, it sort of can't.  but it sort of can.

the speedup isn't that great, but speed is now pretty close (5%?) to snes9x in the only game that matters (final fantasy 5)
2020-05-31 11:53:15 -04:00
nattthebear a87fc36e39 Update some docs
For the external cores, I simply listed whatever the release build we have right now built them with.  There are other makefiles and such hanging around...
2020-05-30 19:13:27 -04:00
nattthebear 6938c07708 nyma - enable inline avx, and recompile cores that used it
allegedly worth a speedup on faust and pce.  didn't notice any change, but it's not slower
2020-05-30 19:13:27 -04:00
nattthebear 1711914488 snes faust: enable SA1 IRAM as a memory domain 2020-05-30 17:05:55 -04:00
nattthebear 0085fee935 faust - memory domains, input callbacks, lag flags 2020-05-30 11:09:26 -04:00
nattthebear 5e3971a87b Add mednafen snes "faust" core
Speed somewhere between shizzlenineizzle and byuugan.  Some things not hooked up yet.
2020-05-29 20:04:39 -04:00
nattthebear de25b53fe2 Use google flatbuffers for some waterbox core communication
Nyma cores have to move some big complex structs on init and it's annoying and error prone.  This solution is not fast, but these are one time transfers anyway, and it does keep code size and saved size down.  Architecture yay.
2020-05-29 18:03:01 -04:00
nattthebear 978b2dd247 Remove all files for the old unmanaged ngp waterbox core
It's been fully integrated into nyma now
2020-05-27 19:43:35 -04:00
nattthebear 2afe356fc9 Move ngp over to nyma core and update to latest mednafen
It's seen some upstream updates recently, so that's cool
2020-05-27 19:33:31 -04:00
nattthebear 287e78a5a9 pce - add input callback
forgot this
2020-05-27 16:01:53 -04:00
nattthebear 0295f7472b PCE enhancements
Moderate savestate size reduction.  Build system changes.
2020-05-27 15:23:40 -04:00
nattthebear b0620ca79d PCE tweaks
finish up memory domains
make bram behave like pcehawk, instead of giving it to every game, only give it to games that had it
finish up ppu view
2020-05-27 07:35:51 -04:00
nattthebear 0891e448d7 mednapce - lag flag, some more memory domains, some ppu view work 2020-05-26 21:23:52 -04:00
nattthebear 6da864f4f7 waterbox: fix linker script putting __eh_frame_hdr_start in the wrong place
This was benign, because libunwind will ignore a frame header it doesn't understand (__eh_frame was still fine).  But now there's no spew in the console.  And over the next 50 years it will save a combined 0.3 seconds of cpu time
2020-05-25 21:02:01 -04:00
nattthebear f9b5b9e374 pce - implement most memory domains our existing core does
The mednafen debugger system makes this easy, unfortunately that has a lot of other baggage, so do it this way
2020-05-25 12:49:36 -04:00
nattthebear bc8d298a88 support pce-cd and sgx in nyma 2020-05-25 12:49:34 -04:00
nattthebear 8c9f4e24d8 settings infra 2020-05-25 12:49:34 -04:00
nattthebear 0caa087684 recompile all remaining existing cores that weren't compiled since the linkscript change 2020-05-25 12:49:33 -04:00
nattthebear 69d3dbc35f pce: basic rom loading and playing works 2020-05-25 12:49:33 -04:00
nattthebear 257aa991fd progress, or regress, or somegress 2020-05-25 12:49:33 -04:00
nattthebear 24286be735 Linking and unwinds
The goal here is to provide an unwind implementation that works.  We (probably) don't have a working ldso, so reconfigure libunwind to work without that.  To do that, it needs __eh_frame_* variables which it can addressof to find the locations of .eh_frame and .eh_frame_hdr.  There is no way I could get gold to add these at all, so switch back to ld and add a custom linkscript.  The custom linkscript gives us the opportunity to simplify the savestate memory mapping stuff inside ElfLoader, which should knock a bit of time off of state loads -- those VirtualProtect calls are not cheap.  This also removes a potential source of nondeterminism with certain clever out of range pointers.

Any waterbox core that I didn't recompile for this commit will assert now until it is recompiled, because .wbxsyscall is in the wrong palace.
2020-05-25 12:49:32 -04:00
nattthebear a213423efd recompile libcxx and friends with nopic nopie, and recompile libsnes to test it out
once again, roughly 10% filesize savings.  seems to be about 3% faster too
2020-05-25 12:49:32 -04:00
nattthebear c8d558a275 fix set_thread_area + get_thread_area, recompile libc nopic nopie
So far I've only recompiled gpgx against the new libc, but I get a 10% smaller wbx file, which is cool
2020-05-25 12:49:32 -04:00
nattthebear 0f65351e13 Marching onward 2020-05-25 12:49:31 -04:00
nattthebear 2de9c1d117 Teach yourself C++ in 5000 easy crashes 2020-05-25 12:49:31 -04:00
nattthebear 39c0402bd8 Starting to work on some api stuff
ngp only for now
2020-05-25 12:49:31 -04:00
nattthebear 9f358bc8cc pcfx compiles 2020-05-25 12:49:31 -04:00
nattthebear 9fe80952ff zlib blah blah 2020-05-25 12:49:30 -04:00
nattthebear fa139cbcf8 lynx and wonderswan compile
At least one of these is in need of upstream updates, so maybe we waterbox them, maybe we don't
2020-05-25 12:49:30 -04:00
nattthebear e892dcef82 milestone: vb and ngp compile 2020-05-25 12:49:30 -04:00
nattthebear 311b549b6f Add mednafen sobmodule 2020-05-25 12:44:22 -04:00
nattthebear 7bda234fe1 Port upstream gpgx commit
56f3d64265

Theoretically fixes https://github.com/TASVideos/BizHawk/issues/1390 but I haven't tested it
2020-05-21 10:39:59 -04:00
nattthebear 3b207f54ce 32x - fix crash, fixes #1826
Trigger condition:  Any 32x rom smaller than 4MB in total size that tries to read out of bounds between its actual end and the 4MB limit

I've fixed the emulator crash, but I do not know if such roms are actually mirroring correctly - they probably aren't
2020-05-21 10:04:12 -04:00
nattthebear 21cdf5120b
Revamp waterbox build environment and runtime. (#2027)
Create an all new waterbox build environment:
WSL2 + Ubuntu 20.04 LTS (Other linuxes may work)
Musl libc with waterbox customizations
LLVM's libclang-rt, libunwind, libcxxabi, libcxx
Static linking to elf files

Compared with the old system, this is easier to set up a dev env for and easier to update in the future. The executables are larger but produce smaller savestates due to static linking. The modern toolchain means advanced library features and language features that sometimes appear in some upstream cores will be reusable.
2020-05-20 15:34:24 -04:00
feos e075012b70
Rundum (#2019)
fix #1701
fix #1285

Co-authored-by: nattthebear <goyuken@gmail.com>
2020-05-18 21:11:18 +03:00
nattthebear 00aebc110c
Fix 3 band equalizer in Genesis (#2008)
If you tried setting your gains to 100 in the previous patch, it worked sort of, but I decided to incorporate ekeeke/Genesis-Plus-GX@f6f4556 as well to actually fix it completely, and rescale the setting properly so that 1.0 really is neutral gain.

Fixes #1319
2020-05-14 20:29:02 -04:00
nattthebear a040e67c95
Add option to force sram in genesis core (#1991)
gpgx upstream automatically gives 64KiB sram to every game of size 2MB or lower, unless specifically overrided.  That sucks and we don't do it.  But some games do need it; there's not enough information to autodetect otherwise.  So add a flag that we can set in gameDB for it, and set it true for two known games that have problems otherwise.
2020-05-09 13:48:46 -04:00
nattthebear 722358c1b1
Fix pokeymans pirate roms on gpgx (#1986)
mapper_32k_w expects to be able to write to rom area, so those roms now need larger savestate space
We could be extra clever and alloc_invisible the space and then restore after loadstate, but this pokeymans garbage doesn't deserve that work
2020-05-06 09:39:51 -04:00
nattthebear 061410a097
Pull in some GPGX fixes from upstream (#1971)
Fixes #1916
Fixes #1968

Pulls in 4017d379e6
Pulls in 147ad71a3c
Pulls in (more or less) a modified form of 200f9a7349
2020-05-02 10:57:42 -04:00
zeromus e7a1638e00 SNES CDL - set DMAData flag for dma reading rather than leaving nonsense flags (fixes #1409) 2020-01-22 22:01:04 -05:00
zeromus c2c526e84b CDL: fix bsnes SGB cdl totally not working (fixes #1344) 2020-01-19 18:43:54 -05:00
zeromus fd960e03fe CDL: add CARTROM logging for many more cases, including superfx (should fix #1597) 2020-01-19 18:43:54 -05:00
zeromus c7dbed306a add build.sh 2020-01-19 18:43:54 -05:00
zeromus a5e8ae88ed add cpu X and M flags to CDL for ExecFirst (fixes #1410, I hope) 2020-01-19 18:43:54 -05:00
zeromus 6577c7b71a makefile to build all waterbox cores 2019-12-24 14:29:28 -05:00
alyosha-tas c6c5217c97 O2Hawk: initial functionality, also remove O2EM 2019-12-17 12:09:58 -05:00
feos 20f10b9311 bsnes: remove embarrassing leftover empty space from trace log
requires rebuilding
2018-05-21 22:25:34 +03:00
nattthebear ebd6408315 add h, v regs to snes regs list 2018-05-18 17:35:28 -04:00
nattthebear fe85175619 Fix Issue #1048: Flags on memory domain in picodrive 2017-11-13 21:12:27 -05:00
adelikat 635c1cdd05 Merge branch 'domainedmemoryhooks' of https://github.com/TASVideos/BizHawk into domainedmemoryhooks 2017-10-29 12:40:52 -05:00
nattthebear 148cadda72 Fix issue #1009: sameboy: stack pointer saved in init state 2017-09-29 18:07:50 -04:00
nattthebear 148e40b504 Fix stack overflow in printer callback 2017-08-29 18:16:02 -04:00
nattthebear 0c3e18efb1 Could you use these things to print like, boobs? 2017-08-29 18:16:02 -04:00
nattthebear d990226a26 human build bot has completed! 2017-08-24 21:10:32 -04:00
zeromus b868c07a10 blind commit: add SMP hooks to bsnes to test hook scoping system (need to build a waterbox to proceed) 2017-08-23 10:08:43 -04:00
nattthebear c001a1add5 saturnus - Port fix from Mednafen Team to fix super tempo 2017-08-20 20:42:07 -04:00
nattthebear 36a84bd0dd Fix savestate hash match issue with Saturnus 2017-08-13 17:21:00 -04:00
nattthebear da88560815 sameboy: Fix some sgb audio issues in donkey kongs. Two problems: One, due to the HLE startup, DK starts writing audio data too early and sticks the SPC in a bad state. Two, the full transfer format for SOU_TRN doesn't seem to be documented anywhere; it's acutally a 0-terminated list of regions to upload; not just a single region. 2017-07-22 14:22:46 -04:00
nattthebear 569730a61b picodrive: region select. closes #929 2017-07-22 10:55:17 -04:00
nattthebear fcfe2b23c9 Pizza Boy makes some interesting attempts, but doesn't stack up against the serious GB cores 2017-07-21 18:23:14 -04:00