* move np_score to /np_score folder
* added more logging to np functions
* using common np_error file
* moved web_api to dedicated folder
* implemented some context creations for np_score so logging would be more productive
* sceKernelGetProcessType
* sceCoredumpRegisterCoredumpHandler stub
* Better stub for sceCoredumpRegisterCoredumpHandler, stub sceCoredumpUnregisterCoredumpHandler
* sceNpSetNpTitleId stub
* sceNpSetContentRestriction stub
* sceKernelMlock stub
* posix_sigfillset
* posix_sigprocmask stub
Just logs the how parameter
* posix_msync stub
Just logging for now
* libSceContentExport stubs
* Clang
* sceVideoRecordingSetInfo stub
* sceKernelTitleWorkaroundIsEnabled
* Provide title workaround bits
Just grabbed them from fpPS4 code, I have a feeling actually applying these is gonna be a bit of a pain though.
* fpPS4 has a 0x39 bit, I guess that was probably added after 12.52 though.
* Bump to error
It's not going to work without proper sceKernelGetAppInfo workaround data
* Clang
* Clang2
* Add IME keyboard layout and panel metrics support
- Introduced new header and implementation files for IME keyboard layout handling.
- Added structures for viewport metrics, keyboard grid layout, and drawing parameters.
- Implemented functions to compute viewport and panel metrics for the IME dialog.
- Enhanced the IME dialog UI to utilize the new keyboard layout and metrics.
- Updated input handling to support new keyboard interactions and layout adjustments.
- Added caret management and text normalization features in the IME dialog state.
- Improved window positioning logic to accommodate different screen resolutions.
* fix for Maxos Linux builds
* Align IME behavior with real PS4 libSceIme/Dialog flow
Features:
- Add validation helpers for IME option/language/extended-option masks
- Implement `sceImeGetPanelSize` sizing logic
- Replace `sceImeSetTextGeometry` no-op path with real state/argument validation
- Align panel sizing/validation paths closer to PS4 IME behavior
- Improve panel text/caret handling reliability during UI updates
- Add IME panel movement via controller right stick
- Support mouse drag repositioning for the panel
- Respect `FIXED_POSITION` by disabling movement when locked
Updates:
- Tighten `sceImeOpen` checks (user/type/input method, handler, work alignment, reserved, overlap)
- Validate initial/runtime text rules (`\n`/`\r` and surrogate rejection) in open/set-text paths
- Enforce caret bounds and null-caret behavior in `sceImeSetCaret`
- Update `sceImeUpdate` to return `NOT_OPENED` in invalid states and respect handler matching
- Harden `ImeHandler` against null state/callback execution paths
- Optimize keyboard grid rendering by reusing per-frame buffers
- Reduce input callback allocations with fixed-size buffers
- Harden panel update paths for invalid handler/open-state cases
- Clamp panel position to visible screen bounds
- Apply stick deadzone/speed scaling for stable movement
- Keep panel coordinates consistent with IME coordinate mode
* 🤦♂️
* Enhance IME UI and Input Handling
- Introduced BrightenColor function to adjust color brightness for UI elements.
- Improved UTF-16 character handling with new functions to count UTF-16 units and reject input based on UTF-16 limits.
- Added functionality to clamp input buffer to UTF-16 limits, ensuring text input does not exceed specified limits.
- Refactored virtual pad input handling to encapsulate left stick directions and panel movement.
- Enhanced IME UI drawing logic to incorporate new input handling and navigation features.
- Updated keyboard layout handling to support dynamic configurations and improved navigation shortcuts.
- Integrated additional font ranges for better language support in the IME, including Chinese, Arabic, and Thai.
- Improved overall code structure and readability by utilizing modern C++ features such as std::vector and std::array.
* Remove non existing Roboto Medium font from IME initialization
* Enhance IME Dialog and UI with Improved Gamepad Navigation and Key Mapping
- Added support for disabling gamepad input through OrbisImeDisableDevice in ImeDialogState.
- Updated ImeKbLayout to modify key mappings for better character input, including changes to punctuation keys.
- Implemented enhanced left stick navigation with repeat functionality in ImeUi, allowing for smoother input handling.
- Introduced new constants for stick navigation delays and repeat intervals to improve responsiveness.
- Refactored input handling logic to accommodate both virtual and gamepad inputs, ensuring consistent behavior across devices.
- Added functionality to clear all text in the input field with a specific shortcut, aligning with expected user behavior.
* clang
* Enhance IME functionality with improved gamepad navigation and layout handling
* ime: fix specials/accent layout mapping and dynamic panel resize handling
- Expand specials/accent keyboard layouts to a 7-row model and move function keys to fixed bottom rows.
- Add variable row-height support to the keyboard grid (`fixed_bottom_rows`, `bottom_row_h`) and compute row offsets/span heights from layout config.
- Preserve function-row height in `ime_ui` and `ime_dialog_ui` while distributing remaining height across typing rows.
- Make mode-switch focus layout-driven by resolving `SymbolsMode`/`SpecialsMode` action keys in the active layout instead of relying on implicit row assumptions.
- Track panel layout anchor deltas in `ime_dialog_ui` and use press-offset dragging so cursor remains on the originally pressed point when panel dimensions/position change.
* Add IME UI enhancements and shared utilities
- Introduced new states for panel navigation and selector fade in `ime_ui.h`.
- Added a new header file `ime_ui_shared.h` containing utility functions and structures for virtual pad input handling, including deadzone application and stick navigation direction resolution.
- Updated `font_stack.cpp` to include additional Unicode ranges for general punctuation in the font atlas.
* Refactor IME settings: remove deprecated accessibility options and update references to use new settings structure
* Refactor IME UI Navigation and Activation Logic
- Introduced a new mechanism for handling virtual button repeat actions, improving responsiveness for gamepad navigation.
- Added support for stick navigation with adjustable repeat rates and initial delays, enhancing user experience during input.
- Removed the ImeSelectorFadeState structure and related logic to streamline the IME keyboard layout drawing process.
- Simplified the activation logic for menus, ensuring that menu activation is more intuitive and responsive to user input.
- Adjusted the navigation threshold for stick inputs to improve sensitivity and control.
- Cleaned up the code by removing unused variables and consolidating repeated logic into reusable functions.
* Refactor IME UI shared header: streamline code and improve structure
- Removed unused includes and redundant structures.
- Consolidated virtual pad snapshot handling and input state management.
- Introduced new structures for OSK pad input and navigation handling.
- Updated function signatures for clarity and consistency.
- Enhanced keyboard parameter application for OSK shortcuts.
- Improved overall readability and maintainability of the code.
* Refactor OskShortcutActionResult to simplify triangle button press handling
* Enhance IME Keyboard Layout and UI Functionality
- Added new key glyphs for Shift and Caps Lock in ime_kb_layout.h.
- Improved keyboard navigation logic to skip non-action keys.
- Introduced new constants for selector IDs in ime_ui.cpp for better readability.
- Refactored keyboard row and column clamping logic for clarity.
- Enhanced selector drawing logic with fade and pulse effects for better user feedback.
- Implemented functions for cycling keyboard case states and toggling keyboard family modes.
- Added functionality to focus on keyboard action keys based on their actions.
- Improved edit menu handling with new templated functions for better code reuse.
- Updated caret blinking logic to improve text input experience.
- Expanded symbol ranges in font_stack.cpp to include keyboard symbols.
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* renderer: update font handling and add new font support
- Added support for multiple NotoSans fonts including Arabic, Thai, and CJK.
- Refactored font loading logic to use FontStack for better management.
- Removed deprecated NotoSansJP font and updated font paths in CMake.
* optimize atlas size
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
- Added support for multiple NotoSans fonts including Arabic, Thai, and CJK.
- Refactored font loading logic to use FontStack for better management.
- Removed deprecated NotoSansJP font and updated font paths in CMake.
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* prototype settings look
* put categories on top instead of on the side, plays nicer with input system
* added profiles + saving and loading framework
* add helper functions
* fix autofocusing
* add code for using embedded image files
* put settings in different files
* clang
* remove sdl_image submodule, unify functions when possible
* Always display selected profile in settings content areas
* Fix focusing, logs, highlight profile text
* persist highlight on focused buttons, add all categories placeholders
* All settings added
* navigate tabs with l1/r1
* Replace sdl mixer library with minimp3 header
* clang
* set spec before putting in audiostream
* respect main audio output device setting
* fixup
* replace file with submodule
* cleanup
* capitalize functions like the others
* move buffer to heap
* use vector for pcm buffer instead
* imguitest
* button tests
* fix gamepad nav
* placeholder hardcoded eboot path
* set focus correctly, move to own files
* get installed game information
* dynamically adjust rows
* use slider for ui scale
* launch big picture with CLI arg
* Use emulator settings for UI scale and window size
* center scrolling on focused item
* fix item focus on scrolling when navigating with keyboard or pad
* minor fixups and comments
* fix performance degradation
* adjust fonts to show TM symbol and higher overscale
* reuse and clang
* add exists check before iterator
* flatten navigation (gamepad navigation crosses child window container)
* cleanup and comments
* simplify update checker a bit
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
* WIP: imgui translations
* fallback to original strings if tables are incomplete
* reorder things a bit
* construct tables as consts
* Update imgui_translations.h
* initial tests for testing Setting<T>
* argg
* keep switch off
* added ci
* fix ci
* merging tests to build.yml
* fixing linux ttests/?
* one more try for ci
* more linux fix for ci
* more ci fixes
* try to fix ctests now
* should fix now
* trying fixing linux tests
* some more tests
* more tests (68 tests) and clang format
* using new emulator_settings
* the default user is now just player one
* transfer install, addon dirs
* fix load custom config issue
* initial openal backend
* linux fix?
---------
Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
* using new emulator_settings
* the default user is now just player one
* transfer install, addon dirs
* fix load custom config issue
---------
Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
* Replace sysmodule enums with table
Dumped this from the 12.52 module, using a script I created.
* Better documentation
* Separate from system libraries
That system folder is going to be getting quite large if I left all the sysmodule stuff in there.
* More arrays from library
* Found another preload list
Ghidra really hates decompiling libSceSysmodule, so I didn't notice this one at first.
Also documented specific versions tied to each preload list.
* Start work on implementation
* Some basic implementations
* Initial stub for module loading
Just enough to see if the logic functions appropriately.
* Clang
* sceSysmoduleLoadModule
Now I need to get sceSysmodulePreloadModuleForLibkernel done so that we don't have bugs from not loading internal LLEs.
* sceSysmoduleLoadModuleInternal
* sceSysmodulePreloadModuleForLibkernel
I have successfully broken quite literally everything.
I shall debug this tomorrow.
* Slight fix
* Maybe fix?
* Change log
Enjoy the log spam 😄
* Increased defined stub count
Now that libc and libSceLibcInternal loads later, all the auto stubs are getting consumed by it.
* sceSysmoduleUnloadModule stub
Also a couple fixes. Sysmodule does pass argc and argv to game modules, but only after loading them once to check binaries.
Shouldn't matter for the most part.
* Clang
* Less stubs
2 thousand is seemingly enough.
* sceSysmoduleLoadModuleInternalWithArg
Doesn't hurt to have, since Apex Legends calls it.
* Oops
* Oops 2
* Rename isModuleLoaded to getModuleHandle
Review comment
* Remove debug game module loads
These cases only trigger when specific sceRegMgr key values are set, and for our purposes, we can treat that case as false.
* Allow preloading to fail
For kalaposfos
* Clang
* Initial definitions
* internal__Fofind
* Libcinternal threads
fopen stores a valid pthread mutex in the FILE struct. Since this is exposed to the game/app, we need to handle this accurately.
* internal__Foprep (and various other functions called in it)
* Actual fopen implementation
At long last, an actual function I'm supposed to implement.
* fflush + compile fixes
* fseek implementation
Comes with functions fseek calls, aside from fflush which I pushed earlier.
* fread, _Frprep
Also changed some parameter names a tad to match how I named things in my decomp.
And fixed some bugs with how I was handling the weird offseted mode thing
* fclose, _Fofree
Not confident on this one, but we'll see I guess.
* Bug fixing
No more crashes at least, fread seems to be broken though.
* fopen bugfixes
Behavior now matches LLE, at least in how LLE font seems to use it.
* Fix _Frprep
Seems like everything works now?
* Logging
Probably going to need to swap lseek and read logs to debug/trace later but this is for debugging.
* Remove alignment check
Seems I must've misinterpreted some of what Ghidra spat out, since libSceNgs2 is calling with size 1, nmemb 4.
* Reduce fseek, fread logs to trace
* Clang
* added function parameters
* added logging
* more logging
* added error codes file
* sceNpWebApiCreateExtdPushEventFilter some re
* added np_web_api_internal
* more np_web_api_internal definations
* Initial types cleanup
* Basic library context handling.
Followed decomp closely, using standard library classes where possible to simplify code.
* Fix params to sceNpWebApiCreateContext
* Context logic fixes
* User contexts
* Clang
* sceNpWebApiVshInitialize
* Better initialization
* Request creation logic
* Some cleanup
* sceNpWebApiAbortRequest, sceNpWebApiDeleteRequest
* SendRequest functions
* formatting
* Update terminateContext and deleteUserContext
Addressing some unimplemented bits now that I have requests and user contexts here.
* Copyright
* sceNpWebApiCreateHandle, sceNpWebApiDeleteHandle, sceNpWebApiAbortHandle
also some bugfixing
* Extended push event filter
* abort handles in terminateContext
* Other push event filter types
* Register callbacks
* unregister callbacks
* oops
* One final update to deleteContext
* Logging changes
* Bug fixes
Fixes memory leaks, pretty sure these are the only places where that was an issue.
* sceNpWebApiCheckTimeout
* Handle and request timeouts
* Oops
* Push event filter parameters
Tested with Assassin's Creed Unity, seems to be correct.
* Service push event filter parameters
Tested again with Assassin's Creed Unity, seems to work fine.
Also fixed some code bugs I noticed, and removed an unnecessary part of my internal structs
* Stub implementation for createUserContextWithOnlineId
Might need a PSN check to be properly accurate, not sure.
* added sceNpWebApiGetHttpStatusCode
* opps
* opss 2
* sceNpWebApiReadData
* clang
* Fix context ids, user context ids, and request ids
Overlooked how these ids are actually calculated.
* Additional PSN checks
Seems creating any form of push event filter with an np service name fails when you're not connected to PSN.
Not sure of the actual cause yet, but given the error code, it's related to sceNpManagerIntGetUserList.
* compile fix
---------
Co-authored-by: Stephen Miller <millerste004@gmail.com>
Co-authored-by: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com>
* improved sdl backend
* small cleanups
* misc
* adjustments and new definations
* cleanups
* more debuging
* rewrote sceAudioOut calls
* fixed a trace
* fixed audio3d port
* small debug fixes
* small additions
* using shared_ptr
* compile fixes
* make macOS happy
* using shared mutex
* implemented audio input backend
* fixed port construction based on decompile
* implemented partially sceAudioInGetSilentState to return correct code if mic device is null
* improved sdl volume handling
* dynamic volume update
* this one is for @UltraDaCat
---------
Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
* PngEnc hle
* format
* formatting + fix scePngEncDelete
* fix cmake + misc improvements
i think the setjmp is right according to the libpng manual, works fine from my testing
* fixes
fix an issue with how alpha was handled, and PngEncode() now properly sets the processed_height in outputInfo.
* format
* Update pngenc.cpp
* set outputInfo->processed_height during png write
i assume some games will use this for error handling
* Introducing key_manager for storing encryption keys . Currently only trophy key is neccesary
* keep gcc happy?
* addded logging to keymanager
* revert file
* added npbind file format and rewrote part of trp file format