Commit Graph

815 Commits

Author SHA1 Message Date
nattthebear 0caa087684 recompile all remaining existing cores that weren't compiled since the linkscript change 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 a1ce5e514c Some changes, most notably syscall cleanup 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
TiKevin83 deb6c369c4 Cleanup VRAM access glitch 2020-05-24 15:29:01 -05:00
TiKevin83 9768abbb35 This seems to make the VRAM access quirk work in Wario Land II as well as the testROMs 2020-05-22 09:43:37 -04:00
TiKevin83 5a7c198d46 cleanup 2020-05-22 09:28:36 -04:00
TiKevin83 2eb321a495 Fix a testROM that avoids the quirk when in double speed mode 2020-05-22 09:16:51 -04:00
TiKevin83 9e33f5f6db Fix VRAM end of line testROM and a desync in GB Wario Land II 2020-05-21 11:41:37 -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
feos d37de2e524 mgba got lost in the forest 2020-05-07 18:12:44 +03: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
adelikat 8c17ac8da9
Remove vba-next (#1969)
* remove vba-next c code

* decouple mgba code from vbanext stuff

* delete vbanext C# core

* rip out gba core picker

* remove reference to VBANext from .csproj file

* consolidate
2020-05-02 15:30:58 -05: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
SuuperW ac2d5d7aac update libmelonDS.dll with a few fixes 2020-05-02 08:47:37 -05:00
zeromus 9b19da24a0 update octoshock.dll to match mednafen latest. (very tiny changes only in spu, shouldnt invalidate any prior testing) 2020-05-01 17:18:56 -04:00
TiKevin83 99d06d8479 GBA as GBC mode is only relevant on GBC 2020-04-27 15:35:09 -04:00
feos da584d1a6e update mgba to latest master (past 0.8.1) 2020-04-25 10:43:00 +03:00
SuuperW ebc49db08f update libmelonDS.dll 2020-04-23 13:12:22 -05:00
SuuperW a57d09fe99 add some setters for MelonDS 2020-04-13 12:26:42 -05:00
SuuperW c958afceb0 update libmelonDS.dll with hi-res support, and allow changing that setting
does not display properly yet
2020-04-13 12:07:05 -05:00
adelikat 7c79cfab67 mGBA - implement IDebuggable.SetCpuRegister() 2020-04-11 12:57:47 -05:00
zeromus 46c58c2172 update octoshock dll 2020-04-09 16:13:41 -04:00
zeromus 48a62943f1 new dll 2020-04-07 23:53:40 -04:00
zeromus b53eec452a update octoshock dll 2020-04-06 03:40:17 -04:00
SuuperW ca9e12a929 update libmelonDS.dll 2020-03-25 14:10:24 -05:00
SuuperW bcc4fb0bab update libmelonDS.dll to work with previous commit 2020-03-22 18:43:42 -05:00
SuuperW c59d8130bb
DS Hawk (#1884)
* Add MelonDS.cs, support opening (but not really) .nds files.

* init MelonDS

* MelonDS: Load selected ROM.

* MelonDS: FrameAdvance and frame counter.

* MelonDS: IVideoProvider

* MelonDS: Add DLL files.

* MelonDS: IInputPollable

* MelonDS: IStatable (and add forgotten file MelonDS_InputPollable.cs)

* update libmelonDS.dll

* MelonDS: ISoundProvider

* Add NDS to Global.SystemInfo, and convert screen coords when running NDS.

* set up default NDS controller

* MelonDS: ISaveRam

* MelonDS: remove romlist.bin

* MelonDS: ISettable

* Create firmware folder if it doesn't exist on Windows; otherwise, an exception is thrown.

* Add database entries for NDS bios/firmware files.

* MelonDS: Use the bios/firmware files selected in BizHawk's "Firmwares" dialog.

* MelonDS: Re-work sync settings a bit.

* NDS's firmware file contains user settings; these are over-written by sync settings, so we shouldn't allow them to impact the hash

* MelonDS: Add (currently unused) bootToFirmware sync setting, and NDSSettings dialog.

* Update NDS firmware hash; it seems I had somehow corrupted mine.

* MelonDS: Use boot to firmware sync setting.

* MelonDS: Allow user to set some firmware user settings via the NDS settings dialog.

* MelonDS: Add singleInstance attribute to core.

* MelonDS: IMemoryDomains

* update libmelonDS.dll

* MelonDS: Set up default sync settings if none are provided.

* MelonDS: Allow user to reset settings to default.

* MelonDS: bios+firmware files are recommended

* libmelonDS.dll

* MelonDS: Don't use real time.

* MelonDS: Update to reflect new way of handling RTC in MelonDS.

* MelonDS: Notify if savestate load failed.

* update MelonDS.dll

* MelonDS: Allow user to set startup date/time in settings dialog.

* MelonDS: Create melon directory if it doesn't already exist.

* Don't include Designer's "fixes" in PR (partially reverts 56b474c00)

* Don't show a broken console window; alert user of need to restart instead.
This fixes an error related to MelonDS trying to use the broken stdout stream.

* update default NDS controls to match other updated controls

* Implement a system bus, using ARM9 read/writes.

* MelonDS: Allow BizHawk to change the contents of the frame buffer.

* update libmelonDS.dll

* fix stuff that was merged incorrectly, or was broken by merge

* update libmelonDS.dll
(includes memory leak fix)

* update libmelonDS.dll
(fixes memory leak and an occasional savestate crash)

* fix stuff that broke with the merge

* cleanups, remove stuff that is no longer needed by service interaces

* simplify DS MemoryDomains

* DS - fix order of controller buttons to be consistent with other consoles.  This probably breaks any existing movies made on this core, but those would have been experiments, right?

* NDSSettings - make min value for day and month 0, whiel those aren't "valid" values they are the default values in the core for whatever reason, better to not crash on load and not show a value that isn't actually the setting.  This can easily be reverted if the core changes to default to 1

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: adelikat <adelikat@tasvideos.org>
2020-03-21 10:53:30 -05:00
TiKevin83 7e37fb2540 fix MBC1 games like Pinocchio that need adjustedRombank 2020-03-13 00:39:39 -04:00
feos b07f8db8c9 update mgba to fix desyncs 2020-02-27 21:44:28 +03:00
feos 0a81dac965 add mem watchpoints to mgba 2020-02-22 14:28:45 +03:00
TiKevin83 dc143c3d96 fix Pokemon Crystal (JP) 2020-02-18 17:34:49 -05:00
TiKevin83 9d0cd2bbf4 clean up some stray fields missing from the savestate system 2020-02-17 21:09:16 -05:00
TiKevin83 612e1ef800 temp fix for traceback PC__READ_FIRST() calls conflicting with the prefetch fixes from upstream 2020-02-17 14:52:41 -05:00
TiKevin83 3b804b789a Update libgambatte platform target for building on windows 10 2020-02-17 14:49:49 -05:00
zeromus 758a3e0f15 new octoshock dll 2020-02-09 23:50:45 -05:00
feos ca33a0ac9d it actually makes sense to commit things you wanna test 2020-02-04 11:09:57 +03:00
feos 8ff2ca2cd1 update gliden
bugs I saw in perfect dark seem to be present in the previous update too, so ugh
2020-02-04 10:27:10 +03:00
feos 277b302437 tweak mgba hooking 2020-02-04 10:27:09 +03:00
alyosha-tas ec3506ab29
Add MSXHawk DLL 2020-02-03 17:27:44 -05:00
feos 16045e35fc add EXP void BizSetExecCallback(void(*callback)(uint32_t pc)) to mGBA 2020-02-03 22:51:34 +03:00
feos 335a55306f mGBA trace logging 2020-02-03 12:50:41 +03:00
feos e83f3717ad rebuild mgba without mgba-util/dllexports.h dep 2020-02-01 11:48: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 7a903f15df update mupen dlls to remove msvcr 2013 dep.
note, I did a sloppy job here.
1. The mupen projects werent upgraded
2. I didn't commit the libs from the upstream mupen deps repo
3. I renamed some of the dlls from the upstream mupen deps repo to match what we expected on account of using the old libs
4. zlib is here twice because the new libpng16.dll depends on zlib.dll and our mupen parts depend on zlib1.dll/freetype26.dll

but this will do the job until the great mupen update probably
2020-01-20 17:26:30 -05:00
zeromus 03b6f6cb21 new bsnes wbx.gz 2020-01-19 18:43:54 -05:00
YoshiRulz 692eb5ea89
Add HelloWorld tool to repo, add build scripts, fix bugs in HelloWorld 2020-01-17 06:17:59 +10:00
feos ca3d784f9c update mGBA to upstream master 2020-01-12 11:27:38 +03:00
MrCheeze b90f72c34d Implemented the remaining N64 R4300 trap instructions besides TEQ 2019-12-16 21:22:34 -05:00
MrCheeze 3f26d14eaa added SRAM and FlashRAM memory domain support for N64 2019-09-08 23:20:35 -04:00
feos 6742978e0b update gliden to release 4.0 2019-06-16 12:20:59 +03:00
feos 3a8b3361e3 minor tweak to mgba, update its version in hawk 2019-06-10 22:02:19 +03:00
feos 1ac27e3c25 update mgba to 0.7.2
might need some fixing
2019-06-09 13:39:46 +03:00
MrWint a93916e24c Gambatte core: Add RTC divisor offset support. 2019-06-02 13:24:54 +02:00
MrWint 73f4b0bf52 libgambatte: fix setTimeMode typo 2019-05-30 20:53:17 +02:00
MrWint cb7e0b0a82 libgambatte: Remove unused RTC callback 2019-05-30 20:16:54 +02:00
MrWint 7d33d604ae cycle-based RTC 2019-05-28 22:56:39 +02:00
MrWint d4f42d9f32 Make BG layer mask work properly for CGB 2019-05-28 17:42:30 +02:00
MrWint bc2ced1b7f More consistency, restore layer masks 2019-05-28 00:26:59 +02:00
MrWint 1547d324e7 libgambatte: fix interrupt execution anatomy 2019-05-26 20:24:58 +02:00
MrWint 7e851b19f3 Gambatte core: unify DMG and CGB bios handling 2019-05-26 20:11:50 +02:00
MrWint d8c238c9fb libgambatte: timar quirk accuracy 2019-05-26 19:40:19 +02:00
MrWint ca31e9ad72 libgambatte: Non-atomic interrupt handling 2019-05-26 19:29:17 +02:00
MrWint 9d266ce281 libgambatte: hang on invalid opcode 2019-05-26 19:19:39 +02:00
MrWint ae98698758 libgambatte: Refactor Memory 2019-05-26 14:17:22 +02:00
MrWint 51e8ba3cf5 libgambatte: refactor Tima 2019-05-26 12:46:17 +02:00
MrWint 79085f9a3a libgambatte: Remove unused saveState() functions 2019-05-26 12:36:08 +02:00
MrWint b58554f62e libgambatte: Remove unused interrupter 2019-05-26 12:33:32 +02:00
MrWint af42fbb714 Reformat gambatte.cpp 2019-05-26 12:22:53 +02:00
MrWint a79febdef9 Refactor cartridge code 2019-05-26 12:06:40 +02:00
MrWint 839c8abf54 Build x64 version 2019-05-26 10:52:18 +02:00
MrWint 92204d527f avoid bools in save state struct 2019-05-26 00:41:03 +02:00
MrWint a177b81b4b Update MinKeeper 2019-05-26 00:18:07 +02:00
MrWint 7b518d0cf7 Update InterruptRequester 2019-05-26 00:13:34 +02:00
MrWint 6036aefd13 Delete unused files 2019-05-26 00:02:49 +02:00
MrWint 2e4f68b29f more idiomatic types 2019-05-25 23:58:44 +02:00
MrWint 3d3de54485 video: formatting 2019-05-25 23:43:05 +02:00
MrWint 6bda071d5f rename MemEventId to IntEventId 2019-05-25 22:53:41 +02:00
MrWint 8247df4be5 pass intreq by ref 2019-05-25 22:37:59 +02:00
MrWint 40167579bb use ptrdiff_t to represent pitch 2019-05-25 22:28:23 +02:00
MrWint 6020542182 CPU refactoring 2019-05-25 22:11:58 +02:00
MrWint a6aeef840a Update PPU 2019-05-25 21:01:50 +02:00
MrWint b99b5a05d6 Update sound 2019-05-25 20:27:44 +02:00
MrWint 1dc9d0e123 allow mapping rom bank0 in more cases 2019-05-25 19:35:42 +02:00
MrWint 85ad140a2c ppu: less magical lcdc constants 2019-05-25 19:29:59 +02:00
MrWint 567756d6cc formatting/readability 2019-05-25 19:18:15 +02:00
MrWint 98076d286d return more informative load result 2019-05-25 18:58:49 +02:00
MrWint a3ee854022 more ideomatic use of sizeof 2019-05-25 18:27:08 +02:00
sornerol bfa8f20cf9 Set state.spu.ch1.master = true (Fixes #1539)
This fixes #1539. Prior to 2.2.2, state.spu.ch1.master was set to false when using a BIOS. Starting with 2.2.2, the Game Boy BIOS is required. Setting this to true causes a buzzing sound while the Nintendo logo drops during BIOS.
2019-05-13 13:45:27 -05:00
feos c3c262db12 N64:
- close #1478
- update gliden
- wire up halo removal
2019-03-10 16:15:55 +03:00
feos 104e40d8b5 update gliden64 2019-01-29 13:47:40 +03:00
zeromus cc532a2988 update nlua.dll with one built with optimization 2019-01-09 16:21:00 -05:00
feos 40d0ddb1c2 update gliden 2018-12-23 18:33:06 +03:00