Prev NEXT  

Advertisement

How Dreamcast Works

Dreamcast Processor

Inside a Dreamcast console is the RISC processor, similar to that in other video game systems.
Inside a Dreamcast console is the RISC processor, similar to that in other video game systems.
HowStuffWorks.com

Like the N64 and the PlayStation, the CPU in the Dreamcast is a RISC processor. RISC stands for reduced instruction set computer, and means that the instructions and computations performed by the processor are simpler and fewer. Also, RISC chips are superscalar -- they can perform multiple instructions simultaneously. This combination of capabilities, performing more instructions simultaneously and completing each instruction faster because it is simpler, allows the CPU to perform better than many chips with a much faster clock speed.

To lower production costs, the graphics processor is combined with circuitry to control the system through a single application specific integrated circuit (ASIC). Simply put, this means that a custom chip is created to manage all of the necessary components that would normally be handled by separate chips. The Dreamcast sound processor is another ASIC; it combines a 45 MHz ARM7 CPU and a Yamaha digital signal processor (DSP). The ARM7 is a 32-bit RISC chip that handles all processing of the compressed adaptive differential pulse code modulation (ADPCM) audio information in real time. ADPCM is used to sample analog information, compress it at a ratio of 4:1 and store it in digital format.

Advertisement

The Dreamcast has several hardware effects that are handled by the PowerVR chip. They include alpha blending, perspective correction and mip mapping.

Alpha blending uses the alpha channel to add transparency effects to an object. This is a special graphics mode used by digital video, animation and video games to achieve certain looks. Essentially, 24 bits are used to define the red, green and blue amounts, 8 bits each, needed to create a specific color. Another 8 bits are used to create a gray-scale mask that acts as a separate layer for representing levels of object transparency. How transparent an object will be is determined by how dark the gray in the alpha channel is. By making an area of the mask dark gray, you can make an object appear to be very transparent; by making it light gray, you can create special fog or water effects.

Mip mapping is a cool process. It is a form of texture mapping in which different sizes of each texture map are made. In essence, the processor replaces the appearance of an object with a more detailed image as you move closer to the object in the game. Let's take a look at how Dreamcast uses these maps in trilinear mip mapping:

  1. The system calculates the distance from your viewpoint to an object in the game.
  2. The system loads the texture maps for the object. Our three maps will be 64x64 (large), 32x32 (medium), and 8x8 (small).
  3. The system determines the exact size that the image map needs to be. Let's say 16x16 for our example here.
  4. Based on the size, it decides which two texture maps to use. For our example, it will choose the medium and small texture maps.
  5. It will then interpolate (average) between the two texture maps, creating a custom texture map that is 16x16, which it then applies it to the object.

When a game is put in the console, the following happens:

  • You turn the power on.
  • The disc spins up to speed.
  • While the disc is spinning up, the console loads portions of the operating system from ROM into RAM.
  • The game initialization sequence is loaded into RAM.
  • You interact with the game via the controller.
  • As each specific part of the game is requested, the application code and hardware-render geometry are loaded into RAM, while the video and audio portions are usually streamed directly from the CD.
  • The PowerVR chip coordinates everything. In addition to processing graphics, it receives the input from the controller, pulls the data from RAM, sends it to the CPU and directs the use of the audio processor.
  • You are finally beaten by the game and turn it off.

The Dreamcast is the first console that has a built-in 56 Kbps modem. It was added to enable online play over a phone line, allowing users to play games against each other across long distances. In addition to the built-in modem, Sega is working on a cable or DSL external modem. Broadband networks are being developed that will take advantage of such a modem and enable fast online games for the Dreamcast.

JavaScript is what is called a Client-side Scripting Language. That means that it is a computer programming language that runs inside an Internet browser (a browser is also known as a Web client because it connects to a Web server to download pages).

The way JavaScript works is interesting. Inside a normal Web page you place some JavaScript code (See How Web Pages Work for details on Web pages). When the browser loads the page, the browser has a built-in interpreter that reads the JavaScript code it finds in the page and runs it.

Web page designers use JavaScript in many different ways. One of the most common is to do field validation in a form. Many Web sites gather information from users in online forms, and JavaScript can help validate entries. For example, the programmer might validate that a person's age entered into a form falls between 1 and 120.

Another way that web page designers use JavaScript is to create calculators. Here are several examples:

To give you an example of an extremely simple JavaScript calculator, the HTML below shows you how to create a Fahrenheit to Celsius converter using JavaScript:

    
    
Fahrenheit to Celsius Converter Enter a temperature in degrees F:
Click this button to calculate the temperature
in degrees C:
Temperature in degrees C is:

If you have read How Web Pages Work and How CGI Scripts Work, then a good portion of this HTML will be familiar. This is the basic structure of any web page:

<html>
<head>
</head>
<body>
</body>
</html>

There is one piece of JavaScript code in the header that is the function to calculate the conversion from Fahrenheit to Celsius:

<head>
<script>
<!-- hide this script from old browsers
function temp(form)
{
  var f = parseFloat(form.DegF.value, 10);
  var c = 0;
  c = (f - 32.0) * 5.0 / 9.0;
  form.DegC.value = c;
}
<!-- done hiding from old browsers -->
</script>
</head>

The function is called temp. It contains JavaScript code to calculate a Celsius temperature.

In the body of the page there is a typical form:

<FORM>
<h2>Fahrenheit to Celsius Converter</h2>
Enter a temperature in degrees F: 
<INPUT NAME="DegF" VALUE="0" MAXLENGTH="15" SIZE=15>
<p>
Click this button to calculate the temperature 
in degrees C:
<INPUT NAME="calc" VALUE="Calculate" TYPE=BUTTON 
onClick=temp(this.form)>
<p>
Temperature in degrees C is: 
<INPUT NAME="DegC" READONLY SIZE=15>
</FORM>

This line is key:

<INPUT NAME="calc" VALUE="Calculate" TYPE=BUTTON 
onClick=temp(this.form)>

This is a normal button control. When the user clicks it, it calls the function in the head of the page because of the onClick notation.

As programming languages go, JavaScript is average difficulty. It is not especially hard to learn how to use it if you already understand programming, but if you are new to programming it is certainly not an easy language to start with. What you can do, however, is modify this sample code and expand it to create other calculators.


Here are several interesting links:

Advertisement

Advertisement

Advertisement

Advertisement

Advertisement

Advertisement


Advertisement


Recommended

Advertisement

Advertisement