Prev NEXT  

Advertisement

How Dreamcast Works

Dreamcast Controller

Inside a Dreamcast controller
Inside a Dreamcast controller

As it is with other systems, the controller is the primary user interface for the Dreamcast. The standard Dreamcast controller has 11 buttons plus an analog joystick. The buttons include:

  • four buttons arranged as a directional pad on the top left
  • Start button in the top middle
  • four action buttons on the top right
  • one analog trigger on the front left
  • one analog trigger on the front right
  • analog joystick on the top left

Although each button can be configured to perform a specific and distinctive action, all of the buttons, except for the two analog triggers and joystick, work on the same principle. In essence, each button is a switch that completes a circuit whenever it is pressed. A small metal disk beneath the button is pushed into contact with two strips of conductive material on the circuit board inside the controller. While the metal disk is in contact, it conducts electricity between the two strips. The controller senses that the circuit is closed and sends that data to the Dreamcast. The CPU compares that data with the instructions in the game software for that button, and triggers the appropriate response. There is also a metal disk under each arm of the directional pad. If you're playing a game in which pushing down on the directional pad causes the character to crouch, a similar string of connections is made from the time you push down on the pad to when the character crouches.

Advertisement

This content is not compatible on this device.

The analog joystick and triggers work in a completely different way from the buttons described above. The triggers each have a tiny magnet attached to the end of the trigger arm. When the trigger is depressed, the magnet is pushed toward a sensor mounted on the controller's circuit board. Through the process of induction, the magnet creates resistance to the current passing through the sensor. On the bottom of the magnet is a layer of foam padding. Pushing harder on the trigger compresses the padding, which brings the magnet closer to the sensor. The closer the magnet is to the sensor, the more resistance is induced. This variable resistance makes the triggers pressure-sensitive!

The joystick also uses a magnet, along with four small sensors. The sensors are arranged like a compass, with one at each of the cardinal points (north, south, east, west). The base of the joystick is shaped like a ball, with tiny spokes radiating out. The ball sits in a socket above the sensors. Spikes on the socket fit between the spokes on the ball. This allows for an extraordinary amount of movement without letting the joystick twist out of alignment with the sensors. As the joystick is moved, the magnet in the base moves closer to one or two of the sensors, and farther from the others. The system monitors the changes in induction caused by the magnet's movement to calculate the position of the joystick.

This content is not compatible on this device.

The controller has two expansion ports where memory cards, tremor packs, Visual Memory System (VMS) devices and other system additions can be inserted.

A popular option is the tremor pack, which provides force feedback. This feature provides a tactile stimulation to certain actions in a game. For example, in a racing game, you might feel a jarring vibration as your car slams into the wall. Force feedback is actually accomplished through the use of a very common device, a simple electric motor. The shaft of the motor holds an unbalanced weight. When power is supplied to the motor, it spins the weight. Because the weight is unbalanced, the motor tries to wobble. But since the motor is securely mounted inside the tremor pack, the wobble translates into a shuddering vibration of the controller itself.

While standard memory cards can be used with the Dreamcast, the VMS units are unique to this console. The VMS is actually a tiny Personal Digital Assistant (PDA) that fits into the upper expansion port of the controller.

About the size of a business card, each VMS unit contains:

  • 8-bit Hitachi CPU
  • 128 K memory (Flash RAM)
  • Monochrome LCD panel, 48 pixels wide by 32 pixels high
  • Two button (watch) batteries, with auto-off function, to provide power
  • One-channel sound

When the VMS is inserted into a Dreamcast controller, its LCD can be used to perform some unique functions. For example, in a football game, you can select plays without your opponent seeing what they are. In addition to serving as a memory card for the Dreamcast, the VMS can be used as a stand alone device. Small games, as well as traditional PDA functions like a calendar and phone directory, can be downloaded to the VMS and taken with you.

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