TECHNOLOGY 

Published on
KembaraXtra-Computer Science - Programming Without an Operating System
Core Concept: Direct Hardware Access
  • Definition: In a system without an operating system (OS), software (like a game) directly interacts with the hardware. There's no intermediary layer managing resources or providing services.
Example: Early Video Game Consoles
  • Examples: Atari 2600, Nintendo Entertainment System (NES), Sega Genesis
  • How they worked:
    • Game code resided on a cartridge.
    • Inserting the cartridge and turning on the console started the game.
    • The console executed the game's code directly, with no OS intervention.
    • Only one program (the game) ran at a time.
    • Switching games required turning off the system, swapping cartridges, and turning it back on.
Programmer's Responsibilities (Without an OS)
  • Total Control: The game developer was responsible for:
    • Game logic
    • Initializing the system (setting up hardware components)
    • Controlling video hardware
    • Reading controller inputs
    • Managing all hardware interactions
  • Hardware Specificity: Deep understanding of the target console's hardware was crucial. Different consoles had significantly different hardware designs.
  • Challenges:
    • Porting to different consoles required rewriting substantial portions of code due to hardware differences.
    • Redundant code: Every game cartridge needed code for basic tasks (hardware initialization, etc.), leading to duplicated effort across different developers and games.
Advantages (of this approach)
  • Maximum Performance: Knowing the exact hardware specifications allowed developers to optimize their code to squeeze the maximum possible performance from the system.
  • Stable environment: The hardware design was consistent during the manufacturing years, which allowed developers to target their code to that specific hardware
Disadvantages (of this approach)
  • Porting: It was hard to port the games, so they often had to rewrite a substantial portion of their code.
  • Duplicated work: Every game cartridge had to include similar code to accomplish fundamental tasks, such as initializing the hardware.



Picture
0 Comments