Commit Graph

32 Commits

Author SHA1 Message Date
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
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
nattthebear 1c27943707 Make SNES rom memory domain writeable
Use at your own risk
2020-12-13 20:11:58 -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
nattthebear e892dcef82 milestone: vb and ngp compile 2020-05-25 12:49:30 -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
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
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 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 69ec6b2a73 remove some sound buffers from snes savestates 2017-06-14 18:56:24 -04:00
nattthebear 2eb4205a3b libsnes: remove some palette code that wasn't used by us. not sure what this was for. gets raw snes state size down to 5MB 2017-06-13 19:24:28 -04:00
nattthebear 668006fba0 arbitrarily slash the size of most libsnes cothreads significantly, decreasing overall state size from 10MB to 7MB 2017-06-11 20:33:58 -04:00
nattthebear edbe83bc13 libsnes: savestate uncompressed size 14MB=>10MB (for a game with nothing special) 2017-06-11 15:30:54 -04:00
nattthebear 8cf1e43e70 libsnes: move tile cache out of savestates. saves like 400kB. meh. 2017-06-11 11:28:29 -04:00
nattthebear ee026d0525 libsnes: Cleanup some dead code. Apparently the codebase contained a primitive attempt to implement savestates, but it contained significant bugs and had no use beyond toy projects. 2017-06-11 09:37:47 -04:00
nattthebear 5f2c5b0934 snes core is ready for business, I think 2017-06-10 20:01:07 -04:00
nattthebear 67ff767f95 libsnes: recreate the emu cothread at the end of init, to avoid pointer poison that was breaking xor state consistency. Big todo: all init functionality really needs to happen from the main thread, as there are many syscalls that reenter managed in that code, and reentering managed from a cothread stack is a Bad Thing 2017-06-10 19:51:59 -04:00
nattthebear ba7543c19a snes waterbox: fix a leaky pointer which was breaking xorstate integrity 2017-06-10 17:19:18 -04:00
nattthebear baf7a7973b snes: do some more savestate prep, including removing the unused cheat system, which cost sixteen megidobites of ram 2017-06-10 15:53:38 -04:00
nattthebear fcbb85a579 snes: move some stuff to sealed_heap 2017-06-10 15:20:06 -04:00
nattthebear f0ec682314 snes runs! sorta. 2017-06-10 14:16:25 -04:00
nattthebear 36be9e9fc7 snes: waterboxification phase 2 2017-06-10 14:16:25 -04:00
nattthebear 9975a05695 snes: waterboxification phase 1 2017-06-10 14:16:24 -04:00
nattthebear a7ef10322e snes: move files to waterbox area 2017-06-10 14:16:24 -04:00