Commit Graph

45 Commits

Author SHA1 Message Date
chss95cs@gmail.com 27c4cef1b5 Added logger flags, for selectively disabling categories of logging (cpu, apu, kernel). Need to make more log messages make use of these flags.
The "close window" keyboard hotkey (Guide-B) now toggles between loglevel -1 and the loglevel set in your config.
Added LoggerBatch class, which accumulates strings into the threads scratch buffer. This is only intended to be used for very high frequency debug logging. if it exhausts the thread buffer, it just silently stops.
Cleaned nearly 8 years of dust off of the pm4 packet disassembler code, now supports all packets that the command processor supports.
Added extremely verbose logging for gpu register writes. This is not compiled in outside of debug builds, requires LogLevel::Debug and log_guest_driven_gpu_register_written_values = true.
Added full logging of all PM4 packets in the cp. This is not compiled in outside of debug builds, requires LogLevel::Debug and disassemble_pm4.
Piggybacked an implementation of guest callstack backtraces using the stackpoints from enable_host_guest_stack_synchronization. If enable_host_guest_stack_synchronization = false, no backtraces can be obtained.
Added log_ringbuffer_kickoff_initiator_bts. when a thread updates the cp's read pointer, it dumps the backtrace of that thread
Changed the names of the gpu registers CALLBACK_ADDRESS and CALLBACK_CONTEXT to the correct names.
Added a note about CP_PROG_COUNTER
Added CP_RB_WPTR to the gpu register table
Added notes about CP_RB_CNTL and CP_RB_RPTR_ADDR. Both aren't necessary for HLE
Changed name of UNKNOWN_0E00 gpu register to TC_CNTL_STATUS. Games only seem to write 1 to it (L2 invalidate)
2023-04-16 12:42:42 -04:00
chss95cs@gmail.com efbeae660c Drastically reduce cpu time wasted by XMADecoderThread spinning, went from 13% of all cpu time to about 0.6% in my tests
Commented out lock in WatchMemoryRange, lock is always held by caller
properly set the value/check the irql for spinlocks in xboxkrnl_threading
2022-10-15 03:07:07 -07:00
Gliniak 6c6c5ac14b Merge remote-tracking branch 'GliniakRepo/experimentals' into canary_experimental 2022-05-19 10:51:44 +02:00
Joel Linn 986dcf4f65 [Base] Check success of sync primitive creation
- Mainly use `assert`s, since failure is very rare
- Forward failure of `CreateSemaphore` to guests because it is more easy
  to trigger with invalid initial parameters.
2022-03-08 12:17:57 -06:00
Gliniak c483da91a4 Stop unnecessary spam of 0x601 opcode usage 2022-01-31 20:11:53 +01:00
gibbed 8daef93207 [APU] XMA register table cleanup, documentation.
- [APU] Clean up XMA register table.
- [APU] Document observed register ranges in the XMA register table.
2021-06-28 20:32:52 -05:00
illusion0001 b5fc1efad5 XMA: Set log level for unhandled register to warning 2021-05-01 12:47:36 -05:00
Joel Linn d4cf474665 Replace references to libav. 2021-05-01 12:41:02 -05:00
Sandy Carter 382dd8860f [threading] Change thread names to suit pthread
Shorten names to 16.
Rename Win32 to Windowing.
Shorten GraphicsSystem thread names due to 16 length limit of pthread.
Without this change, both show up as GraphicsSystem.
Remove redundant "Worker" and "Thread" from names.
Remove redundant thread handle from thread name.
2020-11-15 11:12:05 -06:00
gibbed 134067d25e [XMA] Add default case in av_log_callback. 2020-04-13 12:57:14 -05:00
gibbed ce955e5aaa [XMA] Reorganize ReadRegister/WriteRegister a bit in XmaDecoder. 2020-04-13 12:57:14 -05:00
gibbed a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed 5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l 7e6bf8022f [Memory] Refactor GetPhysicalAddress and use it for XMA, resolve #1448 2019-08-24 17:42:06 +03:00
Triang3l b25c50164f [APU] Physical address in XE_XMA_REG_CONTEXT_ARRAY_ADDRESS 2019-08-16 21:20:10 +03:00
Triang3l e35c609224 Revert "[APU] Temp XMA context allocation region workaround"
This reverts commit 968c337d22.
2019-08-16 21:11:55 +03:00
Triang3l 968c337d22 [APU] Temp XMA context allocation region workaround 2019-08-16 09:47:28 +03:00
gibbed 53b564c1a6 [APU] Only set the work event/wait on the worker thread when they actually exist. 2019-08-04 00:49:32 -05:00
gibbed b2f62b1982 Clean up cvars (rename, recategorize). 2019-08-03 23:46:03 -05:00
Jonathan Goyvaerts c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
gibbed bc0ebcb26e - Clean up log level names, no need for LOG_LEVEL_ prefix when it is an
enum class.
- Clarify usage of log level in comment.
2019-04-30 17:41:27 -05:00
gibbed d0d18ff570 [APU] Proper register file for XMA. 2019-04-20 10:57:42 -05:00
Dr. Chat 9a15896305 [XMA] Remove ReadRegister/WriteRegister debug output 2018-05-05 18:46:14 -05:00
DrChat e699be0118 Logging: Add a flag to specify the minimum log level
--log_level = (0=error, 1=warning, 2=info, 3=debug)
2017-03-24 16:28:41 -05:00
Dr. Chat a093fdcef8 XMA: Add an idle "low-power" state for the decoder. 2017-01-28 20:58:23 -06:00
Dr. Chat f81a99e83a XMA: Use a threadsafe bitmap to acquire/release contexts
Support Pausing/Resuming
2016-07-28 21:11:12 -05:00
Ben Vanik 0482ffad5a Allow XMA decoder to be suspended. 2015-12-30 16:53:13 -08:00
Ben Vanik 4af6c41740 Moving profiling.h to base - UI could be separated for cleanliness. 2015-11-07 12:31:07 -08:00
Ben Vanik e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00
Ben Vanik 790ce8aee1 Switch back to std:: muteces. mutices. mutexen. 2015-09-06 13:34:08 -07:00
Ben Vanik 1cf1568189 Adding a yield in the XMA decoder to give other threads some breathing room. 2015-08-29 22:12:31 -07:00
Ben Vanik e7b46afa9d Fixing build and removing old binary libav submodule. 2015-08-29 21:04:26 -07:00
Dr. Chat f80e5fc98d Linting 2015-08-29 22:21:25 -05:00
Dr. Chat afa013f4bf libav_verbose flag 2015-08-29 22:11:59 -05:00
Dr. Chat 6c83b35003 Partial frame support. 2015-08-29 21:42:06 -05:00
Dr. Chat d8ed66c336 More improvements to the XMA decoder (and included some forgotten files) 2015-08-29 21:18:04 -05:00
Ben Vanik b7203c2989 Logging to with a ringbuffer. Much faster. 2015-08-29 18:06:30 -07:00
Ben Vanik 19299fad4b Removing apu/ deps on Emulator. 2015-08-18 10:54:56 -07:00
Ben Vanik 5e08889d93 More style cleanup. 2015-08-06 20:17:01 -07:00
Ben Vanik ec326119cf Replacing beaengine in mmio handler with custom decoder.
Fixes #358.
2015-08-04 08:25:42 -07:00
Ben Vanik ecd4af10c9 Fixing some clang warnings/errors. 2015-07-15 23:26:58 -07:00
Ben Vanik fb1f4906d9 xb format --all (we are now format clean). Buildbot will yell at you. 2015-06-22 22:26:51 -07:00
gibbed 2c319db116 More shuffling of XMA decoder code. 2015-06-21 06:31:24 -05:00
gibbed 06a3bfc3be More XmaDecoder cleanup. 2015-06-21 03:24:42 -05:00
gibbed 021b5a3d17 Moved the XMA decoder out of AudioSystem and into its own world (plus minor code cleanup in the process). 2015-06-21 02:25:24 -05:00