Commit Graph

607 Commits

Author SHA1 Message Date
David Korth
78d041b0fb [libromdata] Xbox360_STFS: Fix reading large XEXes that overlap a hash block boundary.
This should fix a bunch of STFSes that previously claimed an encryption
key was missing because they were unable to decompress LZX data correctly.

TODO:
- Create a SparseDiscReader instead of reading the entire file into memory.
- Handle non-contiguous files. (Unlikely in packages; more likely in
  save files.)
2025-03-02 13:46:46 -05:00
David Korth
3d04fdee1b [libromdata] Xbox360_XEX: Fix Australian (ACB) age ratings in some XBLA titles.
Sonic the Fighters has a value '3', which isn't defined in Xenia's enum
for ACB. Rework it such that G=0,1; PG=2,3; M=4,5; MA15+=6,7.

TODO: Need to verify this with more titles.
2025-03-02 00:50:45 -05:00
David Korth
6c58b9d74b [libromdata] EXEPEMachineTypes_data.txt: Add CHPEv1 i386 and CHPEv2 ARM64X.
These are supposed to use the "hybrid metadata pointer", but some older
DLLs have a separate machine type instead.

EXE_PE.cpp: Change "CHPE" to "CHPEv1".

Fixes #439: Missing ARM64 machine type IMAGE_FILE_MACHINE_CHPE_X86
Reported by @pivotman319-owo.
2025-02-23 21:12:24 -05:00
David Korth
f28f6af6eb [libromdata] WiiUData: Fix sorting issues.
This caused asserts when using libstdc++ debug mode.

wiiu_application_types: "Game Update" should be after "Game DLC".
This broke "Super Smash Bros. for Wii U (USA) (Update)".

/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_algo.h:1970:
In function:
    _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare) [with
    _FIter = const LibRomData::WiiUData::WiiUApplicationType*; _Tp =
    unsigned int; _Compare =
    LibRomData::WiiUData::lookup_application_type(uint32_t)::<lambda(const
    LibRomData::WiiUData::WiiUApplicationType&, uint32_t)>]

Error: elements in iterator range [first, last) are not partitioned by the
predicate __comp and value __val.

Objects involved in the operation:
    iterator "first" @ 0x7fffffffc578 {
      type = LibRomData::WiiUData::WiiUApplicationType const* (constant iterator);
    }
    iterator "last" @ 0x7fffffffc570 {
      type = LibRomData::WiiUData::WiiUApplicationType const* (constant iterator);
    }

disc_publishers_noregion: Three disc publishers were out of order.
This broke "NES REMIX (USA)" and "NES REMIX 2 (USA)".

/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_algo.h:1970:
In function:
    _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare) [with
    _FIter = const LibRomData::WiiUData::WiiUDiscPublisher*; _Tp = unsigned
    int; _Compare = LibRomData::WiiUData::lookup_disc_publisher(const
    char*)::<lambda(const LibRomData::WiiUData::WiiUDiscPublisher&,
    uint32_t)>]

Error: elements in iterator range [first, last) are not partitioned by the
predicate __comp and value __val.

Objects involved in the operation:
    iterator "first" @ 0x7ffc13befb38 {
      type = LibRomData::WiiUData::WiiUDiscPublisher const* (constant iterator);
    }
    iterator "last" @ 0x7ffc13befb30 {
      type = LibRomData::WiiUData::WiiUDiscPublisher const* (constant iterator);
    }
2025-02-08 12:00:33 -05:00
David Korth
f2e9b43145 [kde] ImageTypesTab: Fix tab ordering for the Credits label.
Remove lblCredits from the .ui file and create it manually after creating
the QComboBoxes. This eliminates the need to use setTabOrder(), which
wasn't working properly when trying to set lblCredits to after the final
QComboBox that was created by createComboBox().

FIXME: Tab ordering still has the label itself as a tab stop, in addition
to the two links...
2025-02-08 11:43:17 -05:00
David Korth
c1e8b097da NEWS.md: Mention the PE Exports bounds checking. 2025-02-04 20:42:49 -05:00
David Korth
8e70d2bf3f NEWS.md: Mention J2ME .jad files. 2025-02-02 15:12:57 -05:00
David Korth
c7d0a0a9c5 [librptexture] PowerVR3: Check header.pvr3.version for PVR3_VERSION_SWAP, not d->pvr3Header.version.
d->pvr3Header hasn't been initialized at this point.

This broke when PowerVR3 was extended to handle PowerVR 2.0 textures.

Most PowerVR3 files are little-endian, so the usual case of x86/amd64/arm
wouldn't have caused a problem. On PowerPC, the files weren't detected.

This fixes a regression from commit f5a099d169.
([librptexture] PowerVR3: Preliminary support for PowerVR v2.0 files.)

This fixes ImageDecoderTest's PowerVR3 tests.

Affects: v2.4 - v2.4.1

Also, un-indent PowerVR3Private.
2025-02-01 23:47:51 -05:00
David Korth
53e974b237 [win32] RP_ShellPropSheetExt: Properly rescale the icon and banner sizes.
This was already done in the GTK and KDE UI frontends, but not in
Win32, which results in PSP Minis showing a gigantic banner because
they have a 310x180 background image that's used as a banner.

Also, remove RP_ShellPropSheetExt_Private::rescaleImage(). This was
copied to DragImageLabel in commit c234c6cf36
([win32] DragImageLabel: Copied image sizing, including rescaleImage(), to DragImageLabel.)
because it was still used for the banner code, but was never removed.

NOTE: Prior to DragImageLabel, the banner was unconditionally resized
to 96x32. This would have prevented the giant image issue, but it's
the wrong aspect ratio for PSP Minis. (310x180 -> 55x32)

Also, icons were previously unconditionally resized to 32x32, which
usually works, unless something has a non-square icon.

Fixes #433: [Bug Report] The ROM type is not displayed correctly for some PSP Mini ROMs
Reported by @xxmichibxx.

Affects: v1.5 - v2.4.1
2025-02-01 09:49:11 -05:00
David Korth
603ce84c32 [libromdata] EXE: Handle PE executables with OptionalHeader.Magic=0 as PE32.
This fixes detection of some Win32s DLLs.

Fixes #437: Old PE files from Win32s aren't recognized due to bad OptionalHeader magic
Reported by @DankRank.
2025-01-31 20:44:10 -05:00
David Korth
8d37cec2f4 NEWS.md: Mention support for extracted Xbox disc file systems. 2025-01-25 12:54:08 -05:00
David Korth
f26da71813 NEWS.md: Mention libfmt. 2025-01-25 00:37:42 -05:00
David Korth
ded3fb7709 NEWS.md: Mention ENABLE_NETWORKING. 2025-01-20 19:02:36 -05:00
David Korth
47fb743966 [win32] LvData: Initialize HDITEM::mask.
This somehow managed to mostly work on Windows 7, and even for a while
on Windows 10. Starting with commit 59c3d23285
in v2.4, opening the ROM Properties tab would usually crash for EXE/DLL
files due to the Import and/or Export tabs, which have RFT_LISTDATA.

I wasn't able to reproduce this in any Debug builds, but it showed up on
Windows 10 in Release builds with MSVC 17.6.5. The effects were seemingly
random, depending on what code I moved around; sometimes it'd crash, other
times it'd cause the column titles to show up as garbage. Using a TCHAR[]
buffer instead of a tstring seemed to have fixed the problem, until the
garbage titles showed up. (This merely moved the problem around due to
the stack layout.) Making the TCHAR[] buffer static made the problem
worse, since it *removed* stuff from the stack.

In the end, the problem was really very obvious once I saw it. Disabling
LvData's sorting functions caused everything to "just work". When I looked
at the functions, I saw Header_GetItem() called immediately after the
HDITEM variable was declared. HDITEM, like LVCOLUMN, has a mask field which
*must* be filled in for both Set and Get. Otherwise, it might try reading
text into whatever's in HDITEM::pszText, which is likely the cause of the
crashes. The garbage text could be explained by somehow getting through
Header_GetItem(), only to have garbage text set by Header_SetItem().

Fixes #432: [Bug Report] EXE/DLL files causes a crash
Reported by @xxmichibxx.

Affects: v2.4 - v2.4.1 (Windows only), but it's entirely possible that
older versions could have random glitches as well.
2024-12-07 03:23:37 -05:00
David Korth
1bef69f7a6 NEWS.md: Mention J2ME support. 2024-11-24 12:33:29 -05:00
David Korth
dfd53560ef NEWS.md: Mention the amiibo Character Variant issue. 2024-11-17 11:55:21 -05:00
David Korth
98888f0f19 [libromdata] WiiUPackage: Add support for extracted Wii U packages.
Main differences between NUS and extracted formats, besides packaged
being in .app files and extracted being extracted:

- Extracted might not have ticket and/or TMD.

- Extracted should have the three XML files. Note that certain titles
  *might* be missing some of the XMLs; this will need to be checked
  later.

- Extracted doesn't have an FST content, so everything that checks
  for FST presence has been updated to not check for FST.
  - WiiUPackagePrivate::open() still checks for an FST in NUS format.

- WiiUPackagePrivate::open(): For extracted format, open the file
  directly using RpFile and the package path.

Fixes #430: Add support for extracted WiiU games
Requested by @Masamune3210.
2024-11-16 16:38:55 -05:00
David Korth
bf7429ed29 [win32] RP_ExtractImage: Fix an issue with directory thumbnailing for unsupported directories.
RP_ExtractImage::Load() needs to return E_FAIL, not S_OK, if the directory
is unsupported. Otherwise, Windows will show a regular directory icon,
without thumbnailing the directory's contents.

Fixes #427: No Thumbnails after install
Reported by @Conan179.
2024-11-12 22:21:43 -05:00
David Korth
87eb036468 rom-properties 2.4 2024-11-10 22:39:38 -05:00
David Korth
e2d42eca3e [libromdata] PSP: PIC0.PNG is now presented as the "Banner" image. 2024-11-09 16:30:35 -05:00
David Korth
9d1a0ee8cd NEWS.md: Mention the StartAllBack dark mode fix in v2.3.
Fixes #399: ROM Properties page displays incorrectly with StartAllBack installed
Reported by @kristibektashi.
2024-11-02 11:22:18 -04:00
David Korth
9f19b55258 NEWS.md: Mention the Arch Linux qtpaths6 change. 2024-11-01 18:46:31 -04:00
David Korth
adc780f113 Add some workarounds for issues encountered on NixOS.
Specify -DENABLE_NIXOS=ON to enable the workarounds.

- Using CMAKE_INSTALL_PREFIX in paths causes a double-path issue.
  This only seems to happen on NixOS.

- std::locale's constructor ends up calling getdents64(), so this
  syscall needs to be whitelisted. Only on NixOS though, since other
  Linux distros don't need it...

Fixes #406: Building on NixOS returns "invalid system call"
Reported by @Whovian9369.
2024-10-25 01:02:40 -04:00
David Korth
f5a099d169 [librptexture] PowerVR3: Preliminary support for PowerVR v2.0 files.
I used a test image from an old version of Angry Birds for iOS,
which uses the ABGR4444 pixel format.

TODO:
- Support compressed formats.
- Test more uncompressed formats.
- Handle vertical flip.
2024-10-24 21:26:19 -04:00
David Korth
4e6f03c498 [libromdata] MegaDrive: Add a title encoding heuristic for JIS X 0208.
"Magical Hat no Buttobi Turbo! Daibouken" has a ROM title encoded using
JIS X 0208 instead of Shift-JIS. This is a 7-bit double-byte encoding.

iconv doesn't seem to support JIS X 0208 directly, but if converted to
EUC-JP by setting the high bit on each byte, it can be decoded as EUC-JP.

Windows also supports EUC-JP as Code Page 20932. (Tested on Windows 7.)

A simple heuristic is used to determine if the title is potentially
encoded as JIS X 0208: The first character must be between 0x21-0x24,
and all characters must have the high bit unset.

This fixes title decoding for "Magical Hat no Buttobi Turbo! Daibouken".
- Before: "$^$8$+$k%O%C%H$N$V$C$H$S%?!<%\!*BgKA81"
- After:  "まじかるハットのぶっとびターボ!大冒険"

This also affects "Madagascar (R)", which appears to have the exact same
title in the ROM header.

[libromdata/tests] Update MegaDrive test results.

[librptext] conversion.hpp: New wrapper function cp1252_sjis_jisx0208_to_utf8().

conversion_iconv.cpp, conversion_win32.cpp, cpN_to_utf8():
- If TEXTCONV_FLAG_JIS_X_0208 is specified, use the JIS X 0208 heuristic
  before attempting Shift-JIS decoding.
2024-10-24 18:53:46 -04:00
David Korth
dd612a4f19 NEWS.md: Mention the WinXP compatibility fix. 2024-10-12 01:26:31 -04:00
David Korth
fb868ae440 NEWS.md: Also mention the GitHub issue. 2024-10-12 01:05:34 -04:00
David Korth
499d95595e NEWS.md: Mention CDI support for Dreamcast games. 2024-10-12 01:04:08 -04:00
David Korth
82ddbbe657 [libromdata] WiiTicket: Recognize CA04-XS09 from early Wii Utitles.
Some early Wii Utitles use CA04-XS09 and CA04-CP0a, which matches the
3DS dpki issuer. At some point between OSv9 and OSv10, these were
changed to CA04-XS0f and CA04-CP10. Both sets of issuers use the same
debug keys.
2024-08-13 21:44:14 -04:00
David Korth
4e99dc8e86 [libromdata] DMG: Detect Analogue Pocket ROM images.
Analogue Pocket is mostly GBC-compatible, but it has a different header
logo and some different register definitions. For our purposes, the only
difference that matters is the header logo.
2024-08-03 13:17:07 -04:00
David Korth
84cf753132 NEWS.md: Icon delay stuff. 2024-07-20 14:00:32 -04:00
David Korth
ed2e3108dc [librpbase] RpPngWriter: Fix APNG extraction.
This broke when rp_image was switched to shared_ptr<> because img and
iconAnimData are no longer in a union.

write_IDAT_APNG(): Check iconAnimData instead of img.

This fixes a regression from commit 44689d0aa8.
([librptexture] rp_image: Use shared_ptr<> instead of RefBase.)

Affects: v2.3
2024-07-20 13:36:57 -04:00
David Korth
4d68a9f7c9 NEWS.md: Add a newline. 2024-05-19 13:38:39 -04:00
David Korth
ffe6e821d9 [win32] RP_ShellPropSheetExt: Fix display of multi-line strings with multiple languages.
initString(): For RFT_STRING_MULTI, count newlines for *all* strings
instead of just assuming 0 newlines.

initStringMulti(): Pass nullptr instead of _T("") so initString() will
actually count newlines.

updateMulti(): Convert from Unix newlines (LF) to DOS newlines (CRLF).

Fixes #416: Win32 UI frontend: Localized multi-line strings aren't displayed correctly
(was: Line feeds not working in descriptions for GameCube titles with BNR2 banner)
Reported by @rctgamer3.
2024-05-19 13:35:46 -04:00
David Korth
6b01883f1a [cmake] CheckNettle2or3.cmake: Also export NETTLE_FOUND in the PARENT_SCOPE.
NETTLE_FOUND may be used to determine if libnettle should be
linked to other libraries and/or executables.

This fixes a regression from commit 22189ea4db.
([cmake] CheckNettle2or3.cmake: Convert the macro to a function.)
2024-05-17 22:41:47 -04:00
David Korth
59c3d23285 [win32] LvData: hListView is used even for regular RFT_LISTDATA.
This fixes a seemingly-empty ListView for e.g. Win32 export/import tables
and a bunch of assertions in the debug build.

Initialize hListView (and optionally pField) in the LvData constructor
using explicit constructor arguments.

RP_ShellPropSheetExt_Private::updateMulti(): Check for a non-NULL pField
instead of hListView, since hListView is always set now.

It *may* have been introduced in commit 8cf01a10a3.
([win32] RP_ShellPropSheetExt: Initial RFT_LISTDATA sorting functionality)
Affects: v1.8 - v2.2.3 (Windows only)

Fixes #413: Exports/Imports table in win32 shell ext page showing blank rows
Reported by @ksharperd.
2024-04-13 20:30:39 -04:00
David Korth
f2565965b2 [libromdata] NintendoDS_BNR: Split icon/title data parsing out of NintendoDS.
This will allow thumbnailing of standalone NDS banners.

TODO: Validate CRC16s to reduce false-positives.
2024-04-02 22:24:48 -04:00
David Korth
4d3022ddb4 NEWS.md: Mention GNOME Tracker and more metadata extraction. 2024-03-30 12:23:34 -04:00
David Korth
a9d878f16e NEWS.md: Mention numeric sorting for EXE ordinals and hints. 2024-03-23 03:42:33 -04:00
David Korth
331db13d57 NEWS.md: Mention the RomDataView test program. 2024-03-23 00:52:14 -04:00
David Korth
212417bf36 NEWS.md: Mention the KF6 MessageSound fix. 2024-03-21 23:05:32 -04:00
David Korth
7ae24c8353 NEWS.md: Mention the rp-config ThumbnailDirectoryPackages and ShowXAttrView options. 2024-03-18 20:42:59 -04:00
David Korth
ebf12096dc NEWS.md: "ROM Options" -> "ROM Operations" 2024-03-17 22:28:54 -04:00
David Korth
f28cf3838b Merge branch 'feature/Wii-WiiU-ticket-tmd-NUS'
Conflicts:
	NEWS.md
2024-03-16 21:06:47 -04:00
David Korth
8d6796b50e NEWS.md: Mention icon/banner resize. 2024-03-16 21:06:11 -04:00
David Korth
46692baba0 NEWS.md: Mention GtkRevealer. 2024-03-16 15:19:23 -04:00
David Korth
3bb835437f NEWS.md: Mention WiiUPackage. 2024-03-15 21:56:22 -04:00
David Korth
e322dd037a [gtk] *MenuProvider.cpp: Fix URI scheme comparison.
This broke the "Convert to PNG" menu item, since it was returning *false*
if the scheme matched "file".

This fixes a regression from commit 70cf0687ab.
([gtk] Split common stuff from NautilusMenuProvider and ThunarMenuProvider into MenuProviderCommon.c.)

Affects: v2.2.1 - v2.3
2024-03-15 00:18:43 -04:00
David Korth
94bf76cbfb NEWS.md: Mention IFUNC resolver changes. 2024-03-15 00:15:28 -04:00
David Korth
488a61dafc NEWS.md, README.md: v2.3 has full support for KDE Frameworks 6.x. 2024-03-10 18:19:52 -04:00
David Korth
19a4f36035 [librptexture/tests] ImageDecoderLinearTest: Use le16_to_cpu(), not le32_to_cpu(), for the 15-bit/16-bit tests.
On BE systems, using le32_to_cpu() causes the 16-bit data to be moved to
the high word. The 32-bit value is then truncated when passing it to the
16-bit PixelConversion function, resulting in a pixel value of 0x0000.

This fixes all of the 15-bit/16-bit tests

Previously, these tests were failing:

[  FAILED  ] 44 tests, listed below:
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGB565_0xFF1045A5, where GetParam() = RGB565_0xFF1045A5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGR565_0xFF1045A5, where GetParam() = BGR565_0xFF1045A5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB4444_0x11223344, where GetParam() = ARGB4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR4444_0x11223344, where GetParam() = ABGR4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA4444_0x11223344, where GetParam() = RGBA4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA4444_0x11223344, where GetParam() = BGRA4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/xRGB4444_0xFF223344, where GetParam() = xRGB4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/xBGR4444_0xFF223344, where GetParam() = xBGR4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBx4444_0xFF223344, where GetParam() = RGBx4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRx4444_0xFF223344, where GetParam() = BGRx4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0x00218CA5, where GetParam() = ARGB1555_0x00218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0x00218CA5, where GetParam() = ABGR1555_0x00218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0xFF218CA5, where GetParam() = ARGB1555_0xFF218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0xFF218CA5, where GetParam() = ABGR1555_0xFF218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0x00426384, where GetParam() = RGBA5551_0x00426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0x00426384, where GetParam() = BGRA5551_0x00426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0xFF426384, where GetParam() = RGBA5551_0xFF426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0xFF426384, where GetParam() = BGRA5551_0xFF426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RG88_0xFF123400, where GetParam() = RG88_0xFF123400
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/GR88_0xFF123400, where GetParam() = GR88_0xFF123400
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGB555_0xFF218CA5, where GetParam() = RGB555_0xFF218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGR555_0xFF218CA5, where GetParam() = BGR555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGB565_0xFF1045A5, where GetParam() = RGB565_0xFF1045A5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGR565_0xFF1045A5, where GetParam() = BGR565_0xFF1045A5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB4444_0x11223344, where GetParam() = ARGB4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR4444_0x11223344, where GetParam() = ABGR4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA4444_0x11223344, where GetParam() = RGBA4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA4444_0x11223344, where GetParam() = BGRA4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/xRGB4444_0xFF223344, where GetParam() = xRGB4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/xBGR4444_0xFF223344, where GetParam() = xBGR4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBx4444_0xFF223344, where GetParam() = RGBx4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRx4444_0xFF223344, where GetParam() = BGRx4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0x00218CA5, where GetParam() = ARGB1555_0x00218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0x00218CA5, where GetParam() = ABGR1555_0x00218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0xFF218CA5, where GetParam() = ARGB1555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0xFF218CA5, where GetParam() = ABGR1555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0x00426384, where GetParam() = RGBA5551_0x00426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0x00426384, where GetParam() = BGRA5551_0x00426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0xFF426384, where GetParam() = RGBA5551_0xFF426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0xFF426384, where GetParam() = BGRA5551_0xFF426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RG88_0xFF123400, where GetParam() = RG88_0xFF123400
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/GR88_0xFF123400, where GetParam() = GR88_0xFF123400
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGB555_0xFF218CA5, where GetParam() = RGB555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGR555_0xFF218CA5, where GetParam() = BGR555_0xFF218CA5

FIXME: The 24-bit tests are still failing:
[  FAILED  ] 4 tests, listed below:
[  FAILED  ] fromLinear24/ImageDecoderLinearTest.fromLinear_cpp_test/RGB888_0xFF123456, where GetParam() = RGB888_0xFF123456
[  FAILED  ] fromLinear24/ImageDecoderLinearTest.fromLinear_cpp_test/BGR888_0xFF123456, where GetParam() = BGR888_0xFF123456
[  FAILED  ] fromLinear24_stride512/ImageDecoderLinearTest.fromLinear_cpp_test/RGB888_0xFF123456, where GetParam() = RGB888_0xFF123456
[  FAILED  ] fromLinear24_stride512/ImageDecoderLinearTest.fromLinear_cpp_test/BGR888_0xFF123456, where GetParam() = BGR888_0xFF123456
2024-03-10 04:44:33 -04:00
David Korth
e184e25cca [gtk] DragImage: gtk_popover_set_transitions_enabled() was added in GTK+ 3.15.8.
Debian 8 has GTK+ 3.14.5, so this caused the build to fail.

Check for GTK+ [3.15.8, 3.21.5). If it's anywhere in that range,
use gtk_popover_set_transitions_enabled(); otherwise, don't.
2024-03-10 04:38:43 -04:00
David Korth
39826747b2 [librptexture] rp_image::swizzle_cpp(): Fix swizzling on big-endian systems.
On LE, we need to rotate the channels value right by 8 bits.
On BE, we need to rotate the channels value *left* by 8 bits.

Remove be32_to_cpu() and adjust the SWZ_CH_? values to use the big-endian
values (B=3,G=2,R=1,A=0) on both BE and LE.

This fixes the following (and only) test failures on RomHeaderTest
on Debian 8 on PowerPC (via qemu):

[  FAILED  ] 3 tests, listed below:
[  FAILED  ] DDS_Blender/ImageDecoderTest.decodeTest/DDS_Blender_tex_cmp_bc3nm_dds_gz_Image, where GetParam() = DDS_Blender/tex_cmp_bc3nm.dds.gz
[  FAILED  ] DDS_Blender/ImageDecoderTest.decodeTest/DDS_Blender_tex_cmp_bc3rxgb_dds_gz_Image, where GetParam() = DDS_Blender/tex_cmp_bc3rxgb.dds.gz
[  FAILED  ] KTX2/ImageDecoderTest.decodeTest/KTX2_luminance_alpha_reference_u_ktx2_gz_Image, where GetParam() = KTX2/luminance_alpha_reference_u.ktx2.gz
2024-03-10 04:15:50 -04:00
David Korth
fbb9d20da7 [libromdata] DreamcastSave: Fix byteswapping on big-endian.
The byteswapping code was checking for SYS_LIL_ENDIAN, which means it
was only compiled in on little-endian systems, not big-endian systems.
The le*_to_cpu() macros are no-ops on little-endian systems, so it
didn't cause a problem on LE, but it broke on BE.

This fixes the following (and only) test failures on RomHeaderTest
on Debian 8 on PowerPC (via qemu):

[  FAILED  ] 4 tests, listed below:
[  FAILED  ] DreamcastSave/RomHeaderTest.Text/BIOS002_VMS, where GetParam() = BIOS002.VMS
[  FAILED  ] DreamcastSave/RomHeaderTest.Text/SONIC2C_VMS, where GetParam() = SONIC2C.VMS
[  FAILED  ] DreamcastSave/RomHeaderTest.JSON/BIOS002_VMS, where GetParam() = BIOS002.VMS
[  FAILED  ] DreamcastSave/RomHeaderTest.JSON/SONIC2C_VMS, where GetParam() = SONIC2C.VMS
2024-03-10 03:57:26 -04:00
David Korth
9d282b593c NEWS.md: Mention #407. 2024-03-09 14:31:27 -05:00
David Korth
5199a9c040 NEWS.md: Mention PalmOS. 2024-03-09 13:50:07 -05:00
David Korth
11710a6231 NEWS.md: The bug causing the Directory Opus crash first showed up in v1.7. 2024-03-04 20:51:57 -05:00
David Korth
205c81c885 [win32] RP_ShellPropSheetExt_Private::SubtabDlgProc(): Return FALSE instead of calling DefSubclassProc().
This *usually* didn't cause any problems when using Windows Explorer,
but Directory Opus appears to do its own subclassing. The end result
is Directory Opus crashes when selecting the rom-properties tab in
file properties.

NOTE: Since it's a dialog procedure, it needs to return FALSE instead of
calling DefWindowProc, and definitely not DefDlgProc.

As per MSDN: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-defdlgprocw

The **DefDlgProc** function must not be called by a dialog box procedure;
doing so results in recursive execution.

Fixes #405: Crash when used inside Directory Opus
Reported by @Kugelblitz360.
2024-03-04 20:46:26 -05:00
David Korth
8b072cfc4b NEWS.md: Mention armhf/aarch64 seccomp fixes. 2024-03-04 20:45:43 -05:00
David Korth
57e6542584 [libunixcommon] dll-search.c: Fix KF6 detection.
kdeinit6 doesn't exist, but we can check KDE_SESSION_VERSION instead.
This variable has been set since KDE 4.

Without this change, rp-config would always use the KF5 version on
KF6 because it couldn't find any matching kdeinit process.

TODO: Only check KDE_SESSION_VERSION instead of checking processes?

NEWS.md: Mention this.
2024-03-03 17:40:07 -05:00
David Korth
a5a6d140c1 rom-properties 2.3 2024-03-03 13:25:30 -05:00
David Korth
13a95183eb [libromdata] Intellivision: Initial Intellivision ROM image parser.
There's a bit of weirdness with Intellivision due to its unusual word
size. The General Instrument CP1610 is a 16-bit CPU, but uses 10-bit
opcodes. Because of this, Mattel used 10-bit ROMs. Some of the fields
in the ROM header use 16-bit addresses, split up into two 10-bit words.
The ROM file uses 16-bit big-endian for words, so in order to decode
these addresses, we have to take two 16-bit big-endian values, read
the low 8 bits of each, and combine it into a 16-bit value.

NOTE: ROM images must have a .int or .itv file extension, since the
Intellivision ROM header doesn't have a magic number.
2024-03-02 16:47:14 -05:00
David Korth
99aed172ac [kf5] XAttrViewPluginFactoryKF5: Fix XAttrView on KF5 older than 5.89.0.
The registerPlugin<> call incorrectly specified XAttrViewPropertiesDialogFactory
instead of XAttrViewPropertiesDialogPlugin.
2024-02-29 23:36:43 -05:00
David Korth
55e1464fc0 NEWS.md, README.md: Mention ColecoVision. 2024-02-27 19:45:17 -05:00
David Korth
d28a6ec065 NEWS.md: Mention CBMDOS G71 images. 2024-02-27 00:30:15 -05:00
David Korth
d9004f977b NEWS.md: Mention GameCube DPF and Wii RPF sparse disc images. 2024-02-26 19:13:57 -05:00
David Korth
bdf187d6e0 README.md: Update for v2.3.
New preview image: rp-v2.3-kde5.CBMDOS.png

This shows a Commodore 1541 disk image from GEOS.
2024-02-25 20:34:02 -05:00
David Korth
c36ba28c0e NEWS.md: Mention CBMDOS. 2024-02-24 21:47:14 -05:00
David Korth
9a39ccd34c NEWS.md: DirectDrawSurface supports mipmaps now, but SegaPVR still does not. 2024-02-14 22:25:23 -05:00
David Korth
69a1542a62 Add Italian gettext translations from MaRod92. 2024-02-06 19:09:50 -05:00
David Korth
9d8148a0b7 Merge branch 'bugfix/win32-dark-mode-Win11-StartIsBack' 2024-01-27 21:43:50 -05:00
David Korth
16a73d9904 NEWS.md: Mention StartAllBack fixes, with issues. 2024-01-27 21:43:28 -05:00
David Korth
39c5fc43f1 Add Romanian Win32 .rc translations from @ionuttbara. 2024-01-20 13:44:12 -05:00
David Korth
2502ed8ae1 [gtk] RomDataView: "Standard sorting" needs to be implemented manually.
On GTK3 at least, "standard sorting" is case-insensitive. This may or
may not be changed in future versions, so implement it ourselves.

sort_funcs.c: New function sort_RFT_LISTDATA_standard().
2024-01-08 19:56:12 -05:00
David Korth
6784e7a3f8 [libromdata] GameCube: "Region-Free" *is* allowed for GCN with certain debugging hardware connected.
See #400: Wrong region listed on a GameCube ISO?
2023-12-23 13:12:14 -05:00
David Korth
fafc07b637 [libromdata] GameCube: The "Region-Free" region code isn't valid for GCN; only Wii.
Fixes #400: Wrong region listed on a GameCube ISO?
Reported by @loser2023sgyt.
2023-12-23 13:09:21 -05:00
David Korth
12c4e5f7d6 [libromdata] GameCubeSave: Allow files with no icon or comment. (address == 0xFFFFFFFF)
Some SDK tools generate save files with no icon or comment. The icon
or comment addresses in this case is 0xFFFFFFFF.

Also, split the comment code into a separate function, getComment().
Based on loadFieldData()'s version, which has a union+struct to
separate the desc and file sections.

Reported by RedBees.
2023-12-14 00:26:28 -05:00
David Korth
2dd15ffc17 [svrplus] svrplus.c: Support for 32-bit ARM applications was dropped in build 25905.
See #398.
2023-12-03 19:02:10 -05:00
David Korth
4b8c3b8628 Merge branch 'feature/IDiscReader-as-IRpFile'
Conflicts:
	NEWS.md
2023-12-03 13:11:04 -05:00
David Korth
d95cafbebb [svrplus] svrplus.c: Register for arm64 and arm64ec on Win11 build 21262 or later; for earlier versions, only arm64.
ARM64EC was added at the same time as general amd64 emulation in
Windows 11 build 21277 (actually 21262, a leaked build).

On Windows 10, don't register for either amd64 or arm64ec.

See #398: Installing on ARM64 shows an error that the AMD64 version
of the DLL couldn't be registered
Reported by @kristibektashi.
2023-12-03 13:05:13 -05:00
David Korth
92393c3a20 [svrplus] svrplus.c: On ARM64 Windows 11, install for i386, arm64, and arm64ec.
On Windows 10, only install for amd64 if using build 21277 or later,
since that's when amd64 emulation was added.

Fixes #398: Installing on ARM64 shows an error that the AMD64 version of
the DLL couldn't be registered
Reported by @kristibektashi.
2023-12-03 12:27:45 -05:00
David Korth
daaf1622a6 NEWS.md: Dark Mode is fully implemented.
Update copyrights for the various components:
- ysc3839 and PolyHook_2_0 are MIT.
- TortoiseGit is GPLv2.
- Notepad++ is GPLv3.
2023-11-19 12:54:16 -05:00
David Korth
c479d74867 [libromdata] NASOSReader::isDiscSupported_static(): Fix detection of dual-layer Wii images.
These have 'WII9' magic.

I'll note that this isn't *too* relevant now that RomDataFactory checks
the magic numbers and 'WII9' is present there.
2023-11-14 22:46:06 -05:00
David Korth
aa925665b0 [libromdata] RomDataFactory: Add SparseDiscReader handling.
Instead of requiring each RomData subclass (GameCube, PSP, etc.) to
explicitly handle various sparse disc formats, have RomDataFactory
check for sparse disc images itself. That way, if one is found, the
appropriate SparseDiscReader subclass can be opened and the disc read
as if it's a flat disc image.

Among other things, this adds support for ZISO and PSP CISO formats
for PS2 loaders. It also technically allows those formats to be used
for GameCube and Wii disc images, though it doesn't make much sense.

Tested by converting a GameCube disc image to multiple formats,
including GameCube CISO, GCZ, PSP CISO, JISO, ZISO, and DAX.

Fixes #397: Could you add support for PS2 ISO's compressed to zso and cso?
Reported by @60fpshacksrock.
2023-11-14 18:43:07 -05:00
David Korth
c7fa834818 Merge branch 'feature/Win32-DarkMode'
Aside from Tab Control and RichEdit, it's basically done.

NOTE: RFT_LISTDATA should be updated for proper ListView transparency.

Conflicts:
	NEWS.md
2023-11-11 20:47:03 -05:00
David Korth
6b336833a8 NEWS.md: Mention Dark Mode on Windows.
FIXME: Tab Control and RichEdit is still a bit wonky.
2023-11-11 20:25:10 -05:00
David Korth
f944b82a4c NEWS.md: Note that the zlib-ng Windows XP issue affects rom-properties v2.2 - v2.2.1. 2023-11-09 20:19:20 -05:00
David Korth
66cd22c988 [librpbase] AesCAPI::decrypt(): Fix a memory leak when using CTR decryption.
hMyKey was never destroyed in the CTR path; only the ECB and CBC path.

Also: s/EBC/ECB/

Not too noticeable, since this would only show up if a user attempted to
view an encrypted Nintendo 3DS ROM image on Windows XP. (On Windows Vista
and later, AesCAPI_NG is used instead.)
2023-11-09 20:18:07 -05:00
David Korth
08e9ad2e12 NEWS.md: Mention the Windows XP zlib-ng fix. 2023-11-09 01:25:55 -05:00
David Korth
7b859302dc NEWS.md: Mention DXT5nm. 2023-10-30 19:06:15 -04:00
David Korth
656e265ce5 [gtk4] NautilusPropertiesModelProvider: Check for achievements when the Nautilus properties page is opened.
There's no way to wait for the user to select the "ROM Properties"
section, since NautilusPropertiesModel is an abstract model, not an
actual GtkWidget.
2023-10-14 11:32:54 -04:00
David Korth
22c6ff32be NEWS.md: Mention the GTK4 GdkTexture switch. 2023-10-14 01:54:47 -04:00
David Korth
4669eaf9d0 [libromdata] EXEData: Add 0x0601 for PowerPC (big-endian).
This CPU type is used by the old MSVC for Mac.

0x01F2, the CPU type for Xbox 360, is now "PowerPC (big-endian; Xenon)".

FIXME: Subsystem version on the test DLL is "1024.32768". Byteswapping
this results in "4.128", which is still not quite right. Import and
export tables aren't showing up either, which probably means some
fields are in big-endian that are normally in little-endian.

Fixes #396: PE machine value 0x0601 == PowerPC big-endian (classic Mac)
Reported by @Wack0.
2023-10-07 16:32:39 -04:00
David Korth
2de2f50be6 NEWS.md: Mention mipmap support for DirectDrawSurface. 2023-09-28 19:35:32 -04:00
David Korth
cc71967428 NEWS.md: Mention mipmap extraction and tests. 2023-09-24 12:00:26 -04:00
David Korth
4512f93957 [libromdata] NES: Fix PRG RAM size (non-battery-backed) for NES 2.0 ROM headers.
It was incorrectly using the battery-backed PRG RAM size for both
fields.

Also, show PRG RAM before CHR RAM for consistency with PRG ROM and
CHR ROM.

Found using ubsan:
src/libromdata/Console/NES.cpp:1079:24: runtime error:
shift exponent -1 is negative

This has been broken since NES 2.0 PRG RAM fields were added in
commit 6e9206b03e.
([libromdata] NES: Added NES 2.0 PRG RAM fields.)

Affects: v1.1 - v2.2.1

Re-generated the NES test files.
2023-09-16 22:06:01 -04:00
David Korth
94f6fa3ad3 [libromdata] MegaDrive::parseIOSupport(): Fix some incorrect shift values.
The table needs MD_IOSH_* values, but a few were using MD_IO_*:
- Team Player
- Light Gun
- Activator
- Tablet
- Paddle

Re-generated MD, 32X, and Pico test files.

NOTE: Some Pico games have 'V' (Paddle), which doesn't make sense because
the Pico doesn't have a detachable controller...

Found using ubsan in RomHeaderTest:

src/libromdata/Console/MegaDrive.cpp:307:15: runtime error:
shift exponent 52 is too large for 32-bit type 'unsigned int'

This fixes a regression from commit 7fe699aae4.
([libromdata] MegaDrive::parseIOSupport(): Use an index-based lookup table.)

Affects: v2.0 - v2.2.1
2023-09-16 21:45:46 -04:00
David Korth
511acbef1e NEWS.md: Mention SSSE3 possibly not working properly. 2023-09-15 20:15:24 -04:00
David Korth
b33c293a13 [win32] RP_XAttrView: Use LoadDialog_i18n().
This lets us adjust the xattr tab language by setting LC_ALL and/or
LC_MESSAGES instead of having to completely disable the other language
.rc files.
2023-09-09 11:40:54 -04:00
David Korth
2f4ae8f14f NEWS.md: Mention support for SegaPVR GVR CI4/CI8 textures. 2023-08-26 17:20:16 -04:00