More Ramblings from a Los Angeles Programmer

June 30, 2007

Combination Java NES/C64 Emulator source release

Filed under: coding, technology — Tags: — Josh DeWald @ 10:26 pm

I finally bit the bullet and “packaged” up my Java-based NES and Commodore 64 Emulator.

The delay has been for multiple reasons:

  • Laziness – I knew that I couldn’t just tar it up and send it out, but needed to do some cleanup, take out some files, etc. I had some time on my hands, so figured why not.
  • Fear – I don’t think it’s just me, but it’s kind of scary to let other people see the code you’ve written when you know that it’s not perfect and poetic and all that. However, it does in fact work so I figured that was a plus. I don’t believe the code is monumentally horendous either. There is a diagram of of the architecture available on my wiki.
  • Potential Uselessness – There are a lot of other emulators out there at have been in development for a lot longer and are open source. I did this purely out of curiosity to see if I could, so don’t download this expecting to pop in any ROM and go with it. Some work, many don’t. There’s also no sound. Nestopia is the emulator I used when I wanted to see how a game was supposed to look/work. I don’t know if it’s open source or not however.

I’ve finally overcome those and just decided to get it out there.

I’ve decided on the BSD software license. What this means is that you can take this and basically do whatever you want with it, but if you release something based on it, you have to include my license with it. I initially planned on going with GPL, but it felt too restrictive in this case. In my dream world, people will download this, fix bugs and contribute them back. That would also be highly unexpected.

It is my hope that the architecture is simple enough that a person could at least use this to see how they might go about creating an emulator (especially 6502/6510-based ones such as the Apple II). It would suck if it serves as a way to _not_ make an emulator, but I can accept that too. It’s fairly object oriented in structure, but in my testing (I modified it so that the instructions were executed as methods rather than objects) this did not prove to be a major performance issue. That said, it just barely runs at full speed on my machine and it doesn’t have any timing code in it. So clearly there are some inefficiencies in it.

As I’ve mentioned previously, the greatest moment of development (which also represented the end for the most part) was when my wife actually sat and played Super Mario Brothers 3 for 4 hours straight on it. The idea that kept me going after I had it “working” was that for her, SMB3 was what it meant to have a Nintendo. Unfortunately, at that time I didn’t have the gamepad adapter so she had to use the keyboard. By the time I got game controller stuff working, she and I were basically over it. Such is life.

Anyhow, you can download it here.

It is also available on github now: https://github.com/jdewald/qjnes

Note that to use it easily, you should have Ant installed, but it’s not required. Please put any comments here if you do download it and have questions about usage, why it sucks, why it’s cool, or literally anything at all.

June 28, 2007

Don’t take my word for it

Filed under: daily life — Josh DeWald @ 10:11 am

Those who know me may have noticed that I tend not to take someone’s word for something if I find it improbable (or even probably for that matter) that a statement is true. I like to research it in some way. Some may take offense. The reason is do this is that I’ve noticed that other people do tend to simply accept what somebody says without finding out if it’s true themselves. Now clearly this can be taken too far, there are things that simply do not matter whether or not they are true or not, they are simply interesting. But sometimes people change the way they live their life because of something they’ve heard that isn’t true. Again, if this is ok with you then that’s fine, but it’s not for me.

  • Red Bull is not made out of bull testicles (the chemical in question is actually a synthetic which is a copy of something that’s in bull bile!). Even if it were, so what? It’s an extracted chemical. Salt is made out of sodium and chlorine, both of which are rather deadly. You combine ions of them and you have a tasty seasoning. Red Bull (and all energy drinks) is basically sugar water with the equivalent caffeine of a cup of coffee. Yes, they have other ingredients that have sometimes been shown to aid in concentration, etc but they are in very small quantities. If you like Red Bull, drink it. If you don’t, don’t.
  • As far as anybody can tell, nobody has ever put a razor blade into an apple.
  • It used to be true that movies and books were totally false when they had somebody getting a virus without even opening or saving an email. Outlook has made this not true because it will execute anything that even *looks* like it could be executable. So, yes, you should be careful about your email. If you don’t know the person, you don’t need to see what cool pics they’ve sent you.
  • Mountain Dew will not make your testicles shrink (nor will anything with Yellow 5). I think that one was dispelled long ago, but just wanted to put it out there.
  • The placebo affect is “real” in the sense that people can in fact feel better if they are under the impression that they are receiving medication. My personal belief is this is why homeopathic stuff “works” (if it ever does work). Please don’t think that the non-existent traces of whatever chemical are actually *doing* anything. My understanding of chemistry and biology (but I could be very very wrong, research it) is that many chemicals/medicines basically act like a catalyst to make your brain/body release/block another chemical from releasing (such as one that triggers a pain receptor or euphoria or something). So if you you can convince yourself that you are getting this chemical, then your body may itself release it’s own that actually serve to do the work.

I would highly recommend that people read Snopes (about.com also has a good Urban Legends section) anytime they hear or read something that seems improbable or that they would make a change to their way of life (or tell to somebody, who then changes their life) as a result of. You can make the argument that in reading Snopes, you’re still just “believing” somebody else. This is true in a sense, yes. But they show evidence both when they find an item to be true or false in that they try to find the original source of something. If you’d prefer to take my claim of evidence to the limits, then there is no way to please you.

Again, you can choose to believe something if you want to. I suppose it’s even fine if you’re going to keep it to yourself. But you’re not, you’ll probably turn to somebody else with “You know what I heard… ” or, worse yet, you’ll send an email to your entire contact list. But you’re doing a disservice to somebody else if you pass on this information and they then act on it. They may think that you’re someone who is trustworthy and always checks the facts and so take your word for it. Let them be that way, but you shouldn’t.

June 16, 2007

Did anybody predict computers accurately?

Filed under: books, technology — Josh DeWald @ 10:36 am

I’m reading a series of short stories by Isaac Asimov (Earth is Room Enough) written in 50s and one of the things that struck me is how badly the state of computing technology was predicted. It’s not just this book, it’s virtually any that I can think of from the 40s and 50s. They mostly assume that video phones will be completely normal, and of course “internal combustion ground cars” will be long gone by early in the 21st century. Going to Mars? Sure, $20.50 please, Customs is over there. Naturally we’re on biometric identification (how would we not be!). Computers are infinitely smart and are the size of an office building (woops!) and communicate with what is basically fancy punch cards (woops again). They’re made out of foil so they are futuristic.

Video calling is slowly becoming popular (it’s been possible since the invention of television basically). No doubt we will be off internal combustion within the next 100 years or so, but I doubt we’ll be flying by then. Biometric security is actually becoming fairly mainstream. Regular trips to Mars (or even the Moon) are probably at least 50 to 100 years off as well.

So all ok predictions.

But you can fit a computer that is multiple orders of magnitude more powerful than a computer from the 50s onto a credit card. If a computer is the size of an office building, it’s really thousands and thousands of individual machines clustered together doing some ridiculously complex (but specialized!) calculation. Computers are nowhere near being infinitely intelligent generic thinking beings. And we’re certainly not communicating via punch-card (though Assembler isn’t too far above, but it’s still entered directly into the computer). Not that today’s programming languages allow us to simply “say” what we want, they are at least unambiguous (you don’t actually want normal human language to be used to tell a system what to do, it’s so chock full of idiom and ambiguity) for the most part. And computer displays are high resolution and capable of displaying interconnected graphics and text in a way that someone from the 40s and 50s couldn’t make a leap to.

Does anybody have any examples of old (pre-60s) science fiction stories that have some inkling of where computers would be today?

I’d actually love to see other examples people have of how computers were perceived in various eras in both science and science fiction. Or maybe collection already exists and someone can point me there.

June 2, 2007

Playing around with RSS

Filed under: coding, meta, technology — Josh DeWald @ 7:31 pm

I finally got around to doing some non-work coding after going to Google Developer Day 2007 (in London). One of the big themes was ‘mashups’, which have become pretty common. Anyhow, I’ve never been much of a web developer, but I’m a huge user of Google Reader and probably add at least 1 feed a day. Anyhow, while I was there I remembered that I’ve been wanting to “classify” the data in them so I can group them together, maybe pull some trends out.

I’m not really anywhere near that yet, but I’ve got a “feed analysis” toy up on my site. When you’re there you’ll quickly see how much I’m *not* a web developer. You can just enter the URL to an RSS feed (by default it’s just the feed from my blog) and it’ll try to extract the “interesting” phrases and sentences from it. I’m not quite sure where I want to go with this, but I hope to keep tinkering with it enough that it becomes something  useful for me. I believe there are already similar tools out there, but it’s still fun to play with.

Would love to hear from anybody on what types of features you’re looking for in terms of feed grouping/trending. Right now it can really only serve as a sort of ‘auto-tagging’ tool. I’m interested in document classification, but am fairly new to it, so as my naivety goes down, so should the tool.

Create a free website or blog at WordPress.com.