aboutsummaryrefslogtreecommitdiff
path: root/source/gfx.cpp
AgeCommit message (Collapse)Author
2013-02-03Synchronise the controller status more spread out inside a rendered frame:Nebuleon Fumika
* before rendering a background; * before rendering sprites; * while rendering more than 128 samples of audio at once ("Prefer fluid video"); * after every 16 scanlines of CPU execution instead of every 1; * while waiting for an audio buffer to become available; * while killing time between frames with fast-forward disabled. Controller presses and releases are now combined in a DS button bitfield using a shorter 32-bit algorithm. See entry.cpp:NDSSFCAccumulateJoypad and #define ACCUMULATE_JOYPAD in the source. This is still not suitable for playing platformers frame-perfectly, but it's much better than half a second of latency to press or release a button, and one still needs to press buttons a bit more than just light taps. I'd say 50 milliseconds is the latency now. Platformers requiring more precision can be played with frameskip 0. DMA does not require double-buffered displaying, so synchronise the controller more often by disabling double-buffered displaying again.
2013-02-01memcpy vs memmove: memmove correctly handles overlapping source and ↵Nebuleon Fumika
destination memory buffers, but is slower than memcpy in many implementations. When memory buffers don't overlap, memcpy may be more efficient. The DS2 SDK is such an implementation, so change many memmoves into memcpys.
2013-01-14Handle a game switching BG modes in the middle of a frame, to hi-res and to ↵Nebuleon Fumika
lo-res. This fixes Seiken Densetsu 3.
2013-01-10Attempt to optimise the ADD background drawing mode so it's playable on ↵Nebuleon Fumika
automatic frameskip in games like Super Metroid. It doesn't work well. See the video for this bug at <http://www.youtube.com/watch?v=sUWjVxAD9Q8>.
2013-01-05Mess with Mode 5 some more. Secret of Mana's menu sprite is fixed; however, ↵Nebuleon Fumika
as of commit 3cd20e203f3b0af8c32921f86547a126d74b34eb (still not fixed in this commit!), Donkey Kong Country's Rareware icon is split by black columns.
2013-01-04Move all CPU cycle calculations into cpuops.cpp.Nebuleon Fumika
2013-01-01Render double-width-res tiles from Background Mode 5 as half-width tiles. ↵Nebuleon Fumika
This makes the menu text in Secret of Mana readable. Sprites in Background Mode 5 are still messed up. At least they're at the right X coordinate, roughly...
2012-12-30Memory access optimisations in sprite rendering.Nebuleon Fumika
2012-12-30Rendering optimisations.Nebuleon Fumika
tile.cpp: Optimise the common case of drawing an unclipped but possibly flipped 8x8 tile. Instead of calling WRITE_4PIXELS16 16 times, each performing setup and teardown, move the loop into DrawTile16. tile.h, tile.cpp, gfx.h, gfx.cpp: End the use of global variable GFX.ScreenColors to pass around the current frame's palette. This saves on memory stores/loads.
2012-12-27Speed up rendering by an unknown amount.Nebuleon Fumika
gfx.cpp, others: Avoid always checking for Settings.SixteenBit if FOREVER_16_BIT is defined. port.h: Define FOREVER_16_BIT below PIXEL_FORMAT.
2012-12-22Preliminary Snes9x-based cheat code support. Not tested, because the file ↵Nebuleon Fumika
selection interface freezes when it gets to the folder containing Mightymo's cheat files, whereas it did not do this before with the converted Mightymo cheats. (335 files -> 679, though.)
2011-03-05first commitKitty Draper