aboutsummaryrefslogtreecommitdiff
path: root/src/GPU2D.cpp
Commit message (Collapse)AuthorAge
* Sprinkle `const` around where appropriate (#1909)Jesse Talavera2023-12-12
| | | | | | | | | * Sprinkle `const` around where appropriate - This will make it easier to use `NDS` objects in `const` contexts (e.g. `const` parameters or methods) * Remove the `const` qualifier on `DSi_DSP::DSPRead16` - MMIO reads can be non-pure, so this may not be `const` in the future
* Move all core types into namespaces (#1886)Jesse Talavera-Greenberg2023-11-25
| | | | | | | | * Reorganize namespaces - Most types are now moved into the `melonDS` namespace - Only good chance to do this for a while, since a big refactor is next * Fix the build
* Refactor the GPU to be object-oriented (#1873)Jesse Talavera-Greenberg2023-11-09
| | | | | | | | | | | | | | | | | * Refactor GPU3D to be an object - Who has two thumbs and is the sworn enemy of global state? This guy! * Refactor GPU itself to be an object - Wow, it's used in a lot of places - Also introduce a new `Melon` namespace for a few classes - I expect other classes will be moved into `Melon` over time * Change signature of Renderer3D::SetRenderSettings - Make it noexcept, and its argument const * Remove some stray whitespace
* update copyright yearsArisotura2023-11-04
|
* 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
* Introduce `Platform::Log` (#1640)Jesse Talavera-Greenberg2023-03-23
| | | | | | | | | | | | | * Add Platform::Log and Platform::LogLevel * Replace most printf calls with Platform::Log calls * Move a brace down * Move some log entries to one Log call - Some implementations of Log may assume a full line * Log the MAC address as LogLevel::Info
* fix potential issues with 32bit GPU writesArisotura2022-04-10
|
* DISPCAPCNT is writable at any timeArisotura2022-03-14
|
* update copyright headersArisotura2022-01-09
|
* update copyright year and add missing GPL headersRSDuck2021-03-12
|
* separate GPU2D registers and rendererRSDuck2021-02-27
|
* improve and fix NonStupidBitfield also get rid of some UBRSDuck2021-02-09
| | | | fixes optimised lto clang build
* GPU: make sure to always pass BG0HOFS to the 3D engine, even if the 2D ↵Arisotura2020-12-10
| | | | engine is disabled.
* GPU: forward BG0HOFS to internal rendering engine register for 3D layer ↵Arisotura2020-12-10
| | | | | | | | scroll (only when the rendering engine is enabled). fixes #840 thank you RSDuck and Hydr8gon for your insight into this.
* only start display capture on first lineRSDuck2020-12-09
| | | | | fixes Spearpillar in Pokemon D/P/Pt also fixes #782 and #474
* lay base for multiple GPU2D backendsRSDuck2020-12-06
|
* fix #838RSDuck2020-12-05
|
* fix 4-bit affine spritesRSDuck2020-12-03
|
* Merge vram dirty trackingRSDuck2020-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit b463a05d4b909372f0cd1ad91caa0c77a25e5901 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 30 01:55:35 2020 +0100 minor fix commit ce73cebbdf5da243d7ebade82d8799ded9cd6b28 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 30 00:43:08 2020 +0100 fix dirty flags of BG/OBJ mappings not being reset commit fc5d73a6178e3adc444398bdd23de8314b5ca8f8 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 30 00:11:13 2020 +0100 use flat vram for gpu2d everywhere commit 34ee9fe2bf04fcfa2a5a1c8d78d70007e606f1a2 Author: RSDuck <rsduck@users.noreply.github.com> Date: Sat Nov 28 19:10:34 2020 +0100 mark VRAM dirty for display capture commit e8778fa2f429c6df0eece19d6a5ee83ae23a0cf4 Author: RSDuck <rsduck@users.noreply.github.com> Date: Sat Nov 28 18:59:31 2020 +0100 use flat VRAM for textures and texpals also skip rendering if nothing changed and a bunch of fixes commit 53f2041e2e1a28b35702a2ed51de885c36689f71 Author: RSDuck <rsduck@users.noreply.github.com> Date: Fri Nov 27 18:29:56 2020 +0100 use vram dirty tracking for extpals also preparations to take this further commit 4cdfa329e95aed26d3b21319c8fd86a04abf20f7 Author: RSDuck <rsduck@users.noreply.github.com> Date: Mon Nov 16 23:32:22 2020 +0100 VRAM dirty tracking
* GPU2D: don't an indirect call in tight loopsRSDuck2020-11-16
|
* make OpenGL renderer a build optionRSDuck2020-10-01
| | | | mostly meant for the Switch port
* avoid out-of-bounds read in GPU2D. fixes #763Arisotura2020-09-18
|
* remove some UBRSDuck2020-09-04
| | | | | | | - savestates used to read a four bytes from a single byte value - a few unassigned variables - some other things - also make the ROR macro an inline function
* GPU2D: allow writes to DISPCNT, master brightness, capture, dispFIFO ↵Arisotura2020-08-19
| | | | | | regardless of POWCNT. fixes #665
* * rework GPU's settings interface, make it config-agnosticArisotura2020-05-28
| | | | | * make video settings dialog functional, sorta * fix dialogs that were resizable
* get the OpenGL renderer going.Arisotura2020-05-25
| | | | | | sorta. (also make the blackmagic_II branch obsolete in the process)
* update copyright yearsArisotura2020-02-14
|
* fix remaining sprite y-coord bugs. fixes #531Arisotura2019-11-03
|
* fix sprite y-flipArisotura2019-11-03
| | | | also, meaningless shenanigans
* uuuh we should only do it once per scanlineArisotura2019-09-15
|
* well, here, OBJ X mosaic is done tooArisotura2019-09-15
|
* begin work on mosaicArisotura2019-09-15
| | | | OBJ Y mosaic emulated correctly, there's atleast that.
* guess who the idiot is who broke sprite extpalArisotura2019-09-05
|
* GPU2D: delay palette lookup for spritesArisotura2019-09-05
|
* zerpArisotura2019-09-01
|
* GPU2D: shape3 sprites are always 8x8Arisotura2019-09-01
|
* GPU2D:Arisotura2019-07-24
| | | | | * implement reserved mode for bitmap sprites (not too interesting) * mask out DISPCNT bits that don't apply to the sub GPU
* GPU2D: add 'prohibited' large BG sizesArisotura2019-07-24
|
* GPU2D: fill gaps in BG modesArisotura2019-07-24
| | | | | * mode6 actually works on the sub GPU, albeit limited to 1/4 the full bitmap size due to having only 128K of VRAM * mode7 draws BG0, BG1 and sprites. no BG2/BG3.
* GPU2D: forced-blank only disables BG/OBJ compositing (VRAM/FIFO display, ↵Arisotura2019-07-24
| | | | | | capture, master brightness still run) fixes #491
* fix potential out-of-bounds writeArisotura2019-07-13
|
* raise kMaxIterationCycles to 64Arisotura2019-06-25
|
* GPU2D: hardware renders sprites one scanline in advance.Arisotura2019-06-10
| | | | fixes #375 (midframe OAM update)
* this is the same thing, but, for the sake of consistencyArisotura2019-06-08
|
* fix potential crash when running the software renderer (oops)Arisotura2019-06-02
|
* OpenGL: fix cases of layers/sprites blending over the 3D layerArisotura2019-06-01
|
* simpler GPU-compositing. will make it easier to grab neighbor 2D/3D pixels ↵Arisotura2019-05-25
| | | | individually for filtering.
* welp.Arisotura2019-05-21
| | | | progress
* remove reference to GL version 4.3 from filenames and namespacesArisotura2019-05-20
|
* begin botching the codeArisotura2019-05-19
| | | | BAHAHAHAAAA