Search This Blog

Saturday, April 23, 2011

Part 6: Games and Multimedia

Chapter 20: How Multimedia Sound Works

How Sound Cards Work
How MIDI and FM Synthesis Work

  • FM synthesis not as realistic as a MIDI wavetable

How Digital Sound Tricks Your Ear

  • AC3=Dolby Digital 5.1 5 speakers + subwoofer, 6 channel sound (5 @ 3Hz-20kHz, 1 @3Hz-120Hz low frequency effects channel)
MP3 and Digital Audio Compression

  • Just Noticable Difference (JND)
How 3D Audio Works

  • Interaural intensity differences, interaural time difference, pinnae positional clues
How iPods Dish Out Media To Go

Chapter 21: How Multimedia Video Works
How the Digital Camcorder Captures Future Memories
How A Digital Camera Squeezes Video Down to Size

  • MPEG Motion Pictures Expert Group
  • Standard TV 4:3 720w x 576h, 30 fps
How TiVO Unites TVs and Computers

Chapter 22: How Game Hardware Puts You in the Action
How Video Cards Break the Game Barrier

  • ATI crossfire
  • NVidia GPU Scalable link interface
  • Scissors rendering and supertiling
  • Shaders, double anti-aliasing
How a Joystick Puts You at the Controls

  • Potentiometer

Thursday, April 14, 2011

Part 6: Games and Multimedia

Chapter 20: How Multimedia Sound Works
How Sound Cards Work
How MIDI and FM Synthesis Work: FM synthesis not as realistic sound production as a MIDI wave table
How Digital Sound Tricks Your Ear: AC3=Dolby Digital 5.1 – 6 channel sound (5 speakers @ 3Hz-20KHz; 1 non-directional subwoofer [low frequency effect channel] @ 3Hz-120Hz)
MP3 and Digital Audio Compression: Just Noticeable Difference (JND)
How 3D Audio Works: Interaural intensity difference, interaural time difference, pinnae positional clues
How iPods Dish Out Media to Go

Chapter 21: How Multimedia Video Works
How the Digital Camcorder Captures Future Memories
How a Digital Camera Squeezes Video Down to Size: MPEG=Motion Picture Expert Group; Standard TV, 4:3 aspect ratio, 720w x 576 h, 30 fps.
How TIVO Unites TVs and Computers

Chapter 22: How Game Hardware Puts You in the Action
How Video Cards Break the Game Barrier: ATI “CrossFire” vs. NVIDIA GPU scalable link interface; scissors rendering, supertiling, shaders, double anti-aliasing.
How a Joystick Puts You at the Controls: potentiometer
How Force Feedback Joysticks Work
How Game Controllers Put Play at Your Fingertips

Chapter 23: How Games Create 3D Worlds
How Computers Plot a 3D World: PC games pinpoint 47 billion dots per second; tessellation, redraw 15-20 times per second, z-sorting, z-buffering, hidden view
How 3D Graphics Get Dressed: texture maps, texels, MIP Mapping (multim in parum), perspective correction, alpha blending, stippling
How Shaders Control the World: shape, color, shading (value), bilinear filtering, trilinear filtering, Gouraud shading, ray tracing, vertex shading (including displacement), particle shaders (fire effect)
How Games Create New Worlds: MMORPG

Part 5: Input/Output Devices continued…

Chapter 15: How Scanners Capture Words and Images
Photodiodes were created in the 1970s.
How Computers See: 
B used for p-type Si, Ph used for n-type Si.
CMOS photodiode array has an amplifier for each diode.
How a Flatbead Scanner Works

Chapter 16: How Computers Use Power
How the Power Supply Works: emi filter scrubs power, transistors increase frequency, transformers step down voltage to 3.3/5V (CPU, DIMM, PCI, GPU, etc.) and 12V (disk drives), diodes rectify the power to DC, input and output capacitors store electricity, heat sink and fan cool hot components, power is filtered before use.
How a UPS Keeps Your Computer Going
How Surge Protectors Work: power sag, power surge, toroidal choke coil, electrical noise, shunt mode, metal-oxide varistor (MOV)

Chapter 17: How Serial Ports Triumph
Analog and Digital Converters
How Bandwidth Moves Your Data: cache data, reduced latency, prefetch data, carrier waves, modulator waves, bandwidth
How Parallel Ports Work: 2.5 Mbps transfer rate
How Serial Ports Work: 100 Kbps transfer rate
How the Universal Serial Bus Works: high speed (D+) = 12 Mbps, slower (D-) = 1.5 Mbps, USB2(?) = 480 Mbps. Data priorities: isochronous/RT (highest), interrupt transfers (second), bulk transfers (when time permits)
How Serial ATA Overtakes EIDE: EIDE was never explained?! Discussion about SCSI and SATA

Chapter 18: How a Computer Displays Works
Important concepts: Ben Day dots, Pixel = Picture Element
How a CRT Paints the Screen: surface conduction electron emitter display (SED) is called out as the front-running technology.
How an LCD Screen Works
How Plasma Displays Glow
How Digital Light Processing Works

Chapter 19: How Digital Photography Works
How Digital Cameras Capture Light
How Autofocus Lenses Work
How Auto Exposure Works

Part 5: Input/Output Devices

Distance plays a role in modern electrical devices. EM noise is also an important consideration leading to sometimes twice as many wires as necessary to transmit a signal because the extra wires are used to dampen noise. Since the 1970s Xerox PARC has been studying how people communication information.

Chapter 14: How Data Gets Into Your PC
Although the mouse never replaced the keyboard, the pointer (mouse, eraserhead, trackpad, trackball) supplements it almost universally.
Keyboard and Scan Codes
Pressing a key changes current and a microprocessor detects the change: increased when the key is pressed, decreased when it is released. The scan for changes repeats several hundred times per second, but only acts on signals that are confirmed in 2+ concurrent scans. The microprocessor generates a number called a scan code associated with the key’s circuit. Each key has two codes: one for depressed, one for released. These data are stored in the keyboard buffer and loaded into a port where they are read by BIOS which sends code to delete them from the buffer once they have been received. Two bytes track when shift or special toggle keys have been depressed, so that the code that follows can be augmented to reflect the combination of keys strokes. There are two ways to construct a keyboard: capacitance (springy, clicky keys) or hard contact (rubber dome collapses to allow contact between two metal plates).
How Mice Obey Your Every Gesture
The rolling of the mouse ball moves two rollers that are positioned at 90 degrees relative to one another to capture movement on the X and Y axis. Rollers are attached to an encoder which has a series metal contact points that records distance based on the number of contact points recorded. Signals are sent to the PC through the “tail” (cable) and the cursor moves accordingly onscreen. The click buttons send information about the button clicked and the number of clicks.
The optical mouse uses an LED or laser to light the surface on which the mouse is placed.  A small camera inside the mouse scans the surface at 100 fps and sends the results to the DSP which calculates movement based on the change in the relative position of identifiable structures.
How a Touchpad Works
How a Pointing Stick Works
How Speech Recognition Works

Monday, April 4, 2011

Part 4: Data Storage continued...

Chapter 13: How PCs Use Light to Remember Data
Magnetic recording will eventually be supplanted by optical data storage. CDs and DVDs use optical technology that yields tremendous increases in storage capacity over magnetic media due to the ability to focus a laser beam to a point smaller than a pinpoint. DVD or digital versatile discs use a two level storage system that hold 8.6 GB of data versus the 700 MB of a CDROM. This again pales in comparison to the storage capacity of Blu-Ray (23-27 GB per layer) and HD-DVD (15 GB per layer), both technologies can hold multiple layers of data. Holograms can expand the capacity of PC storage into the scale of terabytes.

How a CD-ROM Drive Works
  • A motor constantly varies the spin rate of the CDROM so that the portion of the disc immediately below the detector is always spinning at the same speed (constant linear velocity). This solves the issue of angular velocity that requires magnetic media to have larger sectors on the outside of the disc than at the inside.
    • The CDROM sectors are arranged in a spiral that is divided into equal-sized sectors arranged in a single track.
  • The laser penetrates the plastic protective layer and reads the surface of the disc by recognizing lands (flat areas) and pits (depressions in the surface area) which record the 1s and 0s.
    • Light that strikes a pit is scattered, but light that strikes a land is reflected back at the detector and through the use of a prism is directed to a light-sensing diode that generates a small voltage. By matching the voltage spikes against a timing circuit a stream of 1s and 0s are generated.
How a Recordable CD-ROM (CD-R) Works
  • The disc is build from a thick substrate of polycarbonate plastic, a layer of dye (usually green), a gold layer, lacquer protective layer, and a scratch-resistant polymer layer (sometimes topped with a silk-screened label).
  • The laser’s write head follows a spiral groove cut into the plastic layer called an atip (absolute timing in pregroove). The frequency of the waves varies continuously and by reading the frequency of the waves, the CD drive can calculate where the head is located in relation to the surface of the disc. The drive uses the atip information to control the speed of the motor turning the disc.
  • The software uses to make a CD recording sends the data in a specific format which automatically corrects errors and creates a table of contents. The drive records information by sending a high-powered pulse of the laser beam at 780nm wavelength.
  • The dye layer is designed to absorb light at that specific frequency which creates a mark in one of three ways: the dye may be bleached, the polycarbonate layer may be distorted, or the dye layer might form a bubble. The resulting distortion (stripe) along the spiral track.
    • The lengths of the stripes vary as do the spaces which encodes a specially compressed data stream and error checking. The change in the dye is permanent, making it a WORM medium.
How a Double-Layer DVD Works
  • The DVD is built with polycarbonate plastic, then L0 the first of two data layers, then a layer of clear plastic separates L0 from L1 which is a second layer for holding data, L1 is capped with another polycarbonate layer thicker than the first (this bottom layer gives the entire disc stability).
  • Two major differences from writing and reading CD-Rs:
    • The DVD drive uses a red laser with a shorter wavelength than the IR laser used with CDs to read and write discs. Shorter wavelength = narrower beam = smaller lands and pit = tighter spiral. This alone creates the difference in storage capacity 700MB versus 4.7 GB
    • The second layer of reflective metal or dye doubles the capacity of a DVD to 8.5 GB. The same laser is used to write or read the second layer by changing the focal length of the  laser to pass harmlessly through L0 to strike L1.
  • The potential capacity of a DVD can again be doubled by applying the same materials to the reverse side of a DVD thereby doubling the capacity to 17 GB. However, these are rare and likely to become rarer with the introduction of HD-DVD and Blu-Ray technologies.
  • The spiral tracks of data recorded on a double layer DVD coil in different directions. Starting on the center of the disc the laser head follows the first spiral track to the outer edge of the disc and then continues into the second spiral moving back in toward the center. This design prevents delays in the flow of data.
How DVDs Play the Blues
  • Blu-Ray and HD-DVD, two competing and incompatible designs use an ultra-thin blue laser beam but Blu-Ray holds 26GB while HD-DVD holds 15GB.
  • The common DVD uses a red laser at 650nm, a small difference that allows for seven times more data storage. The coils of the tracks are 0.7 microns apart and the lands and pits are smaller. (CD is 790nm and coils are 1.6 micron apart).
  • HD-DVD and Blu-Ray uses a blue-purple laser that is 405nm wide, with coils of tracks that are 0.3-0.4 microns apart (about ¼ the distance that separates common circuit traces in microprocessors)
    • Blu-Ray has a thinner protective plastic coating 0.1mm thick which allows for a smaller distance between track coils (0.32 microns), and hence a greater storage capacity.
    • HD-DVD uses 12:8 demodulation which converts each group of 12 optical bits into 8 data bits. It also users a thicker protective layer (0.6mm) that provides more protection but forces the drive to use wider lands and pits. The resulting distance between track coils is 0.4 microns. Together this accounts for the difference in storage capacity.

Sunday, April 3, 2011

Part 4: Data Storage continued...


Chapter 11: How Disk Drives Save Information

The capacity, size and performance of disk drives have changed dramatically since their introduction as standard equipment on the first IBM XT in the 1980s.

How a Floppy Drive Stores a Little  
  • ·         When a 3.5” disk is pushed into the drive levers pull back the shutter to expose the cookie
  • ·         Two read/write heads move until the barely touch the cookie on either side and generate magnetic pulses to change the polarity of metallic particles in the disk’s coating, a motor spins a shaft which rotate the disk from the hub while a stepper motor positions the head.
  • ·         The drive’s circuit board receives signals that control the head, if a write command is received an LED/sensor combination check to make sure the write protect tab is not open (meaning the disk is protected) before commencing the write
How a Hard Drive Stores a Lot
  • ·         A sealed metal housing protects the drive from dust which could cause a crash due to tolerances less than the thickness of a human hair between the read/write heads and the disk.
  • ·         Commands are received from BIOS through the disk controller which converts generic commands into ones that are specific to that drive.
  • ·         A spindle spins as many as eight coated platters.
  • ·         When reading or writing the OS first checks a file allocation table or master file table to determine the physical location(s) of the desired file or to find an available cluster for writing and passes this information on to the drive’s built-in disk controller which in turn instructs the head actuator on how to move the read/write arms to align the heads to the correct cluster. If writing it records the location of the file’s clusters in the FAT or MFT.
  • ·         Typically there is a gap of only 2/10e6 inch between the heads and the disk surface.
How a Mirrored Drive Array Protects Files
  • ·         RAID – redundant array of independent (or inexpensive) drives can speed performance and provide second-to-second protection against disk crash depending on how the array is configured.
  • ·         When data integrity is more important than speed and there are only two hard drives, the best solution is a mirrored disk drive (or RAID 1). The RAID controller replaces an ordinary disk controller with software to handle arrays, writes every file to two or more drives simultaneously. In case of a read error caused by surface defect or crash, the controller reads the intact version of the file from an undamaged drive.
  • ·         To read a file from a mirrored array, the controller reads alternate file clusters from each of the drives and pieces them together for delivery. This makes reads faster proportionate the the number of drives in the array (2 = 1/2, 3 = 1/3 the read time).
How Striped Drive Array Boosts Performance
  • ·         For faster reads and writes a RAID is set up as a striped array (RAID 0) of two or more hard disks. The RAID controller divided files into several pieces and writes different sections to different drives at the same time. To read the controller simultaneously pulls each part of the file from the different drives on which it’s stored then pieces the parts of the file together in correct order when it writes them to RAM.
  • ·         In a striped array with parity (RAID 4), the controller writes striped data to all but one of the drives which is used for error checking.  The controller’s array software performs a Boolean XOR operation on the data written to the drives and writes the result (a parity bit) to the remaining drive. An XOR operation results in a 0 bit whenever two like bits are compared and a 1 bit whenever two dissimilar bits are compared. If more than three drives are in the array, the first two are XORed and the result is XORed with the next drive, etc., until all the data drives have been XORed and the final result is written to the parity drive.  Later, if one of the files is damaged or a drive crashes, the controller can deduce whether the missing bits are 1s or 0s. This reverse XOR can also be used to repair minor media defect damage on the fly.

Chapter 12: How Little Things Make Drives Faster and Bigger
Scientific progress is incremental, most advances are made by plodding toward incremental gains rather than by momentous discoveries. Computer speed has always been limited by computer storage speed.
How Small Changes in Drives Get Big Results
  • ·         The ZIP drive increased data volume and access speed over floppy storage, but allowed for portability.
  • ·         A smaller head allowed 2118 tracks per inch, compared to 135 tracks per inch on a floppy disk.
  • ·         Additional storage capacity came from coating the cookie with the same magnetic particles as a S-VHS video tape which have a higher energy level and therefore not as easily magnetized. So the magnetic field from the write head affects a smaller surface area.
  • ·         Change from radial sectors (which waste storage space on the outer tracks) to zone recording (also used for hard drives) so that the same recording density is used throughout the disk.
  • ·         Perpendicular recording
o   The superparamagnetic effect limited storage capacity because proximity caused charges to interfere with one another.
o   Iron core redesigned to ride close to the disk’s surface and force a stronger magnetic field through a smaller area leaving particles magnetized perpendicular to the path of the magnet.
How File Compression Makes Files Smaller
  • ·         Makes files smaller by eliminating redundancies in the file (lossless compression)
  • ·         Uses some variation of LZ (Lempel and Ziv) adaptive dictionary-based algorithm, which examines the file for recurring patterns of data which are written to a dictionary stored as part of the compressed file. The compressed file is stores as a reduced version with pointers indicating where the omitted dictionary sections can be found. Adaptive means that the algorithm constantly looks for more efficient data patterns and changes entries on the fly.
  • ·         The type of file determines how much compression takes place, length is also a determinant in degree to which a file can be compressed. On average files can be compressed 50%, but some can be compressed to only 20% of their original size.
  • ·         Graphics files often use lossy compression which reduces file size by discarding data such as small variations in color. These files can never be returned to their original state from the compressed version. Utility programs can further compress files, they tend to emphasize storage over speed.
How Disk Defragmentation Works
  • ·         Data is written to new disks in contiguous clusters. However as files are deleted, available clusters may not be adjacent. Defragmenting reorders data so that data from a file is in a contiguous set of clusters. Defragmentation helps to speed the read and write actions by reducing the amount of time moving from track to track passing over unrelated sectors.
  • ·         Defragging or disk optimization is a software operation that moves the scattered parts of files so that they are contiguous on the disk by first moving out fragmented block to make space and then moving the file data back into the contiguous cluster group. Windows Vista automatically defrags drives when they are idle.