Dreamcast Web Server Running Off Memory Card
Adrian writes "I have written a new file system for Linux - to read and write files on the Sega Dreamcast's visual memory unit (VMU)- a small slab of flash memory used by the console to save game files. To see it in action - and see a DC serve some html, go to the Landslide test server - though I have no doubt that micro_http, the web server I am using (said to be the world's smallest), will result in the quickest Slashdotting in history :)" Gentlemen, start your mirrors now.
You've been able to do this in KOS for over a year.
That landslide test server is gone already? And this story was just posted!
blah
And people say I have no time on my hands.
Sig!
No posts, and it's already slashdotted. That has to be a world record.
;)
Let me guess, they probably were on like 56k or somethin, or some ADSL. I mean, thats a dyndns A pointer
Fun, fun.
Free means no restrictions, ironic the FSF's GPL forces restrictions, isn't it? What's your definition of free?
Said with a straight face and enough fluff to bypass the crapfilter
"Draco dormiens nunquam titillandus."
/.ed already, and not a single post! Hope someone mirrored it.
I suspect the downtime is from limited bandwidth rather than a webserver crashing, though on such limited resources I may be wrong.
You can't judge a book by the way it wears its hair.
Not dead yet!
It reminds me of the MacPlus that served a real web site, with pictures & other links. BTW, It wasn't slashdotted for me...
Posted at 2:19 PM; Slashdotted by 2:20 PM....
small server, small amount of time to die, twas quick haha!
The DC server is down, Cannot find server in IE 6.x. I can't imagine that it has been slashdotted already, as this is one of the first posts. What is inetd? Not a network guru, my apologies.
Slashdot: Playing Favorites Since 1997
The VMS flash memory contains 128 kilobytes of storage. These are divided into 256 blocks of 512 bytes each. Of these blocks, 200 are available for user files. The rest of the blocks contain filesystem information, or are simply not used at all.
... ...
The allocation of the 256 blocks is as follows:
The Directory, FAT and Root block are system files. They are not listed in the Directory, but do appear in the FAT. The Root block is always block 255. The start block of the FAT and Directory can be found in the Root block, see below.
The root block (block 255) contains information such as:
The date when the card was formatted
The color and icon for this VMS in the Dreamcast file manager
Location and size of the FAT and Directory system files
I'm not sure about the actual format of this block, apart from the following:
0x000-0x00f : All these bytes contain 0x55 to indicate a properly formatted card.
0x010 : custom VMS colour (1 = use custom colours below, 0 = standard colour)
0x011 : VMS colour blue component
0x012 : VMS colour green component
0x013 : VMS colour red component
0x014 : VMS colour alpha component (use 100 for semi-transparent, 255 for opaque)
0x015-0x02f : not used (all zeroes)
0x030-0x037 : BCD timestamp (see Directory below)
0x038-0x03f : not used (all zeroes)
0x046-0x047 : 16 bit int (little endian) : location of FAT (254)
0x048-0x049 : 16 bit int (little endian) : size of FAT in blocks (1)
0x04a-0x04b : 16 bit int (little endian) : location of directory (253)
0x04c-0x04d : 16 bit int (little endian) : size of directory in blocks (13)
0x04e-0x04f : 16 bit int (little endian) : icon shape for this VMS (0-123)
0x050-0x051 : 16 bit int (little endian) : number of user blocks (200)
The File Allocation Table works similar to a MS-DOS FAT16 File Allocation Table. It serves two purposes; it indicates which blocks are unallocated, and it links the blocks of a file together. Each of the 256 blocks have an entry in this table consisting of a 16-bit integer value (little endian). The entry for block 0 is stored first in the FAT, and the entry for block 255 is stored last. The entry is interpreted like this:
0xfffc : This block is unallocated
0xfffa : This block is allocated to a file, and is the last block in that file
0x00-0xff : This block is allocated to a file, and is not the last block in that file
In the last case, the actual value of the entry indicates the next block in the file. This way, if the number of the first block of a file is known, the subsequent blocks can be found by traversing the FAT. The number of the first block can be found in the Directory if it is a user file, or in the Super block if it is a system file.
Note that mini-game files are allocated starting at block 0 and upwards, while a data file is allocated starting at block 199 selecting the highest available free block. This is probably because a mini-game should be able to run directly from the flash, and thus needs to be placed in a linear memory space starting at a known address (i.e. 0).
Although block 200 through 240 are marked as "free" in the FAT, they can not be used for anything.
The Directory lists all the user files stored in the VMS. The Directory consists of a sequence of 32-byte entries each potentially describing a file. When the VMS is formatted, enough space is allocated to the Directory file to accommodate 200 entries. This is enough, since each file must be at least one block long, and there are only 200 blocks available for user files. The actual blocks making up the Directory can be found using the Root block and the FAT, although it should be safe to assume that the Directory has been allocated to blocks 241 through 253; 253 being the first block of the Directory, and 241 the last.
An entry in the directory is either all NUL-bytes (denoting an unused entry), or a structure describing a file. This structu
Bush is on fire and its not good for my lungs.
Wow. Now that's impressive. Too bad the server's gone. Now there is a purpose to the Dreamcast.
It was slashdotted before the first comment.
However, before everyone chimes in with "why bother doing it at all?!" - I want to say that I think it's a cool project. At least he's doing something with his dreamcast. I've had my PS2 linux kit for almost two years and haven't done a damn thing interesting with it yet!
I submitted this yesterday and it didn't go up. Now I'm working on the vmufs driver - so apologies if you get junk :)
Adrian
...to committ technological suicide. Perhaps throwing the DC from the top of his house, or drowning it in water, or something. But to go out of his way to ASK for a slashdotting, well this guy must be severley disturbed...
But hey, I beat the rush! I got the text and about 1/8th of the picture... pretty cool for a DreamCast. I'm not sure about the size of the flash ram, but perhaps this could be used to create emergency backup webservers? Let's hear the suggestions...
"micro_httpd is a very small Unix-based HTTP server. It runs from inetd, which means its performance is poor. But for low-traffic sites, it's quite adequate."
:D
Acme have just had their point proven nicely. A 7kb webserver really cann't cut it
Mirror
Imagine a beowulf cluster of these!
Enquring minds wan't to know!
Flash memory has a limited number of write cycles, I hope you have done as much as possible to minimise write cycles?
inetd - Google is your friend.
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
The dreamcast server was up when I went... of course it probably only take a few seconds to powercycle it.
Username taken, please choose another one.
The micro_http server seems to have lasted better ;-)
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"who is paranoid about visiting .cx websites?
Ahh, the advantages of the subscription service. Crashing the target server before anyone else.
The simple truth is that interstellar distances will not fit into the human imagination
- Douglas Adams
"The connection was refused when attempting to connect to..." --- Mozilla, 11:06 AM, GMT -8 Wow. That was a long running server. I'm sure it was impressive, while it lasted. PS: What was on that server?
"Your effort to remain what you are is what limits you."
Huh? The content isn't the point. It's the device serving it. So, unless those mirrors are runnin' on Sega Dreamcasts, the novelty is gone.
JHU used to have an ancient Mac IIcx(not even a IIci) running MacBSD, about the only thing it ever did(I think) was serve up a picture of the Cruise Basselope, which, for a slow-as-molassis MacBSD box, kinda makes for an appropriate mascot.
Please help metamoderate.
Offtopic I know, but does anyone like this color scheme for the gaming section? Maybe it's because i'm getting older but it seriously bothers my eyes, and looks like crap.
this means it lasted just slightly longer than...
the average Microsoft IIS server.
(+1 troll)
slashdot posted a story about a commodore 64 that was running a http server a couple years ago. It seemed to hold up longer than this Dreamcast. I mean, I remember there being at least 300 posts before it was /.ed
They sure dont make 'em like they used to.
Karma: The shiznight, mostly because I am the Drizzle.
If you don't measure performance, don't speculate how bad it is. Servers running out of TCP servers such as inetd or tcpserver can be quite fast. See fnord scalability and fnord speed.
*kb*?
No wonder why I needed four of the damned things and still ran out of room with three bloody games.
Guess they were Screwing Every Gamer Again.
Well, not any more ;) It's now in a world of pain.
... we've about doubled the number of people to ever "use" a Dreamcast...
I got the afternoon shift at work.
I'm not sure that you can draw any meaningful information from the average of such a small sample set...
I am TheRaven on Soylent News
I get that its neat to have a dreamcast serving webpages but why is this under games.slashdot.org? Start serving a php game off that dreamcast and then you found the right slashdot section otherwise...
Fnord.sig
Would a beowulf cluster of these be considered a MAME box? :)
What ever happened with the remanufacturing of the broadband adapter? CSI was supposed to make more of those things, and apparently, they had enough orders. I preordered mine back in Sept but I've heard nothing. I'm going to write NCSX.
Any have any ideas? I want to start doing these things with my DC.
though I have no doubt that micro_http, the web server I am using (said to be the world's smallest), will result in the quickest Slashdotting in history
Then why the hell did you post it? People have real servers that can't survive the Slashdot effect...
Then again its gonna be cool watching the dreamcast's framerate drop to one frame per hour.
can't sleep slashdot will eat me
He was right about one thing: "quickest Slashdotting in history". I bet his DC is on fire right about now.
SIGFAULT
Ever since I've gotten into using BitTorrent, BT for short. One of the biggest sites for Torrents (.torrent checksum files) is on a .cx TLD (Top Level Domain:) Torrentse.cx
"True programmers are artists and someday we'll respect programming as self expression and personal effort." - fateswarm
And for a moment i thought it was my machine that was freaking out and about to blue-screen.
Ya it looks like crap.
But i rarely end up in the gaming section anyway..
---- Booth was a patriot ----
on the above Torrentse.cx hyperlink I posted, I swear it was OK when I went to the site to get the URL, but after I posted the comment and went to check if my HTML was written correctly I clicked the hyperlink and it had turned into TubGirl.com I think it's been "hacked". Visit it tomorrow.
"True programmers are artists and someday we'll respect programming as self expression and personal effort." - fateswarm
Poor Sega.
http://www.smegma.ca
Dreamcast had no security when it came to running software off of a burned cd. Why didn't he come up with a way to run linux off of a burned cd. He then could have used the memory card for something else.
As I was able to surmise with the help of an op on the EFnet's #tvtorrents Torrentse.cx is using the /. referrer from /. readers clicking hyperlinks to their domain from /. articles and redirecting /. readers to TubGirl.com Bastards!
To visit Torrentse.cx safely:
Type the url http://torrentse.cx/ into your browser's URL bar and press Enter/Return or "Go".
"True programmers are artists and someday we'll respect programming as self expression and personal effort." - fateswarm
Sometimes reading the manual is useful...
...subscribers see stories before they go live.
If the web site survives the Slashdot subscriber Distributed Denial of Service (DDoS) attack, then the unwashed masses at Slashdot will let loose with a full-fury DDoS.
Unlike most posters, this guy gave permission for Slashdot to DDoS him. On other sites, some poor schmuck running a small web server on his DSL or cable modem is crushed by the traffic, his connection is toast, and his ISP might threaten to cut him off. On small sites being hosted by low-cost providers, the Slashdotting often results in the web site being taken down or, worse, in the person being billed for the traffic.
When will Slashdot start behaving responsibly and get permission to link to small servers? (In this story the web site owner volunteered permission.) It's doing a disservice to Slashdot readers and website owners alike to provide a link knowing that the result with be a DDoS that takes the site down.
I wrote this a while ago to solve that problem. Go get Proxomitron if you
don't have it, and add this to your default.cfg file, under [Patterns]
Name = "Games.Slashdot.org - Colour Fix"
Active = TRUE
Multi = TRUE
URL = "games.slashdot.org"
Limit = 64
Match = ""#6078B0""
Replace = ""#6078B0""
Of course, this requires you to be running Windows, seeing as
there isn't anything like Proxomitron for Linux/BSD (that I know of).
Agurr. Silly Maur. That should have read like this, but Proxomitron
changed the "#3300CC" into the one in the matching expression below.
Name = "Games.Slashdot.org - Colour Fix"
Active = TRUE
Multi = TRUE
URL = "games.slashdot.org"
Limit = 64
Match = ""#3300CC""
Replace = ""#6078B0""
Proxomitron can be found at http://www.proxomitron.org/
For better or for worse, when you put a website on the Internet, you are making it available to the public. Permission to access and link to your site is granted by the simple fact that it is Internet-accessible. Since Slashdot is a NEWS site it would be simply impossible for Slashdot to wait several hours/days for positive responses from site owners before Slashdotting them. Regardless, when you put your server at the mercy of the Internet hordes, you can't really complain when said horde drops your server like a hot potato.
"micro_httpd is a very small Unix-based HTTP server. It runs from inetd, which means its performance is poor. But for low-traffic sites, it's quite adequate."
I've posted a mirror of this site (based upon the text a previous poster said it contained, since the server appears to be down) on my own Dreamcast.
;-)
As my page says, the Dreamcast is running NetBSD 1.6.1, with its connection to the Internet being a 608/128 ADSL modem. It's living behind an OpenBSD 3.1 firewall that's just redirecting the port appropriately.
Hopefully, since this isn't on the front page, it won't get Slashdotted...but it ought to be interesting to see how many hits it can take before it goes down.
Note that, for some odd reason, I seem to be able to get to the page through Lynx from a box on another network, but not through the boxes on the same LAN. If you have problems getting to the page, try Lynx for the fun of it and let me know.
How To Get Humans To Mars
Hey fool! Torrentse.cx DOES NOT allow slashdot REFERRERS because they can't take the ! NICE TUBGIRL LINK!
I wonder how my
embedded webserver would handle the load on a dreamcast.
I was able to get to it now, at May 12 7:52 EST (or EDT, never really sure when the change occurs). I don't know if the color scheme changed or what, but I seem to be getting a fairly standard white background with black text with Phoenix .5.
And I reload... nope. Must have just rebooted it or something. Well, at least we know it wasn't a hardware failure and that the color scheme changed. I'd take a look at the page source to verify, but now that it's gone....
// Dumps core here
the average of such a small sample set...
:)
Look on the bright side, you don't need to do messy division to get the average
-
- - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
I am afraid the server will now only be on at the evenings and weekends - I kept it up for two days (surely a record :>) but I have now revereted to normal behaviour. The sources in the CVS have been updated though.
Adrian
(I hope someone mods this up so that the world can read it).
I was taken by surprise at the posting, as it was over a day after I'd submitted. But my DC was never troubled as inetd severly limited the load.
In retrospect I wish I'd known then what I know now about inetd because it would have been fun to drive the DC very hard and see how it coped. As it was inetd just stopped serving after a quite limited number of requests, paused for a few minutes and then did it again. The load on the DC never rose above 0.1 for that reason.
As for all those people who said I'd wear my flash out then they missed how it worked. The html was entirely static - there were no writes involved in accessing the VMU at all. In any case the mtdblock layer in Linux is highly cacheing, so once a file was read once it resided in memory until I dismounted the vmu or changed the underlying file (I have debug messages on, so I could verify that).
Anyway, the DC is probably quite good as a machine for a small static server.