aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Edge fill rules for swapped polygons + a few minor fixes to edge cases (#1815)Jaklyy2023-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix edge fill rules for swapped polygons also fixes translucent polygons not being always edge filled. * fix right edge fill rule * fix right edge fill rule for realsies * fix a few more glitchy polygons specifically quads similar to: (-67,40) (64, 160) (192, 160), (8, 111) * fix one edge case pixel i hate this so much * fix "flat bottom" edge fill * fix regression + apply changes to shadow masks fix a regression with certain line polygons not rendering; there seems to be an exception made by the ds' gpu in order for these polygons to render properly. also apply these changes to shadow masks because i forgot to * forgot to remove a line --------- Co-authored-by: Arisotura <thetotalworm@gmail.com>
* Make sprite mosaic (more) accurate (#1687)Mireille2023-08-27
| | | | | | | | | * Make horizontal sprite mosaic (more) accurate * Vertical sprite mosaic should not extend the sprite's bounding area * Vertical sprite mosaic should not extend the sprite's bounding area (2) * OBJIndex is no longer needed
* Fix Incorrect Polygon Swapping Behavior and Implement Correct Rules for ↵Jaklyy2023-08-27
| | | | | | | | | | | | | | Shifting Right Edges Left (#1816) * fix polygons being swapped incorrectly "borrowed" this from noods needs verification that the >= and <= signs aren't actually supposed to be > and < * proper rules for moving vertical right slopes left * nvm most of that was actually pointless that's on me for not checking
* Fix aa being upside down on swapped y-major slopes (#1803)Jaklyy2023-08-27
| | | | | | | | | | | | | * fix aa being upside down on swapped y-major slopes * further improvements to swapped aa in addition to fixing swapped y-major slope aa, now fixes: swapped x-major slope aa swapped vertical slope aa * use templates instead + style/comment tweaks should force the compiler to precompile if statements like i want it to do, instead of just hoping it does so on its own
* Small Fix to Anti-Aliasing + Edge Marking Behavior (#1680)Jaklyy2023-08-27
| | | | | | | | | | | * Anti-Alias All Edges Changing a bunch of 0x3s to 0xF since I figure if they're checking the left and right edge they wanna be checking the top and bottom too now that they're gonna be aa'd. also copy that if statement over since otherwise there won't be anything to blend with. * small optimization its probably a tiny bit faster? idk id need actual benchmarking tools. doesn't break anything at least.
* fix aa calc for 1px tall 0px wide slopes (#1795)Jaklyy2023-08-27
|
* Assorted portability enhancements (#1800)Jesse Talavera-Greenberg2023-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce some Platform calls for managing dynamic libraries * Add Platform::WriteFATSectors * Introduce some Platform calls for managing dynamic libraries * Add Platform::WriteFATSectors * Change includes of "../types.h" to "types.h" - Makes it easier to directly include these headers in downstream projects * Change an include of "../Wifi.h" to "Wifi.h" * Allow CommonFuncs.cpp to compile on Android * Tidy up some logging calls - Use Platform::Log in LAN_Socket.cpp - Soften some warnings to Debug logs (since they don't necessarily represent problems) * Add Platform::EnterGBAMode - Gracefully stop the emulator if trying to enter GBA mode * Soften some logs that most players won't care about * Soften some more logs * Introduce Platform wrappers for file operations * Fix pointer spacing * Fix more style nits * Log the errno when ftruncate fails * Fix FileSeek offset argument - With an s32 offset, we couldn't access files larger than 2GB * Revise Platform::StopEmu to address feedback - Remove Platform::EnterGBAMode in favor of adding a reason to Platform::StopEmu - Also rename Platform::StopEmu to Platform::SignalStop - Add an optional argument to NDS::Stop - Use the new argument everywhere that the console stops itself * Rename FileGetString to FileReadLine - It conveys the meaning better * Rename FileSeekOrigin::Set to Start - It conveys the meaning better * Change definition of FileGetString to FileReadLine - Oops, almost forgot it * Rename FlushFile to FileFlush - To remain consistent with the other File functions * Add a FileType usage * Fix line break in FileSeekOrigin * Document Platform::DeInit * Clarify that StopReason::Unknown doesn't always mean an error * Move and document FileType::HostFile * Remove Platform::OpenDataFile - Nothing currently uses it * Refactor Platform::OpenFile and Platform::OpenLocalFile to accept a FileMode enum instead of a string - The enum is converted to fopen flags under the hood - The file type is used to decide whether to add the "b" flag - Some helper functions are exposed for the benefit of consistent behavior among frontends - Equivalent behavior is maintained * Fix a tab that should be spaces * Use Windows' 64-bit implementations of fseek/ftell * Move Platform::IsBinaryFile to Platform.cpp - It could vary by frontend * Remove an unused FileType * Rename an enum constant * Document various Platform items * Use Platform::DynamicLibrary to load libandroid - And clean it up at the end * Fix a typo * Pass the correct filetype to FATStorage - Since it can be used for DSI NAND images or for SD cards * Remove Platform::FileType
* check lower pixel when top pixel ignores fog (#1808)Jaklyy2023-08-13
|
* Improve Interpolation Accuracy (#1686)Jaklyy2023-08-10
| | | | | | | | | | | | * Fix Up Y Interp Inputs * Change Linear Interp Formula Fixes a handful of pixels. Still not perfect. * Cleanup remove some unnecessary code and parentheses
* fix some UBRSDuck2023-08-01
|
* a bit of frontend refactoringRSDuck2023-07-29
|
* wifi: attempt two at optimizing the sync mechanism. this time it should be ↵Arisotura2023-07-28
| | | | far less prone to problems.
* wifi: implement CMD retriesArisotura2023-07-27
|
* wifi:Arisotura2023-07-27
| | | | | * rework and clean up frame transfer code * disable melonAP during local multiplayer comm
* cancel CMD transfer if there isn't enough time leftArisotura2023-07-25
|
* wifi: mystery ack value is CMD_COUNTArisotura2023-07-25
|
* keep that one extra line in, thoArisotura2023-07-25
| | | | (remind me to rename these with the proper reg names)
* Revert "attempt at making local multiplayer faster"Arisotura2023-07-25
| | | | This reverts commit 8772258fe70a4b587a2db045bfcf1926bb8ac5fc.
* codesign the final universal macOS app bundleNadia Holmquist Pedersen2023-07-24
| | | | | otherwise the code signature in it will be invalid, and macOS won't run it witohout manually removing xattrs
* Work around a strange bug in Qt5 that causes melonDS to crash on launchNadia Holmquist Pedersen2023-07-16
| | | | | | | ...but only with LTO enabled ...but only on some UNIX systems ...but only with some additional build options except when it breaks without any as well
* DSi: add option to boot the full boot ROMs (#1581)PoroCYon2023-07-16
| | | | | | | | | * DSi: add option to boot the full boot ROMs added a config option for this so that this can be enabled or disabled also added IO regs for DSi GPIO, but those don't do anything yet. * reset GPIO regs on reset
* Merge branch 'master' of github.com:Arisotura/melonDSArisotura2023-07-15
|\
| * Add AppImage Builds (#1670)TGP172023-07-14
| | | | | | | | | | | | | | * Create build-appimage.yml * Update build-appimage.yml This Adds the new Dependencies for MelonDS
* | attempt at making local multiplayer fasterArisotura2023-07-15
|/
* fix bad seqno bug with MP replies (oops)Arisotura2023-07-14
|
* wifi: only allow setting TXSLOT_CMD bit15 if CMDCOUNT is nonzero, as per GBAtekArisotura2023-07-14
|
* Add a fallback to streaming decompression when loading zstd-compressed ROMs.Nadia Holmquist Pedersen2023-07-14
| | | | | | Because of course some compression programs aren't nice enough to tell you the decompressed size up front in the file, so the other approach will fail. Things just can't ever be easy and straight forward, can they?
* Don't try to open the mic device every time if SDL says it has noneNadia Holmquist Pedersen2023-07-14
| | | | | Fixes the UI hanging up on Windows 11 when there are no mics, but the mic input is set to external device as it is by default.
* Modest cleanups for DSi_NAND (#1714)Jesse Talavera-Greenberg2023-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a definition for TMD files * Wrap TitleMetadata in a namespace * Add a comment * Remove TitleMetadataCertificate - melonDS ignores it anyway * Refactor the use of title metadata - Move bitwise operations on the title ID into helper methods - Use TitleMetadata objects instead of pointers to raw data * Slight cleanup in DSi_NAND - Replace some constants with sizeof - Use an NDSHeader object instead of a raw array of bytes * Add a DSi_NAND::ImportFile overload that loads a file from memory * Split most of ImportTitle into InitTitleFileStructure - It will be reused in the next commit * Add ability to import title from memory * Fix another potential issue * Fix broken DSiWare installation - The bytes of the title ID/category were being swapped in most places, but not all * Add some logging calls * Declare array sizes in DSi_TMD in decimal, not hex * Add a space after the #endif - To adhere to the style guide * Assert the size of TitleMetadataContent * Change the type of SignatureName * Don't mark the TMD structs as packed * Remove extraneous comments * Cut down some newlines
* Make linking librt conditional on it containing shm_openJesse Talavera-Greenberg2023-07-08
| | | | | Fixes building on UNIX platforms with no librt. Co-authored-by: Nadia Holmquist Pedersen <nadia@nhp.sh>
* Forgot an #include (#1712)Jesse Talavera-Greenberg2023-06-30
|
* Split the cart parsing and loading steps (#1707)Jesse Talavera-Greenberg2023-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split ROMList into a .cpp file - Its definition in ROMList.h was causing multiple-definition linker errors - Introduce ROMListSize, since you can't take a sizeof() of an extern declaration - Mark ROMList and ROMListSize as const * Update ReadROMParams to accommodate ROMList changes * Split parsing and loading of NDS ROMs - Introduce an NDSCartData class for parsing a ROM file - Introduce InsertROM for loading a NDS cart - Refactor LoadROM to use NDSCartData and InsertROM under the hood * Reset cart state and initialize save memory in the NDSCartData constructor - Otherwise there's no way to know about SRAM-specific attributes before inserting the game * Add a comment to NDSCartData * First crack at splitting parsing and loading for GBACart * Add some logging calls for encrypting the secure area * Log the XXH64 hash of the inserted NDS ROM * Log the XXH64 hash of the secure area after decryption * Add some logging to Key1_LoadKeyBuf * Re-encrypt the secure area when inserting the cart, not when parsing it - This way, constructing a NDSCart doesn't imply a read from the filesystem (as is done in Key1_KeyBuf) * Load Key1_KeyBuf from memory, not from the file system - Now that the cart's secure area isn't re-encrypted until insertion, we can expect that the BIOS will be ready at this point * Add some helper query methods to NDSHeader * Query the DSi region directly from the header instead of checking the ROM again * Introduce a CartType enum - So CartCommon::Type doesn't have to return magic numbers * Reset the cart in NDSCart::InsertROM instead of the NDSCartData constructor - That way the constructor doesn't rely on the config or on file I/O when loading homebrew - This keeps the use of global state closer to one place * Add non-const getters for the carts * Add InsertROM overloads that accept unique_ptrs * Fix a comment * Rename member functions on NDSCartData and GBACartData to adhere to the convention * Rename members on NDSCartData and GBACartData to adhere to the convention * Fix build errors on some platforms * Add NDSHeader::IsDSiWare * Add a ROMListEntry parameter to the cart constructors - To allow for looking up details of SRAM or expected ROM size * Add some new getters to CartCommon * Use the Header/Banner members instead of globals * Make CartCommon abstract - It's not supposed to be instantiated anyway * Change the signature of CartCommon::Checksum - It's neither overridden nor mutating * Add some clarifying comments to NDSHeader * Delete CartCommon::ROM in its destructor - ParseROM copies its input and gives that copy to the cart object, so it's okay * Add some getters to CartCommon * Refactor NDSCart - Get rid of NDSCartData - Get rid of cart-specific global state within NDSCart (so registers are untouched) - Refactor uses of removed global variables to use the Cart pointer instead - Refactor ROMInfoDialog's icon functions to accept const arguments * Return the cart pointer - So *that's* why it was crashing. Whoops - Why is this even allowed? * Refactor GBACart - Delete CartGame::ROM in the destructor - Get rid of GBACartData - Remove some global state * Mark NDSCart::CartCommon::Type as const * Slightly refactor GBACart::CartCommon - Mark Type as const - Use enum constants - Make CartCommon itself abstract * Mark CRC32's data parameter as const * Mark GBACart::CartCommon::Checksum as const * Use assert.h instead of cassert - As demanded by the style guide * Fix some includes to adhere to the style guide * Get the ARM9 entry address directly from the header object * Use more Header fields directly * Rename some parameters to match the style guide * Remove some unused includes * Slightly change NDS_Header::IsHomebrew for clarity
* Assign Qt standard Quit keyboard shortcutNadia Holmquist Pedersen2023-06-29
|
* Add microphone combobox using SDL (#1709)falsidge2023-06-27
|
* actually rename that settingNadia Holmquist Pedersen2023-06-24
|
* Add a description to the wifi settings dialogNadia Holmquist Pedersen2023-06-24
| | | | | Explains that the settings only affect online play, not local multiplayer
* Implement in-memory savestates (#1693)Jesse Talavera-Greenberg2023-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor Savestate::Var{8,16,32,64} - They now delegate to VarArray - They're declared in the class header so they're likely to be inlined * First crack at refactoring Savestate to work in-memory - Well, third, but who's counting? * Implement Savestate::Finish * Remove the VersionMajor and VersionMinor fields - Instead, pull their values directly from the savestate buffer * Mark a new constructor as explicit * Rename Reset to Rewind * Fix a linebreak * Implement Savestate::Rewind * Add ROMManager::ClearBackupState * Refactor ROMManager to use the refactored Savestate * Capitalize "Least" - It was driving me nuts * Add a log call * Increase default Savestate buffer length to 32MB * Use C-style file I/O instead of C++-style - Dumping bytes to a file with C++'s standard library is a MONSTROUS PAIN IN THE ASS * Quote the savestate's file path for clarity * Write the savestate's length into the header * Add some extra logging calls * Fix section-loading * Remove the deprecated Savestate constructor * Convert a char* to a u32 with memcpy, not a cast * Fix section-handling in loads * Include <cstring> in Savestate.h - This was causing a build error on Linux
* disable DSi mode cartridge protection when DSi header is borkedRSDuck2023-05-11
|
* disable screen filtering when drawing with QTRSDuck2023-05-06
| | | | it can bring everything to a crawl and OpenGL display can be used as an alternative
* Fix tab ordering everywhereNadia Holmquist Pedersen2023-05-01
|
* Fix the layout of the video settings dialog a bitNadia Holmquist Pedersen2023-05-01
|
* add missing GPL headerRSDuck2023-05-01
|
* fix UBRSDuck2023-05-01
|
* refactor frontend audio functionalityRSDuck2023-05-01
|
* Support loading Zstandard-compressed ROMs (#1667)Nadia Holmquist Pedersen2023-04-28
| | | | | | | This is different from the archive support in that the compressed ROMs are standalone files, rather than archives, making it possible to use them exactly as if they were regular ROMs, while saving a bunch of space on disk. This is supported both for DS and GBA ROMs, though given GBA ROMs' generally small size it's mostly useful for the former.
* pointless micro optimisationsRSDuck2023-04-28
|
* Add the missing extensions we support to the macOS app infoNadia Holmquist Pedersen2023-04-15
| | | | | | | | | | | | macOS seems to require that we declare the extensions we want to consider those files to be droppable on the window. Additionally this is of course needed to show melonDS as a selectable option in the "Open with" menu and such. Setting LSHandlerRank to Alternate appears to stop it from suggesting melonDS as a primary handler for a file type, so we set this for GBA ROMs and archives as the user would most likely want them always to be associated with a more relevant app.
* fix JIT backjump detectionRSDuck2023-04-13
| | | | pretty embarrassing to loop variable mixup
* fix JIT profiling with VTuneRSDuck2023-04-13
|
* DSi power button and volume switch support (#1630)Ed_IT2023-04-04
| | | | | | | | | | | | | * Add proper BPTWL interrupts * Added DSi power button and volume switch hotkeys * Added hardware reset workaround * Adjusted syntax to follow guidelines * Added DSi output volume synchronization * Fix trivial member function error