Commit graph

2275 commits

Author SHA1 Message Date
LDj3SNuD
3439318d38 Fix MacroJit SubtractWithBorrow Alu Reg Operation. (#1473) 2024-02-22 19:15:10 -05:00
LDj3SNuD
7356a92b38 Fix Vcvt_FI & Vcvt_RM; Add Vfma_S & Vfms_S. Add Tests. (#1471)
* Fix Vcvt_FI & Vcvt_RM; Add Vfma_S & Vfms_S. Add Tests.

* Address PR feedback & Nit.
2024-02-22 19:15:10 -05:00
Ac_K
0537898be4 bluetooth: Fix event handle in IBluetoothDriver (#1464)
This fix the InitializeBluetoothLe call who didn't return any event handle
2024-02-22 19:15:10 -05:00
Xpl0itR
1bc64696bd Replace the Audio Backend ComboBoxText to a ComboBox with a custom model (#1451)
* Use a combobox with a custom model to be able to disable entries within it

* Address Ack's comments
2024-02-22 19:15:10 -05:00
mageven
d86fa17c3e Fix PTC version increment from #1433 (#1462) 2024-02-22 19:15:10 -05:00
LDj3SNuD
39e3fff707 CPU: This PR fixes Fpscr, among other things. (#1433)
* CPU: This PR fixes Fpscr, among other things.

* Add Fpscr.Qc = 1 if sat. for Vqrshrn & Vqrshrun.

* Fix Vcmp & Vcmpe opcode table.

* Revert "Fix Vcmp & Vcmpe opcode table."

This reverts commit c117d9410d.

* Address PR feedbacks.
2024-02-22 19:15:10 -05:00
Alex Barney
d8bc278cdf Forward OpenSaveDataInfoReaderOnlyCacheStorage to OpenSaveDataInfoReaderWithFilter (#1449) 2024-02-22 19:15:10 -05:00
Ac_K
f6ee8688e1 Add Issue Templates (#1456)
* Add Issue Templates

This disable the creation of empty issues and adds some templates when one is opened.
A link to our discord is directly added to the issue templates list.

Thanks EmulationFanatic for the proof reading.

* fix copy paste

* Fix name
2024-02-22 19:15:10 -05:00
mageven
98f6f2f7ee Rename DebugLevel Performance to Slowdowns (#1450) 2024-02-22 19:15:09 -05:00
gdkchan
a5f0a351ee Silence several build warnings (#1428)
* Silence several build warnings

* Remove fixed buffers from NVDEC struct

* Remove unused field and usings

* Fix wrong name

* Silence more warning on H264 PictureInfo
2024-02-22 19:15:09 -05:00
Ficture Seven
dfba277fdf Improve branch operations (#1442)
* Add Compare instruction

* Add BranchIf instruction

* Use test when BranchIf & Compare against 0

* Propagate Compare into BranchIfTrue/False use

- Propagate Compare operations into their BranchIfTrue/False use and
  turn these into a BranchIf.

- Clean up Comparison enum.

* Replace BranchIfTrue/False with BranchIf

* Use BranchIf in EmitPtPointerLoad

- Using BranchIf early instead of BranchIfTrue/False improves LCQ and
  reduces the amount of work needed by the Optimizer.

  EmitPtPointerLoader was a/the big producer of BranchIfTrue/False.

- Fix asserts firing when assembling BitwiseAnd because of type
  mismatch in EmitStoreExclusive. This is harmless and should not
  cause any diffs.

* Increment PPTC interval version

* Improve IRDumper for BranchIf & Compare

* Use BranchIf in EmitNativeCall

* Clean up

* Do not emit test when immediately preceded by and
2024-02-22 19:15:09 -05:00
mageven
da8549af6c Improved Logger (#1292)
* Logger class changes only

Now compile-time checking is possible with the help of Nullable Value
types.

* Misc formatting

* Manual optimizations

PrintGuestLog
PrintGuestStackTrace
Surfaceflinger DequeueBuffer

* Reduce SendVibrationXX log level to Debug

* Add Notice log level

This level is always enabled and used to print system info, etc...
Also, rewrite LogColor to switch expression as colors are static

* Unify unhandled exception event handlers

* Print enabled LogLevels during init

* Re-add App Exit disposes in proper order

nit: switch case spacing

* Revert PrintGuestStackTrace to Info logs due to #1407

PrintGuestStackTrace is now called in some critical error handlers
so revert to old behavior as KThread isn't part of Guest.

* Batch replace Logger statements
2024-02-22 19:15:09 -05:00
gdkchan
1a770450cc Implement a Macro JIT (#1445)
* Implement a Macro JIT

* Nit: space
2024-02-22 19:15:09 -05:00
mageven
61693eb794 Implement Software Keyboard GTK frontend (#1434)
* Implement SwKbd GUI

* Relocate UI handler to Emu Context from Config

Also create a common interface for UI handlers in the context and specialize for Gtk

Add basic input length validation in InputDialog

* Add Transfer Memory support to AppletCreator

Read Initial Text for SwKbd using Transfer Memory

* Improve InputDialog widget

Improve length validation
Has extra label to show validition info
Handle potential errors and log them

* Misc improvements

* Improve string validation
* Improve error handling
* Remove tuple in struct
* Address formatting nits

* Add proper Cancel functionality

Also handle GUI errors in UI handler

* Address jD's comments

* Fix _uiHandler init

* Address AcK's comments
2024-02-22 19:15:08 -05:00
mageven
26a425d385 Facilitate OpenGL debug logging via GUI (#1373)
* Allow printing GL Debug logs with GUI options

Improve GL Debugger

Make the new option persistent

Address gdkchan's comments
- Rename enum to GraphicsDebugLevel
- Move Debugger Init to Renderer Init
- Fix formatting

* nit: newlines
2024-02-22 19:15:08 -05:00
Ac_K
ab58df4948 friend: Implement GetPlayHistoryRegistrationKey (#1424)
* friend: Implement GetPlayHistoryRegistrationKey

This implement IServiceCreator::GetPlayHistoryRegistrationKey call accordingly to RE.

Close #1110

* Fix comments

* Fix guid and comment some codes

* Improve guid casting and remove unused vars
2024-02-22 19:15:08 -05:00
Mary
7dafa63dfc fs: stub ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute (#1443)
This is required by AC:NH for the new online save features of 1.4.0
2024-02-22 19:15:08 -05:00
Ac_K
906db68b77 common: Fix WMI exception (#1422)
* common: Fix WMI exception

We currently don't check if WMI service is available when we get the CPU name and the RAM size.
This fix the issue by catching all exceptions and set default values instead.

Close #1353

* remove useless assign

* Fix Exception

* Address comments

Co-authored-by: Thog <me@thog.eu>
2024-02-22 19:15:08 -05:00
gdkchan
d22d94bfd2 Implement inline memory load/store exclusive and ordered (#1413)
* Implement inline memory load/store exclusive

* Fix missing REX prefix on 8-bits CMPXCHG

* Increment PTC version due to bugfix

* Remove redundant memory checks

* Address PR feedback

* Increment PPTC version
2024-02-22 19:15:08 -05:00
gdkchan
e9cdfbbeae Print guest stack trace on invalid memory access (#1407)
* Print guest stack trace on invalid memory access

* Improve XML docs
2024-02-22 19:15:08 -05:00
gdkchan
6a8cb4375d Refactor shader translator ShaderConfig and reduce the number of out args (#1438) 2024-02-22 19:15:08 -05:00
Ficture Seven
d221cf1123 Use movd,movq for i32/64 VectorExtract %x, 0x0 (#1439)
* Use movd,movq for i32/64 VectorExtract %x, 0x0

* Increment PPTC interval version

* Use else-if instead

- Address gdkchan's feedback.
- Clean up Debug.Assert calls

* Inline `count` expression into Debug.Assert

Apparently the CoreCLR JIT will not eliminate this. :(
2024-02-22 19:15:08 -05:00
gdkchan
f06fc1535e Fix shader regression on Intel iGPUs by reverting layout changes (#1425) 2024-02-22 19:15:08 -05:00
gdkchan
e00f7581d9 Implement alpha test using legacy functions (#1426) 2024-02-22 19:15:08 -05:00
gdkchan
06745ec6de Implement VIC BGRA output surface format (#1430) 2024-02-22 19:15:08 -05:00
Ac_K
f0f78c22c0 ns/nim: Stub eShop related calls (#1420)
* ns/nim: Stub eShop related calls

As we aren't able to process purchase on the eShop throught the emulator, I have:
- Stub IPurchaseEventManager::SetDefaultDeliveryTarget (with RE check).
- Implement IPurchaseEventManager::GetPurchasedEventReadableHandle (with RE check).

As we can't do any eShop async call throught the emulator, I have:
- Stub IShopServiceAccessServerInterface::CreateServerInterface
- Stub IShopServiceAccessServer::CreateAccessorInterface
- Stub IShopServiceAccessor::IShopServiceAsync

Close #1084 and #1322

* fix handle copy

* Fix align

* Fix readonly event
2024-02-22 19:15:08 -05:00
Ac_K
ad36693b41 audin: Implement IAudioInManager ListAudioIns (#1419)
* audin: Implement IAudioInManager ListAudioIns

This implement some calls of IAudioInManager:
- ListAudioIns
- ListAudioInsAuto
- ListAudioInsAutoFiltered

Accordingly to RE.

Close #1056

* Fix count

* Comment condition

* Fix comment
2024-02-22 19:15:08 -05:00
gdkchan
4eb800eb20 Use polygon offset clamp if supported (#1429) 2024-02-22 19:15:08 -05:00
gdkchan
cadea06f17 Implement BGRA texture support (#1418)
* Implement BGRA texture support

* Missing AppendLine

* Remove empty lines

* Address PR feedback
2024-02-22 19:15:08 -05:00
gdkchan
f651ac8312 PPTC version increment (#1427) 2024-02-22 19:15:07 -05:00
gdkchan
c1fc0439ae Remove GPU MemoryAccessor (#1423)
* Remove GPU MemoryAccessor

* Update outdated XML doc

* Update more outdated stuff
2024-02-22 19:15:07 -05:00
gdkchan
398a1220f5 Refactor NativeContext (#1410)
* Refactor NativeContext

* Fix bugs

* Use correct counts

* Check index using register count constants
2024-02-22 19:15:07 -05:00
Alex Barney
871dcd6a85 Update to LibHac 0.11.3 (#1414)
Removes the timeout when deleting files from the local file system
2024-02-22 19:15:07 -05:00
gdkchan
81fc111e83 New GPFifo and fast guest constant buffer updates (#1400)
* Add new structures from official docs, start migrating GPFifo

* Finish migration to new GPFifo processor

* Implement fast constant buffer data upload

* Migrate to new GPFifo class

* XML docs
2024-02-22 19:15:07 -05:00
emmauss
3cb3a8bdb8 fix fullscreen toggling (#1364) 2024-02-22 19:15:07 -05:00
Ac_K
d82dd30ff0 vi: Implement GetIndirectLayerImageRequiredMemoryInfo (#1415)
This implement GetIndirectLayerImageRequiredMemoryInfo call from vi service, accordingly to RE.

Thanks to Thog and gdkchan for helping me to understand some GPU things.

Close #942
2024-02-22 19:15:07 -05:00
Ac_K
7b9752d357 Add multiple calls to am service (#1411)
* Add multiple calls to am service

This implement/stub some am calls:

- SetAutoSleepDisabled
- IsAutoSleepDisabled
- SetAlbumImageTakenNotificationEnabled
- EnableApplicationCrashReport
- GetPreviousProgramIndex
- NeedsToExitProcess
- RequestForAppletToGetForeground
- GetIndirectLayerConsumerHandle

All checked by RE.
Additionnaly to that, there is some cleanup here and there.

Fix #1387, #1324, #1165, #1163, #1065

* Fix casting

* Thread safe assign
2024-02-22 19:15:07 -05:00
mageven
3ab1da509e Better TimeZone entry in System Settings (#1254)
* Better timezone labels in System TimeZone

Replace with GtkEntry with auto-complete

Also removed async task as now loading is fast

Address Thog's comments

self-nit: Remove string alias

Address AcK's comments

* Improve parsing
* Optimize and fix string matching

Address jD's comments

* Also, make abbreviations searchable
* Optimize EntryCompletion's MatchFunc

* nit: Result.IsFailure()

* Fix potential crash on opening Settings window w/o FW installed
2024-02-22 19:15:07 -05:00
Xpl0itR
8d19a074cd A couple fixes for the audio backend GUI option (#1360)
* Detect available audio backends in the gui on a separate thread and

hardcode dummy backend in the dropdown and select it by default

* Use a Task rather than a Thread

* Modify UI on UI thread
2024-02-22 19:15:07 -05:00
mageven
0648c34956 GL: Implement more Point parameters (#1399)
* Fix GL_INVALID_VALUE on glPointSize calls

* Implement more of Point primitive state

* Use existing Origin enum
2024-02-22 19:15:07 -05:00
gdkchan
3bb618d257 Fix IDeliveryCacheProgressService GetEvent (#1409) 2024-02-22 19:15:07 -05:00
Mary
060a83a576 ipc hle: Fix disposing of session created with MakeObject (#1404)
This fix a missing part of #1397, making HLE ipc session being disposed
when needed.

THis is needed for upcoming wip changes.
2024-02-22 19:15:07 -05:00
gdkchan
ca53b1134e Fix session service disposal and improve transfer memory implementation (#1397)
* Fix session service disposal and improve transfer memory implementation

* Remove useless assignment
2024-02-22 19:15:07 -05:00
Valentin PONS
4e4321166d Implements some 32-bit instructions (VBIC, VTST, VSRA) (#1192)
* Added some 32 bits instructions:

* VBIC
* VTST
* VSRA

* Incremented the PTC

* Add tests and fix implementation

* Fixed VBIC immediate opcode mapping

* Hey hey!

* Nit.

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: LDj3SNuD <dvitiello@gmail.com>
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2024-02-22 19:15:07 -05:00
gdkchan
968d5d5f8e Do not print guest stack trace for svcBreak debug calls (#1398) 2024-02-22 19:15:07 -05:00
LDj3SNuD
7ad4431c0c CPU: A32: Fix Vabs_V & Vneg_V (S8, S16, S32 & F32); add Tests. (#1394)
* Fix Vabs_V & Vneg_V (S8, S16, S32 & F32); add Tests.

* Update Ptc.cs
2024-02-22 19:15:07 -05:00
gdkchan
776f52f0f6 Improve kernel WaitSynchronization syscall implementation (#1362) 2024-02-22 19:15:06 -05:00
LDj3SNuD
6edce4c394 CPU: A32: Add Vadd & Vsub Wide (S/U_8/16/32) Inst.s with Test. (#1390) 2024-02-22 19:15:06 -05:00
gdkchan
ed4ca34a99 Improve kernel IPC related syscalls (#1379)
* Implement session count decrement when the handle is closed

* Remove unused field

* Implement SendSyncRequestWithUserBuffer, SendAsyncRequestWithUserBuffer and ReplyAndReceiveWithUserBuffer syscalls

* Nits

* Fix swapped copy dst/src

* Add missing pointer buffer descriptor write on reply

* Fix IPC unaligned buffer copy and restoring client attributes on reply

* Oops

* Fix SetIpcMappingPermission

* Fix unaligned copy bugs

* Free memory used for temporary IPC buffers
2024-02-22 19:15:06 -05:00
gdkchan
b0113f52e5 Fix resource limit reserve taking too long (#1391) 2024-02-22 19:15:06 -05:00