• joe.edwards (cs)

    I'm still waiting for the punchline...

  • James Schend (unregistered)

    So you accidentally set up a recursive logging function that logged itself? Or am I missing something?

  • Ezra (unregistered) in reply to James Schend

    Yeah, I think that's it

  • FredSaw (cs)
    anon:
    fist!
    Right arm
  • suutar (unregistered) in reply to James Schend

    I don't think it was recursive, I think it's just that 14MB of disk is enough for only about a quarter million logged instructions, at 60 bytes each. That's around what, half a second of run time of the emulated OS?

  • snoofle (cs) in reply to suutar

    I admire G.R.G's tenacity for at least making the thing work before moving on.

    Edit: it's a good thing G.R.G. didn't have the zippy processors of today generating those logs, because they might fill up a 500GB drive in...um, 1/4 second (Don't ya love progress?)

  • moe (unregistered)

    WOW! Congratulations anon! You have won today's game of 'Who is the First Poster?'. They should make a bud light commercial for you -- -- 'and here's to you, Mister First Poster ... '

    You win one signed picture of Yvonne.

  • Philippe (unregistered)

    It wasn't a recursion problem. As others have noted, it was more of a scaling problem - the amount of disk space required to store the log data was quickly exhausted.

    This is a WTF along the lines of "no one will ever need more than 640K of RAM" and "14MB of disk space is such a huge amount of disk that no conceivable process could ever fill it up."

    You youngsters and your terabyte filesystems and gigahertz processors...

  • moe (unregistered)

    OH! I get it! The WTF is that you think someone is actually going to read that long-ass, boring story.

    The REAL WTF is ... Paula posted FIRST while the pig grunted and the duck quacked 'B-A-N-N-E-R'.

  • snoofle (cs) in reply to Philippe
    Philippe:
    It wasn't a recursion problem. As others have noted, it was more of a scaling problem - the amount of disk space required to store the log data was quickly exhausted.

    This is a WTF along the lines of "no one will ever need more than 640K of RAM" and "14MB of disk space is such a huge amount of disk that no conceivable process could ever fill it up."

    You youngsters and your terabyte filesystems and gigahertz processors...

    I have twin 114GB drives on a 3 year old system (not too shabby for it's day). Even with a few thousand photos of the kids, hundreds of songs and a handful of movies, I've only used about 30GB, and most of that is Windows updates.

    Just curious: what do people put on these huge disks to fill them up (I mean besides porn)? And how much of it is actually useful?

  • PSWorx (cs)

    Reminds me of a depth search based "maze solver" I wrote as a hobby project when I was still in school... or at least attempted to write...

    The program, like every good maze solver accepted a two dimensional array of "cells" as an input (where each cell was either accessible or an obstacle) and was to return the shortest possible route from the start to the destination cell.

    The program with its really cool recursive depth search algorithm I had proudly coded in VB at that time worked fine as long as it just had to find a path to the target. However, when I tried to find the shortest possible one, it kept mysteriously freezing on some mazes, especially on those with few obstacles...

    I tried and tried but no matter what, I could not find the error... until i realized that the program actually ran as expected, just that iterating through every single possible path on an almost blank 100x100 cells grid might just maybe not be the best idea...

  • H3SO5 (cs) in reply to snoofle
    snoofle:
    I have twin 114GB drives on a 3 year old system (not too shabby for it's day). Even with a few thousand photos of the kids, hundreds of songs and a handful of movies, I've only used about 30GB, and most of that is Windows updates.

    Just curious: what do people put on these huge disks to fill them up (I mean besides porn)? And how much of it is actually useful?

    I have an 80GB HD, and most of it is taken by music, photos and VMware virtual machines.

  • Sauron (unregistered) in reply to snoofle

    Well, there's it right now. "Hundreds" of songs is relatively small. When these HDDs fill up, we are generally talking thousands of songs (granted, even my 2000 is only 11 gigs, but I know people with over a hundred gigs... crazy people). A handful of movies is also on the low side compared to people filling up. Add in games, television series, larger applications... it adds up fast.

  • XIU (cs) in reply to snoofle

    Got 200GB in this pc, 1.38TB in my nas next to me, uhm, 320GB external and another 250GB external.

    Got 40GB for music, 1TB on anime and other tv series, 200GB for xvid movies and then too much backups I'll never use :)

  • RON (unregistered) in reply to PSWorx
    PSWorx:
    Reminds me of a depth search based "maze solver" I wrote as a hobby project when I was still in school... or at least attempted to write...

    The program, like every good maze solver accepted a two dimensional array of "cells" as an input (where each cell was either accessible or an obstacle) and was to return the shortest possible route from the start to the destination cell.

    The program with its really cool recursive depth search algorithm I had proudly coded in VB at that time worked fine as long as it just had to find a path to the target. However, when I tried to find the shortest possible one, it kept mysteriously freezing on some mazes, especially on those with few obstacles...

    I tried and tried but no matter what, I could not find the error... until i realized that the program actually ran as expected, just that iterating through every single possible path on an almost blank 100x100 cells grid might just maybe not be the best idea...

    Should have used a heuristic breadth-first search to weight cells based on if they are moving closer to your destination or not. It's not a perfect solution, but it returns the shortest route for 99% of all test cases.

  • hmphargh (unregistered)

    movies music and backups for my program cd/dvds :-D fills my 160 gig external

  • Rootbeer (cs)

    Yeah, but what kind of disk interface did you have 30 years ago that could handle a throughput of 14MB in 1/4 second? That's something like 100 times faster than the MFM interfaces that were available at the time.

  • clintp (unregistered)

    As someone who's written a few emulators, lemme tell you it's no fun. Congratulations on your tenacity.

    However, your sense of purpose was a bit misguided. Glad you realize that now. :)

  • snoofle (cs) in reply to Rootbeer
    Rootbeer:
    Yeah, but what kind of disk interface did you have 30 years ago that could handle a throughput of 14MB in 1/4 second? That's something like 100 times faster than the MFM interfaces that were available at the time.
    Like me, you misread it. It's 1/4 second of simulated cpu time.
  • snoofle (cs) in reply to clintp
    clintp:
    As someone who's written a few emulators, lemme tell you it's no fun. Congratulations on your tenacity.

    However, your sense of purpose was a bit misguided. Glad you realize that now. :)

    About 1989-ish, I wrote an emulator for about 80% of the 8086 instruction set, in Pascal, on a VAX. I hated doing it, and the folks who needed it hated using it. Don't get me wrong, it worked fine; it's just that they hated running on an emulator when there was a lab full of perfectly functioning PC's with actual 8086 chips in the very next room).

  • Mark (unregistered) in reply to Rootbeer
    Rootbeer:
    Yeah, but what kind of disk interface did you have 30 years ago that could handle a throughput of 14MB in 1/4 second? That's something like 100 times faster than the MFM interfaces that were available at the time.

    1/4 second of simulated time, not clock time.

  • zip (cs) in reply to snoofle
    snoofle:
    Philippe:
    It wasn't a recursion problem. As others have noted, it was more of a scaling problem - the amount of disk space required to store the log data was quickly exhausted.

    This is a WTF along the lines of "no one will ever need more than 640K of RAM" and "14MB of disk space is such a huge amount of disk that no conceivable process could ever fill it up."

    You youngsters and your terabyte filesystems and gigahertz processors...

    I have twin 114GB drives on a 3 year old system (not too shabby for it's day). Even with a few thousand photos of the kids, hundreds of songs and a handful of movies, I've only used about 30GB, and most of that is Windows updates.

    Just curious: what do people put on these huge disks to fill them up (I mean besides porn)? And how much of it is actually useful?

    I have several VPCs on my dev box, those things can get big fast.

  • Carnildo (cs) in reply to snoofle
    snoofle:
    Philippe:
    It wasn't a recursion problem. As others have noted, it was more of a scaling problem - the amount of disk space required to store the log data was quickly exhausted.

    This is a WTF along the lines of "no one will ever need more than 640K of RAM" and "14MB of disk space is such a huge amount of disk that no conceivable process could ever fill it up."

    You youngsters and your terabyte filesystems and gigahertz processors...

    I have twin 114GB drives on a 3 year old system (not too shabby for it's day). Even with a few thousand photos of the kids, hundreds of songs and a handful of movies, I've only used about 30GB, and most of that is Windows updates.

    Just curious: what do people put on these huge disks to fill them up (I mean besides porn)? And how much of it is actually useful?

    On my system, I've got (at last count) 1 80GB hard drive, 1 160GB hard drive, and 1 200GB hard drive.

    The 80GB is full of things like Linux applications or my data (15,000 photos takes up a lot of disk space!).

    The 160GB is split into a 80GB WinXP partition (mostly empty) and a mostly-full "media" partition (FLAC copies of my CD collection take up a lot of space, but mean I can listen to anything without changing CDs).

    The 200GB drive is split into a mostly-full Win98 partition (full installs of games take up a lot of space), a 4GB Linux boot partition, and a 136GB "data" partition which contains, among other things, a partial copy of Wikipedia (40GB), images of the WinXP partition with WinXP and WinVista installed (10GB each, and lets me switch between the two easily), images of the last few PS1 games I played (20GB, load times from the hard drive are a lot lower than load times from CD).

  • fepp (unregistered)

    This is still a real problem with emulators today. I work with one that is pretty darned fast, and sometimes you see customers ask for things like "can't we just log all the instructions executed and check for X". Where they do not think about the fact that any non-trivial execution is on the order of one billion instructions, and each instruction log might well be 60 characters.

    Add in some data logging, and you have a massive file that fills most networked engineer accounts in industry in no time. Not to mention that outputting that big blob sure takes some time...

    Realizing the scale of certain activities before doing it is hard.

    I also wrote a search program once (in Prolog) that ate all memory in our fabulous large Sun servers (this was early 1990s).

  • phaedrus (cs) in reply to snoofle
    snoofle:
    Philippe:
    It wasn't a recursion problem. As others have noted, it was more of a scaling problem - the amount of disk space required to store the log data was quickly exhausted.

    This is a WTF along the lines of "no one will ever need more than 640K of RAM" and "14MB of disk space is such a huge amount of disk that no conceivable process could ever fill it up."

    You youngsters and your terabyte filesystems and gigahertz processors...

    I have twin 114GB drives on a 3 year old system (not too shabby for it's day). Even with a few thousand photos of the kids, hundreds of songs and a handful of movies, I've only used about 30GB, and most of that is Windows updates.

    Just curious: what do people put on these huge disks to fill them up (I mean besides porn)? And how much of it is actually useful?

    1 hour of standard def MPEG2 video takes up nearly 1GB. 80 hour TiVos have 80GB drives. High definition MPEG2 takes up a lot more space. I don't remember what the H.264 high definition numbers are, but they take up at least as much space as a standard def MPEG2 (probably quite a bit more, again, this is totally off the top of my head). So, a TiVo Series 3 or a home theater PC can burn through a lot of disk recording video.

    I know guys who rip all their DVDs and watch them from a sling box.

    In the 1-20GB era days, it was compressed music. Now it's lossless music and compressed video. Once the drives get big enough, people will do lossless video. I know guys who rip their DVD collections and watch them off of sling boxes.

    Have you seen any recent video games? The install size for Quake4 was over 2GB. Ten games could mean anywhere from 20 to 50GB of disk space.

    If you do any development these days (really, people who read this site? Never), 10 million lines of code probably translates into a few GB of binaries with debugging symbols (at least, it does at my office, we get a complete linux install in our workspaces, since we do embedded work). If you've got a couple different branches of that codebase to work with, well, you'll need a good chunk of disk to deal with it. I work on a 20 million LOC codebase at work, and I can easily fill 60GB of space without blinking.

    The steady state of a harddrive is full. Always has been, always will be. I stopped saying "I'll never be able to fill this one..." a long time ago, and instead "I wonder what I'll fill this one with..."

  • Jonh Robo (unregistered)

    CP/M-86 ???

  • Francis (unregistered)

    So, what was wrong? Seriously, a recursive log function is funny, but not that interesting. Come on, add a little bit more to this wtf, make it interesting!

    Do people submit these?

  • Merit (unregistered)

    This (vaguely) reminds me of trying to write a program to figure out if a given game of solitaire is winnable.

    When you want to examine every possible move (and each move after that, obviously) the number of paths grows pretty damn rapidly.

  • Reed (unregistered)

    Heh, when GRG said that he was going to log every instruction, I immediately thought this though:

    LOOPS!

    :D

  • Reed (unregistered)

    Heh, when GRG said that he was going to log every instruction, I immediately thought this though:

    LOOPS!

    :D

  • Saladin (cs) in reply to phaedrus
    phaedrus:
    Have you seen any recent video games? The install size for Quake4 was over 2GB. Ten games could mean anywhere from 20 to 50GB of disk space.
    Off the top of my head, full installs for a few games:

    Neverwinter Nights 2: ~7.5GB TES4 Oblivion: ~6GB Unreal Tournament 2004: ~4.5GB (perhaps after a mappack or two) Diablo II with expansion (keep in mind that this game is about seven years old): ~4GB I believe

    It adds up really fast X_x

  • PS (unregistered) in reply to moe

    [quote user="moe"]WOW! Congratulations anon! You have won today's game of 'Who is the First Poster?'. They should make a bud light commercial for you -- -- 'and here's to you, Mister First Poster ... 'quote]

    Good call - maybe the ad copy could be:

    Mister First Poster guy You sit at your computer anxiously waiting to post just one word - "fist" The same thing you like inserted into your ass We salute you Mr First Poster guy. It takes a real man to admit this to all the WTF readers

  • dekarguy (unregistered) in reply to phaedrus
    phaedrus:

    Have you seen any recent video games? The install size for Quake4 was over 2GB. Ten games could mean anywhere from 20 to 50GB of disk space.

    Look at MMORPGs

    World of Warcraft is 6.45 GB, Vanguard SoH is 24GB

    Captcha: Gotcha

  • Zylon (cs)

    I'd like to know what G.R.G.'s problem with CP/M is. Before MS-DOS, there was CP/M. It was a cross-platform, cross-CPU industry standard, and there was a crapload of software available for it. Heck, I cut my database teeth on the CP/M version of dBase II!

    SELECT SECONDARY, motherfrakkers.

  • joe.edwards (cs) in reply to Merit
    Merit:
    This (vaguely) reminds me of trying to write a program to figure out if a given game of solitaire is winnable.

    When you want to examine every possible move (and each move after that, obviously) the number of paths grows pretty damn rapidly.

    The number of paths would be infinite, considering that it is valid in Solitaire to make a move that directly undoes your previous move. Then you could do it again. And again. And again.

    Addendum (2007-03-21 17:36): And again. And again...

  • Rafael Larios (unregistered) in reply to snoofle
    snoofle:
    Just curious: what do people put on these huge disks to fill them up (I mean besides porn)? And how much of it is actually useful?

    I have a friend that haves 500 GB of music in his home PC... I don't want to look into his personal server at his company.

  • JPP (unregistered)

    The smart way to solve the problem is to only emulate the application space and translate the OS calls into native 8086 code. On a machine built by RAIR called the "Black Box" that ran MP/M 86 on an 8088 we had an 8085 co-processor to run 8080 code. When we built an 80286 version we wrote an emulator and had a 6mhz 80286 behaving like a 1mhz 8085! We also wrote an MS-DOS emulator (before concurrent dos came out). Ah those were the days.

  • Alex (unregistered) in reply to Philippe

    Boy, talk about bringing back some memories of my old Kaypro II... ;)

    Terabyte filesystems?!? How about - "You youngsters with any hard drives at all!!" If 2 5-1/4 floppies were good enough for me, they're good enough for anyone. One floppy for WordStar, and one for your data - what more could you want? You'd be amazed at what you could do with WordStar and a daisy wheel printer.

    And I can't forget my first-ever programming environment - Turbo Pascal version 1.0... Those were the days.

    CAPTCHA - pirates (Of The Carribean - coming to theaters May 25th)

  • mare (unregistered)

    And if you do some video editing from time to time... make a few dvds for your friends... well, you run out of disk space when you least need it.

  • Carnildo (cs) in reply to Alex
    Alex:
    Boy, talk about bringing back some memories of my old Kaypro II... ;)

    Terabyte filesystems?!? How about - "You youngsters with any hard drives at all!!" If 2 5-1/4 floppies were good enough for me, they're good enough for anyone. One floppy for WordStar, and one for your data - what more could you want?

    Writable permanent storage? What luxury! Back when I started programming, the only "permanent storage" I had was a spiral-bound notebook sitting next to the computer.

  • grg (unregistered) in reply to Zylon

    It was a cross-platform, cross-CPU industry standard,

    As long as the platform had a 8080 or 8085 or Z-80 and not a 6800, 6502, 2650, 1802, Or PDP.

    And as long as it had exactly the same kind of disk drive and same disk format.

    not exactly "cross anything"

    Still, it was slightly better than nothing.

  • Alex (unregistered) in reply to Carnildo
    Carnildo:
    Writable permanent storage? What luxury! Back when I started programming, the only "permanent storage" I had was a spiral-bound notebook sitting next to the computer.

    I was about to whip out my dad's punch cards, but I think the spiral notebook would still win. :D

    captcha: xevious (another blast from the past - at one point my favorite arcade game)

  • Tumi (unregistered) in reply to Saladin

    Full install of Oblivion is 4.5GB, including Knight of the Nine add-on (which includes the 8 other mods too).

    But as a rule of thumb it seems that full install is roughly 4GB if you install it from DVD, or 700MB per CD. Quite "magically", those numbers are the size of the disks too.

    But as said, it stacks up fast, especially if you hate switching disks and copy a image to HD and use it through Daemon tools etc. Makes it roughly 8-10 GB per game.

  • Spacey (unregistered) in reply to PSWorx

    A-Star search algorithm is probably the way to go in that case. You could use the metropolis distance from the current cell to the destination as the guiding heuristic. Mark off each cell as you pass it so that you don't revisit anything and this will fairly quickly on grids of 1000x1000 or more on today's hardware.

  • Spacey (unregistered) in reply to PSWorx
    PSWorx:
    Reminds me of a depth search based "maze solver" I wrote as a hobby project when I was still in school... or at least attempted to write...

    The program, like every good maze solver accepted a two dimensional array of "cells" as an input (where each cell was either accessible or an obstacle) and was to return the shortest possible route from the start to the destination cell.

    The program with its really cool recursive depth search algorithm I had proudly coded in VB at that time worked fine as long as it just had to find a path to the target. However, when I tried to find the shortest possible one, it kept mysteriously freezing on some mazes, especially on those with few obstacles...

    I tried and tried but no matter what, I could not find the error... until i realized that the program actually ran as expected, just that iterating through every single possible path on an almost blank 100x100 cells grid might just maybe not be the best idea...

    (For some reason, it didn't paste the quoted text in my last post.)

    A-Star search algorithm is probably the way to go in that case. You could use the metropolis distance from the current cell to the destination as the guiding heuristic. Mark off each cell as you pass it so that you don't revisit anything and this will fairly quickly on grids of 1000x1000 or more on today's hardware.

  • nobody (unregistered) in reply to Alex
    Alex:
    Carnildo:
    Writable permanent storage? What luxury! Back when I started programming, the only "permanent storage" I had was a spiral-bound notebook sitting next to the computer.

    I was about to whip out my dad's punch cards, but I think the spiral notebook would still win. :D

    captcha: xevious (another blast from the past - at one point my favorite arcade game)

    I have a PDP-8e but no teletype, but I do have some spare core boards, and they're nonvolatile. So swapping programs would mean swapping boards. But with no I/O other than the lights and switches, it isn't worth writing much.

    But that is better than when my Commodore Pet tape drive died leaving all the tapes unreadable.

  • samael (cs)

    On the topic of game disk space...

    Vanguard: Saga of Heroes - ~17GB installation

  • Mr Steve (unregistered) in reply to XIU
    XIU:
    Got 200GB in this pc, 1.38TB in my nas next to me, uhm, 320GB external and another 250GB external.

    Got 40GB for music, 1TB on anime and other tv series, 200GB for xvid movies and then too much backups I'll never use :)

    ooooh i love it when you talk dirty

  • kirchhoff (cs) in reply to RON
    RON:
    Should have used a heuristic breadth-first search to weight cells based on if they are moving closer to your destination or not. It's not a perfect solution, but it returns the shortest route for 99% of all test cases.

    You mean: Should have used a dynamic programming algorithm. For example, you represent the grid using integers, initializing each open square to zero (and the impasses marked by MAX_INT-1). You breadth-first walk with a counter at zero. You increment the counter with each "foward" step you take, and store your last position in a stack. You only consider adjacent square less than the value of your counter, and you leave the value of your counter on squares you pass over.

    If you run out of forward steps, you set a flag and backtrack. Read out the old step values from the stack and overwrite your counter with them. After each unwind, try to take a forward step again. If you can't, keep unwinding.

    If you unwind all the way, there is no solution.

  • Grovesy (unregistered)

    Ahh CTOS great OS, I belive it was finally written off by Unisys a few years back... In it's later days it was poroted the the PII architecture and could coexist with NT4... The last legacy of Convergent Technologies

    sorry digressing :)

Leave a comment on “Emulating the 8080”

Log In or post as a guest

Replying to comment #:

« Return to Article