Merge branch 'master' (early part) into medusa

This commit is contained in:
Vicki Pfau 2022-05-30 17:30:50 -07:00
commit a13099520c
182 changed files with 8764 additions and 6184 deletions

View File

@ -4,17 +4,15 @@ platform:
- x64
configuration:
- Release
cache:
- C:\Tools\vcpkg
install:
- git -C C:\Tools\vcpkg clean -dfq docs ports scripts toolsrc triplets versions
- git -C C:\Tools\vcpkg pull --force --quiet
- C:\Tools\vcpkg\bootstrap-vcpkg
- vcpkg --triplet x64-windows --recurse install ffmpeg libepoxy libpng libzip sdl2 sqlite3
- vcpkg --triplet x64-windows-release --recurse install ffmpeg libepoxy libpng libzip sdl2 sqlite3
- vcpkg --no-dry-run upgrade
- rd /Q /S C:\Tools\vcpkg\buildtrees
before_build:
- cmake . -DCMAKE_PREFIX_PATH=C:\Qt\5.12\msvc2017_64 -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake
- cmake . -DCMAKE_PREFIX_PATH=C:\Qt\5.15\msvc2019_64 -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_CONFIGURATION_TYPES=Release
build:
parallel: true
project: medusa.sln

20
CHANGES
View File

@ -53,13 +53,17 @@ Features:
- Additional scaling shaders
- Support for GameShark Advance SP (.gsv) save file importing
- Support for multiple saves per game using .sa2, .sa3, etc.
- New unlicensed GB mappers: NT (newer type)
- Support for GBX format Game Boy ROMs
- New unlicensed GB mappers: NT (newer type), Sachen (MMC1, MMC2)
Emulation fixes:
- ARM7: Fix unsigned multiply timing
- GB: Copy logo from ROM if not running the BIOS intro (fixes mgba.io/i/2378)
- GB Audio: Fix channel 1/2 reseting edge cases (fixes mgba.io/i/1925)
- GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032)
- GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes mgba.io/i/2402)
- GB Video: Draw SGB border pieces that overlap GB graphics (fixes mgba.io/i/1339)
- GBA: Improve timing when not booting from BIOS
- GBA: Fix expected entry point for multiboot ELFs (fixes mgba.io/i/2450)
- GBA BIOS: Work around IRQ handling hiccup in Mario & Luigi (fixes mgba.io/i/1059)
- GBA BIOS: Initial HLE timing estimation of UnLz77 functions (fixes mgba.io/i/2141)
- GBA DMA: Fix DMA source direction bits being cleared (fixes mgba.io/i/2410)
@ -71,15 +75,26 @@ Emulation fixes:
- GBA Video: Fix Hblank timing (fixes mgba.io/i/2131, mgba.io/i/2310)
- GBA Video: Fix rare crash in modes 3-5
Other fixes:
- 3DS: Ensure writes update file modification time (fixes mgba.io/i/2444)
- Core: Don't attempt to restore rewind diffs past start of rewind
- Core: Fix the runloop resuming after a game has crashed (fixes mgba.io/i/2451)
- FFmpeg: Fix crash when encoding audio with some containers
- FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
- GB: Fix temporary saves
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
- mGUI: Fix FPS counter after closing menu
- VFS: Failed file mapping should return NULL on POSIX
Misc:
- Core: Suspend runloop when a core crashes
- Debugger: Save and restore CLI history
- GB Video: Add default SGB border
- GBA: Automatically skip BIOS if ROM has invalid logo
- GBA: Refine multiboot detection (fixes mgba.io/i/2192)
- GBA Cheats: Implement "never" type codes (closes mgba.io/i/915)
- GBA DMA: Enhanced logging (closes mgba.io/i/2454)
- GBA Video: Implement layer placement for OpenGL renderer (fixes mgba.io/i/1962)
- mGUI: Add margin to right-aligned menu text (fixes mgba.io/i/871)
- mGUI: Autosave less frequently when fast-forwarding
- Qt: Rearrange menus some
- Qt: Clean up cheats dialog
- Qt: Only set default controller bindings if loading fails (fixes mgba.io/i/799)
@ -89,7 +104,10 @@ Misc:
- Qt: Add optional emulation-related information on reset (closes mgba.io/i/1780)
- Qt: Add QOpenGLWidget cross-thread codepath for macOS (fixes mgba.io/i/1754)
- Qt: Enable -b for Boot BIOS menu option (fixes mgba.io/i/2074)
- Qt: Add tile range selection to tile viewer (closes mgba.io/i/2455)
- Qt: Show warning if XQ audio is toggled while loaded (fixes mgba.io/i/2295)
- Windows: Attach to console if present
- Vita: Add bilinear filtering option (closes mgba.io/i/344)
0.9.3: (2021-12-17)
Emulation fixes:

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=600

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=1080

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,2 @@
[testinfo]
fail=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,2 @@
[testinfo]
fail=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

View File

@ -0,0 +1,2 @@
[testinfo]
fail=1

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

View File

@ -0,0 +1,3 @@
[testinfo]
skip=360
frames=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

View File

@ -0,0 +1,3 @@
[testinfo]
skip=600
fail=1

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=600

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=600

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=600

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=1080

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,2 @@
[testinfo]
fail=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,2 @@
[testinfo]
fail=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,2 @@
[testinfo]
fail=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

View File

@ -1,2 +1,3 @@
[testinfo]
skip=120
fail=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 528 B

View File

@ -0,0 +1,2 @@
[testinfo]
skip=180

View File

@ -116,7 +116,7 @@ typedef intptr_t ssize_t;
#define ATOMIC_LOAD_PTR(DST, SRC) ATOMIC_LOAD(DST, SRC)
#endif
#if defined(_3DS) || defined(GEKKO) || defined(PSP2)
#if defined(__3DS__) || defined(GEKKO) || defined(PSP2)
// newlib doesn't support %z properly by default
#define PRIz ""
#elif defined(_MSC_VER)

View File

@ -52,7 +52,7 @@ struct Address {
};
};
#ifdef _3DS
#ifdef __3DS__
#include <3ds.h>
#include <malloc.h>
@ -73,7 +73,7 @@ static inline void SocketSubsystemInit() {
#ifdef _WIN32
WSADATA data;
WSAStartup(MAKEWORD(2, 2), &data);
#elif defined(_3DS)
#elif defined(__3DS__)
if (!SOCUBuffer) {
SOCUBuffer = memalign(SOCU_ALIGN, SOCU_BUFFERSIZE);
socInit(SOCUBuffer, SOCU_BUFFERSIZE);
@ -92,7 +92,7 @@ static inline void SocketSubsystemInit() {
static inline void SocketSubsystemDeinit() {
#ifdef _WIN32
WSACleanup();
#elif defined(_3DS)
#elif defined(__3DS__)
socExit();
free(SOCUBuffer);
SOCUBuffer = NULL;
@ -168,7 +168,7 @@ static inline Socket SocketOpenTCP(int port, const struct Address* bindAddress)
memset(&bindInfo, 0, sizeof(bindInfo));
bindInfo.sin_family = AF_INET;
bindInfo.sin_port = htons(port);
#ifndef _3DS
#ifndef __3DS__
bindInfo.sin_addr.s_addr = INADDR_ANY;
#else
bindInfo.sin_addr.s_addr = gethostid();
@ -189,7 +189,7 @@ static inline Socket SocketOpenTCP(int port, const struct Address* bindAddress)
#else
err = bind(sock, (const struct sockaddr*) &bindInfo, sizeof(bindInfo));
#endif
#if !defined(_3DS) && !defined(GEKKO)
#if !defined(__3DS__) && !defined(GEKKO)
} else {
struct sockaddr_in6 bindInfo;
memset(&bindInfo, 0, sizeof(bindInfo));
@ -238,7 +238,7 @@ static inline Socket SocketConnectTCP(int port, const struct Address* destinatio
#else
err = connect(sock, (const struct sockaddr*) &bindInfo, sizeof(bindInfo));
#endif
#if !defined(_3DS) && !defined(GEKKO)
#if !defined(__3DS__) && !defined(GEKKO)
} else {
struct sockaddr_in6 bindInfo;
memset(&bindInfo, 0, sizeof(bindInfo));
@ -291,7 +291,7 @@ static inline Socket SocketAccept(Socket socket, struct Address* address) {
#else
return accept(socket, (struct sockaddr*) &addrInfo, &len);
#endif
#if !defined(_3DS) && !defined(GEKKO)
#if !defined(__3DS__) && !defined(GEKKO)
} else {
struct sockaddr_in6 addrInfo;
memset(&addrInfo, 0, sizeof(addrInfo));

View File

@ -23,7 +23,7 @@ CXX_GUARD_START
#include <mgba-util/platform/windows/threading.h>
#elif defined(PSP2)
#include <mgba-util/platform/psp2/threading.h>
#elif defined(_3DS)
#elif defined(__3DS__)
#include <mgba-util/platform/3ds/threading.h>
#elif defined(__SWITCH__)
#include <mgba-util/platform/switch/threading.h>
@ -32,7 +32,7 @@ CXX_GUARD_START
#endif
#endif
#ifdef DISABLE_THREADING
#ifdef _3DS
#ifdef __3DS__
// ctrulib already has a type called Thread
#include <3ds/thread.h>
#elif defined(__SWITCH__)

View File

@ -87,7 +87,7 @@ struct VDir* VDirOpenZip(const char* path, int flags);
struct VDir* VDirOpen7z(const char* path, int flags);
#endif
#if defined(__wii__) || defined(_3DS) || defined(PSP2)
#if defined(__wii__) || defined(__3DS__) || defined(PSP2)
struct VDir* VDeviceList(void);
#endif

View File

@ -31,6 +31,7 @@ enum mCheatType {
CHEAT_IF_LAND,
CHEAT_IF_NAND,
CHEAT_IF_BUTTON,
CHEAT_NEVER,
};
struct mCheat {

View File

@ -54,14 +54,15 @@ enum mCoreThreadState {
mTHREAD_INTERRUPTED,
mTHREAD_PAUSED,
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
mTHREAD_CRASHED,
mTHREAD_MAX_WAITING = mTHREAD_PAUSED,
mTHREAD_INTERRUPTING,
mTHREAD_EXITING,
mTHREAD_SHUTDOWN
mTHREAD_SHUTDOWN,
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
mTHREAD_MAX_WAITING = mTHREAD_CRASHED
};
enum mCoreThreadRequest {

View File

@ -44,6 +44,8 @@ enum GBMemoryBankControllerType {
GB_UNL_NT_NEW = 0x212,
GB_UNL_BBD = 0x220, // Also used as a mask for MBCs that need special read behavior
GB_UNL_HITEK = 0x221,
GB_UNL_SACHEN_MMC1 = 0x230,
GB_UNL_SACHEN_MMC2 = 0x231,
};
enum GBVideoLayer {

View File

@ -24,6 +24,12 @@ enum GDBStubAckState {
GDB_ACK_OFF
};
enum GDBWatchpointsBehvaior {
GDB_WATCHPOINT_STANDARD_LOGIC = 0,
GDB_WATCHPOINT_OVERRIDE_LOGIC,
GDB_WATCHPOINT_OVERRIDE_LOGIC_ANY_WRITE,
};
struct GDBStub {
struct mDebugger d;
@ -40,10 +46,12 @@ struct GDBStub {
bool supportsSwbreak;
bool supportsHwbreak;
enum GDBWatchpointsBehvaior watchpointsBehavior;
};
void GDBStubCreate(struct GDBStub*);
bool GDBStubListen(struct GDBStub*, int port, const struct Address* bindAddress);
bool GDBStubListen(struct GDBStub*, int port, const struct Address* bindAddress, enum GDBWatchpointsBehvaior watchpointsBehavior);
void GDBStubHangup(struct GDBStub*);
void GDBStubShutdown(struct GDBStub*);

Some files were not shown because too many files have changed in this diff Show More