Playstation Emulation Guide

Total Page:16

File Type:pdf, Size:1020Kb

Playstation Emulation Guide Playstation Emulation Guide Lionel Flandrin October 20, 2016 1 Contents 1 Introduction 6 1.1 Isn't emulation complicated? . .6 1.2 Feedback . .6 2 The CPU: Instructions and the memory 6 2.1 What is a CPU, anyway? . .6 2.2 Architecture . .7 2.3 The code . .7 2.4 The Program Counter register . .7 2.4.1 Reset value of the PC . .9 2.5 The Playstation memory map . .9 2.5.1 Implementing the memory map . 10 2.6 The BIOS . 10 2.7 Loading the BIOS . 11 2.8 The interconnect . 12 2.9 Gluing the interconnect to the CPU . 14 2.10 Instruction decoding . 16 2.11 General purpose registers . 17 2.11.1 The $zero register . 18 2.11.2 The $ra register . 18 2.12 Special purpose registers . 18 2.13 Implementing the general purpose registers . 19 2.14 LUI instruction . 20 2.15 ORI instruction . 20 2.16 Writing to memory . 21 2.16.1 Unaligned memory access . 22 2.16.2 Expansion mapping . 23 2.17 Sign extension . 23 2.18 SW instruction . 25 2.19 SLL instruction . 25 2.20 ADDIU instruction . 27 2.21 RAM configuration register . 28 2.22 J instruction . 28 2.23 Branch delay slots . 29 2.24 OR instruction . 30 2.25 Type safety in the register interface . 31 2.26 CACHE CONTROL register . 32 2.27 The coprocessors . 32 2.28 MTC0 instruction . 33 2.29 BNE instruction . 34 2.30 ADDI instruction . 35 2.31 Memory loads . 36 2.32 Load delay slots . 37 2.33 LW instruction . 39 2.34 The RAM . 40 2.35 The coprocessor 0 registers . 41 2.36 SLTU instruction . 42 2.37 ADDU instruction . 42 2 2.38 Regions . 43 2.39 SH instruction . 44 2.40 SPU registers . 45 2.41 JAL instruction . 46 2.42 ANDI instruction . 47 2.43 SB instruction . 47 2.44 Expansion 2 . 48 2.45 JR instruction . 48 2.46 LB instruction . 48 2.47 BEQ instruction . 50 2.48 Expansion 1 . 50 2.49 RAM byte access . 51 2.50 MFC0 instruction . 51 2.51 AND instruction . 52 2.52 ADD instruction . 52 2.53 Interrupt Control registers . 53 2.54 BGTZ instruction . 54 2.55 BLEZ instruction . 54 2.56 LBU instruction . 55 2.57 JALR instruction . 55 2.58 BLTZ, BLTZAL, BGEZ and BGEZAL instructions . 55 2.59 SLTI instruction . 57 2.60 SUBU instruction . 57 2.61 SRA instruction . 57 2.62 DIV instruction . 58 2.63 MFLO instruction . 60 2.64 SRL instruction . 60 2.65 SLTIU instruction . 61 2.66 DIVU instruction . 61 2.67 MFHI instruction . 62 2.68 SLT instruction . 62 2.69 Interrupt Control read . 62 2.70 Timer registers . 63 2.71 Exceptions . 63 2.72 SYSCALL instruction . 66 2.73 MTLO instruction . 67 2.74 MTHI instruction . 68 2.75 RFE intsruction . 68 2.76 Exceptions and branch delay slots . 69 2.77 ADD and ADDI overflows . 71 2.78 Store and load alignment exceptions . 72 2.79 PC alignment exception . 73 2.80 RAM 16bit store . 73 2.81 DMA registers . 74 2.82 LHU instruction . 75 2.83 SLLV instruction . 76 2.84 LH instruction . 77 2.85 NOR instruction . 77 2.86 SRAV instruction . 78 2.87 SRLV instruction . 78 3 2.88 MULTU instruction . 79 2.89 GPU registers . 79 2.89.1 GP0: Draw Mode Setting command . 80 2.90 Interrupt Control 16bit access . 81 2.91 Timer registers 32bit access . 81 2.92 GPUSTAT \DMA ready" field . 82 2.93 XOR instruction . 83 2.94 BREAK instructions . 83 2.95 MULT instruction . 84 2.96 SUB instruction . 84 2.97 XORI instruction . 85 2.98 Cop1, cop2 and cop3 opcodes . 85 2.99 Non-aligned reads . 86 2.99.1 LWL instruction . 87 2.99.2 LWR instruction . 88 2.100Non-aligned writes . 89 2.100.1 SWL instruction . 89 2.100.2 SWR instruction . 89 2.101Coprocessor loads and stores . 90 2.101.1 LWCn instructions . 90 2.101.2 SWCn instructions . 91 2.102Illegal instructions . 91 3 The DMA: Ordering tables and the GPU 93 3.1 DMA Control register . 94 3.2 DMA Interrupt register . 96 3.3 DMA Channel Control register . 97 3.4 DMA Base Address register . 102 3.5 DMA Block Control register . ..
Recommended publications
  • Forensic Analysis of a Playstation 3 Console
    Publications 2010 Forensic Analysis of a Playstation 3 Console Scott Conrad University of Central Florida Greg Dorn University of Central Florida Philip Craiger University of Central Florida, [email protected] Follow this and additional works at: https://commons.erau.edu/publication Part of the Forensic Science and Technology Commons, and the Information Security Commons Scholarly Commons Citation Conrad, S., Dorn, G., & Craiger, P. (2010). Forensic Analysis of a Playstation 3 Console. Advances in Digital Forensics VI, (). Retrieved from https://commons.erau.edu/publication/999 This Conference Proceeding is brought to you for free and open access by Scholarly Commons. It has been accepted for inclusion in Publications by an authorized administrator of Scholarly Commons. For more information, please contact [email protected]. Chapter 5 FORENSIC ANALYSIS OF A PLAYSTATION 3 CONSOLE Scott Conrad, Greg Dorn and Philip Craiger Abstract The Sony PlayStation 3 (PS3) is a powerful gaming console that sup- ports Internet-related activities, local file storage and the playing of Blu-ray movies. The PS3 also allows users to partition and install a secondary operating system on the hard drive. This “desktop-like” func- tionality along with the encryption of the primary hard drive containing the gaming software raises significant issues related to the forensic anal- ysis of PS3 systems. This paper discusses the PS3 architecture and behavior, and provides recommendations for conducting forensic inves- tigations of PS3 systems. Keywords: Sony PlayStation 3, gaming console, forensic analysis 1. Introduction The Sony PlayStation 3 (PS3) hit the Japanese and North American retail markets in November 2006 (March 2007 in Europe) [13].
    [Show full text]
  • Perspective Platforms for BOINC Distributed Computing Network
    Perspective platforms for BOINC distributed computing network Vitalii Koshura Lohika Odessa, Ukraine [email protected] Profile page: https://www.linkedin.com/in/aenbleidd/ Abstract This paper describes perspective platforms that can be used by BOINC for distributed computing: mobile devices (Android, iOS, Windows Phone) and video game consoles (Sony PlayStation, Microsoft Xbox and Nintendo Wii/Switch). For now, BOINC supports Android devices only. During this research, I’ve found that iOS is not suitable for our purposes because of platform limitations and Windows Phone is not suitable too because of low market share. Video game consoles are more suitable for our purposes. Sony PlayStation, Microsoft Xbox and Nintendo Wii/Switch a good enough to be supported by BOINC distributed computing network. Keywords: Volunteer Computing, BOINC, Distributed Computing, Mobile Devices, Video Game Consoles, Android, iOS, Windows Phone, Sony PlayStation, Microsoft Xbox, Nintendo Wii/Switch 1 Introduction Currently BOINC platform supports 4 desktop OSs (Windows, MacOS, Linux, FreeBSD), mobile phones (Android-based), ARM-based devices (Raspberry PI), 3 GPUs (nVidia, AMD Radeon, Intel) and VirtualBox Virtualization technology [1]. As we can see from the 1 not every project supports all available platforms. This is due to complexity of the code and differences between the platforms. In common case scientists need to create and test a separate application for each type of platform. Long term projects such as Asteroids@home [2], Collatz Conjecture [3], Einstein@home [4], SETI@home [5] are presented on all or almost all platforms while other projects with several months of planned lifetime make their calculations on CPU only (e.g.
    [Show full text]
  • Entertaining the World, Caring for the Future
    cover1-4(6.23)E 01.6.26 10:47 AM ページ 1 Sony Corporation Sony Corporation Environmental Report 2001 Entertaining the world, caring for the future Printed on 100% recycled paper (Data section 100% recycled magazine paper). Printed in Japan Printed using VOC(Volatile Organic Compound)-free vegetable oil based ink. June 2001 Environmental Report 2001 0106-03OP01E cover1-4(6.23)E 01.6.26 10:47 AM ページ 2 4 Key Questions & Answers Q1 How does Sony promote environmental management? A beech tree aged approximately 400 years in the mountainous Shirakami district of Aomori Prefecture, a World Heritage site. Q2 What kinds of environmental considerations is Sony pursuing? Sony welcomes questions, comments and suggestions regarding the contents of this Environmental Report and the Sony Group’s environmental activities. Please contact us at one of the following five Sony Environmental Conservation Committee offices. Inquiries Japan Americas Europe What serves as the basis for Sony’s environmental activities? Corporate Environmental Affairs Corporate Environment, Safety and Health Environmental Center Europe Sony Corporation Sony Electronics Inc. Sony International (Europe) GmbH Q3 What other kinds of environmental communication is 6-7-35, Kita-Shinagawa 16450 West Bernardo Drive Advanced Technology Center Stuttgart Shinagawa-ku, Tokyo 141-0001 San Diego, California 92127-1898, USA Heinrich-Hertz-Strasse 1, D-70327 Stuttgart, Germany Sony conducting? Telephone: 81-3-5448-3533 Telephone:1-858-942-2716 Telephone: 49-7-11/58 58-308 Facsimile: 81-3-5448-7838 Facsimile: 1-858-942-9181 Facsimile: 49-7-11/5 78 98 33 E-mail: [email protected] E-Mail: [email protected] E-Mail: [email protected] http://www.world.sony.com/eco http://www.sel.sony.com/SEL/esh http://www.sony-europe.com/eco Asia China Environment, Safety & Health Asia Sony (China) Limited Shanghai Branch Sony Electronics (Singapore) Pte Ltd.
    [Show full text]
  • Playstation 4 - Wikipedia Case 3:19-Cv-07027-WHA Document 28-3 Filed 10/14/19 Page 2 of 19 Not Logged in Talk Contributions Create Account Log In
    Case 3:19-cv-07027-WHA Document 28-3 Filed 10/14/19 Page 1 of 19 EXHIBIT C PlayStation 4 - Wikipedia Case 3:19-cv-07027-WHA Document 28-3 Filed 10/14/19 Page 2 of 19 Not logged in Talk Contributions Create account Log in Article Talk Read View source View history PlayStation 4 From Wikipedia, the free encyclopedia Main page Contents "PS4" redirects here. For other uses, see PS4 (disambiguation). Featured content The PlayStation 4 (officially abbreviated as PS4) is an eighth-generation home video game console developed by Sony Interactive Current events PlayStation 4 Entertainment. Announced as the successor to the PlayStation 3 in February 2013, it was launched on November 15 in North Random article Donate to Wikipedia America, November 29 in Europe, South America and Australia, and on February 22, 2014, in Japan. It competes with Microsoft's Wikipedia store Xbox One and Nintendo's Wii U and Switch. Moving away from the more complex Cell microarchitecture of its predecessor, the console features an AMD Accelerated Processing Interaction Unit (APU) built upon the x86-64 architecture, which can theoretically peak at 1.84 teraflops; AMD stated that it was the "most Help powerful" APU it had developed to date. The PlayStation 4 places an increased emphasis on social interaction and integration with About Wikipedia Community portal other devices and services, including the ability to play games off-console on PlayStation Vita and other supported devices ("Remote Recent changes Play"), the ability to stream gameplay online or to friends, with them controlling gameplay remotely ("Share Play").
    [Show full text]
  • Ipod® & Itunes® Dummies‰
    01_174746 ffirs.qxp 9/26/07 6:57 PM Page iii ® iPod & iTunes® FOR DUMmIES‰ 5TH EDITION by Tony Bove and Cheryl Rhodes 01_174746 ffirs.qxp 9/26/07 6:57 PM Page ii 01_174746 ffirs.qxp 9/26/07 6:57 PM Page i ® iPod & iTunes® FOR DUMmIES‰ 5TH EDITION 01_174746 ffirs.qxp 9/26/07 6:57 PM Page ii 01_174746 ffirs.qxp 9/26/07 6:57 PM Page iii ® iPod & iTunes® FOR DUMmIES‰ 5TH EDITION by Tony Bove and Cheryl Rhodes 01_174746 ffirs.qxp 9/26/07 6:57 PM Page iv iPod® & iTunes® For Dummies®, 5th Edition Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit- ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions. Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc.
    [Show full text]
  • SONY ELECTRONICS INC., and JURY TRIAL DEMANDED SONY CORPORATION
    Case 1:17-cv-01693-UNA Document 1 Filed 11/21/17 Page 1 of 133 PageID #: 1 IN THE UNITED STATES DISTRICT COURT FOR THE DISTRICT OF DELAWARE REALTIME ADAPTIVE STREAMING LLC, Plaintiff, Case No. ___________________ v. SONY ELECTRONICS INC., and JURY TRIAL DEMANDED SONY CORPORATION Defendants. COMPLAINT FOR PATENT INFRINGEMENT This is an action for Patent infringement arising under the Patent Laws of the United States of America, 35 U.S.C. § 1 et seq. in which Plaintiff Realtime Adaptive Streaming LLC (“Plaintiff” or “Realtime”) makes the following allegations against Defendants Sony Electronics, Inc. and Sony Corporation (collectively “Defendants” or “Sony”). PARTIES 1. Realtime is a Texas limited liability company. Realtime has a place of business at 1828 E.S.E. Loop 323, Tyler, Texas 75701. Realtime has researched and developed specific solutions for data compression, including, for example, those that increase the speeds at which data can be stored and accessed. As recognition of its innovations rooted in this technological field, Realtime holds multiple United States Patents and pending Patent applications. 2. Defendant Sony Electronics, Inc. is a Delaware corporation, with its principal place of business at 16535 Via Esprillo, San Diego, California 92127. Sony Electronics Inc. may be served with process by serving its registered agent, Corporation 1 Case 1:17-cv-01693-UNA Document 1 Filed 11/21/17 Page 2 of 133 PageID #: 2 Service Company at 251 Little Falls Drive, Wilmington, Delaware 19808. 3. Defendant Sony Corporation is a Japanese corporation, with its corporate headquarters located at 1-7-1 Konan, Minato-ku, Tokyo, 108-0075, Japan.
    [Show full text]
  • Forensic Analysis of a Playstation 3 Console
    Publications 2010 Forensic Analysis of a Playstation 3 Console Scott Conrad University of Central Florida Greg Dorn University of Central Florida Philip Craiger University of Central Florida, [email protected] Follow this and additional works at: https://commons.erau.edu/publication Part of the Forensic Science and Technology Commons, and the Information Security Commons Scholarly Commons Citation Conrad, S., Dorn, G., & Craiger, P. (2010). Forensic Analysis of a Playstation 3 Console. Advances in Digital Forensics VI, (). Retrieved from https://commons.erau.edu/publication/999 This Conference Proceeding is brought to you for free and open access by Scholarly Commons. It has been accepted for inclusion in Publications by an authorized administrator of Scholarly Commons. For more information, please contact [email protected]. Chapter 5 FORENSIC ANALYSIS OF A PLAYSTATION 3 CONSOLE Scott Conrad, Greg Dorn and Philip Craiger Abstract The Sony PlayStation 3 (PS3) is a powerful gaming console that sup- ports Internet-related activities, local file storage and the playing of Blu-ray movies. The PS3 also allows users to partition and install a secondary operating system on the hard drive. This “desktop-like” func- tionality along with the encryption of the primary hard drive containing the gaming software raises significant issues related to the forensic anal- ysis of PS3 systems. This paper discusses the PS3 architecture and behavior, and provides recommendations for conducting forensic inves- tigations of PS3 systems. Keywords: Sony PlayStation 3, gaming console, forensic analysis 1. Introduction The Sony PlayStation 3 (PS3) hit the Japanese and North American retail markets in November 2006 (March 2007 in Europe) [13].
    [Show full text]
  • Playstation Network - Wikipedia Case 3:19-Cv-07027-WHA Document 28-1 Filed 10/14/19 Page 2 of 8 Not Logged in Talk Contributions Create Account Log In
    Case 3:19-cv-07027-WHA Document 28-1 Filed 10/14/19 Page 1 of 8 EXHIBIT A PlayStation Network - Wikipedia Case 3:19-cv-07027-WHA Document 28-1 Filed 10/14/19 Page 2 of 8 Not logged in Talk Contributions Create account Log in Article Talk Read Edit View history PlayStation Network From Wikipedia, the free encyclopedia Main page Contents "PSN" redirects here. For other uses, see PSN (disambiguation). Featured content PlayStation Network (PSN) is a digital media entertainment service provided by Sony Interactive Entertainment. Launched in November Current events PlayStation Network 2006, PSN was originally conceived for the PlayStation video game consoles, but soon extended to encompass smartphones, tablets, Random article Donate to Wikipedia Blu-ray players and high-definition televisions. As of April 2016, over 110 million users have been documented, with 94 million of them [2][3] Wikipedia store active monthly as of May 2019. Developer Sony Interactive Entertainment PlayStation Network's services are dedicated to an online marketplace (PlayStation Store), a premium subscription service for enhanced Interaction Type Online service gaming and social features (PlayStation Plus), movie streaming, rentals and purchases (PlayStation Video), a cloud-based television Help Launch November 11, 2006; 12 years ago programming service (PlayStation Vue), music streaming (PlayStation Music, powered by Spotify) and a cloud gaming service About Wikipedia date (PlayStation Now). The service is available in 73 territories.[4] Community portal Platform Video
    [Show full text]
  • Sony Computer Entertainment America Inc. V. Gamemasters 87 F.Supp.2D 976 (N.D.CA 1999)
    Sony Computer Entertainment America Inc. v. GameMasters 87 F.Supp.2d 976 (N.D.CA 1999) HENDERSON, District Judge. 1. This civil action is brought by Sony Computer Entertainment America Inc., against Michael and Carol Chaddon, d.b.a. GameMasters, Inc., for trademark and copyright infringement, contributory trademark and contributory copyright infringement, violation of the Digital Millennium Copyright Act, and state and federal unfair competition laws. 2. This matter is now before the Court on plaintiff's motion for a preliminary injunction. Based upon the evidentiary record, the parties' moving papers, and arguments of counsel, IT IS HEREBY ORDERED, ADJUDGED AND DECREED: I. Procedural Posture 3. In January 1999, SCEA learned that Defendants were selling allegedly counterfeit accessories for SCEA's PlayStation video game. An SCEA employee, Jerry Jessop, purchased an allegedly counterfeit PlayStation memory card, video game controller, and a device known as the "Game Enhancer" from the GameMaster's store in San Leandro on January 17, 1999. After some analysis, SCEA concluded that the peripheral items were counterfeit. Plaintiff has attached copies of the packaging of both products as exhibits. (Jessop Decl. Ex. B). 4. On June 10, 1999, SCEA filed ex parte for a Temporary Restraining Order ("TRO"). On June 11, 1999, this Court granted SCEA's request for a TRO and Order for Seizure and Impoundment of Counterfeit Goods and directed that all motions and papers be filed under seal. We also directed the parties to appear and Show Cause why a Preliminary Injunction should not Issue and ordered an Expedited Discovery schedule. 5. On June 15, 1999, SCEA carried out the Seizure Order impounding numerous allegedly counterfeit accessories (including 41 memory cards, 2 CD‐ROM mechanism boxes; a Japanese Dual Shock Controller, and 7 PlayStation cases) totaling approximately $4,000 in value.
    [Show full text]
  • Forensic Analysis of a Playstation 3 Console Scott Conrad, Greg Dorn, Philip Craiger
    Forensic Analysis of a PlayStation 3 Console Scott Conrad, Greg Dorn, Philip Craiger To cite this version: Scott Conrad, Greg Dorn, Philip Craiger. Forensic Analysis of a PlayStation 3 Console. 6th IFIP WG 11.9 International Conference on Digital Forensics (DF), Jan 2010, Hong Kong, China. pp.65-76, 10.1007/978-3-642-15506-2_5. hal-01060610 HAL Id: hal-01060610 https://hal.inria.fr/hal-01060610 Submitted on 28 Nov 2017 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution| 4.0 International License Chapter 5 FORENSIC ANALYSIS OF A PLAYSTATION 3 CONSOLE Scott Conrad, Greg Dorn and Philip Craiger Abstract The Sony PlayStation 3 (PS3) is a powerful gaming console that sup- ports Internet-related activities, local file storage and the playing of Blu-ray movies. The PS3 also allows users to partition and install a secondary operating system on the hard drive. This “desktop-like” func- tionality along with the encryption of the primary hard drive containing the gaming software raises significant issues related to the forensic anal- ysis of PS3 systems. This paper discusses the PS3 architecture and behavior, and provides recommendations for conducting forensic inves- tigations of PS3 systems.
    [Show full text]
  • Case Eleven Rivalry in Video Games
    AGFC11 16/12/2004 17:17 Page 86 case eleven Rivalry in Video Games TEACHING NOTE SYNOPSIS The case outlines the competitive situation in the video games hardware industry in early summer 2002. Sony with its PlayStation continues to dominate the world mar- ket, but is facing challenges from Nintendo (with its Cube) and Microsoft (with Xbox). The stakes are high – total world sales of video games hardware and software are likely to reach $31 billion in 2002. Past evidence suggests that, in the hardware sector, the market leader scoops the great majority of the industry profit pool. Moreover, the ability to establish a de-facto standard means that, once a company has estab- lished market leadership in games consoles, it is difficult to unseat that leadership. The result is intense competition for market leadership in which the challengers are willing to lose substantial sums of money just to get their machine established in the market. The focus of the case in terms of decision making is on the future: what strategies should Microsoft (MS) and Nintendo pursue in order to wrest market leadership from Sony, and how can Sony best reinforce its leadership and resist its challengers? However, most of the case is concerned with the history of the video games industry. The case takes us through all five generations of games consoles, from the 4-bit machines (dominated by Atari during 1972–85, to Nintendo and the 8-bit era (1986–91), to the 16-bit machines when the market was shared by Sega and Nintendo (1992–5), to Sony’s domination of the 32-bit, 64-bit, and 128-bit machines since 1995.
    [Show full text]