From 3a8ff86d6b5a940630f3cd5d041ab3d13413214f Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 20 Feb 2019 19:44:11 -0800 Subject: [PATCH 01/20] GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM --- CHANGES | 1 + src/gb/gb.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index dfbc73d9b..db6a4acff 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,7 @@ Bugfixes: - Switch: Fix gyroscope orientation (fixes mgba.io/i/1300) - GBA SIO: Prevent writing read-only multiplayer bits - Qt: Fix color picking in sprite view (fixes mgba.io/i/1307) + - GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gb/gb.c b/src/gb/gb.c index 508483c1b..038401c83 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -202,7 +202,7 @@ void GBResizeSram(struct GB* gb, size_t size) { if (gb->memory.sram == (void*) -1) { gb->memory.sram = NULL; } - } else { + } else if (size) { uint8_t* newSram = anonymousMemoryMap(size); if (gb->memory.sram) { if (size > gb->sramSize) { From f3efd3726470ca3e46209a58e8443f80cc891f3c Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 20 Feb 2019 19:45:11 -0800 Subject: [PATCH 02/20] Python: Fix crash when deleting files owned by library --- CHANGES | 1 + src/platform/python/mgba/core.py | 10 ++++++++-- src/platform/python/mgba/vfs.py | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index db6a4acff..e8cdfd2ca 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ Bugfixes: - GBA SIO: Prevent writing read-only multiplayer bits - Qt: Fix color picking in sprite view (fixes mgba.io/i/1307) - GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM + - Python: Fix crash when deleting files owned by library Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/platform/python/mgba/core.py b/src/platform/python/mgba/core.py index 7a0672322..589ef0cb3 100644 --- a/src/platform/python/mgba/core.py +++ b/src/platform/python/mgba/core.py @@ -180,11 +180,17 @@ class Core(object): @protected def load_bios(self, vfile, id=0): - return bool(self._core.loadBIOS(self._core, vfile.handle, id)) + res = bool(self._core.loadBIOS(self._core, vfile.handle, id)) + if res: + vfile._claimed = True + return res @protected def load_save(self, vfile): - return bool(self._core.loadSave(self._core, vfile.handle)) + res = bool(self._core.loadSave(self._core, vfile.handle)) + if res: + vfile._claimed = True + return res @protected def load_temporary_save(self, vfile): diff --git a/src/platform/python/mgba/vfs.py b/src/platform/python/mgba/vfs.py index 2381a0aee..bab78c799 100644 --- a/src/platform/python/mgba/vfs.py +++ b/src/platform/python/mgba/vfs.py @@ -112,11 +112,16 @@ class VFile: def __init__(self, vf, _no_gc=None): self.handle = vf self._no_gc = _no_gc + self._claimed = False def __del__(self): - self.close() + if not self._claimed: + self.close() def close(self): + if self._claimed: + return False + self._claimed = True return bool(self.handle.close(self.handle)) def seek(self, offset, whence): From b5af2b584adfa9b11ab0675872ec8993347507a9 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 20 Feb 2019 19:45:54 -0800 Subject: [PATCH 03/20] Python: Make sure GB link object isn't GC'd before GB object --- CHANGES | 1 + src/platform/python/mgba/gb.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e8cdfd2ca..36e868864 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,7 @@ Bugfixes: - Qt: Fix color picking in sprite view (fixes mgba.io/i/1307) - GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM - Python: Fix crash when deleting files owned by library + - Python: Make sure GB link object isn't GC'd before GB object Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/platform/python/mgba/gb.py b/src/platform/python/mgba/gb.py index f4d6987c4..4e08faf39 100644 --- a/src/platform/python/mgba/gb.py +++ b/src/platform/python/mgba/gb.py @@ -27,6 +27,7 @@ class GB(Core): self.sprites = GBObjs(self) self.cpu = LR35902Core(self._core.cpu) self.memory = None + self._link = None @needs_reset def _init_cache(self, cache): @@ -43,10 +44,13 @@ class GB(Core): self.memory = GBMemory(self._core) def attach_sio(self, link): + self._link = link lib.GBSIOSetDriver(ffi.addressof(self._native.sio), link._native) def __del__(self): - lib.GBSIOSetDriver(ffi.addressof(self._native.sio), ffi.NULL) + if self._link: + lib.GBSIOSetDriver(ffi.addressof(self._native.sio), ffi.NULL) + self._link = None create_callback("GBSIOPythonDriver", "init") From 6e1ae2321eab2562bd7db11dd096a9bd1e7cd1a2 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 20 Feb 2019 20:34:03 -0800 Subject: [PATCH 04/20] GB: Add GBC color palettes for GB games --- include/mgba/core/interface.h | 1 + include/mgba/internal/gb/overrides.h | 1 + src/gb/core.c | 6 +- src/gb/overrides.c | 487 +++++++++++++++++++++++++++ 4 files changed, 494 insertions(+), 1 deletion(-) diff --git a/include/mgba/core/interface.h b/include/mgba/core/interface.h index e5c9dde18..0581c0bf2 100644 --- a/include/mgba/core/interface.h +++ b/include/mgba/core/interface.h @@ -32,6 +32,7 @@ typedef uint32_t color_t; #define M_B8(X) (((((X) >> 7) & 0xF8) * 0x21) >> 5) #define M_RGB5_TO_BGR8(X) ((M_R5(X) << 3) | (M_G5(X) << 11) | (M_B5(X) << 19)) +#define M_RGB5_TO_RGB8(X) ((M_R5(X) << 19) | (M_G5(X) << 11) | (M_B5(X) << 3)) #define M_RGB8_TO_BGR5(X) ((((X) & 0xF8) >> 3) | (((X) & 0xF800) >> 6) | (((X) & 0xF80000) >> 9)) #define M_RGB8_TO_RGB5(X) ((((X) & 0xF8) << 7) | (((X) & 0xF800) >> 6) | (((X) & 0xF80000) >> 19)) diff --git a/include/mgba/internal/gb/overrides.h b/include/mgba/internal/gb/overrides.h index f138ee9c8..5e0b2bbc6 100644 --- a/include/mgba/internal/gb/overrides.h +++ b/include/mgba/internal/gb/overrides.h @@ -22,6 +22,7 @@ struct GBCartridgeOverride { struct Configuration; bool GBOverrideFind(const struct Configuration*, struct GBCartridgeOverride* override); +bool GBOverrideColorFind(struct GBCartridgeOverride* override); void GBOverrideSave(struct Configuration*, const struct GBCartridgeOverride* override); struct GB; diff --git a/src/gb/core.c b/src/gb/core.c index c0c4f50da..68b613108 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -211,6 +211,7 @@ static void _GBCoreLoadConfig(struct mCore* core, const struct mCoreConfig* conf mCoreConfigCopyValue(&core->config, config, "gb.model"); mCoreConfigCopyValue(&core->config, config, "sgb.model"); mCoreConfigCopyValue(&core->config, config, "cgb.model"); + mCoreConfigCopyValue(&core->config, config, "useCgbColors"); mCoreConfigCopyValue(&core->config, config, "allowOpposingDirections"); int fakeBool = 0; @@ -359,10 +360,13 @@ static void _GBCoreReset(struct mCore* core) { } if (gb->memory.rom) { + int doColorOverride = 0; + mCoreConfigGetIntValue(&core->config, "useCgbColors", &doColorOverride); + struct GBCartridgeOverride override; const struct GBCartridge* cart = (const struct GBCartridge*) &gb->memory.rom[0x100]; override.headerCrc32 = doCrc32(cart, sizeof(*cart)); - if (GBOverrideFind(gbcore->overrides, &override)) { + if (GBOverrideFind(gbcore->overrides, &override) || (doColorOverride && GBOverrideColorFind(&override))) { GBOverrideApply(gb, &override); } } diff --git a/src/gb/overrides.c b/src/gb/overrides.c index 382b67200..51a9bbf71 100644 --- a/src/gb/overrides.c +++ b/src/gb/overrides.c @@ -11,6 +11,482 @@ #include #include +#define PAL_ENTRY(A, B, C, D) \ + 0xFF000000 | M_RGB5_TO_RGB8(A), \ + 0xFF000000 | M_RGB5_TO_RGB8(B), \ + 0xFF000000 | M_RGB5_TO_RGB8(C), \ + 0xFF000000 | M_RGB5_TO_RGB8(D) + +#define PAL0 PAL_ENTRY(0x7FFF, 0x32BF, 0x00D0, 0x0000) +#define PAL1 PAL_ENTRY(0x639F, 0x4279, 0x15B0, 0x04CB) +#define PAL2 PAL_ENTRY(0x7FFF, 0x6E31, 0x454A, 0x0000) +#define PAL3 PAL_ENTRY(0x7FFF, 0x1BEF, 0x0200, 0x0000) +#define PAL4 PAL_ENTRY(0x7FFF, 0x421F, 0x1CF2, 0x0000) +#define PAL5 PAL_ENTRY(0x7FFF, 0x5294, 0x294A, 0x0000) +#define PAL6 PAL_ENTRY(0x7FFF, 0x03FF, 0x012F, 0x0000) +#define PAL7 PAL_ENTRY(0x7FFF, 0x03EF, 0x01D6, 0x0000) +#define PAL8 PAL_ENTRY(0x7FFF, 0x42B5, 0x3DC8, 0x0000) +#define PAL9 PAL_ENTRY(0x7E74, 0x03FF, 0x0180, 0x0000) +#define PAL10 PAL_ENTRY(0x67FF, 0x77AC, 0x1A13, 0x2D6B) +#define PAL11 PAL_ENTRY(0x7ED6, 0x4BFF, 0x2175, 0x0000) +#define PAL12 PAL_ENTRY(0x53FF, 0x4A5F, 0x7E52, 0x0000) +#define PAL13 PAL_ENTRY(0x4FFF, 0x7ED2, 0x3A4C, 0x1CE0) +#define PAL14 PAL_ENTRY(0x03ED, 0x7FFF, 0x255F, 0x0000) +#define PAL15 PAL_ENTRY(0x036A, 0x021F, 0x03FF, 0x7FFF) +#define PAL16 PAL_ENTRY(0x7FFF, 0x01DF, 0x0112, 0x0000) +#define PAL17 PAL_ENTRY(0x231F, 0x035F, 0x00F2, 0x0009) +#define PAL18 PAL_ENTRY(0x7FFF, 0x03EA, 0x011F, 0x0000) +#define PAL19 PAL_ENTRY(0x299F, 0x001A, 0x000C, 0x0000) +#define PAL20 PAL_ENTRY(0x7FFF, 0x027F, 0x001F, 0x0000) +#define PAL21 PAL_ENTRY(0x7FFF, 0x03E0, 0x0206, 0x0120) +#define PAL22 PAL_ENTRY(0x7FFF, 0x7EEB, 0x001F, 0x7C00) +#define PAL23 PAL_ENTRY(0x7FFF, 0x3FFF, 0x7E00, 0x001F) +#define PAL24 PAL_ENTRY(0x7FFF, 0x03FF, 0x001F, 0x0000) +#define PAL25 PAL_ENTRY(0x03FF, 0x001F, 0x000C, 0x0000) +#define PAL26 PAL_ENTRY(0x7FFF, 0x033F, 0x0193, 0x0000) +#define PAL27 PAL_ENTRY(0x0000, 0x4200, 0x037F, 0x7FFF) +#define PAL28 PAL_ENTRY(0x7FFF, 0x7E8C, 0x7C00, 0x0000) +#define PAL29 PAL_ENTRY(0x7FFF, 0x1BEF, 0x6180, 0x0000) +#define PAL30 PAL_ENTRY(0x7C00, 0x7FFF, 0x3FFF, 0x7E00) +#define PAL31 PAL_ENTRY(0x7FFF, 0x7FFF, 0x7E8C, 0x7C00) +#define PAL32 PAL_ENTRY(0x0000, 0x7FFF, 0x421F, 0x1CF2) + +#define PALETTE(X, Y, Z) { PAL ## X, PAL ## Y, PAL ## Z } + +static const struct GBCartridgeOverride _colorOverrides[] = { + // Adventures of Lolo (Europe) + { 0xFBE65286, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Alleyway (World) + { 0xCBAA161B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 9, 9) }, + + // Arcade Classic No. 1 - Asteroids & Missile Command (USA, Europe) + { 0x309FDB70, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 4) }, + + // Arcade Classic No. 3 - Galaga & Galaxian (USA) + { 0xE13EF629, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(27, 27, 27) }, + + // Arcade Classic No. 4 - Defender & Joust (USA, Europe) + { 0x5C8B229D, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Balloon Kid (USA, Europe) + { 0xEC3438FA, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(20, 20, 20) }, + + // Baseball (World) + { 0xE02904BD, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(15, 31, 4) }, + + // Battle Arena Toshinden (USA) + { 0xA2C3DF62, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Battletoads in Ragnarok's World (Europe) + { 0x51B259CF, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 3, 3) }, + + // Chessmaster, The (DMG-EM) (Europe) + { 0x96A68366, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 28) }, + + // David Crane's The Rescue of Princess Blobette Starring A Boy and His Blob (Europe) + { 0x6413F5E2, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 3, 28) }, + + // Donkey Kong (Japan, USA) + { 0xA777EE2F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(20, 4, 4) }, + + // Donkey Kong (World) (Rev A) + { 0xC8F8ACDA, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(20, 4, 4) }, + + // Donkey Kong Land (Japan) + { 0x2CA7EEF3, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 17, 22) }, + + // Donkey Kong Land (USA, Europe) + { 0x0D3E401D, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(13, 17, 4) }, + + // Donkey Kong Land 2 (USA, Europe) + { 0x07ED9445, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 17, 22) }, + + // Donkey Kong Land III (USA, Europe) + { 0xCA01A31C, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 17, 22) }, + + // Donkey Kong Land III (USA, Europe) (Rev A) + { 0x6805BA1E, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 17, 22) }, + + // Dr. Mario (World) + { 0xA3C2C1E9, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 28, 4) }, + + // Dr. Mario (World) (Rev A) + { 0x69975661, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 28, 4) }, + + // Dr. Mario (World) (Beta) + { 0x22E55535, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Dynablaster (Europe) + { 0xD9D0211F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 28) }, + + // F-1 Race (World) + { 0x8434CB2C, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // F-1 Race (World) (Rev A) + { 0xBA63383B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Game & Watch Gallery (Europe) + { 0x4A43B8B9, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(7, 4, 4) }, + + // Game & Watch Gallery (USA) + { 0xBD0736D4, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(7, 4, 4) }, + + // Game & Watch Gallery (USA) (Rev A) + { 0xA969B4F0, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(7, 4, 4) }, + + // Game Boy Camera Gold (USA) + { 0x83947EC8, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Game Boy Gallery (Japan) + { 0xDC3C3642, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(7, 4, 4) }, + + // Game Boy Gallery - 5 Games in One (Europe) + { 0xD83E3F82, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Game Boy Gallery 2 (Australia) + { 0x6C477A30, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(7, 4, 4) }, + + // Game Boy Gallery 2 (Japan) + { 0xC5AAAFDA, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(7, 4, 4) }, + + // Game Boy Wars (Japan) + { 0x03E3ED72, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 16, 22) }, + + // Golf (World) + { 0x885C242D, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 4) }, + + // Hoshi no Kirby (Japan) + { 0x4AA02A13, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Hoshi no Kirby (Japan) (Rev A) + { 0x88D03280, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Hoshi no Kirby 2 (Japan) + { 0x58B7A321, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // James Bond 007 (USA, Europe) + { 0x7DDEB68E, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(29, 4, 29) }, + + // Kaeru no Tame ni Kane wa Naru (Japan) + { 0x7F805941, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 4, 2) }, + + // Kid Icarus - Of Myths and Monsters (USA, Europe) + { 0x5D93DB0F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 4, 4) }, + + // Killer Instinct (USA, Europe) + { 0x117043A9, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 4, 0) }, + + // King of Fighters '95, The (USA) + { 0x0F81CC70, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // King of the Zoo (Europe) + { 0xB492FB51, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 28) }, + + // Kirby no Block Ball (Japan) + { 0x4203B79F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Kirby no Kirakira Kids (Japan) + { 0x74C3A937, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Kirby no Pinball (Japan) + { 0x89239AED, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 19) }, + + // Kirby's Block Ball (USA, Europe) + { 0xCE8B1B18, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Kirby's Dream Land (USA, Europe) + { 0x302017CC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Kirby's Dream Land 2 (USA, Europe) + { 0xF6C9E5A8, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 30) }, + + // Kirby's Pinball Land (USA, Europe) + { 0x9C4AA9D8, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(9, 19, 19) }, + + // Kirby's Star Stacker (USA, Europe) + { 0xC1B481CA, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Legend of Zelda, The - Link's Awakening (Canada) + { 0x9F54D47B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Legend of Zelda, The - Link's Awakening (France) + { 0x441D7FAD, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Legend of Zelda, The - Link's Awakening (Germany) + { 0x838D65D6, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Legend of Zelda, The - Link's Awakening (USA, Europe) (Rev A) + { 0x24CAAB4D, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Legend of Zelda, The - Link's Awakening (USA, Europe) (Rev B) + { 0xBCBB6BDB, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Legend of Zelda, The - Link's Awakening (USA, Europe) + { 0x9A193109, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Magnetic Soccer (Europe) + { 0x6735A1F5, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 28) }, + + // Mario & Yoshi (Europe) + { 0xEC14B007, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(18, 4, 4) }, + + // Mario no Picross (Japan) + { 0x602C2371, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Mario's Picross (USA, Europe) + { 0x725BBFF6, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Mega Man - Dr. Wily's Revenge (Europe) + { 0xB2FE1EDB, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Mega Man II (Europe) + { 0xC5EE1580, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Mega Man III (Europe) + { 0x88249B90, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Metroid II - Return of Samus (World) + { 0xBDCCC648, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 25, 3) }, + + // Moguranya (Japan) + { 0x41C1D13C, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 16, 16) }, + + // Mole Mania (USA, Europe) + { 0x32E8EEA3, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 16, 16) }, + + // Mystic Quest (Europe) + { 0x8DC57012, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 28) }, + + // Mystic Quest (France) + { 0x09728780, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 28) }, + + // Mystic Quest (Germany) + { 0x6F8568A8, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 28) }, + + // Nigel Mansell's World Championship Racing (Europe) + { 0xAC2D636D, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Nintendo World Cup (USA, Europe) + { 0xB43E44C1, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 4) }, + + // Othello (Europe) + { 0x45F34317, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 28) }, + + // Pac-In-Time (Europe) + { 0x8C608574, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(29, 4, 28) }, + + // Picross 2 (Japan) + { 0xBA91DDD8, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Pinocchio (Europe) + { 0x849C74C0, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 2, 17) }, + + // Play Action Football (USA) + { 0x2B703514, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 4) }, + + // Pocket Bomberman (Europe) + { 0x9C5E0D5E, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(2, 17, 17) }, + + // Pocket Camera (Japan) (Rev A) + { 0x211A85AC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(26, 26, 26) }, + + // Pocket Monsters - Aka (Japan) + { 0x29D07340, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Pocket Monsters - Aka (Japan) (Rev A) + { 0x6BB566EC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Pocket Monsters - Ao (Japan) + { 0x65EF364B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 28) }, + + // Pocket Monsters - Midori (Japan) + { 0x923D46DD, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(29, 4, 29) }, + + // Pocket Monsters - Midori (Japan) (Rev A) + { 0x6C926BFF, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(29, 4, 29) }, + + // Pocket Monsters - Pikachu (Japan) + { 0xF52AD7C1, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 24) }, + + // Pocket Monsters - Pikachu (Japan) (Rev A) + { 0x0B54FAEB, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 24) }, + + // Pocket Monsters - Pikachu (Japan) (Rev B) + { 0x9A161366, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 24) }, + + // Pocket Monsters - Pikachu (Japan) (Rev C) + { 0x8E1C14E4, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 24) }, + + // Pokemon - Blaue Edition (Germany) + { 0x6C3587F2, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 28) }, + + // Pokemon - Blue Version (USA, Europe) + { 0x28323CE0, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 28) }, + + // Pokemon - Edicion Azul (Spain) + { 0x93FCE15B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 28) }, + + // Pokemon - Edicion Roja (Spain) + { 0xFD20BB1C, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Pokemon - Red Version (USA, Europe) + { 0xCC25454F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Pokemon - Rote Edition (Germany) + { 0xE5DD23CE, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Pokemon - Version Bleue (France) + { 0x98BFEC5A, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 28) }, + + // Pokemon - Version Rouge (France) + { 0x1D6D8022, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // Pokemon - Versione Blu (Italy) + { 0x7864DECC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 28) }, + + // Pokemon - Versione Rossa (Italy) + { 0xFE2A3F93, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 3, 4) }, + + // QIX (World) + { 0x5EECB346, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 22) }, + + // Radar Mission (Japan) + { 0xD03B1A15, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 16, 8) }, + + // Radar Mission (USA, Europe) + { 0xCEDD9FEB, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 16, 8) }, + + // Soccer (Europe) + { 0xB0274CDA, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(14, 31, 0) }, + + // SolarStriker (World) + { 0x981620E7, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(27, 27, 27) }, + + // Space Invaders (Europe) + { 0x3B032784, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(27, 27, 27) }, + + // Space Invaders (USA) + { 0x63A767E2, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(27, 27, 27) }, + + // Star Wars (USA, Europe) (Rev A) + { 0x44CE17EE, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 3, 28) }, + + // Street Fighter II (USA) + { 0xC512D0B1, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Street Fighter II (USA, Europe) (Rev A) + { 0x79E16545, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Super Donkey Kong GB (Japan) + { 0x940D4974, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(13, 17, 4) }, + + // Super Mario Land (World) + { 0x6C0ACA9F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(11, 32, 32) }, + + // Super Mario Land (World) (Rev A) + { 0xCA117ACC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(11, 32, 32) }, + + // Super Mario Land 2 - 6 Golden Coins (USA, Europe) (Rev A) + { 0x423E09E6, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(10, 16, 28) }, + + // Super Mario Land 2 - 6 Golden Coins (USA, Europe) (Rev B) + { 0x445A0358, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(10, 16, 28) }, + + // Super Mario Land 2 - 6 Golden Coins (USA, Europe) + { 0xDE2960A1, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(10, 16, 28) }, + + // Super Mario Land 2 - 6-tsu no Kinka (Japan) + { 0xD47CED78, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(10, 16, 28) }, + + // Super Mario Land 2 - 6-tsu no Kinka (Japan) (Rev A) + { 0xA4B4F9F9, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(10, 16, 28) }, + + // Super Mario Land 2 - 6-tsu no Kinka (Japan) (Rev B) + { 0x5842F25D, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(10, 16, 28) }, + + // Super R.C. Pro-Am (USA, Europe) + { 0x8C39B1C8, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 28, 3) }, + + // Tennis (World) + { 0xD2BEBF08, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(14, 31, 0) }, + + // Tetris (World) + { 0xE906C6A6, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 24) }, + + // Tetris (World) (Rev A) + { 0x4674B43F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 24) }, + + // Tetris 2 (USA) + { 0x687505F1, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 22) }, + + // Tetris 2 (USA, Europe) + { 0x6761459F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 22) }, + + // Tetris Attack (USA) + { 0x00E9474B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(18, 18, 22) }, + + // Tetris Blast (USA, Europe) + { 0xDDDEEEDE, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(20, 20, 20) }, + + // Tetris Attack (USA, Europe) (Rev A) + { 0x6628C535, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(18, 18, 22) }, + + // Tetris Flash (Japan) + { 0xED669A78, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(24, 24, 22) }, + + // Top Rank Tennis (USA) + { 0xA6497CC0, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(14, 31, 0) }, + + // Top Ranking Tennis (Europe) + { 0x62C12E05, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(14, 31, 0) }, + + // Toy Story (Europe) + { 0x67066E28, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 4) }, + + // Vegas Stakes (USA, Europe) + { 0x80CB217F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(3, 4, 28) }, + + // Wario Land - Super Mario Land 3 (World) + { 0xF1EA10E9, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 16, 22) }, + + // Wario Land II (USA, Europe) + { 0xD56A50A1, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(8, 0, 28) }, + + // Wave Race (USA, Europe) + { 0x52A6E4CC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(28, 4, 23) }, + + // X (Japan) + { 0xFED4C47F, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(5, 5, 5) }, + + // Yakuman (Japan) + { 0x40604F17, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Yakuman (Japan) (Rev A) + { 0x2959ACFC, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(0, 0, 0) }, + + // Yoshi (USA) + { 0xAB1605B9, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(18, 4, 4) }, + + // Yoshi no Cookie (Japan) + { 0x841753DA, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(20, 20, 22) }, + + // Yoshi no Panepon (Japan) + { 0xAA1AD903, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(18, 18, 22) }, + + // Yoshi no Tamago (Japan) + { 0xD4098A6B, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(18, 4, 4) }, + + // Yoshi's Cookie (USA, Europe) + { 0x940EDD87, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(20, 20, 22) }, + + // Zelda no Densetsu - Yume o Miru Shima (Japan) + { 0x259C9A82, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, + + // Zelda no Densetsu - Yume o Miru Shima (Japan) (Rev A) + { 0x61F269CD, GB_MODEL_AUTODETECT, GB_MBC_AUTODETECT, PALETTE(4, 21, 28) }, +}; + static const struct GBCartridgeOverride _overrides[] = { // Pokemon Spaceworld 1997 demo { 0x232a067d, GB_MODEL_AUTODETECT, GB_MBC3_RTC, { 0 } }, // Gold (debug) @@ -21,6 +497,17 @@ static const struct GBCartridgeOverride _overrides[] = { { 0, 0, 0, { 0 } } }; +bool GBOverrideColorFind(struct GBCartridgeOverride* override) { + int i; + for (i = 0; _colorOverrides[i].headerCrc32; ++i) { + if (override->headerCrc32 == _colorOverrides[i].headerCrc32) { + memcpy(override->gbColors, _colorOverrides[i].gbColors, sizeof(override->gbColors)); + return true; + } + } + return false; +} + bool GBOverrideFind(const struct Configuration* config, struct GBCartridgeOverride* override) { override->model = GB_MODEL_AUTODETECT; override->mbc = GB_MBC_AUTODETECT; From 99a6db6738c82d1cb286c29a9b431a41cd5ea8ba Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 20 Feb 2019 20:40:54 -0800 Subject: [PATCH 05/20] Qt: Add option for CGB colors --- CHANGES | 1 + src/platform/qt/ConfigController.cpp | 2 ++ src/platform/qt/SettingsView.cpp | 2 ++ src/platform/qt/SettingsView.ui | 19 +++++++++++++------ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 36e868864..67845a325 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ Features: - Improved logging configuration - One-Player BattleChip/Progress/Beast Link Gate support + - Add Game Boy Color palettes for original Game Boy games Bugfixes: - GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208) - GBA: Reset now reloads multiboot ROMs diff --git a/src/platform/qt/ConfigController.cpp b/src/platform/qt/ConfigController.cpp index 36a520abb..6ea003d32 100644 --- a/src/platform/qt/ConfigController.cpp +++ b/src/platform/qt/ConfigController.cpp @@ -112,6 +112,8 @@ ConfigController::ConfigController(QObject* parent) m_opts.lockAspectRatio = true; mCoreConfigLoad(&m_config); mCoreConfigLoadDefaults(&m_config, &m_opts); + mCoreConfigSetDefaultIntValue(&m_config, "sgb.borders", 1); + mCoreConfigSetDefaultIntValue(&m_config, "useCgbColors", 1); mCoreConfigMap(&m_config, &m_opts); } diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index 7f2ded961..271c59652 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/platform/qt/SettingsView.cpp @@ -352,6 +352,7 @@ void SettingsView::updateConfig() { saveSetting("gbc.bios", m_ui.gbcBios); saveSetting("sgb.bios", m_ui.sgbBios); saveSetting("sgb.borders", m_ui.sgbBorders); + saveSetting("useCgbColors", m_ui.useCgbColors); saveSetting("useBios", m_ui.useBios); saveSetting("skipBios", m_ui.skipBios); saveSetting("audioBuffers", m_ui.audioBufferSize); @@ -485,6 +486,7 @@ void SettingsView::reloadConfig() { loadSetting("gbc.bios", m_ui.gbcBios); loadSetting("sgb.bios", m_ui.sgbBios); loadSetting("sgb.borders", m_ui.sgbBorders, true); + loadSetting("useCgbColors", m_ui.useCgbColors, true); loadSetting("useBios", m_ui.useBios); loadSetting("skipBios", m_ui.skipBios); loadSetting("audioBuffers", m_ui.audioBufferSize); diff --git a/src/platform/qt/SettingsView.ui b/src/platform/qt/SettingsView.ui index 0a2da478e..41fb9a7de 100644 --- a/src/platform/qt/SettingsView.ui +++ b/src/platform/qt/SettingsView.ui @@ -87,7 +87,7 @@ - 5 + 0 @@ -1215,7 +1215,7 @@ - 0 + 77 0 @@ -1540,28 +1540,28 @@ - + Super Game Boy borders - + Qt::Horizontal - + Camera driver: - + @@ -1665,6 +1665,13 @@ + + + + Use GBC colors in GB games + + + From ce419ee1c641a3c431d879fc52bb8ae583c55cca Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 21 Feb 2019 02:00:11 -0800 Subject: [PATCH 06/20] Qt: Revamp BattleChip UI --- src/platform/qt/BattleChipView.cpp | 63 +++++++- src/platform/qt/BattleChipView.h | 13 ++ src/platform/qt/BattleChipView.ui | 240 ++++++++++++++++++++--------- 3 files changed, 243 insertions(+), 73 deletions(-) diff --git a/src/platform/qt/BattleChipView.cpp b/src/platform/qt/BattleChipView.cpp index fa12cbbf2..c6d6578d4 100644 --- a/src/platform/qt/BattleChipView.cpp +++ b/src/platform/qt/BattleChipView.cpp @@ -5,9 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "BattleChipView.h" +#include "ConfigController.h" #include "CoreController.h" +#include "GBAApp.h" +#include #include +#include #include using namespace QGBA; @@ -16,6 +20,9 @@ BattleChipView::BattleChipView(std::shared_ptr controller, QWidg : QDialog(parent) , m_controller(controller) { + QResource::registerResource(GBAApp::dataDir() + "/chips.rcc"); + QResource::registerResource(ConfigController::configDir() + "/chips.rcc"); + m_ui.setupUi(this); char title[9]; @@ -34,6 +41,9 @@ BattleChipView::BattleChipView(std::shared_ptr controller, QWidg }); connect(m_ui.inserted, &QAbstractButton::toggled, this, &BattleChipView::insertChip); + connect(m_ui.insert, &QAbstractButton::clicked, this, &BattleChipView::reinsert); + connect(m_ui.add, &QAbstractButton::clicked, this, &BattleChipView::addChip); + connect(m_ui.remove, &QAbstractButton::clicked, this, &BattleChipView::removeChip); connect(controller.get(), &CoreController::stopping, this, &QWidget::close); connect(m_ui.gateBattleChip, &QAbstractButton::toggled, this, [this](bool on) { @@ -56,6 +66,16 @@ BattleChipView::BattleChipView(std::shared_ptr controller, QWidg } }); + connect(m_controller.get(), &CoreController::frameAvailable, this, &BattleChipView::advanceFrameCounter); + + connect(m_ui.chipList, &QListWidget::itemClicked, this, [this](QListWidgetItem* item) { + QVariant chip = item->data(Qt::UserRole); + bool blocked = m_ui.chipId->blockSignals(true); + m_ui.chipId->setValue(chip.toInt()); + m_ui.chipId->blockSignals(blocked); + reinsert(); + }); + m_controller->attachBattleChipGate(); setFlavor(4); if (qtitle.startsWith("AGB-B4B") || qtitle.startsWith("AGB-B4W") || qtitle.startsWith("AGB-BR4") || qtitle.startsWith("AGB-BZ3")) { @@ -77,6 +97,9 @@ void BattleChipView::setFlavor(int flavor) { } void BattleChipView::insertChip(bool inserted) { + bool blocked = m_ui.inserted->blockSignals(true); + m_ui.inserted->setChecked(inserted); + m_ui.inserted->blockSignals(blocked); if (inserted) { m_controller->setBattleChipId(m_ui.chipId->value()); } else { @@ -84,14 +107,41 @@ void BattleChipView::insertChip(bool inserted) { } } +void BattleChipView::reinsert() { + if (m_ui.inserted->isChecked()) { + insertChip(false); + m_next = true; + m_frameCounter = UNINSERTED_TIME; + } else { + insertChip(true); + } +} + +void BattleChipView::addChip() { + int insertedChip = m_ui.chipId->value(); + if (insertedChip < 1) { + return; + } + QListWidgetItem* add = new QListWidgetItem(m_chipIdToName[insertedChip]); + add->setData(Qt::UserRole, insertedChip); + add->setIcon(QIcon(QString(":/res/exe%1/%2.png").arg(m_flavor).arg(insertedChip, 3, 10, QLatin1Char('0')))); + m_ui.chipList->addItem(add); +} + +void BattleChipView::removeChip() { + qDeleteAll(m_ui.chipList->selectedItems()); +} + void BattleChipView::loadChipNames(int flavor) { QStringList chipNames; chipNames.append(tr("(None)")); m_chipIndexToId.clear(); + m_chipIdToName.clear(); if (flavor == GBA_FLAVOR_BEAST_LINK_GATE_US) { flavor = GBA_FLAVOR_BEAST_LINK_GATE; } + m_flavor = flavor; QFile file(QString(":/res/chip-names-%1.txt").arg(flavor)); file.open(QIODevice::ReadOnly | QIODevice::Text); @@ -105,10 +155,21 @@ void BattleChipView::loadChipNames(int flavor) { if (line.trimmed().isEmpty()) { continue; } + QString name = QString::fromUtf8(line).trimmed(); m_chipIndexToId[chipNames.length()] = id; - chipNames.append(QString::fromUtf8(line).trimmed()); + m_chipIdToName[id] = name; + chipNames.append(name); } m_ui.chipName->clear(); m_ui.chipName->addItems(chipNames); +} + +void BattleChipView::advanceFrameCounter() { + if (m_frameCounter == 0) { + insertChip(m_next); + } + if (m_frameCounter >= 0) { + --m_frameCounter; + } } \ No newline at end of file diff --git a/src/platform/qt/BattleChipView.h b/src/platform/qt/BattleChipView.h index 7dbdc9561..6b4582c36 100644 --- a/src/platform/qt/BattleChipView.h +++ b/src/platform/qt/BattleChipView.h @@ -27,14 +27,27 @@ public: public slots: void setFlavor(int); void insertChip(bool); + void reinsert(); + +private slots: + void advanceFrameCounter(); + void addChip(); + void removeChip(); private: + static const int UNINSERTED_TIME = 10; + void loadChipNames(int); Ui::BattleChipView m_ui; QMap m_chipIndexToId; + QMap m_chipIdToName; std::shared_ptr m_controller; + int m_flavor; + + int m_frameCounter = -1; + bool m_next = false; }; } \ No newline at end of file diff --git a/src/platform/qt/BattleChipView.ui b/src/platform/qt/BattleChipView.ui index ba95e455a..14ce62c55 100644 --- a/src/platform/qt/BattleChipView.ui +++ b/src/platform/qt/BattleChipView.ui @@ -6,90 +6,186 @@ 0 0 - 426 - 278 + 794 + 893 BattleChip Gate - - - - - Inserted - - + + + + + + + Gate type + + + + + + + Ba&ttleChip Gate + + + true + + + + + + + Progress &Gate + + + + + + + Beast &Link Gate + + + + - - - - Chip ID - - - - - - - Chip name - - - - - - - 65535 - - - - - - - - - - Gate type - - - - - - - Progress &Gate - - - gate - - - - - - - Ba&ttleChip Gate - - - true - - - gate - - + + + + + + Chip ID + + + + + + + 65535 + + + + + + + Inserted + + + + - - - Beast &Link Gate + + + Qt::Vertical + + + + + + + + + + + + + + Chip name + + + + + + + + + Add + + + + + + + Remove + + + + + + + Insert + + + + + + + + + true + + + true + + + QAbstractItemView::InternalMove + + + Qt::MoveAction + + + + 56 + 48 + + + + QListView::Snap + + + true + + + QListView::Adjust + + + + 160 + 128 + + + + QListView::IconMode + + + + + + + QDialogButtonBox::Close - - gate - - - - - + + + buttonBox + rejected() + BattleChipView + close() + + + 310 + 632 + + + 310 + 331 + + + + From 64ad73c9f9c32334e117ff4fc6c930f981ec07db Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 21 Feb 2019 18:18:52 -0800 Subject: [PATCH 07/20] Qt: Add placeholders, minor revamps --- res/{chip-names-4.txt => exe4/chip-names.txt} | 0 res/exe4/placeholder.png | Bin 0 -> 483 bytes res/{chip-names-5.txt => exe5/chip-names.txt} | 0 res/exe5/placeholder.png | Bin 0 -> 475 bytes res/{chip-names-6.txt => exe6/chip-names.txt} | 0 res/exe6/placeholder.png | Bin 0 -> 476 bytes src/platform/qt/BattleChipView.cpp | 16 ++++++++++++++-- src/platform/qt/BattleChipView.ui | 4 ++-- src/platform/qt/resources.qrc | 9 ++++++--- 9 files changed, 22 insertions(+), 7 deletions(-) rename res/{chip-names-4.txt => exe4/chip-names.txt} (100%) create mode 100644 res/exe4/placeholder.png rename res/{chip-names-5.txt => exe5/chip-names.txt} (100%) create mode 100644 res/exe5/placeholder.png rename res/{chip-names-6.txt => exe6/chip-names.txt} (100%) create mode 100644 res/exe6/placeholder.png diff --git a/res/chip-names-4.txt b/res/exe4/chip-names.txt similarity index 100% rename from res/chip-names-4.txt rename to res/exe4/chip-names.txt diff --git a/res/exe4/placeholder.png b/res/exe4/placeholder.png new file mode 100644 index 0000000000000000000000000000000000000000..f057bb2492d68c79ce533643aaee068278c11ed7 GIT binary patch literal 483 zcmV<90UZ8`P)|uP87m5D2<6)s*kkDKPX9OTb#_3c3x% zE8q#HBcBfnget?fv)|mXgmP&S2cZFoQ9! zU>SVbLy1Kx1&nnqhrCcq2_ve1iUJKS;Ly{@Awrc?i{7wSA0YUh_{@p_d{$Gj6G57~9R%DGK zVU8EX_a1mrMP`#4n8Xw3u?ghRZ^Eu>s z+6bG2lHb)bq6E)M`E$gzdLDYxSaL%+7G8|f2>_L~F@*bb#D!wK5zic`tc}MpKgr1{ z_cT^GxU4AjTR$T{GvP4ixaQ~KzG;#QVKR6C9l-k*hT~{%NCA=qTyky3p6YidFvi;2 zr2DGxVJsmN-#;vdFy3KSGJtWMe}EIYusKt=tM?6c$u+mRk?sDWy|FF_%^$v+Nj+2L R&XNEC002ovPDHLkV1mLO)nfnv literal 0 HcmV?d00001 diff --git a/res/chip-names-6.txt b/res/exe6/chip-names.txt similarity index 100% rename from res/chip-names-6.txt rename to res/exe6/chip-names.txt diff --git a/res/exe6/placeholder.png b/res/exe6/placeholder.png new file mode 100644 index 0000000000000000000000000000000000000000..7873bb227f646c31efbc299850301fe5bb83c0ed GIT binary patch literal 476 zcmV<20VDp2P)A@Bg@m%DohDB&X3VbAJ9-L?_P863jLz^%cUX#&AeRTzpo< zil10z#jh;UEeP8XwjpdoXrW?W6{Lxj*g#HpFeXZAt<<-ae$f^&k)uQprIxsOY8g3BtSZ1(W*Dz>PQ;IR6rCgo z)BMbd&J{U@@rjTVopbt?N=>2h2;0et)<m!+Bj(7$Zw!f%C)| zS@-C|$YYN)XxhZw;_BkW$Yvb6{O!} #include +#include #include #include @@ -32,6 +33,13 @@ BattleChipView::BattleChipView(std::shared_ptr controller, QWidg core->getGameCode(core, title); QString qtitle(title); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) + int size = QFontMetrics(QFont()).height() / ((int) ceil(devicePixelRatioF()) * 16); +#else + int size = QFontMetrics(QFont()).height() / (devicePixelRatio() * 16); +#endif + m_ui.chipList->setGridSize(m_ui.chipList->gridSize() * size); + m_ui.chipList->setIconSize(m_ui.chipList->iconSize() * size); connect(m_ui.chipId, static_cast(&QSpinBox::valueChanged), m_ui.inserted, [this]() { m_ui.inserted->setChecked(Qt::Unchecked); @@ -124,7 +132,11 @@ void BattleChipView::addChip() { } QListWidgetItem* add = new QListWidgetItem(m_chipIdToName[insertedChip]); add->setData(Qt::UserRole, insertedChip); - add->setIcon(QIcon(QString(":/res/exe%1/%2.png").arg(m_flavor).arg(insertedChip, 3, 10, QLatin1Char('0')))); + QString path = QString(":/res/exe%1/%2.png").arg(m_flavor).arg(insertedChip, 3, 10, QLatin1Char('0')); + if (!QFile(path).exists()) { + path = QString(":/res/exe%1/placeholder.png").arg(m_flavor); + } + add->setIcon(QIcon(path)); m_ui.chipList->addItem(add); } @@ -143,7 +155,7 @@ void BattleChipView::loadChipNames(int flavor) { } m_flavor = flavor; - QFile file(QString(":/res/chip-names-%1.txt").arg(flavor)); + QFile file(QString(":/res/exe%1/chip-names.txt").arg(flavor)); file.open(QIODevice::ReadOnly | QIODevice::Text); int id = 0; while (true) { diff --git a/src/platform/qt/BattleChipView.ui b/src/platform/qt/BattleChipView.ui index 14ce62c55..10e8000d8 100644 --- a/src/platform/qt/BattleChipView.ui +++ b/src/platform/qt/BattleChipView.ui @@ -151,8 +151,8 @@ - 160 - 128 + 80 + 72 diff --git a/src/platform/qt/resources.qrc b/src/platform/qt/resources.qrc index ea08c5e39..990203809 100644 --- a/src/platform/qt/resources.qrc +++ b/src/platform/qt/resources.qrc @@ -4,8 +4,11 @@ ../../../res/keymap.qpic ../../../res/patrons.txt ../../../res/no-cam.png - ../../../res/chip-names-4.txt - ../../../res/chip-names-5.txt - ../../../res/chip-names-6.txt + ../../../res/exe4/chip-names.txt + ../../../res/exe4/placeholder.png + ../../../res/exe5/chip-names.txt + ../../../res/exe5/placeholder.png + ../../../res/exe6/chip-names.txt + ../../../res/exe6/placeholder.png From 475c7790c5ddd94127eaa0f4b6b569e7beae2f79 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 21 Feb 2019 19:13:50 -0800 Subject: [PATCH 08/20] Qt: Add BattleChip "deck" save/load --- src/platform/qt/BattleChipView.cpp | 58 +++++- src/platform/qt/BattleChipView.h | 4 + src/platform/qt/BattleChipView.ui | 307 ++++++++++++++++++----------- 3 files changed, 246 insertions(+), 123 deletions(-) diff --git a/src/platform/qt/BattleChipView.cpp b/src/platform/qt/BattleChipView.cpp index e05785f4f..53c9a3024 100644 --- a/src/platform/qt/BattleChipView.cpp +++ b/src/platform/qt/BattleChipView.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include using namespace QGBA; @@ -53,6 +54,8 @@ BattleChipView::BattleChipView(std::shared_ptr controller, QWidg connect(m_ui.add, &QAbstractButton::clicked, this, &BattleChipView::addChip); connect(m_ui.remove, &QAbstractButton::clicked, this, &BattleChipView::removeChip); connect(controller.get(), &CoreController::stopping, this, &QWidget::close); + connect(m_ui.save, &QAbstractButton::clicked, this, &BattleChipView::saveDeck); + connect(m_ui.load, &QAbstractButton::clicked, this, &BattleChipView::loadDeck); connect(m_ui.gateBattleChip, &QAbstractButton::toggled, this, [this](bool on) { if (on) { @@ -130,9 +133,13 @@ void BattleChipView::addChip() { if (insertedChip < 1) { return; } - QListWidgetItem* add = new QListWidgetItem(m_chipIdToName[insertedChip]); - add->setData(Qt::UserRole, insertedChip); - QString path = QString(":/res/exe%1/%2.png").arg(m_flavor).arg(insertedChip, 3, 10, QLatin1Char('0')); + addChipId(insertedChip); +} + +void BattleChipView::addChipId(int id) { + QListWidgetItem* add = new QListWidgetItem(m_chipIdToName[id]); + add->setData(Qt::UserRole, id); + QString path = QString(":/res/exe%1/%2.png").arg(m_flavor).arg(id, 3, 10, QLatin1Char('0')); if (!QFile(path).exists()) { path = QString(":/res/exe%1/placeholder.png").arg(m_flavor); } @@ -184,4 +191,49 @@ void BattleChipView::advanceFrameCounter() { if (m_frameCounter >= 0) { --m_frameCounter; } +} + +void BattleChipView::saveDeck() { + QString filename = GBAApp::app()->getSaveFileName(this, tr("Select deck file"), tr(("BattleChip deck file (*.deck)"))); + if (filename.isEmpty()) { + return; + } + + QStringList deck; + for (int i = 0; i < m_ui.chipList->count(); ++i) { + deck.append(m_ui.chipList->item(i)->data(Qt::UserRole).toString()); + } + + QSettings ini(filename, QSettings::IniFormat); + ini.clear(); + ini.beginGroup("BattleChipDeck"); + ini.setValue("version", m_flavor); + ini.setValue("deck", deck.join(',')); + ini.sync(); +} + +void BattleChipView::loadDeck() { + QString filename = GBAApp::app()->getOpenFileName(this, tr("Select deck file"), tr(("BattleChip deck file (*.deck)"))); + if (filename.isEmpty()) { + return; + } + + QSettings ini(filename, QSettings::IniFormat); + ini.beginGroup("BattleChipDeck"); + int flavor = ini.value("version").toInt(); + if (flavor != m_flavor) { + return; + } + + while (m_ui.chipList->count()) { + delete m_ui.chipList->takeItem(m_ui.chipList->count() - 1); + } + QStringList deck = ini.value("deck").toString().split(','); + for (const auto& item : deck) { + bool ok; + int id = item.toInt(&ok); + if (ok) { + addChipId(id); + } + } } \ No newline at end of file diff --git a/src/platform/qt/BattleChipView.h b/src/platform/qt/BattleChipView.h index 6b4582c36..423c937c8 100644 --- a/src/platform/qt/BattleChipView.h +++ b/src/platform/qt/BattleChipView.h @@ -32,8 +32,12 @@ public slots: private slots: void advanceFrameCounter(); void addChip(); + void addChipId(int); void removeChip(); + void saveDeck(); + void loadDeck(); + private: static const int UNINSERTED_TIME = 10; diff --git a/src/platform/qt/BattleChipView.ui b/src/platform/qt/BattleChipView.ui index 10e8000d8..a31513ced 100644 --- a/src/platform/qt/BattleChipView.ui +++ b/src/platform/qt/BattleChipView.ui @@ -6,121 +6,15 @@ 0 0 - 794 - 893 + 630 + 722 BattleChip Gate - - - - - - - Gate type - - - - - - - Ba&ttleChip Gate - - - true - - - - - - - Progress &Gate - - - - - - - Beast &Link Gate - - - - - - - - - - - Chip ID - - - - - - - 65535 - - - - - - - Inserted - - - - - - - - - Qt::Vertical - - - - - - - - - - - - - - Chip name - - - - - - - - - Add - - - - - - - Remove - - - - - - - Insert - - - - - - + + true @@ -160,30 +54,203 @@ - - - - QDialogButtonBox::Close - + + + + + + + + + + + Chip name + + + + + + + + + Insert + + + + + + + + + + + Save + + + + + + + Load + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Add + + + + + + + Remove + + + + + + + + + false + + + + + + + + Gate type + + + + + + + Ba&ttleChip Gate + + + true + + + + + + + Progress &Gate + + + + + + + Beast &Link Gate + + + + + + + + + Qt::Vertical + + + + + + + + + Chip ID + + + + + + + 65535 + + + + + + + Inserted + + + + + + + + + + + + Show advanced + + + + + + + QDialogButtonBox::Close + + + + + + + showAdvanced + toggled(bool) + advanced + setVisible(bool) + + + 109 + 34 + + + 396 + 654 + + + buttonBox rejected() BattleChipView - close() + reject() - 310 - 632 + 416 + 690 - 310 - 331 + 314 + 360 From b4698ab638e172b18892d9c16f392ae08d223e09 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 18:45:54 -0800 Subject: [PATCH 09/20] Qt: Kick focus back to main window when clicking a chip --- src/platform/qt/BattleChipView.cpp | 7 ++++++- src/platform/qt/BattleChipView.h | 5 ++++- src/platform/qt/Window.cpp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/platform/qt/BattleChipView.cpp b/src/platform/qt/BattleChipView.cpp index 53c9a3024..2e00ac47b 100644 --- a/src/platform/qt/BattleChipView.cpp +++ b/src/platform/qt/BattleChipView.cpp @@ -8,6 +8,8 @@ #include "ConfigController.h" #include "CoreController.h" #include "GBAApp.h" +#include "ShortcutController.h" +#include "Window.h" #include #include @@ -18,9 +20,10 @@ using namespace QGBA; -BattleChipView::BattleChipView(std::shared_ptr controller, QWidget* parent) +BattleChipView::BattleChipView(std::shared_ptr controller, Window* window, QWidget* parent) : QDialog(parent) , m_controller(controller) + , m_window(window) { QResource::registerResource(GBAApp::dataDir() + "/chips.rcc"); QResource::registerResource(ConfigController::configDir() + "/chips.rcc"); @@ -126,6 +129,8 @@ void BattleChipView::reinsert() { } else { insertChip(true); } + m_window->setWindowState(m_window->windowState() & ~Qt::WindowActive); + m_window->setWindowState(m_window->windowState() | Qt::WindowActive); } void BattleChipView::addChip() { diff --git a/src/platform/qt/BattleChipView.h b/src/platform/qt/BattleChipView.h index 423c937c8..ca6dfb942 100644 --- a/src/platform/qt/BattleChipView.h +++ b/src/platform/qt/BattleChipView.h @@ -16,12 +16,13 @@ namespace QGBA { class CoreController; +class Window; class BattleChipView : public QDialog { Q_OBJECT public: - BattleChipView(std::shared_ptr controller, QWidget* parent = nullptr); + BattleChipView(std::shared_ptr controller, Window* window, QWidget* parent = nullptr); ~BattleChipView(); public slots: @@ -52,6 +53,8 @@ private: int m_frameCounter = -1; bool m_next = false; + + Window* m_window; }; } \ No newline at end of file diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 26c588d88..7d53ea420 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1370,7 +1370,7 @@ void Window::setupMenu(QMenuBar* menubar) { #ifdef M_CORE_GBA QAction* bcGate = new QAction(tr("BattleChip Gate..."), emulationMenu); - connect(bcGate, &QAction::triggered, openControllerTView()); + connect(bcGate, &QAction::triggered, openControllerTView(this)); addControlledAction(emulationMenu, bcGate, "bcGate"); m_gbaActions.append(bcGate); m_gameActions.append(bcGate); From 407f5988aaead60853542c7ec3503f1dcba074fa Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 18:47:43 -0800 Subject: [PATCH 10/20] Qt: Quality of life improvements for BattleChip UI --- src/platform/qt/BattleChipView.cpp | 38 +++++++++------- src/platform/qt/BattleChipView.h | 2 +- src/platform/qt/BattleChipView.ui | 70 ++++++++++++++++++++---------- src/platform/qt/resources.qrc | 27 +++++++----- 4 files changed, 85 insertions(+), 52 deletions(-) diff --git a/src/platform/qt/BattleChipView.cpp b/src/platform/qt/BattleChipView.cpp index 2e00ac47b..42cca1fc4 100644 --- a/src/platform/qt/BattleChipView.cpp +++ b/src/platform/qt/BattleChipView.cpp @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include #include @@ -21,12 +23,12 @@ using namespace QGBA; BattleChipView::BattleChipView(std::shared_ptr controller, Window* window, QWidget* parent) - : QDialog(parent) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint) , m_controller(controller) , m_window(window) { - QResource::registerResource(GBAApp::dataDir() + "/chips.rcc"); - QResource::registerResource(ConfigController::configDir() + "/chips.rcc"); + QResource::registerResource(GBAApp::dataDir() + "/chips.rcc", "/exe"); + QResource::registerResource(ConfigController::configDir() + "/chips.rcc", "/exe"); m_ui.setupUi(this); @@ -38,12 +40,12 @@ BattleChipView::BattleChipView(std::shared_ptr controller, Windo QString qtitle(title); #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) - int size = QFontMetrics(QFont()).height() / ((int) ceil(devicePixelRatioF()) * 16); + int size = QFontMetrics(QFont()).height() / ((int) ceil(devicePixelRatioF()) * 12); #else - int size = QFontMetrics(QFont()).height() / (devicePixelRatio() * 16); + int size = QFontMetrics(QFont()).height() / (devicePixelRatio() * 12); #endif - m_ui.chipList->setGridSize(m_ui.chipList->gridSize() * size); m_ui.chipList->setIconSize(m_ui.chipList->iconSize() * size); + m_ui.chipList->setGridSize(m_ui.chipList->gridSize() * size); connect(m_ui.chipId, static_cast(&QSpinBox::valueChanged), m_ui.inserted, [this]() { m_ui.inserted->setChecked(Qt::Unchecked); @@ -59,6 +61,7 @@ BattleChipView::BattleChipView(std::shared_ptr controller, Windo connect(controller.get(), &CoreController::stopping, this, &QWidget::close); connect(m_ui.save, &QAbstractButton::clicked, this, &BattleChipView::saveDeck); connect(m_ui.load, &QAbstractButton::clicked, this, &BattleChipView::loadDeck); + connect(m_ui.buttonBox->button(QDialogButtonBox::Reset), &QAbstractButton::clicked, m_ui.chipList, &QListWidget::clear); connect(m_ui.gateBattleChip, &QAbstractButton::toggled, this, [this](bool on) { if (on) { @@ -144,11 +147,11 @@ void BattleChipView::addChip() { void BattleChipView::addChipId(int id) { QListWidgetItem* add = new QListWidgetItem(m_chipIdToName[id]); add->setData(Qt::UserRole, id); - QString path = QString(":/res/exe%1/%2.png").arg(m_flavor).arg(id, 3, 10, QLatin1Char('0')); + QString path = QString(":/exe/exe%1/%2.png").arg(m_flavor).arg(id, 3, 10, QLatin1Char('0')); if (!QFile(path).exists()) { - path = QString(":/res/exe%1/placeholder.png").arg(m_flavor); + path = QString(":/exe/exe%1/placeholder.png").arg(m_flavor); } - add->setIcon(QIcon(path)); + add->setIcon(QPixmap(path).scaled(m_ui.chipList->iconSize())); m_ui.chipList->addItem(add); } @@ -167,7 +170,7 @@ void BattleChipView::loadChipNames(int flavor) { } m_flavor = flavor; - QFile file(QString(":/res/exe%1/chip-names.txt").arg(flavor)); + QFile file(QString(":/exe/exe%1/chip-names.txt").arg(flavor)); file.open(QIODevice::ReadOnly | QIODevice::Text); int id = 0; while (true) { @@ -227,12 +230,17 @@ void BattleChipView::loadDeck() { ini.beginGroup("BattleChipDeck"); int flavor = ini.value("version").toInt(); if (flavor != m_flavor) { + QMessageBox* error = new QMessageBox(this); + error->setIcon(QMessageBox::Warning); + error->setStandardButtons(QMessageBox::Ok); + error->setWindowTitle(tr("Incompatible deck")); + error->setText(tr("The selected deck is not compatible with this Chip Gate")); + error->setAttribute(Qt::WA_DeleteOnClose); + error->show(); return; } - - while (m_ui.chipList->count()) { - delete m_ui.chipList->takeItem(m_ui.chipList->count() - 1); - } + + m_ui.chipList->clear(); QStringList deck = ini.value("deck").toString().split(','); for (const auto& item : deck) { bool ok; @@ -241,4 +249,4 @@ void BattleChipView::loadDeck() { addChipId(id); } } -} \ No newline at end of file +} diff --git a/src/platform/qt/BattleChipView.h b/src/platform/qt/BattleChipView.h index ca6dfb942..88a24d8a3 100644 --- a/src/platform/qt/BattleChipView.h +++ b/src/platform/qt/BattleChipView.h @@ -57,4 +57,4 @@ private: Window* m_window; }; -} \ No newline at end of file +} diff --git a/src/platform/qt/BattleChipView.ui b/src/platform/qt/BattleChipView.ui index a31513ced..f379a3bdc 100644 --- a/src/platform/qt/BattleChipView.ui +++ b/src/platform/qt/BattleChipView.ui @@ -13,7 +13,7 @@ BattleChip Gate - + @@ -35,7 +35,7 @@ - QListView::Snap + QListView::Static true @@ -45,13 +45,19 @@ - 80 + 120 72 QListView::IconMode + + false + + + true + @@ -174,10 +180,10 @@ - - + + - Chip ID + Inserted @@ -188,10 +194,10 @@ - - + + - Inserted + Chip ID @@ -200,19 +206,19 @@ + + + + Show advanced + + + - - - - Show advanced - - - - QDialogButtonBox::Close + QDialogButtonBox::Close|QDialogButtonBox::Reset @@ -222,6 +228,22 @@ + + buttonBox + rejected() + BattleChipView + reject() + + + 416 + 690 + + + 314 + 360 + + + showAdvanced toggled(bool) @@ -239,18 +261,18 @@ - buttonBox - rejected() - BattleChipView - reject() + chipList + indexesMoved(QModelIndexList) + chipList + doItemsLayout() - 416 - 690 + 314 + 203 314 - 360 + 203 diff --git a/src/platform/qt/resources.qrc b/src/platform/qt/resources.qrc index 990203809..bfc5235cc 100644 --- a/src/platform/qt/resources.qrc +++ b/src/platform/qt/resources.qrc @@ -1,14 +1,17 @@ - + + - ../../../res/mgba-1024.png - ../../../res/keymap.qpic - ../../../res/patrons.txt - ../../../res/no-cam.png - ../../../res/exe4/chip-names.txt - ../../../res/exe4/placeholder.png - ../../../res/exe5/chip-names.txt - ../../../res/exe5/placeholder.png - ../../../res/exe6/chip-names.txt - ../../../res/exe6/placeholder.png + ../../../res/mgba-1024.png + ../../../res/keymap.qpic + ../../../res/patrons.txt + ../../../res/no-cam.png - + + ../../../res/exe4/chip-names.txt + ../../../res/exe4/placeholder.png + ../../../res/exe5/chip-names.txt + ../../../res/exe5/placeholder.png + ../../../res/exe6/chip-names.txt + ../../../res/exe6/placeholder.png + + From 6aa5647fc4b3d45aaa138a1541e0cba582056a5a Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 18:48:41 -0800 Subject: [PATCH 11/20] GBA DMA: Fix Display Start DMAs --- CHANGES | 1 + src/gba/dma.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 67845a325..c9646faf8 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Bugfixes: - GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM - Python: Fix crash when deleting files owned by library - Python: Make sure GB link object isn't GC'd before GB object + - GBA DMA: Fix Display Start DMAs Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gba/dma.c b/src/gba/dma.c index d3ad66c8a..3aad223ea 100644 --- a/src/gba/dma.c +++ b/src/gba/dma.c @@ -182,7 +182,7 @@ void _dmaEvent(struct mTiming* timing, void* context, uint32_t cyclesLate) { dma->nextCount = 0; bool noRepeat = !GBADMARegisterIsRepeat(dma->reg); noRepeat |= GBADMARegisterGetTiming(dma->reg) == GBA_DMA_TIMING_NOW; - noRepeat |= memory->activeDMA == 3 && GBADMARegisterGetTiming(dma->reg) == GBA_DMA_TIMING_CUSTOM; + noRepeat |= memory->activeDMA == 3 && GBADMARegisterGetTiming(dma->reg) == GBA_DMA_TIMING_CUSTOM && gba->video.vcount == VIDEO_VERTICAL_PIXELS + 1; if (noRepeat) { dma->reg = GBADMARegisterClearEnable(dma->reg); From ef2b6c78ff28f1adfff85ab21620eec598c5fbde Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 18:49:23 -0800 Subject: [PATCH 12/20] GBA DMA: Fix DMA start/end timing --- CHANGES | 1 + src/gba/dma.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index c9646faf8..362272cfd 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ Bugfixes: - Python: Fix crash when deleting files owned by library - Python: Make sure GB link object isn't GC'd before GB object - GBA DMA: Fix Display Start DMAs + - GBA DMA: Fix DMA start/end timing Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gba/dma.c b/src/gba/dma.c index 3aad223ea..eb66635c4 100644 --- a/src/gba/dma.c +++ b/src/gba/dma.c @@ -237,9 +237,6 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) { gba->cpuBlocked = true; if (info->count == info->nextCount) { - if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) { - cycles += 2; - } if (width == 4) { cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion]; } else { @@ -302,6 +299,9 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) { info->nextDest = dest; if (!wordsRemaining) { info->nextCount |= 0x80000000; + if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) { + info->when += 2; + } } GBADMAUpdate(gba); } From 56d263ef2456baa0781583839d91d3352cad272d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 18:50:07 -0800 Subject: [PATCH 13/20] Qt: Fix window icon on X11 --- CHANGES | 1 + src/platform/qt/Window.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 362272cfd..19b6c569f 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,7 @@ Bugfixes: - Python: Make sure GB link object isn't GC'd before GB object - GBA DMA: Fix Display Start DMAs - GBA DMA: Fix DMA start/end timing + - Qt: Fix window icon on X11 Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 7d53ea420..f655998c0 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -85,6 +85,7 @@ Window::Window(CoreManager* manager, ConfigController* config, int playerId, QWi m_logo.setDevicePixelRatio(m_screenWidget->devicePixelRatio()); m_logo = m_logo; // Free memory left over in old pixmap + setWindowIcon(m_logo); #if defined(M_CORE_GBA) float i = 2; From 5effd9c1132216b683291baa850965747663b7ff Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 22:22:06 -0800 Subject: [PATCH 14/20] GB, GBA Serialize: Fix loading two states in a row --- CHANGES | 1 + src/gb/serialize.c | 2 +- src/gba/serialize.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 19b6c569f..72bdd0dd5 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ Bugfixes: - GBA DMA: Fix Display Start DMAs - GBA DMA: Fix DMA start/end timing - Qt: Fix window icon on X11 + - GB, GBA Serialize: Fix loading two states in a row Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gb/serialize.c b/src/gb/serialize.c index 6c3db6308..7a4f5de4b 100644 --- a/src/gb/serialize.c +++ b/src/gb/serialize.c @@ -138,7 +138,7 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) { if (error) { return false; } - gb->timing.root = NULL; + mTimingClear(&gb->timing); LOAD_32LE(gb->timing.masterCycles, 0, &state->masterCycles); gb->cpu->a = state->cpu.a; diff --git a/src/gba/serialize.c b/src/gba/serialize.c index 458ba3d3a..60b8524ca 100644 --- a/src/gba/serialize.c +++ b/src/gba/serialize.c @@ -132,7 +132,7 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) { if (error) { return false; } - gba->timing.root = NULL; + mTimingClear(&gba->timing); LOAD_32(gba->timing.masterCycles, 0, &state->masterCycles); size_t i; From e5161b766d6b8bdd21a174724b435c68185462e0 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Feb 2019 00:13:22 -0800 Subject: [PATCH 15/20] GBA Video: Fix enabling layers in non-tile modes (fixes #1317) --- CHANGES | 1 + src/gba/renderers/video-software.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 72bdd0dd5..db72bf169 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,7 @@ Bugfixes: - GBA DMA: Fix DMA start/end timing - Qt: Fix window icon on X11 - GB, GBA Serialize: Fix loading two states in a row + - GBA Video: Fix enabling layers in non-tile modes (fixes mgba.io/i/1317) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 614f9087f..f31239d09 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -727,7 +727,8 @@ static void _enableBg(struct GBAVideoSoftwareRenderer* renderer, int bg, bool ac if (!active) { renderer->bg[bg].enabled = 0; } else if (!wasActive && active) { - if (renderer->nextY == 0) { + if (renderer->nextY == 0 || GBARegisterDISPCNTGetMode(renderer->dispcnt) > 2) { + // TODO: Investigate in more depth how switching background works in different modes renderer->bg[bg].enabled = 4; } else { renderer->bg[bg].enabled = 1; From 31dc70e6370239292dee9649b54e28ff71f08073 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Feb 2019 01:15:58 -0800 Subject: [PATCH 16/20] Qt: Fix quick load recent accidentally saving (fixes #1309) --- CHANGES | 1 + src/platform/qt/Window.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index db72bf169..05309b6b5 100644 --- a/CHANGES +++ b/CHANGES @@ -24,6 +24,7 @@ Bugfixes: - Qt: Fix window icon on X11 - GB, GBA Serialize: Fix loading two states in a row - GBA Video: Fix enabling layers in non-tile modes (fixes mgba.io/i/1317) + - Qt: Fix quick load recent accidentally saving (fixes mgba.io/i/1309) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index f655998c0..d46b107bf 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1108,7 +1108,7 @@ void Window::setupMenu(QMenuBar* menubar) { addControlledAction(quickLoadMenu, quickLoad, "quickLoad"); QAction* quickSave = new QAction(tr("Save recent"), quickSaveMenu); - connect(quickLoad, &QAction::triggered, [this] { + connect(quickSave, &QAction::triggered, [this] { m_controller->saveState(); }); m_gameActions.append(quickSave); From 92aa78cf0c374e37ba4ef3b7f95a969295e15847 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Feb 2019 02:08:30 -0800 Subject: [PATCH 17/20] GBA: Fix video timing when skipping BIOS (fixes #1318) --- CHANGES | 1 + src/gba/gba.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 05309b6b5..e8f2be434 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,7 @@ Bugfixes: - GB, GBA Serialize: Fix loading two states in a row - GBA Video: Fix enabling layers in non-tile modes (fixes mgba.io/i/1317) - Qt: Fix quick load recent accidentally saving (fixes mgba.io/i/1309) + - GBA: Fix video timing when skipping BIOS (fixes mgba.io/i/1318) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gba/gba.c b/src/gba/gba.c index 8954df16b..357910767 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -254,7 +254,8 @@ void GBASkipBIOS(struct GBA* gba) { } else { cpu->gprs[ARM_PC] = BASE_WORKING_RAM; } - gba->memory.io[REG_VCOUNT >> 1] = 0x7E; + gba->video.vcount = 0x7D; + gba->memory.io[REG_VCOUNT >> 1] = 0x7D; gba->memory.io[REG_POSTFLG >> 1] = 1; ARMWritePC(cpu); } From 4b32348601c17f69f24eaa05f8ec6c75b56233d9 Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Sat, 23 Feb 2019 22:46:03 +0100 Subject: [PATCH 18/20] Qt: Update German GUI translation --- src/platform/qt/ts/mgba-de.ts | 813 ++++++++++++++++++++-------------- 1 file changed, 476 insertions(+), 337 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index 5f2748367..8e6b08892 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -125,6 +125,79 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.0x00 (00) + + BattleChipView + + + BattleChip Gate + BattleChip Gate + + + + Chip name + Chip-Name + + + + Insert + Einsetzen + + + + Save + Speichern + + + + Load + Laden + + + + Add + Hinzufügen + + + + Remove + Entfernen + + + + Gate type + Gate-Typ + + + + Ba&ttleChip Gate + Ba&ttleChip Gate + + + + Progress &Gate + Progress &Gate + + + + Beast &Link Gate + Beast &Link Gate + + + + Inserted + Eingesetzt + + + + Chip ID + Chip-ID + + + + Show advanced + Erweiterte Optionen anzeigen + + CheatsView @@ -632,56 +705,56 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. - 1 Byte - 1 Byte + &1 Byte + &1 Byte - 2 Bytes - 2 Bytes + &2 Bytes + &2 Bytes - 4 Bytes - 4 Bytes + &4 Bytes + &4 Bytes - + Signed Integer: Signed Integer: - + String: String: - + Load TBL TBL laden - + Copy Selection Auswahl kopieren - + Paste Einfügen - + Save Selection Auswahl speichern - + Load Laden - + Unsigned Integer: Unsigned Integer: @@ -1211,22 +1284,22 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::CoreController - + Failed to open save file: %1 Fehler beim Öffnen der Speicherdatei: %1 - + Failed to open game file: %1 Fehler beim Öffnen der Spieldatei: %1 - + Failed to open snapshot file for reading: %1 Konnte Snapshot-Datei %1 nicht zum Lesen öffnen - + Failed to open snapshot file for writing: %1 Konnte Snapshot-Datei %1 nicht zum Schreiben öffnen @@ -2728,40 +2801,89 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Speicherplatz %1 + + QGBA::LogConfigModel + + + + Default + Standard + + + + Fatal + Kritisch + + + + Error + Fehler + + + + Warning + Warnung + + + + Info + Info + + + + Debug + Debug + + + + Stub + Stub + + + + Game Error + Spiel-Fehler + + QGBA::LogController - + + [%1] %2: %3 + [%1] %2: %3 + + + DEBUG DEBUG - + STUB STUB - + INFO INFO - + WARN WARN - + ERROR ERROR - + FATAL FATAL - + GAME ERROR GAME ERROR @@ -2903,54 +3025,54 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::ObjView - - + + 0x%0 0x%0 - + Off Aus - + Normal Normal - + Trans Trans - + OBJWIN OBJWIN - + Invalid Ungültig - - + + N/A N/A - + Export sprite Sprite exportieren - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - + Failed to open output PNG file: %1 Fehler beim Öffnen der Ausgabe-PNG-Datei: %1 @@ -2995,19 +3117,6 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Fehler beim Öffnen der Ausgabe-Palettendatei: %1 - - QGBA::PrinterView - - - Save Printout - Ausdruck speichern - - - - Portable Network Graphics (*.png) - Portable Network Graphics (*.png) - - QGBA::ROMInfo @@ -3034,59 +3143,59 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::SettingsView - - + + Qt Multimedia Qt Multimedia - + SDL SDL - + Software (Qt) Software (Qt) - + OpenGL OpenGL - + OpenGL (force version 1.x) OpenGL (erzwinge Version 1.x) - + None (Still Image) Keiner (Standbild) - + Keyboard Tastatur - + Controllers Gamepads - + Shortcuts Tastenkürzel - - + + Shaders Shader - + Select BIOS BIOS auswählen @@ -3163,103 +3272,103 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance-ROMs (%1) - + Game Boy ROMs (%1) Game Boy-ROMs (%1) - + All ROMs (%1) Alle ROMs (%1) - + %1 Video Logs (*.mvl) %1 Video-Logs (*.mvl) - + Archives (%1) Archive (%1) - - - + + + Select ROM ROM auswählen - + Game Boy Advance save files (%1) Game Boy Advance-Speicherdateien (%1) - - - + + + Select save Speicherdatei wählen - + mGBA savestate files (%1) mGBA Savestate-Dateien (%1) - - + + Select savestate Savestate auswählen - + Select patch Patch wählen - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select image Bild auswählen - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Bild-Datei (*.png *.gif *.jpg *.jpeg);;Alle Dateien (*) - - + + GameShark saves (*.sps *.xps) GameShark-Speicherdaten (*.sps *.xps) - + Select video log Video-Log auswählen - + Video logs (*.mvl) Video-Logs (*.mvl) - + Crash Absturz - + The game has crashed with the following error: %1 @@ -3268,628 +3377,633 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. - + Couldn't Load Konnte nicht geladen werden - + Could not load game. Are you sure it's in the correct format? Konnte das Spiel nicht laden. Sind Sie sicher, dass es im korrekten Format vorliegt? - + Unimplemented BIOS call Nicht implementierter BIOS-Aufruf - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Dieses Spiel verwendet einen BIOS-Aufruf, der nicht implementiert ist. Bitte verwenden Sie für die beste Spielerfahrung das offizielle BIOS. - + Really make portable? Portablen Modus wirklich aktivieren? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Diese Einstellung wird den Emulator so konfigurieren, dass er seine Konfiguration aus dem gleichen Verzeichnis wie die Programmdatei lädt. Möchten Sie fortfahren? - + Restart needed Neustart benötigt - + Some changes will not take effect until the emulator is restarted. Einige Änderungen werden erst übernommen, wenn der Emulator neu gestartet wurde. - + - Player %1 of %2 - Spieler %1 von %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 Bilder/Sekunde) - %4 - + &File &Datei - + Load &ROM... &ROM laden... - + Load ROM in archive... ROM aus Archiv laden... - + Load alternate save... Alternative Speicherdatei laden... - + Load temporary save... Temporäre Speicherdatei laden... - + Load &patch... &Patch laden... - + Boot BIOS BIOS booten - + Replace ROM... ROM ersetzen... - + ROM &info... ROM-&Informationen... - + Recent Zuletzt verwendet - + Make portable Portablen Modus aktivieren - + &Load state Savestate (aktueller Zustand) &laden - + F10 F10 - + Load state file... Ssavestate-Datei laden... - + &Save state Savestate (aktueller Zustand) &speichern - + Shift+F10 Umschalt+F10 - + Save state file... Savestate-Datei speichern... - + Quick load Schnell laden - + Quick save Schnell speichern - + Load recent Lade zuletzt gespeicherten Savestate - + Save recent Speichere aktuellen Zustand - + Undo load state Laden des Savestate rückgängig machen - + F11 F11 - + Undo save state Speichern des Savestate rückgängig machen - + Shift+F11 Umschalt+F11 - - + + State &%1 Savestate &%1 - + F%1 F%1 - + Shift+F%1 Umschalt+F%1 - + Load camera image... Lade Kamerabild... - + Import GameShark Save Importiere GameShark-Speicherstand - + Export GameShark Save Exportiere GameShark-Speicherstand - + New multiplayer window Neues Multiplayer-Fenster - + About Über - + E&xit &Beenden - + &Emulation &Emulation - + &Reset Zu&rücksetzen - + Ctrl+R Strg+R - + Sh&utdown Schli&eßen - + Yank game pak Spielmodul herausziehen - + &Pause &Pause - + Ctrl+P Strg+P - + &Next frame &Nächstes Bild - + Ctrl+N Strg+N - + Fast forward (held) Schneller Vorlauf (gehalten) - + &Fast forward Schneller &Vorlauf - + Shift+Tab Umschalt+Tab - + Fast forward speed Vorlauf-Geschwindigkeit - + Unbounded Unbegrenzt - + %0x %0x - + Rewind (held) Zurückspulen (gehalten) - + Re&wind Zur&ückspulen - + ~ ~ - + Step backwards Schrittweiser Rücklauf - + Ctrl+B Strg+B - + Sync to &video Mit &Video synchronisieren - + Sync to &audio Mit &Audio synchronisieren - + Solar sensor Solar-Sensor - + Increase solar level Sonnen-Level erhöhen - + Decrease solar level Sonnen-Level verringern - + Brightest solar level Hellster Sonnen-Level - + Darkest solar level Dunkelster Sonnen-Level - + Brightness %1 Helligkeit %1 - + + BattleChip Gate... + BattleChip Gate... + + + Audio/&Video Audio/&Video - + Frame size Bildgröße - + %1x %1x - + Toggle fullscreen Vollbildmodus umschalten - + Lock aspect ratio Seitenverhältnis korrigieren - + Force integer scaling Pixelgenaue Skalierung (Integer scaling) - + Frame&skip Frame&skip - + Mute Stummschalten - + FPS target Bildwiederholrate - + Take &screenshot &Screenshot erstellen - + F12 F12 - + Record output... Ausgabe aufzeichen... - + Record GIF... GIF aufzeichen... - + Record video log... Video-Log aufzeichnen... - + Stop video log Video-Log beenden - + Game Boy Printer... Game Boy Printer... - + Video layers Video-Ebenen - + Audio channels Audio-Kanäle - + Adjust layer placement... Lage der Bildebenen anpassen... - + &Tools &Werkzeuge - + View &logs... &Logs ansehen... - + Game &overrides... Spiel-&Überschreibungen... - + Game &Pak sensors... Game &Pak-Sensoren... - + &Cheats... &Cheats... - + Open debugger console... Debugger-Konsole öffnen... - + Start &GDB server... &GDB-Server starten... - + Settings... Einstellungen... - + Select folder Ordner auswählen - + Add folder to library... Ordner zur Bibliothek hinzufügen... - + Bilinear filtering Bilineare Filterung - + Native (59.7275) Nativ (59.7275) - + View &palette... &Palette betrachten... - + View &sprites... &Sprites betrachten... - + View &tiles... &Tiles betrachten... - + View &map... &Map betrachten... - + View memory... Speicher betrachten... - + Search memory... Speicher durchsuchen... - + View &I/O registers... &I/O-Register betrachten... - + Exit fullscreen Vollbildmodus beenden - + GameShark Button (held) GameShark-Taste (gehalten) - + Autofire Autofeuer - + Autofire A Autofeuer A - + Autofire B Autofeuer B - + Autofire L Autofeuer L - + Autofire R Autofeuer R - + Autofire Start Autofeuer Start - + Autofire Select Autofeuer Select - + Autofire Up Autofeuer nach oben - + Autofire Right Autofeuer rechts - + Autofire Down Autofeuer nach unten - + Autofire Left Autofeuer links @@ -4053,504 +4167,529 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Einstellungen - + Audio/Video Audio/Video - + Interface Benutzeroberfläche - + Emulation Emulation - + Paths Verzeichnisse - + + Logging + Protokoll + + + Game Boy Game Boy - + Audio driver: Audio-Treiber: - + Audio buffer: Audio-Puffer: - - + + 1536 1536 - + 512 512 - + 768 768 - + 1024 1024 - + 2048 2048 - + 3072 3072 - + 4096 4096 - + samples Samples - + Sample rate: Abtastrate: - - + + 44100 44100 - + 22050 22050 - + 32000 32000 - + 48000 48000 - + Hz Hz - + Volume: Lautstärke: - - + + Mute Stummschalten - + Fast forward volume: Vorspul-Lautstärke: - + Display driver: Anzeige-Treiber: - + Frameskip: Frameskip: - + Skip every Überspringe - - + + frames Bild(er) - + FPS target: Bildwiederholrate: - + frames per second Bilder pro Sekunde - + Sync: Synchronisierung: - + Video Video - + Audio Audio - + Lock aspect ratio Seitenverhältnis korrigieren - + Force integer scaling Erzwinge pixelgenaue Skalierung (Integer scaling) - + Language Sprache - + English Englisch - + List view Listenansicht - + Tree view Baumansicht - + Show FPS in title bar Bildwiederholrate in der Titelleiste anzeigen - + Automatically save cheats Cheats automatisch speichern - + Automatically load cheats Cheats automatisch laden - + Automatically save state Zustand (Savestate) automatisch speichern - + Automatically load state Zustand (Savestate) automatisch laden - + Cheats Cheats - + + Log to file + In Datei protokollieren + + + + Log to console + Auf die Konsole protokollieren + + + + Select Log File + Protokoll-Datei auswählen + + + Game Boy model Game Boy-Modell - - - + + + Autodetect Automatisch erkennen - - - + + + Game Boy (DMG) Game Boy (DMG) - - - + + + Super Game Boy (SGB) Super Game Boy (SGB) - - - + + + Game Boy Color (CGB) Game Boy Color (CGB) - - - + + + Game Boy Advance (AGB) Game Boy Advance (AGB) - + Super Game Boy model Super Game Boy-Modell - + Game Boy Color model Game Boy Color-Modell - + Default BG colors: Standard-Hintergrundfarben: - + Default sprite colors 1: Standard-Sprite-Farben 1: - + Default sprite colors 2: Standard-Sprite-Farben 2: - + + Use GBC colors in GB games + Verwende GBC-Farben in GB-Spielen + + + Super Game Boy borders Super Game Boy-Rahmen - + Camera driver: Kamera-Treiber: - + Library: Bibliothek: - + Show when no game open Anzeigen, wenn kein Spiel geöffnet ist - + Clear cache Cache leeren - + Fast forward speed: Vorlauf-Geschwindigkeit: - + Preload entire ROM into memory ROM-Datei vollständig in Arbeitsspeicher vorladen - - - - - - - - - + + + + + + + + + Browse Durchsuchen - + Use BIOS file if found BIOS-Datei verwenden, wenn vorhanden - + Skip BIOS intro BIOS-Intro überspringen - + × × - + Unbounded unbegrenzt - + Suspend screensaver Bildschirmschoner deaktivieren - + BIOS BIOS - + Pause when inactive Pause, wenn inaktiv - + Run all Alle ausführen - + Remove known Bekannte entfernen - + Detect and remove Erkennen und entfernen - + Allow opposing input directions Gegensätzliche Eingaberichtungen erlauben - - + + Screenshot Screenshot - - + + Save data Speicherdaten - - + + Cheat codes Cheat-Codes - + Enable rewind Rücklauf aktivieren - + Bilinear filtering Bilineare Filterung - + Rewind history: Rücklauf-Verlauf: - + Idle loops: Leerlaufprozesse: - + Savestate extra data: Zusätzliche Savestate-Daten: - + Load extra data: Lade zusätzliche Daten: - + Autofire interval: Autofeuer-Intervall: - + GB BIOS file: Datei mit GB-BIOS: - + GBA BIOS file: Datei mit GBA-BIOS: - + GBC BIOS file: Datei mit GBC-BIOS: - + SGB BIOS file: Datei mit SGB-BIOS: - + Save games Spielstände - - - - - + + + + + Same directory as the ROM Verzeichnis der ROM-Datei - + Save states Savestates - + Screenshots Screenshots - + Patches Patches From 2b09a8c207d9a80f9529516b369a522a371cde71 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Feb 2019 18:33:42 -0800 Subject: [PATCH 19/20] 3DS: Work around menu freezing (fixes #1294) --- CHANGES | 1 + src/feature/gui/gui-runner.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index e8f2be434..cda0153ad 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,7 @@ Bugfixes: - GBA Video: Fix enabling layers in non-tile modes (fixes mgba.io/i/1317) - Qt: Fix quick load recent accidentally saving (fixes mgba.io/i/1309) - GBA: Fix video timing when skipping BIOS (fixes mgba.io/i/1318) + - 3DS: Work around menu freezing (fixes mgba.io/i/1294) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/feature/gui/gui-runner.c b/src/feature/gui/gui-runner.c index 3dc0965a6..0afbd355e 100644 --- a/src/feature/gui/gui-runner.c +++ b/src/feature/gui/gui-runner.c @@ -548,6 +548,10 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) { runner->params.drawStart(); runner->drawFrame(runner, true); runner->params.drawEnd(); +#ifdef _3DS + // XXX: Why does this fix #1294? + usleep(1000); +#endif GUIPollInput(&runner->params, 0, &keys); } if (runner->unpaused) { From cf0881534714464312cf38ef5f4ae7c00d2dceee Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Feb 2019 18:38:54 -0800 Subject: [PATCH 20/20] Qt: Updated Italian translation (by Vecna) --- CHANGES | 1 + src/platform/qt/ts/mgba-it.ts | 642 +++++++++++++++++----------------- 2 files changed, 322 insertions(+), 321 deletions(-) diff --git a/CHANGES b/CHANGES index cda0153ad..c7c94ee4c 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,7 @@ Misc: - Qt: Don't unload ROM immediately if it crashes - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274) - Debugger: Add breakpoint and watchpoint listing + - Qt: Updated Italian translation (by Vecna) 0.7.0: (2019-01-26) Features: diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index affde3f37..6b08a7f60 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -6,7 +6,7 @@ About - About + Info... @@ -26,7 +26,7 @@ © 2013 – 2016 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 - 2016 Jeffrey Pfau, sotto licenza Mozilla Public License, versione 2.0 + © 2013 - 2016 Jeffrey Pfau, sotto licenza Mozilla Public License, versione 2.0 Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. @@ -43,7 +43,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. © 2013 – 2018 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 - 2016 Jeffrey Pfau, sotto licenza Mozilla Public License, versione 2.0 + © 2013 - 2016 Jeffrey Pfau, sotto licenza Mozilla Public License, versione 2.0 Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ?} {2.0 ?} @@ -68,7 +68,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Open in archive... - Apri il file in ... + Apri il file in archivio... @@ -97,7 +97,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Palette # - + Palette Nº @@ -122,7 +122,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Blue - Blue + Blu @@ -142,7 +142,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Remove - Rimuovere + Rimuovi @@ -157,7 +157,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Add New Set - Aggiungere Nuovo Set + Aggiungi Nuovo Set @@ -180,7 +180,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Break - Pausa + Interruzione @@ -198,7 +198,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Stop - Stop + Ferma @@ -208,7 +208,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Frameskip - Salta Frame + Salto Frame @@ -319,34 +319,34 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Name - Nome + Nome Location - Posizione + Posizione Platform - Piattaforma + Piattaforma Size - Dimensione + Dimensioni CRC32 - CRC32 + CRC32 LibraryView Library - Biblioteca + Biblioteca @@ -436,7 +436,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Stub - Stub + Matrice @@ -471,7 +471,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Max Lines - Linee di massima + Linee massime @@ -479,22 +479,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Maps - + Mappe × - × + × Magnification - Magnification + Ingrandimento Export - + Esporta @@ -502,124 +502,124 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Memory Search - + Ricerca Memoria Address - Indirizzo + Indirizzo Current Value - + Valore corrente Type - + Tipo Value - Valore + Valore Numeric - + Numerico Text - + Testo Width - + Larghezza Guess - + Indovina 1 Byte (8-bit) - + 1 Byte (8-bit) 2 Bytes (16-bit) - + 2 Bytes (16-bit) 4 Bytes (32-bit) - + 4 Bytes (32-bit) Number type - + Tipo di numero Decimal - + Decimale Hexadecimal - + Esadecimale Compare - + Confronta Equal - + Uguale Greater - + Maggiore Less - + Minore Delta - + Delta Search - + Cerca Search Within - + Cerca all'interno Open in Memory Viewer - + Apri nel Visualizzatore Memoria Refresh - Aggiornare + Aggiorna @@ -632,7 +632,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Inspect Address: - Ispezionare indirizzo: + Ispeziona indirizzo: @@ -642,27 +642,27 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Set Alignment: - Set di allignamento: + Set di allineamento: 1 Byte - 1 byte + 1 Byte 2 Bytes - 2 bytes + 2 Bytes 4 Bytes - 4 bytes + 4 Bytes Signed Integer: - Integer Signato: + Intero segnato: @@ -687,7 +687,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Save Selection - Salva Selezione + Salva la selezione @@ -697,7 +697,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Unsigned Integer: - Integer non signato: + Intero non segnato: @@ -716,12 +716,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Magnification - Magnification + Ingrandimento Export - + Esporta @@ -731,7 +731,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Transform - Transformazione + Trasformazione @@ -754,7 +754,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Double Size - Doppia Dimensione + Dimensioni doppie @@ -827,7 +827,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Dimensions - Dimensione + Dimensioni @@ -851,7 +851,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Game Overrides - Valori specifici per gioco + Valori specifici per il gioco @@ -869,7 +869,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Realtime clock - RealTime clock + Clock in tempo reale @@ -950,7 +950,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Super Game Boy (SGB) - + Super Game Boy (SGB) @@ -985,7 +985,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? MBC3 + RTC - MBC3 + Reloj + MBC3 + RTC @@ -1005,12 +1005,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Pocket Cam - + Pocket Cam TAMA5 - + TAMA5 @@ -1020,17 +1020,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Background Colors - + Colori di sfondo Sprite Colors 1 - + Colori Sprite 1 Sprite Colors 2 - + Colori Sprite 2 @@ -1043,12 +1043,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Background - SFondo (BG) + Sfondo Objects - Oggetti (OBJ) + Oggetti @@ -1068,7 +1068,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Blue - Blue + Blu @@ -1123,27 +1123,27 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Adjust placement - + Regola posizionamento All - Tutto + Tutto Offset - + Offset X - + X Y - + Y @@ -1151,17 +1151,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Game Boy Printer - + Stampante Game Boy Hurry up! - + Sbrigati! Tear off - + Strappa @@ -1184,17 +1184,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Can't set format of context-less audio device - + Impossibile impostare il formato del dispositivo audio Audio device is missing its core - + Il dispositivo audio non possiede alcun core Writing data to read-only audio device - + Scrittura dei dati per il dispositivo audio in sola-lettura @@ -1202,7 +1202,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Can't start an audio processor without input - + Impossibile avviare un processore audio senza input @@ -1210,7 +1210,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Can't start an audio processor without input - + Impossibile avviare un processore audio senza input @@ -1261,22 +1261,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Failed to open save file: %1 - Impossibile aprire il file di salvataggio: %1 + Impossibile aprire il file di salvataggio: %1 Failed to open game file: %1 - Impossibile aprire il file di gioco: %1 + Impossibile aprire il file di gioco: %1 Failed to open snapshot file for reading: %1 - Impossibile aprire il file snapshot per la lettura: %1 + Impossibile aprire il file snapshot per la lettura: %1 Failed to open snapshot file for writing: %1 - Impossibile aprire il file snapshot per la scrittura: %1 + Impossibile aprire il file snapshot per la scrittura: %1 @@ -1284,7 +1284,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Failed to open game file: %1 - Impossibile aprire il file di gioco: %1 + Impossibile aprire il file di gioco: %1 @@ -1292,22 +1292,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Clear Button - Pulisci bottoni + Svuota i pulsanti Clear Analog - Pulisci analogici + Svuota Analogici Refresh - Aggiornare + Aggiorna Set all - Impostare tutti + Imposta tutti @@ -1330,12 +1330,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Break - Break + Interruzione Stop - Stop + Ferma @@ -1368,30 +1368,30 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Graphics Interchange Format (*.gif) - Formato di interconnessione grafica (*.gif) + Graphics Interchange Format (*.gif) QGBA::GameController Failed to open game file: %1 - Impossibile aprire il file di gioco: %1 + Impossibile aprire il file di gioco: %1 Failed to open save file: %1 - Impossibile aprire il file di salvataggio: %1 + Impossibile aprire il file di salvataggio: %1 Failed to open snapshot file for reading: %1 - Impossibile aprire il file snapshot per la lettura: %1 + Impossibile aprire il file snapshot per la lettura: %1 Failed to open snapshot file for writing: %1 - Impossibile aprire il file snapshot per la scrittura: %1 + Impossibile aprire il file snapshot per la scrittura: %1 Failed to start audio processor - Impossibile avviare il processore audio + Impossibile avviare il processore audio @@ -1514,17 +1514,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Enable VBlank IRQ generation - Abilita VBlank + Abilita creazione IRQ VBlank Enable HBlank IRQ generation - Abilita HBlank generazione IRQ + Abilita creazione IRQ HBlank Enable VCounter IRQ generation - Abilita generazione IRQ VCounter + Abilita creazione IRQ VCounter @@ -1632,7 +1632,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Integer part - Parte Integer + Parte Intero @@ -1640,7 +1640,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Integer part (bottom) - Parte Integer (inferiore) + Parte Intero (inferiore) @@ -1648,7 +1648,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Integer part (top) - Parte Integer (superiore) + Parte Intero (superiore) @@ -1722,7 +1722,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Window 1 enable BG 3 - AbilitaWindow 1 BG 3 + Abilita Window 1 BG 3 @@ -1857,17 +1857,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Additive blending - Miscelazione dell'additivo + Miscelazione additiva Brighten - Schiarire + Illumina Darken - Oscurire + Oscura @@ -1927,7 +1927,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Sweep time (in 1/128s) - Tempo di sweep (in 1/128seg) + Tempo di sweep (in 1/128s) @@ -2041,7 +2041,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Clock divider - Divisore dell'orologio + Divisore del Clock @@ -2304,7 +2304,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Destination offset - Compensazione offset + Offset di destinazione @@ -2356,7 +2356,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Source offset - Compensazione di origine + Offset di origine @@ -2433,7 +2433,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Enable - Abilitare + Abilita @@ -2515,13 +2515,13 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Select - Seleziona + Select Start - Avvia + Start @@ -2539,7 +2539,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Up - + Su @@ -2754,12 +2754,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Gamepak prefetch - Gamepak prefetch + Precaricamento Gamepak Enable IRQs - Abilitare IRQs + Abilita IRQs @@ -2775,39 +2775,39 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? QGBA::LibraryModel Name - Nome + Nome Filename - Nome del file + Nome del file Size - Dimensione + Dimensioni Platform - Piattaforma + Piattaforma GBA - GBA + GBA GB - GB + GB ? - ? + ? Location - Posizione + Posizione CRC32 - CRC32 + CRC32 @@ -2881,47 +2881,47 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Map Addr. - + Indir. Mappa Mirror - + Specchiatura None - Nessuno + Nessuno Both - + Entrambi Horizontal - + Orizzontale Vertical - + Verticale Export map - + Esporta Mappa Portable Network Graphics (*.png) - + Portable Network Graphics (*.png) Failed to open output PNG file: %1 - + Impossibile aprire il file PNG: %1 @@ -2929,12 +2929,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Copy selection - Copia selezionato + Copia selezione Save selection - Salva selezionato + Salva selezione @@ -2960,7 +2960,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Save selected memory - Salva la memoria selezionate + Salva la memoria selezionata @@ -2993,22 +2993,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? (%0/%1×) - + (%0/%1×) (⅟%0×) - + (⅟%0×) (%0×) - + (%0×) %1 byte%2 - + %1 byte%2 @@ -3042,28 +3042,28 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Invalid - Invalido + Non valido N/A - n/d + N/D Export sprite - + Esporta sprite Portable Network Graphics (*.png) - + Portable Network Graphics (*.png) Failed to open output PNG file: %1 - + Impossibile aprire il file PNG: %1 @@ -3103,7 +3103,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Failed to open output palette file: %1 - Errore nell'aprire il file palette di output : %1 + Errore nell'aprire il file palette di output: %1 @@ -3111,12 +3111,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Save Printout - + Salva Stampa Portable Network Graphics (*.png) - + Portable Network Graphics (*.png) @@ -3173,7 +3173,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? None (Still Image) - + Niente (Immagine fissa) @@ -3188,13 +3188,13 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Shortcuts - Tasti di scelta rapida + Scorciatoie Shaders - Shaders + Shader @@ -3207,7 +3207,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? No shader active - Nessun shader attivo + Nessuno shader attivo @@ -3216,22 +3216,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? %1 Shader (%.shader) - %1 Shader (%.shader) + %1 Shader (%.shader) No shader loaded - Nessun shader caricato + Nessuno shader caricato by %1 - por %1 + per %1 Preprocessing - Preprocesso + Pre-elaborazione @@ -3272,7 +3272,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Select output file - Seleziona file di output + Seleziona file di uscita @@ -3280,12 +3280,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Game Boy Advance ROMs (%1) - ROM di Game Boy Advance (%1) + ROM per Game Boy Advance (%1) Game Boy ROMs (%1) - ROMs del Game Boy (%1) + ROM per Game Boy (%1) @@ -3295,12 +3295,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? %1 Video Logs (*.mvl) - + %1 log Video (*.mvl) Archives (%1) - Archivio (%1) + Archivi (%1) @@ -3334,12 +3334,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Select image - + Seleziona immagine Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - + File immagine (*.png *.gif *.jpg *.jpeg);;Tutti i file (*) @@ -3350,12 +3350,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Select video log - + Seleziona log video Video logs (*.mvl) - + Log video (*.mvl) @@ -3394,12 +3394,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Really make portable? - Davvero rendere portatile? + Vuoi davvero rendere portatile l'applicazione? This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - In questo modo l'emulatore carica la propria configurazione dalla stessa directory dell'eseguibile. Vuoi continuare? + In questo modo l'emulatore carica la propria configurazione dalla stessa cartella dell'eseguibile. Vuoi continuare? @@ -3409,7 +3409,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Some changes will not take effect until the emulator is restarted. - Alcune modifiche non avranno effetto finché l'emulatore non viene riavviato. + Alcune modifiche non avranno effetto finché l'emulatore non verrà riavviato. @@ -3434,12 +3434,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? &File - &File + File Load &ROM... - Carica &ROM... + Carica ROM... @@ -3449,7 +3449,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Load alternate save... - + Carica il salvataggio alternativo... @@ -3459,22 +3459,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Load &patch... - Carica &patch... + Carica patch... Boot BIOS - Boot BIOS + Avvia BIOS Replace ROM... - Sostituire la ROM... + Sostituisci la ROM... ROM &info... - ROM &info... + Informazioni ROM... @@ -3489,7 +3489,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? &Load state - &Carica stato + Carica stato @@ -3499,7 +3499,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? &Save state - &Salva stato + Salva stato @@ -3541,7 +3541,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Undo save state - Annulla salva stato + Annulla salvataggio stato @@ -3553,7 +3553,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? State &%1 - Stato &%1 + Stato %1 @@ -3569,7 +3569,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Load camera image... - + Carica immagine camera... @@ -3589,22 +3589,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? About - About + Info... E&xit - Uscire (&X) + Esci (&X) &Emulation - &Emulazione + Emulazione &Reset - &Reset + Reset @@ -3624,7 +3624,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? &Pause - &Pausa + Pausa @@ -3644,7 +3644,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Fast forward (held) - Avanzamento rapido (sostenuto) + Avanzamento rapido (tieni premuto) @@ -3664,7 +3664,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Unbounded - Illimitato + Illimitata @@ -3674,12 +3674,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Rewind (held) - Riavvolgi (sostenuto) + Riavvolgimento (tieni premuto) Re&wind - Riavvolgi (&W) + Riavvolgimento (&W) @@ -3699,12 +3699,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Sync to &video - Sincronizzare su &video + Sincronizza con il video Sync to &audio - Sincronizzare su &audio + Sincronizza con l'audio @@ -3739,12 +3739,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Audio/&Video - Audio/&Video + Audio/Video Frame size - Dimensione Frame + Dimensioni Frame @@ -3754,25 +3754,25 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Toggle fullscreen - Abilita schermo intero + Abilita Schermo Intero Lock aspect ratio - Blocca aspect ratio + Blocca rapporti aspetto Resample video - Rimostra video + Ricampiona video Frame&skip - Frame&skip + Salto frame Shader options... - Opzioni shader... + Opzioni shader... @@ -3782,7 +3782,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? FPS target - FPS mirato + FPS finali @@ -3827,7 +3827,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Take &screenshot - Effettua &screenshot + Acquisisci screenshot @@ -3837,7 +3837,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Record output... - Registra salida... + Registra uscita... @@ -3851,11 +3851,11 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Background %0 - Sfondo %0 + Sfondo %0 OBJ (sprites) - OBJ (sprites) + OBJ (sprites) @@ -3864,20 +3864,20 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Channel %0 - Canale %0 + Canale %0 Channel A - Canale A + Canale A Channel B - Canale B + Canale B &Tools - &Strumenti + Strumenti @@ -3887,17 +3887,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Game &overrides... - Val&specifico per il gioco... + Valore specifico per il gioco... Game &Pak sensors... - Sensori di gioco &Pak... + Sensori Game Pak... &Cheats... - &Trucchi... + Trucchi... @@ -3907,7 +3907,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Start &GDB server... - Avvia server &GDB... + Avvia server GDB... @@ -3927,132 +3927,132 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Force integer scaling - + Forza l'integer scaling Bilinear filtering - + Filtro bilineare Record video log... - + Registra log video... Stop video log - + Interrompi log video Game Boy Printer... - + Stampante Game Boy... Adjust layer placement... - + Regola posizionamento layer... View &palette... - Ver &palette... + Mostra palette... View &sprites... - Ver &sprites... + Mostra sprites... View &tiles... - Ver &tiles... + Mostra tiles... View &map... - + Mostra mappa... View memory... - Ver memoria... + Mostra memoria... Search memory... - + Ricerca memoria... View &I/O registers... - Ver reg&registri I/O... + Mostra registri I/O... Exit fullscreen - Esci da schermo intero + Esci da Schermo Intero GameShark Button (held) - + Pulsante GameShark (tieni premuto) Autofire - Pulsanti Auto fuoco + Pulsanti Autofire Autofire A - Auto fuoco A + Autofire A Autofire B - Auto fuoco B + Autofire B Autofire L - Auto fuoco L + Autofire L Autofire R - Auto fuoco R + Autofire R Autofire Start - Avvia Auto fuoco + Autofire Start Autofire Select - Seleziona Auto fuoco + Autofire Select Autofire Up - Auto fuoco sù + Autofire Su Autofire Right - Auto fuoco destro + AAutofire Destra Autofire Down - Auto fuoco giù + Autofire Giù Autofire Left - Auto fuoco sinistro + Autofire Sinistra @@ -4060,17 +4060,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? GBA - GBA + GBA GB - GB + GB ? - ? + ? @@ -4078,7 +4078,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? ROM Info - Informazioni della ROM + Informazioni sulla ROM @@ -4113,7 +4113,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? File size: - Dimensione del file: + Dimensioni del file: @@ -4141,7 +4141,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Realtime clock - Realtime clock + Clock in tempo reale @@ -4166,7 +4166,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? MM/dd/yy hh:mm:ss AP - dd/MM/yy HH:mm:ss + gg/MM/aa OO:mm:ss @@ -4231,12 +4231,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Paths - Paths + Cartelle Game Boy - Game Boy + Game Boy @@ -4287,12 +4287,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? samples - samples + campioni Sample rate: - Sample rate: + Freq. di campionamento: @@ -4338,7 +4338,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Frameskip: - Frameskip: + Salto frame: @@ -4354,17 +4354,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? FPS target: - FPS mirato: + FPS finali: frames per second - frame per secondo + frame al secondo Sync: - Sincronizzare: + Sincronizza: @@ -4379,91 +4379,91 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Lock aspect ratio - Blocca aspect ratio + Blocca rapporti aspetto Cheats - Trucchi + Trucchi Game Boy model - Modello del Game Boy + Modello del Game Boy Autodetect - Rilevamento automatico + Rilevamento automatico Game Boy (DMG) - Game Boy (DMG) + Game Boy (DMG) Super Game Boy (SGB) - + Game Boy Color (CGB) - Game Boy Color (CGB) + Game Boy Color (CGB) Game Boy Advance (AGB) - Game Boy Advance (AGB) + Game Boy Advance (AGB) Super Game Boy model - + Modello di Super Game Boy Game Boy Color model - + Modello di Game Boy Color Default BG colors: - + Colori predefiniti BG: Super Game Boy borders - + Bordi Super Game Boy Camera driver: - + Driver della fotocamera: Default sprite colors 1: - + Colori predefiniti sprite 1: Default sprite colors 2: - + Colori predefiniti sprite 2: Resample video - Rimostrare video + Ricampionamento Video @@ -4478,7 +4478,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Clear cache - Cancella cache + Svuota la cache @@ -4501,12 +4501,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Use BIOS file if found - Utilizzare il file del BIOS se è stato trovato + Usa il file del BIOS se è presente Skip BIOS intro - Salta BIOS intro + Salta intro del BIOS @@ -4531,12 +4531,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Pause when inactive - Pausa se inattivo + In Pausa se inattivo Run all - Avviare tutto + Avvia tutto @@ -4574,67 +4574,67 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Enable rewind - Abilita riavvolgi + Abilita riavvolgimento Bilinear filtering - + Filtro bilineare Force integer scaling - + Forza scaling con numeri interi Language - + Lingua English - + List view - + Inglese Tree view - + Visualizza ad albero Show FPS in title bar - + Mostra gli FPS nella barra del titolo Automatically save cheats - + Salva i trucchi automaticamente Automatically load cheats - + Carica i trucchi automaticamente Automatically save state - + Salva stato automaticamente Automatically load state - + Carica stato automaticamente Rewind history: - Riavvolgi storia: + Cronologia riavvolgimento: @@ -4644,7 +4644,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Savestate extra data: - Salva dati extra: + Dati extra salvataggio stato: @@ -4654,42 +4654,42 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Rewind affects save data - + Il riavvolgimento influenza i dati salvataggio Preload entire ROM into memory - + Precarica tutta la ROM nella memoria Autofire interval: - + Intervallo Autofire: GB BIOS file: - File GB BIOS: + File BIOS del GB: GBA BIOS file: - File GBA BIOS: + File BIOS del GBA: GBC BIOS file: - File GBC BIOS: + File BIOS del GBC: SGB BIOS file: - + File BIOS del SGB: Save games - Salva il gioco + Salva le partite @@ -4698,17 +4698,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Same directory as the ROM - Stessa directory della ROM + Stessa cartella della ROM Save states - Salva Stato + Salvataggio Stati Screenshots - Screenshots + Screenshot @@ -4721,7 +4721,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Shaders - Shaders + Shader @@ -4751,7 +4751,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Load New Shader - Carica Nuovo shader + Carica nuovo shader @@ -4759,7 +4759,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Edit Shortcuts - Edita Shortcuts + Modifica le Scorciatoie @@ -4774,7 +4774,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Clear - Cancella + Svuota @@ -4797,7 +4797,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Magnification - Magnification + Ingrandimento @@ -4805,7 +4805,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Record Video - Registra video + Registra Video @@ -4815,7 +4815,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Stop - Stop + Ferma @@ -4825,7 +4825,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Presets - Presets + Profili @@ -4890,7 +4890,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? PNG - PNG + PNG @@ -4900,21 +4900,21 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? h.264 (NVENC) - + h.264 (NVENC) HEVC - + HEVC VP8 - + VP8 Xvid - Xvid + Xvid @@ -4954,7 +4954,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Bitrate (kbps) - Bitrate (kbps) + Bitrate (kbps) @@ -4984,12 +4984,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. {2013 ?} {2018 ? Lock aspect ratio - Blocca aspect ratio + Blocca rapporti aspetto Show advanced - Mostra avanzato + Mostra avanzate