Homebrew [WIP Release] NetSurf 3DS

  • Thread starter Thread starter Coderman64
  • Start date Start date
  • Views Views 52,909
  • Replies Replies 96
  • Likes Likes 41

Coderman64

Well-Known Member
Newcomer
Joined
Feb 18, 2024
Messages
47
Reaction score
99
Trophies
0
XP
271
Country
United States

NetSurf 3DS​

This is the first (to my knowledge) homebrew port of a modern-ish web browser to the 3DS! (It is also my first 3DS homebrew release, so hopefully I'm doing it right ;D)

Quick Links:​


Unlike previous attempts at a homebrew web browser, NetSurf 3DS is a port of a pre-existing browser, namely the NetSurf web browser. NetSurf is known for being extremely portable and lightweight, even reportedly working on <32MB of RAM in some cases. It even has a framebuffer front-end, meaning that no 3rd party GUI libraries are required. This makes it (in my opinion) an ideal case for porting to the 3DS (yay)!

What Works:

  • Browsing to webpages with SSL (HTTPS) <= 1.2 (which is better than the 3DS default browser with insecure SSL <= 1.1)
  • submitting basic HTML forms (like Google's search bar)
  • entering web addresses and values for text entries with the 3DS's system keyboard.
  • PNG, JPEG, BMP, and GIF images.
  • Basic HTML/CSS
What doesn't work:
  • Downloading files (I'll probably be focusing on this next)
  • Webpages are hopelessly mangled (in a different way than the default browser, at least)
  • NetSurf's super-basic JavaScript support doesn't yet compile and is disabled in the build process.
  • WebP and SVG support doesn't exist since the required libraries have not been ported yet.
  • FreeType font support is disabled in the build process (Enabling it yields an instant crash on startup), so only a simple built-in pixel-y font is provided. (It also frequently gets cut off, and text wraps incorrectly, which I think is a related issue)
  • The "History" view does not work correctly.
  • Only 16BPP color is currently supported (though you probably wouldn't notice, anyway).
What will (likely) never work:
  • HTML5/WebGL (or Java or Flash) browser games
  • Video playback (basic, experimental support using GStreamer exists in the code, but GStreamer hasn't been ported to 3DS yet, and even if it was, it would likely require too much RAM)
  • Chrome/Firefox-level website rendering (we're only working with 64MB of RAM here, folks!)
  • Modern Web 2.0 apps like Google Docs, Gmail, etc.
  • An embeddable web frame (I just don't have enough free time to figure that out :-/)
Changelog
v0.03
-
Added CIA builds! nsfb.cia is the normal browser as a CIA, but nsfb_himem.cia uses the 3DS's extended memory mode, giving it 80MB of memory instead of 64MB! It takes much longer to boot, though, so it is recommended to use nsfb.cia unless you run into a website that won't load without the extra memory.
- Added RomFS Support. All resource files are now packed into the 3dsx or CIA file by default. This means you no longer need to extract resources.zip to /share/netsurf on your SD card!

Here are some screenshots (running in the Citra emulator):

welcome_page.png
google.png

nintendodotcom.png
gbatemp.png

Installation:​

NetSurf 3DS is available as a 3DSX or CIA file from the GitHub releases page. Here are an explanation of each version:
- nsfb.3dsx - NetSurf for 3DS as a 3DSX executable file
- nsfb.cia - NetSurf for 3DS as a CIA installable archive
- nsfb_himem.cia - NetSurf for 3DS as a CIA installable archive, using the 3DS's extended memory mode. This gives you 80MB of memory (instead of 64MB) at the cost of higher boot times, and certain 3DS system apps becoming unavailable while NetSurf is running. It is recommended that you use the other versions unless you find a website that needs the extra memory. Both nsfb.cia and nsfb_himem.cia should work identically on New3DS, but it is yet untested.

QR Code to install nsfb.cia using FBI:

1766517078404.png



Happy browsing!
 
Last edited by Coderman64,
Is there any sort of settings page/config? Also does it save browser history and whatnot?
There are a few about: pages (similar to firefox), but I don't think they allow you to change settings. Look at about:about to see a list.

Netsurf settings would usually be changed with a GUI in other versions of the browser, but the framebuffer front-end doesn't allow that. Instead, you have to change settings by adding a choices file at (I think) /.netsurf/Choices. This is formatted as key:value pairs. You can see core options that are available at https://ci.netsurf-browser.org/jenkins/job/docs-netsurf/doxygen/md_docs_netsurf-options.html, and framebuffer-specific options are listed in the configuration section on https://ci.netsurf-browser.org/jenkins/job/docs-netsurf/doxygen/md_docs_using-framebuffer.html. Do note that there is an on-screen keyboard option. This doesn't refer to the 3DS keyboard, but an internal one in netsurf that can be enabled. The 3DS keyboard is easier to use (in my opinion), which is why it is disabled by default.

In terms of history, only "local" history (history for the current session) is available, and currently, the view for that is kind of broken, not allowing you to scroll the history view. This is a limitation of the framebuffer front-end, and I'd probably need to re-implement global history from scratch if I wanted to add it. Local history is not saved to the SD card.
 
Hi Coderman64 can this be ported to the ds and Dsi they have internet browser there old internet browser is not working properly can you port it to those systems and make it usable on there. Could it use screen space and being able to using the internet browser and the videos with how the 3ds internet browser is used
 
Last edited by Protonnutron,
Hi Coderman64 can this be ported to the ds and Dsi they have internet browser there old internet browser is not working properly can you port it to those systems and make it usable on there. Could it use screen space and being able to using the internet browser and the videos with how the 3ds internet browser is used

Hey Protonnutron! The size of the RAM would be the first major issue. The 3DS allows 64MB of RAM for applications, which, while not a lot, is plenty to run NetSurf. The DS and DSi, however, have much less. The DSi has 16MB of RAM, which is (allegedly) the minimum amount of RAM to get NetSurf running at all, much less well. The original DS has only 4 MB, which isn't enough to run even the original DS web browser, requiring a separate RAM expansion. Even with the RAM expansion, it is only around 14MB (if my research is correct), which is still insufficient for NetSurf.

Beyond that, DS development requires an entirely different set of libraries and compilation steps, meaning I'd have to restart my port from scratch. If you feel up to the challenge of getting it to run on the DSi, feel free to look at my repository (linked in the post above) to see what changes I made to help inform your own port.

Your last sentence doesn't make much sense. Are you asking for video playback (e.g., YouTube)? That is something that the 3DS struggles with alone, much less integrating it into a web browser. NetSurf also only uses GStreamer for videos by default, which isn't available on the 3DS yet. So, I'd have to rebuild video playback from scratch assuming it would even work if I did. Potential video playback on a potential DSi port is definitely not feasible at this time.

Edit: I would also like to point out that the network stack for the DS/DSi line of systems is even older and less secure than the 3DS's, and doesn't support things like PSK2, required for logging into most (if not all) modern wifi networks. So, be wary and don't get hacked!
 
Your last sentence doesn't make much sense. Are you asking for video playback (e.g., YouTube)? That is something that the 3DS struggles with alone, much less integrating it into a web browser. NetSurf also only uses GStreamer for videos by default, which isn't available on the 3DS yet. So, I'd have to rebuild video playback from scratch assuming it would even work if I did. Potential video playback on a potential DSi port is definitely not feasible at this time.
It's worth mentioning that there is already ThirdTube homebrew for watching YouTube videos, and it works really well.
 
what do you mean by /share/netsurf . I couldnt find this file location and making one and doing the steps didnt seem to work
 
So you're a Moonie? I apologize if that's not the appropriate name for that sect. Great to see Netsurf variants, I have used its proxy.
 
what do you mean by /share/netsurf . I couldnt find this file location and making one and doing the steps didnt seem to work
/share/netsurf should be a folder in a folder containing all the files and folders extracted from resources.zip, which you can download from the releases page. Neither folder exists by default on the 3DS SD card.

This is required since it contains all the default stylesheets for web pages, default pages (like about:welcome, the file browser page, and even the error 404 page), translations of text for different languages, and the root certificates required for HTTPS browsing. Without this, NetSurf will fail to load any webpage whatsoever.

It's basically sdmc:/share/netsurf/ if that makes more sense. It's an absolute path, not relative to the location of nsfb.3dsx.

The easiest way to do it is over FTP, or by plugging the SD card into your PC.

So you're a Moonie? I apologize if that's not the appropriate name for that sect. Great to see Netsurf variants, I have used its proxy.
What?

I...what?
 
If you're worried about memory, might I suggest taking an approach similar to Line-3DS. The app used to contain a .cia that allowed for 80MB of memory on the O3DS and 178MB on the N3DS. I doubt something like this could be done from a .3dsx file, but i'd love to be proven wrong.
 
If you're worried about memory, might I suggest taking an approach similar to Line-3DS. The app used to contain a .cia that allowed for 80MB of memory on the O3DS and 178MB on the N3DS. I doubt something like this could be done from a .3dsx file, but i'd love to be proven wrong.
I have looked into that, and yes, it is currently impossible to enter HIMEM mode from a 3dsx file (AFAIK). I will probably set up HIMEM mode when I make a CIA release unless it causes issues.

So far, memory is not a significant problem on the 3DS. What I was talking about is porting to the Original DS or DSi, where memory is much more limited.
 
I will probably set up HIMEM mode when I make a CIA release unless it causes issues.
It adds a noticeable delay starting/existing a title because of reboot. The other downside is that the old 3DS browser applet doesn't work while in 80MB mode :rofl2:
All in all a browser can't have too much memory nowadays.

. What I was talking about is porting to the Original DS or DSi, where memory is much more limited.
If I remember correctly third-party extensions could add up to 32MB to the DS (Lite) instead of 8MB like the official memory expansion for the Opera browser (which didn't really work when it was new in the first place).
 
  • Like
Reactions: Coderman64
NetSurf was invented by the Moonies, I stopped using it because of scandals. But, everyone is entitled to practice whatever religion.
I couldn't find any information on this anywhere. Do you have a source to link to? Maybe you're thinking of another web browser or open-source project? There are also a few other things out there called "NetSurf," perhaps you were thinking about one of those?

This NetSurf doesn't seem to be affiliated with anything but the RISC OS project. It has even participated in the Google Summer of Code and has a RISC OS award for best non-commercial software in 2012/2013.

Even if you're right, it doesn't matter. The technology is useful, and it is open source.
 

Site & Scene News

Popular threads in this forum