Skip to content

Conversation

@SternXD
Copy link
Contributor

@SternXD SternXD commented Sep 21, 2025

image

(I apologize I accidentally messed up rebasing on the other PR so just decided to redo it.)

Description of Changes

This PR adds a complete Network and HDD settings page to FullscreenUI, bringing feature parity with the Qt interface for DEV9. This includes:

  • Ethernet device type selection with proper adapter availability checking (PCAP, TAP, Sockets)
  • Ethernet device dropdown with network adapter enumeration and friendly names
  • Complete network configuration options (IP address, subnet mask, gateway, DNS settings)
  • DHCP interception toggle and related network settings
  • HDD image file selection via directory picker with automatic filename generation
  • HDD creation functionality with progress dialog and proper size validation

Rationale behind Changes

Previously, users had to exit FullscreenUI and use the Qt interface to configure network and HDD settings for DEV9. This created an inconsistent user experience and made it a horrible experience for anyone couch gaming.

The changes solve this by:

  • Providing complete DEV9 configuration within FullscreenUI
  • Using similar adapter detection logic as Qt to only show available network types
  • Implementing proper HDD size limits (40-120GB for LBA28, 100-2000GB for LBA48)

Suggested Testing Steps

  1. Network Settings:

    • Verify only available adapter types appear in Ethernet Device Type dropdown
    • Test adapter selection shows friendly names and updates correctly
    • Confirm network settings (IP, DNS, etc.) save and load properly
    • Test DHCP toggle enables/disables related settings appropriately
  2. HDD Settings:

    • Test HDD image file selection creates proper path with DEV9hdd.raw filename
    • Verify HDD creation with different sizes and LBA modes
    • Confirm size limits enforce correctly (40-120GB LBA28, 100-2000GB LBA48)
    • Test progress dialog during HDD creation
  3. Cross-Platform:

    • Test on Windows (should show TAP if available) and Linux/macOS
    • Verify adapter enumeration works correctly on different platforms

Did you use AI to help find, test, or implement this issue or feature?

I did not use it for my code but it did help me with grammar and better helping understand why this should be added.

@SternXD
Copy link
Contributor Author

SternXD commented Sep 21, 2025

image

@TheLastRar all of these have been addressed if you'd like to give it another look

Copy link
Contributor

@TheLastRar TheLastRar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've made the BackgroundProgressDialog a popup, (and thus blocks input), which is probably better for HDD creation.

The BackgroundProgressDialogs is used when achievement data is still downloading when loading a savestate
On inspection, this is might be okay also being a modal as the calling code blocks anyway
(I also couldn't force it to show up when I tried)

If we are making this a modal dialog, then the function would need renamed as its no longer a background progress bar.

@SternXD
Copy link
Contributor Author

SternXD commented Sep 22, 2025

You've made the BackgroundProgressDialog a popup, (and thus blocks input), which is probably better for HDD creation.

The BackgroundProgressDialogs is used when achievement data is still downloading when loading a savestate On inspection, this is might be okay also being a modal as the calling code blocks anyway (I also couldn't force it to show up when I tried)

If we are making this a modal dialog, then the function would need renamed as its no longer a background progress bar.

Yeah, my intention was to use that for creating hard drives too now if sparse wasn't able to be used I will rename it though

@SternXD SternXD force-pushed the fsui-network branch 2 times, most recently from 4905a32 to e756a2b Compare October 15, 2025 20:48
@SternXD SternXD requested a review from TheLastRar October 15, 2025 20:48
@SternXD
Copy link
Contributor Author

SternXD commented Oct 15, 2025

ofc thats failing now hold on 😭

@TheLastRar
Copy link
Contributor

Are you able to resolve the new warnings here https://github.com/PCSX2/pcsx2/actions/runs/18546991379/job/52866873714#step:13:1015

@SternXD
Copy link
Contributor Author

SternXD commented Oct 16, 2025

alright that's fixed

@SternXD SternXD requested a review from TheLastRar October 16, 2025 23:07
Copy link
Contributor

@TheLastRar TheLastRar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look okay, lightly tested on windows

Copy link
Member

@JordanTheToaster JordanTheToaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settings and functions appear to work correctly from what testing I can do.

Copy link
Contributor

@kamfretoz kamfretoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each option works correctly.

@TheTechnician27
Copy link
Contributor

Behavior review without having looked at the code yet:

General

  • ✅ Top icon looks really good. It's different from the one we use in the Qt UI, but then so is the Emulation header (moreover, I think this one, subjectively, is a nicer icon than Qt).
  • ✅ The menu is in the correct place relative to the Qt UI – after memcards and before folders.
  • ✅ Checked for typos. Everything basically looks fine except one nitpick you'll see below.
  • ✅ All of the option icons are, I think, well-chosen.
  • ⚠️ The headers are named differently than in Qt (e.g. 'Hard Disk Drive' to 'Internal HDD'), but I think some of the DEV9 Qt widget's naming conventions could use some revising anyway.

Network adapter

  • ✅ Enable Network Adapter works (and likely ought to be changed from simply 'Enabled' in Qt at a later point). Correctly enables EthEnable and enables Ethernet Device Type and Intercept DHCP. It arguably works better than Qt, because there, Ethernet Device is set enabled even though it's not interactable without Ethernet Device Type Set.
  • ⚠️ The list of Ethernet Devices is correct for all device types but is not alphabetized, unlike in Qt.
  • ✅ Device type "Sockets" correctly disables Intercept DHCP as an option.

Network configuration

  • ❌ DNS1 Mode and DNS2 Mode should be sorted alongside DNS1 Address and DNS2 Address like in the Qt UI, as they exist mainly to toggle those specific options.
  • ⚠️ Calling it "PS2 IP Address" is inconsistent with 1) the Qt option and 2) the other address fields in the network config options which simply call it "Address".
  • ✅ Auto Subnet Mask and Auto Gateway work.
  • ✅ The IP address entry fields work and correctly clamp to valid IPv4 ranges.

Internal DNS

The contents of the 'Internal DNS' tab are absent, but I'm bringing this up as a formality, not because this PR should implement that. I'd argue it should be a separate PR in the future and that it was a sensible choice to keep it out of this one.

Internal HDD

  • ✅ Enable HDD works.
  • ✅ Creating new HDD works.
  • ⚠️ The "40-2000" string isn't grammatically correct; the hyphen should be replaced by an en-dash ().
  • ⚠️ You say "LBA48 toggle for large HDD support", but it seems like that was dropped in favor of letting the user input whatever size they want alongside some prebaked options.
  • ❌ I'm going to assume that HDD Image Selection > Create New... > 2000 GB (2 TB) does what it says on the tin without any warning or confirmation like the other sizes. Not only that, but it's directly adjacent to the Custom... option. This is an accident waiting to happen and cannot make it in in this state. I really think anything above 200 GB should be hidden away in Custom....
image

@TheTechnician27
Copy link
Contributor

Business-wise, this all sems like appropriate business. Something I forgot to add to the prior review is that it seems like the custom HDD input size correctly sanitizes input. For example, I tried decimals (can't enter), I tried negatives (can't enter), I tried just '4', and I tried something to the effect of '40' with hundreds of leading zeroes (which does correctly create it, albeit does break the UI a bit – not this PR's fault at all).

image

I'll look at the code, but this passes functionality-wise.

if (file_size > 0)
{
const int size_gb = static_cast<int>(file_size / (1024LL * 1024LL * 1024LL));
const bool uses_lba48 = (file_size > static_cast<s64>(120) * 1024 * 1024 * 1024);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new code uses 1024 * 1024 * 1024 three times (a fourth line uses 1024LL * 1024LL * 1024LL). I'm sure the compiler already reduces this to a single number and that anyone reading this would know what that's doing, but maybe a constexpr might make this a bit more readable (and then, for that one line, just static_cast<long long>(ONE_GIGABYTE) or create a separate ONE_GIGABYTE_LL)? Just a suggestion since I don't know if people would find the triple-1024 more clear.

Copy link
Contributor

@TheTechnician27 TheTechnician27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm mistaken about what the TRANSLATE_NOOPs do at the bottom of Fullscreen.cpp, but it doesn't look like any were added here despite quite a few user-facing messages being added. If I'm wrong, this PR is good to go; otherwise, that's the only thing holding back an approval right now.

Besides that, everything else looks good. The mutices (including in the new ImGuiFullscreen code) don't look deadlockable, the HDD creation process looks good and safe, and the network settings look like they reflect the good behavior of the UI.

At some point, we'll probably want to centralize some of the Qt and FSUI logic so that both can pull from it instead of rebuilding the wheel where possible.

Copy link
Contributor

@TheTechnician27 TheTechnician27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out I was mistaken before. Everything looks good to go.

Copy link
Member

@F0bes F0bes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested a bit. Seems to work. Just a couple code things.


namespace FullscreenUI
{
class HddCreateInProgress;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forward declaration isn't necessary. HddCreateInProgress is only used in FullscreenUI.cpp, where it is defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, no it's not it's been removed

#include "USB/USB.h"
#include "VMManager.h"
#include "ps2/BiosTools.h"
#include "DEV9/AdapterUtils.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like this include is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup nope it's not I mistakenly added it (it's gone now as of latest push)

Copy link
Member

@F0bes F0bes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good now, tested on macOS and it seemed to work fine.

@F0bes F0bes merged commit ba0dae5 into PCSX2:master Oct 25, 2025
12 checks passed
@SternXD SternXD deleted the fsui-network branch November 21, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants