7 ms·
this is pure beauty. Do you think something like this can be done on a NES? like a simple CGI website
by allegrotim 2y ago
this is pure beauty. Do you think something like this can be done on a NES? like a simple CGI website
- zamadatix 2y agoUnfortunately the time you get to the point of even valid HTTP responses it will look less like a SNES and more like whatever-you-plugged-into-a-snes-for-power. E.g. the original Family Computer Network System addon already had more RAM and CPU power than the original console it attaches to just to interface as a modem at all, let alone something "basic" like CGI. The Wii is probably the first Nintendo console where all the hardware you need to do this is fully built in (though maybe the Nintendo DS, depending how much you're willing to try to get Linux + your server to fit in memory without plugging in a RAM expansion pack to the GBA slot).
- echelon 2y ago> The Wii is probably the first Nintendo console where all the hardware you need to do this is fully built in Even though accessories were required, you could probably do this with both the N64 Disk Drive or GameCube network adapter. Both were network interfaces that still dispatched to the underlying system. The N64 Disk Drive [1] would be a fun case, because the storage medium is a glorified floppy disk drive. It does connect over a modem, so there'd be some fun middleware. The Super Nintendo had a network adapter as well, and both the NES and SNES [2] had satellite networking adapters in Japan. IIRC, there was also a network adapter for the Game Boy. I'm not sure how or if those would work, or how much control was surrendered to the hardware/software of the network adapter itself to let it do all the driving. [1] https://en.wikipedia.org/wiki/64DD https://en.wikipedia.org/wiki/64DD [2] https://en.wikipedia.org/wiki/Satellaview https://en.wikipedia.org/wiki/Satellaview
- zamadatix 2y agoAre you sure the Satellaview was available for the Famicom (NES)?
- echelon 2y agoI was wrong about the satellite integration [1]. It was dial-up. I'm almost certain I remember a similar effort for the Game Boy Pocket, though it might not have entered the market. [1] https://en.wikipedia.org/wiki/Family_Computer_Network_System https://en.wikipedia.org/wiki/Family_Computer_Network_System
- Klonoar 2y agoThe Genesis also had Sega Channel (IIRC?).
- athom 2y agoThis reminds me SO much of Atari's "Graduate Computer" attachment for the 2600. Unfortunately, I can't find an accessible link from where I am right now. Maybe when I get back home...
- EvanAnderson 2y agoSome links for the curious: - http://www.atarihq.com/museum/2678/graduate.html http://www.atarihq.com/museum/2678/graduate.html - https://atarimuseum.ctrl-alt-rees.com/videogames/consoles/2600/a3000.html https://atarimuseum.ctrl-alt-rees.com/videogames/consoles/26...
- athom 1y agoThank you for stepping in, Evan! My original post was from work, and when I tried to find a reference, I was blocked from following any links! Think they recently instituted a policy... So I finally do the lookup from home, and what do I find at the bottom of the first page, but a link to YOUR REPLY! We're Google famous!
- jkrejcha 2y agoYeah, the DS probably is the first one that has enough inbuilt support since it has support for Wi-Fi out of the box although Linux seems a bit heavyweight for this perhaps(?)
- unleaded 2y agoDSLinux exists but you need the RAM expansion cartridge. from what I found it supports networking but you've only got 8MB minus the space used by the system. and an ancient binary-only toolchain to wrangle with
- immibis 2y ago4 megabytes* ought to be enough for anybody, and if you're any depth into DS homebrew, you probably have a 3in1 which expands it to 8 megabytes. Can it run Linux? Ehhh....... can it run a web server? Absolutely. * we don't talk about using the 0.6MB VRAM for purposes other than video (even though it should work fine).
- zamadatix 2y agoDSLinux absolutely runs in 4 MB (i.e. w/o a RAM expansion pack), it's just going to take a bit of work to also fit the web server + whatever CGI they wanted without a pack. The EZ-Flash V 3-in-1 actually added a whopping +16 MB (128 Mb) of PSRAM! Growing up I only ever had the +8 MB pack from Opera... what a weird bit of history that browser port was :).
- immibis 1y agoI believe DSLinux is uCLinux, not real Linux. And it has to be, because there's no MMU. Is that PSRAM? For some reason I thought the bigger storage was Flash.
- zamadatix 1y agoI wouldn't say uClinux was any less Linux, over time its features even merged to mainline in the 2.x series, including the ability to run MMU-less in version 2.5.46 https://lwn.net/Articles/14823/ https://lwn.net/Articles/14823/ The EZ-Flash V 3-in-1 also had either 64 MB or 128 MB of NOR flash (depending on the revision) in addition to the 16 MB of PSRAM. There was also some battery backed SRAM for save data.
- tyami94 2y agoThis leads to an interesting philosophical debate about where the line to "cheating" is. I'd imagine the NES is more than capable of handling HTTP. I own a small managed network switch with a Web UI (and CGI) all running on an 8051 built into the switch ASIC, and if that can do it, it doesn't seem like such a far fetch that the NES can. The hard part is storage and I/O. This is purely theoretical, but a 6522 could be used to bitbang SPI, opening the possibility of adding an SD card and Ethernet controller (with a chip like the Wiznet W5500). Add a small amount of SRAM (~16/32Kbit) and a loader ROM, and you'd be able to make the NES into a workable general purpose computer using only the cartridge slot. If needed, one could steal an interrupt from the expansion slot. Admittedly, this could still be considered "cheating" because the W5500 has a built-in TCP/IP stack, but personally I would feel comfortable saying the NES is hosting the site. Bitbanging SPI with the 6522 -- https://wilsonminesco.com/6502primer/potpourri.html#BITBANG_SPI https://wilsonminesco.com/6502primer/potpourri.html#BITBANG_...
- voidUpdate 1y agoI feel like this would definitely be possible. I was reminded of https://mitxela.com/projects/kiloboot https://mitxela.com/projects/kiloboot, which uses an ENC28J60 for the ethernet stuff. I feel like you could probably quite easily bitbang SPI, given it's quite a forgiving protocol, just dedicate a couple of addresses in the memory space to interact directly with the bus (maybe with a separate shift register chip if you want to make things a bit easier). If you give up writing anything to the screen, I'd imagine you could just spin until something happened on the ethernet side, then read the requested path, pull some data off the ROM that corresponds to that path and send it back again
- joseda-hg 2y agoI don't think so without significant work, NES has only 2KB of RAM and an 8 bit CPU without MMU or many niceties taken for granted in General Purpose OS's I doubt you can go much further back than Fifth Gen (of consoles) or so
- jandrese 2y agoYou would have to burn a cart that contained the webpage and TCP stack, as well as having the ethernet hardware, but there are tricks you can do to reduce the memory requirements. It's not going to be able to handle more than a packet or two at a time, but I've seen TCP stacks squeezed onto really low end hardware. Obviously you won't be able to open much of a TCP window so performance will be lousy, but it's a 1.8Mhz CPU so that was always going to be the case. Just don't have any misconceptions about being able to run TLS on it. Remember that TCP was developed on machines that did not have a lot of memory or even CPU cycles. An Atari 2600 might be a bridge too far, but a NES should be able to do it.
- joseda-hg 2y agoFair enough, seems a lot simpler than what I had in mind with expansions and custom software, but also a far cry from OP's "flash" a general purpose OS and more or less get to working
- anthk 2y agoYou would be surprised with what a Jupiter Ace could do with few KB of RAM. Add a external module for serial <> PPP and the fun begins.
- KeplerBoy 2y agoFunny how that works. It's almost impossible on fifth gen but trivial on sixth gen (at least on the Xbox, which pretty much was a PC).
- toast0 2y agoAll the mainstream 6th gen consoles had first party support for wired ethernet; although only the Xbox had it built in (well, the slim ps2 had it built in too). I'd expect they've all served web pages at one time or another. 5th generation could probably make it happen, but without ethernet, you're looking at a modem or serial interface, and in today's world that's almost certainly talking to something else in your house that's a better host. :P Wikipedia categorizes the Apple Pippin as 5th gen, and it's more or less a Mac with a weird pinout for the PCI slot, so I'd guess it's the easiest to get ethernet with; without resorting to something that has more smarts than the 'host'
- Dwedit 2y agoWhatever you end up doing on the NES would end up not being a website anymore. You want to interface with joystick port 1? Not TCP/IP anymore. Whatever gateway you would use to connect to the custom protocol would have a lot more oomph than a NES.
- starkparker 2y agoif you can run a web server on a C64, you can in theory run one on the NES, but you'd have to find a way around the NES's relative RAM constraints you can run a C64 OS on the NES because of the shared CPU features, with limitations: https://github.com/calcwatch/nes64 https://github.com/calcwatch/nes64 which means you can port C64 LUnix NG to NES by adding the Famicom Disk System, which adds more RAM: https://hackaday.com/2024/02/11/running-unix-on-a-nintendo-entertainment-system/ https://hackaday.com/2024/02/11/running-unix-on-a-nintendo-e... LUnix NG comes with an experimental web server: https://github.com/ytmytm/c64-lng/blob/b76b0470e28ec20d08c37405bf76d16d93f85fbe/help/httpd.html https://github.com/ytmytm/c64-lng/blob/b76b0470e28ec20d08c37..., https://github.com/ytmytm/c64-lng/blob/b76b0470e28ec20d08c37405bf76d16d93f85fbe/apps/httpd.s https://github.com/ytmytm/c64-lng/blob/b76b0470e28ec20d08c37... So in theory you could serve HTTP 1.0 from a NES. ("to whom" would be the big next question)
- tyami94 2y agoI don't know if this is cheating, but there were a few NES games that had extra RAM on the cartridge. Pretty easy to do as the cartridge slot directly breaks out the data and address lines from the CPU.
- a_t48 2y agoFor SNES - absolutely, if you get an FXPAK PRO and proxy over USB. It would be slooow, though, the transfer rate isn’t amazing (limitation on the firmware side, probably due to ancient USB standard?). Basically though - write incoming packets to a well known place in RAM, read another well known place in RAM for outgoing packets. The good news is that you have 12MB of ROM to work with. The bad news is that you really don’t want to transfer too much data at once, and you only get 128Kb of RAM. Not sure if you could do this easily with an NES, I don’t know if the everdrive supports RAM access over USB (it doesn’t on GB* which makes me super sad). See also https://youtu.be/bsMV0EAF25o?si=Q6i8EH0HMMPa8xA3 https://youtu.be/bsMV0EAF25o?si=Q6i8EH0HMMPa8xA3 for doing this (sorta) via serial over the controller ports (basically…)
- a_t48 2y agoOhh https://github.com/mupfdev/SNESoIP https://github.com/mupfdev/SNESoIP exists too