Slashdot Mirror


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.

32 of 149 comments (clear)

  1. Slashdotted already? by To0n · · Score: 2, Funny

    That landslide test server is gone already? And this story was just posted!

    --
    blah
    1. Re:Slashdotted already? by bedouin · · Score: 4, Informative

      I got to it before the /.; this is all it said:

      "This is a test server only

      This is not the server you were looking for.

      Actually, it is micro_http running on a Dreamcast and serving a piece of html saved on the Dreamcast vmu.

      For more details please visit linuxdc.net.

      To show your deep admiration of this utterly useless hack, email me."

      This almost makes me wish I didn't sell my Dreamcast a couple weeks ago. Though to me it was kind of useless since I wasn't going to spend $100 for a DC NIC anytime soon.

    2. Re:Slashdotted already? by Anonymous Coward · · Score: 2, Funny

      At least I know I should not be hosting my company's web site on a Dreamcast. :)

    3. Re:Slashdotted already? by Uber+Banker · · Score: 3, Funny

      Yeah, flash has a limited amount of write operations, so I guess you've been the first /. to actually kill a chip, rather than bandwidth.

      Nice idea, just remember not to put the LinuxDC swap file on the flash...

    4. Re:Slashdotted already? by Anonymous Coward · · Score: 2, Funny

      His mom came in and switched his Dreamcast off - told him to stop playing games and do some work...

      See, there are implications with having web servers in everyday objects.

  2. Anybody have a Bittorrent for this? by Matey-O · · Score: 4, Funny

    Said with a straight face and enough fluff to bypass the crapfilter

    --
    "Draco dormiens nunquam titillandus."
    1. Re:Anybody have a Bittorrent for this? by Znonymous+Coward · · Score: 3, Funny

      Shit, I'm hung over and my stomach hurts. That post just made me laugh for like 5 min. Now I'm going to be sick.

      --

      Karma: The shiznight, mostly because I am the Drizzle.

    2. Re:Anybody have a Bittorrent for this? by pyrote · · Score: 2, Funny

      Cool! We slashdotted a human!

      Purge cache or was it lunch?

      --
      THE WORLD IS GOING TO END!!!! eventually.
  3. slashdotting by CowBovNeal · · Score: 4, Informative

    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.
  4. EEk by Anonymous Coward · · Score: 4, Informative

    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

  5. micro_httpd by Neophytus · · Score: 3, Funny

    "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."

    Acme have just had their point proven nicely. A 7kb webserver really cann't cut it :D

  6. mirror by abhisarda · · Score: 3, Informative
  7. And the question on everybodys mind is... by Anonymous Coward · · Score: 2, Funny

    Imagine a beowulf cluster of these!

  8. Someone had to mention it... by gilesjuk · · Score: 4, Informative

    Flash memory has a limited number of write cycles, I hope you have done as much as possible to minimise write cycles?

    1. Re:Someone had to mention it... by WolfWithoutAClause · · Score: 2, Informative

      In practice, that is often not an issue, provided you even out the wear. The flash memory manufacturers guarantee atleast 1 million erase cycles. But the write takes quite a while. So provided you have a reasonable quantity of memory (say 128 megabytes), you would never age the memory in 15 years.

      --

      -WolfWithoutAClause

      "Gravity is only a theory, not a fact!"
  9. am I the only one by Anonymous Coward · · Score: 5, Funny

    who is paranoid about visiting .cx websites?

  10. Well, at least we all know who to blame. by AltGrendel · · Score: 3, Funny

    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

  11. Huh? by SuperBanana · · Score: 5, Insightful
    Gentlemen, start your mirrors now.

    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.

  12. Re:You were right.. by 00_NOP · · Score: 3, Informative

    Yes, it is on ADSL. My DC indicates that at least some people are seeing it. Apologies if you didn't.

  13. Color by mondoterrifico · · Score: 3, Insightful

    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.

  14. this means it lasted just slightly longer than... by AtomicX · · Score: 3, Funny

    this means it lasted just slightly longer than...

    the average Microsoft IIS server.

    (+1 troll)

  15. I remember... by Znonymous+Coward · · Score: 4, Funny

    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.

  16. Re:DC Server Down by Zork+the+Almighty · · Score: 3, Insightful

    Inetd is an internet "superserver". For traditional, high use sites people usually run a dedicated service, or daemon, to provide the service. This daemon runs in the background listening for requests and doing whatever it is supposed to do. If your have to offer a lot of services (http, ftp, telnet, mail, ssh, etc...), but none of them are used very much, an internet superserver is a better way to go. Inetd sits in the background listening on a whole bunch of ports waiting for a request. When it gets an ftp request, it starts the ftp server to handle the request(s), and shuts it down after. This sort of thing will allow you to run lots of services on a very slow computer. Unfortunately, because of all the starting and stopping, none of those services can handle a high volume.

    --

    In Soviet America the banks rob you!
  17. Re:When's Gamecube Linux coming out? by Enonu · · Score: 2, Funny

    Right on! First things's first: Setup a pr0n server on a Gamecube. Nintendo execs would marvel the ingenious use of its family game entertainment system. We could then move on to goatse.cx mirroring, and everything would be set!

  18. "It's thinking" by PhoenixK7 · · Score: 3, Funny

    Well, not any more ;) It's now in a world of pain.

  19. In other news... by AvantLegion · · Score: 4, Funny

    ... we've about doubled the number of people to ever "use" a Dreamcast...

  20. I wanna know one thing though.... by johny_qst · · Score: 2, Insightful

    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
  21. This Reminds Me... by 13Echo · · Score: 2

    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.

  22. Re:And people say... by Anonymous Coward · · Score: 2, Funny

    You were almost the first post on slashdot. You're right, you're a busy busy man.

  23. Re:When's Gamecube Linux coming out? by freeweed · · Score: 3, Informative

    Gamecube dvd discs DO NOT spin backwards. Run a game and open the cover when it's loading something if you don't believe me.

    --
    Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
  24. Mirror Running on Another Dreamcast by schnarff · · Score: 2, Interesting

    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. ;-)

  25. Re:When's Gamecube Linux coming out? by thargor66 · · Score: 2, Informative

    From memory it's not that the disc's spin backwards, but that they are written backwards. The track goes from the outside to the inside. There was talk of a hack to actually wire up a normal CD/DVD drive to the gamecube as a way of using normal media, rather than the mini-backwards-written-dvd. Thargor66