CONSOLE PROGRAMMING - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

CONSOLE PROGRAMMING

Description:

1. CONSOLE PROGRAMMING. Abdennour El Rhalibi. Notes ... Mixed-mode Source/Disassembly pane. Display List (GX) Pane. Register pane, with custom templates ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 46
Provided by: abden
Category:

less

Transcript and Presenter's Notes

Title: CONSOLE PROGRAMMING


1
CONSOLE PROGRAMMING
  • Abdennour El Rhalibi
  • -
  • Notes courtesy
  • Sarah Ewen - SCEE
  • Adam Bertsch SCEA
  • Nintendo User Manual
  • SNSystems Websites

2
Agenda
  • Platforms Available
  • PS2 Linux
  • Architecture
  • Software Development
  • NGC Prodigy Plus SDK
  • Architecture
  • Software Development

3
Platforms Available
  • PS2 Linux SDK
  • http//playstation2-linux.com/
  • NGC SNSystems SDK
  • http//www.snsystems.com/

4
What are SCEs goals for Linux?
  • Expose developers to PlayStation
  • Investigate the uses of Linux on a game console
  • Respond to consumer demand
  • Allow game enthusiasts to create game content for
    the PlayStation 2

5
Kit Contents
  • Linux (for PlayStation 2) software 1.0
  • Monitor Cable Adaptor (for PlayStation 2)(with
    Audio Connectors)
  • Internal Hard Disk Drive (40GB)(for PlayStation
    2)
  • Network Adaptor (Ethernet Only)(for PlayStation
    2) 10/100 Base-T
  • USB Keyboard (for PlayStation 2)
  • USB Mouse (for PlayStation 2)

6
Additional Requirements
  • PlayStation 2 Computer Entertainment System
  • Memory Card (8MB) (for PlayStation 2)
  • Sync-on-Green Monitor (recommended)

7
Hardware
  • Emotion Engine
  • MIPS R5900
  • Vector Units
  • Graphics Synthesizer
  • I/O Processor
  • Sound Processing Unit
  • 32MB RAM

8
The Kernel
  • 2.2.1 MIPS (Linux/MIPS is a port of Linux to the
    MIPS architecture. )
  • 2.2.18 USB
  • Binary device driver modules
  • xRhino and 2.2.19

9
The Distro
  • Kondara (Red Hat 5)
  • Source-compatible
  • Not binary-compatible with x86 distros
  • Some updates from website
  • Linux for PlayStation 2 Community
  • CFYC (ready-compiled)
  • http//playstation2-linux.com/projects/cfyc

10
Potential Uses
  • Software Development
  • Games
  • Development tools
  • Productivity apps
  • Home entertainment appliance
  • Digital music
  • Digital video
  • Cluster applications
  • Scientific computing
  • Graphics processing

11
Licensing Issues
  • DVD 1 SCE Proprietary
  • Boot Loader
  • Runtime Environment
  • Hardware Manuals
  • DVD 2 GPL / Various
  • Linux for PlayStation 2 software
  • General Public License

12
PS2 Software Development
  • http//www.linuxplay.com/
  • http//playstation2-linux.com/
  • http//www.hsfortuna.pwp.blueyonder.co.uk/
  • SPS2 tutorial

13
Development
  • What are my options using the Linux kit?

14
Linux kit - development
  • Higher level
  • PS2GL
  • Mesa (Linux 3D programming library)
  • SDL port (Simple DirectMedia Library)
  • PS2 Approach
  • Libps2dev
  • Bundled with examples and some documentation
  • /usr/doc/PlayStation2
  • Additionally
  • ps2stuff SPS2 projects available on
    playstation2-linux.com

15
Linux kit - development
  • Access to the Vector Units
  • Unaffected by Linux
  • Write applications in C/C and assembly
  • Development environment
  • Libraries to access devices under Linux
  • A vu0math library
  • Your favourite text editor
  • A cross compiler
  • Limited debugging capability

16
A comparison
  • Linux kit vs professional development hardware
  • Whats the difference?
  • Hardware
  • Software
  • Development
  • Tools
  • Libraries
  • Docs support

17
Hardware
  • PS2 Linux
  • Standard PS2
  • 32M main memory
  • 2M IOP memory
  • HDD
  • Network adapter
  • Can be used directly using a keyboard and mouse
  • T10000
  • Expanded PS2
  • 128M main memory
  • 8M IOP memory
  • Host-PC
  • Controlled via network

18
Software
  • T10000
  • Host-PC controls PS2 hardware
  • PS2 hardware resources unrestricted
  • Thin kernel
  • manages I/O
  • debugging features
  • IOP exposed to developers
  • PS2 Linux
  • PS2 runs Linux
  • PS2 hardware exposed through devices
  • No direct IOP access or SPU2 access to protect
    MagicGate (encryption used in memory card)
  • Linux eats memory and CPU time

19
Development
  • T10000
  • Cross development
  • compilation of code done on users PC
  • downloaded to PS2 via host-PC interface
  • debugger runs on users PC, talks to host-PC over
    network, which then talks to PS2 hardware
  • PS2 Linux
  • Direct development
  • compilation of code done on Linux kit itself
  • debugger runs on PS2 Linux, taking up extra
    resources

20
Tools
  • T10000
  • Supplied with custom toolchain
  • GCC based compiler
  • EE and IOP debuggers
  • All tools know about PS2 hardware
  • Several commercial development packages
  • Fully visual IDEs etc.
  • PS2 Linux
  • Supplied with GCC
  • Not fully PS2
  • Ports to other platforms possible for cross
    compilation

21
Libraries
  • T10000
  • Has several low-level libraries
  • GS
  • DMAC
  • VU0
  • And some higher level ones
  • Mpeg
  • Network
  • PS2 Linux
  • Has device interfaces to some features
  • VU/VIF
  • GS expand
  • Has some helper libraries to get you going
  • LibPS2Dev

22
Docs and Support
  • T10000
  • Full hardware manuals
  • Except IOP
  • But including SPU
  • Printed and PDF
  • Many additional documents on professional website
  • Private newsgroups and email support
  • PS2 Linux
  • Full hardware manuals
  • Except IO Processor, sound chip
  • PDF only
  • Public website
  • Public projects
  • Discussion forums
  • Limited direct support
  • Sarah, Adam
  • Tech group staff in their own time

23
(No Transcript)
24
Performance
  • What level of performance can be achieved on the
    Linux kit?
  • What affects it?

25
Performance
  • Linux architecture not designed for PS2
  • Large CPU overhead (EE only 2.95 GHz)
  • Kernel is not cache friendly
  • Does not use ScratchPad memory
  • Does not use Vector Units
  • Software rendering is far from optimal
  • But you have access to all unused resources

26
Performance
  • Pretty good performance is achievable
  • One of the samples displays 560k polys at 60fps
  • Thats 33.6M polys/sec
  • Theoretical max is 35
  • Aided by SPS2 module
  • Direct Access Environment

27
SPS2 Direct Access Environment
  • Developed by PS2Linux developer community
  • What is it?
  • Why use it?
  • How do I use it?
  • Are there disadvantages?

28
What is SPS2?
  • Kernel module loaded at runtime
  • Gives direct access to the hardware
  • Has been used to create samples requiring lots of
    processing power
  • Linux friendly

29
Advantages
  • Required for DMA transfers
  • Guarantee to have unswappable/unmovable memory
  • Only 4kb continuous memory is guaranteed
  • Physical address of memory
  • You fill the buffers using Linux virtual
    addresses and sends the data using physical
    addresses
  • Direct access to the hardware registers
  • EE
  • GS

30
More advantages
  • DMA packet checker
  • Set of functions for debugging purposes
  • Helps prevent crashes
  • Easy to crash the system
  • Very good documentation
  • Samples to illustrate usage
  • Currently being developed and improved
  • The module can be installed/uninstalled at
    runtime
  • No need to recompile the kernel
  • No memory is reserved
  • No need to even reboot

31
SPS2 Project Framework
  • Written by members of the community
  • Professional developers
  • Takes cares of display initialisation
  • Deals with DMA packet building
  • Provides a solid base for your code
  • Samples of advanced techniques used in a game
  • Bump mapping

32
PS2 - Conclusion
  • Linux kit provides
  • Hardware Manuals
  • Access to PS2 at a low level
  • VCL (Vector unit Command Line)
  • ps2dev.org/ps2/Tools/Misc_tools/VCL_Vector_Unit_Pr
    eprocessor
  • Everything you learn through the Linux kit is of
    value on professional development tool
  • SPS2 even makes your code more portable
  • Amateur developer community is growing
  • playstation2-linux.com
  • Sourceforge approach to helping developers

33
NGC - Hardware
  • SN-TDEV is a cost-effective hardware platform for
    developing games for the Nintendo GameCube.
  • When used with ProDG, game programmers can debug
    their code on the new TDEV console, which is the
    closest development hardware to a retail console,
    with the additional benefit of 48 MB of RAM.
  • Optical disc emulation is supported, using
    Nintendo's standard DVD functions and without any
    modifications to source code.
  • SN-TDEV uses SN Systems USB2 connection with peak
    read and write speeds of 3 MB/s (24 Mbits/s).

34
NGC - Hardware
  • Components
  • SN-TDEV consists of
  • TDEV console and controller
  • Host and target software (CD-ROM and Mini Optical
    Disc)
  • USB2 adapter and cable (custom)
  • USB2 PCI card
  • System requirements
  • Windows NT4 SP6, Windows 2000 or Windows XP
  • Nintendo GameCube Software Development Kit (SDK)

35
NGC - Software
  • SN-TDEV hardware is compatible with the following
    SN products
  • ProDG and ProDG PLUS - Full Debugging solution
  • Tuner - Game optimization tool
  • SN-TDEV consists of the TDEV console itself, a
    PCI USB 2.0 Adapter, a custom USB 2.0 cable
    (formerly the DevLink cable), target software in
    NR DVD-ROM format and PC host software. It also
    include the Target Manager SDK.
  • Codewarrior / MetroWerks Compilers

36
NGC - Architecture

37
NGC - Architecture
  • SN-TDEV is supplied with host and target
    software.
  • The host software, Target Manager, provides
    facilities for loading and running ELFs.
  • The target software (supplied on a DVD-ROM) is
    used to boot the console and control
    communications with the host software.

38
NGC - ProDG
  • ProDG for Nintendo GameCube is SN Systems' suite
    of fully featured tools that enable you to build
    and debug your game titles for the Nintendo
    GameCube.
  • http//www.snsys.com/GameCube/ProDG.htm
  • It consists of
  • build tools (assembler, C/C compiler, linker),
  • a fast and dedicated source-level debugger and a
    target manager for loading and running
    executables and monitoring target status.
  • Target manager allows developers to remotely
    share a development system over a network.
  • ProDG is also bundled with optional Microsoft
    Visual Studio 6.0 and .NET integration.

39
NGC - ProDG
  • Build Tools
  • Enhanced C/C Build Tools specifically for the
    GameCube
  • SN Compiler Driver for complete control of the
    build process
  • Fast, specialised linkers, with data stripping
    and Relocatable capabilities
  • Dedicated Gekko Assemblers, for function-level,
    inline and standalone assembly.
  • Assemblers support additional SN directives.
  • Compiler supports automatic use of the GameCube's
    fast-cast feature.
  • Optimise inline assembler into compiler generated
    code

40
NGC - ProDG
  • Debugger
  • Full Gekko debugging support
  • Gekko profiler
  • Kernel pane displaying thread information
  • Workspace pane allows easy project navigation
  • Supports conditional/counted breakpoints
  • Mixed-mode Source/Disassembly pane
  • Display List (GX) Pane
  • Register pane, with custom templates
  • Regular expressions
  • Pop-up expression evaluation
  • Integrated TTY pane
  • Flexible pane and window system
  • Save/load data to/from various panes
  • User-configurable accelerator keys/bindings and
    color schemes
  • Fast update and display
  • Uses the industry standard ELF file format

41
NGC - ProDG
  • Visual Studio Integration (Visual Studio 6.0 and
    now .NET!)
  • Build, edit and manage your project using the
    Visual Studio IDE
  • Tight integration between the IDE and the ProDG
    Debugger
  • ProDG build tool integration
  • Source browsing
  • Use Visual Studio's built in source browsing
    capability in your GameCube project, just as you
    would in a Win32 build.
  • Project dependencies

42
NGC - ProDG
  • Target Manager
  • Load/Run ELF filesManage all development
    hardware from your own PC
  • Full file serving, including named pipes
  • Output pane
  • Target Manager Software Development Kit (SDK)

43
NGC - TUNER
  • Overview
  • SN Systems' Tuner lets you capture and visualize
    program behavior so that you can eliminate
    conflicts and bottlenecks in your code. High
    performance games can now be achieved with less
    guesswork.
  • You can save your captured data and easily
    compare it with previous captures. Finally, a
    quick and efficient way to see if your code
    changes have improved game execution or not!
  • Features and Benefits
  • No source modification required
  • Multiple compatible debug formats (SN and
    CodeWarrior compatible)
  • Real-time data capture
  • Frame by frame analysis
  • Extensive data capture
  • Multiple user markers
  • Visualise code performance bottlenecks

44
NGC - SDK
  • The Nintendo GameCube Software Development Kit
    (SDK) contains the following development system
  • libraries and software
  • Operating System libraries.
  • Graphics libraries.
  • Character Pipeline libraries and source code,
    including 3D Studio MAX databases used in some of
    the
  • Demos.
  • Other device libraries such as the Optical Disc
    (DVD), Controller (PAD), and other libraries.
  • Many programs to demonstrate the usage of the SDK
    libraries.
  • MusyX Audio Tools for Nintendo GameCube

45
NGC Platforms - Information
  • SNSystems
  • http//www.snsys.com/GameCube/SN-TDEV.htm
  • NGC Linux
  • http//www.gc-linux.org/wiki/Main_Page
  • http//www.gc-linux.org/docs/yagcd/
  • http//www.linuxdevcenter.com/pub/a/linux/2004/04/
    01/warp_pipe.html
Write a Comment
User Comments (0)
About PowerShow.com