Compare commits

...

6 Commits

Author SHA1 Message Date
Jan 9e9c827c44
Merge 88ff54ac3a into 92e10f31ea 2025-01-29 15:20:05 +00:00
Vicki Pfau 92e10f31ea Qt: Fix regression where loading BIOS creates a save file (fixes #3359) 2025-01-21 00:50:34 -08:00
Vicki Pfau 2dd11712db Python: Fix some missing constants (fixes #3402) 2025-01-21 00:33:42 -08:00
Vicki Pfau 7fe4f4593e GBA Savedata: Rename flash ID constants, add missing entries 2025-01-20 16:55:30 -08:00
Vicki Pfau 2c0e572841 CHANGES: Add missing entries 2025-01-20 00:26:05 -08:00
Jan200101 88ff54ac3a
Add AppStream Metainfo generation 2024-11-12 19:54:48 +01:00
9 changed files with 109 additions and 11 deletions

12
CHANGES
View File

@ -1,11 +1,17 @@
0.11.0: (Future)
Features:
- Forwarder support for 3DS and Vita
- Custom border support
- New option to lock the maximum frame size
- Memory access and information logging
- Scripting: New `input` API for getting raw keyboard/mouse/controller state
- Scripting: New `storage` API for saving data for a script, e.g. settings
- Scripting: New `image` and `canvas` APIs for drawing images and displaying on-screen
- Scripting: Debugger integration to allow for breakpoints and watchpoints
- New unlicensed GB mappers: NT (older types 1 and 2), Li Cheng, GGB-81
- Initial support for bootleg GBA multicarts
- Debugger: Add range watchpoints
- "Headless" frontend for running tests, automation, etc.
Emulation fixes:
- ARM: Add framework for coprocessor support
- GB Serialize: Add missing Pocket Cam state to savestates
@ -26,10 +32,12 @@ Other fixes:
- mGUI: Load parent directory if last used directory is missing (fixes mgba.io/i/3379)
- Qt: Fix savestate preview sizes with different scales (fixes mgba.io/i/2560)
- Qt: Fix potential crash when configuring shortcuts
- Qt: Fix regression where loading BIOS creates a save file (fixes mgba.io/i/3359)
Misc:
- Core: Handle relative paths for saves, screenshots, etc consistently (fixes mgba.io/i/2826)
- Core: Improve rumble emulation by averaging state over entire frame (fixes mgba.io/i/3232)
- Core: Add MD5 hashing for ROMs
- Core: Add support for specifying an arbitrary portable directory
- GB: Prevent incompatible BIOSes from being used on differing models
- GB Serialize: Add missing savestate support for MBC6 and NT (newer)
- GBA: Improve detection of valid ELF ROMs
@ -48,7 +56,11 @@ Misc:
- Qt: Show maker code and game version in ROM info
- Qt: Show a dummy shader settings tab if shaders aren't supported
- Qt: Allow passing multiple games on command line for multiplayer (closes mgba.io/i/3061)
- Qt: Support building against Qt 6
- Qt: Add shortcuts to increment fast forward speed (mgba.io/i/2903)
- Res: Port hq2x and OmniScale shaders from SameBoy
- Res: Port NSO-gba-colors shader (closes mgba.io/i/2834)
- Res: Update gba-colors shader (closes mgba.io/i/2976)
- Scripting: Add `callbacks:oneshot` for single-call callbacks
- Updater: Fix rewriting folders and files on Windows (fixes mgba.io/i/3384)

View File

@ -45,9 +45,13 @@ enum FlashStateMachine {
FLASH_STATE_CONTINUE = 2,
};
enum FlashManufacturer {
FLASH_MFG_PANASONIC = 0x1B32,
FLASH_MFG_SANYO = 0x1362
enum FlashId {
FLASH_ATMEL_AT29LV512 = 0x3D1F, // 512k
FLASH_MACRONIX_MX29L512 = 0x1CC2, // 512k, unused
FLASH_MACRONIX_MX29L010 = 0x09C2, // 1M
FLASH_PANASONIC_MN63F805MNP = 0x1B32, // 512k, unused
FLASH_SANYO_LE26FV10N1TS = 0x1362, // 1M
FLASH_SST_39LVF512 = 0xD4BF, // 512k
};
enum {

View File

@ -0,0 +1,48 @@
<?xml version='1.0' encoding='utf-8'?>
<component type="desktop">
<id>io.mgba.mGBA</id>
<name>mGBA</name>
<summary>Nintendo Game Boy Advance Emulator</summary>
<developer_name>endrift</developer_name>
<launchable type="desktop-id">io.mgba.mGBA.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MPL-2.0</project_license>
<description>
<p>mGBA is an emulator for running Game Boy Advance games. It aims to be faster and more accurate than many existing Game Boy Advance emulators, as well as adding features that other emulators lack. It also supports Game Boy and Game Boy Color games.</p>
<p xml:lang="de">mGBA ist ein Emulator für Game Boy Advance-Spiele. Das Ziel von mGBA ist, schneller und genauer als viele existierende Game Boy Advance-Emulatoren zu sein. Außerdem verfügt mGBA über Funktionen, die anderen Emulatoren fehlen. Zusätzlich werden auch Game Boy- und Game Boy Color-Spiele unterstützt.</p>
<p xml:lang="es">mGBA es un emulador para juegos de Game Boy Advance. Su objetivo es ser más rápido y más preciso que muchos emuladores de Game Boy Advance existentes, además de añadir funciones que otros emuladores no tienen. También es compatible con juegos de Game Boy y Game Boy Color.</p>
<p xml:lang="zh_CN">mGBA 是一个运行 Game Boy Advance 游戏的模拟器。mGBA 的目标是比众多现有的 Game Boy Advance 模拟器更快、更准确并增加其他模拟器所缺少的功能。mGBA 还支持 Game Boy 和 Game Boy Color 游戏。</p>
</description>
@APPSTREAM_RELEASES@
<url type="homepage">https://mgba.io</url>
<url type="bugtracker">https://github.com/mgba-emu/mgba/issues</url>
<url type="faq">https://mgba.io/faq.html</url>
<url type="donation">https://patreon.com/mgba</url>
<url type="translate">https://hosted.weblate.org/engage/mgba</url>
<url type="vcs-browser">https://github.com/mgba-emu</url>
<url type="contribute">https://github.com/mgba-emu/mgba/blob/master/CONTRIBUTING.md</url>
<categories>
<category>Game</category>
<category>Emulator</category>
</categories>
<supports>
<control>pointing</control>
<control>keyboard</control>
<control>gamepad</control>
</supports>
<content_rating type="oars-1.1"/>
<provides>
<binary>mgba</binary>
<binary>mgba-qt</binary>
<mediatype>application/x-gameboy-advance-rom</mediatype>
<mediatype>application/x-agb-rom</mediatype>
<mediatype>application/x-gba-rom</mediatype>
</provides>
<keywords>
<keyword>emulator</keyword>
<keyword>Nintendo</keyword>
<keyword>advance</keyword>
<keyword>gba</keyword>
<keyword>Game Boy Advance</keyword>
</keywords>
</component>

View File

@ -372,11 +372,11 @@ uint8_t GBASavedataReadFlash(struct GBASavedata* savedata, uint16_t address) {
if (savedata->command == FLASH_COMMAND_ID) {
if (savedata->type == GBA_SAVEDATA_FLASH512) {
if (address < 2) {
return FLASH_MFG_PANASONIC >> (address * 8);
return FLASH_PANASONIC_MN63F805MNP >> (address * 8);
}
} else if (savedata->type == GBA_SAVEDATA_FLASH1M) {
if (address < 2) {
return FLASH_MFG_SANYO >> (address * 8);
return FLASH_SANYO_LE26FV10N1TS >> (address * 8);
}
}
}

View File

@ -54,7 +54,7 @@ class GBA(Core):
class GBAMemory(Memory):
def __init__(self, core, romSize=lib.SIZE_CART0):
def __init__(self, core, romSize=lib.GBA_SIZE_ROM0):
super(GBAMemory, self).__init__(core, 0x100000000)
self.bios = Memory(core, lib.GBA_SIZE_BIOS, lib.GBA_BASE_BIOS)
@ -64,11 +64,10 @@ class GBAMemory(Memory):
self.palette = Memory(core, lib.GBA_SIZE_PALETTE_RAM, lib.GBA_BASE_PALETTE_RAM)
self.vram = Memory(core, lib.GBA_SIZE_VRAM, lib.GBA_BASE_VRAM)
self.oam = Memory(core, lib.GBA_SIZE_OAM, lib.GBA_BASE_OAM)
self.cart0 = Memory(core, romSize, lib.BASE_CART0)
self.cart1 = Memory(core, romSize, lib.BASE_CART1)
self.cart2 = Memory(core, romSize, lib.BASE_CART2)
self.cart = self.cart0
self.rom = self.cart0
self.rom0 = Memory(core, romSize, lib.GBA_BASE_ROM0)
self.rom1 = Memory(core, romSize, lib.GBA_BASE_ROM1)
self.rom2 = Memory(core, romSize, lib.GBA_BASE_ROM2)
self.rom = self.rom0
self.sram = Memory(core, lib.GBA_SIZE_SRAM, lib.GBA_BASE_SRAM)

View File

@ -472,6 +472,35 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}" PARENT_SCOPE)
if(UNIX AND NOT APPLE)
install(FILES ${PROJECT_SOURCE_DIR}/res/mgba-qt.desktop DESTINATION share/applications RENAME io.mgba.${PROJECT_NAME}.desktop COMPONENT ${BINARY_NAME}-qt)
set(APPSTREAM_RELEASES "")
find_program(GIT git)
if(GIT AND NOT SKIP_GIT)
execute_process(COMMAND ${GIT} tag -l --sort=-version:refname "--format=%(refname:strip=2) %(creatordate:short)" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE RELEASE_TAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "\n" ";" TAGS_LIST ${RELEASE_TAGS})
foreach(TAG ${TAGS_LIST})
string(REPLACE " " ";" TAG_LIST ${TAG})
list(GET TAG_LIST 0 TAG_REF)
list(GET TAG_LIST 1 TAG_DATE)
# Check dash usually signifies an alpha or a beta tag
string(FIND ${TAG_REF} "-" TAG_UNSTABLE)
if (NOT ${TAG_UNSTABLE} EQUAL -1)
continue()
endif()
list(APPEND RELEASE_LIST "<release version=\"${TAG_REF}\" date=\"${TAG_DATE}\" />")
endforeach()
list(LENGTH RELEASE_LIST RELEASE_COUNT)
if (NOT RELEASE_COUNT EQUAL 0)
list(JOIN RELEASE_LIST "\n" RELEASE_STR)
set(APPSTREAM_RELEASES "<releases>\n${RELEASE_STR}\n</releases>")
endif()
endif()
message(${CMAKE_SOURCE_DIR}/res/io.mgba.mGBA.metainfo.xml.in )
configure_file(${CMAKE_SOURCE_DIR}/res/io.mgba.mGBA.metainfo.xml.in ${CMAKE_CURRENT_BINARY_DIR}/io.mgba.mGBA.metainfo.xml)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/io.mgba.mGBA.metainfo.xml DESTINATION share/metainfo COMPONENT ${BINARY_NAME}-qt)
endif()
if(UNIX AND NOT (APPLE AND DISTBUILD))
install(FILES ${PROJECT_SOURCE_DIR}/doc/mgba-qt.6 DESTINATION ${MANDIR}/man6 COMPONENT ${BINARY_NAME}-qt)

View File

@ -1267,6 +1267,9 @@ void CoreController::finishFrame() {
}
void CoreController::updatePlayerSave() {
if (m_saveBlocked) {
return;
}
int savePlayerId = m_multiplayer->saveId(this);
QString saveSuffix;

View File

@ -176,6 +176,7 @@ public slots:
void scanCards(const QStringList&);
void replaceGame(const QString&);
void yankPak();
void blockSave() { m_saveBlocked = true; }
void addKey(int key);
void clearKey(int key);
@ -263,6 +264,7 @@ private:
bool m_patched = false;
bool m_preload = false;
bool m_saveBlocked = false;
uint32_t m_crc32;
QString m_internalTitle;

View File

@ -169,6 +169,7 @@ CoreController* CoreManager::loadBIOS(int platform, const QString& path) {
mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData()));
CoreController* cc = new CoreController(core);
cc->blockSave();
if (m_multiplayer) {
cc->setMultiplayerController(m_multiplayer);
}