James Rowe
10fb9242ae
Fix clang format
2017-12-23 16:10:32 -07:00
James Rowe
13606a6d0b
Memory: Remove count of cached pages and add InvalidateRegion
...
In a future commit, the count of cached pages will be reintroduced in
the actual surface cache. Also adds an Invalidate only to the cache
which marks a region as invalid in order to try to avoid a costly flush
from 3ds memory
2017-12-23 16:10:25 -07:00
Subv
3652809408
HLE: Convert GSP_GPU to ServiceFramework.
...
The only functional change is the error handling of GSP_GPU::ReadHWRegs function. We previously didn't return error codes (not even for success). The new returns were found by reverse engineering the GSP module.
2017-12-21 10:30:22 -05:00
B3n30
e9a95b2e7d
CoreTiming: Reworked CoreTiming ( #3119 )
...
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2017-11-25 14:56:57 +01:00
wwylele
499508389c
core: clear format warnings
2017-11-01 12:35:32 +02:00
Subv
8a9a4e2c42
GPU/Warnings: Explicitly cast the screen refresh ticks to u64.
2017-08-21 08:34:30 -05:00
Subv
65f19b51c4
Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.
2017-08-21 08:34:28 -05:00
wwylele
85a448d405
gpu: add comments for TextureCopy
2017-06-29 13:09:23 +03:00
wwylele
bf16c73260
gpu: fix edge cases for TextureCopy
2017-06-27 23:20:23 +03:00
Subv
1f1739d366
UDS: Move the UDS keyslot used to generate the CCMP key to the AES::KeySlotID enum.
2017-06-26 12:24:13 -05:00
Yuri Kunde Schlesner
b250ce21b9
Merge pull request #2587 from yuriks/status-bar
...
Replace built-in Profiler with indicators in status bar
2017-02-26 17:51:15 -08:00
Yuri Kunde Schlesner
fb1979d7e2
Core: Re-write frame limiter
...
Now based on std::chrono, and also works in terms of emulated time
instead of frames, so we can in the future frame-limit even when the
display is disabled, etc.
The frame limiter can also be enabled along with v-sync now, which
should be useful for those with displays running at more than 60 Hz.
2017-02-26 17:22:04 -08:00
Yuri Kunde Schlesner
c75ae6c585
Add performance statistics to status bar
2017-02-26 17:22:03 -08:00
wwylele
ea1ea0224c
HW: add AES engine & implement AES-CCM
2017-02-21 23:57:31 +02:00
wwylele
47960b0659
CoreTiming: use named constant for ARM11 clock rate
2017-01-16 09:59:16 +02:00
wwylele
3c333c53f1
HID: manages updating itself using correct ticks
2017-01-16 09:51:44 +02:00
Lioncash
963aedd8cc
Add all services to the Service namespace
...
Previously there was a split where some of the services were in the
Service namespace and others were not.
2016-12-11 00:07:27 +00:00
Sebastian Valle
998390ac1a
Merge pull request #2280 from Subv/citrace_size
...
Fixed the gpu command list size when creating CiTraces.
2016-12-08 15:45:53 -05:00
Subv
5719467add
Fixed the gpu command list size when creating CiTraces.
2016-12-08 15:21:02 -05:00
emmauss
c4e4fa53d9
Implement Frame rate limiter ( #2223 )
...
* implement frame limiter
* fixes
2016-12-06 14:33:19 -05:00
Emmanuel Gil Peyrot
0820c99462
GPU: Remove the broken frame_skip option.
...
Fixes #1960 .
2016-11-27 21:19:56 +00:00
wwylele
58ae94af4c
gpu: DisplayTransfer: a less amazing algorithm for flip
...
the old implementation modifies the loop variable in the loop. Though it actually works, it is really confusing. Makes it morereadable now.
2016-09-29 10:01:34 +08:00
wwylele
30ab0fa45d
gpu: keep the old signal strategy for null pointer
...
previous commits changes the behaviour of interrupt when meeting invalid params. Regresses to the same behaviour as before
needs more hwtest
2016-09-29 10:01:34 +08:00
wwylele
48470e57fc
gpu: add validity check for TextureCopy, DisplayTransfer and FillMemory
...
prevent further operation with invalid values which may cause assertion failure or divided by zero.
needs more hwtest
2016-09-29 10:01:34 +08:00
wwylele
c88cdc9a2b
gpu: move MemoryFill, TextureCopy and DisplayTransfer into functions
...
The old code indented too much to read. Split into functions and do general cleanup.
2016-09-29 10:01:34 +08:00
Yuri Kunde Schlesner
84fbbe2629
Use negative priorities to avoid special-casing the self-include
2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
ebdae19fd2
Remove empty newlines in #include blocks.
...
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
396a8d91a4
Manually tweak source formatting and then re-run clang-format
2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
2016-09-18 09:38:01 +09:00
Alexander Laties
0a31e373f1
fixup simple type conversions where possible
2016-05-07 11:41:55 -04:00
Emmanuel Gil Peyrot
387d935a54
LCD: Remove unneeded #undef with no matching #define.
2016-04-30 13:58:26 +01:00
tfarley
22f3a7e94c
HWRasterizer: Texture forwarding
2016-04-21 17:27:56 -04:00
JamePeng
8d5a6110f7
Y2R: num_tiles should be allowed when its value is 128 ( #1669 )
2016-04-14 21:36:07 -07:00
Lioncash
c928b04eee
core/video_core: Make NumIds functions constexpr
2016-03-17 00:29:47 -04:00
Lioncash
39baad9926
core/video_core: Don't cast away const in subscript operators
...
Not to say these subscript operators aren't totally ugly as is.
2016-03-17 00:27:15 -04:00
Lioncash
bf76afc68d
renderer_base: Don't directly expose the rasterizer unique_ptr
...
There's no reason to allow direct access to the unique_ptr instance. Only
its contained pointer.
2016-03-08 21:31:44 -05:00
MerryMage
8b00954ec7
AudioCore: Skeleton Implementation
...
This commit:
* Adds a new subproject, audio_core.
* Defines structures that exist in DSP shared memory.
* Hooks up various other parts of the emulator into audio core.
This sets the foundation for a later HLE DSP implementation.
2016-02-21 13:13:52 +00:00
MerryMage
6c71858c5c
BitField: Make trivially copyable and remove assignment operator
2016-02-12 19:51:16 +00:00
Yuri Kunde Schlesner
195fedccf0
VideoCore: Unify interface to OpenGL and SW rasterizers
...
This removes explicit checks sprinkled all over the codebase to instead
just have the SW rasterizer expose an implementation with no-ops for
most operations.
2015-12-07 20:20:38 -08:00
Yuri Kunde Schlesner
03835d04f4
VideoCore: Rename HWRasterizer methods to be less confusing
2015-12-06 19:08:37 -08:00
Rohit Nirmal
32391cffdd
Silence -Wsign-compare warnings.
2015-10-06 22:16:15 -05:00
Lioncash
f87093686e
y2r: Give local variables an initial value
...
Keeps compilers/static analyzers quiet.
2015-09-09 23:38:55 -04:00
Yuri Kunde Schlesner
0fcabd2b11
Integrate the MicroProfile profiling library
...
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
2015-08-24 22:16:28 -03:00
Yuri Kunde Schlesner
9ae5a09655
GPU: Implement TextureCopy-mode display transfers
...
Fixes glitchy garbage in Fire Emblem 3D scenes.
2015-08-16 01:52:51 -03:00
Lioncash
12a9e8502c
core: Fix missing prototype warnings
2015-07-29 12:12:39 -04:00
Subv
6c0ea5f5e8
Qt/GPU Breakpoints: Added three more breakpoint types:
...
* IncomingDisplayTransfer: Triggered just before a display transfer is performed.
* GSPCommandProcessed: Triggered right after a GSP command is processed.
* BufferSwapped: Triggered when the frames flip
2015-07-23 11:47:34 -05:00
Subv
63dbff9b1f
GPU/DisplayTransfer: Implemented bit 5 in the transfer flags.
...
It tells the GPU to not swizzle/de-swizzle the input during the transfer.
2015-07-19 21:30:42 -05:00
archshift
2501f111a6
Merge pull request #904 from aroulin/y2r-narrowing-warning
...
Y2R: Fix narrowing warning
2015-07-13 22:07:39 -07:00
Tony Wasserka
902fa4da52
Add CiTrace recording support.
...
This is exposed in the GUI as a new "CiTrace Recording" widget.
Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
2015-07-13 22:27:20 +02:00
Tony Wasserka
93d66475d4
GPU: Be robust against nullptr addresses; properly reset busy bits in the trigger registers.
2015-07-13 22:27:20 +02:00
Tony Wasserka
256bdfb579
HW: Fix a stupid issue which led to unknown register reads/writes.
2015-07-13 22:27:20 +02:00
aroulin
1f125a04c3
Y2R: Fix narrowing warning
2015-07-12 03:49:16 -04:00
Yuri Kunde Schlesner
867c28ae03
Merge pull request #876 from linkmauve/include-cleanups
...
Cleanup includes, mostly in common
2015-07-10 16:36:12 -07:00
Emmanuel Gil Peyrot
641e78bccf
GPU: Implement blended downscaling for display transfers.
2015-06-28 15:11:26 +01:00
Emmanuel Gil Peyrot
8ee814ec27
GPU: Use shifts instead of multiplications to calculate the actual size of the output.
2015-06-28 14:31:13 +01:00
Emmanuel Gil Peyrot
4964a359e1
Core: Cleanup hw includes.
2015-06-28 00:46:39 +01:00
Emmanuel Gil Peyrot
45c4781544
CitraQt: Cleanup includes.
2015-06-28 00:36:54 +01:00
Yuri Kunde Schlesner
3e6663da43
Y2R: Rework conversion process, enabling support for all formats
2015-06-21 20:58:55 -03:00
Lioncash
bbe4430922
hw: Fix mismatched Write call
2015-06-16 15:49:22 -04:00
archshift
0414ad20cb
Merge pull request #811 from archshift/commonify
...
Commonify video_core utility headers
2015-05-31 09:55:29 -07:00
bunnei
833936fc64
Merge pull request #832 from yuriks/refresh-rate-option
...
Remove gpu_refresh_rate configuration option
2015-05-31 04:48:20 -04:00
archshift
76690392bf
Move video_core/color.h to common/color.h
2015-05-30 11:17:37 -07:00
Yuri Kunde Schlesner
d65b42a69a
Remove gpu_refresh_rate configuration option
...
Changing it makes emulation inherently inaccurate. It also had a wrong
default value (30, whereas the real system has a refresh rate of 60 Hz)
which, even if changed, would continue to be used unless people manually
removed it from their config files.
2015-05-29 19:39:26 -03:00
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
2015-05-29 21:59:29 +01:00
tfarley
05dc633a8c
OpenGL renderer
2015-05-22 15:51:18 -07:00
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
...
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
2015-05-15 00:04:38 -03:00
Yuri Kunde Schlesner
17a8cae003
Memory: Add GetPhysicalPointer helper function
2015-05-09 04:02:32 -03:00
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
2015-05-07 15:45:22 -03:00
bunnei
57aaaf92db
HW: Properly initialize and shutdown all modules.
2015-05-01 18:27:02 -04:00
Lioncash
7da90dee42
gpu: Fix a missing format specifier
2015-04-07 10:38:49 -04:00
purpasmart96
198c0ddc72
Services: Stubs and minor changes
2015-04-02 20:05:11 -07:00
bunnei
580b317821
Merge pull request #650 from Subv/scaling
...
GPU: Fixed the bit 25 in the display transfer flags.
2015-03-17 19:13:06 -04:00
Subv
23b401c3ac
GPU/DisplayTransfer: Made the scaling bits a single 2bit value
...
Rephrased some comments.
2015-03-16 17:54:06 -05:00
Subv
fb8f47060b
GPU: Implemented the flip_data (bit 0) bit in display transfers.
2015-03-14 15:26:42 -05:00
bunnei
ed5b275d21
Merge pull request #642 from bunnei/touchpad
...
Touchpad support
2015-03-11 21:28:57 -04:00
bunnei
d61b26b79f
HID: Complete refactor of pad/touch input to fix threading issues.
2015-03-10 23:58:07 -04:00
bunnei
b56829df02
Merge pull request #629 from archshift/lcdfb
...
Implement SetLcdForceBlack and add implementation for color filling in the GPU code
2015-03-10 18:08:55 -04:00
Subv
ae0dfcae1d
GPU: Fixed the bit 25 in the display transfer flags.
...
It is used to downscale the input image horizontally and vertically, previously we were only downscaling it vertically so this caused a hard-to-debug memory corruption problem.
2015-03-10 14:18:25 -05:00
archshift
041e99b613
Added LCD registers, and implementation for color filling in OGL code.
2015-03-09 15:51:41 -07:00
Tony Wasserka
511bf30a69
Merge pull request #648 from Subv/fill_bit
...
GPU: Use the correct position for the finished bit in memory fills
2015-03-09 23:17:11 +01:00
Subv
0abba5874c
GPU: Use the correct position for the finished bit in memory fills
2015-03-09 17:15:13 -05:00
Subv
a762f9c176
GPU: Corrected the 24 bit memory fills component order
2015-03-09 09:01:41 -05:00
archshift
47010fea31
Implement SetLcdForceBlack, move register enum to hw.h
2015-03-05 19:38:23 -08:00
bunnei
34c31db14a
GPU: Added RGB565/RGB8 framebuffer support and various cleanups.
...
- Centralizes color format encode/decode functions.
- Fixes endianness issues.
- Implements remaining framebuffer formats in the debugger.
2015-03-03 18:26:03 -05:00
archshift
7f9ee69a2b
Added RGBA5551 compatibility in the rasterizer
...
This allows Virtual Console games to display properly.
2015-02-27 19:15:08 -08:00
Subv
c564c21668
GPU: Implemented bits 3 and 1 from the display transfer flags.
...
Bit 3 is used to specify a raw copy, where no processing is done to the data, seems to behave exactly as a DMA.
Bit 1 is used to specify whether to convert from a tiled format to a linear format or viceversa.
2015-02-26 21:17:14 -05:00
Subv
b1284222f2
GPU: Fixed RGBA8 as output format in a display transfer.
...
Verified with hwtests
2015-02-22 15:22:14 -05:00
bunnei
89a71eb6a4
Merge pull request #471 from archshift/pp3ports3
...
GPU: Add support for more framebuffer formats in display transfers.
2015-02-22 14:54:56 -05:00
Tony Wasserka
23c6764b2b
GPU: Add support for more framebuffer formats in display transfers.
2015-02-22 11:48:02 -08:00
bunnei
d120757f32
Merge pull request #594 from Subv/display_transfer
...
GPU: Fixed the RGBA8 input format and RGB8 output format
2015-02-22 12:44:57 -05:00
Subv
fbbfb52a2c
GPU: Fixed the RGBA8 input format and RGB8 output format
...
in Display Transfers, tested with hwtests.
2015-02-21 18:43:53 -05:00
archshift
302f0b32f5
Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.h
2015-02-19 22:26:25 -08:00
Tony Wasserka
0da6a7e234
GPU: Properly implement memory fills.
2015-02-18 14:02:58 +01:00
Emmanuel Gil Peyrot
c439b3074d
video_core: Implement the remaining framebuffer formats in the OpenGL renderer.
2015-02-15 14:08:12 +00:00
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
...
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
2015-02-10 18:30:31 -08:00
Lioncash
676daef3c7
core: Fix some warnings on OSX
2015-02-03 08:14:42 -05:00
Yuri Kunde Schlesner
a09f71521e
GPU: Fix buffer overrun in Display Transfers
...
Display transfers with the horizontal downscaling flag were calculating
the wrong output size, causing them to write double the amount of data
intended. It is likely that this was perceived as correct due to a
separate bug in calculating source indices which caused the image to be
padded unless the previous bug was present.
This fixes both issues, correcting flickering issues in 3dscraft,
blargSnes and more (caused by the transfer overwriting the back buffer
which followed) as well as potentially fixing other crashes.
2015-01-14 05:20:14 -02:00
Yuri Kunde Schlesner
9e084826b8
GPU: Do periodic VBlank updates using CoreTiming
2015-01-14 05:20:13 -02:00
Yuri Kunde Schlesner
e29dd76e12
GPU: Correct wrong default framebuffer address for sub-screen.
...
It appears this is a mistake, since the sub-screen has no right
framebuffer.
2015-01-14 05:20:13 -02:00
Yuri Kunde Schlesner
98e3274935
GPU: Fire GPU interrupts at the correct places.
...
PDC0 and PDC1 are both VBlank interrupts. PDC0 was being treated as a
HBlank interrupt and fired many more times than it should. They now both
fire together at 60 Hz. This puzzlingly *improves* apparent framerate on
many applications.
A few other interrupts were being fired inside the GSP command
processing instead of on the actual GPU register writes, so they were
moved there, which should cover direct writes tho those registers not
going through the GX command queue.
2015-01-14 05:07:35 -02:00