Commit graph

780 commits

Author SHA1 Message Date
Thomas Guillemard
9afb8ad485 ui: Fix segfault on Linux when passing a program via command line (#764) 2019-09-08 11:59:41 +10:00
Thomas Guillemard
7ff394e68a
gui: fix case issues in the code 2019-09-07 15:23:09 +02:00
Thomas Guillemard
b6c9e23a47
csproj: fix case issue on "ryujinxIcon.png"
This fix a build issue when the file system is case sensitive.
2019-09-07 15:18:06 +02:00
Ac_K
333651d346 Implement Bluetooth, Btm, Hid and Nsd services and calls. (#761)
- Implement `btdrv` service (IBluetoothDriver).
  Implement call `InitializeBluetoothLe` for initialize events of `bt` service according to RE.

- Implement `bt` service (IBluetoothUser).
  Implement call `RegisterBleEvent` according to RE.

- Add a placeholder for the `btm` service (close #750).

- Implement `btm:u` service (IBtmUser) (close #751).
  Implement call `GetCore` according to RE (close #752).

- Implement `IBtmUserCore` and calls `AcquireBleScanEvent`, `AcquireBleConnectionEvent`, `AcquireBleServiceDiscoveryEvent` and `AcquireBleMtuConfigEvent` according to RE.

- Implement `SetPalmaBoostMode` in `IHidServer` according to RE.

- Add stub for `SetIsPalmaAllConnectable` in `IHidServer` because we will not support Palma devices soon.

- Implement `nsd:a` and `nsd:u` service (IManager) (close #755).
  Implement call `ResolveEx` according to RE (close #756).
  Implement calls `GetSettingName`, `GetEnvironmentIdentifier`, `GetDeviceId`, `DeleteSettings`, `Resolve`, `ReadSaveDataFromFsForTest`, `WriteSaveDataToFsForTest` and `DeleteSaveDataOfFsForTest` according to RE.
2019-09-06 16:58:50 +02:00
Ac_K
ad40c6a182 Update README.md (#759)
* Update README.md

* Fix grammar
2019-09-05 08:22:15 +10:00
Rodrigo Locatti
ebea4967f8 shader: Add missing fsetp negation bit on srcB (#760) 2019-09-05 08:03:11 +10:00
Thomas Guillemard
b9c94ada34 timezone: improve sanity checks on TimeZone Rule name (#758) 2019-09-04 18:10:15 +02:00
Ac_K
c67f0a7c4b IGeneralService Implement GetClientId and IsAnyInternetRequestAccepted (#749)
* IGeneralService Implement GetClientId and IsAnyInternetRequestAccepted

- Add nifm:a and nifm:u with a max sessions as comment since sm don't take care of sessions for now.
- Implement IGeneralService GetClientId based on RE (close #623).
- Implement IGeneralService IsAnyInternetRequestAccepted based on RE (close #624).
- Add some informations in IGeneralService CreateRequest.
- Fix a comment in IAccountService.

* Fix requested changes
2019-09-04 18:09:20 +02:00
Alex Barney
cbbbf175fb Implement OpenReadOnlySaveDataFileSystem (#748) 2019-09-02 18:38:43 +02:00
Xpl0itR
edafce57be Added GUI to Ryujinx (#695)
* Added GUI to Ryujinx

* Updated to use Glade

Also added scrollbar and default dark theme

* Added support for loading icon from .nro files and cleaned up the code a bit

* Added General Settings Menu (read-only for now) and moved some functionality from MainMenu.cs to ApplicationLibrary.cs

* Added custom GUI theme support and changed the defualt theme to one I just wrote

* Added GTK to process path, fixed a bug and minor edits

* some more edits and a bug fix

* general settings menu is now fully functional. also fixed the bug where ryujinx crashes when it trys to load an invalid gamedir

* big rewrite

* aesthetic changes to General Settings menu

* Added Control Settings

one day done feature :P

* minor changes

* 1st wave of changes

* 2nd wave of changes

* 3rd wave of changes

* Cleanup settings ui

* minor edits

* new about window added, still needs styling

* added spin button for new option and tooltips to settings

* Game icons and names are now shown in the games list

* add nuget package which contains gtk dependencies

* requested changes have been changed

* put CreateGameWindow on a new thread and stopped destroying the main menu when a game loads

* fixed bug that allowed a user to attempt to load multiple games at a time which causes a crash

* Added LastPlayed and TimePlayed columns to the game list

* Did some testing and fixed some bugs

Im not happy with one of the fixes so i will do it properly an upcoming commit

* did some more bug testing and fixed another 2 bugs

* caught an exception when ryujinx tries to load non-homebrew as homebrew

* Large changes

Rewrote ApplicationLibrary.cs (added comments too) so any devs reading it wont get eye cancer, also its probably more efficient now. Added 2 new columns (Developer name and application version) to the game list and wrote the logic for it. Ryujinx now loads NRO's TitleName and TitleID from the NACP file instead of the default NPDM. I also killed a lot of bugs

* Moved Files

moved ApplicationLibrary.cs to Ryujinx.HLE as that is a better place for it. Moved contents of GUI folder to Ui folder and changed the namespaces of the gui files from Ryujinx to Ryujinx.Ui

* Added 'Open Ryujinx Folder' button to the file menu and did some small fixes

* New features

* updated nuget package with missing dlls and changed emmauss' requested changes

* fixed some minor issues

* all requested changes marked as resolved have been changed

* gdkchan's requested changes

* fixed an issue with settings window getting chopped on small res

* fixed 2 problems caused by rebase

* changed the default theme

* applied Thog's patch to fix issue on linux

* fixed issue caused by rebase

* added update check button that runs ryujinx-updater

* reads version info from installer and displays it in about menu

* changes completed

* requested changes changed

* fixed issue with default theme

* fixed a bug and completed requested changes

* added more tooltips and changed some text
2019-09-02 13:03:57 -03:00
Ac_K
c00c638ecc NvHostChannelIoctl: Implement setter for SetSubmitTimeout, SetPriority and SetTimeslice (#747)
- Implement accurate setter for SetPriority.
- Implement accurate setter for SetTimeslice (close #666).
- Implement basic setter for SetSubmitTimeout (close #678).

(plus some comments and a missing `PrintStub` call)
2019-09-01 20:55:38 -03:00
HorrorTroll
a1c7415565 Add Rgba16Uint (#746) 2019-09-01 23:12:16 +02:00
Ac_K
6b8fb8a4e3 Implement am ICommonStateGetter::SetCpuBoostMode (#743)
- Implement am ICommonStateGetter::SetCpuBoostMode according to the RE:

```
signed __int64 __fastcall nn::ICommonStateGetter::SetCpuBoostModeImpl(__int64 this, unsigned int cpu_boost_mode)
{
  if ( cpu_boost_mode > 1 )
  {
    return 0x3F480LL;
  }

  __int64 v2 = *(_QWORD *)(this + 0x38);
  __int64 v3 = *(_QWORD *)(*(_QWORD *)(v2 + 8) + 0x298LL);

  nnLock((_DWORD *)(v3 + 0x104));

  __int64 v5 = *(_QWORD *)(v2 + 0x18);
  bool unk_bool = *(unsigned __int8 *)(v5 + 0x7C);

  *(_DWORD *)(v5 + 0x80) = cpu_boost_mode;

  if (!unk_bool)
  {
    *(_BYTE *)(v5 + 0x7C) = 1;
  }

  wait_condvar(v3 + 0xA8);
  nnUnlock((_DWORD *)(v3 + 0x104));

  return 0LL;
}
```

- Add enum for apm CpuBoostMode
- Add missing values in apm PerformanceConfiguration with some comments.
2019-08-28 13:02:50 +02:00
Thomas Guillemard
5c44c9600f
Fix a memory corruption in SoundIO wrapper (#742)
This fix audio slowdown on Unix based platforms where soundio will try
to switch to mono because of the invalid data written.
2019-08-19 22:28:14 +02:00
Thomas Guillemard
16aa2cfd62
Discord Presence: Fix a crash when no valid program is loaded (#741)
* Discord Presence: Fix a crash when no valid program is loaded
2019-08-19 22:28:01 +02:00
gdkchan
a731ab3a2a Add a new JIT compiler for CPU code (#693)
* Start of the ARMeilleure project

* Refactoring around the old IRAdapter, now renamed to PreAllocator

* Optimize the LowestBitSet method

* Add CLZ support and fix CLS implementation

* Add missing Equals and GetHashCode overrides on some structs, misc small tweaks

* Implement the ByteSwap IR instruction, and some refactoring on the assembler

* Implement the DivideUI IR instruction and fix 64-bits IDIV

* Correct constant operand type on CSINC

* Move division instructions implementation to InstEmitDiv

* Fix destination type for the ConditionalSelect IR instruction

* Implement UMULH and SMULH, with new IR instructions

* Fix some issues with shift instructions

* Fix constant types for BFM instructions

* Fix up new tests using the new V128 struct

* Update tests

* Move DIV tests to a separate file

* Add support for calls, and some instructions that depends on them

* Start adding support for SIMD & FP types, along with some of the related ARM instructions

* Fix some typos and the divide instruction with FP operands

* Fix wrong method call on Clz_V

* Implement ARM FP & SIMD move instructions, Saddlv_V, and misc. fixes

* Implement SIMD logical instructions and more misc. fixes

* Fix PSRAD x86 instruction encoding, TRN, UABD and UABDL implementations

* Implement float conversion instruction, merge in LDj3SNuD fixes, and some other misc. fixes

* Implement SIMD shift instruction and fix Dup_V

* Add SCVTF and UCVTF (vector, fixed-point) variants to the opcode table

* Fix check with tolerance on tester

* Implement FP & SIMD comparison instructions, and some fixes

* Update FCVT (Scalar) encoding on the table to support the Half-float variants

* Support passing V128 structs, some cleanup on the register allocator, merge LDj3SNuD fixes

* Use old memory access methods, made a start on SIMD memory insts support, some fixes

* Fix float constant passed to functions, save and restore non-volatile XMM registers, other fixes

* Fix arguments count with struct return values, other fixes

* More instructions

* Misc. fixes and integrate LDj3SNuD fixes

* Update tests

* Add a faster linear scan allocator, unwinding support on windows, and other changes

* Update Ryujinx.HLE

* Update Ryujinx.Graphics

* Fix V128 return pointer passing, RCX is clobbered

* Update Ryujinx.Tests

* Update ITimeZoneService

* Stop using GetFunctionPointer as that can't be called from native code, misc. fixes and tweaks

* Use generic GetFunctionPointerForDelegate method and other tweaks

* Some refactoring on the code generator, assert on invalid operations and use a separate enum for intrinsics

* Remove some unused code on the assembler

* Fix REX.W prefix regression on float conversion instructions, add some sort of profiler

* Add hardware capability detection

* Fix regression on Sha1h and revert Fcm** changes

* Add SSE2-only paths on vector extract and insert, some refactoring on the pre-allocator

* Fix silly mistake introduced on last commit on CpuId

* Generate inline stack probes when the stack allocation is too large

* Initial support for the System-V ABI

* Support multiple destination operands

* Fix SSE2 VectorInsert8 path, and other fixes

* Change placement of XMM callee save and restore code to match other compilers

* Rename Dest to Destination and Inst to Instruction

* Fix a regression related to calls and the V128 type

* Add an extra space on comments to match code style

* Some refactoring

* Fix vector insert FP32 SSE2 path

* Port over the ARM32 instructions

* Avoid memory protection races on JIT Cache

* Another fix on VectorInsert FP32 (thanks to LDj3SNuD

* Float operands don't need to use the same register when VEX is supported

* Add a new register allocator, higher quality code for hot code (tier up), and other tweaks

* Some nits, small improvements on the pre allocator

* CpuThreadState is gone

* Allow changing CPU emulators with a config entry

* Add runtime identifiers on the ARMeilleure project

* Allow switching between CPUs through a config entry (pt. 2)

* Change win10-x64 to win-x64 on projects

* Update the Ryujinx project to use ARMeilleure

* Ensure that the selected register is valid on the hybrid allocator

* Allow exiting on returns to 0 (should fix test regression)

* Remove register assignments for most used variables on the hybrid allocator

* Do not use fixed registers as spill temp

* Add missing namespace and remove unneeded using

* Address PR feedback

* Fix types, etc

* Enable AssumeStrictAbiCompliance by default

* Ensure that Spill and Fill don't load or store any more than necessary
2019-08-08 21:56:22 +03:00
emmauss
1ba58e9942 Use the Joystick interface for game controller input. (#737)
* switch gamepad input to joystick

* fix style nits

* modify config.md to reflect new changes
2019-08-05 20:58:27 +02:00
Thomas Guillemard
54b79dffa8 Implement time:* 4.0.0 commands (#736)
* Abstract SteadyClockCore to follow Nintendo changes in 4.x

This is the ground work for 4.0.0 support

* Implement TickBasedSteadyClockCore

Preparation for the ephemeral clock.

* Refactor SystemClockCore to follow 4.0.0 changes

* Implement EphemeralNetworkSystemClock

* Implement GetSnapshotClock & GetSnapshotClockFromSystemClockContext

* Implement CalculateStandardUserSystemClockDifferenceByUser & CalculateSpanBetween

* Remove an outdated comment & unused import

* Fix a nit and GetClockSnapshot

* Address comment
2019-07-25 11:44:51 -03:00
emmauss
d254548548
Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
2019-07-22 20:15:46 +03:00
Thomas Guillemard
1f3a34dd7a Implement time:* 2.0.0 & 3.0.0 commands (#735)
* Finish ISteadyClock implementation

* Implement IsStandardNetworkSystemClockAccuracySufficient

Also use signed values for offsets and TimeSpanType

* Address comments

* Fix one missing nit and improve one comment
2019-07-15 19:52:35 +02:00
Ac_K
d8424a63c6 Update IpcService.cs (#734)
Remove `BindingFlags.NonPublic` Flag
2019-07-14 23:30:47 +02:00
Ac_K
d5cc919369 Fix private on some call (#733)
Since the reflection code didn't take care about `private`, this cause regression, so I have added the flag just in case and fix calls who are declared with `private` to `public`.
2019-07-14 23:22:53 +02:00
Thomas Guillemard
97d0c62423 Accurately implement steady & system clocks (#732)
* Improve SteadyClock implementation accuracy

* Rewrite system clocks to be accurate

* Implement IStaticService 100 & 101

* Add time:* permissions

* Address comments

* Realign TimePermissions definitions

* Address gdk's comments

* Fix after rebase
2019-07-14 22:50:11 +02:00
Ac_K
4ad3936afd Refactoring result codes (#731)
* refactoring result codes

- Add a main enum who can handle some orphalin result codes and the default `ResultCode.Success` one.
- Add sub-enum by services when it's needed.
- Remove some empty line.
- Recast all service calls to ResultCode.
- Remove some unneeded static declaration.
- Delete unused `NvHelper` class.

* NvResult is back

* Fix
2019-07-14 16:04:38 -03:00
Thomas Guillemard
4926f6523d Fix bsd recvfrom implementation (#730) 2019-07-14 01:47:18 +02:00
Ac_K
560ccbeb2d Refactoring commands handling (#728)
* Refactoring commands handling

- Use Reflection to handle commands ID.
- Add all symbols (from SwIPC so not all time accurate).
- Re-sort some services commands methods.
- Some cleanup.
- Keep some empty constructor for consistency.

* Fix order in IProfile
2019-07-11 22:13:43 -03:00
Alex Barney
f723f6f39a Update to LibHac 0.5.0 (#725)
* Update to libhac 0.5

* Catch HorizonResultException in IFileSystemProxy

* Changes based on feedback
2019-07-10 19:20:01 +02:00
Ac_K
596b61ce1f IPC services refactoring (#726)
* IPC services refactoring

- Use custom Attributes to handle services.
- Add a way to set the permissions and fix the bsd service to use it.
- Little cleanup.
- C#7.1 is required.

* fix var name

* fix syntax

* Change Permission to Parameter

* Delete BsdServicePermissionLevel.cs

* Fix Linq
2019-07-10 12:59:54 -03:00
LDj3SNuD
e5b88de22a Add Saddlv_V Inst. Improve Cnt_V, Dup_Gp & Ins_Gp Tests. Tuneup Cls_V & Clz_V Tests. (#720)
* Update PackageReferences.

* Improve Cnt_V Test. Tuneup Cls_V & Clz_V Tests.

Nit.

* Nit.

* Improve Dup_Gp & Ins_Gp Tests.

* Update for Saddlv_V Inst.

* Update for Saddlv_V Inst.

* Update for Saddlv_V Inst.
2019-07-08 11:55:37 -03:00
Thomas Guillemard
708620252e ITimeZoneService rewrite (#722)
* Clean up ITimeZoneService

Add error codes and simplify parsing

* Add accurate timezone logic

TOOD: LoadTimeZoneRule and location name cmds.

* Integrate the new TimeZone logic

* SCREAMING_UNIX_CASE => PascalCase

* Address comments

* Reduce use of pointer in the LoadTimeZoneRule logic

* Address comments

* Realign tzIfStream logic in LoadTimeZoneRule

* Address gdk's comments
2019-07-04 17:20:40 +02:00
Thomas Guillemard
789cdba8b5 Refactor the friend namespace (#721)
* Refactor the friend namespace and UInt128

This commit also:
- Fix GetFriendsList arguments ordering.
- Add GetFriendListIds.
- Expose the permission level of the port instance.
- InvalidUUID => InvalidArgument

* friend: add all cmds as commments

* add Friend structure layout

* Rename FriendErr to FriendError

* Accurately implement INotificationService

* Fix singleton lock of NotificationEventHandler

* Address comments

* Add comments for IDaemonSuspendSessionService cmds

* Explicitly define the Charset when needed

Also make "Nickname" a string

* Address gdk's comments
2019-07-04 17:14:17 +02:00
Alex Barney
b2b736abc2 Misc cleanup (#708)
* Fix typos

* Remove unneeded using statements

* Enforce var style more

* Remove redundant qualifiers

* Fix some indentation

* Disable naming warnings on files with external enum names

* Fix build

* Mass find & replace for comments with no spacing

* Standardize todo capitalization and for/if spacing
2019-07-02 04:39:22 +02:00
LDj3SNuD
10c74182ba Implement the remaining tests for Simd and Fp instructions of data processing type. Small opts. for Fmov_Ftoi/1 & Fmov_Itof/1 Insts. (#709)
* Update CpuTestSimdShImm.cs

* Update OpCodeTable.cs

* Update CpuTestSimdReg.cs

* Add Ins_Gp & Ins_V Tests.

Improve Smov_S & Umov_S Tests.

* Add Bic_Vi & Orr_Vi Tests.

* OpTable Fixes for Bic_Vi & Orr_Vi Insts.

* Add Saddlv_V & Uaddlv_V Tests.

* Nit.

* Add Smull_V & Umull_V Tests.

Improve Simd Permute Tests.

* Nit.

* Add Fcsel_S Test.

* Add Fnmadd_S, Fnmsub_S & Fnmul_S Tests.

* Fmov_V -> Fmov_Vi

* OpTable Fixes for Fmov_Si & Fmov_Vi Insts.

* Add Fmov_Vi Test.

* Add Fmov_S Test.

* Add Fmov_Si Test.

Add new test category SimdFmov.

* Nit.

* OpTable Fixes for Fmov_Ftoi/1 & Fmov_Itof/1 Insts.

* Small opts. for Fmov_Ftoi/1 & Fmov_Itof/1 Insts.

Small simpl. for Smov_S Inst.
Remove unnecessary method EmitIntZeroUpperIfNeeded.

* Add Fmov_Ftoi/1 & Fmov_Itof/1 Tests.
2019-06-29 20:02:48 -03:00
Ac_K
ba86a5d7f3 nfp:user: Implement IUser (#714)
* nfp:user: Implement IUser

- Based on RE of sysmod FW 1.0 and 3.0 with help of https://github.com/switchbrew/libnx/ and https://reswitched.github.io/SwIPC/ifaces.html#nn::nfp::detail::IUser
- Accurate implementation of Initialize, AttachActivateEvent, AttachDeactivateEvent, GetState, GetDeviceState, GetNpadId and GetDeviceState.
- Implementation of Finalize and ListDevices (close #638).

* reorder private var

* fix nits
2019-06-28 21:08:23 +10:00
Ac_K
a8965aad97 irs: Little service cleanup (#712)
* irs: Little service cleanup

* more cleanup

* Fix nit

* Fix condition
2019-06-27 18:02:41 +02:00
Ac_K
36f62cbe72 friends: INotificationService Implementation of GetEvent (#710)
* friends: INotificationService Implementation of GetEvent

According to the RE, the event isn't signaled when handle is returned.
```C
long nn::friends::detail::service::NotificationService::GetEvent(long this, uint *output_handle)
{
  long inner_struct_event;
  int result;

  if (this->event_created)
  {
    inner_struct_event = &this->event_object;
  }
  else
  {
    inner_struct_event = &this->event_object;
    result = CreateEvent(&this->event_object, 0, 1);

    if ( result )
    {
      Assert();
    }

    this->event_created = true;
  }

  uint event_handle = nn::os::detail::DetachReadableHandleOfInterProcessEvent(inner_struct_event);

  *output_handle = event_handle;
  int unknown = *((char *)output_handle + 4);
  *((char *)output_handle + 4) = 1;

  if (unknown)
  {
    CloseHandle(*output_handle);
  }

  return 0LL;
}
```
Co-Authored-By: Thomas Guillemard <me@thog.eu>
2019-06-27 14:05:30 +02:00
Thomas Guillemard
db21621bb6 PrntStub: Add a way to print arrays (#711)
* PrntStub: Add a way to print arrays

This commit adds support for printing arrays in stubs (useful for IPC InBuffer/InPointer).
This also add an util to parse an array of structure from a BinaryReader

* Fix missing space

Co-Authored-By: Ac_K <Acoustik666@gmail.com>
2019-06-27 13:11:51 +02:00
Ac_K
3db9daa3bd time: Implement GetSharedMemoryNativeHandle (#705)
- Implement Time SharedMemory
- Implement GetSharedMemoryNativeHandle
- Cleanup IStaticService
2019-06-17 01:56:46 +02:00
Ac_K
70bfc01e5f friends: Implementation of IServiceCreator (#704)
- Add INotificationService (close #621)
- Add IDaemonSuspendSessionService
2019-06-17 01:08:32 +02:00
Thomas Guillemard
2cd5d2d184 set: Improve implementation (#703)
* settings: Fix GetAvailableLanguageCodes* implementations

Make the implementation match settings. Also add GetAvailableLanguageCodesCount2

* set: define all missing commands in ISettingsServer for a better workflow

* set: Implement MakeLanguageCode

* set: stub GetQuestFlag

* Address comments
2019-06-16 23:17:37 +02:00
Ac_K
5084164cd9 Implement GetAccumulatedSuspendedTickChangedEvent to ISelfController (#702)
* Implement GetAccumulatedSuspendedTickChangedEvent to ISelfController

- Add all IPC call to the Dictionary.
- Rename _libraryAppletLaunchableEvent.
- Implement GetAccumulatedSuspendedTickChangedEvent according to the RE:
```
undefined8 GetAccumulatedSuspendedTickChangedEvent (struct this, uint *ouput_event_handle)
{
    svcArbitrateLock(&this->tag_location);

    if (this->event_created == 0)
    {
        if (CreateEvent(&this->event_object, 0, 1) != 0)
        {
            Assert(&DAT_710018f73b, &DAT_710018f73b, &DAT_710018f73b, 0, result, &DAT_710018f73b);
        }

        this->event_created = 1;

        svcSignalEvent(&this->event_object);
    }

    svcArbitrateUnlock(&this->tag_location);

    uint event_handle = GetEventHandle(&this->event_object);

    uint uVar1 = *ouput_event_handle;
    *ouput_event_handle = event_handle;

    char cVar2 = *(char *)(ouput_event_handle + 1);
    *(undefined *)(ouput_event_handle + 1) = 0;

    if (cVar2 != 0)
    {
        svcCloseHandle((ulonglong)uVar1);
    }

    return 0;
}
```

* Fix the handle leak
2019-06-15 22:58:22 -03:00
Alex Barney
350a3667f7 Implement OutputAccessLogToSdCard and expose an FS access log option (#700)
* Add OutputAccessLogToSdCard

* Add config options for the FS access log
2019-06-16 03:31:18 +02:00
Ac_K
5c1bc52409 Refactoring of acc:u0 (#701)
* Refactoring of acc:u0

- Move all account things to the account service
- More accurate IAccountServiceForApplication
- Add helper to UInt128

* FIx my engrish

* FIx my engrish #2
2019-06-16 00:35:38 +02:00
Thomas Guillemard
d8d5f2cbe7 fs: Fix ContentManager content paths on Unix systems (#699)
* fs: Fix ContentManager content paths on Unix systems

* revert the line removing change
2019-06-13 22:46:14 +02:00
LDj3SNuD
d87c5375f1 Implement a custom value generator for the Tests of the CLS and CLZ instructions (Base: 32, 64 bits. Simd: 8, 16, 32 bits). (#696)
* Update CpuTestAlu.cs

* Update CpuTestSimd.cs

* Update CpuTestMov.cs
2019-06-12 09:03:31 -03:00
Alex Barney
3541a9053f Update to LibHac 0.4.1 (#698)
* Update to LibHac 0.4.1

Updates the IFile Read and Write methods to use any specified ReadOption and WriteOption

* Move casts around
2019-06-07 00:01:44 +02:00
Ac_K
6fbe87cccc
Create FUNDING.yml 2019-06-02 02:09:38 +02:00
Alex Barney
5fc1f6a1af Update to version 0.4 of LibHac (#689)
* It compiles

* Print correct name when loading an exefs

* Use DirectorySaveDataFileSystem for savedata

* Handle more errors in IFileSystem

* Remove structs replaced by LibHac structs

* Fix alignment

* Fix alignment again

* Fix IFile and IFileSystem IPC

* Alignment

* Use released libhac version
2019-06-01 02:31:10 +02:00
BaronKiko
92c1726647 GPU Profiling (#570)
* Profiler initial setup

* Capture actual timing data

* Profiling data dumped to file on close

* Support for multiple sessions under the same name

* Service profiling

* Sort output for easier read

* csv output

* Split session into 2 seperate values

* Refactor name to category

* Basic profiling window dummy. Toggle with F1 or set key with config
No actual data displayed yet, just a pretty triangle

* Simple font rendering

* Display some actual timing data

* Fix font bearing being ignored

* x bearing and advance. Fixed y bearing calc

* Different coloured lines to make reading easier

* Scrolling

* Multiple columns for name

* Column titles

* display in ms rather than ticks

* Bars to display times

* Sortable columns

* Regex filtering

* Better instant timing calculation
Fixed minor regex bug

* Better filtering
Better max value calculation
Skip some rendering to reduce profiler weight

* Variable update rate

* Show/hide inactive button
Some other touchups

* Add missing project reference

* Hide inactive and pause

* Fix viewport errors

* Update initial window position

* Variable name cleanup

* Disable timing dump by default

* Internal Profile refactor and cleanup

* Timing info cleanup

* Profile config cleanup

* Settings cleanup

* Button refactor

* Profile refactor

* Profile window cleanup

* Window manager refactor

* Font service cleanup

* Fixed bug in profiling method where method was called twice without profiling enabled

* Allow update rates of less than 1hz

* Stop using window.run because it's apparently not great for performance.
Some other performance things, should only draw a new frame when something has changed

* Improved time tracking to keep history

* Profile window was getting too long so I added regions and split bar rendering out into partial class

* Dummy graph view with button to toggle

* Realtime graphing initial commit

* Display totals on new bar

* Simple zooming support with arrow keys

* Limit graph zoom and label start and stop

* Added support for timing flags

* Stop data running away when paused and frame updated

* Manual step button

* Update at when flag issued (ie every frame)

* Removed useless finish profiling call

* Enable and disable profiling at compile time.

* Better plage for frame swap flag, also kept enough flags to cover larger time spans

* No more stopwatches created, uses PerformanceCounter now

* public and internal fields to props

* Move visible update to update rather than draw as it causes a lockup if called from draw
Also added profile window disposal so closing main window closes profiler too

* Fixed optimization settings for profiled builds

* Appveyer script guess to add profiling builds

* Quotes

* 1 less quote

* Maybe escape space?

* Specify config

* Different approach

* Fix file paths

* Fix another path

* Better artifact naming

* Missing -

* test  string

* Removed for, to test

* readd for

* moved dashes around so artifacts can begin with letters

* quote env vars

* martix

* Removed configs

* Much more efficient capture, ConcurrentDictionary was causing too much overhead

* Skip repeating pixels during draw

* Stop ram usage getting too high. Compensating for cleanup doing more now

* Profile CPU, execute skipped because it's just too much work

* Fixed bug with skipping draws. Furthest needed to be reset every loop

* Less distracting colour for timing flags

* Removed profile method function. It just doesn't play nice with conditional compilation so best to remove it now before it's used a lot

* Profile vertex end

* Null check for category, group and item

* Forgot to reset instant count/time

* Increment line when blank

* Fix threading conflict
Fixed instant count and time. Now accuratly represents the total time and count in the buffer

* Fixed bug in time rendering where times were being trimmed to an int.
Also added  microsecond/millisecond formatting to reduce the number of decimal places needed

* Profiled methods used by VertexEndGl

* Texture 2d copy profiled

* Support for multiple profiling levels

* Sometimes it would have to wait a long time for lock to clear so moved it to a tryenter and skip if already locked

* Dumb bug regarding clearing of timestamps. Start is already removed so no need to add it to the start

* Optimisations in drawing routine:
Only calculate bar top and bottom once per bar rather than once per timestamp
Pre-calculate the right side of the graph as it was being calculated multiple times per bar
Skip rendering timestamps that occupy the same pixel space now uses the raw timestamp to decide. While technically not as accurate it's much easier as the right side of the bar doesn't have to be calculated for a skipped timestamp

* Couple alignment changes

* Engine 3d call method profiled

* Custom equals overload for profile config. The default implpmentation was just too slow

* Bump cleanup thread priority. It clears the timer queue so it need to be run frequently

* Fixed bug with scrolling caused by recent rendering optimisations. Simply forgot to increment the line index on a skipped line

* Stopped blocking memory disposal so much. Also parralised(?) cleanup call

* Profiled M2mf, P2mf and shader compilation

* Missing file

* Removed deprecated config

* Removed legacy npaddebug

* Using statement no longer needed

* Apply suggestions from AcK

Co-Authored-By: Ac_K <Acoustik666@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Ac_K <Acoustik666@gmail.com>
2019-06-01 02:13:57 +02:00
LDj3SNuD
ffbfbb5549 Add FCVT <Hd>, <Sn> and FCVT <Sd>, <Hn> Inst.; add Tests. (#692)
* Update OpCodeTable.cs

* Update InstEmitSimdCvt.cs

* Update CpuTestSimd.cs

* Address PR feedback.
2019-05-30 19:51:39 -03:00