nsane.forums Posted November 29, 2010 Share Posted November 29, 2010 JavaScript emulator can run 1989-era Game Boy games in a Web browser.One consequence of the steady increase in computer power is that newer machines can emulate the behavior of older ones, with software running fast enough to simulate operations that formerly required hardware.Now, in an illustration of just how far Web programming has come, one coder has begun a project called jsGB that lets a Web browser emulate Nintendo's original Game Boy handheld game console.Programmer Imran Nazar has begun work to emulate the Game Boy in JavaScript, the Web programming language whose performance has become a top priority of browser makers today. JavaScript is used for everything from pop-up dialog boxes on Facebook to the Google Docs online productivity applications, but Nazar is busy adding 1989-era Tetris and similar games to the list."New JavaScript engines such as [Firefox 4's JaegerMonkey] mean much higher speeds for the core processing, more than enough to cover emulation of a basic system," Nazar said in a blog post on Mozilla's gaming site. In addition, HTML5 now offers the Canvas element for easily controlling a two-dimensional graphical display, he said."Why write a console emulator? It's a good way to learn the ins and outs of a particular console, and excellent for bringing together the lowest and highest levels of development," Nazar said. "And why build a console emulator in the browser, using JavaScript and HTML5? I say: why not?"The work spotlights the growing capability of Web-based programs. JavaScript performance increases, though hard to measure, are opening new horizons for Web programmers. The cloud computing philosophy, which can let people get access to information and use online tools wherever they have a browser, is gaining credibility. New Web standards and browser features such as offline storage, advanced graphics, and hardware acceleration improve what browsers can do.It's not all easy going, though. Perhaps the most advanced embodiment of the Web-app future, Google's Chrome OS, is stumbling on its way to market. Its troubles aside, however, it's clear more and more gets done in a browser window.Nazar isn't the first to tackle the subject. Another JavaScript Game Boy emulator from 2009 is available on the Web, though like Nazar's so far, it's silent.But Nazar has been chronicling his Game Boy project at his Web site. It's interesting as much for the gory details of how the Game Boy works as it is for how Nazar brings it to JavaScript.The handheld computer, introduced in 1989, didn't have much horsepower. The Game Boy came with a modified Zilog Z80 processor, an 8-bit model that could only address a 16-bit memory space of 65,536 bytes--less than a thousandth of what typical computers have today.Its screen was simple, too. The display measured just 160x144 pixels, each able to display black, dark gray, light gray, or white. The entire thing fits easily into a patch of "frame buffer" memory controlled through the HTML Canvas element.Nazar also has figured out how to simulate the input controls--a relatively simple layout with a four-way rocker switch and four control buttons. View: Original Article Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.