Commit Graph

1697 Commits (89495fc888a6bba998311f5fef2d65320b49d4d8)

Author SHA1 Message Date
Lioncash 0c6434c379 core: Apply static to local functions 2015-02-13 10:48:32 +07:00
Lioncash a75e1ff6e6 arm: General cleanup
- Remove several typedefs for ARMul_State.
- Remove unused functions
- Remove unused/unnecessary headers
- Removed unused enums, etc.
2015-02-13 09:11:12 +07:00
bunnei 9b69079c83 Merge pull request #569 from lioncash/modeswitch
Dyncom: Correctly set the ARM modes on dyncom initialization.
2015-02-12 23:18:40 +07:00
Lioncash b7fac494cd dyncom: Switch the app and system cores into the correct mode at initialization 2015-02-12 21:54:28 +07:00
Lioncash c3211c9c80 dyncom: Clean up the constructor
Some function calls aren't necessary and would be handled by regular initialization routines.
2015-02-12 21:50:51 +07:00
Lioncash 3c474a7d31 backend: Add logging subentry for ldr
Fixes an assertion upon executing citra in debug mode.
2015-02-12 20:46:13 +07:00
bunnei befa556b78 Merge pull request #567 from lioncash/warn
dyncom: Remove warning for SXTAH
2015-02-12 20:14:10 +07:00
Lioncash df9e0c0f81 dyncom: Remove warning for SXTAH
This is tested to work correctly.
2015-02-12 20:11:20 +07:00
bunnei f7cde47911 Merge pull request #561 from Alegend45/master
Fix Min and Max blend equations
2015-02-12 19:59:10 +07:00
Lioncash e3f5c6366c arm: Remove ARMul_EmulateInit
This was only used for armemu, which has since been removed. Removed components related to this as well.
2015-02-12 11:30:28 +07:00
Subv 8e2b248e05 Build: Fixed some warnings 2015-02-12 09:25:35 +07:00
Lioncash f48b0100a6 armdefs: Remove unnecessary extern C 2015-02-12 08:29:57 +07:00
Darius Goad 5db62cc758 Fix Min and Max blend equations 2015-02-11 15:33:44 +07:00
Tony Wasserka f990728ad4 Merge pull request #384 from neobrain/vertex_shader_debugger
Vertex shader debugger
2015-02-11 22:17:46 +07:00
Kevin Hartman a56f3f290e Implemented WriteHWRegsWithMask for GSP. 2015-02-11 11:03:17 +07:00
Lioncash 49a22acd02 arm: Remove ARM26 support.
This will never be used. 32-bit is the norm.
2015-02-11 12:23:21 +07:00
bunnei c51b23b052 Merge pull request #559 from lioncash/clean
arm: Some cleanup. Also fixed the initial ARM mode that is emulated.
2015-02-11 12:02:35 +07:00
Lioncash c94c41f95a arm: Get rid of some magic constants. Specify proper ARM mode.
Initially, we were starting the emulator in USER26MODE, which is incorrect, this should be USER32MODE.
2015-02-11 10:49:55 +07:00
Lioncash 93cd199633 arm: Change some more constants into enums 2015-02-11 10:14:20 +07:00
Tony Wasserka 12a5cd1d65 citra-qt: Add a vertex shader debugger. 2015-02-11 15:40:45 +07:00
Tony Wasserka 3f649dc9b8 Pica/DebugUtils: Factor out BreakPointObserverDock into its own file. 2015-02-11 15:40:04 +07: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 +07:00
bunnei 168eb27aee GSP: Fixed typo in SignalInterrupt 2015-02-10 19:57:48 +07:00
bunnei 76e7d41f88 Merge pull request #552 from bunnei/setbufferswap-fix
GSP SetBufferSwap fix
2015-02-10 19:21:48 +07:00
bunnei 9eae2400c0 GSP: Call SetBufferSwap for each screen on corresponding signal interrupt. 2015-02-10 19:05:56 +07:00
bunnei ca22ee3239 Merge pull request #526 from purpasmart96/citra_stubs
Services: Stub some functions
2015-02-10 18:39:37 +07:00
bunnei 5b735bdeea Merge pull request #556 from lioncash/clean
arm: Remove TRUE/FALSE defines
2015-02-10 18:28:30 +07:00
bunnei 8f35772bd7 Merge pull request #555 from lioncash/lut
arm_dyncom_thumb: Make lookup tables static
2015-02-10 18:27:47 +07:00
Lioncash 088fab743f arm: Remove TRUE/FALSE defines
- Removed the Debug parameter from ARMul_State since it isn't used.
- Changed ARMul_CoProInit to a void function. It always returned true.
2015-02-10 13:09:41 +07:00
Subv 0d2b6dd656 PTM: Fixed a problem with the gamecoin PTM file. 2015-02-10 13:43:46 +07:00
Subv 1bbf0567b1 Archives: Made the Format function more generic. 2015-02-10 13:43:46 +07:00
Subv 071663e074 Archives: Expose the File and Directory classes to HLE 2015-02-10 13:43:45 +07:00
Subv ca1a87ef7d ResultVal: Fixed compilation when reassigning a ResultVal. 2015-02-10 13:43:44 +07:00
Yuri Kunde Schlesner 3f1a3952d7 FS: Allow multiple instances of the same archive type to be open at once 2015-02-10 13:43:44 +07:00
Yuri Kunde Schlesner 4468625080 FS: Get rid of completely useless Archive class 2015-02-10 13:43:43 +07:00
Lioncash 8d2fb3bb2b arm_dyncom_thumb: Make lookup tables static
These don't need to be recreated all the time.
2015-02-10 10:42:09 +07:00
bunnei 67db6aa4ce Merge pull request #553 from lioncash/denorm
vfp: Normalize accumulator for multiply accumulate instructions
2015-02-10 10:09:45 +07:00
Lioncash 3eccc66abf dyncom: Add more regs to MCR/MRC
Adds the registers that were left out of some coprocessor ranges.
2015-02-10 09:34:42 +07:00
Lioncash a86d5e2752 vfp: Normalize accumulator for multiply accumulate instructions 2015-02-10 08:16:26 +07:00
Tony Wasserka eb83ac48aa Merge pull request #543 from Alegend45/master
Add more blend equations from 3dbrew
2015-02-10 13:30:29 +07:00
Kevin Hartman 5fcbfc06eb Scheduler refactor Pt. 1
* Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid
for a thread at any given point in the system.
* Removes dead code from thread.cpp.
* Moves the implementation of resetting a ThreadContext to the corresponding core's implementation.

Other changes:
* Fixed comments in arm interfaces.
* Updated comments in thread.cpp
* Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp.
* Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation.
2015-02-09 21:47:12 +07:00
bunnei 848795f383 Merge pull request #551 from bunnei/mutex-fixes
Mutex/synch fixes
2015-02-09 22:17:20 +07:00
bunnei 1b0bf00cbc Mutex: Locks should be recursive. 2015-02-09 22:06:09 +07:00
bunnei caa58acc84 WaitSynch: Always reschedule (verified behavior on hw). 2015-02-09 22:05:39 +07:00
Darius Goad 536958fb29 Add more blend equations from 3dbrew 2015-02-09 20:41:06 +07:00
Lioncash 53fa04f326 vfpdouble: Fix the FTOUI NaN sign setting
This was fixed for vfpsingle, but not vfpdouble
2015-02-09 17:18:29 +07:00
Lioncash a734e9fdca Throw more unused/unnecessary VFP code out 2015-02-09 11:54:39 +07:00
Lioncash ca7babe062 vfp_helper: Convert some flags to enums. Throw out more duplicated FPSCR stuff 2015-02-09 09:53:17 +07:00
Lioncash d832c48864 vfp_helper: Normalize tabs to spaces 2015-02-09 09:32:56 +07:00
purpasmart96 60ce36f721 Services: Stub some functions 2015-02-07 17:34:59 +07:00
chinhodado 34cce345a7 Fix a wrong file name in a comment 2015-02-07 00:37:06 +07:00
Lioncash 1ecd75ea1a vfp_helper: Remove unnecessary extern C blocks 2015-02-06 14:52:29 +07:00
Lioncash 3e576219c4 vfp: Move FPSID, FPEXC, and FPSCR values over to enums.
Also got rid of duplicate definitions of some of these values.
2015-02-06 14:52:05 +07:00
Tony Wasserka 1576a318f2 Merge pull request #535 from bunnei/color-modifiers
Implement color/alpha modifiers
2015-02-05 16:07:37 +07:00
bunnei 1eb591d6fd Rasterizer: Implement the other color and alpha modifiers. 2015-02-04 22:15:51 +07:00
bunnei 8c93a28fed VideoCore: Added same-component swizzlers to math utility functions. 2015-02-04 22:15:44 +07:00
bunnei 7f900ac68e Merge pull request #537 from lioncash/vfp
vfp: Fix VCVT
2015-02-04 14:58:36 +07:00
bunnei 4d36a6a255 Merge pull request #536 from lioncash/dead
vfp: Throw out unused code
2015-02-04 14:57:00 +07:00
Lioncash 82e8f25fe7 vfp: Fix VCVT
These variants exclusively read from the single precision regs and write to double-precision registers
Fixes issues where converted values would be way off from what they should be due to the results being stored in the wrong registers.
2015-02-04 14:06:10 +07:00
Lioncash 7ecedfb970 vfp: Throw out unused code 2015-02-04 13:11:03 +07:00
Tony Wasserka a45175ee0d Merge pull request #534 from neobrain/disassembler-improvements
Disassembler improvements
2015-02-03 22:12:17 +07:00
Tony Wasserka 5a90420c0b citra-qt: Fix horrible scrolling responsiveness in disassembler by giving the uniformRowHeight hint. 2015-02-03 21:11:50 +07:00
Tony Wasserka 79713d500b citra-qt: Fix a crash when double-clicking a disassembler list item. 2015-02-03 21:11:49 +07:00
Lioncash 3a5a39c6aa dyncom: Remove more unnecessary code 2015-02-03 14:05:53 +07:00
Lioncash 676daef3c7 core: Fix some warnings on OSX 2015-02-03 08:14:42 +07:00
Yuri Kunde Schlesner 88a4a808c6 Kernel: Stop creating useless Handles during object creation
They're finally unnecessary, and will stop cluttering the application's
handle table.
2015-02-02 15:37:09 +07:00
Yuri Kunde Schlesner 52f58e64ef Kernel: Make WaitObjects share ownership of Threads waiting on them
During normal operation, a thread waiting on an WaitObject and the
object hold mutual references to each other for the duration of the
wait.

If a process is forcefully terminated (The CTR kernel has a SVC to do
this, TerminateProcess, though no equivalent exists for threads.) its
threads would also be stopped and destroyed, leaving dangling pointers
in the WaitObjects.

The solution is to simply have the Thread remove itself from WaitObjects
when it is stopped. The vector of Threads in WaitObject has also been
changed to hold SharedPtrs, just in case. (Better to have a reference
cycle than a crash.)
2015-02-02 15:37:08 +07:00
Yuri Kunde Schlesner 7725256f64 Explicitly instantiate constructors/destructors for Kernel objects
This should speed up compile times a bit, as well as enable more liberal
use of forward declarations. (Due to SharedPtr not trying to emit the
destructor anymore.)
2015-02-02 15:37:07 +07:00
Yuri Kunde Schlesner 4e84df8be3 Mutex: Replace g_mutex_held_locks with a set inside Thread 2015-02-02 15:37:06 +07:00
Yuri Kunde Schlesner 0f69668fc6 HID: Fix crash when pressing a key when the emulator is stopped 2015-02-02 15:37:05 +07:00
Yuri Kunde Schlesner c4208c1171 SVC: Enable CloseHandle, clean up DuplicateHandle 2015-02-02 15:37:04 +07:00
Yuri Kunde Schlesner e8330dd162 Kernel: Fix bug in HandleTable::Close 2015-02-02 15:37:04 +07:00
Yuri Kunde Schlesner 5354a479bc Kernel: Remove Object::GetHandle (it's not used anymore :D) 2015-02-02 15:37:04 +07:00
Yuri Kunde Schlesner 869ec46683 Kernel: Introduce unique Object ids for debugging 2015-02-02 15:37:03 +07:00
Yuri Kunde Schlesner a9b86db3cf Kernel: Use separate Handle tables for CoreTiming userdata
This is to support the removal of GetHandle soon
2015-02-02 15:37:03 +07:00
Yuri Kunde Schlesner ec9c773251 Kernel: Remove previous scheduled event when a Timer is re-Set 2015-02-02 15:37:02 +07:00
Yuri Kunde Schlesner 8441591659 FS: Remove use of GetHandle 2015-02-02 15:37:01 +07:00
Yuri Kunde Schlesner 664c79ff47 Thread: Modernize two functions that slipped through previous rebases 2015-02-02 15:37:01 +07:00
Yuri Kunde Schlesner 6e11570862 Service: Store function names as const char* instead of std::string
Uses less memory (strings and function table is stored in constant data)
and speeds up start up (no need to allocate and copy strings).
2015-02-02 15:37:00 +07:00
Yuri Kunde Schlesner a79d21c83e Service: Clean-up Interface 2015-02-02 15:36:59 +07:00
Yuri Kunde Schlesner 8779b31fe6 Make Port/Service registration and querying more HW-accurate 2015-02-02 15:36:59 +07:00
Yuri Kunde Schlesner 5e91fc0d1a Filesys: Move creation of Handles for File/Directory to service handlers 2015-02-02 15:36:58 +07:00
Tony Wasserka e1f9f9ea04 Merge pull request #517 from bunnei/blend-factors
Pica: Implement blend factors.
2015-02-01 12:00:10 +07:00
bunnei c915d0b727 Merge pull request #514 from rohit-n/fix-warnings
Silence a few warnings.
2015-02-01 00:31:06 +07:00
bunnei c8628f5d56 Merge pull request #525 from lioncash/armwarn
vfp: Get rid of some compile warnings
2015-02-01 00:28:50 +07:00
Lioncash 8c944bd1f0 vfp: Get rid of some compile warnings 2015-01-31 22:14:00 +07:00
Lioncash 3f00dd9117 arm: Clean up ARMul_State
Remove unnecessary/unused struct variables.
2015-01-31 21:55:34 +07:00
Lioncash f44781fd7b arm: Adios armemu 2015-01-31 20:43:03 +07:00
Tony Wasserka 73a7a379d6 Merge pull request #512 from lioncash/assignment
shared_memory: Fix assignments in SharedMemory::Map
2015-01-31 12:59:00 +07:00
bunnei 72cc512b1e Pica: Implement blend factors. 2015-01-31 01:40:05 +07:00
Lioncash b6cfc48a0b dyncom: clean up arm_dyncom_dec.h 2015-01-30 16:28:52 +07:00
Lioncash fc1a9e35fb arm: Move headers over to pragma once 2015-01-30 16:17:02 +07:00
Lioncash 83bc1a3120 arm: Get rid of armcpu.h and skyeye_types.h 2015-01-30 16:16:58 +07:00
Lioncash 904194c3e8 arm: Clean out armos.h and armmmu.h 2015-01-30 15:48:57 +07:00
bunnei 88a62b671b Merge pull request #513 from lioncash/cleanup
arm: Cleanup.
2015-01-30 15:30:30 +07:00
Rohit Nirmal 5ebf35db96 Silence a few warnings. 2015-01-30 19:20:34 +07:00
Lioncash 09a66860e2 arm: Throw out a lot of unnecessary code 2015-01-30 13:32:03 +07:00
Lioncash 3dfef1701c armdefs: Move some defines over to enums 2015-01-30 12:43:58 +07:00
Lioncash 96c174aed4 shared_memory: Fix assignments in SharedMemory::Map 2015-01-30 11:37:53 +07:00
Lioncash 0c4685ca12 loader: Add missing printf argument 2015-01-30 11:34:05 +07:00
Lioncash 551264f815 archive: Fix initializer list order for the File class. 2015-01-30 11:30:22 +07:00
Lioncash 0c53cc52bd apt_u: Fix missing printf specifiers 2015-01-30 11:28:09 +07:00
Yuri Kunde Schlesner d917a9bf77 Kernel: Mark all appropriate kernel objects as "final" 2015-01-30 11:49:46 +07:00
Yuri Kunde Schlesner 58b544db99 SVC: Use CASCADE_RESULT in SVC handlers 2015-01-30 11:49:46 +07:00
Yuri Kunde Schlesner 09ae6e1fa3 Remove result.h InvalidHandle
It was only being used in two places, where it was replaced by a local
constant.
2015-01-30 11:49:45 +07:00
Yuri Kunde Schlesner 44f90340dc SVC: Change return type of handlers to ResultCode 2015-01-30 11:49:44 +07:00
Yuri Kunde Schlesner d52d859936 Kernel: Convert Event to not use Handles 2015-01-30 11:49:43 +07:00
Yuri Kunde Schlesner ad80ff1e32 Kernel: Convert Timer to (mostly) not use Handles 2015-01-30 11:47:07 +07:00
Yuri Kunde Schlesner 882b6fed75 Kernel: Convert Mutex to not use Handles 2015-01-30 11:47:06 +07:00
Yuri Kunde Schlesner 38e7122f23 Kernel: Convert AddressArbiter to not use Handles 2015-01-30 11:47:06 +07:00
Yuri Kunde Schlesner d9b19be1d9 Kernel: Convert Semaphore to not use Handles 2015-01-30 11:47:05 +07:00
Yuri Kunde Schlesner 4bb33dfc30 Kernel: Convert SharedMemory to not use Handles 2015-01-30 11:47:04 +07:00
Yuri Kunde Schlesner fc11aff955 Common: Fix SCOPE_EXIT to actually create unique identifiers. 2015-01-30 11:47:03 +07:00
Yuri Kunde Schlesner afc416c607 Additions to ResultVal to make it more convenient to use. 2015-01-30 11:47:02 +07:00
Yuri Kunde Schlesner b5ee4f9df9 Move VAddr/PAddr typedefs to kernel.h 2015-01-30 11:47:01 +07:00
Yuri Kunde Schlesner 9a345de2bd Kernel: Remove useless/duplicated comments; mark functions static 2015-01-30 11:47:01 +07:00
bunnei 206cabc0e4 Merge pull request #412 from purpasmart96/svc_table_cleanup
SVC: Update the SVC function table
2015-01-28 17:36:23 +07:00
bunnei b522cf4e6a Pica: Implement color/alpha channel enable. 2015-01-27 22:03:34 +07:00
bunnei b2c55bf772 Rasterizer: Implemented alpha testing. 2015-01-27 14:39:17 +07:00
Lioncash 7a3e371141 dyncom: Minor cleanup
Narrow scopes for the instruction variables. Remove unnecessary parentheses.
2015-01-27 08:51:18 +07:00
purpasmart96 62f4365db1 SVC: Update the SVC function table 2015-01-26 20:42:28 +07:00
bunnei 326c451758 Merge pull request #345 from purpasmart96/apt_stubs
APT_U: Stub some functions & misc changes
2015-01-26 23:13:54 +07:00
bunnei 547737f720 Update vfp.cpp
VFP: Changed a debug log to trace.
2015-01-26 21:38:53 +07:00
bunnei ff83d23ed5 GPU: Implement the remaining depth testing functions. 2015-01-25 23:34:14 +07:00
bunnei e7dd4d34aa Merge pull request #485 from Subv/more_servs
Services: Stubbed more services.
2015-01-25 22:13:13 +07:00
Subv 2ea60bdc7f Services/HID: Removed some files due to a rebase error 2015-01-24 15:54:24 +07:00
Subv c2e9990149 Services: Stubbed more services.
Implemented FSUser::CreateExtSaveData
2015-01-24 15:44:40 +07:00
bunnei cc34462b71 Merge pull request #410 from chinhodado/cleanup
Cleanup: Logging in Core
2015-01-24 00:41:10 +07:00
Lioncash e09fb7becc vfp: Clean up vertical alignment for instructions 2015-01-23 13:35:08 +07:00
purpasmart96 2dd23b6467 APT_U: Stub some functions & misc changes 2015-01-22 16:03:48 +07:00
archshift 92a75df9b1 cam_u.h: fix indentation
Withholding my profanity towards Xcode.
2015-01-22 12:51:53 +07:00
bunnei 92550013cf Merge pull request #493 from archshift/ptmplay
Stubbed some services
2015-01-22 13:25:19 +07:00
Lioncash 8810dfe1de dyncom: Minor cleanup
Removes some unused macros and cleans up indentation inconsistencies
2015-01-22 09:39:41 +07:00
bunnei 731154f79e WaitSynchronization: Added a result code for invalid result, fixed bug. 2015-01-21 20:49:43 +07:00
bunnei 68ddaaa2f5 Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup. 2015-01-21 20:48:46 +07:00
bunnei 4255f25647 Thread: Use std::find in CheckWait_WaitObject. 2015-01-21 20:48:46 +07:00
bunnei 2f3020a102 Mutex: Cleanup and remove redundant code. 2015-01-21 20:48:36 +07:00
bunnei f09806aed2 Kernel: Renamed some functions for clarity.
- ReleaseNextThread->WakeupNextThread
- ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
2015-01-21 20:48:30 +07:00
bunnei 15b6a4d9ad Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void. 2015-01-21 20:47:49 +07:00
bunnei c68eb15695 WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual. 2015-01-21 20:47:49 +07:00
bunnei 69c5830ef2 Event: Fix implementation of "non-sticky" events. 2015-01-21 20:47:48 +07:00
bunnei 9e6ec3b6cd Session: Change to a WaitObject. 2015-01-21 20:47:47 +07:00
bunnei d2759c578e Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs. 2015-01-21 20:47:47 +07:00
bunnei dde02f79af Mutex: Fix a bug where the thread should not wait if it already has the mutex. 2015-01-21 20:47:46 +07:00
bunnei 9412996c8f Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely. 2015-01-21 20:47:46 +07:00
bunnei c06d64528a SVC: Removed a Sleep that made no sense
- Would deadlock the calling thread
- Code would never get hit anyways
2015-01-21 20:47:45 +07:00
bunnei 254e4ebd58 AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense. 2015-01-21 20:47:45 +07:00
bunnei e5a9f1c644 Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks. 2015-01-21 20:47:38 +07:00
bunnei 6deb1a0119 WaitSynchronizationN: Improved comments 2015-01-21 19:12:51 +07:00
bunnei 6643673f28 WaitSynchronizationN: Refactor to fix several bugs
- Separate wait checking from waiting the current thread
- Resume thread when wait_all=true only if all objects are available at once
- Set output to correct wait object index when there are duplicate handles
2015-01-21 19:11:47 +07:00