Super Nintendo Development Manual Book I
Super Nintendo (Nintendo, 1990) · Developer Manual · 240 pages · 208 sections · original scan
TABLE of CONTENTS ]
Table of Contents
BOOKI
SUBJECT PAGE IPREE AC Eee eee eee nme 1
SECTION 1 - APPROVAL PROCESS .......:scscscscscsesseueienenenetn L-1-
NOA Licensed Software Approval Process... Super NES Software Submission Requirements
SECTION 2 - SUPER NES SOFTWARE ..0..0......::::ccccccssssscsseeessssensissnee
Introduction... Object (OBJ) ..
Rotation/Enlargement/Reductiot Window (Window Mask) ...... Main/Sub Screen.. CG Direct Selec: H-Pseudo 512... Complementary Multiplication (Signed Multiplication) H/V Counter Latch Offset Change ....... Standard Controller..... Programmable I/O Port Absolute Multiplication/Division . H/V Count Timer... ann Direct Memory Acce Interlace H-512 Mode (BG Mode 5 & 6) OBJ 33’s Lines Over & Priority Order CPU Clock and Address Map... Super NES Functional Operatio: System Flowchart... Programming Cautions Documented Problems Register Clear (Initial Settings) PPU Registers .. CPU Registers..
TABLE of CONTENTS
Table of Contents (Continued)
SUBJECT PAGE
SECTION 3 - SUPER NES SOUND ..0........cccssssssssssssssssssssssssssssssnusnnsissees 3-1-1
SNES Sound Source Outline . BRR (Bit Rate Reduction) . V/O Ports Control Register Timers DSP Interface Register Register Used... CPU Organization Sound Programming Caution:
SECTION 4 - SUPER NES CPU DATA ..............cccsssssssssssssssssesetssssssseces 4-1-1
Outline Explanation of CPU Terminal Functions Explanation of Functions Addressing Mode........ Command Set (Alphabetical Order) Command Set (Matrix Display)... Cycles and Bytes of Addressing Modes......... Differences Among 65C816, 65C02, and 6502.. Restrictions Upon Use & Application Information Details of Command Functions Description of Commands . AC Characteristics
TABLES OF APPENDIX
Appendix A - PPU Registers . Appendix B - CPU Registers Appendix C - SPC700 Commands Appendix D - Data Transfer Procedure
INDEX
TABLE of CONTENTS
Table of Contents (Continued)
BOOK II
SUBJECT PAGE
SECTION 1 - SUPER ACCELERATOR (SAC1)........:::ssssssssssssssssssssees 1-1-1 Super Accelerator System Functions Configuration of SA-1 Super Accelerator Memory Maj SA-1 Internal Register Configuratio: Multi-Processor Processing Character Conversio Arithmetic Function Variable-Length Bit Processing DMA...... SA-1 Timer
SECTION 2 - SUPER FX® o..ccccsscsssssessssstsstsetsssssntnetenssnstsnsseeee 21-1
Introduction to Super FX... GSU Functional Operation Memory Mapping eee GSU Internal Register Configuration ............sc:sscessssecseseesseseessteseesessesessesessesseesesdoAe | GSU Program Execution Instruction Execution
Data Access..........
GSU Special Functions .........ccccscececcsescesseseeseeeeeaesseeesneseeensnsseneeaeeaneeeeseneateseteee Description of Instructions............cccccsesscsesssssesessesseseesssssesecsesssssenseseessseeeseseeaseeeeess 2-9-1
SECTION 3 - DSP/DSP1.
Introduction to DSP1
Command Summary ... Parameter Data Type..........csceccecssseeseeseeeesessessesneesnesseeessesesneesssseseeamsesesnennsseeees Use 0f DSP 1 ..seessesesssecsssesssessneessnssesesssessseesssessseeesseessessssecssnessseessseesssnesseeesseessseess Description of DSP1 Commands Math Functions and Equations..
iii
TABLE of CONTENTS
Table of Contents (Continued)
SUBJECT PAGE
SECTION 4 - ACCESSORIES 0.0... ceecccseeeesceccsesssssssssssssssssssssnnsaneey The Super NES Super Scope® SYStEM oo. cecececeseseeeeeseeeeeeseseeteeesescssessssseeeeeeeeeteeeeel! Principles of the Super NES Super Scope ............c:esseseesesseseeseeesseesteeseesneeeeneeneeee Super NES Super Scope Functional Operation . Super NES Super Scope Receiver Functions. Graphics Super NES Mouse Specifications .............ccccesccsssseeseseeeeteetesteseeseesesesneseesseneeneseesee! Using the Standard BIOS Programming Cautions ... MultiPlayer 5 Specification: MultiPlayer 5 Supplied BIOS
SUPPLEMENTAL INFORMATION
Super NES Parts List Game Content Guideline: Guidelines Concerning Commercialism and Promotion of Licensee Products or Services in Nintendo Licensed Games Super NES Video Timing Information
INDEX
BULLETINS
LIST of FIGURES J
List of Figures
BOOKI
FIGURE TITLE NUMBER Software Approval Process..........:.ssscssssssesssesesssesessesessesesseesessessessesesseeness Picture Image Scanning Pattern for Interlace. Super NES Functional Block Diagram System Block Diagram Memory Map .... Sound Signal Flow BRR Data String BRR Range Data Example Data When Filter = 0. T/O Diagram Port Clear
Timer Control. Timer Section. 4-Bit Counter .
Timer Related Registers Interface Register... Interface Register Flow Bent Line Mode CPU Registers... Boolean Bit Operation Commands Memory Access Addressing Effective Address Wave-form Overflow... SNES CPU Block Diagram .. SNES CPU Terminal Interface Diagram SNES CPU Timing Chart S-PPU Main/Sub Screen Window
LIST of FIGURES _]
List of Figures (Continued)
BOOK II
TITLE Super Accelerator System Configuration ............cccsessesseesssesesseeseeseenees SAS Bus Image SA-1 Block Diagram. Bitmap Register Files 0~7 . Bitmap Register Files 8~F . Accelerator Mode Parallel Processing Mode. Mixed Processing Mode . Character Conversion 1... Character Conversion 2... Compressed Bitmap Data Bitmap Image Projection Bitmap Data Expansion .. Memory Addresses for the Bitmap Area Character Conversion Buffers...... Fixed Mode Process Flow Diagram. Auto-increment Mode Process Flow Diagram . Barrel Shift Proces: Normal DMA... Character Conversion DMA Super FX System Configuration Game Pak ROM/RAM Bus Diagram . GSU Functional Block Diagram Super NES CPU Memory Map. Super FX Memory Map..... Example of General Register... 128 Dot High BG Character Array 160 Dot High BG Character Arra 192 Dot High BG Character Arra’ OBJ Character Array. Plot Operations Assigned by CMODE System Block Diagram (DSP1)........ Super NES CPU and DSP1 Communication: DSP1 Command Execution Mode 20/DSP Memory May Mode 21/DSP Memory Map Super NES/DSP1 Memory Mapping (Mode 21). DSP] Status Register Configuration...
vi
LIST of FIGURES }
List of Figures (Continued)
FIGURE TITLE NUMBER PAGE DSP1 Operations Flow Diagram Super NES CPU/DSP1 Operational Timin; Trigonometric Calculation Vector Calculation ... Vector Size Comparison . Vector Absolute Value Calculation . Two-Dimensional Coordinate Rotatio1 Examples of Three-Dimensional Rotation. Assignment of Projection Parameter Relationship of Sight and Projected Plane. Calculation of Raster Data BG Screen and Displayed Area Calculation of Projected Position of Objec Projection Image of Object Calculation of Coordinates for the Indicated Point on the Scree: Attack Point and Position Indicated on Screen (Side View) .... Attitude Computation ... - Object Coordinate Rotated o} on Y ‘Axis Object Coordinate Rotated on X Axis Object Coordinate Rotated on Z Axis. Conversion of Global to Objective Coordinate: Conversion of Object to Global Coordinates Calculation of Inner Product with Forward Attitud Position of Aircraft and Vector Code Calculation of Rotation Angle After Attitude | Change Signal Flow... Optical Alignment Virtual Screen Alignment Address and Bit Assignments Picture Tube Scanning Area Seen by Super NES Super Scope Vertical Positioning . Horizontal Positioning Horizontal/Vertical Counte: Super NES Super Scope Block Diagram Super NES Super Scope Flow Diagram Raster Signal Definition of One Bi Output Signal Code.. Definitions of Codes
vii
LIST of FIGURES
List of Figures (Continued)
FIGURE TITLE NUMBER PAGE Raster Signal Transmission Timing. 4-3-7 4-1 -4-2 -4-3 Receiver Block Diagram. Operation Flow Diagram Receiver/Transmitter Interface Schematic. One Bit Code Detection Cursor Mode Raster Detection Cycle . Trigger Mode, Single Shot.... Trigger Mode, Multiple Shots Noise Flag Null Bit Pause B: Trigger, Single Shot. Trigger, Multiple Shots Optical Color Sensitivity Chart. Valid Hyper Mouse Data String Serial Data Read Timing... Explanation of Data Strings 2 Bits or Longe: Super NES Hyper Mouse Dimensions. Standard BIOS, Output Register.. Examples of Speed Switching Program Subroutine Call . MultiPlayer 5 Device Hardware Connections ..............+ MultiPlayer 5 Read Timing Chart, 5P Mode Data Read Timing for Dissimilar Devices Valid Controller Data String............... Sample Program Display Format
viii
LIST of TABLES
List of Tables
BOOKI
TITLE
B-Bus Address Changes . A-Bus Addressing..... BRR Filter Values. Peripherals...... PortO - Port3 Registers .. Timer Function... DSP Register Map.. ADSR Parameters . Gain Parameters . Noise Generator Clock.. Source Directory Source Data Block Format . Opcode Matrix Address Mode: Table of Operation: AC Characteristics perrerrerrerc Command Operand Symbols and Meaning Symbols and Meaning for Operational Description soccceeatsnecatsaeneccecsereeneeonenssnecatenenscneentenenesseesse® Explanation of Symbols in the Status Flag Column .. Data Transmission Commands, Group 1 Data Transmission Commands, Group 2 Data Transmission Commands, Group 3 Arithmetic Operation Commands. 8-Bit Logic Operation Commands Addition and Subtraction Command: Shift Rotation Commands 16-Bit Data Transmission Commands 16-Bit Operation Commands............ Multiplication and Division Commands. Decimal Compensation Commands. Branching Commands................ Subroutine Call, Return Commands Stack Operation Commands Bit Operation Commands . Program Status Flag Operation Commands Other Commands
LIST of TABLES
List of Tables (Continued)
BOOK II
TITLE Types of Interrupts Interrupt Identification and Clear.. Interrupt Mask. Sending and Receiving a Message Situation Dependant Vectors .... Operating Modes and Processing Speed. Horizontal Size of VRAM (CDMA Register, Number of Zero Bits in BW-RAM Character Conversion and Data Format. Arithmetic Operations Settings and Cycles Amount of Barrel Shift Source Device Settings ... Destination Device Settings DMA Transmission Speed . Timer Modes and Their Ranges. Timer Interrupts Registers Listed by Functional Group Instruction Set...... GSU General Registers GSU Status Register Flags. Screen Height. Color Gradient .. an Dummy Interrupt Vector Addresses Dummy Data Functions of CMODE DSP1 Command Summary Parameter Data Type. Signal Bit Definitions . MultiPlayer 5 Switch Function . MultiPlayer 5 Data Format .........ccessessessseseesecseesnesseeeneeseesneesnssneeseeenennee!
[ : oo]
[Nintendo Licensee Letterhead { [Insert Date] Re: Confidentiality Agreement Dear 8 (the “Company”) is a licensee of certain confidential, proprietary, and trade secret information belonging to Nintendo of America Inc. (“Nintendo”). Such information of Nintendo may be provided to you by the company or directly by Nintendo in reliance on your relationship to the Company and your agreement expressed herein. All references in this letter to confidential, proprietary, and trade secret information will be deemed to refer solely to confidential, proprietary, and trade secret information of Nintendo and its affiliated corporations. Your obligations in connection with confidential, proprietary, and trade secret information of the Company which are reflected in other agreements between you and the Company, remain unchanged, and are in full force and effect. In consideration of the disclosure of confidential, proprietary, and trade secret information to you, you agree that, except as required by your services to the Company, you will not, at any time during the term of your association with the Company, or at any time thereafter, directly or indirectly use, communicate, disclose, disseminate, discuss, lecture upon, or publish articles concerning such confidential, proprietary, and trade secret information without the prior written consent of the Company. “Confidential, proprietary, and trade secret information” as used herein means any and all information concerning: (i) copyrights, patents, and/or patent applications owned by Nintendo which are applicable to the Nintendo Entertainment System (“NES”), Game Boy hand held video system (“Game Boy”), Super Nintendo Entertainment System (Super NES), or other hardware, accessory, or software products of Nintendo, (ii) the design, and operation of the NES, Game Boy, Super NES, or other Nintendo products, including without limitation the security system of such products, and (iii) new products, marketing plans, know-how, techniques, and methods relating to the development of software for the NES, Game Boy, Super NES, or other Nintendo hardware, accessory, or software products disclosed to you as a consequence of, or during your association with the Company. Such confidential, proprietary, and trade secret information will not include information which is: (i) a part of the public domain; or (ii) obtained by you from someone otherwise authorized to disclose such information. All documents, tapes, computer records, notebooks, work papers, notes and memoranda containing confidential, proprietary, and trade secret information, made or compiled by you at any time, or made available to you during the term of your association with the Company, including all copies thereof, will be the property of the Company, and will be held by you in trust and solely for the benefit of the Company, and will be promptly delivered to the Company upon termination of your association with the Company or at any time upon request by the Company. In the event of any material breach by you of your obligations under this agreement, then the Company will be entitled to such relief, including injunctive relief and damages, including attorney’s fees, as may be awarded by a court of competent jurisdiction, in addition to all other relief available to the Company. In the event the Company fails to take action against you for such a breach, Nintendo will have a direct right of action against you, without the necessity of naming the Company.
nN
PREFACE
Preface
TECHNICAL QUESTIONS If you need technical assistance with your Nintendo Licensee product, our Licensee Support Group Engineers are available between 9:00 a.m. and 6:00 p.m. Pacific Standard Time. Telephone: 1-206-861-2715 Fax: 1-206-882-3585 Written Inquiries: Nintendo of America Inc. Engineering Department Licensee Support Group 4820 150th Ave. N.E.
Redmond, Wa. 98052
CONFIDENTIALITY
Pursuant to the terms of each Nintendo product license and/or confidentiality agreement, Nintendo licensees and developers are required to secure the confidential treatment of information received or derived from Nintendo from all employees, agents, or contractors. In response to the request of several licensees, we have prepared a supplemental confidentiality agreement which is intended to cover only Nintendo derived information that may be used in your business in addition to confidentiality agreements which you will sign with your employees, agents, and contractors for your own benefit. A sample agreement is included at the end of the Preface for your information. This supplemental agreement is a suggested format only and is not a required form, as laws in your state or jurisdiction may vary. You may wish to consult with your own legal counsel regarding recommended formats for your state/country. In many cases, your existing confidentiality agreements will protect both Nintendo and you fully. However, we urge each of you to review agreements that you have in place and consider this supplemental agreement, or other supplements, as may be appropriate or necessary to protect the rights of Nintendo. If you do not presently have a confidentiality agreement in place for your own employees, agents, or contractors, including those who have access to confidential information of Nintendo, we suggest you contact your legal counsel for advice on proper agreements to protect your valuable confidential information and to insure that you are fully in compliance with your Nintendo license/confidentiality agreement. Please contact our Legal or Licensing Departments at 1-206-882-2040 between 9:00 a.m. and 6:00 p.m. Pacific Standard Time, with any questions you may have concerning this matter.
PREFACE ] c
The obligations set forth in this letter regarding treatment of confidential, proprietary, and trade secret information are continuing obligations which will continue regardless of your continuing association with the company. Please acknowledge your understanding and acceptance of the foregoing by signing and returning two (2) copies of this letter to the Company for the benefit of the Company and Nintendo. Yours sincerely, [Insert Nintendo Licensee/Developer Name] By: ACKNOWLEDGED AND ACCEPTED {Insert Contractor or Employee Name] By: Date:
NOA LICENSED SOFTWARE APPROVAL PROCESS ] EZ
Chapter 1. | NOA Licensed Software Approval Process This chapter describes the process adopted by Nintendo of America Inc. (NOA) which affords interested parties to become Nintendo Authorized Software Developers and/or Nintendo Authorized Software Licensees. The normal process is summarized below.
Developer Inquiry
Developer Application
NOA Assessment v Confidentiality Agreement Y__Nintendo Authorized Software Developer Technical Support y Licensee Inquiry
Licensee Application
NOA Assessment Y Product Submission Y Product Evaluation/Approval Y License Agreement ¥__Nintendo Authorized Software Licensee Produce Product
Figure 1-1-1 Software Approval Process General requirements for the steps listed above are covered in the following paragraphs. Specific questions not answered within this manual should be addressed to NOA's Licensing Department.
[
1.2 AUTHORIZED SOFTWARE DEVELOPER REQUIREMENTS
Parties interested in becoming a Nintendo Authorized Software Developer may contact the NOA Licensing Department via telephone, FAX, or in writing.
Written Inquiries: Nintendo of America Inc. Licensing Department 4820-150th Avenue N.E. Redmond, WA 98052 USA
Telephone: (206) 882-2040 FAX: (206) 882-3585 In response, the NOA Licensing Department will send a letter which describes specific requirements for becoming a licensed developer. These requirements are described, in general, below.
1.2.1. LETTER OF APPLICATION
A prospective developer's letter of application should include the following items.
1)
4)
5) A detailed description of the submitting individual or company, including a summary of software development or related experience, financial stability, and market leadership. This information should be in the form of a prospectus, business plan, or summary statement. A detailed introduction to key personnel and developers setting forth any technical, managerial, or development experience which may be relevant and identifying any particular software for any system for which they have contributed.
A description of any relationships or work undertaken for Nintendo third party licensees.
A description of business facilities and equipment.
A copy of any confidentiality/non-disclosure agreement which the company’s employees/agents are required to sign.
A complete listing and at least three samples of software previously developed, especially those which incorporate elements important to successful NOA software or similar entertainment software.
NOA LICENSED SOFTWARE APPROVAL PROCESS
1.3 1.2.2. NOA ASSESSMENT
NOA will review the material submitted and make a preliminary determination of whether the prospective developer's qualifications will support designation as an authorized software developer for Nintendo. Because authorized developers are provided with highly proprietary information belonging to Nintendo, and because many of Nintendo's licensees rely on recommendations and referrals to authorized developers, Nintendo exercises a very high level of care in approving only a select number of authorized developers. The Licensing Department will contact the prospective developer with the results of NOA's assessment.
1.2.3. CONFIDENTIALITY AGREEMENT
If the prospective developer's qualifications support designation as a licensed developer for Nintendo, NOA will prepare a formal confidentiality agreement for review by the prospective developer. Once this agreement has been formalized and processed by NOA’s Licensing Department, the party described within the agreement becomes a Nintendo Authorized Software Developer for the specified product line(s).
1.2.4 TECHNICAL SUPPORT
All technical documentation which is available for the licensed product line(s) will be forwarded to the licensed developer upon formalization of the confidentiality agreement. In addition, access is afforded to NOA’s Engineering Department Licensee Support Group and NOA’s Product Development and Analysis Department. These two support groups will assist the licensed developer with any situational requirements or specifications which are subject to special product development.
AUTHORIZED Software LICENSEE REQUIREMENTS
To license a software product once it has been developed, the interested party must market the product through an existing Nintendo Authorized Software Licensee or become a Nintendo Authorized Software Licensee. NOA would prefer that interested parties contact Nintendo early in the development phase of a product. Therefore, the interested party will already be a licensed developer when they apply to become an software licensee. Exceptions will be made, however, for those parties which have already developed a software product and wish to license it with Nintendo. In such cases, the interested party will be processed and approved as a Nintendo Authorized Software Developer first, then processed as a Nintendo Authorized Software Licensee. In either case, the requirements in the following paragraphs will apply.
i
Parties interested in becoming a Nintendo Authorized Software Licensee should contact the NOA Licensing Department via telephone, FAX, or in writing. In response, the NOA Licensing Department will send a letter which describes specific requirements for becoming an software licensee. These requirements are described, in general, beginning on the following page.
1.3.1. LETTER OF APPLICATION
A prospective licensee's letter of application should include the following items.
1)
5)
6) A detailed description of the company, including a summary of relevant industry experience, financial resources and stability, and industry leadership or market share. This information should be in the form of a prospectus, business plan, or summary statement.
A detailed introduction to key personnel and developers setting forth any technical, managerial, or development experience which may be relevant.
A marketing plan for the proposed product(s), including wholesale/ retail price points, targeted distribution channels, advertising commitments, consumer service systems, and merchandising.
Any market study information on consumer demand for the proposed product(s) which the company may be relying upon.
Awritten description (in general terms) of the proposed product.
A complete listing and at least three samples of software previously developed, especially those which incorporate elements important to successful NOA software or similar entertainment software.
1.3.2 NOA ASSESSMENT
NOA will make a preliminary determination if the:
- Product would compliment our current line of video game products.
- Company is capable of the distribution and customer service necessary to support a successful product.
- Product has any special technical requirements.
NOA’s Licensing Department will inform the company of the decision made.
NOA LICENSED SOFTWARE APPROVAL PROCESS
J
1.3.3
1.3.4
1.3.5 TECHNICAL SUPPORT
If NOA decides to proceed, the prospective licensee will be provided with any technical considerations, suggestions, and any specific technical information required. Technical support will be provided throughout the development of the product, as needed. With respect to those parties previously licensed as developers, this will mean continued support; while those parties contacting Nintendo for the first time will receive a set of technical documentation which is related to the proposed product. A formal confidentiality agreement must be formalized prior to the release of support materials, if one is not already on file.
PRODUCT SUBMISSION AND TESTING
Once the proposed product has been developed and tested by the prospective licensee, it should be submitted in accordance with the applicable software submission requirements, “Super NES Software Submission Requirements” are presented in the following chapter. The samples provided will be tested and results forwarded to the prospective licensee. In cases where failure conditions are detected during testing, NOA will require that the area(s) be corrected and the product be resubmitted for testing.
FORMAL LICENSE AGREEMENT
Once the proposed product is approved, NOA will prepare a formal license agreement for the prospective licensee’s review and signature. When formalized, this agreement authorizes the licensee to go into production with the specified licensed product.
[
Chapter 2. Super NES Software Submission Requirements
All software submissions to Nintendo of America Inc. must be forwarded to the attention of NOA Product Testing Supervisor. Otherwise, the submission’s placement into the testing queue may be delayed. To help reduce a submission’s turn-around time, it is suggested that licensees assign a primary contact person for each software submission. All communications with NOA concerning a submission’s testing status should be forwarded through this individual. The contact person should also be responsible for notifying any other interested parties.
When a submission is not approved, NOA may send a videotaped copy of the programming problem(s) which prevent(s) the submission from being approved. This is intended to assist the licensee in analyzing the cause of the software problem. It is the licensee’s responsibility to send a copy of this tape to any developer(s) of the software. NOA strongly encourages that copies be sent to developer(s) of the software as quickly as possible.
2.1. SPECIFICATION SHEET AND CHECK LIST The appropriate Software Specification sheet and the Software Submission checklist must be filled out completely and must be correct for the particular program version.
2.2. PROGRAM ROMs One (1) set of the game ROM(s) must be submitted for approval. ROM data submitted must be written on the same size ROM(s) which are intended to be used in production. If a submission ROM is not available in the size to be used, the next size smaller should be used (i.e., a 3M program should be submitted on two 2M ROMs). All ROMs submitted must be of the same manufacturer, size, and part number. A label should be attached to each master ROM which lists game code, ROM version, and ROM number. A copy of the game ROMs submitted should be retained by the licensee for reference, as NOA cannot return originals or copies of submitted ROMs.
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS J
2.3
2.4
2.5
2.6
2.7 EP-ROMs
Submit only the following EP-ROM types for approval.
4M: TOSHIBA TC574000D, SGS THOMPSON M27C4001, HITACHI HN27C4001, MITSUBISHI M5M27C401K, NEC D27C4001, Texas Instruments TMS27C040-JL, TMS27C040-JL4, TMS27C040-JE, TMS27C040-JE4, ATMEL AT27C040-12C, MACRONIX MX27C4000DC-12 8M: ATMEL AT27C080-10DC, AT27C080-12DC, NEC D27C8001 SGS THOMPSON M27C801-120F1
ROM DATA
In addition to the EP-ROMs, a copy of the ROM data must be submitted in binary format on MS-DOSg 3.5 inch disk(s). The size of the file must be equal to the size of the EP-ROM (i.e., one 4 Meg EP-ROM = one 4 Meg file).
GAME PLAY VIDEO TAPE/RATING CERTIFICATE
A video tape containing complete game play is required unless the product has been rated by the Entertainment Software Ratings Board (ESRB). If the product has been rated by the ESRB, then a copy of the rating certificate must accompany the submission and no video tape is needed.
SCREEN TEXT A printed copy of the complete screen text must be submitted.
INSTRUCTION MANUAL
Complete game play instructions must be submitted.
1-2-2
2.8 SOFTWARE VERIFICATION The following verification process will significantly improve the probability of approval of your software.
1.
2. 3.
he
10.
11.
12.
13. The licensing screen on all submissions should state “LICENSED BY NIN- TENDO”. Confirm the Licensing Screen information is correct. Check the spelling on the Licensing Screen and Title Screen, as well as the spelling and grammar in the screen text. Confirm the use of a™, circle R (®), or circle C (©) where applicable. Run a “Bypass” Test to assure that, when the game is powered up, the Licensing Screen is visible for at least one second, even if any combination of controller buttons are pressed repeatedly. Also “Power-up” the software repeatedly to assure it does so without programming failures. Game characters should be moved in all possible directions or positions, regardless of whether it is required to play the game properly. For instance, if the game does not require going to a particular area to complete the game, go there anyway to assure there are no programming problems in going to that location. The software should be paused many times during the test, as this often causes programming problems to surface. All testing should be recorded onto a videotape, making it easier to review programming problems. The entire attract mode (demo) should be viewed to assure there are no programming problems. Routines designed to assist the programmer or developer in “debugging” the software should be removed from the game prior to submission. This includes routines to determine hardware type. All references to the Super Famicom, Super Famicom logos, or Super Famicom controllers (with multi-colored buttons) should be removed or revised to represent the Super NES. All games for use with the Super NES Super Scope are required to include a calibration mode. All games are required to have a pause function activated by the “Start” key.
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
2.8.1
2.8.2
2.8.3 LICENSEE GAME PLAY VIDEO TAPE PASS/FAIL GUIDELINES ils The licensee game play video tape must be recorded on a VHS tape, Standard Play speed (SP) for clarity. No editing of the tape is allowed. If more than one tape is needed to show the entire piece of software, then when a second tape begins it must show that the player is in the exact same place as when the first tape left off. No codes or “built-up” characters are allowed. All levels or areas must be completed, in succession. Screen text must have correct grammar and spelling. No deviations from NOA Software Standards Policy may be present. The entire ending credits (if any) must be shown.
LICENSING SCREEN INFORMATION PASS/FAIL GUIDELINES The following Licensing information should be included for all software. This can be displayed on one (1) or two (2) screens. en
PNOnS
ils Licensee’s software title.
- Licensee's trademark and copyright notice (© 19__ Licensee’s name or copyright owner)
- LICENSED BY NINTENDO | EXAMPLE:
Tom’s Golf™or®
© 1992 ABC Corporation LICENSED BY NINTENDO
If a blank screen appears for more than two seconds when powered up, Nintendo suggests placing a message or graphic on the screen so that consumers do not think their game is inoperable (e.g., --“Please Wait”--). If a blank screen appears for more than five seconds during game play, a message or graphic should also be placed on the screen.
COMMON PROBLEMS Some possible problems that may prevent approval of a piece of software include, but are not limited to the following:
Lock up of the software. Scrambled blocks or characters appear on the screen. The software won't pause. Your character can get stuck somewhere with no possible way to get out. Scrambled graphics at the edges of the screen when the screen scrolls in any direction. Vowels in the passwords or password entry-system. Colored lines at the top or bottom of the screen. Shifting of the screen in any direction (other than normal scrolling). Inconsistent scoring methods. Ce Bee tl
COND
[
2.8.4 10. 1. 12. 13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23. Flashes on screen. Small flickering lines on the screen. Hit or be hit by an enemy but no damage is incurred. Three (3) or four (4) player game can be started without using a four player adapter. Incorrect Licensing Screen; “Licensed by Nintendo” should appear for all formats. Violation of any Programming Cautions in the product Development Manual. Use of the Nintendo logo or representations of Nintendo products in software without license agreement. The use of the term Super Nintendo or Nintendo when the Super Nintendo Entertainment System or Nintendo Entertainment System is the intended reference, respectively. Character actions are inconsistent (for instance, a character that cannot fly, being able to walk off the edge of a platform and stand in midair). Referring to the Nintendo control pad by an unacceptable term, such as; “joypad”, “directional control”, etc. Referring to the Nintendo Controller by an unacceptable term, such as; “joystick”, etc. Referring to the Nintendo game pak by an unacceptable term, such as; “Game Cassette”, etc.
A NOTE ON OBJECTIONABLE MATERIAL A copy of the Nintendo “Game Content Guidelines’ is included in book 2 of this manual. If you are unsure of whether an item of text or element of a game is within Nintendo Software Standards, you may contact our Product Analysis Department early in the development process and they will go over questionable items over the phone. In cases concerning an extensive amount of text, please send it to the attention of NOA Product Testing Supervisor, using the address listed in the Preface of this manual, with the questionable items highlighted. The material will be evaluated and you will be contacted within a week to ten days.
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS ]
MACHINE TYPE
GAME NAME
COMPANY
GAME CODE
VERSION
REMARKS SOFTWARE SUBMISSION CHECK LIST
C SNS OC VUE O DMG
SNS__ __ _ — VUE_._ _ _ DMG_. _ _ _
OOOO O OOO Evaluation
Approval Vereen
Specification Sheet
1Set of ROMs (These must be specific EP-ROM type. See Submission Requirements.)
MS-DOS, 3 1/2 Disk(s) (Files must be in binary format. See Submission Requirements for specific information.)
1 copy of Custom DSP IC if api licable
(Super NES Submissions On! rit
1 Copy of VHS Tapes or ESRB Rating Certificate Screen Text
Instruction Manual or Game Play Instructions
1-2-6
THIS PAGE INTENTIONALLY LEFT BLANK
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
Super NES Software Specification
Game Title ProductCode} SNS-
Accessories Super Scope [Super NES Mouse Overseas G
None | MultiPlayer 5 Other ( )
, No:[_]Yes Game Title:
Version O ‘0 Country: Release Date:
Company Department Contact Name Address
Tel: Fax No.:
Submission Lf | Method of Submission: Date “wp YC Mail, (8yHand
ROM Registration Data Data Name] Address Data Data Name |Address| Data n| Game Title FFCOH- >» Maker Code FFBOH = |—_H('__}) Registration FFD4H \ FFBIH H('___)| Map Mode FFDSH .
FFB2H ——H (' __)} Cartridge Type FFD6H H Soyer FFB3H H('___)| ROM Size FFD7H H FFB4H CC ) RAM Size FFD8H H »| Destination FFBSH H('__') Code FFD9H H ee Mask ROM Ver. _| FFDBH H ansion ——T RNS FFBDH = | —____H Complement [1 | FEDCH H Special Version | FFBEH H ee i is — Cartridge T) (Subnumoer)_ | FFBFH |__| heck Sum Py eepFH TH
- Write equivalent letter in parenthesis “( )". Game Title Registration Oo12345678 9 Game Name FFCO Code (ASCII) Game Name Code (ASCII)
- Use code 20 (H) to fill space and unused area. FFDO
Addendum 1 (Continued on reverse side)
‘SNES DEVELOPMENT MANUAL
ROM Version Mask ROM] Oo O1 O2 O3 O_ EP-ROM OO O12 O3 94 O5 O_ GE (interim Memory Configuration ROM |Size: MBit | High Speed Required? [] Yes [] No N Size: Bit ram | ONe OYes Battery Back Up? O No QC Yes [None [DSP (DSP__) 1 Super FX (Expansion RAM Bit) Data back-up: [J Yes [] No
me O Super FX2 (Expansion RAM Bit)
processor Data back-up: [] Yes [] No 0 SA-1 Internal RAM Data Back-up: O Yes CINo D1 Other:
Check Sums EP-ROM ——MBits x___ Pcs x 1 Set Configuration’ Manutactores — — — — — ~ ~~ “[Model No.7 ROM 0 H ROM 4 H ROM 1 H ROM 5 H ROM 2 H ROM 6 H ROM 3 H ROM 7 H
Total H
Affix a label to master ROM which contains product Game Code, ROM Version, and ROM Number. Total check sum must be written even though disk media is used.
File Names Floppy Disk 3.5” [DSHD MOHD __ Pesx1 Set Configuration “File Name _| HEX Code File Name | HEX Code FILE 0 H| FILE? H FILE 2 _ H| FILES a eee FILE 4 _ H{ FILES _ H FILE 6 H] FILE7 H
Special Programming [ Special Programming? LO Yes ( ) ONo |
Remarks:
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
Instructions for Super NES Software Specification
1. Game Title, Product Code, Scheduled Release Date, Accessories, Overseas Version, Company, Contact, Address, Telephone No., Fax No., submission date and method. Product Code (4 digits) will be determined by Nintendo. Scheduled release date should be entered. Game Title includes sub-title if any. Indicate accessories other than standard controller which can be used. If the product has been sold, or is to be sold in another country; write the game title, country, and the scheduled release date in that country. Company, Contact, Address, Telephone No., Fax No. must be completed. Submission date and method of submission should be entered.
ROM Registration Data Write the contents registered in the indicated addresses of the master ROM. Refer to “Description of ROM Registration Data Specification” for details. Enter ASCII characters in areas marked with parenthesis “( )”.
Game Title Registration Enter the game title registered in the master ROM using ASCII characters and their ASCII codes. Refer to “Character Code List for Game Title Registration”.
1-2-10
- ROM Version
Mask ROM Version The Mask ROM Version number starts from 0 and increases for each revised version sent for changes after starting production. EP-ROM Version The EP-ROM Version number starts from 0 and increases for each revised version sent for approval. Example
First_ | Second] Third = Fourth] Fifth Mask ROM 0 0 0 1 1 . Change after
Version first production
EPROM 0 1 2 0 1 Version Version on Title] 0.0 0.1 0.2 1.0 11 Label of ROM
First Production
= Sixth [Seventh Change atter 2 2 second production 7 eocce
2.0 2.1
ft tT Second Production Third Production
- Memory Configuration Enter the memory configuration of the product. Enter ROM size and whether or not High Speed Mode (3.58MHz operation) is required. RAM If RAM is used, enter memory size and indicate whether or not Battery Backup is used.
External Co-processor If an external co-processor is used (i.e., DSP1, Super FX), select the configuration used.
1-2-11
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
- Check Sums Enter the check sum of each ROM submitted. To calculate the check sum, add each byte in the ROM data. The lower 2 bytes of the resulting value is the check sum. Enter the check sum for each ROM submitted for the master program and the total of their individual check sums. The total is calculated by simply adding the individual check sums. This method of calculation is different from the check sum on the ROM Registration Specification.
- File Names Write the file name of each disk using the following conventions.
XXXX XX -X . SFC Disk Number ROM Version Game Code (4 digits of Product Code)
For example,
If the Game Code is AAAE, ROM version is 0.1, and ROM size is 8M; the first disk (Disk 1 of 1) should be named: “AAAE01-0.SFC” (8M file).
If, on the other hand, the Game Code is MW, ROM version is 1.0, and ROM size is 20M; 1st Disk (1 of 3) = “MW_E10-0.SFC” (8M file) 2nd Disk (2 of 3) = “MW_E10-1.SFC” (8M file) 3rd Disk (3 of 3) = “MW_E10-2.SFC” (4M file)
- Special Programming If special programming is implemented, such as for the purposes of copyright protection, it should be indicated. Also, the contents of the special programming must be explained in writing.
- Remarks
If a special configuration of game pak is used, please note the special configuration here. Write the name of the evaluation board which was used for debugging the game. Please write the full name as printed on the board. For example, SHVC-4PV5B-10 If several boards were used for debugging the game, all boards must be listed.
1-2-12
Character Code List for Game Title Registration
00 | 10 | 20| 30} 40| 50} 60 0 isp] o] e| pl ' 1 t1ta}alala 2 ‘ 2{ Bi] R] »b 3 #/] 3] C}] S| ci] s 4 $| 4] D{T] dq] t 5 %| 5} E] Uj ej u 6 &}| 6] F] vi f vi 7 4 71 G]W{| gi w 8 ([ ef Hu] xf rl x 9 yfotilyftify A * J] Z] if 2 B + K] [ k | { c , <]|L ¥ I | D -{ =| Mi] J] m]} i E -f >] Nn] A] on] ~
F /}|2?] Of _|o
Exanple: If ASCII character is A, ASCII code is 41.
1-2-13
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS [
ROM Registration Data Specification
a6 Insert the game title and Super NES game specification at the specified addresses in the ROM.
- The ROM Registration Data area is 48 bytes from address 00:FFBOH ~ 00:FFDFH in Super NES Memory.
- The address in ROM for registration data, using Map Mode 20, is 007FBOH ~ 007FDFH.
- The address in ROM for registration data, using Map Mode 21, is OOFFBOH ~ OOFFDFH.
- The address in ROM for registration data, using Map Mode 23 (SA-1), is OO7FBOH ~ 007FDFH.
- The address in ROM for registration data, using Map Mode 25, is 40FFBOH ~ 40FFDFH.
- ROM registration data should be stored using the format below.
Cartridge Sub-number (Normally 00H) Special Version (Normally 00H) Expansion RAM Size r— Maker Code | r— Game Code Bank 00 am o|1 2 3/456789ABCDEF FFBOH ' " ]00/00[00]00]o0]o0/oo FecoH[ "Game Title FFDOH| GameTitle |,|, 33 ran
ROM Size Complement Check RAM Size Destination Code Mask ROM Version
- The following data will be stored in Super NES Memory for every Super NES game. 00:FFB6H ~ 00:FFBCH = 00H 00:FFDAH = 33H
Addendum 1 1-2-14
E
Description of ROM Registration Data Specification
is Maker Code (FFBOH, FFB1H) Enter the 2-digit ASCII code assigned by Nintendo. Refer to the Nintendo/ Licensee contract, if in doubt. All letters must be in upper case.
For example; If Maker Code is 01, the ASCII code for 0 (30H) is stored at FFBOH and the ASCIl code for 1 (31H) is stored at FFB1H.
If Maker Code is FF, the ASCII code for F (46H) is stored at FFBOH and FFB1H.
- Game Code (FFB2H ~ FFB5H) Enter the 4-digit Game Code assigned by Nintendo in ASCII. All letters must be in upper case.
For Example; If Game Code is “SMW”, the following ASCII codes will be entered at the indicated addresses.
53H (S) => FFB2H 4DH (M) = FFBSH 57H (W) = FFB4H 4AH (J) = FFB5H
If a game program which was previously assigned a 2-digit Game Code is to be manufactured again, the original 2-digit code will be entered followed by 2 “Space” codes. The ROM submission sheet should be completed in the same manner.
For example; If Game Code is “MW’, the following ASCII codes will be entered at the indicated addresses.
4DH (M) => FFB2H 57H (W) = FFB3H 20H (space) = FFB4H 20H (space) = FFB5H
- Fixed Value (FFB6H ~ FFBCH) Store fixed value 00H at addresses FFB6H ~ FFBCH.
1-2-15
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
Expansion RAM Size (FFBDH) Enter the size of the expansion RAM installed in the game pak using the table below. If the size used is not listed below, choose the next larger size which is listed.
For example, enter the size of the RAM used for Super FX co-processor. If no expansion RAM is installed, enter OOH at address FFBDH.
For game paks which use the SA-1, enter OOH at address FFBDH. Enter the size of the RAM used as BW-RAM at address FFD8H.
FFBDH Size of Expansion RAM
00H None
01H 16 KBit
03H 64 KBit
05H 256 KBit
06H 512 KBit
07H 1 MBit
Special Version (FFBEH) This is only used under special circumstances, such as for a promotional event. The code OOH should be entered under normal circumstances.
Cartridge Type Sub-Number (FFBFH) This is only assigned when it is necessary to distinguish between games which use the same cartridge type. The code 00H is normally assigned.
Game Title (FFCOH ~ FFD4H) Enter the game title using ASCII code (JIS 8 bit). Refer to “Character Code List for Game Title Registration” for characters which may be used. The code “20H” should be used for a space and for all unused areas. The game title registered should be close to the title under which the game will be marketed, not a temporary name used for development purposes.
1-2-16
- Map Mode (FFD5H) This location is used to store the map mode and the speed of operation for the Super NES CPU. Select the appropriate code from the table below.
FFD5H Map Mode Super NES CPU Clock
20H Mode 20 2.68 MHz (normal speed)
21H Mode 21 2.68 MHz (normal speed)
22H Reserved-Future Use : 2
23H Mode 23 (SA-1) 2.68 MHz (normal speed)
25H Mode 25 2.68 MHz (normal speed)
30H Mode 20 3.58 MHz (high speed)
31H Mode 21 3.58 MHz (high speed)
35H Mode 25 3.58 MHz (high speed)
1-2-17
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
a)
9. Cartridge Type (FFD6H) Indicate the game pak (cartridge) configuration. Use one of the tables below, depending upon whether or not a co-processor is used.
Without Co-processor
FFD6H Game Pak (Cartridge) Configuration
00H ROM Only
01H ROM + RAM
02H ROM + RAM + Battery
With Co-processor
FFD6H Game Pak (Cartridge) Configuration Upper Lower
O*H - Co-processor = DSP 1H - Co-processor = Super FX
2*H - Co-processor = OBC1 3H - Co-processor = SA-1 E*H - Co-processor = Other
FH - Co-processor = Custom Chip
- *3H ROM + Co-processor
- *4H ROM + Co-processor + RAM
- *5H ROM + Co-processor + RAM + Battery
- *6H ROM + Co-processor + Battery
For example; \f a game pak uses the Super FX as its co-processor and contains a 256K Expansion RAM as game pak RAM for battery backup, store 15H at address FFD6H. In this case 05H would be stored at address FFBDH and 00H would be stored at address FFD8H.
If a game pak uses a DSP as its co-processor and no RAM, store 03H at address FFD6H. In this case 00H would be stored at addresses FFBDH and FFD8H.
1-2-18
If a game pak uses the SA-1 as its co-processor with 64K SRAM and battery, store 35H at address FFD6H. In this case, OOH would be stored at address FFBDH and 03H at address FFD8H.
- ROM Size (FFD7H) The program ROM size is stored at this address. Select the appropriate code from the table below.
FFD7H ROM Size
09H 3 ~ 4M Bit
OAH 5 ~ 8M Bit
OBH 9 ~ 16 MBit
OCH 17 ~ 32M Bit
ODH 33 ~ 64M Bit
- RAM Size (FFD8H) The CPU RAM size is stored at this address. Select the appropriate code from the table below. If CPU RAM is not installed in a game pak, store OOH at address FFD8H. If only expansion RAM (game pak RAM) is installed, such as the one used with the Super FX co-processor, OOH is also stored at address FFD8H. The BW-RAM size for an SA-1 game pak should be stored at this address.
FFD8H RAM Size
00H No RAM
01H 16K Bit
03H 64K Bit
05H 256K Bit
06H 512K Bit
07H 1M Bit
For example; If a game pak does not contain a co-processor and uses a 64K RAM for battery backup, store 03H at address FFD8H. In this case OOH is stored at address FFBDH and 02H is stored at address FFD6H.
1-2-19
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
If a game pak uses the Super FX as its co-processor and contains a 256K Expansion RAM as game pak RAM for battery backup, store 00H at address FFD8H. In this case 05H is stored at address FFBDH and 15H is stored at address FFD6H.
- Destination Code (FFD9H) Store the code, from the table below, which best describes where the product will be sold.
FFDSH Destination ROM Recognition Code
(Language) (Fourth digit of Game Code)
00H Japan J
01H North America E (USA and Canada)
02H All of Europe P 03H Scandinavia Ww 06H Europe (French only) F 07H Dutch H 08H Spanish Ss 09H German D
OAH Italian | OBH Chinese Cc
ODH Korean K
OEH Common A
OFH Canada N
10H Brazil B Nintendo G Gateway System 11H Australia U 12H Other Variation xX
13H Other Variation Y
14H Other Variation Zz
1-2-20
13.
14,
15.
16. Fixed Value (FFDAH) Store fixed value 33H at address FFDAH.
Mask ROM Version (FFDBH) Store the version number of the mask ROM released to the market as a product. The number begins with 0 at production and increases with each revised version.
Complement Check (FFDCH, FFDDH) Store the 1’s complement of the lower 2 bytes of the program check sum in the order of; FFDCH, lower and FFDDH, upper. Refer to “Check Sum’, below, for calculation of the check sum.
(FEDEH, FFDFH) + (FEDCH, FFDDH) = FFFFH
Check Sum Complement Check
Check Sum (FFDEH, FFDFH)
First, store OFFH into the complement check area (FFDCH, FFDDH) and OOH into the check sum area (FFDEH, FFDFH). Then add each byte in the ROM data. If ROM size cannot be expressed evenly in 2M bit, such as 10M or 20M bit, add the remainder until a total of 2"M bit is reached.
For example, If the program contains 12M bit, perform the calculation as if it were 16M bit as shown below.
Remainder [First 8M bit (2°M bit) | Last 4M bit Treat as 2-4M bi
ie 12M bit
] I T6M bit (2M bit) |
(Total of first 8M bit) + [(Total of last 4M bit) x2] = Check Sum
For 10M bit, perfrom the calculation as if it were 16M bit. (Total of first 8M bit) + [(Total of last 2M bit) x4] = Check Sum
For 20M bit, perform the calculation as if it were 32M bit. (Total of first 16M bit) + [(Total of last 4M bit) x4] = Check Sum
For 24M bit, perform the calculation as if it were 32M bit. (Total of first 16M bit) + [(Total of last 8M bit) x2] = Check Sum
Next, store the lower 2 bytes of the check sum value into the check sum area (FF- DEH, FFDFH). FFDEH will contain the lower byte and FFDFH will contain the upper byte.
Then, store the lower 2 bytes of the complement check in registers FFDCH and FFDDH.
1-2-21
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
Data Storage on Floppy Disk
ib
2. Use 3.5” DSHD or HD diskettes in MS-DOS IBM format.
File data must be in ROM image binary format and not compressed. The maximum data size on a disk is 8M bit. If the program being submitted is larger than 8M bit, the program should be divided and recorded on multiple disks. The last disk must be written to use the full 8M bit.
The file name for the disk is determined as follows;
XXXX XX -X. SFC Disk Number ROM Version HW. Game Code (4 digits of Product Code)
for example, “AAAJ01-0.SFC”.
A seal must be affixed to each disk to specify company name, game title, game code, ROM version, date, and disk number.
For SA-1 games, don’t split data by even and odd addresses.
1-2-22
Super NES Cartridge PCB List
Production PCB List*!
22536 SHVC-1A0N 1M/2M/4M/8M None 22537 SHVC-1A1B 1M/2M/4M/8M 16K Batt.
22538 SHVC-1A3B 1M/2M/4M/8M 64K Batt. 22539 SHVC-1A5B 1M/2M/4M/8M 256K Batt.
22540 SHVC-1BON 1M/2M/4M/8M None DSP1
24468 SHVC-1B5B 1M/2M/4M/8M 256K DSP1, Batt
Evaluation PCB id
22427 SHVC-2P3B IM/2M/AM/eM None/eak | atten &, 21945 SHVC-1PON 1M/2MiaMl None 24470 SHVC-205B IM/2M/AMieM None/64K/256K | _Battery*** 25474 SHVC-4PVSB awemnamiiem | Nonefiel6aks |g atteryss ; Battery & 33366 SHVC-4PV7B awam/12m/1em/2am'? | None/512K/1M | sa eplany 28626 SHVC-BPVSB mente NoneseWe4e/ | attery*s 26011 SHVC-2QW5B 4MieM/i2Miiem | None/64K/256K | Battery**5 28625 SHVC-1RA3B6S 4M or 8M 64K or512k:e | Battery & 28760 SHVC-4QW5B 1M ~ 32M None/64K/256K | _ Battery" 2earors | SHVC-Multi Checker | 1M/M/aMisM/16M | None/2SsK/1M | pecemen, 32821 SHVC-8X7B 4M ~ 32M Nonest2kiim | fallery &
Notes:
- Mask-ROM should be used on a Production PCB. Production PCBs listed above are bare boards.
- EP-ROM should be used on an Evaluation PCB. Evaluation PCBs listed above are assemblies.
- SHVC Multi Checker must only be used with SHVC (Japanese Super NES) in order to evaluate SNS software.
- DSP1 must be purchased separately.
- Static RAM(S-RAM) must be purchased separately.
- The 512K SRAM used with GSU may be configured for battery back-up RAM.
- 24M requires change of PLD.
1-2-23
1-2-24
21.3 GAME PAK PCB MEMORY MAPPING
The following memory maps are provided for reference. Only the most commonly used memory maps have been included. For information regarding memory maps which are not shown here, contact NOA’s Licensee Support Group
at (206) 861-2715. SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-25 Figure 2-21-1 SHVC-2P3B PCB MEMORY MAP Mode 20 (4M x 2 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM 20 1/2/4M 1M ~ 8M 64K EF _EQ|DF DOJCF CO|BF_BOJAF AO|9F g0|8F_s80|7F 70|6F 6o|5F 50|4F 40/3F 30]2F 20]1F 10]0F oo] BANK FFF
cose
cosa
«
cose
cosN
cose
cOoSw Image | image Image | Image | |!mage Image | Image 8000} <oorwnn
cose
rosa
a<s
cos
osu image H FFF|
Image | image A Image } image 0000}
7D RAM (64 Kbit) at 70:0000H~70;1FFFH
1-2-26 Figure 2-21-2 SHVC-4PV5B PCB MEMORY MAP. Mode 20 (4M x 4 pcs), Mode 21 (4M x 4 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM 20 or 21 4u/8M"' 4/8/12/16M(8/16/24M"') | None/16K/64K/256K Bank 70-77
FF FO) EF EO|DF DO|CF Co[BF BOo[AF Ao|9F 90]8F 80|7F 70|6F 6O|5F 50]4F 40]3F 30]2F 20]1F 10]oF 00] BANK 7FFFH
F7 7D IFFFAL T
cos
cosa
cose
cose
Enlarged
RAM Area
Image | Image | image | Image 77 256K 4
hy 8000) <ootuMn HW . aac] IFFFH
M Image O7FFH = = bi 0000] 0000H
This memory map is used four 4 Mbit EPROMs. 16K
FF_ FO! EF EO|DF DO|CF CO|BF BOJAF AO 7F 7O|6F 60 4F 40]3F 30{2F 20 BANK
© IFFFA
tL] cose -Eeoo OEe —Eaoo
cos 7D 37 8000} ok {6009 <oocwan
Eso “ 8000H “ JJ ‘ 0000 6000H
85K)
The shaded area indicates RAM
area. Dotted area is RAM image. SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-27 Figure 2-21-38 SHVC-8PV5B PCB MEMORY MAP. Mode 20 (4M x 8 pes), Mode 21 (4M x 8 pcs) 7]
PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM 20 or 21 4M/8M 4/8/12/16/20/24/28/32M | None/16K/64K/256K Bank 70~7D FF FOJEF E0|DF Do|CF Co[BF Bo|AF AO|9F 90[8F 80|7F 70]6F 60|5F 50|4F 40|3F 30|2F 20|1F 10]or oo] BANK 7FFFH
FFFA
Enlarged
RAM Area
T
cose
osu
osm
cose
cosH
ros
cosn
Oso Image | Image} Image | Image | Image | image] image | Image asek -|
8000
R i gay] 1FFFH
image is 000] femme se Ths memeny Map is used with sight Mbt EPROMS. 76K Use bank FE and FF for the program ROM area corresponding to bank 7E and 7F. The image of bank 70 is generated in bank 71-7D and FO-FF.
<oocunn PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM 20 or 21 4M/8M 4/8/12/16/20/24/28/32M | None/16K/64K/256K
Enlarged RAM Area
[2F 20 | coz -esoe OF 00} BANK FFFF]
Oso ~ E000
cos-
acoso
OEY —Eaoe ee
nose -Esoo 8000}
- 46000) <oorwan
-Esoo
-Eono 0000} area. Dotted area is RAM image. ‘SNES DEVELOPMENT MANUAL
1-2-28 Figure 2-21-4 SHVC-8PV5B PCB MEMORY MAP. Mode 20 (8M x 4 pes), Mode 21 (8M x 4 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM 20 or 21 4M/8M 4/8/12/16/20/24/28/32M | None/16K/64K/256K Bank 70~7D FF FOJEF EO|DF DO|CF CO[BF BO|AF AO|9F 90]8F 80|7F 70|6F 60|5F 50]4F 40|3F 30]2F 20]1F 10]oF oo] BANK 7FFFH
IFFFA
M M M M Enlarged
RAM Area
256K 4
_ 8000} <aorwon i Gar] 1FFFH
Image O7FFH
- 0000 0000H
This memory map is used with four 8 Mbit EPROMs. T6K
Use bank FE and FF for the program ROM area corresponding to bank 7E and 7F. The image of bank 70 is generated The earlier 8PVSB PCB version can use up to 64M ROM, but do not exceed 32M on this PCB (DSW1 pin 7 off) in bank 71~7D and FO-FF. PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM 20 or 21 4M/8M 4/8/12/16/20/24/28/32M | None/16K/64K/256K FF FOJEF E0|DF DOo[CF Co[BF Bo|AF AO|9F 90]8F 80|7F 70]6F 60|5F 50|4F 40]3F 30]2F 20]1F 10]oF 00] BANK : cs IFFFF]
ozs —Eaoe
OE Enos
aOs- Eso
ozs -Eoo8
O30 —Enoe
cOz¥ —Ea00
- + 4rOSe
---OsN
+ -Os0
-- ose 8000} 46000} <oorwnn 3F_3C 3330
-Ewoe- - - —Ewoo- --
-Eaoo---
—Eomo--- 0000}
The ROM image in address 8000H ~ FFFFH of bank COH ~ FFH is generated in bank OOH ~ 3FH and 80H ~ BFH. The earlier 8PV5B PCB version can use up to 64M ROM, but do not exceed 32M on this PCB (DSW1 pin 7 off), The shades a aia Is HAM image SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-29 Figure 2-21-5 | SHVC-2Q5B PCB MEMORY MAP Mode 20 (4M x 1 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM Auxillary Device 20 1M/2M/4M 1/2/4/5/6/8M None/64K/256K DSP FF FOJEF EQ|DF DO|CF CojBF BOJ|AF AO|oF go|8F so|7F 7o|6F 60|5F S0|4F 40|3F 30]2F 20]1F 10]oF oo] BANK FFF
io} Ss P 2 a Image Image| image Ld 8000
Image
cose
cos <oorwHnn 0000} The ROM2 area always starts from bank 10. if 1 Mbit (OOH~03H) or 2 Mbit (00H-07H) EPROM is used for ROM1, and ROM2 is used, ROM 1 and ROM2 are not continuous.
‘The DSP image appears in bank BO-BF, but do not use this area in the high speed mode. The RAM image appears in bank FO~FF, but do not use t h speed mode. Bank 30~3F Bank 70~7D (BO-BF) Peeerl FFFFH The status image in address COOOH~FFFFH of bank 256k 7] 3F is generated in address COOOH~FFFH of each bank of DSP area.
7] SFFFH
641 The image of bank 70 is
7FFFH generated in address 0000OH~7FFFH and 8000H~FFFFH of bank 71~7D.
256K 7} and FO~FF. OrEEDO CO00H The data image in address 8000H~BFFFH of bank 3F is generated in address 8000H~BFFFH of each bank of DSP area.
Ochre
1FFFH 0000H
Enlarged RAM Area
64K 8000H read from and write to DSP.
Enlarged DSP Area
Figure 2-21- SHVC-2QW5B PCB MEMORY MAP Mode 20 (4M x 2 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM Auxillary Device 20 or 21 4M/8M 4/8/16M None/16K/64K/256K DSP
1-2-30 FF _FOJEF EO|DF DO|CF CO|BF BOJAF AO|9F 90|8F 80|7F 70|6F 6O|5F_50|4F 40|3F 30]2F 20]1F 10]0F oo] BANK 70 FFA
cose
cosn
ano
aas ge Image | Image oon
acts
Image
Wr ~ = 8000} <oorwan
t t D | s I P
1 Image
0000}
1 i The DSP image appears in bank BF and EO, but do not use this area in the high speed mode. The RAM image appears in bank FO~FF, but do not use this area in the high speed mode. Be aware that the DSP area will change, depending upon the ROM size greater or less than 8M, during Mode 20.
Bank 3F
Bank 70-7D (BF) reer FFFFH
The status image in address COOOH-FFFFH of bank
256K "| SF is generated in bank BF.
9FFFH OF <EDO
The image of bank 70 is
7FFFH generated in address 0O00H~7FFFH and 8000H~FFFFH of bank 71~7D
256K | and FO~FF. COO0H
The data image in address 8000H-BFFFH of bank 3F
is generated in bank BF.
Odte
1FFFH 0000H Enlarged RAM Area 64K Note: Use COO0H/8000H for a port to 8000H read from and write to DSP.
Enlarged DSP Area SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-31 Figure 2-21-7 SHVC-2QW5B PCB MEMORY MAP. Mode 20 (8M x 2 pcs)
PCB Configuration
Mapping
Usable EPROMs
ROM Size
Usable RAM
Auxillary Device
20 or 21 4M/8M 4/8/16M None/16K/64K/256K DSP
FF FOJEF EO|DF DO|CF CojBF BO[AF AO|9F 90]8F 80|7F 70 6F 60 SF _50|4F 40/3F 30)2F 20]1F
2)
a<s Image 7D. a<s ana
Wy [4/ 10/0F oo] BANK FFFA 8000} 0000} <aorunn
The DSP image appears in bank E0, but do not use this area in the high speed mode. The RAM image appears in bank FO~FF, but do not use this area in the high speed mode. Be aware that the DSP area will change, depending upon the ROM size greater or less than 8M, during Mode 20.
Bank 70-7D FFFFH 256K || 9FFFH 7FFFH 64K 256K 7] 1FFFH 0000H Enlarged RAM Area 64K The image of bank 70 is generated in address 0000H-7FFFH and 8000H~FFFFH of bank 71-7D
and FO-FF. 7FFFH 4000H 0000H Enlarged DSP Area The status image in address 4000H~7FFFH of bank
60 is generated in bank E0. Do The data image in address 0000H-3FFFH of bank 60
B) is generated in bank E0.
A
1-2-32 Figure 2-21-8 | SHVC-2QW5B PCB MEMORY MAP Mode 21 (4M x 2 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size
Usable RAM Auxillary Device
20 or 21 4M/8M 4/8/16M None/16K/64K/256K DSP
FF FOJEF EO|DF DO|CF CO|BF BOJAF AOJ9F 90/8F S80|7F 70|6F 60|5F S50|4F 40]3F_ 30 QF 20|]1F 10/0F oo| BANK FFF
R A M = Image | Image
eae R a \ i EDN faa | s | P
! 8000} “a 6000} <oorwnn
cts 0000}
The ROM image in address 8000~FFFF of bank CO~CF appears in bank 00-0F and 80~8F. During Mode 21, the DSP area does not change even if the ROM size changes.
Bank
Enlarged RAM A\ nlarged rea he fea
3F T7FFFH
STATUS
(Read Only)
7000H
DATA
(ReadMrite) 6000H Enlarged DSP Area 6FFFH
The shaded area is the RAM area, while the dotted area is the RAM area image. 6000H The status image in address 7000H-7FFFH of bank 00-OF
appears in bank 80~8F. The data image in address 6000H~6FFFH of bank 00-OF
appears in bank 80-8F. a] SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-33 Figure 2-21-9
SHVC-4QW5B PCB MEMORY MAP. Mode 20 (4M x 2 pcs) ROM Size is 8M or Less
PCB Configuration
Mapping | Usable EPROMs
ROM Size Usable RAM Auxillary Device
20 or 21 1M/2M/4M/8M 1/2/4/6/8/12/ None/16K/64K/256K DSP
16/24/32M
FF FO[EF EO|DF DO|CF Co| BF _BOJAF AO|9F 90/8F_ 80 7F 70 6F 60 SF 50|4F 40]3F 30/2F 20]1F 10}0F 00} BANK
cose
mosn Image | Image 5 IFFFFL
\
Image
8000} <oocwnn 0000}
The RAM image appears in bank FO~FF, but do not use this area in the high speed mode. Ensure that the DSP area is switched to bank 3F when the ROM size is 8M or less during Mode 20 operation. (DSW1 [8] should be On.)
Bank 70~7D
7FFFH
256K |
1FFFH
64K O7FFH lx 0000H Enlarged RAM Area The image of bank 70 is appears in address 0000H~7FFFH of bank 71~7D and FO~FF. Bank 3F eereHy
OFR<EDO acre 8000H Enlarged DSP Area
1-2-34 Figure 2-21-10 SHVC-4QW5B PCB MEMORY MAP Mode 20 (4M x 4 pcs) ROM Size is 12M or Greater PCB Configuration | Mapping | Usable EPROMs ROM Size Usable RAM lary Device 20 or 21 1M/2M/4M/8M 1/2/4/6/8/12/ None/16K/64K/256K DSP
16/24/32M FF FOJEF E0|DF DO|CF CO[BF_BO|AF AO|9F 90|8F_ 80|7F 70|6F 60|5F 50 BANK
xos~
cosa
rose
cost Image | Image | Image | Image 7D
R D M lid Image | Image <oarwnn
oS The RAM image appears in bank FO-FF, but do not use this area in the high speed mode. The DSP image appears in bank EO-EF, but do nol use this area inthe high speed mode. Ensure that the DSP area is switched to bank 60 when the ROM size is 12M or greater during Mode 20 operation. (DSW1 [8] should be Ott.)
Bank 70~7D
7FFFH
STATUS The status image in address 4000H~7FFFH of bank 60~6F
(Read Only) appears in bank E0~EF.
4000H SFFFH
DATA
256K | |
The image of bank 70 is appears
1FFFH in address OOOOH~7FFFH of bank 71~7D and FO-FF. ; The data image in address 0000H-3FFFH of bank 60~6F
(ReadMWrite) appears in bank EO~EF.
O7FFH 0000H
Enlarged RAM Area
0000H Note: Use 4000H/0000H for a port to 0000H read from and write to DSP.
Enlarged DSP Area
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-35 Figure 2-21-11 | SHVC-4QW5B PCB MEMORY MAP Mode 21 (4M x 4 pcs) PCB Configuration | Mapping | Usable EPROMs ROM Size
Usable RAM
20 or 21 1M/2M/4M/8M 1/2/4/6/8/12/ 16/24/32M None/16K/64K/256K DSP
FF FOJEF EOQ|DF DO|CF CO|BF_BOJAF AO|9F 90|8F 80]7F 70|6F 60|5F 50|/4F 40/3F 30|2F 20]1F
BANK
s u S| Ee
R A M Image | Image mOS+ —Eano
m, | or Ss P iH AE pm es a8] 6000
i FFFAL
coz — <aocwan 0000}
The ROM image in address 8000-FFFF of bank CO-OF appears in bank 00-1F and 60-OF. During Mode 21, the RAM AREA and DSP area do not change even if the ROM size changes.
Enlarged RAM Area (BF) (80)
STATUS
(Read Only)
7000H
6FFFH
DATA (Read/Write) 6000H Enlarged DSP Area
The shaded area is the RAM area, while the dotted area is the RAM area image. 6000H The status image in address 7000H~7FFFH of bank 00~0F
is generated in bank 80~8F. The data image in address 6000H~6FFFH of bank 00~0F
is generated in bank 80~8F.
1-2-36
Super NES EPROM Selection Tables
ROM SIZE
1M~8M 4M~16M |4M~16M 1M~32M]| 4M~32M| 8M~64M. 1M~8M. 4/8/16M. 1M~32M | 4M~32M_|COMMENT|
MODE(S) 20 20/21 20/21 20/21 20/21 | 20/21/25 20/DSP| 20/21/DSP}
FIELD
20/21/DSP| 23/SA-1
STATIC
RAM
SIZE
None/64K| @® None/16/ 64/256K ® ® ® ® © fo) w/back-up
None/ 512K/1M
PCB ASSY
EPROM USED* REMARKS
SHVC-2P3B ASSY 2701001/27C2001/27C4001 64K SRAM Installed
- Cartridge Evaluation Kit (SHVC-2P3B) Same as above 25 Units per Kit
SHVC-4PV5B ASSY 27C4001/27C8001 Up to 24M by changing PLD
iS) Cartridge Evaluation Kit (SHVC-4PV5B) Same as above 25 Units per Kit
SHVC-4PV7B ASSY 27C4001/27C8001 Up to 24M by changing PLD a 1M SRAM Installed
SHVC-8PV5B ASSY 27C4001/27C8001
SHVC-2Q5B ASSY 27C1001/27C2001/27C4001
SHVC-2QW5B ASSY 27C4001/27C8001
SHVC-4QW5B ASSY 27C1001/27C2001/27C4001/27C8001
SHVC Multi-Checker 2021 2701001/27C2001/27C4001/27C8001 256K SRAM Installed
SHVC-8X7B.ASSY 2704001 1M SRAM Installed
© | @/@/@ | /@|o/e SHVC-8PV5B.ASSY-64M 27C8001 *Note: Use EPROM listed above or one with the same pin locations. SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
1-2-37
SHVC Cartridge List (20 Map, Production Type)
ROM size 2M
4M 8M 10M 12M 16M 20M 24M 32M
specification
No SRAM
° ° °
16K
size
256K 512K ° oO SRAM 64K ° fo} fo) °
1M O;}O};/O/O/;O0;0 O}O/}O/O0/0;0 01}0/;/0/</< 0|}0/0/<)< 0O}0}/0/0/}90 O1d|/O14d/<4/4 O}4d|/O;da1 4/4 O}di/ did
[for DSP (77C25)]
10M 12M 16M 20M 24M
sram|_ 16K
64K Oo;<4a);0;0
256K O1}4d;/0O;0 Oo;/4a; 0/0 dj) d/o;4 4d) <4)/ 0/4 ad) 4d/O/4 aiaidia 4/4] 4) a aj da) ajiad
QO : Now available. O : In development. Please submit “Price Quote Request for Super NES Cartridge” to the Licensing
Department of NOA. A: No plan for development at this time. If necessary, please submit “Price Quote Request for Super NES
Cartridge” to the Licensing Department of NOA five months prior to the release date.
Department.
1-2-38
SHVC Cartridge List (21 Map, Production Type)
ROM size 2M
4M 8M 10M 12M 16M 20M 24M 32M Specification
ROM size 2M No SRAM
° ° °
16K
SRAM 64K
512K co} ° 3 fo}
size
256K ° A 1M A O}O/0/0};<aA;<4 O};O/O/O0};<d;< d;O0;/0/<4a/< 0;0/0/<4);< O;0/;/0/<d)/< O}/<4}0);4/<4/< O;d/O/a; 4/4 O}4] 0;4);<4/<4
[for DSP (77C25)]
= So = es = io) 20M 24M 32M
specification
SRAM| 16K Size 64K O}01d/4
256K O}O!1d/<4 0};0;/<d/<4 1);0);0/< a;0;/0};<4 o}|o;o/< d}4d) 4/4 O|<4;4/4 O|d1<4d/4
O : Now available. © :In development. Please submit “Price Quote Request for Super NES Cartridge” to the Licensing
Department of NOA. 4 _: No plan for development at this time. If necessary, please submit “Price Quote Request for Super NES
Cartridge” to the Licensing Department of NOA five months prior to the release date.
Department. SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
THIS PAGE INTENTIONALLY LEFT BLANK
1-2-39
SUPER NES SOFTWARE SUBMISSION REQUIREMENTS
Price Quote Request for Super NES Cartridge
Please send this form to Nintendo of America Inc. Attn.: Juana Tingdale, Licensing Department by Fax at (206) 861-2173.
Date(M/D/Y) / / Licensee Release Date(M/D/Y) / / Game Title
Quantity Contact
Specification Telephone No.
(please circle) <Map Mode> 20 map / 21 map / to be determined (please circle) <ROM size> <RAM Specification> Bit / without RAM <Backup> Yes / No <Co-processor> DSP1 / 1PD77C25 (original program) / other DSP (
Super FX
Others: Please specify it you are inquiring other than standard specification.
OAFLA
K EPROMEROMATTS-- FOR NCL USE ONLY ERB © SHPBRE FRSA |W SS| BB OK
<fi 4 >
<oxr> @ FRA 6 6FKk@ £ A BB ZAR BHe4| eo | eNO | BR
1-2-40
INTRODUCTION
Chapter 1. Introduction The following is a brief discussion of basic concepts used to display game characters on the home television set. Even if you have developed software for the Nintendo Entertainment System (NES), please review this information.
1.1 PICTURE IMAGE GENERATION The picture on a color television set consists of 525 horizontal lines with each line having color information. The broadcasting station breaks the picture into lines as shown in the figure below.
The odd numbered lines are converted to electronic signals from the top to the bottom of the screen. The remaining even numbered lines are converted from the top to the bottom in the same way.
This method, in which a trace is generated and displayed for every other line, is called the 'INTERLACE” method. The electronic signal which has been transmitted is converted to a light signal and will create traces on the television screen in the same order generated.
The act of tracing light on the screen is called “scanning”. The period while scanning the odd numbered lines is called the “1st field”. The period while scanning the even numbered lines is called the “2nd field.” A scan period on the screen is called “one frame”. During the period of one frame, the first and second fields are displayed in sequence. Because 1/60 of a second is required to produce one field, 1/30 of a second is required to produce one frame. Therefore, a certain point on the screen is radiated only every 1/30th of a second. Due to the afterimage seen by the human eye and the luminescence of the CRT, the picture does not normally appear to flicker. Figure 2-1-1 uM Picture Image ee 3——
DOT CHARACTER MAP y= : ES .
ke ’ é k Time Sequence me 6 ee ee
2-1-1
1.2
1.3 SUPER NES DISPLAY
The picture display on the Super Nintendo Entertainment System (Super NES) has two modes. One is an interlace mode, based on the television system. The other is a non-interlace mode, in which one frame takes 1/60th of a second. In the non-interlace mode the same position is scanned every field. Each frame consists of only 262 lines, half that of the interlace mode. There appears to be no flickering compared to the interlace mode, since each point on the screen is radiated every 1/60th of a second.
BLANKING
The screen is scanned from left to the right and from top to bottom (see Figure 1- 1-2). After scanning the screen from left to right, horizontal blanking occurs to prevent the electron beam from being seen as it returns to the left side of the screen. When the beam reaches the bottom right hand side of the screen, vertical blanking occurs to allow the beam to reposition at the top left of the screen without being seen. The NES and the Super NES use this blanking efficiently to display the various movements of characters.
SAAAALA WV a 1st Field (Odd) ——+»<4—— 2nd Field (Even) —» . b : ek eS H-Scanning a c a Figure 2-1-2 - Scanning Pattern for Interlace
OBJECT E ]
Chapter 2. Object (OBJ)
2.1
2.2 OUTLINE This function can display an object in a certain position on the screen. The characters, such as the UFO or the missile of a space game, look like they are moving. If the character's picture is replaced at the same time the point is moved, animation effects can occur (such as “Mario” character looking like he is walking).
FUNCTION The maximum number of OBu’s that can be displayed on the screen is 128 and there are four sizes. Two sizes can be selected in one frame and one size can be selected for each OBJ. There are 8 color pallets for OBJ’s and one pallet can be selected for each OBJ. One color pallet has 16 color codes out of 32,768 colors. Therefore, each OBJ in the picture is drawn by 16 colors. Each of the 128 objects that may be displayed on the screen at one time has its own priority order, which will decide the display priority if 2 or more OBU’s are overlapped. In addition, there is the Flip function of “up-down,” and “left-right,” “BG Priority Order” and the “Priority Order” shifting function.
2.3. SETTING EXAMPLE [INITIAL SETTINGS + Clear each register + Set register <2101H> ] OBJ Size Select OBJ Name Select OBJ Name Base Address + Set D1 of register <2133H> “OBJ V Select” Settings + Set D4 of register <212CH> “Through Main OBJ” Settings SETTINGS
FORCED BLANK + Set register <2115H> V-RAM Address Sequence Mode SETTINGS H/L INC | + Set register <2116H> ~ <2119H> V-RAM Address V-RAM Data SETTINGS
(Transfer OBJ character data to VRAM by DMA) + Set register <2121H>, <2122H> CG RAM Address ‘1 See CG RAM Data
(Transfer OBJ color data to CG {Color Generator} by DMA)
= V-BLANK
+ Set register <2102H> ~ <2104H>
OAM Address ]
in OAM Priority Rotatio SETTINGS OAM Data (Transfer OBJ data to OAM by DMA)
DISPLAY
BACKGROUND Ex
Chapter 3. Background (BG)
3.1
3.2 OUTLINE
The background for OBJ, such as Mario, can be displayed on the screen and scrolled up, down, left or right. This helps the game effect.
FUNCTION There are 8 kinds of BG mode. In BG mode 0 thru 6, there is a difference depending on the combination of numbers of screens, the numbers of the cell color, the resolution and the offset function. There are 4 screens provided and the number of the cell colors are 4 to 256. There are 3 kinds of the resolution selected from 256-dot x 224-dot, 512-dot x 224-dot, or 512-dot x 448-dot. The character size can be set “8-dot x 8-dot” or “16-dot x 16-dot” on each screen. The offset value (scroll coordinate) can be set on each BG screen and the offset value can be changed every horizontal character unit, depending on the mode, so that the vertical partial scroll can be made. Eight pallets can be used per character, and H-Flip or V-Flip is available per character. Also, the priority order of BG and OBJ can be changed per character. (Refer to page A-19) Mode-7 is a screen, which can rotate, enlarge or reduce. There are other functions for BG, such as mosaic, window, fixed color addition/subtraction, screen addition/subtraction, and H-Pseudo 512.
2-3-1
[
3.3. SETTING EXAMPLE
INITIAL SETTINGS
+ Clear each register + Set register <2105H> BG Mode
BG Size 1 SETTINGS SC Size 71
+ Set register <2107H> ~ 210AH>
SC Base Address SETTINGS + Set register <210BH>, <210CH> Set Name Base Address
- Set “DO ~ D3” of register <212CH> * Set Through Main BG
FORCED BLANK
- Set register <2115H> \V-RAM Address Sequence Mode H/L INC SETTINGS
+ Set register <2116H> ~ <2119H> V-RAM Address.
V-RAM Data a SETTINGS
(Transfer BG-SC data & BG character data to VRAM by DMA) + Set register <2121H>, <2122H> CG RAM Address CG RAM Data ‘| SETTINGS
(Transfer BG color data to CG {color generator} by DMA)
=
V-BLANK.
+ Set register <210DH> ~ <2114H> Set BG H/V Offset
DISPLAY
- Incase of BG MODE 5 or 6, “Through Sub BG” of register <212DH> should also be set
MOSAIC f ]
Chapter 4. Mosaic
4.1. OUTLINE
The purpose of this function is to change BG screen to mosaic design and shade off a picture (refer to page A-7).
4.2 FUNCTION A picture element of mosaic design can be changed to 15 sizes and a mosaic design can be selected for BG screen.
4.3 SETTING EXAMPLE
INITIAL SETTINGS + Enable BG to display (See BG Instruction).
> V-BLANK,
+ Set register <2106H> Mosaic Size SETTINGS Mosaic Enable
DISPLAY
24-1
Chapter 5. Rotation/Enlargement/Reduction
5.1
5.2 OUTLINE
In the BG Mode-7 function, more animation effects, are available to the screen through rotation, enlargement or reduction, and a scroll function.
FUNCTION
5.2.1
5.2.2 TYPE! There are 256 character numbers (8-dot x 8-dot size). Each dot can be one of the 256 colors, from a selection of 32,768 colors. In EXTBG mode, each dot can be one of 128 colors from a selection of 32,768 colors and each dot can have priority order. In this function, it is possible to scroll up, down, to the left or right. The center coordinate of rotation, enlargement and reduction can be set at a point either outside or inside of the display area. The rotation angle and vertical or horizontal magnification values are changeable. Also, horizontal flip and vertical flip on the display area are possible. In case the display area goes beyond the screen area, one of three choices can be selected in order to display the excess portion:
- the back drop color
- a single character (CHR# 0)
- repetition (wrap) of the screen area EXTBG MODE(TYPE Il) EXTBG mode is originally provided as a function for the purpose of the LSI BG expand. For the Super NES, this function is used for rotation, enlargement and reduction in 128 colors with priority order..
2-5-1
ES ROTATION/ENLARGEMENT/REDUCTION ad
5.3. SETTING EXAMPLE INITIAL SETTINGS
Screen Over SETTINGS + Clear each register + Set register <2105H>! BG Mode - 7 Settings + Set register <212CH>? Through main BG settings + Set register <211AH> Screen Flip
- On EXTBG mode, EXT input of register <2133H> needs to be set.
- Normally, BG1 should be set, but BG 2 should be set on EXTBG mode.
FORCED BLANK + Set register <2115H>
V-RAM Address Sequence Mode 71 V-RAM Data 1 SETTINGS
H/L INC SETTINGS + Set register <2116H> ~ <2119H> V-RAM Address
(Transfer BG-SC data to lower address of V-RAM and character data to upper address of V-RAM by DMA) + Set register <2121H>, <2122H>
CG RAM Data CG RAM Address “| __settines
(Transfer BG color data to CG {color generator} by DMA)
V-BLANK.
+ Set register <210DH>, <210EH> “BG 1 H/V Offset” Settings
- Set register <211BH> ~ <211EH> “Matrix Parameter” Settings + Set register <211FH>, <2120H> “Center Position” Settings
DISPLAY
2-5-2
Chapter 6. | Window (Window Mask)
6.1
6.2
6.3 OUTLINE
This function limits the display area on the TV screen for BG and OBJ. This window can be set on the TV screen. BG and OBJ can be displayed inside or outside of this area.
FUNCTION
There are 2 windows. Each window can affect either the BG screen or OBJ and can be either internal or external masked. Four types of window mask logic (OR, AND, XOR and NXOR) can be selected for each BG and OBJ, using 2 kinds of windows simultaneously (refer to “Mask Logic Settings for Window 1 & 2” under “PPU Registers’). If this function is combined with the function of H-DMA, various shapes of the window will be formed, such as; a round shape, heart shape, or star shape. It is also possible to use this function combined with the screen addition/ subtraction and fixed color addition functions.
SETTING EXAMPLE
INITIAL SETTINGS
+ Clear each register + Enable BG to display (See BG Instruction) + Set register <2123H> ~ <2125H> “BG, OBJ, Color Window” Settings + Set register <2126H> ~ <2129H> “Window Position” Settings + Set register <212AH> ~ <212BH> “Window Logic” Settings + Set register <212EH>, <212FH> “Through MAIN (Window)” Settings “Through SUB (Window)” Settings
V-BLANK.
+ Set H-DMA etc.
DISPLAY
2-6-1
MAIN/SUB SCREEN E : : ]
Chapter 7. Main/Sub Screen When displaying several BG and OBJ screens, the picture to be displayed in the overlapped portion is decided by two paths. One of them is called the main screen and the other is called the sub screen. The screen to be used for the main and sub screens can be selected by registers <212CH> and <212DH>. Furthermore, the data for the main and sub screens to be displayed is made according to the priority order. Unless the addition/ subtraction screen is done as follows, the “Main SW” of the “Color Window’ in register <2130H> is normally on, and the “Sub SW” is normally off so that only the main screen is displayed (see page A-23).
<212CH>
=) MAIN a)
BG SCREEN Fi MAIN
OBJ SCREEN pereel R |= > scREEN DATA eeteen — I. DATA Y
B 5, séHEEN °° j= Bare SELECT | DATA T. Y
<212DH>
2-7-1
7A SCREEN ADDITION/SUBTRACTION
TAA
MAIN SCREEN
DATA OUTLINE This function is the addition (Overlapping Light) or the subtraction (Lens Filter) for the main screen and the sub screen in order to have the effect of transparency. FUNCTION This function displays the result after the addition or subtraction of RGB data on the main screen and sub screen. This function can also select BG screen or OBJ data on the main screen to be added to or subtracted from the sub screen, similar to the figure below. However, when there is no screen data on the sub screen (screen is clear), the color constant explained on page 1-7-4 will be added or subtracted. When the result of addition or subtraction exceeds 31, the value becomes
- When the result of addition or subtraction is less than 0, the value becomes 0. Please do not use this function on BG mode 5 or 6.
ADDITION/SUBTRACTION
SELECT
SUB SCREEN ADDER-SUBTRACTER }—— DISPLAY
DATA >}
MAIN/SUB SCREEN ]
7.1.3 SETTING EXAMPLE
INITIAL SETTINGS
+ Clear each register + Enable BG to display (see BG instruction) + Enable OB4J to display (see OBu instruction) + Set D1 of register <2130H> “CC ADD Enable” Settings + Set register <2131H> ADD or SUB Enable 1/2 Enable ADD/SUB + Set register <212CH> “Through Main” Settings + Set register <212DH> “Through Sub” Settings | SETTINGS
DISPLAY
2-7-3
f 7
7.2 COLOR CONSTANT ADDITION/SUBTRACTION
7.2.1 OUTLINE This function can perform addition (overlapped light) or subtraction (lens filter) with RGB value (color constant) set by the main screen and register <2132H>. This will change the color on the display area. 7.2.2 FUNCTION This function can perform addition/subtraction by using the RGB value (color constant) which is set by register <2132H> instead of the sub screen of the addition/subtraction screen described previously. 7.2.3. SETTING EXAMPLE
INITIAL SETTINGS
+ Clear each register + Enable BG to display (see BG Manual). + Clear D1 of register <2130H> “CC ADD Enable” Settings + Set register <2131H>
ADD or SUB Enable ] SETTINGS
1/2 Enable ADD/SUB + Set register <2132H> “Color Constant Data” Settings
DISPLAY
MAIN/SUB SCREEN E : g : ]
7.3 COLOR WINDOW (Combination of Window & Addition/
Subtraction)
7.3.1 OUTLINE The Screen Addition/Subtraction or the Color Constant Addition/Subtraction can be performed inside or outside the window (only one or the other). 7.3.2 FUNCTION This function can select what portion of the window should be displayed and added or subtracted on each main screen and sub screen. The following is the function of window, the screen addition/subtraction and the color constant addition/subtraction. 7.3.3 SETTING EXAMPLE
INITIAL SETTINGS
Clear each register Enable BG to display (See BG Manual) Enable OBJ to display (See OBJ Manual) Set register <212EH>, <212FH> Through Main (Window) Through Sub (Window) SETTINGS
Set register <2125H> Set Color Window Set register <2126H> ~ <2129H> Set Window Position Set register <212AH>, <212BH> Set Window Logic Set register <2130H> Color Window ON/OFF settings Set register <2131H> ADD or SUB Enable 1/2 Enable RODISUa | SETTINGS Set register <2132H> Color Constant Data settings
V-BLANK
+ Set H-DMA etc.
DISPLAY
Chapter 8. | CG Direct Select
8.1. OUTLINE
On BG-1 in Mode 3, 4 and 7, the character data can be used as the color data without using CG-RAM color data. BG-1 can be displayed using 2048 colors on Mode 3 and 4, and 256 fixed colors on Mode 7. BG-2 and OBJ can use the CG- RAM color data without being limited to the color data on BG-1,
8.2 FUNCTION When BG-1 on Mode 3, 4 and 7 is displayed on the TV screen, this function will display 8-bit color data per character dot without using the CG-RAM. The CG- RAM data is used for the objects and other background screens.
8.3. SETTING EXAMPLE
+ Enable BG to display (See BG Instruction) + Set “DO” of register <2130H> “Direct Select” Settings
2-8-1
H-PSEUDO 512 C : ]
Chapter 9. H-Pseudo 512
9.1. OUTLINE
In modes other than 5 and 6, this function provides gradation between 2 dots which are next to each other horizontally, which changes the color smoothly.
9.2 FUNCTION
This function utilizes screen addition/subtraction. The color constant addition/subtraction can not be done at the same time that this function is performed.
9.3 SETTING EXAMPLE
+ Enable BG to display (see BG instruction) + Set “D3” of register <2133H> “Pseudo 512” settings + Set register <212CH>, <212DH> Through Main
Through Sub a
+ Set D1 of register <2130H> “CC ADD Enable” settings + Set register <2131H> ADD or SUB Enable 1/2 Enable 71 ADD/SUB SETTINGS
SETTINGS
2-9-1
[
Chapter 10. Complementary Multiplication (Signed
Multiplication)
10.1 OUTLINE
The 2’s complement multiplication will be performed with high speed. For example, to calculate the rotation parameter in mode 7, it will lighten the burden of the CPU processing.
10.2 FUNCTION
The high speed multiplication of 16-bit (2's complement) and 8-bit (2's complement) will be performed with “no-wait,” and the result becomes 24-bit (2's complement).
10.3 SETTING EXAMPLE
+ Set BG other than MODE-7 (or V-Blank/Forced Blank) (Except during V-Blank or Forced Blank period) + Write lower 8-Bit (Multiplicand) to register <211BH>: (Input) + Write higher 8-Bit (Multiplicand) to register <211BH>: (Input) + Write register 8-Bit (Multiplier) to register <211CH>: (Input) + Read register <2134H> ~ <2136H>: (Result)
2-10-1
H/V COUNTER LATCH [ : ]
Chapter 11. H/V Counter Latch
11.1 OUTLINE
This function is used for synchronization of process timing by tracking the scanning beam on the screen.
11.2 FUNCTION
This function sets the vertical and horizontal counter value (when register <2137H> is read) and tracks the raster beam on the screen by reading the register value. (The scanning is synchronized with an internal vertical and horizontal counter.)
11.3 SETTING EXAMPLE
+ Read register <2137H>: (counter latch) + Read register <213FH> (Initialize register <213CH>, <213DH> in the order of Low and High) + Read register <213CH>, <213DH>
2-11-1
Chapter 12. Offset Change
12.1
12.2
12.3 OUTLINE
The horizontal and vertical scroll (offset) value can be performed every horizontal 8-dot (character unit) in mode 2, 4, and 6. The other part of the screen can be brought into the middle of the frame in order to have the effect of a window. A partial vertical scroll can also be made.
FUNCTION
This function can be used in any of the three ways, listed below. + Affect BG-1 only + Affect BG-2 only + Affect both BG-1 and BG-2
The offset for both H and V can be changed at every character unit on mode 2 and 6, but the offset for either H or V (only one or the other) can be changed on mode 4. The same offset will be performed on each line once the offset data for a horizontal line (32 characters) is set. To change the setting of the other offset value, depending on the scanning line, change “BG-3 SC Offset Address” or “BG-3 SC Base Address” during the H-DMA period.
SETTING EXAMPLE
INITIAL SETTINGS
+ Clear each register + Enable BG to display (see BG instruction) Set OFFSET data to BG-3 SC
V-BLANK
+ Set H-DMA etc.
DISPLAY
2-12-1
STANDARD CONTROLLER E a]
Chapter 13. Standard Controller
13.1
13.2 OUTLINE
The switch status of the standard controller can be read automatically in serial order and will be converted to parallel data.
FUNCTION Two standard controllers can be connected to the Super NES. Four standard controllers may be connected by using an expanded connector, such as MultiPlayer 5 (refer to “Accessories”). Single bit data is assigned to each switch. Up to 16 bits can be read automatically for one standard controller. The expanded bit data can be read 1 bit at a time by the software, as for the NES. The hardware reads the data for about 215 us after the V Blank flag is set or NMI is applied. During this data read period, the standard controller register cannot be read properly.
. 215 (214.55) us is equivalent to 3.4 (3.38) scanning lines; a period of 580 (576) bytes to be transferred by DMA. (If the CPU clock is 2.68 MHz, it is equivalent to 580 machine cycles.) As soon as V-Blank starts, normal flow is to perform general purpose DMA. Therefore, it is convenient if the total number of bytes to be transferred by general purpose DMA is used for read timing. (Please refer to the System Flowchart.) . The standard controller data (register) should be read after confirming that “JOY-C Enable” of register <4212H> is not set during the V-Blank period, so that valid data can be read. ° After the 18 us (48 machine cycles with 2.68 MHz) from the beginning of V- Blank, the hardware will start to read. “Standard CNTRL Enable” of register <4212H> cannot be set during this period.
2-13-1
13.3 SETTING EXAMPLE
INITIAL SETTINGS
+ Set “1” to “DO” of register <4200H> “Standard CNTRL Enable” Settings + Set “0” to “DO” of register <4016H>
V-BLANK
+ Process for DMA (215 ys or more) > Read register <4218H> ~ <421FH> + Read register <4016H> & <4017H> (If expanded bits exist)
DISPLAY
2-13-2
PROGRAMMABLE I/O PORT
Chapter 14. Programmable I/O Port
14.1
14.2 OUTLINE An 8 bit programmable I/O port is provided for interface to peripheral devices, such as; a keyboard, the 3D glass, etc.
HOW TO USE A “1” should be written to register <4201H> for the bit to be used as the in-port. The selected bit will become the in-port, which can be read by register <4213H>. Output data should be written to the bit of register <4201H> to be used as the Out-port. This data can be output directly. %* Only 2 of the 8 bits can be used at the connector for the controller (Refer to page 1-28-1).
2-14-1
Chapter 15. Absolute Multiplication/Division
15.1
15.2
15.3 OUTLINE
Absolute multiplication (8 bit by 8 bit) and absolute division (16 bit by 8 bit) can be done using this function. It is also convenient for processing arrays of tables and can improve the processing speed for multiplication and division.
FUNCTION
The multiplication calculation between the multiplicand of an 8 bit absolute value (0 ~ 255) and the multiplier of an 8 bit absolute value (0 ~ 255) can be performed and can provide the result of a16 bit product (0 ~ 65025). The division calculation between the dividend of a 16 bit absolute value (0 ~ 65535) and the divisor of an 8 bit absolute value (0 ~ 255) can be performed and can provide the result of a 16 bit quotient (0 ~ 65535) and a 16 bit remainder. If the divisor is “O” in the division calculation, the quotient value becomes 65535 (OFFFFH) and the remainder becomes the dividend value. Therefore, caution is required. It takes about 8 machine cycles for the multiplication calculation and about 16 machine cycles for the division calculation. The register value for multiplicand and dividend will not be destroyed even after the operation.
SETTING EXAMPLE
© Incase of Multiplication o Set register <4202H> “Multiplicand-A” Settings o Set register <4203H> “Multiplier-B” Settings o Wait for 8 Machine Cycles o Read register <4216H>, <4217H> Read Product-C e Incase of Division o Set register <4204H>, <4205H> “Dividend-C” Settings e Set register <4206H> “Divisor-B” Settings o Wait for 16 Machine Cycles o Read register <4214H>, <4215H> Read Quoiient-A o Read register <4216H>, <4217H> Read Remainder
2-15-1
H/V COUNT TIMER [ ]
Chapter 16. H/V Count Timer
16.1 OUTLINE
The Super NES has a timer synchronizing with the display on the TV screen,
which is used for adjusting the synchronization of the scanning process on the screen and software execution.
16.2 FUNCTION
This function can generate the interrupt at either a V or H position of the scanning lines. It can also generate the interrupt at any position of the scanning line.
16.3 SETTING EXAMPLE
INITIAL SETTINGS e Disable IRQ e “Set D4 and D5” of register <4200H> “Timer Enable” Settings © Set register <4207H> ~ <420AH> VGounttime _) SETTINGS e Enable IRQ
IRQ PROCESS
e Read “D7” of register <4211H> Confirm “Timer IRQ” e Clear “D4” and “D5” of register <4200H> e Process for Target Task
Loisetay_]
2-16-1
Chapter 17. Direct Memory Access (DMA) The DMA is the method to transfer the data in the same manner as the data transfer which is done by the CPU. However, the DMA can transfer the data at high speeds by using the hardware instead of the CPU. The SNES has the exclusive DMA, since the picture data has to be transferred rapidly. The DMA for the SNES is to transfer the data between “A-Bus Address” in the CPU (0000000 ~ OFFFFFF) and “B-Bus Address” in the S-PPU (0002100 ~ 00021FF), which has 8 channels total. There are two kinds of DMA: general purpose DMA and H-DMA. Either can be set at each channel. The data can be transferred between the same DMA’s in the order of lower channel numbers (0 ~ 7). The H-DMA can interrupt even during the transfer by the general purpose DMA, which means that the H-DMA has higher priority than the general purpose DMA. Furthermore, the CPU process stops automatically during the DMA period, and will start again after the DMA is completed. It is not necessary to observe the DMA completion by the CPU.
17.1 GENERAL PURPOSE DMA
17.1.1 OUTLINE This function can transfer the data rapidly between 2 types of memory devices: memory which can be accessed directly by the CPU, such as a ROM on the game cartridge, and memory which has to be accessed through the S-PPU, such as the V-RAM. 17.1.2 FUNCTION The maximum area of the A-Bus address which can be used in one channel is limited in one bank (65,536 Byte). Therefore, in case of spreading over more than 2 banks, it is necessary to use more than 2 channels or transfer twice. One A-Bus address basically is increased every time 1 byte of data is transferred. However, it can be decreased or fixed depending on the settings (“d3” and “d4” of register <43X0H>).
2-17-1
DIRECT MEMORY ACCESS J
The following table shows four types of B-Bus address changes:
Table 2-17-1 B-Bus Address Changes
Transfer Word Select
# of Transfer (# of Byte)
© In case of 224 lines, general purpose DMA can transfer 6K byte data maximum during V-Blank period.
2-17-2
17.1.3 SETTING EXAMPLE
FORCED BLANK When using CH4:
- Clear “D4” of register <420BH>, <420CH> © Set register <4340H> CHé4 Transfer word select A Bus Address Fixed, INC/DEC SETTINGS CH4 Transfer Origination © Set register <4341H> “B Address” Settings © Set register <4342H> ~ <4344H> “A1 Table Address” Settings © Set register <4345H>, <4346H> “# of Bytes to be Transferred” Settings © Write “1” to “D4” of register <420BH> CH4 Start General Purpose DMA.
DISPLAY PERIOD
When using CHS © Clear “D3” of register <420BH>, <420CH> Set register <4330H> CHS3 Transfer word select A Bus Address Fixed, INC/DEC TTIN CH3 Transfer Origination oe ee
- Set register <4331H> “B Address” Settings © Set register <4332H> ~ <4334H> “A1 Table Address” Settings © Set register <4335H>, <4336H> “# of Bytes to be Transferred” Settings
V - BLANK
e Write “1” to “D3” of register <420BH> CHS Start General Purpose DMA
2-17-3
DIRECT MEMORY ACCESS
]
17.2 H-DMA
17.2.1. OUTLINE This is a special DMA which can transfer data automatically, synchronizing with the H-Blank. The S-PPU settings can be varied by each horizontal scan line and special effects can be added to the picture. 17.2.2 FUNCTION This function transfers the data from the A-Bus memory (CPU memory) to the S-PPU register. There are two kinds of addressing modes on the A-Bus side; absolute and indirect addressing. Either type of addressing can be set by each channel. There are two kinds of data transfer. One is to transfer a set of data during each horizontal blanking period. The otheris to transfer a set of data every certain number of horizontal blanks.
Table 2-17-2 B-Bus Address Change
Transfer Word Select
# of Line to be transferred
2-17-4
17.3. SETTING EXAMPLE
FORCED BLANK When using Indirect Addressing (Type 1) with CHO © Clear “DO” of register <420CH> © Set register <4300H> CHO Transfer word select CHO TYPE = “1" | CHO Transfer Origination SUUUN SI
© Set register <4301H> “B Address” Settings © Set register <4302H> ~ <4304H> “A1 Table Address” Settings © Set register <4307H> “CHO Data Bank” Settings
- Write “1” to “DO” of register <420CH> CHO Start H - DMA
a DISPLAY PERIOD When using Absolute Addressing (Type 0) with CH1 ° Clear “D1” of register <420CH> © Set register <4310H> CH{1 Transfer word select CHt TYPE = "0 ‘| CH1 Transfer Origination STAUUUN EE) © Set register <4311H> “B Address” Settings © Set register <4312H> ~ <4314H> “A1 Table Address” Settings
V - BLANK
© Write “1” to “D1” of register <420CH> CH1 Start H - DMA
2-17-5
INTERLACE Cc
Chapter 18. Interlace
18.1
18.2
18.3 BG MODE 0 ~ 4&7 When “1” is written to DO of register <2133H>, the picture signal output from the Super NES will be the interlace signal. In the case of BG modes 0 through 4 and 7, the same picture will be displayed unless the picture data is changed between the 1st field and the 2nd field. (Refer to BG Screen in Appendix A.)
BG MODE 5 &6 When using interlace on BG mode 5 and 6, the vertical resolution will be doubled in appearance. The picture is displayed using a one frame combination of the 1st field and 2nd field. (Refer to BG Screen in Appendix A.)
OBJ
When “1” is written to “D1” of register <2133H>, the vertical resolution will be doubled as in the case of BG Mode 5 and 6, because a picture is generated using one frame. The range of the V-position for OBJ is 0 through 255 and this range will not be doubled.
2-18-1
E
Chapter 19. _H-512 Mode (BG Mode 5 & 6)
19.1
19.2
19.3
19.4 MAIN SCREEN & SUB SCREEN SETTINGS The screen addition/subtraction function should not be used, because a part of both main screen and sub screen functions are used in this mode. With the exception of color constant addition/subtraction, “1” should be written to D4 and D5 of register <2130H> and the sub-switch should be off. The same data should be written to registers <212CH>, <212DH>, <212EH>, and <212FH>. “Through” should be the same for both the main and sub-screens.
FIXED COLOR ADDITION/SUBTRACTION DO ~ DS of register <2131H> is a flag which can select the main screen for addition/subtraction. Because a part of both main screen and sub screen functions are used, this selection cannot be performed. It is necessary to write “1” to 6 flags (DO ~ D5) when color constant addition/subtraction is performed. The remaining settings are the same as the normal Color Constant Addition/Subtraction. There will be addition/subtraction every 2 dots, horizontally, in the color window function, because the window has only 256 positions horizontally.
DISPLAY WITH OBJ
The name H-512 indicates a horizontal resolution of 512 for BG. The horizontal resolution for the OBJ is only 256-dot, regardless of the BG mode. The priority order for BG is determined by every dot.
OTHERS
See “BG Screen” in the Tables of Appendix for details.
2-19-1
OBJ 33 EZ
Chapter 20. OBJ 33’s Lines Over & Priority Order
20.1
20.2 33‘S RANGE OVER The number of OBUs which can be displayed in a horizontal line is limited. One of these limitations is called the “33's Range Over.” This limits the number of OBJs which can be displayed in a horizontal line, regardless of the OBJ size. If “33's Range Over” has occurred in one field (at least one line), “D6” of register <213EH> will be set. For the line in which this “33's Range Over” occurs, only 32 OBus can be displayed out of 33 or more OBJs present. The 32 OBUs displayed are selected using the priority order (selected from smaller OBJ number).
35’S TIME OVER The other limitation on the horizontal line is called “35's time over.” This limits the number of OBJs (converted to character size 8-dot x 8-dot) that can be displayed. If the “35's Time Over” has occurred in one field (at least one line), “D7” of the register <213EH> will be set. In the line in which this “35's Time Over” has occurred, only 32 of the total OBUs available can be displayed according to the priority order (selected from larger OBJ number). This limit is due to a conversion limit of less than 35 OBus (8 x 8) displayed per horizontal line. “These 32 OBJs must satisfy the display condition explained in “33's Range Over”, above.
2-20-1
20.3 PRIORITY ORDER SHIFTING As mentioned above, limited numbers of OBUs can be displayed in a line and are related to the priority order. It is desirable to develop a game within this limitation. However, sometimes OBJs need to be displayed beyond this limitation. This can be accomplished using virtual OBJs. One method is to change the priority order every frame. Another method changes the OBJ data order through programming. The Super NES also contains a function which rotates the priority order of 128 OBJs. When using these methods, consider that the OBJ will flash every frame unit and the priority order among OBUJs will change. The method for assignment is as follows:
Step 1. Display the OBJ.
Step 2. Write “1” to “D7” of register <2103H>.
Step 3. Write the highest priority OBJ number (0 ~ ry) to “D1 ~ D7” of register <2102H> during V-Blank period every trame. Step 4. Repeat step 3. When OBJ number stored in step 3 is “n”.
OBJ NUMBER PRIORITY ORDER
OB J(n - 1)
OB J(n)
OBJ (n+ 1)
OoOBJ127
2-20-2
CPU CLOCK AND ADDRESS MAP c
Chapter 21. CPU Clock and Memory Mapping
21.1
21.2 CPU CLOCK The CPU clock can be switched automatically, depending on the address to be accessed by the CPU. Three clock speeds are available: 3.58MHz, 2.68MHz, and 1.79 MHz. The device speed (ROM, RAM, LSI, etc.) will determine the speed to be used. If a medium speed ROM and RAM (access time less than 200ns) are used in the cartridge, it will be mapped to the address area for 2.68MHz. If high speed (access time less than 120ns) are used, it will be mapped to the address area for 3.58MHz. Please refer to “Frequency & Address Mapping” for the relation between the address and the clock. Two clocks (2.68MHz & 3.58MHz) can be selected by setting DO of register <420DH> for the range of memory “®” shown in the illustration on the next page. The default setting is 2.68MHz. The CPU is operated internally with a 3.58MHz clock speed. (Regardless of the address, DMA will be performed with 2.68MHz clock speed).
CPU MEMORY MAP
Please refer to “Frequency & Address Map” on the next page. The WRAM (8K- Byte) is mapped to address (0000 ~ 1FFF) of banks (00 ~ 3F), (80 ~ BF) and 7E. This is the WRAM used as common bank. This 8K-Bytes can be accessed from any bank described above. The WRAM (120K-Byte) is mapped to address (2000 ~ FFFF) of bank 7E and (0000 ~ FFFF) of bank 7F. Therefore, the WRAM (128K- Byte total) is included in the Super NES unit. This 128k-Byte (RAM @, RAM @) is one consecutive memory and can be accessed from the B - Bus address. The address “2000 ~ 5FFF” of bank “OO ~ 3F” and “80 ~ BF” are reserved as a register area of the S-PPU, DMA, etc. Because this basically is reserved as a common bank area, the S-PPU and DMA register can be accessed from any bank above.
2-21-1
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
2-21-3 Figure 2-21-2 Super NES Memory Map (Mode 20)
Bank Address
Regist FF FOQEF EDF DOCF CdBF BOAF ASF 908F 8d7F7E7D706F 605F 504F 403F 3d2F 201F 100F og * | Bank 70-7D x 8000H
FFFFA| 6000H 256K 8000H 4000H 4 2000H 64k
O7FFH Expanded
0000H
L__8M_| RAM Area 16K
f
% Static RAM Area
(on Cartridge)
l 32M !
Available ROM Area Specify the need for the high speed mode in the sub ion form
Specify the need for the high speed mode in the sub ion form.
2-21-4 Figure 2-21-3 Super NES Memory Map (Mode 21)
Bank Address
Register ——» FF FEF EqOF DqCF CqBF BOAF AUSF oder ad7Fre7D7d6F 6dsF sd4F 4dar adar 2diF 1dor od © FFFFA|
- 1)’ 1)’
Program ROM. ‘Aréa (1) |8000H
8M 16M. 24M 32M
ROM Area Available
vectors (i.e., Reset Vector) in the vector area of bank COH’.
and bank 80H ~ BFH.
the need for the high speed mode in the submission form.
2-21-5 Figure 2-21-4 | Super NES Memory Map (Mode 25, ROM Size Greater than 32 Mbits only)
Program ROM
(Brea (3) palaces FF FOEF EGDF DdCF CdBF BAF AUSF oder sd7F7E\7D706F 6dSF Sq4F \WOSF 3q2F 2q1F 1doF og * Xs FFFFH
- L slaw|__ RESERVED AREA RESERVED AREA
MMM MMA
Static RAM Area
ROM Area Available (on Cartridge)
(to 32M)
ROM Area Avail
(32M to 63M) C0:0000H
mode (3.58 MHz).
Note 3: Don't access null area. 301 is res
Area (2) ato 7D:FFFFH 3€:0000H 3E:8000H 3F:0000H V 3F:8000H CPU CLOCK AND ADDRESS MAP
[ |
Chapter 22. Super NES Functional Operation This chapter provides the user with a basic understanding of the functional purpose for each of the major components of the Super NES control deck. Refer to the Super NES Functional Block Diagram (opposite page) while reading the following paragraphs.
22.1 SUPER NES CPU This is the Central Processing Unit for the Super NES. It coordinates all functions of the Super NES control deck and peripheral devices which are attached to the Super NES.
22.2 SUPER NES PPU1 AND PPU2
These 2 units work together as the Picture Processing Unit for the Super NES. Pictures are generated for display based upon control inputs from the Super NES CPU. In general, PPU1 is used to generate background character data, rotation, and scaling; while PPU2 performs special effects like windows, mosaic, and fades.
22.3 SUPER NES WRAM
The work RAM (WRAM) is a custom 128K x 8 bit RAM used by the Super NES CPU for data storage. Direct Memory Addressing (DMA) can be used by the Super NES CPU for rapid bulk transfer of data.
22.4 VRAM The VRAM is composed of 2 - 32K x 8 bit S-RAMs. This unit is used by PPU1 to store background character data until needed for display.
22.5 AUDIO PROCESSING UNIT (APU) The Audio Processing Unit performs all sound functions for the Super NES and is composed of the following units.
22.5.1 SOUND CPU
The Sound CPU is the central processing unit for the Super NES Audio Processing Unit. It controls sound functions much in the same way that the Super NES CPU controls functions of the Super NES.
22.5.2 SOUND DSP
The DSP has 8 channels of pulse code modulated (PCM) sound, a noise generator, echo, sweep, envelope, and other circuits to reproduce tone qualities from RAM data.
2-22-1
2-22-2 Figure 2-22-1 Super NES Functional Block Diagram 62 P oOox OOZZWOFORL osc Y 4.00MH2| syne R.G.B. Siena __p TOF
VIDEO COLOR SIGNAL,
CONTROLLER
et MULTI CONNE: OUT
CONNECTOR Vim
RESET
YY IBRIGHTNESS
21MHz CA0-23 CONTROL: \ SPUR cPumit | ISIGNAL, voco |g IMOD
R.G.B. Som} [AGB PF encoven|
__VRAM DATA BUS: VDAQ-7, voB0-7 = - | DA [UR FFILTER] La
ADDRESS: PA0-7__ CONTROL: PARD, PAWR conv |p] AMP | pg 1L4R
Sh fopoocseeseecessee >} SSS LAS | CONTROL:BCK,LRCK aa OSC 24576 rin ' ' —-\ J sags fa ' ' '
ISOUND| —*Tsounp| cpu ft cpuK] psp
Processing
Unit (APUY
cUSTOM reeKxeB comenteiseme 4 pstiam
SUPER NES BLOCK DIAGRAM
] SUPER NES FUNCTIONAL OPERATION
22.5.3
22.5.4 SOUND RAM
The Sound RAM is composed of 2-32Kx8 bit SRAMs. Program and tone data are loaded from the game pak to the sound RAM by the Sound CPU. The RAM is time shared by the Sound CPU and DSP.
D/A CONVERTER
Converts the digitized sound to an analog signal which is filtered and amplified to produce the L+R (mono) output through the RF Modulator and L,R (stereo) outputs through the multi-out connector.
2-22-3
SYSTEM FLOWCHART c J]
Chapter 23.
POWER
System Flowchart
-SWON
or
RESET - SW ON
Vector (OOFFFI Jump to address indicated by Reset
DH, OOFFFCH)
© Write “8FH” to [Forced Blank]
register <2100H>
INITIAL SETTINGS -------~-
Clear each Register (See Ch. 26)
© Set each “Base Address” © Set “BG Size,” “BG Mode”
Register <2101H>, <2105| [Main Register Settings]
” & “BG SC Size”
IH>, <2107H> ~ <210AH>
@ THROUGH MAIN SETTINGS,
REGISTER <212CH>
OAM, CG RAM DATA SETTINGS |-
'
' ' i
© Set “OBJ Size Select” & “OBJ Name Select” Hl
‘ ‘
address automatically will not
© Set OAM Address
Set CG RAM Address [OAM & CG RAM Address Settings]
Normally write “OOH” to register <2102H> <2103H>
Normally write “OOH” to register <2121H> I (To Sheet 2)
2-23-1 FORCED BLA NK
(From Sheet 1)
2 channels of General Purpose DMA ' ' ' '
Transfer OAM data & CG data by using 4 ' ' '
VRAM DATA SETTINGS © “VRAM address H/L INC” Settings © “VRAM address Sequence Mode” Settings © “VRAM address” Settings Register <2115H>, <2116H>, <2117H>
[ V-RAM data transfer by using General Purpose DMA ]
OBJ, BG CHR Data has been transferred? BG SC Data
Release “Forced Blank” Write “OFH” to register <2100H> for displa’
(To Sheet 3)
2-23-2
SYSTEM FLOWCHART
(From Sheet 2)
>|
Generate data of register to be renewed and memory in order to change BG & OBJ character
@ Enable “NMI Enable” © Enable “JOY-C Enable Write “81H” to register <4200H>
[No NMI WAIT NMI
NMI
(Recognize the beginning |of V-Blank period by NMI)
(Set previously renewed data of register and memory)
@ Transfer renewed OAM data by DMA
© Data settings for BG & OBJ which renew picture
(Read data from Joy Controller)
Register <4218H> ~ <421FH>
2-23-3 Display Period
V-Blank Period
more than 215 us
Display Period
a)
Chapter 24. Programming Cautions
24.1
24.2
24.3
24.4
Registers <210DH> ~ <2114H> and <211BH> ~ <2120H> must be accessed in the order of Low and High twice (Read Twice or Write Twice). If it is not known whether the next access should be low or high, initialize as follows:
OAM, CGRAM, VRAM Set the address again. Other Registers (Write) The lower data should be written more than one time, and the higher data should be written. H/V Counter Read The H/V counter will be initialized when the status register <213FH> is read. The data should be read in the order of Low and High.
The period which can be accessed for the register is as follows:
V-RAM, OAM Forced Blank or V-Blank period only. CG-RAM Forced Blank, V-Blank or H-Blank period only. Other Register (Write) All period (however, when writing the data, the picture may not be displayed properly). Other Register (Read) All period (However, the data which may be changed during display period may not be read properly).
The address space for the V-RAM is 64K-word (1 word = 16-bit) maximum. 32Kword memory is installed in the Super NES unit.
When the V-RAM is accessed from the CPU, the address counter will be increased automatically. For the V-RAM increment mode, please use the register mode designated by the instruction.
2-24-1
PROGRAMMING CAUTIONS ]
24.5
24.6
24.7
24.8
24.9
24.10
When the V-RAM is read continuously, the first address will not be incremented once the V-RAM data has been stored. The first address should be read as dummy data on subsequent passes.
The top color data of each CG color data palette is tansparent. Because transparent is a color which is not displayed, any color can be set. The color data of CG address (00H) is normally black (background).
Even though 9-bits are provided as the OAM H-position, the value (100H) must not be used.
Before processing the controller keys, verify which devices are currently connected to the controller ports. The valid identification codes are: ¢ Standard Controller | 0000B
- Super NES Mouse 0001B
- Super Scope 1111B These codes may be found in bits D3 ~ DO of registers <4218H> and <421AH>. If the standard controller is used for the game, inputs should be ignored whenever the ID code is not OO00B.
The initial value of the work RAM in the main computer is not set when power is applied to the computer. Programming should be done in such a way that no errors occur when the data is indeterministic. The initial value is different depending upon the computer used. Initialize the entire RAM area when, for example, it has been programmed under the misconception that the data is a fixed value, OO*FF.
When using the battery back-up SRAM, avoid program errors due to data loss. The CPU may crash if the user hits the control deck when the game pak is in use, if the game pak is not inserted properly, or if the game pak connector is dirty. Data loss may be unavoidable in some cases. Before reusing SRAM data, determine if the data is recoverable. One method of detection is to save the data in several areas of the SRAM and calculate the check sums of each area. Before utilizing any data in the SRAM, the program must compare each of the check sums. If the check sums are not equal, the data is corrupted.
2-24-2
E
24.11
24.12
24.13
24.14
When executing critical commands using the controller keys, such as; modify, erase data, or software reset, use all 16 bits of data including the input device’s signature. Corrupt data may be sent by the controller if the controller is unplugged during a game. When the computer is reset using start, select, L, and R controller data simultaneously, verify that:
- The start, select, L, and R are pressed,
- No other keys are pressed, and
- The signature data is 0000. In other words, check that the key data is 3030H.
Do not place critical game characters within two characters of the perimeter of the display screen area. This area of the television varies from one brand or model to the next. The Super NES may not be able to display characters in some areas if programmed too close to the edge of the screen. Critical game characters include score data and various parameters.
Ensure that the program clears the emulation bit on reset or start-up before executing 65816 instructions (i.e., JMP $808007). This is demonstrated in the programming example, below: Example: RESET ;Reset vector SEI ;Disable interrupt CLC ;Clear carry XCE sExchange carry with E bit, now in 65816 mode
JMP $808009 ;Example 65816 instruction
2-24-3
PROGRAMMING CAUTIONS [
24.15
24.16
When utilizing the high speed mode (3.58MHz), perform a dummy jump at the start of every vector to change the Program Bank Register to the upper banks ($80 or above). Refer to the following program example. Example:
ORG $808000 RESET SEI CLC XCE JMP ~RESETFAST ;Dummy jump to change PBR RESETFAST ;RESETFAST belongs to bank $80
NMI JMP = ~NMIFAST NMIFAST
When restarting controller read after it has been temporarily disabled, the user program should confirm that the buttons have been released before accepting the button inputs.
Some licensed controllers latch the last data which was received after disabling controller read. This data is held for about 3 fields (50 msec) into the next controller read sequence. This performance as compared to Nintendo’s standard controller performance is demonstrated in the table below.
User No “B” Button No Operation | Operation Operation ag eution
Nintendo BIB N/A A|A|AIA Controller Output Output of BIB N/A B)B; BIA Some Licensed Controllers
Controller Ensble Disable Enable
Read
2-24-4
[
For instance, if the software is programmed as follows;
- Enter the room when “B” button is pressed.
- Disable controller read while changing screen data.
- The room appears and enable controller read.
- Exit the room when “B” button is pressed.
the player will immediately exit the room.
This problem can be resolved in 2 different ways, as described below.
24.16.1 EDGE DETECTION
If “edge detection” is used for processing controller data instead of “level detection”, the above problem can be avoided. The following sample program illustrates edge detection. The difference between controller (Cont) and trigger (Trig) data in the sample program is shown in the table below.
Cont O;O/O/}1) 171/41} 1}/0}0/0;0)1]} 1] 1) 1 Trig 0}0/0/1/0)/0/0}0;0/0/0/0})1)0}0]}0
2-24-5
PROGRAMMING CAUTIONS ]
(SAMPLE PROGRAM)
Cont1H ds Cont2L ds Cont2H ds TrigiL ds TrigiH ds Trig2L ds
RdCont_Wait1 LDA AND BEQ RdCont_Wait2 LDA AND BNE al6 i16 RdCont_Cont1 LDY LDA STA
EOR AND STA RdCont_Cont2 LDY LDA STA
EOR AND STA pop RTS 1 ; Controller #1 data low byte 1 ; Controller #1 data high byte 1 ; Controller #2 data low byte 1 ; Controller #2 data high byte 1 ; Trigger data of controller #1 1 : ;Trigger data of controller #2
; Accumulator 8-bit
HVBJoy #%00000001 RdCont_Wait1 5 <4212> ; Wait JOY-C Enable : DO=0
HVBJoy #%00000001 RdCont_Wait2 ; Accumulator 16-bit ; Index 16-bit
ContiL ; Keep last data in “IY” Joy1L ; <4218> (Cont1-L) ContiL ; Store new controller data ; <edge detection> ContiL ContiL TrigiL ; Store trigger data
Cont2L ; Keep last data in “IY” Joy2L ; <421AH> (Cont2-L) Cont2L ; Store new controller data ; <edge detection> Cont2L Cont2L Trig2L ; Store trigger data
2-24-6
24.16.2 ALTERNATE METHOD
The problem may be avoided by ignoring controller data for about 3 fields, after restarting controller read. Since programming becomes very complicated, increasing the risk of program bugs, this method is not recommended.
If controller read is disabled for 1~2 fields, the consumer cannot press a button quickly enough to cause a problem. This configuration is illustrated in the table below.
User No “B” Button No “A” Operation | Operation Operation Button
Nintendo B/B N/A B/B A|A| AJA Controller Output
Output of B/B] NA |B/B AJA; A\A Some Licensed Controllers
Controller Ensble Disable Enable
Read
2-24-7
PROGRAMMING CAUTIONS
THIS PAGE INTENTIONALLY LEFT BLANK
2-24-8
Chapter 25. Documented Problems The following paragraphs describe system problems which have been identified and provides solutions for the problems listed.
25.1 PROBLEM 1
25.1.1 SYMPTOM If H-DMA starts at about the same time that General Purpose DMA finishes, sometimes the CPU will cease to operate properly or H-DMA will not be correctly implemented (S-CPU ver. 1). This could happen if General Purpose DMA finishes during the first 2.24 [ls of the H - Blank period on lines 0 - 224 (239), while H-DMA is being used. It can also happen at the beginning of line 0, as well. *E The real time trace function of the ICE can be utilized to confirm the timing. 25.1.2 SOLUTION This problem will not happen if General Purpose DMA is used only during V - Blank or if H-DMA starts in the middle of data transfer of General Purpose DMA. It does not happen if H-DMA is not being used. This problem can also be avoided by adjusting the time at which General Purpose DMA begins and/or decreasing the number of bytes transferred.
The H and V count timers can be utilized to determine the start time of
General Purpose DMA. One line takes 63.5 [1s and the value of one count on the H count timer is equivalent to 0.186 Ls. The end timing of the General Purpose DMA changes depending on the amount of transferred data of H-DMA which happens in the middle of data transfer of the General Purpose DMA. When the problem occurs: General Purpose General Purpose DMA Starts. ———>I , BUND
General] General t General General
CPU|HDMA} CPU |PurposeHDMA|Purpose — Purpose| HDMA| Purpose HDMA CPU DMA DMA 2 DMA DMA 63.5 [ls . v When avoiding the problem: General Purpose General Purpose DMA Starts —3| DMAEnds ——>
General General* ‘General General DMA DMA) DMA DMA
CPU/HDMA/CPU] Purpose |HDMA|Purpose Purpose| HDMA Purpose) CPU} HDMA| CPU
t
(NCL PG 43a)
2-25-1
DOCUMENTED PROBLEMS a J
25.2 PROBLEM 2
25.2.1 SYMPTOM When the size of OBJ 0 is 16 x 16, 32 x 32, or 64 x 64, and its horizontal position is 0 through 255, and there are other objects present with negative horizontal positions (they are not displayed on the screen), the Time Over Flag will become 1 (S-PPU1 ver. 1). 25.2.2 SOLUTION The cause is being examined.
(NCL PG 43b)
2-25-2
EE
Chapter 26. Register Clear (Initial Settings)
(This is a recommended setting for beginners. It is not necessary to perform register clear exactly this way. However, the register status is not stable when power is turned on and initial settings must be performed).
ADDRESS (HEX) | DATA (HEX) ADDRESS (HEX) | DATA (HEX)
<2100> 8 F (Forced Blank) <2120> 00 ~=00 <2101> 00 <2121> 00 <2102> 00 <2122> (CG Data) <2103> 00 <2123> 00
<2104> (OAM Data) <2124> 00 <2105> 00 <2125> 00
<2106> 00 <2126> 00
<2107> 00 <2127> 00
<2108> 00 <2128> 00
<2109> 00 <2129> 00
<210A> 00 <212A> 00
<210B> 00 <212B> 00 <210C> 00 <212C> 00 (Low) (High) <212D> 00 <210D> 00 00 <212E> 00
<210E> 00 00 <2130> 30
<210F> 00 00 <2131> 00
<2110> 00 00 <2132> E0
<2ti1> 00 00 <2133> 00
<2112> 00 00 <4200> 00
<2113> 00 00 <4201> FF
<2114> 00 00 <4202> 00
<2115> 80 <4203> 00
<2116> 00 <4204> 00
<2117> 00 <4205> 00
<2118> (VRAM Data) <4206> 00 <2119> (VRAM Data) <4207> 00 <211A> 00 <4208> 00
<211B> 00 8001 <4209> 00
<2t1C> 00 00 <420A> 00
<211D> 00 00 <420B> 00
<211E> 00 004 <420C> 00
<211F> 00 00 <420D> 00
2-26-1
PPU REGISTERS [ J
Chapter 27. PPU Registers ADDRESS: 2100H
NAME: INIDISP
CONTENTS: INITIAL SETTINGS FOR SCREEN
07 D6 DS D4 D3 D2. D1 Do. BLANK: FADE IN/OUT (0~15) 2100H ING ra | F2 | Fi | Fo
SCREEN BRIGHTNESS: Determine the screen brightness (16-stages) F3 | F2 | F1| FO | BRIGHTNESS 1 1 4 4 BRIGHT 1 1 1 °=0
0 0 0 0 DARK
: 0: NON-BLANKING BLANKING: FORCED BLANKING[ Hea tre ADDRESS: 2101H
NAME: OBJSEL
CONTENTS: OBJECT SIZE & OBJECT DATA AREA DESIGNATION D7 6. DS D4 b3 D2__(D1 Do. oBJ | SIZESELECT | OBJ | OBJ NAME SELECT | NAME BASE ADDR 2101H s2 | si | so N1_| NO | BA2 | BA | BAO
For “lec, Leones BASE ADDRESS (UPPER
Norm = 0 3 BIT) Designate the segment (8K-word/ segment) address which the OBJ data is stored in the VRAM. (See pages A-1 and A-2) OBJECT DATA AREA SELECT The upper 4K-word out of the area (8K-word) designated by “Object Base Address” is assigned as the Base Area, and the area of the lower 4K-word combined with its Base Area can be selected. (See pages A-1 and A-2) OBJECT SIZE: DESIGNATE OBJECT SIZE (See pages A-3 and A-4) OBJ SIZE S21S1] SOlO(SM) TG} 8 DOT | 16 DOT! 8 DOT | 32 DOT 8 DOT | 64 DOT 16 DOT | 32 DOT 16 DOT | 64 DOT 32 DOT] 64 DOT 440000 econ300 =aO34n030
2-27-1
ADDRESS: 2102H /2103H NAME: OAMADDL / OAMADDH CONTENTS: ADDRESS FOR ACCESSING OAM (OBJECT ATTRIBUTE MEMORY)
ADDRESS D7 D6 05 D4 D3 D2 D1 bo I T T l T I I OAM ADDRESS. 2102H az_|_ as | a5 | a4] a3 | a2 | at _| ao
OAM PRIORITY ROTATION OAM ADDRESS MS 2103H l [As . This is the INITIAL ADDRESS to be set in advance when reading from or writing to the OAM.
To set the OBJ priority order, write “1” to D7 (OAM Priority Rotation) of register <2103H> and set the highest priority OBJ number (0 ~ 127) to D1 ~ D7 of register <2102H> (refer to “Priority Order Shifting”).
The address which has been set just before every field (beginning with V-BLANK) will be set again to registers <2102H> <2103H> automatically. However, the address cannot be set automatically during Forced Blank period.
ADDRESS: 2104H NAME: OAM DATA CONTENTS: DATA FOR OAM WRITE
07 D6 05 D4 D3 D2 O1 Do
OAM DATA (LOW, HIGH) 2104H b7_| pe] pos | v4] ps] v2] v1 | bdo
This is the OAM data to be written to any address of the OAM (refer to page A-3).
After register <2102H> or <2103H> is accessed, the data must be written in the order of Lower 8-bit and Upper 8-bit of register <2104H>. The OAM address will be increased automatically when the OAM data is written in the order of LOW to HIGH.
The data can be written only during a V-BLANK or FORCED BLANK period.
2-27-2
PPU REGISTERS
ADDRESS: 2105H
NAME: BG MODE
CONTENTS: BG MODE & CHARACTER SIZE SETTINGS
D7___—6 D5 D4 D3. D2 D1 Do. BG SIZE BG3 BG MODE 2105H Ba4]| BG3 | BG2 | BGi| PRIO.| m2 | Mi _| Mo
ne BG SCREEN MODE SELECT:
See BG Screen Mode Summary (page A-5) HIGHEST PRIORITY DESIGNATION FOR BG-3 Make BG3 highest priority during BG Mode 0 or 1 (page A-19) 0: OFF :ON BG SIZE DESIGNATION: Designate the size for each BG Character (pages A-21 and A-22) 0: 8X8 DOT/CHARACTER L 14: 16X16 DOT/CHARACTER 16 DOT —A—, 00 | 01] Incase CHR NAME of SC data is “OOH”: 16 DOT 10 | 11 j¢—___ CHARACTER NAME (HEX) ADDRESS: 2106H
NAME: MOSAIC
CONTENTS: SIZE & SCREEN DESIGNATION FOR MOSAIC DISPLAY
D7__6 D5 D4 D3 D2. D1 Do MOSAIC SIZE MOSAIC ENABLE 2106H mM3_| M2 | mi _| mo BG4_| BG3 | BG2 | Bai
1 MOSAIC MODE SELECT:
ON/OFF for Mosaic Mode of each BG 0: OFF 1:0ON
MOSAIC MODE SIZE DESIGNATION: DESIGNATE MOSAIC MODE SIZE (page A-7) 56 MODE. 512 MODE (H X V) M3[M2[Mi[Mo| SIZE M3[M2|M1]Mo | SIZE (): NON-INTERLACE 0 0 0 0 |1xX1DOT 0 0 0 0 [2x2DOT (2x1 DO 0 0 0 1 \2x2DOT 0 0 0 1 14X4 DOT (4X 2D0' 0 0 1 0|3X3DOT 0 0 1 0 |6x6DOT (6X3 DO e e e e e e e e e e e e 1 1 4 0 15X15 D07 | 1 1 0 30 X 30 DOT (30 X 15 DOT) 1 91°41 = 1416X16DOT] | 1 1 = 1 1 [82X32 DOT (32 xX 16 DOT!
2-27-3
ADDRESS: 2107H/2108H/ 2109H / 210AH NAME: BG1SC / BG2SC / BG3SC / BG4SC CONTENTS: ADDRESS FOR STORING SC-DATA OF EACH BG & SC SIZE DESIGNATION (MODE 0 ~ 6)
D7. D6 _—ODS. D4 D2 D1 Pt) BG1 SC BASE ADDRESS BGT SC SIZE 2107H AS | a4 | a3 [| a2 | | Ao si_| so
BG2 SC BASE ADDRESS BG2 SC SIZE 2108 H As | A4 | as | a2 | Ai | Ao si_| so
BG3 SC BASE ADDRESS BG3 SC SIZE 2109H as | a4 | ag | a2 | ar | Ao si_| so
BG4 SC BASE ADDRESS BG4 SC SIZE] 210AH as_| a4 | a3 | a2 | | ao st_|_ so ‘Lsoneen SIZE DESIGNATION (pages A-21 and A-22) Designate Background Screen Size
BACKGROUND SCREEN BASE ADDRESS (UPPER 6-BIT) Designate the segment in which BG-SC data in the VRAM is stored. (1K-WORD/SEGMENT) SCREEN SIZE & SCREEN REPETITION
$1 so SCREEN SIZE S1 So SCREEN SIZE
sco | Sco! sco. | Scor 0 0 Ni =-t 1 0 --5 cy : NR \ SCO _t__ S00} sct_|__ sets
SCO sci] sco! SCO Sci 4 soot 4 0 1 14 \ sc2 sc3}]__ soz) ' ‘ ‘ iy ' ‘ ‘ ’ ‘ \ ‘ ' 1 SC0_ 3. SCI SC01
2-27-4
PPU REGISTERS
ADDRESS: 210BH/210CH NAME: BG12NBA / BG34NBA CONTENTS: BG CHARACTER DATA AREA DESIGNATION
D7 06 DS D4 D3 b2 Di DBO BG2 NAME BASE ADDRESS | _ BG1 NAME BASE ADDRESS 210B H As | a2 | ai [| aol as | a2 | at _| ao
BG4 NAME BASE ADDRESS | 6G3 NAME BASE ADDRESS 210C H as_| a2 | at_| Ao A3_| a2 | at_| ao ‘| J
BACKGROUND NAME BASE ADDRESS (UPPER 4-BIT): Designate the segment address in the VRAM in which BG character data is stored. (4K-WORD/SEGMENT)
ADDRESS: 210DH/210EH NAME: BG1HOFS / BG1VOFS CONTENTS: H/V SCROLL VALUE DESIGNATION FOR BG-1
D7. 6 iS. D4___—i3 D2 Dio. BG 1 H-OFFSET (LOW, HIGH) (H012) (HO11) (HO10) (Hog) (Hog) | 210DH Ho7| Ho6| HoS5| Ho4] HO3| HO2] HOo1| HOO
BG 1 V-OFFSET (LOW, HIGH) (vo12) (VO11) (VO10) (Vo9) (Vos) | 210EH vo7 | voe| vos| vos] vos] vo2| vo1| voo . 10-Bit maximum (0 ~ 1023) can be designated for H/V scroll value. (The size of 13-Bit maximum {-4096 ~ 4095} can be designated in MODE -7). (pages A-10 and A-11)
. By writing to the register twice, the data can be set in the order of Low and High.
2-27-5
EE
ADDRESS: 9 210FH/ 2110 H/ 2111 H/2112H/2113H/2114H NAME: BG2HOFS / BG2VOFS / BG3HOFS / BG3V0FS / BG4HOFS / BG4V0FS CONTENTS: H/V SCROLL VALUE DESIGNATION FOR BG-2, 3, 4
BZ Dé D5 D4 03 D2 D1 Do BG H-OFFSET (LOW, HIGH) 210FH (HO9) (HO8)] 2111H Ho7] Ho6| HOS] Ho4| Hos] Ho2]| HO1| HOO 2113H
BG V-OFFSET (LOW, HIGH) 2110H (VO9) (VO8)| 2112H vo7 | vos] vo5| vo4| vo3] vo2| vo1| voo 2114H . 10-Bit maximum (0 ~ 1023) of the H/V scroll value can be designated (page A-10)
. By writing to the register twice, the data can be set in the order of Lowand High.
ADDRESS: 2115H
NAME: VMAINC
CONTENTS: VRAM ADDRESS INCREMENT VALUE DESIGNATION
D7 D6 D5 D4 D3. D2 D1 Do. AIL “RAM ADDRESS|SEQUENCE MODE] FULL GRAPHIC] SC INCREMENT] = a115H INC Gi | Go| 4 | (we
‘> Designate the increment value for the VRAM address. (page A-8)
Git Gotu lo INCREMENT VALUE Increment by 8 (for 32 times) (2-Bit Formation) Increment by 8 (for 64 times) (4-Bit Formation) Increment by 8 (for 128 times) (8-Bit Formation) Address Increments 1 BY 1 Address Increments 32 BY 32 Address Increments 128 BY 128 Address Increments 128 BY 128 Ia+colooo Iso -+~clooo loopoo]s40 loooo|+0-
a Designate the increment timing for the address
0: The address will be increased after the data has been written to register <2118H> [ or the data has been read from register <2139>. 1: The address will be increased after the data has been written to register <2119H> or the data has been read trom register <213AH>.
2-27-6
PPU REGISTERS
ADDRESS: 2116H/2117H NAME: VMADDL / VMADDH CONTENTS: ADDRESS FOR VRAM READ AND WRITE
D7 D6 DS D4 D3 D2 D1 Do VRAM ADDRESS (LOW) 2116H az_| asp | as | as | a3 | a2 | ai | Ao
VRAM ADDRESS (HIGH) 2117H Ais | aia | aia | ai2 | ati | ato | ao | as This is the initial address for reading from the VRAM or writing to the VRAM.
The data is read or written by the address set initially, and every time the data is read or written, the address will be increased automatically.
The value to be increased is determined by “SC INCREMENT” of register <2115H> and the setting value of the “FULL GRAPHIC.”
ADDRESS: 2118H/2119H NAME: VMDATAL / VMDATAH CONTENTS: DATA FOR VRAM WRITE
D7 D6 D5 D4 D3 b2 D1 Bo VRAM DATA (LOW) 2118H a7_| ae | as [| as | as | a2 [| Ai | ao
VRAM DATA (HIGH) 2119H Ais | Ai4 | Ai3 | ai2 [ aii | ato | ao | Aa This is the screen data and character data (BG & OBJ), which can be written to any address in the VRAM.
According to the settings of register <2115H> “H/L INC,” the data can be written to the VRAM as follows:
H/L_INC. WRITE TO REGISTER OPERATION 0 Write to <2118H> only The data is written to lower 8-bit of the VRAM and the address will be increased automatically. 1 Write to <2119H> only The data is written to upper 8-bit of the VRAM and the address will be increased automatically. 0 Write in the order of When the data is set in the order of upper and lower, <2119H> and <2118H> the address will be increased. 1 Write in the order of When the data is set in the order of lower and upper, <2118H> and <2119H> the address will be increased
2-27-7
[
ADDRESS: 211AH
NAME: M7SEL
CONTENTS: INITIAL SETTING IN SCREEN MODE-7
D7 D6 DS D4 D3 D2 D1 DO SCREEN OVER SCREEN FLIP 211AH o1 | 00 v_[u
JORIZONTAUVERTICAL FLIP: H-FLIP/V-FLIP in the Screen Mode-7
DISPLAY
Normal display H-Directional Flip only V-Directional Flip only
Both H & V Directional Flip
an0c0l/< s-os0/r
‘> The following process is made if the screen to be displayed is outside of the screen area.
01 00 | PROCESS OUT OF AREA Screen repetition if outside of screen area Outside of the screen area is the Back Drop Screen in single color Character #0 repetition if outside of screen area aAa0
2-27-8
PPU REGISTERS i
ADDRESS: 211BH/211CH/211DH/211EH/211F H/2120H NAME: M7A/M7B/M7C /M7D/M7X/M7Y CONTENTS: ROTATION/ENLARGEMENT/REDUCTION IN MODE-7, CENTER COORDINATE SETTINGS & MULTIPLICAND/MULTIPLIER SETTINGS OF COMPLEMENTARY MULTIPLICATION
D7__—~+6 D5. D4. D2 Di Do MATRIX PARAMETER A (LOW, HIGH) (MP15) (MP14) (MP13) (MP12) (MP11) (MP10) (MP9) (MP8) | 211 BH mp7] mp6] mp5] MP4] mp3] MP2] MP1] MPO
MATRIX PARAMETER B (LOW, HIGH)
(MP15) (MP14) (MP13) (MP12) (MP11) (MP10) (MP9) (MP8) | 211. CH MP7] mp6] mP5| mp4] mp3| mp2] MP1] MPO
MATRIX PARAMETER C (LOW, HIGH)
(MP15) (MP14) (MP13) (MP12) (MP11) (MP10) (MP9) (MP8) | 211 DH mP7| mp6] mP5| MP4| MP3] MP2] MP1] MPO
MATRIX PARAMETER D (LOW, HIGH)
(MP15) (MP14) (MP13) (MP12) (MP11) (MP10) (MP9) (MP8) | 211 EH mp7] mp6] MP5] mp4] mp3] mp2] mp1] MPO
The 8-bit data should be written twice in the order of lower and upper. Then, the parameter of rotation, enlargement and reduction should be set by its 16-bit data. The value down to a decimal point should be set to the lower 8-bit. The most significant bit of the upper 8-bit is for the signed bit. (MP15 is the signed bit. There is a decimal point between M7 & M8.) . FORMULA FOR ROTATION/ENLARGEMENT/REDUCTION (Refer to Rotation/Enlargement/Reduction in Appendix A.).
X,
VG Xo Y, 7 i q xX) . CP), -Yo
A=cos yx (1/0), B=sinyx (1/a), C =-sinyx(1/B), D=cosyx(1/8) y: Rotation angle o: Reduction Rates for X (H) fB: Reduction Rates for Y (v) Xo ® Yo: Center Coordinate, X, ¢ Y, : Display Coordinate, X2° Y2: Coordinate Before Calculation
2-27-9
Set the value of “A” to the register <211BH>. In the same way, set “B~D” to the register <211CH> ~ <211EH>. The complementary multiplication (16-bit x 8-bit) can be done by using registers <211BH> <211CH>. When setting 16-bit data to register <211BH> (must be written twice) and 8-bit data to register <211CH> (must be written only once), the multiplication result can be indicated rapidly by reading registers <2134H> ~ <2136H>.
D7 Dé. DS. D4 D3. D2 D1 Do CENTER POSITION X, (LOW, HIGH) (X12), (X11). (X10), (X9) (XB) | 271 FH x7 | x6 | x5 | x4 | x3 | x2 1 x1 | x0 CENTER POSITION Y, (LOW, HIGH) (12), (¥11), (¥10)(Y9) y7 | ye | y5 | v4 | v3 | v2] vi (Y8) 212 0H | yo
The center coordinate (Xq Yo) for Rotation/Enlargement/Reduction can be designated by this register. The coordinate value of Xp & Yo can be designated by 13-bit (complement of 2). This register requires that the lower 8-bit set first and the upper 5-bit is set. Therefore, 13-bit data in total can be set.
2-27-10
PPU REGISTERS
ADDRESS: 2121H
NAME: CGADD
CONTENTS: ADDRESS FOR CG-RAM READ AND WRITE
D7 D6 DS D4 D3 D2 D1 Bo CG RAM ADDRESS 2121H Av | ae | as | aa [| ap | a2 | at | ao
° This is the initial address for reading from the CG-RAM or writing to the CG-RAM.
. The data is read by address set initially, and every time the data is read or written, the address will be increased automatically.
ADDRESS: 2122H
NAME: CGDATA
CONTENTS: DATA FOR CG-RAM WRITE
D7 D6 DS D4 D3 b2 D1 DO CG RAM DATA (LOW, HIGH) (D14) , (D13) , (D12), (011), (010), (D9) , (D8) | 2122H De | ps | p4 | ps | be | pi | bo DZ
D This is the color generator data to be written at any address of the CG-RAM.
. The mapping of BG1 ~ BG 4 and OBJ data in the CG-RAM will be determined, which is performed by every mode selected by “BG MODE" of register <2105H>. (See page A-17)
0 There are the color data of 8 palettes for each screen of BG1 ~ BG4. The palette selection is determined by 3-bit of the SC data “COLOR."(Refer to page A-10)
. Because the CG-RAM data is 15-bit/word, it is necessary to set lower 8-bit first to this register and then upper 7-bit should be set. When both lower and upper are set, the address will be increased by 1 automatically.
2-27-11
[
ADDRESS: = 2123H/ 2124H / 2125H NAME: W12SEL/ W34SEL/ WOBJSEL CONTENTS: WINDOW MASK SETTINGS (BG1~BG4, OBJ, COLOR)
D7 D6 DS D4 03 02 D1 bo BG2 WINDOW BG1 WINDOW
W2_EN |IN/OUT|W1 EN | IN/OUT|W2_EN] INOUT]W1 EN | IN/OUT 2123H
BG4 WINDOW BG3 WINDOW
W2_EN | INOUT|W1 EN |IN/OUT|W2_EN] IN/OUT|W1 EN | IN/OUT 2124H
COLOR WINDOW OBJ WINDOW 2125H W2_EN | IN/OUT|W1 EN | IN/OUT|W2_EN] IN/OUT|W1 EN | IN/OUT,
WINDOW IN/OUT : The window mask area can be designated whether inside or outside of the frame designated by the window position. O- IN IN OUT L 1: OUT *: DISPLAY AREA Wy, WINDOW-1 ENABLE: Window-1 ON/OFF Designation [ 0: OFF
1: ON
——® WINDOW-2 ENABLE: Window-2 ON/OFF
The COLOR WINDOW is a window for main and sub screen. (It is related to the register <2130H>).
ADDRESS: 2126H/ 2127H/ 2128H/ 2129H NAME: WHO/ WH1/ WH2/ WH3. CONTENTS: WINDOW POSITION DESIGNATION (Refer to page A-18)
D706 DS ADT O_o 9g) WINDOW-1 LEFT WINDOW HO/H1/H2/H3 POSITION 2127H_ POSITION DESIGNATION 2128H pP7_| pe | ps | p4 | p3 | po | pi | Po Noord WINDOW HO POSITION <2126H>:WINDOW-1Left Position Designation. It can be set in range 0 ~255 WINDOW H1 POSITION <2127H>:WINDOW-1 Right Position Designation. It can be set in range 0 ~255 WINDOW 2 POSITION <2128H>:WINDOW-2 Left Position Designation. It can be set in range 0 ~255 WINDOW H3 POSITION <2129H>:WINDOW-2 Right Position Designation. It can be set in range 0 ~255
2-27-12
PPU REGISTERS ]
ADDRESS: 212AH/ 212BH NAME: WBGLOG/ WOBJLOG CONTENTS: MASK LOGIC SETTINGS FOR WINDOW-1 & 2 ON EACH SCREEN
07 Dé DS D4 D3 D2 D1 BO WINDOW LOGIC BG4 BG3 BG2 BGI 212AH p1_| po | o1 | po | pt | po | ot | do
WINDOW LOGIC Color OBJ 212BH D1 | bo | Di | DO
WINDOW LOGIC: SET MASK LOGIC FOR WINDOW-1 & 2 When both Window-1 and Window-2 are “IN,” the shaded portion will be masked as follows:
W1 : Window 1 W2 : Window 2
W141
we
D1} DO} LOGIC 0 OR 1 AND io) XOR 1 XNOR
ce 1w2
2-27-13
CC
ADDRESS: 212CH NAME: ™ CONTENTS: MAIN SCREEN DESIGNATION
D7 D6 DS. D4 D3 D2 Di DO THROUGH MAIN 212CH op | Ba4 | Ba3 | BG2 | Bat
MAIN SCREEN DESIGNATION: Designate the screen (BG1 ~ BG4, OBJ) to be displayed as the Main Screen. Designate the screen to be added for the screen addition/subtraction .
0: DISABLE
L 1: ENABLE
ADDRESS: 212DH
NAME: TS
CONTENTS: SUB SCREEN DESIGNATION
D7 DE DS D4 D3 b2_ Dt BO THROUGH SUB 212DH op | sca] sG3] saz] BGI
SUB SCREEN DESIGNATION: Designate the screen (BG1 ~ BG4, OBJ) to be displayed as SUB-Screen. Designate the screen to be added for the screen addition/subtraction
0: DISABLE
2-27-14
PPU REGISTERS
ADDRESS: 212EH
NAME: TMW
CONTENTS: WINDOW MASK DESIGNATION FOR MAIN SCREEN
D7 D6 05 D4 03 D2 D4 i2}0] THROUGH MAIN (WINDOW) 212EH ops | Be4 | Bas | BG2 | Bat
WINDOW MASK DESIGNATION FOR MAIN SCREEN: In the window area designated by register <2123H> ~ <2129H>, the screen to be displayed can be designated, which is selected among the Main screen designated by register <212CH>. 0: DISABLE
L 1: ENABLE
ADDRESS: 212FH
NAME: TSW
CONTENTS: WINDOW MASK DESIGNATION FOR SUB SCREEN
DZ D6 DS D4 D3 02 D1 DBO THROUGH SUB (WINDOW) 212FH ops | sc4 | Ba3 | BG2] Bai
WINDOW MASK DESIGNATION FOR SUB SCREEN: In the window area designated by register <2123H> ~ <2129H>, the screen to be displayed can be designated, which is selected among the Sub screen designated by register <212DH>.
[ 0: DISABLE
1: ENABLE
2-27-15
EE
ADDRESS: 2130H
NAME: CGSWSEL
CONTENTS: INITIAL SETTINGS FOR FIXED COLOR ADDITION OR SCREEN ADDITION
D7 D6 DS D4 D3 D2 D1 DO COLOR WINDOW ON/OFF CC ADDIDIREC MAIN SW (A) SUB SW (B) 2130H mt_| mo | si SO IENABLEBELEC SFOS
DIRECT SELECT (Refer to p. A-17): The VRAM data (Color & Character data) become the color data directly. (Only when mode-3, 4 & 7 are selected.) 0: DISABLE Ci: ENABLE
FIXED COLOR ADDITION/SUBTRACTION ENABLE: Designate whether 2 kinds of the data should be added/subtracted from each other or not, which are the fixed color set by register <2132H> and the color data which is set to the CGRAM 0 : ADDITION/SUBTRACTION
[ FOR FIXED COLOR
1: ADDITION/SUBTRACTION FOR SUB SCREEN
- COLOR WINDOW ON/OFF MAIN/SUB SWITCH: When the Color Window is functioning, the assignment of the window area for MAIN and SUB screens can be designated.
120] FUNCTION 0 | ON (All the time) 1 | ON (Inside window only} 0 | ON (Outside window only) 1_| OFF (All the time) 4400
2-27-16
PPU REGISTERS
ADDRESS: 2131H
NAME: CGADSUB
CONTENTS: ADDITION/SUBTRACTION & SUBTRACTION DESIGNATION FOR EACH BG SCREEN OBJ & BACKGROUND COLOR
D7 D6 05 04 D3 D2 Di Bo ADD 2 ADD or SUB ENABLE 2131H SUB_ENABLA BACK] oB/ | BG4| BG3] BG2] BG1 COLOR oat apoirionsueTRACTION ENABLE: Designate the color data of BG1 ~ BG4, OBJ, or Back in the main screen for addition/subtraction of the Sub screen color data (or fixed color data.)
C 0:DISABLE
1:ENABLE (Addition/Subtraction function: ON)
‘= “1/2 OF COLOR DATA” DESIGNATION: When color constant addition/subtraction or screen addition/ subtraction is performed, designate whether the RBG result in the addition/subtraction area should be “1/2” or not. The back (color constant) area on the Sub:screen, will not become “1/2” 0: DISABLE 1: ENABLE (1/2 function: ON)
'——# COLOR DATA ADDITION/SUBTRACTION SELECT: In the case of executing screen addition/subtraction, designate either addition or subtraction mode. 0 : ADDITION MODE SELECT 1 : SUBTRACTION MODE SELECT
2-27-17
E
ADDRESS: 2132H
NAME: COLDATA
CONTENTS: FIXED COLOR DATA FOR FIXED COLOR ADDITION/SUBTRACTION
D7 D6 —OiDS D4. D2 Di__—io. COLOR CONSTANT DATA COLOR BRILLIANCE DATA 2132H BLUE |GREEN| RED | D4 | D3 | v2 | pi | obo
COLOR CONSTANT DATA: Set the color constant data for color constant addition/subtraction.
COLOR DESIGNATION: Bit for Selecting Desired Color
R/G/B brightness should be set using 5-bit data. Example: RED_ : COH, 3FH (B=00H, G=00H, R=1FH GREEN: AOH, Bei B=00H; G=1FH; R=00H BLUE_ : 60H’9FH (B=1FH, G=00H, R=00H) WHITE : EFH BLACK : EOH
2-27-18
PPU REGISTERS ]
ADDRESS: 2133H
NAME: SETINI
CONTENTS: SCREEN INITIAL SETTING
2133H 07 D6 DS D4 D3 D2 D1 DO EXT. | EXT. PSEUDO 224 OBJ-V | INTER- SYNC. | INPUT 512 239 _|SELECT| LACE
SCANNING INTERLACE(1) NON/INTERLACE(0) SELECTION: (Related to <2105H>)
OBJ V-DIRECTION DISPLAY: In the interlace mode, select either 1 dot per line or 1 dot repeated every 2 lines. If “1” Is written, the OBJ appears to be reduced to half its vertical size.
BG V-DIRECTION DISPLAY: Switch the display line of a field to 224-Line or 239-Line. (In case of interlace mode, it will be doubled dot.) c? : 224 LINES 1: 239 LINES
4 HORIZONTAL PSEUDO 512 MODE: An imaginary resolution of 512 (Horizontal) can be created by shifting the SUB screen half dot to the left, alternately every field: c 0. DISABLE 0: : ENABLE
4 EXTBG MODE (SCREEN EXPAND): Enable the data supplied from the external LSI. For the Super NES, enable when the screen with priority is used on mode-7.
4 EXTERNAL SYNCHRONIZATION: Used for super-imposing images, etc. Normally, “O” should be written.
3K If “D1" is set in non-interlace mode, even and odd numbered lines of the OBJ will be displayed alternately every field.
2-27-19
c
ADDRESS: 2134H / 2135H / 2136H NAME: *MPYL / *MPYM/ *MPYH CONTENTS: MULTIPLICATION RESULT
D7 D6 DS D4 D3 D2 D1 DO
MP Y (LOW) 2134H M7_| me | m5 | M4 | m3] m2{ m1 | mo
MP Y (MID) rae mis | mia] mia] Miz] mii{ mio] mo | M8
MP Y (HIGH) psa M23 | M22] M21] M20] mio] mis] mi7]_ Mt6
. This is a Multiplication result (complement of 2) and can be read by setting 16-bit to register <211BH> and setting 8-Bit data to register <211CH>
ADDRESS: 2137H
NAME: *SLHV
CONTENTS: SOFTWARE LATCH FOR H/V COUNTER
07 D6 DS D4 D3 D2
SOFT LATCH FOR H/V COUNTER 2137H siz | sie] sus| sia] sis] sez] sit] sto 01 Do
This is a register, which generates the pulse for latching the H/V counter value.
The H/V counter value at the point when register <2137H> is read can be latched. The data which was read is meaningless data.
The H/V counter value latched can be referred by registers <213CH> and <213DH>.
2-27-20
PPU REGISTERS ]
ADDRESS: 2138H
NAME: *OAMDATA
CONTENTS: READ DATA FROM OAM
BZ. D6 DS D4 D3 b2 Di Bo OAM DATA (LOW, HIGH) 2138H o7_| pe | 05 | ps4 | 03 | v2] pt] oo
. This is a register, which can read the data at any address of the OAM.
D When the address is set to register <2102H> <2103H> and register <2138H> is also accessed, the data can be read in the order of Low 8-Bit/High 8-Bit. Afterward, the address will be increased automatically, and the data of the next address can be read.
ADDRESS: 2139H/ 213AH NAME: *VMDATAL / *VMDATAH CONTENTS: READ DATA FROM VRAM
D7 D6 DS D4 03 D2 D1 BO VRAM DATA (LOW) 2139H o7 | pe | o5 | os | 03 | v2] m1] vo
VRAM DATA (HIGH) 213AH Dis | 014 | p13] pi2]_ p11] pio] po | 3
. This is a register, which can read the data at any address of the VRAM.
. The initial address should be set by registers <2116> and <2117H>. The data can be read by the address which has been set initially.
5 When reading the data continuously, the first data for the address increment should be read as “dummy” data after the address has been set.
. Quantity to be increased will be determined by “SC INCREMENT” of register <2115H> and the setting value of the “FULL GRAPHIC.”
2-27-21
ES
ADDRESS: 213BH
NAME: *CGDATA
CONTENTS: READ DATA FROM CG-RAM
D7. D6 SS A Ci CG DATA (LOW, HIGH) (D14) (D13) (012). (D114) (D10) (D9) _ (D8) | 213BH o7 | pe | v5 | v4 | v3 | v2] oI DO
. This is a register, which can read the data at any address of the CG-RAM. . The initial address can be set by register <2121H>. The lower 8-Bit is read first, and then the upper 7-Bit will be read by accessing the register. The current address will be increased to the next address at the same time the upper 7-Bit is read.
Te eee] ADDRESS: 213CH/213DH NAME: *OPHCT /*OPVCT CONTENTS: H/V COUNTER DATA BY EXTERNAL OR SOFTWARE LATCH
D7 06 DS D4 D3 D2 Di Bo OUTPUT DATA OF H-COUNTER (Hg) | 213CH H7 | He | H5 | H4 | H3 | H2 | Hi | Ho
OUTPUT DATA OF V-COUNTER (v8) 213DH v7 | ve | vs | v4 | v3 | v2 | wi _| vo
. The H/V counter is latched by reading register <2137H>, and its H/V counter value can be read by this register.
. The H/V counter is also latched by the external latch, and its value can be read by this register.
. If register <213CH> or <213DH> is read after register <213FH> has been read, the lower 8-Bit data will be read first, and then the upper 1-Bit will be read by reading the register.
2-27-22
PPU REGISTERS ]
ADDRESS: 213EH
NAME: “STAT77
CONTENTS: PPU STATUS FLAG & VERSION NUMBER
DZ. D6 DS D4 D3 D2 D1 BO TIME |RANGE |MASTER| 5C77 VERSION NUMBER 213EH OVER] OVER] /SLAVE | | | Say
p> MASTER / SLAVE MODE SELECT: LS! MODE (Normally “0” is set)
‘> OBJ DISPLAY STATUS (ON A HORIZONTAL LINE) RANGE: When Quantity of the OBJ (regardless of the size) becomes 33 pcs or more, [ “1” will be set. TIME: When quantity of the OBJ which is converted to “8 x 8-SIZE” is 35 pcs or more, “1” will be set
ADDRESS: 213FH NAME: “STAT78 CONTENTS: PPU STATUS FLAG & VERSION NUMBER
07 D6 DS D4 D3 D2 D1 Do FIELD |EXT. NTSC 5C78 VERSION NUMBER
LATCH} /PAL | | | 213FH
DISPLAY METHOD c? : NTSC
1: PAL
EXTERNAL LATCH FLAG: When the external signal (Light Pen, etc.) is applied, it
rt d7 in SI enables to latch the H/V counter value. It is connected to I/O pot S. (Refer to page 1-28-1.) This is a status flag, which indicates whether the 1st or 2nd field is scanned at the interlace mode. (The definition is different from the field of NTSC.) Cc 0: 1ST FIELD 1° 2ND FIELD
2-27-23
[
ADDRESS: 2140H /2141H / 2142H / 2143H NAME: APUIOO / APUIO1 / APUIO2 / APUIO3 CONTENTS: COMMUNICATION PORT WITH APU
DZ. D6 DS D4 D3 D2 D1 {e}t) 2140H
APU vo PORT etait
| | | | | ! | 2143H
. The port provides more registers for the purpose of IN/OUT, which are 8 registers in total in the APU. Therefore, the different register will be accessed, whether reading or writing for the same address.
° Refer to Part 2 of this manual for the details of the communication method.
2-27-24
PPU REGISTERS ] ES
ADDRESS: 2180H
NAME: WMDATA
CONTENTS: DATA to consecutively read from and write to WRAM
07 D6 DS D4 D3 b2 D4 BO WORK RAM DATA 2180H a7 | ap | as | as | a3 | a2 | Ai | Ao
- Data to consecutively read and write at any address of WRAM
- Data is read and written at address set by register <2181H> ~ <2183H>, and address automatically increases each time data is read or written.
ADDRESS: 2181H/2182H/2183H NAME: WMADDL/WMADDM/WMADDH. CONTENTS: Address to consecutively read and write WRAM
D7 D6 DS 04 ex} D2 Di DO WORK RAM ADDRESS (Low) 2181H A7 | ae | a5 | asd | as | a2 | at] ao WORK RAM ADDRESS (Mid) 2182H Ai5| Ai4] Ais] ai2] aii] ato] ag | as WORK RAM ADDRESS (High) 2183H Lats
- Address to be set before WRAM is consecutively read or written.
AO through A16 at register <2181H> ~ <2183H> is lower 17 bit address to show address 7E0000 ~ 7FFFFF Memory.
(NCL PG 66a)
2-27-25
[
Chapter 28. CPU Registers ADDRESS :4200H NAME :NMITIMEN
CONTENTS: ENABLE FLAG FOR V - BLANK, TIMER INTERRUPT & STANDARD ean
D7 06 DS D4 D3 D2 D1 DO NMI TIMER ENABLE STANDARD CNTRL | 4200H ENABLE v-EN | H-EN ENABLE
STANDARD CONTROLLER ENABLE
° : Disable Automatic reading of Standard Controller
1: Enable Automatic reading of Standard Controller 3k Reading the data can be started at the beginning of V - Blank period, but it takes about 3 or 4 scanning lines to complete the read.
TIMER ENABLE [ V- EN: V- COUNT TIMER ENABLE H - EN: H- COUNT TIMER ENABLE
VIH RAEN FUNCTION
0] 0 |Disable BOTH H & V. 0] 1 Enable H only. IRQ is applied by H - count timer value designated. 1] 0 |EnableV only. !RQ is applied by V - count timer value designated. 1] 1 |Enable both H & V. IRQ is applied by both H and V count timer value designated.
4 NMI ENABLE : Enable NMI at the point when V - Blank begins. ‘When power is turned on or the reset signal is applied, it will be “O”.) [" * NMI DISABLE 1: NMI ENABLE
ADDRESS Sanh H NAME :WR
CONTENTS: PROGRAMMABLE VO PORT (OUT - PORT)
D7 D6 0S D4 D3 D2 D1 DO
VO PORT PAG D7 D6 | DS | D4 | D3 | D2 | D1 | Do
- This is a Programmable I/O port (OUT - PORT). The written data will be output directly from the OUT - PORT.
e When this is used as a INPORT, “1” should be written to the particular bit which will be used as aN - PORT. The input data can be read by register <4213H>. © Only D6 and D7 can be used by the Super NES. Standard Controller | and Ill (connector 1) has signal at D6 and Standard Controller II and IV (connector 2) has signal at D7. Signal at D7 is also an external latch input signal (Refer to page 1-27-23).
2-28-1
CPU REGISTERS
ADDRESS :4202H / 4203H NAME :WRMPYA/ WRMPYB
CONTENTS: MULTIPLIER & MULTIPLICAND BY MULTIPLICATION
D7 D6 DS D4 D3 D2 D1 DO MULTIPLI: - Ul CAND -A AACA A7 | AG | AS | A4 | A3 | A2 | Al | AO
MULTIPLIER - B 4203H
B7 | B6 | BS | B4 | B3 | B2 | Bi | BO
° This is a register, which can set as multiplicand (A) and a multiplier (B) for Absolute Multiplication of “A (8 - bit) X B (8 - bit) = C (16 - bit)”. « APRODUCT (C) can be read by registers <4216H><4217H>.
e Set in the order of (A) and (B). The operation will start as soon as (B) has been set, and it will be completed right after an 8-machine cycle period. e Once the data of the A-REGISTER is set, it will not be destroyed until new data is set. a ADDRESS :4204H/ 4205H / 4206H NAME :WRDIVL / WRDIVH / WRDIVB CONTENTS: DIVISOR & DIVIDEND BY DIVIDE D7 D6 D5 04 D3 D2 D1 DO DIVIDEND- C (LOW) C7 l Ccé | cS | C4 | C3 | c2 | C1 | co ee
DIVIDEND- C (HIGH) C15 l C14 | C13 | c12 L ci | C10 | cg | cs eo
DIVISOR - B B7 | B6 | BS | B4 | B3 | B2 | Bi | Bo eee
¢ This is a register, which can be set as Dividend (C) and a Divisor (B) for Absolute Divide of “C (16-bit) + B (8-bit) = A (16-bit)”. « The Quotient (A) can be read by registers <4214H><4215H>. And the remainder can be read by registers <4216H><4217H>. « Set in the order of (C) and (B). The operation will start as soon as (B) has been set, and it will be completed right after a 16-machine cycle period. « Once the data of the C-REGISTER is set, it will not be destroyed until new data is set.
2-28-2
[
ADDRESS :4207H / 4208H NAME :HTIMEL / HTIMEH CONTENTS:H-COUNT TIMER SETTINGS D7 D6 D5 D4 D3 bd2 D1 Do H - COUNT TIMER Beat H7 He | HS | H4 | HS | He Ht | HO
HMSB | 4208 H H8
- This is a register, which can set the H-COUNT TIMER value.
«The stored value should be from 0 through 339, which is counted from the far left on the screen.
« When the coordinate counter becomes the count value set, the IRQ will be applied. And at the same time, “1” will be written to “timer IRQ” of register <4211H> (READ RESET). Enable/Disable of the interrupt will be determined by setting register <4200H>. %& This continuous counter is reset every scanning line, therefore once the count value is stored, it is possible to apply the IRQ every time the scanning line comes to the same horizontal position on the screen.
ADDRESS :4209H / 420AH NAME :VTIMEL / VTIMEH
CONTENTS: V-COUNT TIMER SETTINGS
D7 D6 DS D4 D3 b2 D1 Do V - COUNT TIMER AE vw { ve | VS | V4 | v3 | v2 vi vo
Vv MSB ra 420AH
© This is a register, which can set the V-COUNT TIMER value.
- The stored value should be from 0 through 261 (262), which is counted from top of the screen. (This line number described is different from the actual line number on the screen.) ¢ When the coordinate counter becomes the count value set, the IRQ will be applied. At the same time, “1” will be written to ‘timer IRQ” of register <4211H> (READ RESET). Enable/Disable of the interrupt will be determined by setting register <4200H>.
% This is a continuous counter like the H-counter and will reset every time 262 lines are scanned. Once the count value is stored, it is possible to apply the IRQ every time the scanning line comes to the same vertical position on the screen.
2-28-3
CPU REGISTERS J
ADDRESS :420BH NAME MDMAEN CONTENTS: CHANNEL DESIGNATION FOR GENERAL PURPOSE DMA & TRIGGER (START) D7 D6 DS 04 03 D2 D1 DO
GENERAL PURPOSE DMA ENABLE FLAG CH7 EN | CH6 EN | CHS EN | CH4 EN [ CHS EN | CH2 EN pout EN [CHO EN oF AU a.
- General purpose DMA consists of 8 channels total (CHO ~ CH7).
¢ This is used to designate 1 of the 8 channels (8 channels maximum).
- The channel to be used can be designated by writing “1” to the bit of this channel. As soon as “1” is written to the bit (after a few cycles have passed), the general purpose DMA transfer will begin.
« When general purpose DMA of the designated channel is completed, the flag will be cleared.
2-28-4
ADDRESS :420CH NAME :HDMAEN CONTENTS: CHANNEL DESIGNATION FOR H-DMA D7 D6 DS D4 D3 D2 D1 DO H - DMA ENABLE FLAG CH7 EN | CH6 EN | CHS EN | CH4 EN | CH3 EN [che EN jcH EN | CHO EN emae
- The H-DMA consists of 8 channels total (CHO ~ CH7). ¢ The register is used to designate the channel out of 8 channels (8 channels maximum).
- The channel which should be used can be designated by writing “1” to the bit of this register. As soon as H-Blank begins (after a few cycles have passed), the H-DMA transfer will begin.
ADDRESS :420DH NAME :MEMSEL
CONTENTS: ACCESS CYCLE DESIGNATION IN MEMORY @ AREA (Refer to “Memory Map”)
D7 D6 Ds D4 D3 D2 D1 DO I ] | | I ] 2.68 As 3 | 4200H l | | ! | | :
ACCESS CYCLE DESIGNATION IN MEMORY @ AREA cr : 2.68MHz access cycle 1: 3.58MHz access cycle (Only when the high speed memory is used)
- MEMORY ® shows the address (8000H ~_FFFFH) of the bank (80H ~ BFH) and all the addresses of the bank (COH ~ FFH). ¢ When power is turned on or the reset signal is applied, it becomes “0”.
(NCL PG 91 & 91a)
2-28-5
CPU REGISTERS ie g ees |
ADDRESS :4210H NAME >« RDNMI CONTENTS: NMI FLAG BY V - BLANK & VERSION NUMBER D7 D6 D5 D4 D3 D2 D1 DO
BLANK SNES-CPU VERSION NUMBER 4210H NM! ] l L l L
NMI FLAG BY V-BLANK : When “1” is written to “NMI ENABLE” of register <4200H>, this flag will show NMI status.
[" : NMI has not occurred
1: NMI has occurred
3% A “1” is written to this tlag at the beginning of V-Blank and a “0” is written at the end of V-Blank. It can also be reset by reading this register.
ADDRESS :4211H N. AME >k TIMEUP CONTENTS: IRQ FLAG BY H/V COUNT TIMER
D7 Dé DS D4 D3 D2 D1 Do
TIMER IRQ 4211H
IRQ FLAG BY H/V COUNT TIMER :
This flag is “READ RESET”. (If Timer Enable is set by “Timer Enable” of register <4200H>, IRQ oe be applied and the flag will be set as soon as H/V count timer reaches the value stored.
3% Even if V-EN ="0" and H-EN ="0" are set by “Timer Enable” of register <4200H>, this flag will be reset.
[ : Either H/V count timer is active or disabled 1: Status of H/V count timer is Time-Up
2-28-6
LE
ADDRESS :4212H NAME: HVBJOY CONTENTS: H/V BLANK FLAG & STANDARD CONTROLLER ENABLE FLAG D7 Dé D5 D4 D3 D2 D1 Do Vv H STANDARD} cntAL | 4212H BLANK | BLANK ENABLE a
STANDARD CONTROLLER ENABLE: This flag shows the timing to read the data of the Standard Controller. (However, it is limited to the case where the “STANDARD CNTRL ENABLE” of register <4200H> is set to “1”) 0 : This is a period when the Standard Controller is not reading the data or is disabled. (In case “0” is set to “STANDARD CNTRL ENABLE” of register <4200H>)
1: This is a period when the Standard Controller is reading data.
‘> H-BLANK PERIOD FLAG : It shows whether the scan is in the H-Blank period or not. 0 : Out of H-Blank period 1: In H-Blank period 4p V-BLANK PERIOD FLAG: It shows whether the scan is in the V-Blank period or not.
[° : Out of V-Blank period
1: In V-Blank period SS ADDRESS :4213H NAME >*« RDIO CONTENTS: PROGRAMMABLE I/O PORT (IN - PORT) D7 D6 DS D4 D3 D2 D1 DO
VO PORT 4213H D7 D6 DS | D4 | D3 | D2 | D1 DO
¢ This is a Programmable I/O port (IN - PORT). The data which is set to the IN-PORT should be read directly.
¢ The bit in which “1” is written by register <4201H> is used as the IN-PORT.
- Only D6 and D7 can be used by the Super NES. Standard Controller | and Ill (connector 1) has signal at D6 and Standard Controller II and IV (connector 2) has signal at D7. Signal at D7 is also an external latch input signal (Refer to “PPU Status Flag and Version Number’ in “PPU Registers’).
2-28-7
CPU REGISTERS
ADDRESS :4214H / 4215H NAME: RDDIVL/ * RDDIVH
CONTENTS: QUOTIENT OF DIVIDE RESULT
D7 D6 D5 D4 D3 D2 D4 Do
QUOTIENT - A (LOW) Dia
Ay | AB | AB | AS | AS | AZ | AT YAO
QUOTIENT - A (HIGH) peach AIS | At | AIS | A12 | AT | Ato | AD | AB
- This is Quotient (A), which is a result of absolute division of “C (16 BIT) + B (8 BIT) = A (16 BIT)”.
- Dividend (C) and divisor (B) are set by registers <4204H>, <4205H>, and <4206H>.
TT ADDRESS :4216H/ 4217H NAME :« RDMPYL / * RDMPYH CONTENTS: PRODUCT OF MULTIPLICATION RESULT OR REMAINDER OF DIVIDE RESULT D7 D6 DS D4 D3 D2 D1 Do PRODUCT-C [MULTIPLICATION] / REMAINDER [DIVIDE] (LOW) Morell c7 | co | Cc | CH | OO YY C2} ot | CO
PRODUCT-C [MULTIPLICATION] / REMAINDER [DIVIDE] (HIGH) PSRIN C1 as |main| oe |e) |e |e Oe ee |e @® WHEN USED FOR MULTIPLICATION
This is a Product (C), which is a result of Absolute Multiplication of “A (8 BIT) XB (8 BIT) =C (16 BIT)”.
- Multiplicand (A) and Multiplier (B) are set by registers <4202H> and <4203H>.
@ WHEN USED FOR DIVISION
- This is a Remainder, which is a result of Absolute Division of “C (16 BIT) + B (8 BIT) = A (16 BIT) » * * REMAINDER (8 or 16 bit)”.
- Dividend (C) and divisor (B) are set by registers <4204H>, <4205H>, and <4206H>.
2-28-8
EL
ADDRESS :4218H/4219H/421AH/421BH/421CH/421DH/421EH/421FH NAME STD CNTALIL / 1H / 2U/2H/3L/3H/4U/4H CONTENTS: DATA FOR STANDARD CONTROLLER I, Il, Ill, & IV D7 D6 D5 D4 D3 D2 D1 DO STANDARD CONTROLLER -! (LOW) A x L R 4218H BUTTON] BUTTON | BUTTON | BUTTON STANDARD CONTROLLER -I (HIGH) B Y | SELECT) START DIRECTIONAL PAD 4219H BUTTON] BUTTON| BUTTON|BUTTON| UP__| DOWN | LEFT | RIGHT STANDARD CONTROLLER -II (LOW) Xx L R 421AH BUTTON] BUTTON | BUTTON | BUTTON STANDARD CONTROLLER -II (HIGH) B Y | SELECT) START DIRECTIONAL PAD 421BH BUTTON] BUTTON|BUTTON|BUTTON| UP | DOWN | LEFT | RIGHT STANDARD CONTROLLER -III (LOW) A x L R 421CH BUTTON| BUTTON| BUTTON | BUTTON | | ! | STANDARD CONTROLLER -III (HIGH) B Y | SELECT) START DIRECTIONAL PAD 421DH BUTTON] BUTTON|BUTTON|BUTTON| UP__| DOWN | LEFT | RIGHT STANDARD CONTROLLER -IV (LOW) A ».¢ L R 421EH BUTTON] BUTTON| BUTTON | BUTTON | | | | STANDARD CONTROLLER -IV (HIGH) ‘ B Y | SELECT} START DIRECTIONAL PAD 421FH BUTTON] BUTTON| BUTTON|BUTTON| UP__| DOWN | LEFT | RIGHT
For controller expansion
- Registers <4016H> <4017H> can be used the same as the NES. D7 D6 D5 D4 D3 D2 D1 Do PORT
QUTO, OUT1, OUT2 (OUTI and 4016H WR OUT2 are not output from SNES)
4017H DO : Data f troller II
pout) 4017H D1 : Data for Controller IV
[ : connected 0 : not connected
CPU REGISTERS ]
Artie :43X0H (X : CHANNEL NUMBER <0 ~ 7>)
CONTENTS: PARAMETER FOR DMA TRANSFER
D7 D6 D5 D4 D3 D2 D1 Do CH | CH ABUS ADDRESS | CH TRANSFER WORD SELECT | 43X0H
- TYPE INC/DEC | FIXED pz | pi | ovo
- Transfer yy Origination DMA TRANSFER WORD SELECT GENERAL PURPOSE DMA : B-ADDRESS CHANGE METHOD DESIGNATION PER CHANNEL D2[Di[Do|_ ADDRESS TO BE WRITTEN 1-ADDRESS 2-ADDRESS (VRAM etc.) LH 1-ADDRESS (WRITE TWICE) 2-ADDRESS (WRITE TWICE) L,L,H,H 4-ADDRESS LHL. H-DMA : The number of bytes to be transferred per line and write method designation. D2]Di]D0|# OF BYTE TQ ADDRESS TO BE WRITTEN BE TRANS- FERRED 1 BYTE |1-ADDRESS 2BYTE |2-ADDRESS (VRAM etc.) LH 2BYTE |1-ADDRESS (WRITE TWICE) LL 4 BYTE |2-ADDRESS (WRITE TWICE) LLH.H 4BYTE _|4-ADDRESS LHILH
‘—t> FIXED ADDRESS FOR A-BUS & AUTOMATIC INCREMENT /DECREMENT SELECT [IN CASE OF GENERAL PURPOSE DMA] +0000 o+-+00 ot0+0
I+~co00 lo++c0 loto+o
D3 c° : Automatic address increment/decrement 1: Fixed address (To be used when clearing VRAM etc.)
D4 ce : Automatic increment
1: Automatic decrement 4 TYPE DESIGNATION [H-DMA ONLY] : Addressing mode designation when accessing the data (Refer to page B-2).
fie : ABSOLUTE ADDRESSING
1: INDIRECT ADDRESSING 4 TRANSFER ORIGINATION DESIGNATION : Transfer direction A Bus—>B Bus B Bus > A Bus Designation (Refer to page B-1) c° : A-BUS —>B-BUS (CPU MEMORY —> PRU) 1: B-BUS —>A-BUS (PPU —> CPU MEMORY) (In case “0” is written to D3)
- pee in case the DMA transfer is performed from CPU memory to PPU, “0” should be written.
2-28-10
c
Rr :43X1H (X : CHANNEL NUMBER <0 ~ 7>) E 5 CONTENTS: B-BUS ADDRESS FOR DMA D7 D6 05 D4 03 D2 D1 DO
B- ADDRESS X1H BA7 BA6 l BAS BA4 | BAS | BA2 BAI BAO a
- This is a register which can set the address of B-bus.
¢ Whether this is the address of the “Transfer Destination” or the address of the “Transfer Origination” can be determined by D7 (Transfer Origination) of register <43X0H>.
Direction can be designated by “Transfer Origination” A-BUS v B- BUS Actual address is 0021XXH. (XX : value by this register) 2% When H-DMA is performed, it will be the address of the “Transfer Destination”.
ADDRESS :43X2H / 43X3H / 43X4H (X : CHANNEL NUMBER <0 ~ 7>) NAME : CONTENTS: TABLE ADDRESS OF A-BUS FOR DMA <A1 TABLE ADDRESS> D7 D6 D5 D4 D3 D2 D1 DO A1 TABLE ADDRESS (LOW) Kye av | Ae | AB | At | AB | Ae YY AT | AO
A1 TABLE ADDRESS (HIGH) fox AIS | Ald | A1Z | AZ | All | A1O | AD | AB
A-TABLE BANK i meta ae nel | a= te ee me ee | me | pe 48x4H
¢ This is a register, which can set the address of A-bus.
¢ Whether this is the address of the “Transfer Destination” or the address of the “Transfer Origination” can be determined by D7 (Transfer Origination) of register <43X0H>. A “0” should be written to D7 except in special cases. « Inthe H-DMA mode, the address of the transfer origination is designated except it is a special case. Therefore, for the CPU area designated by this address, the data (page B-2) must be set by the absolute addressing mode or the indirect addressing mode. e This address becomes the basic address on the A-Bus during DMA transfer period and the address will be increased or decreased based on this address. (When the general purpose DMA is performed, it will be decreased.)
2-28-11
CPU REGISTERS J
ADDRESS :43X5H / 43X6H / 43X7H (X : CHANNEL NUMBER <0 ~ 7>) NAME 5
CONTENTS: DATA ADDRESS STORE BY H-DMA
& NUMBER OF BYTE TO BE TRANSFERRED SETTINGS BY GENERAL PURPOSE DMA
D7 D6 D5 D4 D3 D2 D1 DO DATA ADDRESS (LOW) pclae DA7 l DA6 | DAS | DA4 | DA3 | DA2 | DA1 | DAO 43X5H NUMBER OF BYTES TO BE TRANSFERRED (LOW) GENERAL s7 | 86 | 8 | B | B | B | Bt | BO pS
DATA ADDRESS (HIGH) uel rol) DAIS | DAI4 | DAIS | DAI2 | DAT | DAIO | DAS | DAB | NUMBER OF BYTES TO BE TRANSFERRED (HIGH) GENERAL BIS | Bi4 | 819 | B12 | Bt | 510 | 89 | BB Yee
DATA BANK FOR H-DMA DA23 | DA22 | DA21 | DA20 | DAI9 | DAI8® | DAI7 | DAI6 | 43x7H
° IN CASE OF H-DMA This is a register in which the indirect address will be stored automatically in the Indirect addressing mode. The indirect address means the data described on page B-2. It is not necessary to read or write directly by the CPU except in special cases.
e IN CASE OF GENERAL PURPOSE DMA This is the register which can set the number of bytes to be transferred. However, the number of Byte (0000H) means 10000H.
2-28-12
l
ADDRESS :43X8H / 43X9H (X : CHANNEL NUMBER <0 ~ 7>) CONTENTS: TABLE ADDRESS OF A-BUS BY DMA <A2 TABLE ADDRESS> D7 Dé D5 D4 D3 D2 D1 Do
A2 TABLE ADDRESS (LOW) Pee
(7am |e lee ate | ere ee ee 2 ee ee ee | eee | A2 TABLE ADDRESS (HIGH) fon AIS | Al4 | AIS | A12 | AIT | Ato | AD | AB
¢ This is the address which is used to access the CPU and RAM. It will be increased automatically. (See page B-2.)
- The data of this register is used as the basic address which is the address set by the “A1 Table Address”. Afterwards, because it will be increased (or decreased) automatically, it is not necessary to set the address into this register by the CPU directly.
However, if the data which is transferred needs to be changed by force, it can be done by setting the CPU memory address to this register. In such case, the H-DMA address of the CPU which is accessed currently will be changed by reading this | ONLY register.
ADDRESS :43XAH (X : CHANNEL NUMBER <0 ~ 7>) NAME 4 CONTENTS: THE NUMBER OF LINES TO BE TRANSFERRED BY H-DMA D7 D6 DS D4 D3 D2 D1 DO
NUMBER OF LINE
U 0 8 43XAH Continue L6 | L5 | L4 | L3 | L2 | u | Lo
This is the register which shows the number of lines for H-DMA transfer. (Refer to page B-2.)
The number of lines written to the CPU memory will be the basic number of lines. It is not necessary to write the data into this register by the CPU directly.
2-28-13
OUTLINE
Chapter 1. | SNES Sound Source Outline
OUTLINE
The SNES sound source is composed of a Sound-CPU-IC, a single chip in which are integrated an 8-bit CPU, IPL ROM, I/O ports, a DSP-IC, and peripheral apparatus.
CHARACTERISTICS
*CPU : Sony SPC700 series CMOS 8-bit CPU core *Minimum Command Execution Time —_: 1.953y1s/2.48MHz when active Internal ROM : 64 byte (IPL ROM) «Memory Space : 64K byte Peripheral Functions I/O Ports : SNES CPU Interface I/O Ports 8 bit x 4 Universal I/O Ports 8 bit x 2 Timers : (8 bit timer + 4 bit counter) x 3 sets *Output Sound Production : 4-bit ADPCM sampling sound x 8 tones (simultaneous production)
=]
1.2 SYSTEM OUTLINE
JOY GAME maine STICK CASSETTE wv ster 10, ETC.
VIDEO AUDIO AUDIO-IN concen qoo--.. — i ' i 1
- SNES CPU SNES PPU | ! MAIN-CPU SIDE 1 p
SNES BUS
ro--- }---------------------}--}---------, ' APU VO PORT AUDIO-OUT i ' 1 SNES-SOUND SIDE |) SounD cpu DsP a ' ; CONVERTER] p ' ‘ ' ‘ 1 i 1 1 5 512K RAM ' ' ‘ 5 1
1.3 Figure 3-1-1 System Block Diagram
Designation and Role of Each Section: 1.3.1
1.3.2
1.3.3
1.3.4
1.3.5 Sound-CPU: SNES sound source CPU. Program and tone color data are read into RAM from the game cassette through the SNES CPU, Consequently controlling the game music. In addition, the Sound- CPU is provided with an internal |PL-ROM which is activated upon reset. The IPL-ROM provides for transmission of data through the SNES CPU, initial settings of the SNES sound source, etc. DSP: Digital Signal Processor. Reproduces tone quality data in RAM. Carries out various functions for the purpose of musical expression. 512K RAM: Shared on a time basis by the Sound-CPU and the DSP. SNES CPU: CPU for SNES use. Carries out progression of the game in conformity with the game cassette format. SPPU: PPU for SNES use. Creates imaging through CPU control.
OUTLINE ]
1.4 MEMORY MAPPING
0000H
External Memory Region
OOEFH 0-Page OOFOH Peripheral Function Registers
OOFFH
01008 512K bit RAM 1-Page External Memory Region (installed on board)
O1FFH
0200H
Standard data transmission region External Memory Region
7FFFH
FFBFH
FFCOH
IPL ROM 64 byte *
FFFFH
- The initial hardware setting program is installed in the IPL ROM Figure 3-1-2 Memory Map
3-1-4 Figure 3-1-3. Sound Signal Flow
ADSR(2) EON’
ADSPYEN' Me FEE MAIN a
CS) lo
@Mony—>|_ PM a
BRR PITCH VOL (R ”
Lat ONVER vou) Vo Fe MAIN SZ a NOISE (x) ~ GENERATOR| OLS R-CH ECHO *
FLG (NCK) POP 2 @ EXTERNAL MEMOR’ IR FILTE! PARALLE_ +» pio SERIAL 1.5 SIGNAL FLOW
BIT RATE REDUCTION [ ]
Chapter 2. BRR (Bit Rate Reduction) Sound data for the Super NES is recorded on a game data cassette in 4-bit ADPCM format. Creating data in this format requires the use of a technique called “BRR” for some sounds. Knowledge of this operation is not necessary to correctly create data with the Sony NEWS system, which has been the standard tool used by Nintendo to date. When the same data is created using a different tool, however, one must understand BRR. Complications arise during the creation of sound data from data in BRR format when creating the position of the program which selects the filter number described below. Also, Nintendo cannot currently support this programming effort. One block of wave form data is comprised of a one-byte header and eight-byte wave form (4 bit x 16 samples). This is the minimum unit the sound IC can handle.
header 1}2/3]4]5 | 6] 7 {8 | 9 | 10] 11]12]13] 14] 15] 16
07 D6 DS D4 03 D2
v v Range value Filter No. Loo End BLOCK yes/no or not
Figure 3-2-1 BRR Data String From this, the range and filter contain the BRR information (how the data string in 1 - 16 will be regenerated). Refer to § 7.2.2.5 for information on d1 and dO bits. The “filter number” can have a value from 0 ~ 3. These indicate, respectively, 0: constant, 1: first-order filter, 2: second-order filter, 3: third-order filter. Of these values, 1 ~ 3 require previous data values for data calculation. (Filter 1 requires one previous sample, and filters 2 and 3 require two previous samples.) The “range” indicates the number of bits shifted. One sample data (4-bit) is shifted to the left for the number of bits and re-created as 16-bit data. The maximum value for a range is 12(1100). (See the next page.)
oe
Range
Range 4-bit data
[¢— Shift 1 to left
" ix) Range \¢— Shift 2 to left
Range = 3
Range = 11 (b) (¢— Shift 11 to left Range = 12 (c) [¢— Shift 12 to left
Figure 3-2-2 BRR Range Data Shift 3 to left
An equation for decoding a sample value, x from the previous sample x.,and second previous sample x.p, is given below.
x=R+ax.; + bx.
R is the value obtained by shifting the 4-bit data, d, by the range value, r.
R= [d] aris
([d] is a decimal presentation of d, which is in two's compliment form, -7 ~+8) The values of a and b for each filter are as follows:
Filter No. a b i} 0 0 1 0.9375 0
2 1.90625 -0.9375
3 1.796875 -0.8125
Table 3-2-1 BRR Filter Values
3-2-2
BIT RATE REDUCTION ]
block #3 (range=A) 7FFF FC 00 7000 6000 4000 2000 1800 1000 0800 0000 F800 F000 E800 E000 co0o A000 8001
F800 F400 EC 00 £800 £400 EC 00 F800 04 00 0c 00 14.00 1€ 00 18.00 1400 0c 00 00 00
=B) block #2 (range: F8 00 Fo 00 E800 D8 00 Do 00 C8 00 D8 00 Fo 00 08 00 18.00 28 00 38.00 3000 28 00 18.00 00 00
=C) Fo 00 £0 00 DO 00 Bo 00 AO 00 90 00 BO 00 £000 1000 30 00 50 00 a 60 00 Q 03567531EB9ABDEF|03567531EB9ABDEF|]03567531EB9ABDEF 1Ts—> — block #1 (range:
7FFF. DATA. decode value 6000 0 4000
EX. FILTER: 2000 0000 E000 co00 A000 8001 =0. Figure 3-2-3 Example Data when Filter
C
Chapter 3.
3.1 I/O Ports
PERPHERAL FUNCTIONS REGISTERS Peripheral Function Registers Table 3-3-1. Peripherals Addresg Function Register| R/W| When Reset Remarks OOFOH| (test) So \——— Installed in Sound-CPU
OOF1H | Control W | Control = “--00-000"
OOF2H | Register Add. | R/W\Indeterminate Installed in DSP
OOF3H | Register Data | R/W\Indeterminate Installed in DSP OOF4H | Port-0 Ri port Or = “00 Installed in Sound-CPU OOFSH | Port-1 Rw bor t= "00", Installed in Sound-CPU OOF6H | Port-2 RIM port 2r = "00", Installed in Sound-CPU OOF7H | Port-3 Ri bot 3 = “00. Installed in Sound-CPU OOF8H | ----- a
OOF9H | ----- wae [ences | settee
OOFAH | Timer-O W | Indeterminate Installed in Sound-CPU
OOFBH | Timer-1 W | Indeterminate Installed in Sound-CPU
OOFCH] Timer-3 W |Indeterminate Installed in Sound-CPU
OOFDH]| Counter-0 R | Indeterminate Installed in Sound-CPU
OOFEH | Counter-1 R |Indeterminate Installed in Sound-CPU
OOFFH | Counter-3 R {Indeterminate Installed in Sound-CPU
VO PORTS ]
3.2 APU I/O PORTS
Ports 0-3 are ports which carry out data transmission to the SCPU through the SNES bus and are composed of four 8-bit input registers and four 8-bit output registers. Port nr registers can only write from the SCPU section and can only read from the Sound-CPU section. The opposite is true of the port nw registers. Since the composition of each of these ports is identical, only an explanation of Port Or and Port Ow is provided.
- Data is input into Port Or when the SCPU writes data into 2140H. Then, the contents of Ports Or are read when the Sound-CPU reads the data in OOF4H (this is also true of Ports 1r - 3r).
- Data is written into Port Ow when the Sound-CPU writes data into the APU V/O port (OOF 4H). Then the contents of Port Ow are read when the SCPU reads 2140H (this is also true of Ports 1w - 3w).
- When reset is applied, the contents of Port nr registers and Port nw registers become “00” (n =0-3).
Table 3-3-2 PortO - Port3 Registers
Address Seen From Sound-CPU}Address Seen From SCPU} Register Nam@ W/R| Function Seen From Sound-CPU Section
am o140H Portor | R | Read content of Portor register. Portow | W| Write to Portow register. Portir R | Read content of Porttr register. OOFSH erat Porttw |W | Write to Portiw register. Port2r | R | Read content of Porter register. OOF6H 2142H Portaw | W | Write to Portaw register. Portsr | R | Read content of Port3r register. OOF7H 2143H Port3w | W | Write to Port3w register.
Figure 3-3-1 1/O Diagram From SCPU To SCPU
Portnr Port nw
To Sound-CPU From Sound-CPU
EE
Chapter 4. Control Register
THE PORT CLEAR FUNCTION BY MEANS OF THE CONTROL REGISTER.
The ports are cleared to “00” when “1” is written into the control register port clear control bits PC32 and PC10. When “0” is written in, they are not cleared. When “1” is written into the port clear control bit PC10, both the port Or register and the port 1r register are cleared to “OO”. In the same manner, when “1” is written into PC32, both the port 2r register and the port 3r register are cleared to “00”.
CONTROL REGISTER
D7 D6 DS D4 D3 D2 Di DO
eon) - | - |pcsapcro} - |ste|st1 |sto| (W)
“1” Port Reset “0” No Clear
When Reset: “--00-000”
Figure 3-4-1 Port Clear
Machine Cycle Machine Cycle
Clear Pulse
Timing when “1” is written into the port clear control bit.
Figure 3-4-2 Clear Timing
CONTROL REGISTER cE ]
4.2 TIMER CONTROL BY MEANS OF THE CONTROL REGISTER
CONTROL REGISTER
D7 D6 DS D4 D3 D2 D1 DO Gorn | - | - [Pesepctol - |st2| sti] sto] m
“1” Timer Start “0” Timer Stop
When Reset: “--00-000”
Figure 3-4-3 Timer Control
STO is the Timer TO start/stop control bit; the timer stops with “O” and starts with “1”. At this timer, it is necessary to input “1” into STO once it has been changed to
ST1 and ST2 are respectively the start/stop control bits of timers T1 and T2. Their function is identical to that of STO.
3-4-2
[ =
Chapter 5. Timers
5.1. FUNCTION OF TIMERS TO, T1, AND T2
The SNES sound source is provided with three timers; TO, T1, and T2.
2 gS ig-—> Prescaler 8 bits
ISKHZ} | ower level 8-bit Upper level 4-bit programmable interval timer >————J up counter ‘TO
ISKHz Same as above Same as above} :T1
64KHz Same as above Same as above] :T2
Figure 3-5-1 Timer Section The timers TO, T1, and T2 are each composed of a lower level 8-bit programmable interval timer connected to an upper level 4-bit up counter. The 8-bit timer is made up of an 8-bit binary up counter, comparator, timer register, and control circuit. Each of the timers; TO, T1, and T2; is independently programmable. The clock input to timers TO and T1 from the prescaler is 8KHz (125 us) and the clock input to timer T2 from the prescaler is 64KHz (15.6 ps).
8-bit Timer 4-bit Up Counter Resolution|Max. Count Value|Max. Count Value
Timer TO, T1| 125 usec. 32 msec. 512 msec. Timer T2 | 15.6 usec. 4 msec. 64 msec.
Table 3-5-1 Timer Function
3-5-1
TIMERS
TIMER ACTION
Since timers TO, T1, and T2 are alike in structure, an explanation of only timer TO is provided. The lower level 8-bit timer of timer TO is composed principally of a binary up counter, which is incremented at each count of the clock input. When its value corresponds to the contents of the timer register, it is cleared to OOH. Simultaneously a pulse is generated to the 4-bit up counter. The 4-bit up counter is composed principally of a binary up counter, which increments at each input of a lower level pulse. The action of the counter of timer TO is controlled by the 0 bit of the control register. When bit STO is “O” count up is suspended. Count up commences when both upper and lower level counters are cleared by “1”. Consequently, in order to clear the counters, it is necessary to set bit STO to “1” after having set it to “0”. Writing to the timer register is carried out while the counter is stopped. At this time the minimum write value is OOH and the maximum value is 01H. Though it is not possible to read the value of the timer register, it is possible to read the 4-bit value CNO at any time. When the value of CNO is read, only the 4-bit up counter section is Cleared to “OO”. Upper Level 4-bit Counter Timing TO Sas
4-bit Counter
Pulse CK CN JL Read Clear Pulse Action of timer TO is stopped by means of the reset input (POR="L’). At the time of reset, STO of the control register is “0” and; CNO and TM0 of the timer register are indeterminate. When CN is read, the 4-bit up counter alone is cleared through IC internal timing, But the read clear pulse and the pulse to the 4-bit up counter do not conflict with each other. Consequently, when the pulse is input to the 4-bit up counter, the value of CN will necessarily be incremented; or when the value of CN is read, CN will be cleared and become “0”. Internal Signal ; 5 yu : eee ee Oe ne ' ' Read Clear Pulse J inl : dt 4 : i * T 1 ' ' Pulse to 4-bit 1 ini net isn Counter y * 1! t Value of CN 4 | 0 2 Read Value of CN. Read Value of CN, V 1, Figure 3-5-3. Timing Value is 4 Value is 2
‘SNES DEVELOPMENT MANUAL
5.3 TIMER RELATED REGISTERS
Control Register
Control (OOF 1H) D7 D6 D5 D4 D3 D2 D1 dO
a - |PC32|PC10
- |St2]| ST1| STO] (W)
Timer Register
Timer-0 (OOFAH)
Timer-1 (00FBH)
Timer-2 (OOFCH)
LiL “4” Timer Start
“0” Timer Stop
When Reset: “--00-000"
D7 D6 D5 D4 D3 D2 D1 DO
Counter Register
Counter-0 (OOFDH)
Counter-1 (OOFEH)
Counter-2 (OOFFH)
Figure 3-5-4 Timer Related Registers TMO ) {| | | | |_| ™4 ww) {| | | | |_| T™M2 om Lj | | ||
D7 D6 DS D4 D3 D2 DI DO
cNo (R) {| | | [el cnt (R) {| | | |_| cNn2 ® {| | | ESI
Indeterminate When Reset
DSP INTERFACE REGISTER
Chapter 6. DSP Interface Register
6.1 Interface Register
D7 D6 D5 D4 D3 D2 Di DO Register Address Register Address (o0F2H) ee iE a
D7 D6 D5 D4 D3 D2 D1 DO Register Data Register Data R/W) (OOF 3H) berry.) |™
Figure 3-6-1. Interface Register Indeterminate When Reset
This is the register which loads data into the registers within DSP. Values are loaded into the designated register in accordance with the path of the flow-chart below. The DSP address is written to OOF2H and data is written to OOF3H (refer to Flow A). When the contents of the register data is read, it conforms to Flow B. The address to be read is loaded into 0OOF2H and the contents of OOF3H are read.
Figure 3-6-2. Interface Register Flow
Loading Data into DSP Registers
Address is Set at OOF2H
Data is Loaded at OOF3H
Secondary Processing
3-6-1 Reading Data in DSP Registers
Address is Set at OOF2H
Data is Read at 00F3!
v Secondary Processing
Chapter 7.
7.1 DSP REGISTER MAP
Register Used
Address | Register Explanation of Function 00 VOL (L) Left Channel Volume 01 VOL (R) Right Channel Volume VOICE 0 02 P (L) The total 14 bits of P(H) and P(L) express 03 P(H) Pitch Height 04 SRCN Designates source number from 0-255 05 ADSR (1 Address is designated by D7=1 of ADSR(1); when 06 ADSR {3 D7=0, Gain is operative 07 GAIN Envelope can be freely designated by the program 08 «.-ENVX Present value of envelope which DSP rewrites at each Ts 09 OUTX Value after envelope multiplication & before VOL multiplication (present wave height value)
10~19 Voice 1 20~29 Voice 2 30 ~ 39 Voice 3 . 40 ~ 49 Voice 4 Same as Voice 0 50 ~ 59 Voice 5 60 ~ 69 Voice 6 70 ~ 79 Voice 7
oc MVOL (L) Main Volume (L) 1c MVOL (R) Main Volume (R) 2c EVOL (L) Echo Volume (L) 3C EVOL (R) Echo Volume (R) 4C KON Key On, DO-D7 correspond to Voice0-Voice7 5C KOF Key Off 6C FLG Designated on/off of reset, mute, echo, and noise clocl 7C. -.ENDX Indicates source end block oD EFB Echo Feedback 1D = Not Used 2D PMON Pitch modulation of Voice i with OUTX of Voice (i-1) as modulated wave 3D NON Noise on/off, D0-D7 correspond to Voice0-Voice7 4D EON Echo On/Off 5D DIR Off-set address of source directory 6D ESA Off-set address of echo region, Echo Start Address 7D EDL Echo Delay. Only lower level 4 bits active.
OF co 1F ct 2F 2 ‘| ici
Filter Echo Filter coefficients
yi Coefficients ca Makes up an 8 tap FIR Filter
5F ¢5 (Both Lch & Rch have the same filter) 6F C6 7F C7
-. Register written to by DSP during conditions of activity.
Table 3-7-1 DSP Register Map
REGISTER USED [
7.2 REGISTER FUNCTION
7.2.1 Register of each voice (Addresses indicated are those of Voice 0). 7.2.1.1
7.2.1.2
Interval: VOL (L), VOL (R) D7 D6 D5 D4 D3 D2 D1 DO VOL (L) VOL (L) (OOH) |sin] | 1 1 1 1 VOL (R) VOL (R) (O1H) [sign] | tot 1 tt
Each is a volume level multiplied by Lch and Rech, which is in a 2’s complement form making D7 the sign bit. When a negative value is entered, phases reverse. P(L), P(H) D7 D6 D5 D4 D3 D2 D1 DO P(H) (" ieee na Lt P(L) P(L) (2H) {_j | i | ti tt
Pitch is expressed by the total 14 bits combining six lower level bits of P(H) and eight bits of P(L). At the current time, two upper level bits of P(H) are not used. (Considered to be “O” at all times.) With f as the frequency of the reproduced sound, fy as the frequency of the original sound (sound at the time of recording), and P as the value expressed by the lower level fourteen bits of P(H) and P(L), the following formula is performed:
fatoe rE
The diagram below illustrates the relationship between P and the octaval ratio of the reproduced sound and the original sound. There are theoretically no limitations in the practical range so long as the original sound is converted lower. The upper range is limited to approximately four times the frequency of the original sound. -2oct. -loct. original +1oct. +2oct. (approx.) sound
I | | I 0400H 0800H 1000H 2000H 3FFFH In terms of tone quality, the lower level 4 bits of P(L) should be set at “O” when possible in cases where pitch aberrations are not of concern.
3-7-2
EE
7.2.1.3 ADSR(1), ADSR(2)
D7 D6 DS D4 D3 D2 D1 DO ADSR(1)| ADSR (05H) | /GAIN eat | at L ADSR(2) SL SR (06H) a i
When D7 of ADSR(1) = “1”, these two bytes become operable. (ADSR mode) AR is added to the fixed value “1/64” and DR, SR by the fixed value “1-1/256”. When in the state of “Key Off’, the “click” sound is prevented by the addition of the fixed value “1/256”. (GAIN mode is identical.)
Table 3-7-2 Adsr Parameters
|AR| Time trom 0 to 1 | |DR| Time from 1 to SL | |SL{Ratio | |SR| Time from 0 to 1 0 4.1 sec ti) 1.2 sec 0} 1/8 0 Infinite 1 2.6 sec 1 740 msec 1] 2/8 1 38 sec 2 1.5 sec 2 440 msec 2] 3/8 2 28 sec 3 1.0 sec 3 290 msec 3] 4/8 3 24 sec 4 640 msec 4 180 msec 4) 5/8 4 19 sec 5 380 msec 5 110 msec 5] 6/8 5 14 sec 6] 260 msec 6 74 msec 6| 7/8 6 12 sec 7 160 msec 7 37 msec 7] 1 7 9.4 sec 8 96 msec 8 7.1 sec 9 64 msec 9 5.9 sec A 40 msec A 4.7 sec B 24 msec B 3.5 sec Cc 16 msec Cc 2.9 sec D 10 msec D 2.4 sec E 6 msec E 1.8 sec F 0 msec F 1.5 sec 10 1.2 sec 11 880 msec 12] 740 msec 13] 590 msec 14] 440 msec
- 370 msec 16] 290 msec 17] 220 msec 18 180 msec 19] 150 msec 1A 110 msec 1B 92 msec 1c 74 msec t 1D 55 msec > 1E 37 msec 1F 18 msec
Key On Key Off
3-7-3
REGISTER USED
7.2.1.4 GAIN
This becomes operable when D7 of ADSR(1) = 0. The following five modes are available.
D7 D6 DS D4 D3 D2 D1 DO Direct Designation 5 (o7H) Prrurt
Increase Mode (Linear) (07H) 1])14)0 [Eee ees se Increase Mode (Bent Line) ala] 4 | | i J
Decrease Mode (Linear) (07H) 1) 0] 0 fee eases sean Decrease Mode (Exponential) (07H) i ae) |
-, Direct Designation: The value of GAIN is set directly by the values of DO ~ D6. -. Increase (Linear): Addition of the fixed value 1/64. -. Increase (Bent Line): Addition of the constant 1/64 up to 0.75, addition of the constant 1/256 from 0.75 to 1.
-. Decrease (Linear): Subtraction of the fixed value 1/64. -. Decrease (Exponential): Multiplication by the fixed value 1-1/256.
In all cases, present envelope values (indicated by ENVX) are utilized for initial values.
Increase Mode: 1-ket is approximated with bent lines. Figure 3-7-1 Bent Line Mode The various parameter values are indicated on the next page.
3-7-4
GAIN PARAMETERS.
Parameter | Increase Mode | Increase Mode | Decrease Mode Eroonential Values Linear (0—*1) | Bentline(0—>1) | Linear(1—>0) (0—>1/10) 00 Infinite Infinite Infinite Infinite 01 4.1 sec 7.2 sec 4.1 sec 38 sec 02 3.1 sec 5.4 sec 3.1 sec 28 sec 03 2.6 sec 4.6 sec 2.6 sec 24 sec 04 2.0 sec 3.5 sec 2.0 sec 19 sec 05 1.5 sec 2.6 sec 1.5 sec 14sec 06 1.3 sec 2.3 sec 1.3 sec 12 sec 07 1.0 sec 1.8 sec 1.0 sec 9.4 sec
08 770 msec 1.3 sec 770 msec 7.1 sec 09 640 msec 1.1 sec 640 msec 5.9 sec 0A 510 msec 900 msec 510 msec 4.7 sec 0B 380 msec 670 msec 380 msec 3.5 sec oc 320 msec 560 msec 320 msec 2.9 sec oD 260 msec 450 msec 260 msec 2.4 sec OE 190 msec 340 msec 190 msec 1.8 sec OF 160 msec 280 msec 160 msec 1.5 sec
10 130 msec 220 msec 130 msec 1.2 sec "1 96 msec 170 msec 96 msec 880 msec 12 80 msec 140 msec 80 msec 740 msec 13 64 msec 110 msec 64 msec 590 msec 14 48 msec 84 msec 48 msec 440 msec 15 40 msec 70 msec 40 msec 370 msec 16 32 msec 56 msec 32 msec 290 msec 17 24 msec 42 msec 24 msec 220 msec
18 20 msec 35 msec 20 msec 180 msec 19 16 msec 28 msec 16 msec 150 msec 1A 12 msec 21 msec 12 msec 110 msec 1B 10 msec 18 msec 10 msec 92 msec 1c 8 msec 14 msec 8 msec 74 msec 1D 6 msec 11 msec 6 msec 55 msec 1E 4 msec 7 msec 4 msec 37 msec 1F 2 msec 3.5 msec 2 msec 18 msec
Table 3-7-3Gain Parameters
REGISTER USED
7.215
7.2.1.6
7.2.1.7 SRCN
Refers to source number. It is the sequence of tone color within the hexa-file of tones produced by means of a separate tool. (0 ~ 255)
D7 D6 D5 D4 D3 D2 D1 DO SRCN coy] pt tt
ENVX
The present value of the ADSR/GAIN envelope constant. The DSP section rewrites this at each Ts (31.25 psec). Seven bits without a sign bit. (D7 is always 0).
07 D6 DS D4 D3 D2 D1 DO ENVX 0 (08H) oe on
OUTX
The present value of the wave height after envelope multiplication and prior to VOL multiplication. The DSP section rewrites this at each Ts. (31.25 usec). Its value is utilized as the modulated wave of pitch modulation. Eight bits with a sign bit,
D7 _D6 DS D4 D3 D2 Di DO OUTX| Sign (09H) biruit
7.2.2, COMPLETE VOICE REGISTERS 7.2.2.1 KON, KOF “Key on” and “Key off’. DO ~ D7 correspond to Voice 0 ~ 7. When a“1", key on or key off are active; when “O” neither is active. These two registers need not be reset. With KOF, in regard to any Voice in which a “1” is written and whether in the ADSR mode or GAIN mode, 1 to 0 decreases at the rate of 8 msec by means of the addition of the fixed value 1/256. In writing in a succession of KON and KOF, two Ts (62.5 psec) or more should be released. (In writing a succession of various data in less that 2 Ts, the data written may not be usable later.) D7 D6 D5 D4 D3 D2 Ot DO KON ay) Voice 7} Voice 6] Voice 5] Voice 4} Voice 3] Voice 2] Voice 1|Voice 0}
KOF (CH) | Voice 7|Voice 6} Voice 5] Voice 4) Voice 3| Voice 2} Voice 1|Voice 0
7.2.2.2 PMON Pitch modulation is imposed on Voice n with OUTX of Voice(n-1) (n=1-7) as a modulated wave. When Dn=1, it becomes modulation ON. (For example, when D1=1, a modulated tone is generated from Voice 1.) However modulation does not affect Voice 0. Therefore, the bit DO is not active. In regard to the method of pitch modulation, when yo is the wave height value of the modulated wave and P is the value of P(H) and P(L), then: P’ = P (1+y0) The value of P”, as above, is substituted for P and used as the pitch at that time. D7 06 DS D4 D3. D2 D1 DO aor. Voice 7| Voice 6] Voice 5| Voice 4| Voice 3] Voice 2} Voice 1
7.2.2.3 NON
Noise on/off. DO ~ 7 correspond to Voice 0 ~ 7. When on, noise is issued instead of sound source data. At this time, if sound source data of formants only is designated through the previous SRCN, then noise is generated only for the duration of the sound source data. When reproduction for random lengths of time is desired, sound source data incorporating a loop must be designated through the SRCN. In addition, even though two or more Voices may be on, the source of noise is the same.
REGISTER USED
7.2.2.4 EON Echo on/off. Active “1”. DO ~ 7 correspond to Voice 0 ~ 7.
D7 D6 DS D4 D3 D2 D1 Do EON aaa Voice 7|Voice 6] Voice 5] Voice 4] Voice 3| Voice 2! Voice 1]Voice 0!
FLG
07 #D6 DS D4 D3 D2 DI obo FLG —__ (6CH) | RES | MUTE| ECEN tae
RES: Soft reset is turned on when D7=1. At this time, all Voices are in a state of “Key On” suspension and Mute is turned on. It becomes a “1” with power on. MUTE: Mute is turned on in all Voices when D6=1. This always occurs when power is first applied. ECEN: Allows the possibility to write into external memory through Echo, when D5=0. (Echo Enable). After power on, read out data is indeterminate until initial data is written in by the CPU. NCK: Designates the clock of the noise generator. Table 3-7-4. Noise Generator Clock NCK] Freq. _|NCKj Freq. NCK| Freq. NCK| Freq. 00 OHz | 08 83Hz | 10 | 500Hz] 18 3.2 KHz 01 | 16Hz | 09 | 100Hz | 11 | 667Hz| 19 | 4.0 KHz 02 | 21Hz | OA} 125Hz | 12 | 800Hz] 1A} 5.3 KHz 03 | 25Hz | 0B | 167Hz | 13 | 1.0KHz] 1B | 6.4 KHz 04 | 31Hz | OC | 200Hz | 14 | 1.3KHz] 1C | 8.0 KHz 05 | 42Hz | OD | 250Hz | 15 | 1.6 KHz] 1D | 10.7 KHz 06 | 50Hz | OE | 333Hz | 16 | 2.0 KHz} 1E 16 KHz 07 | 63Hz | OF | 400 Hz | 17 | 2.7 KHz} 1F 32 KHz It is only possible to write into these registers from the CPU section.
3-7-8
l ae ]
7.2.2.5 ENDX
When BRR decode of the block having the Source End flag is completed, the DSP section sets up a “1”. DO ~ 7 correspond to Voice 0 ~ 7. If there is a voice which has been keyed on, the bit corresponding to this voice is reset. In addition, when the CPU section writes into this register, all bits are reset. D7 D6 DS D4 D3 b2 D1 DO ory Voice 7] Voice 6] Voice 5] Voice 4] Voice 3] Voice 2| Voice 1)Voice 0
7.2.2.6 MVOL(L), MVOL(R), EVOL(L), and EVOL(R) Refer to Main Volume (Lch, Rch) and Echo Volume (Lch, Reh). The output of this register is the sum of main volume and echo volume with a sign bit. MVOL(Lch, Ach) D7 D6 D5 D4 D3 D2 —D1_—siDDO EVOL(Lch, Reh) ocr) | Sin Lt | yy 4 (1CH) 7.2.2.7 ESA Echo Start Address. Issues the off-set address of the Echo region. (ESA) x 100H becomes the lead-off address of the Echo region. 7.2.2.8 EDL
Echo Delay. Only the lower level four bits are used. Delay time 0 is an interval of 16 msec. and is variable within a range of 0 ~ 240 msec. If this time is considered to be t, the necessary external memory region is (2f) Kbytes, with a maximum allowable of 30 Kbytes. However, when EDL=0, the four byte memory region of ESA - ESA+3 becomes necessary. D7 D6 DS D4 D3 D2 ODI bo EDL (7DH) jl j fl 7.2.2.9 EFB
Refers to Echo Feed-Back. This word consists of eight bits including a sign bit. D7 D6 DS D4 D3 D2 D1 oO EFB I gj (oo) es
7.2.2.10 DIR
Issues the off-set address of the source directory. (DIR) x 100Hs is the beginning address of the directory.
3-7-9
REGISTER USED ]
7.2.2.11 CO~C7
Issues the filter coefficient. It is composed of eight bits, including a sign bit and makes up an eight tap FIR filter (identical with that of Lch and Reh).
07 D6 DS D4 D3 D2 D1 DO
Co ~ C7 : (OFH) ~ (7FH)| Sign l ! | ! I |
Filter Setting Example 1: When a low pass filter is imposed on the echo sound. Register | Numerical Value co FF
C1 08
C2 17
c3 24
C4 24
cs 17
cé 08
C7 FF
Filter Setting Example 2: When the echo sound is given the same tone color as the original sound.
Register | Numerical Value
co 7F
C1 00
c2 00
c3 00
c4 00
cs 00
cé 00
c7 00
3-7-10
L
7.3. SOUND SOURCE DATA (SOURCE) SPECIFICATIONS * Sound source data is produced according to the following specifications by means of specialized tools. 7.3.1 Source Directory 7.3.1.1 SA(H), SA(L) The source start address. This 16 bit address is the lead-off address of the lead-off block. 7.3.1.2 LSA(H), LSA(L) Source loop start address. This 16 bit address is the lead-off address of the loop start block.
Table 3-7-5. Source Directory
Memory Address| Directory n+0 SA(L) n+ SA(H) SA: Source Start Address me LSA(L) LSA: Source Loop Start Address n+3 LSA(H)
ANS Ag Az Ao
DIR 00000000
SRCN 00
n=(DIR) x 100H + (SRCN) x4 +)
- Sound source data used in the SNES is called “Source”.
3-7-1
REGISTER USED i]
7.3.2. SOURCE DATA 7.3.2.1. BLOCK FORMAT
The sound, sampled at 32KHz, undergoes BRR (bit rate reduction) processing and the data is condensed from 16 bits to 4 bits. The four-bit data is arranged into sixteen portions and, together with the RF register, is formed into one block of nine bytes.
D7 D6 DS D4 D3 D2 OD1 DO
BRR Data Loop RF onioft | END
Dao DagH Dok
Deo DgoH Dpol
Dat DayH Daye
Dai DpiH DpiL
Dae DagH Daal
Dp2 DpzH Deal
Das DasH Das
Des DesH Dagl
Table 3-7-6 Source Data Block Format
7.3.2.2 RF
Bits D7 ~ D2 is composed of data relating to BRR. When D1=1, it indicated that it is a source having a loop and when D150, it indicates that the block is the block with the final data.
3-7-12
=a
Chapter 8. | CPU Organization A Sony SPC700 series is used in the CPU core of the SNES Sound Source. It is possible to access and address space of 64 Kbytes in the SPC series CPU. Address classification of the memory space is made according to purpose; addresses 0000, ~ OOFFy, are called page 0 and addresses 0100, ~ 01FFy are called page 1. In regard to the data in this region; when direct page designation is carried out by the direct page flag (P) within the program status word, it is possible to carry out data processing in wide-ranging addressing modes with a small number of machine cycles.
Within the CPU there are the universal registers A, X, and Y, program status word (PSW) of the various flags, program counter (PC), and stack pointer (SP).
The A register is operable by the greatest number of commands and becomes an 8-bit operation accumulator. When 16-bit operations are carried out, it becomes paired with the Y register and becomes the lower level 8-bit register of the 16-bit accumulator. The X and Y registers, in addition to their function as universal registers, are used in various operations. These include; functions as index register of various index addressing modes, as dual address command source, destination address register, etc. In the command set there are single address commands which carry out arithmetic and logical operations centered in the A register and dual address commands which can designate random addresses within the direct page as source addresses and destination addresses.
In regard to bit processing diversified by control purpose, Boolean bit operation commands are applicable to the 8 Kbyte wide range of data of addresses 0000, ~ 1FFF}4. Moreover, in regard to the bits within the direct page, set, reset and bit conditional relative jump can be utilized. In regard to the data within the total space of the 64 Kbytes; commands of multiple bit test and set, test, and reset are provided. For the purpose of data which must be systematized or in order to carry out data processing rapidly, it is possible to operate 16-bit data with a single command. Addition, subtraction, comparison, and transference are possible between two bytes of continuous 16-bit data within the direct page and the paired Y register and A register. In addition, increment and decrement of continuous 16-bit data within the direct page are possible.
There are multiplication and division commands for the purpose of rapid data processing and processing of data in a variety of forms. Multiplication is 8-bits x 8-bits with no sign and is carried out with the multiplicand stored in the Y register and the multiplier stored in the A register; the result is entered into the (Y,A) 16-bit accumulator. Division is 16 bits/8 bits with no sign and is carried out with the dividend stored in the (Y,A) 16 bit accumulator and the divisor stored in the X register. The resulting quotient is entered into the A register and the remainder into the Y register.
3-8-1
CPU REGISTERS [ fo]
When processing decimal data, there are decimal addition/subtraction correcting commands in regard to the results of both addition and subtraction.
In regard to branched commands, there are relative branched commands according to the conditions of the various status flags, according to the conditions of set or reset of random bits within the direct page, etc. In addition, in regard to looped branched commands, there are comparison branched commands and subtraction branched commands. For these there are two types of addressing modes.
In regard to subroutine call commands, there are subroutine address direct designation, Three-byte call commands within the 64 Kbytes, Two-byte call commands for calling specific areas, and One-byte call commands using call tables. It is possible to improve byte efficiency through proper usage in response to the frequency of subroutine use.
(NCL PG 26a)
3-8-2
l
8.1 CPU REGISTERS
Within the CPU are the registers necessary for the execution of various commands. These are the A register (also functions as an 8-bit accumulator), X register, Y register (8-bit universal register which can also be used as an index register), PSW (program status word), SP (stack pointer), etc. These are all 8-bit registers, but the PC (program counter) is made up of 16 bits.
PC Program Counter (16 bits)
A A Register (8 bits)
| (Y, A Paired 16 bit Accumulator) (16 bits)
x X Register (8 bits)
Y Y Register (8 bits)
SP Stack Pointer (8 bits)
PSW Program Status Word (8 bits)
N|V/P]-]H]}-|Z/C
Ee Carry Flag (Bit Accumulator)
Zero Flag Half Carry Flag Direct Page Flag Overtlow Flag Negative Flag Figure 3-8-1 CPU Registers
CPU REGISTERS
8.1.1
8.1.5 A REGISTER This register is used as an 8-bit accumulator. At times of 16-bit operation commands, it becomes the register which contains low byte data in the 16bit accumulator, made up of this paired with the Y register. When operation commands are issued, it becomes the multiplier register and low byte data of the product is entered. When division commands are issued, paired with the Y register, it formulates the dividend and the resulting quotient is entered. X REGISTER In addition to its role as a universal data register, it also functions as an index register when index addressing is being carried out. In addition, it is used as a two- address command destination address register and X register indirect address register. In division commands, it becomes the divisor register. Y REGISTER In addition to its role as a universal register, it functions as an index register when index addressing is being carried out. In addition, it is used as a two address command source address register. When carrying out 16-bit operation commands, it becomes the register which contains the high byte data of the 16-bit accumulator, which is made up of the pairing of this register with the A register. When multiplication commands are being carried out, it becomes the dividend register and the product high byte data is entered. When carrying out division commands, paired with the A register it formulates the dividend and the resulting remainder is entered. PROGRAM COUNTER The program counter is made up of 16 bits and has an address region of 64 Kbytes. The upper level 8 bits are called PCH and the lower level 8 bits are called PCL. Normally, it will contain the address to be executed during the next machine cycle and will be incremented by only the number of bytes necessary for the command to be fetched. When there is a branching command in the midst of the program, the address of the branch destination will be stored in the program counter. When there is a reset (POR) input, reset vectors which are in addresses FFFF,, and FFFE,, enter respectively PCH and PCL for branching to take place. STACK POINTER The stack pointer is used to send data to the RAM or to recover data from the RAM when the subroutine call commands push (PUSH), pop (POP), or return (RET) are to be carried out. The address region indicated by the stack pointer is within page 1 (addresses 0100, ~ 01F Fy). 1514131211109 876543210 PT TTT SP Values 0/0}0/0;/0}0;0}14
Fixed by Hardware Determined by the Program
3-8-4
EE
When sending data to the RAM, the stack pointer decreases by one after sending data (post decrement) and increases by one prior to restoring data (pre-increment). The diversified activities of the stack pointer are summarized below.
*SUB-ROUTINE CALLS
Stack Address Activity SP Value After Sending}
SP Sending to PCH! SP-1 SP-1 [Sending to PCL} SP-2
*RESTORING FROM SUB-ROUTINE
Stack Address Activity SP Value After Sending}
SP Restore to PCH SP+1
SP+1 Restore to PCL SP+2
To send the contents of the A register, X register, Y register, or PSW (program status word) to and from the stack, the commands PUSH and POP can be used.
*PUSH A (X, Y, PSW)
IStack Address| Activity ISP Value After Sendin
SP Sending of A (X, Y, PSW) SP-1
“POP A(X, Y, PSW)
Stack Address} Activity ISP Value After Sending|
SP Restore A (X, Y, PSW) SP+1
3-8-5
CPU REGISTERS
8.1.6 PROGRAM STATUS WORD (PSW) The program status word is made up of the various flags which are set and reset according to the results of the execution of 8-bit register commands and the various flags which determine the activities of the CPU. When reset it becomes “000-0-00".
7 6 5 4 3 2 1 «0 -|H]-]2Z
% Carry Flag (C) After operation execution, this flag is set when there has been a carry from the uppermost bit of the arithmetic logic unit (ALU) or when there has been no borrow. It is also altered with shift or rotate commands. It acts as bit accumulator for Boolean bit operation commands. It is set with the SETC command and reset with the CLRC command. The carry flag inverts with the NOTC command. 0 Zero Flag (Z) After operation execution, this flag is set when the result is zero and reset when the result is not zero. Even with 16-bit operation commands, zero detection is cartied out. It is possible to carry out tests with conditional branching commands. 0 Half Carry Flag (H) After operation execution, this flag is set when there has been a carry from bit 3 of the ALU to bit 4 or when there has not been any borrow. There is no command to set the half carry flag however, it is reset by means of the CLRV command. Whenever the half carry flag is set, the overflow flag is also set. % Direct Page Flag (P) This is the flag which designates the direct page to which many addressing modes are applicable, such as direct page addressing, etc. When “0”, the direct page becomes the addresses of the region 0000), ~ OOFFy, and when “1”, it becomes the addresses of the region 0100, ~ 01FFy. Itis set by the SET P command and reset by the CLRP command. © Overflow Flag (V) After arithmetic operation execution, this flag is set when overflow or underflow has been produced. When this occurs the H flag is also set. It is possible to carry out tests with conditional branching commands. } Negative Flag (N) After operation execution, this flag is set when the value of the result of MSB is “1” and reset when its value is “0”. It is possible to carry out tests with conditional branching commands.
E
8.2 MEMORY SPACE
It is possible for the Sound-CPU to address 64 Kbytes of memory. Memory space is divided up according to purpose. From address OO000H, 512 bytes are divided into two pages of 256 byte units called page zero and page one. It is possible to access data within these regions by means of numerous addressing modes, such as direct page addressing, etc. Page one is taken up by the stack. 8.2.1
8.2.2 Direct Pages (Page Zero, Page One) By means of setting or resetting the Direct Page flag (P) within the program status word, it is possible to designate whether page zero or page one is to be made the direct page. It is set up such that the data within this page can be treated with fewer bytes, at a higher speed, and with more numerous types of commands and addressing modes. 8.2.1.1Stack Area The stack region is established in the RAM region within page one. The uppermost byte of the stack address is fixed at 01. The lowermost byte of the stack address must be given its initial setting by the program. Uppermost Page (Internal ROM Region) A mask ROM is installed within the Sound-CPU from FFCOH - FFFFF. There is a program in it which transmits data from the ROM cassette to the 512 Kbit RAM through the SNES CPU. This region is used by means of reset.
CPU REGISTERS ]
8.2.3 Area of Applicable Bit Operation Commands 8.2.3.1SET1, CLR1 The commands SET1 (set memory bit) and CLR1 (clear memory bit) are applicable to one-bit data with the direct page. 8.2.3.2TSET1, TCLR1 The commands TSET1 (test and set bit) and TCLR1 (test and clear bit) are applicable to the total 64 Kbyte region. 8.2.3.3Boolean Operation Commands The Boolean operation commands (AND1, OR1, EOR1, MOV1, NOT1) are applicable to the 8 Kbyte region of 0000, ~ 1FFFy.
00004 SET1, CLRI Applicable OOFFy ito Direct Page
O1FEH ~~ AND1, OR1, EOR1
MOV1, NOT
TSET1, TCLR1
AFFFyp 7777777 TTn ne
Cat IIIA IIA AAI
FFBFy FEC) SOC*~C<“~*=<“Cs=<“‘“‘<‘;<;<C;< ;<C;<C;<C; CS _ 4 IPL ROM
FFFFyl_-------------------------------1
Figure 3-8-2 Boolean Bit Operation Commands
ES
8.2.4 Direct Page Addressing Since all of the addressing modes indicated in Figure 2-7-3 are applicable to the data of the direct page (P=0: addresses 0000, ~ OOFFy, P=1: addresses 0100, ~ 01FF,,) designated by the direct page (P) flag, it is possible to manipulate the data in various ways. In addition, byte efficiency improves due to the fact that direct address designation is possible by onebyte data within the command words. Since effective command cycles also decrease, data can be accessed more rapidly.
Effective Address Region
Symbol Addressing
Bytes! 0000, ~ 01FFy|~ 1FFF} |~ 1FFF}
dp Direct Page
dp+X | X-Indexed Direct Page
dp+Y | Y-Indexed Direct Page
(X) Indirect
(X)+ | Indirect Auto-Increment -
dp. dp Direct Page to D.P.
(X),(Y) Indirect Page to |.P. dp,#imm| Immediate Data to D.P. =
dp.bit Direct Page Bit dp.bit,rel] Direct Page Bit Relative .
mem.bit] Absolute Boolean Bit
labs Absolute
labs+X X-Indexed Absolute
labs+y Y-Indexed Absolute [DP+X] X-Indexed Indirect / .
[DP+Y] |Indirect Y-indexed Indirect Bs
Figure 3-8-3 Memory Access Addressing Effective Address
3-8-9
SOUND PROGRAMMING CAUTIONS
Chapter 9. Sound Programming Cautions
9.1
9.2
When layering sound on several tracks (for example, when layering sound effects on back-ground music), make sure an overflow does not occur due to the additional output. Eight-track sound is ultimately transmitted as one signal, which is limited by the maximum value for the DAC. Distortion noise is created when the signal exceeds this limit. This segment creates noise
Figure 3-9-1 | Wave-form Overflow
The following precautions should be observed when making the initial selections for a sound driver echo function.
- The FLG’s ECEN should not be turned “on” immediately after the EDL and ESA registers have been assigned a number. Otherwise, the RAM area used by the program or other area could be damaged. Either of the following guidelines can be used to determine the appropriate wait period after setting the EDL and ESA registers.
- Wait 240 ms.
- Read the EDL value (0) before writing to it, and calculate the wait period based on the following formula. @ x 16 (ms) In addition, the EVOL should be set high only after (the EDL value) x 16 ms or greater. (The read data is undefined until the DSP begins writing data, and could generate noise.)
3-9-1
[2 =]
- Turn both the ECEN and EVOL “off” when the echo function is not in use. Data will be read and output unless the EVOL is 0.
9.3 CAUTION #3 (ECHO OPERATIONS) This caution describes the procedure to be followed when writing echo data to the appropriate RAM area.
9.3.1 ¢ ESA (Echo Start Address - 6DH): _ Initial address for the echo start area.
- EDL (Echo Delay - 7DH): Determines the number of addresses in the echo area begining from the initial address. PROCEDURE An internal counter exists for the echo data, which is written sequentially. This counter is called the “echo counter’. The EDL determines the maximum value of the echo counter. When the echo counter reaches (the ESA value x 80H), the echo counter is set to 00. Echo data is written two bytes at a time (4 bytes for the left and right) every 31.25 s. A delay of 16 ms occurs using a RAM address area of 80H. The echo counter is 15 bits, from 000H ~ 7FFH. The following formula is used to determine the RAM address to which the echo data is written.
(ESA value x 100H) + (echo counter value) = (echo write address)
D15 D8 D7 DO ESA 00000000
+ [Echo counter value ]
[_ Echo write conditions ]
However, changes in the echo counter value do not immediately follow changes in the ESA value using the above formula. Therefore, unanticipated problems, such as data loss, could occur. The relationship between the echo counter and EDL value can be explained as follows. Itwas mentioned above that the echo counter is set to 00 when it reaches (the ESA value x 80H). However, the ESA value mentioned here is not the value of ESA at that time, but at the time when the echo counter was previously set to 00. Even when the ESA value is changed, the counter continues counting until it reaches the previously set ESA value, wherein it is set to 00. Then, the last-specified ESA value and echo counter value are compared. (This is to prevent the echo counter from incrementing until the maximum value is reached, when a small value is assigned to ESA). For these reasons, the echo write address will be within the specified range if the programmer waits for the period of time specified below when re-writing the EDL value.
3-9-2
SOUND PROGRAMMING CAUTIONS J
9.4
9.5
9.6
9.7 wait time = (the EDL value prior to rewrite) x 16 ms To insure that the echo data is written to the echo area, wait for a period equal to the last-specified EDL value x 16 ms.
Always select appropriate values for the echo parameters. Inappropriate values could lead to loss of data in critical RAM areas or noise generation. Reverberation may occur when the echo feedback value is too large.
It is extremely important to follow the recommended procedure (Caution #3, above) when setting the initial echo values and modifying the echo parameters. The RAM used as the echo buffer is also used for the program, wave form data, and sound driver. If an echo is started before the echo parameter initialization is established, critical data may be overwritten in the RAM area.
Do not use an excessive sound data compression ratio. An excessive compression ratio results in distorted sound output.
When performing sound checks, the monaural sound output should also be checked. Sound data created for stereo output may not be produced as desired when played on a monaural output device. Super NES monaural sound is generated by adding stereo sound output in the circuit. When, for example, a phase effect is created in stereo by setting negative values in the volume register, the sound volume may be altered when the sound is combined to generate monaural output.
9.8 CAUTION #8 Sampled data should not have any discontinuity. A crackling noise is produced by discontinuous samples. The following are examples of discontinuity in the sampled data.
- The sampled data does not begin at 0.
- The sampled data does not end at 0.
- Adiscontinuity occurs in the middle of the sampled data.
3-9-4
SOUND PROGRAMMING CAUTIONS
9.9
When the Super NES CPU sends the termination code, the Sound CPU sends a code to the Super NES CPU to indicate that it has received data. The Sound CPU erases this code after 300-400 [sec.
If an interrupt occurs after sending the termination code, for a period which is greater than 300-400 micro-seconds, the status code from the Sound CPU will be erased before it can be read by the Super NES CPU. The hang-up will occur because the Super NES CPU will wait indefinitely for the Sound CPU to indicate that it has received data.
Two possible options are available to prevent this from occuring.
- Modify the transfer routine run on the Super NES CPU side.
. Inhibit interrupts during transfer.
These options are demonstrated below.
9.7.1 MODIFIED TRANSFER ROUTINE
Add two lines as shown to the routine.
ade #07fh ; original code pla ; original code sta !APU_port 0 ; original code cpx #1 ; solution #1 bec boot_ret ; solution #1 boot_wait3. cmp !APU_portO ; original code bne _ boot_wait3 ; original code bvs ; original code boot_ret plp ; original code rts ; original code end
3-9-5
9.7.2 INHIBITING INTERRUPTS
Inhibit any interrupt from the time the termination code is sent until the Sound CPU sends an acknowledgement. This is demonstrated by the highlighted code below.
ade #07fh ; original code pla ; original code sta !APU_portO 3; no interrupt boot_wait3 cmp !APU_port0 3 no interrupt bne boot_wait3 3; No interrupt bvs ; original code pop ; original code rts ; original code end
9.10 CAUTION #10 - DATA TRANSFER When data is written to Port 0 <2140H> and Port 1 <2141H> in the 16 bit mode, during data transfer from the Super NES APU, the value of Port 3 <2143H> may, inadvertantly, be changed. Therefore, the 8 bit mode should be used when writing data to these ports. This occurs because multiple ROMs installed on the game pak PCB can increase load capacity of the data bus and, when combined with a drastic fluctuation of CPU data output, cause noise in the data being written. An example is provided below.
ADDRESS 2140H (Port ox 2141H (Port D4
2140H 2141H Ula Write Data Write Data \
B-ADDRESSO /
B-ADDRESS1 Noise Pulse | fo
PA WRITE LS \_/
SOUND PROGRAMMING CAUTIONS za
In the example on the previous page, if data is written to 2140H (Port 0) and 2141H (Port 1) in the 16 bit mode, noise pulses may occur at B-Address 1 due to noise which occurs when all CPU data simultaneously changes from high to low. This depends upon the type of CPU data. When data is written to 2141H (Port 1), B-Address1 becomes “1”. In other words, the same data is written to 2143H (Port
- due to this pulse.
3-9-7
PPU REGISTERS c
Appendix A. PPU Registers V-RAM ADDRESSWORD- 8 BIT (HIGH) 8 BIT (LOW)
0000H 0
2000H 8K
4000H 16K
6000H 24K
ao) 7FFFH 32K 0000H ~@
a0)
2000H
4000H
(NCL PC 68)
A-l 8K-WORD: This is an area which is designated by “OBJ NAME BASE ADDRESS?" of the register <2101H>. (32K-WORD / 4-Partition.) ire BA2 of the register <2101H> “OBJ NAME ASE ADDRESS" is used for expansion purposes, and it will normally be ignored.]
[In case BA1=1 and BAO=1 are set by “OBJ NAME BASE ADDRESS")
4K-WORD: This is.a lower 4K-WORD of the area (8K-WORD) designated by “OBJ NAME BASE ADDRESS" of the register <2101H>. The combination of this 4K-WORD and the 4K-WORD remaining will be determined by “OBJ NAME SELECT” of the register <2101H>.
OBJ Name Select
COMBINATION 4K - WORD + © 4400 -o-90 = x = fo} D fe] + IS) 4K - WORD + ©
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
PPU REGISTERS
OBJECT DATA
Low
High OAM ADDRESS (Decimal) D15 DO 1514131211109 8 7 6 5 4 3 2 1 00 one PTT TTT? y?trTrriyt OBJO OBJ V-POSITION OBJ H-POSITION od 7le|si4{st2irjo}] | | |} | | | |
OBU1 FLIP | OBJ | COLOR NAME (000H - 1FFH) nd vi H]1fo}2|1fols|7j6]5]4]3]2]1 Joo ‘ ‘ L \ n ‘ ; CHARACTER ‘ ' CODE NUMBER 252 (Page A-4)
- OBJ126 — COLOR PALETTE SELECT: 253 Designate palette for 1 character OBJ PRIORITY: Determine the display priority when OBJ is com- 254 bined with BG1 ~ BG4 (per character). [Refer to f— OBJ127 —- page A-19 for priority.] 255 HIV FLIP: X-direction Flip (H-Flip), Y-direction (V-Flip) 256 |OBJ7 . OBJO [The ee eee but H/V position does not change. 257 JOBJ 15 - OBJ 8 15 141312 11109 8 7 6 5 4 3 2 1 00 i i OBJ 7] OBJ 6] OBJ 5] OBJ 4 [OBJ 3] OBJ2 [OBJ 1] OBJ 0 : : a[e[m[eo[m[o|m] o[mlolmi[olmiolule ' 1 ' N ™@ = Size Large/Small @ H-Position MSB 270 |OBJ 119-OBJ 112! The base position of the OBJ on the H-direction will be determined by both H-position (8-bit) and the H-position MSB. OBJ 127-OBJ 120
H/V FLIP. <H-FLIP = 0, V FLIP =0> H/V POSITIO! Size Large/Small: Determine the size to be used either of 2 OBJ’s by register <2101H>. : Select small size 1: Select large size Turns on this axis. <H-FLIP = 1, V FLIP =0> x H/V POSITIO! a
Turns on this axis 1 H-FLIP.
{vrur H/V POSITION: ji 7 is + u | Sees Li == <H-FLIP = 0, V FLIP =1>' (NCL PG 70) "H-FLIP = 1, V FLIP =1>
A-3
ES
OBJECT DISPLAY H-POSITION (9-BIT) (RANGE -256 ~ 255) “A.
V-POSITION (8-BIT) (RANGE 0 ~ 255) | [ORIGINAL POSITION (0, 0)
_ DISPLAY AREA
H-POSITION -256 ~ -1 (100H ~ 1FFH)
(NOTE-1) The H-position is a com (NOTE-2) The coordinate of the O!
screen.)
OBJECT CHARACTER DATA CONSTRUCTION (VRAM)
0 ~ 255 (000H ~ OFFH)
plementary expression of 2 (9-bit). J displayed is shifted down compared to the coordinate of the BG displayed. [Interlace: 2-dot / Non-Interlace: 1-dot] (See page A-10.) (NOTE-3) “100H” is basically prohibited to use for 9-bit of the H-Position. (If it is used, it must be counted as OBJ quantity displayed even if it is not displayed on the
00 | 01 02 03 04 05 06 07 08 o9 OF 10 CHARACTER NAME (8 X 8 SIZE)
33] 34 35 36 a WB 44 45 46 32-DOT > 50 53 54 55 56
60 63 64 65 66
Po — 32 DOT Q 80 2 :
1FO 1FF EXAMPLE @ Write 33 to “NAME” of the OAM
@ Write “001” (Size 8 or 32) to “OBJ SIZE SELECT” of register <2101H> @ write “1” (Size 32 x 32) to “SIZE LARGE/SMALL” of the OAM (Refer to page A-3)
In case the character code is 000 through OFF, the V-RAM address per character data (16-word) will be “n (Name Base Address) + N (Name) x 16 ~n+Nx 16+ 15.” If the character code is 100 through 1FF, it will be “n + Ns (Name Select) x 4K +Nx 16~n+Nsx 4K +Nx 16415.”
A4
PPU REGISTERS ]
OBJECT
# OF CELLS DISPLAYED
CELL SIZE 8X8 _| 16X16 | 32X32 | 64x64
# OF LINES DISPLAYED 32-pces (converted to 8x8 size) 1 L 1
# OF CELL-COLOR 16
# OF PALETTE 8
# OF COLOR ON SCREEN 128 H-FLIP, V-FLIP FUNCTION DISPLAY PRIORITY ATTRIBUTE (Select priority against BG)
BG OF, # OF CREENS #OF |#OF COLORS 1S- CELLICELL _}# OF PER MODE PLAYED BCREEN DOT |COLORIPALETTES| SCREEN FUNCTION
BG1 |}8xs] 4 8 32 AA |OQa® |o
BG2 4 8 32 ® f ree onl DA |WTOQDO |o} BG3 4 8 32 DAG |POQQVO |o}
BG4 Hexiq 4 8 32 jaa jJaoadaag |o
BGI 16 8 128 laaqQ laqae® |a 1 MAX 3 BG2 16 8 128 DA |AOQQD® {oO BG3 4 8 32 1DQAQ |oaqe® |o
BGI 16 8 128 2 ae ITMIAQ |QOQQE |o)
BG2 16 8 128 |AQqQ |QQA@_|o| BGI 256 1 256 ® A nn DA |IQYDOOO) BG2 16 8 128 |AQq |Oaae |o
BGI 256 1 256 A Mae DAS |QODOQOO} BG2 4 8 32 DAG |Qoa® |o
BGI 16 8 128 5s | maxe Y aq |g jae ie BG2 4 8 32 laqaq jo |a@ Ke 6 1 BG1 lyexe | 16 8 128 ad |e |la@ ie
AOQQNOQO®
AS
E
[Main Function of BG] CONDHARWN > 10. 11. 12. HV Scroll (each screen) HV Flip (each character) Mosaic Rotate, Enlarge, Reduce Window Mask Screen Addition and Subtraction Fixed Color Addition and Subtraction Color Window CG Direct Select Horizontal Pseudo 512 Offset Change Horizontal 512 Mode
[Other Function] Priority (each character/mode 0 ~ 6) Screen HV Rotate (mode 7)
A-6 (Refer to Chapter 4) (Refer to Chapter 5) (Refer to Chapter 6) (Refer to 7.1) (Refer to 7.2) (Refer to 97.2) (Refer to Chapter 8) (Refer to Chapter 9) (Refer to Chapter 12) (Refer toChapter 19)
PPU REGISTERS J
MOSAIC SCREEN In case of H-256 16 DOT, ,
° 4DOT 3 DOT 2 DOT
1 DOT Designated the size by “MOSAIC SIZE” of register <2106H>
7 ia
DOoroo O7
*All dots of the size designated become this color. DOrFo0NQ A-H>D In case of H-512 2200?
8 DOT
6 DOT
4 DOT
DOT ;
J
In case of the H-Pseudo 512 mode, 2 x 2-dot mosaic can be made in size-0. (Refer to page A-3)
MOSAIC SCREEN DISPLAY EXAMPLE (BG SCREEN) (When the mosaic size is 2 x 2-dot in the 256-mode)
256 DOT c eeeee
ONE ORES OME eeeee ome
19113 3/7 7 5 5 © 6|®@ 2 6 6]2 2 oun 224 5 5
@ 4 @ 1 4 eooe j j
@ is the basic color data
AT
[
ADDRESS INCREMENT ORDER
INCREMENT by 8, (2-TIMES) INCREMENT by 8, (64-TIMES) INCREMENT by 8, (128-TIMES)
RAM (GO = 1, G1 =0) (GO = 0, G1 =1) (GO = 1, G1=1) ADDRESS
Xx00 0 xx00 xx00 0 x000} XX09 0 x000
XX01 32 Xx20 XX01 64 x040} XX01 128 X080
. . °
. . °
XX08 1 Xx01 XX08 1 x001} —Xxo9 1 x001
Xx09 33 Xx21 XX09 65 x041] Xxo9| 129X081
. > D
XX10 2 Xx02 XX10) 2 x002} xxi 2 x002
XX11 34 XxX22 Xx11 66 Xx042] Xx11 130 X082
XXF8 31 XX1F X1F8 63 X03F] X3F8 127. XO7F
XXF9 63 XX3F X1F9 127. X07F| X3F9 255 XOFF
; . .
V-RAM y ADDRESS V-RAM address is increased by 8 for 32-times
ORDER OF ACCESS (value designated by register <2116H> <2117H>)
AB
PPU REGISTERS ]
OOOH | 001H| 002H} 003H 01DH 01EH]01FH
020H | 021H) 022H O3EH] 03FH
040H | 041H O5FH
224 e ° ° SC Data e Dots\ ¢ b (Name) bg e e e e e
e e
340H 35FH
360H | 361H 37DH 37EH} 37FH
When SC data (Name) is set during BG Mode 0 ~ 6 as demonstrated in the table above, Character data accesses horizontally by 8 dots in Full Graphic (GO, G1) of register <2115H>.
2 Bit/Dot (GO = 1, G1 =0)
__—» Access Order . (1 Frame is 8 - bit x 2) 0 1 2 eee 29 30 3
32 . 63
e e e e °4 Bit/Dot (GO = 0, G1 = 1) .
(1 Frame is 8 - bit x 4) 0,1 23 45 ion 58,59 | 60,61 | 62,63 64,65 . 126,127
e e e e °8 Bit/Dot (GO = 1, G1 = 1) : (1 Frame is 8 - bit x 8) 0-3 | 4-7 _| 8-11 cece 116-119 120-124 124~127 128~131 252~259
e e e e
(NCL PG 74a)
c
BG SC DATA (MODE 0 ~ 6)
D1i5 Di4 Di3 D1i2 Dii_ Di0 D9 D&S D7 D6 DS D4 D3 D2 Di DO
FLIP BG COLOR NAME (000H~3FFH) vilHiepit2titotoatsitzte6ts|[4alt3t2tijto
LL CHARACTER CODE
NUMBER COLOR PALETTE SELECT: Palette designation per character <8-Palettes>
BG PRIORITY: Determine the display priority per character in case OBJ and BG1 ~ BG4 are combined on the same screen.
H/V FLIP: X-Directional Flip (H-FLIP), Y-Directional Flip (V-FLIP)
BG SCREEN H/V SCROLL RANGE OF H-SCROLL 0~ 1023 DOT REGISTER <210DH> <210FH> <2111H> <2113H> RANGE OF YSGOL 9 I 8 H/Vscroll range may be changed and 2-dot scroll m1 T may be possible, depending on the combination of BG H-OFFSET the modes (512, 16-size, interlace, etc.). Also, SC size may be changed against the screen. (Page A-21 716151413121110 and A-22) REGISTER <210EH> <2110H> <2112H> <2114H> T 9 8 Sci TT TT BG V-OFFSET TIGISI413121110
A OBJ ee
i =e °
N . fe E ce ~ . L 2 . 3 = e e 3 \E 6 Sc2 sca L | fees . tie N | beeee ie = E Sy 223 V coordinate of BG and OBJ has one - line gap. ae (238)
COORDINATE- 4
PPU REGISTERS Cc
BG SC DATA (MODE 7)
D15 D14 D13_D12 D11_D10 D9 D8 07 D6 D5 D4 D3 D2 D1 DO
CHARACTER DATA NAME (00H~FFH) Zlet[si[4aita3l2}tito}{7/e6{[sl/4i{3l2 tilo
<V-RAM> WORD 018 D8 D7 32-CHR x 4- SCREEN 4S DOOR «(02 x 8-DOTICHR = 1024-DOT
CHARACTER DATA SC DATA 32 Som
3 AY 1 2_tnik 256-CHR x8-DOT | 32-CHR x 32-CHR 0 + eam X8.D0T X 16 AREA a8 R D SCREEN
fo) T 16K-BYTE 16K-BYTE
16K RANGE OF H-SCROLL: -4096 ~ 4095 DOT rol i ] RANGE OF V-SCROLL: -4096 ~ 4095 DOT
In case of EXTBG mode, D15 will be BG order (Display Priority Order).
DATA FORMAT FORA CHARACTER A15
d14
d13
‘di2
dit
d10
do
ds m_|m+1]m+2]m43]m+4]mssm+6] m+7 m+8 | “m” is the multiple of 64 me} V-RAM address for a character m+24) data (64-byte) is as follows m+32| mead Nx64~Nx64+63 mal (N: NAME) m+56 EXTBG MODE B15 014. 013-1211 =—=10 = DS 8
Priority] Equivalent to CG Address
Order e{s[4]{[3]2]1]o
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
PPU REGISTERS ]
OFFSET CHANGE MODE
The offset change mode can be used in the BG mode 2, 4 and 6, and the following data is required in this mode. dis di4 di3_ di2 di1_ di0 d9 d8 d7 d6 d5 d4 3 d2 di dO H, [Ba28a1 I OFFSET DATA VEN JEN | es ee ee ee | a
re H, V OFFSET VALUE (in
the change mode) In case of the H-OFFSET, the data (DO ~ D2) will be invalid. In case of the character (16 x 16), “D3” is effective every 3rd. ‘> OFFSET MODE ENABLE 0: Disable : Enable Designate either H-OFFSET or V-OFFSET for the OFFSET data dO ~ d9. (Only BG MODE 4 is effective.) 0: H-OFFSET 1: V-OFFSET
Write this data to VRAM of address designated at (1) and (2), using the BG Mode. (See below.)
<MODE 2,6> <MODE 4>
(1)+(2)+0 H-OFFSET 1 (1)+(2)+0 OFFSET 1 4 O 4 (1)+(2)+1 OFFSET 2 ° ° ° 5 ° . ° . . ° (1)+(2)+1F | H-OFFSET 32 i" ° (1)+(2)+20 | V-OFFSET 1 (1)+(2)41F OFFSET 32
° . * Incase BG3 SC size is S1=0, SO=0 : bg $ (1): BG3 SC Base Address ([value set by “d2” ~ “d7” of <2109H>]x1024) (1)+(2)+3F V-OFFSET 32 (2): BG3 SC Offset Address ([value set by “d3” ~ “d7” of <211 ae + ([value set by “d3” ~ “d7” of <2111H>]) soor -[ eerceri| HUT,
DISPLAY AREA
32 CHARACTERS The offset value can be changed by each column (character unit). (Up to 3rd character can be seen horizontally on the screen by setting the offset value of the entire screen, but the offset can not be changed for 1st character (0 character).
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
PPU REGISTERS ]
BG Screen (BG Mode 7) __ Screen Size and Area are Fixed
e When SC size is “O” veal ORIGINAL POSITION eee Q000H| 0001H| 0002H| 0003H| * * © © | 007DH| 007EH|007FH 0080H | 0081H| 0082H| 0083H OOFDH| OOFEH|0OFFH 0100H| 0101H a 017EH|017FH 0180H| 0181H RAM Address .
8 . . c\s : R
3E80H| 3E81H 3EFEH| 3EFFH
3FOOH| 3FO1H| 3F02H 3F7DH| 3F7EH} 3F7FH
3F80H| 3F81H| 3F82H| * * * wee oe 3FFDH] 3FFEH} 3FFFH
(NCL PG 79a)
OPERATION (ROTATION/ENLARGEMENT/REDUCTION) 1024 DOT (128 CHR)
r i) ‘ i | V-POSITION ' ' ; 1| ler ---->-------- 7 0 H-POSITION 4N-COUNTE! r ' i t_(X 1, Y 4) D ' | leg -------- H-COUNTER
c H R
X 2, Y 2)
(Xo, Yo)
ROTATIONAL TRANSFORM FORMULA
Xo} [om a XX) Xo Y, —sin’ cos’ yy - Yy YQ
Xo © Yo: Center Coordinate X 1° Y 4: Display Coordinate X 2 ©Y 2: Coordinate before calculation of display coordinate If the reduction rates for X-dir (a) and the reduction rates for Y-dir (8) are considered, the formula described above will be as follows:
Az=cos Y x (1/a), B=sin Y x (1/a), C=-siny x (1/8), | D=cos¥ x (1/8),
PPU REGISTERS EE z E |
CG-RAM <MODE-0> <MODE-1 & 2> 00 CT Ba BG3 (MODE-1) 4-COLORS 4-COLORS. 20 |X 8:PALETTES x 8-PALETTES} -MoDE-1> coronal Kt, “Screens for BG Bote #3-Screens for BG 40 KE PALETTES “BGI & 2 color data are F 16-COLORS eld in common in the wo eeekBies ee BG4 Pallete 0 4-COLORS
go [x 8-PALETTES
Pallete 1 OBJ oO 0 oO OBJ <MODE-2> 2-Screens for BG : 16-coLors__| selcororbara 16-COLORS x8-PALETTES| 3F]ColorDatal( alt 7 |x8-PALETTES| BGI & 2 color data are ferro eae FF a <MODE-5 & 6> ° <MODE-3,4&7> <MODE-3> 7 = = be 2-S for BG 00 BG2 (MODE-S) BG2 (MODE-4)| °=" creens for " <MODE-5> 5 ¢BG2 color data are held in 20 |x 8-PALETTES #2-Screens for BG x.8-PALETTES. oe in the pees of BG1 °BG1 & 2 color data are BG 2 (MODE-3} (CG Direct select is excluded) 40 held in common in the 46-COLORS range of 0 ~ 1F necotons <MODE-4>
- > ©2-Screens for BG oo ea BLEU =e) *BG2 color data are in <MODE-6> BG1 common in the range of 0 7 ~ 8 1-Screen for BG 256-COLORS <MODE-7> OBJ ~ i OBJ (CG Direct select is excluded) “Bead cite ysed just for +1-Screen for BG (0G Direct 16-COLORS 16-COLORS select is excluded) x 8-PALETTES x 8-PALETTES] <EXTBG ON MODE-7> . ‘Sqygen for BG. °0 ~ /F are used just for BG2 FF color data
*OBJ is held in common with BG-1 CG-RAM COLOR DATA BLUE GREEN RED Li4) did di2) dit, ai0[ do) d8 y d7 ; dé | d5 | d4, 03, d24 di, do) DIRECT SELECT COLOR DATA BLUE GREEN RED (DAZ; DAG; CL2; 0 1 0 [DAS) DA4;DA3;CLi1 0 [DA2)DAI,DA0, CLO; 0 J
background. (NCL PG 81)
[
WINDOW
REGISTER <2126H> ~ <2129H>
D7 DO
<2126H> WINDOW HO POSITION
<2127H> WINDOW H1 POSITION
D7 Do
<2128H> WINDOW H2 POSITION
<2129H> WINDOW H3 POSITION
s~ ~< H2 H1 H3
The V-directional position is determined by setting “W1 EN” of registers <2123H> <2124H> <2125H> during the H-Blank period or determined by setting registers <2126H> ~ ee eee <2129H>.
PPU REGISTERS
BG & OBJ PRIORITY
4-SCREEN/3-SCREEN MODE (In case Mode 0 and 1 are selected by register <2105H>) *In case “D3=1" is selected by register <2105H> in the mode-1
(OTHERS) ~- >* Back Pri=O0 Pri=O Pris Pri=1 Pri=O PrisO Pri=t 9 Pris1 = Pri=1 (SINGLE) BG4 BG3 BG4 BG3 BG2 BGI BG2 Bal BG3 Del wae Demy Azomn
OBJ OBJ Pri.=0 Pri=2 Pri=3
<Example of Display Priority (in case of mode 0)>
BGI PI High Priority <«———————> Low Priority
BG2 Pi (FRONT) (REAR)
ped A are set ——— BG2-OBJ-BG1-BG4-BG3-Back OBJ Pri=2 (Display in the order above)
2-SCREEN/1-SCREEN MODE (in case Mode 2 ~ 7 is selected by register <2105H>)
Back Pri=0 Pri.=0 Pri=1 Pri=1 (Single BG2 Bat BG2 BGI Colos) | | | |
; OBJ OBJ OBJ OBJ
Pri=0 Pri=1 Pri=2 Pri=3 p>myp
SCREEN
APPROX. 63.5 1s
256 DOT
1 hicssecscesscscecceseceeestenstensecsseesneestessteneeseseeeseeares if
OR H-BLANK
cd DISPLAY AREA
OR
23 fb N E
F I N E
V-BLANK
NON-INTERLACE (262 LINE) According to register <2133H>
PPU REGISTERS [ : ]
BG SCREEN
HIV SCROLL © (Scroll range by the combination of modes and SC size against screen) <Example: in case SC size is “3” - refer to register 2107H ~ 210AH>
*In case of mode 0, 1, 2,3, & 4
© BG SIZE (8 x 8)
256 DOT
32 CHR ——r—.
a 1 CHARACTER ON TV SCREEN 256] 4 = (1 NAME) DoT| - 8 DOT
S | 8
D. fe) T
SC SCREEN
*° RANGE OF H-SCROLL: 0~511 (Scroll 1-dot to the left by adding 1)
- RANGE OF V-SCROLL: 0~511 (Scroll 1-dot up by adding 1)
© BG SIZE (16x 16)
F H-SC!
- RANGE OF V-SCROLL: 512 DOT * RANGE O} SCROLL: 0~1023 {scr 1-dot to the left by adding 1) += ~1023 (Scroll 1-dot up by adding 1) 32 CHR a
1] 32
Cc Ol H O| R T 16 DOT
fT
D Oo T
c
BG SCREEN
H/V SCROLL ® (Scroll range by the combination of modes and SC size against screen) <Example: in case SC size is “3” - refer to register 2107H ~ 210AH> “In case of MODE-5, MODE-6 & NON-INTERLACE BG SIZE (8 x 8) ° BG SIZE (16 X 16) 512 DOT, 512 DOT
32 CHR 32 CHR 1 CHARACTER ON SCREEN oh (1 NAME) oe a 16 DOT 256 | H — DoT} R 5 iu 32 8-DOT: ¢ Bl] R u — 16 DOT
SC SCREEN —A~—~
- RANGE OF H-SCROLL: 0~511 (Scroll 2-dots to the left by adding 1) ¢ RANGE OF V-SCROLL: 0~511 (Scroll 1-dot up by adding 1) 4oo0 o-
« RANGE OF H-SCROLL: 0~511 (Scroll 2-dots to the left by adding 1) e RANGE OF V-SCROLL: 0~1023 (Scroll1-dot up by adding 1) *In case of MODE-5, MODE-6 & INTERLACE
- BG SIZE (8 x 8) * BG SIZE (18 x 16) 512 DOT p12 DOT 2 32 CHR 32 CHR 5_ 32 ——~—_ —— 6T oc i 16 DOT ; ol A 3 | 32 R = 8 Cc
D o| R 16 DOT
- RANGE OF H-SCROLL: 0~511 (Scroll 2-dots to the left by 6 adding 1)
- RANGE OF V-SCROLL: 0~511 (Scroll 1-dot up by D adding 1) ce) « RANGE OF H-SCROLL: 0~511 (Scroll 2-dots to the left by adding 1) e RANGE OF V-SCROLL: 0~1023 (Scroll 1 dot up by adding 1)
Figure A-1 SNES PPU Main/Sub Screen Window
GENERATE SCREEN DATA (ADD or SUB Enable)
5 5 5 5
BG1 DATA
BG2 DATA >|
BG2 DATA i ES es
OBJ DATA
Select
1 1 oO Circuit
Judge of Transparency
{Through Main) 5 5 1 I >{o oJ - PIAS 1 ADD/SUB
+O hs ; ; 7 {do} Circuit
5 (Through Sub) (Constant Color) j} 7 u (ADD/SUB) 1 (1/2 Enable)
(CC ADD Enable)
Main Switch | Sub Switch] Control Control a) 5 1 (Main SW)*| (Sub SW)
(NCL PG 86a)
A-23 Output data
Color Window
Window 1 Circuit Logic, 6 elect (W1 IN/OUT) Circuit sloe Li} f
re it (Window Logic)
- () shows name of register.
(W2 IN/OUT) PPU REGISTERS
Appendix B. CPU Registers
GENERAL PURPOSE DMA
- Transfer Method H-DMA
- Transfer Method
A-BUS B-BUS CPU —_—» PPU RAM @ ROM “tlsrrer-o" A-BUS B-BUS CPU «<—> PPU RAM ® ROM|
ii) Data Format Typical Data Bank
iii) Trigger (Start) General Purpose DMA Enable Flag ii) Data Format (Refer to pp. B-3 & B-4)
[ Type 0 : Absolute addressing
Type 1 : Indirect addressing
the previous line, the data will not be C “0” : If the data is the same as the data of | transferred. (Data Compression) C “1”: A pair of data per horizontal line. iii) Trigger (Start) H-Blank
PRIORITY e H-DMA>GENERAL PURPOSE DMA
© ch0>chi>* °° >ch7
in the same DMA (General purpose DMA or H-DMA)
H COORDINATE H-BLANK
TABLE PROCESS
GENERAL PURPOSE DMA
ROM —» CPU DRAM etc. mArZz-VODOOO <
DISPLAY AREA H-DMA CHO ~ CH7 TABLE
CPU Memory——> PPU
GENERAL PURPOSE DMA
CPU Memory «—> VRAM etc. v- BLANK
B-1
CPU REGISTERS ES : ]
H-DMA ABSOLUTE ADDRESSING (TYPE-0) : This is a mode used to transfer the data of the D7 CPU RAM DO address designated by the Table Address. A1 TABLE ADDRESS [C]# OF LINES : 100 A2 TABLE ADDRESS | _DATA- 1 (LOW) PAT AeGCH) SETTING MODE (EXAMPLE 1) PATA ECOW) ¢ C="1": A pair of new data per H-line
© NUMBER OF LINES : 100 © TRANSFER WORD SELECT : 1 (2-BYTE L,H) 5 5 (200-Bytes data in total) 5 5
DATA -100 (HIGH) A1 TABLE ADDRESS [C]# OF LINES : 100 SETTING MODE (EXAMPLE 2) nest ni Data C="0" :Same data as previous line. (Repeat data Data for all lines.) Dala © NUMBER OF LINES : 100 Baia * TRANSFER WORD SELECT :4 (4-BYTE L,H,L.H) (4-Bytes data in total) | # OF LINES :0
Ly # of line (0) settings : It indicates that the data for
4 4 the DMA transfer has gone. INDIRECT ADDRESSING (TYPE-1) : This is a mode used to transfer the data of the address designated by the Data Address, which is stored to the address designated by the Table Address. CPU RAM (TABLE MEMORY) CPU RAM (TABLE MEMORY) D7 po SETTING MODE D7 Do (EXAMPLE 1) A1 TABLE ADDRESS[C] _# OF LINES : ae at ee A2 TABLE ADDRESS] Data Address (LOW) lL © NUMBER OF LINES Data Address (HIGH) || TOP ADDRESS 2100 Cl_#OF LINES oS Hat Sete aes)
Data Address (LOW) Il TOP ADDRESS 1 (2-BYTE L,H)
Data Address (HIGH J In this case, data area is 200 byte. 100(Line) x 2 (Transter Byte) SETTING MODE (EXAMPLE 2) © C="0" :Same data as . 0 previous line : : © NUMBER OF LINES . . +100 . * © TRANSFER WORD : $ SELECT: 4 (4-BYTE L,H.L,H) 5 In this case, data area Cc] #OFLINES:0 is4 Byte # of line (0) settings : It indicates that the data for the DMA transfer has gone.
B-2
DETECT BEGINNING OF V - BLANK
Display Period READ <4210H> D7 of <4200H> 4 0 : Disable NMI signal (Always)
RESET “NMI ree 1: Depend on “Blank NMI” Flag
OUTPUT V - BLANK (STARTPEs parce . oo. NMI SIGNAL | D7 of <4210H> { 0: NMI has not occurred “NMI Enable” 1: NMI has occurred
The “Blank NMI” flag of register <4210H> will be set at the beginning of V - Blank and will reset at the end of V - Blank. It may also be reset by reading register <4210H>. <EXAMPLE>
- In case of detecting the beginning of V - Blank by NMI :
Initial Settings
|Write “1” to NMI Enable}
Process
NML is an edge trigger. If register <4210H> is not read during V - Blank and “NMI Enable” is set to “1”, NMI will be duplicated.
- In case of detecting the beginning of V - Blank by the flag :
Read <4210H> Read <4212H>
Blank NMI Flag Blank NMI Flag
1: V- Blank Period
IRead <4210H>|
Processing during V - Blank| Reset the flag
B-3
CPU REGISTERS ]
SUMMARY OF REGISTERS. REGISTERS (WRITE ) S - PPU ADDRESS] 07 Dé [| 05 | 04 D3 D2 D1 Do 2100H [Blanking Fade IN/OUT (0 ~ 15;
2101H OBJ Size Select OBJ Name Select | OBJ Name Base Address 2102H OAM Address
2103H OAM Priority OAM Address} Rotation | | MSB. 2104H OAM Data (Low, High)
2105H BG Size BG3 BG Mode (0 ~ 7) BG4 | BG3 | BG2 | BGI Priority 2106H Mosaic Size Mosaic Enable BG4 | BG3 BG2_| _BG1 2107H BG1 SC Base Address BG1 SC Size
2108H BG2 SC Base Address BG2 SC Size
2109H BG3 SC Base Address BG3 SC Size
210AH BG4 SC Base Address BG4 SC Size
210BH BG2 Name Base Address BGT Name Base Address
210CH BG4 Name Base Address BG3 Name Base Address
210DH BG1 H - Offset (Low, High)
210EH BG1V - Offset (Low, High) 210FH BG2 H - Offset (Low, High) 2110H BG2 V - Offset (Low, High) 2111H BGd H - Offset (Low, High) 2112H BG3 V - Offset (Low, High) 2113H BG4 H - Offset (Low, High) 2114H BG4 V - Offset (Low, High) 2115H =| H/Linc V_- RAM Address Sequence Mode Full Graphic l C Increment 2116H V - RAM Address (Low)
2117H V - RAM Address (High)
2118H V - RAM Data (Low)
2119H V - RAM Data (High) 211AH | Screen Screen we Over v4
B4
[
REGISTERS (WRITE ) S - PPU ADDRESS] D7 | De | 05 | D4 | vs | v2 [ 01 | bo 211BH Matrix Parameter A (Low, High)
211CH Matrix Parameter B (Low, High)
211DH Matrix Parameter C (Low, High)
211EH Matrix Parameter D (Low, High)
211FH Matrix Parameter X (Low, High) 2120H Matrix Parameter Y (Low, High) 2121H CG - RAM Address
2122H CG - RAM Data (Low, High)
2123H BG2 Window BG1 Window W2 EN | IN/OUT |_W1 EN | IN/OUT | W2 EN | IN/OUT | W1 EN | INOUT 2124H BG4 Window BG3 Window W2 EN | IN/OUT | _W1 EN | IN/OUT | _W2 EN | IN/OUT | _W1EN | IN/OUT 2125H Color Window OBJ Window W2 EN | IN/OUT | _W1 EN | IN/OUT | W2 EN | INOUT | W1 EN | IN/OUT 2126H Window HO0 Position (0 ~ 255)
2127H Window H1 Position (0 ~ 255)
2128H Window H2 Position (0 ~ 255)
2129H Window H3 Position (0 ~ 255)
212AH Window Logic BG4 l i3 BG2 l BG1 212BH Window Logic Color | OBJ 212CH Through Main OBJ | BG4 | BG3 | BG2 | BGi 212DH Through Sub OBJ | BG4 | BG3 | BG2 | BGI 212EH Caan mate (Window) OBJ | BG4 BG3_ | BG2 | BG1
212FH Through Sub (Window)
OBJ BG4 t BG3 BG2 BG1
2130H Window ON/OFF CG ADD] Direct Main SW (A) Sub SW (B) Enable_| Select 2131H =JADD, V2 ADD or SUB Enable SUB] Enable | BACK | OBJ | BG4 | BG3 | BG2 | BGI 2132H Color Constant Data Blue Green Red__| Color Brilliance Data 2133H EXT. EXT. Pseudo 224/239 OBJ - V [Inter- Syne, Input 512 Select lace
CPU REGISTERS
S - PPU READ REGISTER
ADDRESS| D7 D6 ps | 04 7 os | be D1 Do 2134H MP Y (Low)
2135 MP Y (Mid) 2136H MP Y (High)
2137H Soft Latch for H/V Counter
2138H OAM Data (Low, High)
2139H V - RAM Data (Low)
213AH V- RAM Data (High)
213BH CG Data (Low, High)
213CH Output Data of H - Counter (Low, High)
213DH Output Data of V - Counter (Low, High) Time | Range [Master $- PPUT Version Number 213EH Over Over /Slave 213FH Field [ EXT. NTSC S - PPU2 Version Number Latch /PAL
APU READ/WRITE REGISTER AppRESS{| 07 [| De [| 05 | D4 | v3 | b2 | bi [| bo 2140H APU W/O Port
2141H APU TO Port
2142H APU I/O Port
2143H APU I/O Port
WORK RAM READ/WRITE REGISTER ApDRESS| D7 [| De [| os | v4 | vs | pe | v1 [| bo 2180H WORK RAM Data
WORK RAM WRITE REGISTER ADDRESS| D7 | Dé | 05 [ D4 | v3 [| bz | di | Do 2181H WORK RAM Address (Low)
2182H WORK RAM Address (Mid)
2183H WORK RAM eos (High
B-6
Ez
REGISTERS (WRITE ) S - CPU ADDRESS| D7 D6 D5 o4_[ os | o2 | DO '4200H NMI Timer Enable Joy-C Enable V-EN | H-EN | Enable 4201H VO Port
4202H Multiplicand - A
4203H Multiplier - B
4204H Dividend - C (Low)
4205H Dividend - C (High) 4206H Divisor - B 4207H H - Counter Timer
4208H H-MSB
4209H V - Counter Timer
420AH Vv -MSB
420BH General Purpose DMA (Enable Fla, CH7 EN| CH6 EN | CHS EN re EN _| CH3 EN | CH2 eh | CH1 EN |CHO_EN
420CH MA (Enable FI lag)
CH7 EN| CH6 EN | CHS EN [ert EN | CH3 EN[CH2 EN | CH1 EN |CHO EN 420DH oral a 13.)
CPU REGISTERS
REGISTERS (READ) S - CPU ADDRESS| D7 De | 05 | 04 o3 | 02 bi | Do 4210 Blank SNES - CPU Version Number NMI 4211H Timer IRQ 4212H = {V -Blank]/H -Blank Joy -C Enable 4213H VO Port
4214H Quotient - A (Low)
4215H Quotient - A (High)
4216H Product - C / Remainder (Low)
4217H Product - C / Remainder (High) 42T8H Joy Controller | (Low)
4219H Joy Controller | (High)
421AH Joy Controller Il (Low)
421BH Joy Controller Il (High)
421CH Joy Controller lil (Low)
421DH Joy Controller Ill (High)
421EH Joy Controller lV (Low)
42TFH Joy Controller lV (High)
REGISTERS (WRITE ) S - CPU ADDRESS] _D7 06 D5 p4 | 03 p2_| o1 | bo 43X0H HX |CHX A- Bus Address | CHX Transfer Word Select -Org|__Type INC/DEC|_Fixed 43X1H CHX B - Address 43X2H CHX AT Table Address (Low) 43X3H CHX A1 Table Address (High) 43X4H CHX A Table Bank 43X5H CHX Data Address (H-DMA) (Low) / Number of Bytes to be Transferred (General Purpose DMA) 43X6H CHX Data Address (H-DMA) (High) / Number of Bytes to be Transferred (General Purpose DMA) 43X7H CHX Data Bank (H - DMA) 43X8H CHX A2 Table Address (Low) 43X9H CHX A2 Table Address (High) 43XAH = |Continue| Number of Lines
- =T-Org means the “Transfer Orientation”.
B-8
E
Appendix C SPC700 Commands
Ca SUMMARY OF SPC700 COMMANDS An SPC700 series is used for the SNES sound source CPU. However, standby and sleep modes cannot be used. The command set operand notation and explanation of command activity are indicated in the table below. The upper portion of the table contains symbols necessary to operand description. These are symbols necessary for assembler description. In the lower portion of the table, the values of the various operands are expressed as symbols. Assembler descriptions are given as numerical values or labels. Table C-1 Command Operand Symbols and Meaning
Symbol Meaning
A A Register xX X Register Y Y Register PSW | Program Status Word YA Y, A paired 16-bit register PC Program Counter SP Stack Pointer () Indirect Expression ()+ Indirect Auto-increment Expression Immediate Data f Absolute Address / Bit Reversal a Bit Position Indicator {] Indexed Indirect Expression H Hexadecimal Notation imm 8-bit Immediate Data dp Offset Address within Direct Page abs 16-bit Absolute Address rel Relative Offset 2's Complement mem Boolean Bit Operation Address bit Bit Location MSB x 0
x y MSB.
y upage Offset Within U Page n Vector Call Number
SPC 700 COMMANDS J
The following symbols are used, in addition to those on the previous page, for the purpose of explaining operational functions. Table C-2 Symbols and Meaning for Operational Description
Symbol Meaning
N | Negative Flag
Vv Overflow Flag
P Direct Page Flag B Break Flag H Half Carry Flag I Indirect Master Enable Flag
Zz Zero Flag Cc Carry Flag
+ Addition
- Subtraction 5 Comparison AND | Logic Product OR | Logic Sum EOR | Exclusive Logic Sum . Multiplication / Division
Q Division Quotient R Division Remainder <d> | Destination <S> | Source —> | Direction of Data Transmission ae Data Decrement ++ | Data Increment << | 1 Bit Shift Left >> | 1 Bit Shift Right
No Change
0 Cleared to “0”
1 Set to “1”
Flag Name|Set or Cleared Depending on Result}
C2
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
‘SPC 700 COMMANDS
Table C-6 8-bit Data Transmission Commands, Group 3
C4 Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC| MOV A,X 7D 1 2 A< xX N....Z MOV AY DD 1 2 A<Y N. MOV XA 5D 1 2 XA MOV YA FD 1 2 YEA MOV X, SP 9D 1 2 X< SP MOV SP,X BD 1 2 SP< X MOV = dp<d>,dp<s> FA 3 5 (dp<d>) < (dp<s>) MOV dp, #imm 8F 3 5 (dp)< imm
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.
SPC 700 COMMANDS
Table C-11 16-bit Data Transmission Commands Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC MOVW __ YAdp BA 2 5 YA <— (dp+1)(dp) N..Z. MOVW dp, YA DA 2 4 (dp+t)(dp) <— YA
Table C-12 16-bit Operation Commands Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC INCW dp 3A 2 6 increment dp memory pair DECW dp 1A 2 6 decrement dp memory pair ADDW YA, dp 7A 2 5 YA <= YA+(dp+1)(dp) SUBW YA, dp 9A 2 5 YA <— YA- (dp+1)(dp) CMPW YA, dp 5A 2 4 YA-(dp+1)(dp)
Table C-13 Multiplication and Division Commands Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC MUL YA CF 1 9 YA(16bits) <— Y *A N.....Z. DIV YA, X 9E 1 12 Q:A R:Y <— YA/ X NV..H.Z.
Table C-14 Decimal Compensation Commands
Mnemonic Operand Code Bytes Cycles Operation DAA A DF 1 3 decimal adjust for addition DAS A BE 1 3 decimal adjust for subtraction
Table C-15 Branching Commands Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC BRA rel 2F 2 4 branch always wrvereee BEQ rel Fo 2 2/4 branch on Z=1 BNE rel DO 2 2/4 branch on BCS rel BO 2 2/4 branch on C=1 BCC rel 90 2 2/4 branch on C=0 BVS rel 70 2 2/4 branch on V=1 BVC rel 50 2 2/4 branch on V=0 BMI rel 30 2 2/4 branch on N=1 BPL rel 10 2 2/4 branch on N=0 BBS dp, bit, rel x3 3 5/7 branch on dp, bit=1 BBC dp, bit, rel y3 3 5/7 branch on dp, bit=0 CBNE dp,rel 2E 3 5/7 compare A with (dp) then BNE CBNE dp+x, rel DE 3 6/8 compare A with (dp+X) then BNE DBNZ dp,rel 6E 3 5/7 decrement memory (dp) then JNZ DBNZ Y,rel FE 2 4/6 decrement Y then JNZ JMP labs SF 3 3 jump to new location JMP [!abs+X] 1F 3 6 PC <— (abs+X+1)(abs+X)
C8
Table C-16 Subroutine Call, Return Commands
Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC CALL labs 3F 3 8 subroutine call aateaees PCALL upage 4F 2 6 upage call TCALL n ni 1 8 table call BRK OF 1 8 software interrupt
RET 6F 1 5 return from subroutine RETI 7F 1 6 return from interrupt (Restored)
Table C-17 Stack Operation Commands Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC. PUSH A 2D 1 4 pushAtostack sess PUSH x 4D 1 4 push X to stack PUSH Y 6D 1 4 push Y to stack PUSH PSW oD 1 4 push PSW to stack POP A AE 1 4 pop A from stack POP x CE 1 4 pop X from stack POP Y EE 1 4 pop Y from stack ari POP PSW 8E 1 4 pop PSW from stack (Restored)
Table C-18 Bit Operation Commands
Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC SET1 dip. bit x2 2} 4 set direct page bit CLR1 dip. bit y2 2 4 clear direct page bit
TSET1 labs 0E 3 6 test and set bits with A TCLR1 labs 4E 3 6 test and clear bits with A
AND1 C,mem. bit 4A 3 4 Cc <— C AND(mem. bit) AND1 C,/mem. bit 6A 3 4 C <— C AND_(mem. bit) OR1 C,mem. bit OA 3 5 Cc <— C OR(mem. bit) OR1 C,/mem. bit 2A 3 5 Cc <— C OR{mem. bit) EOR1 C,mem. bit 8A 3 5 C <— CEOR (mem. bit) NOT1 mem. bit EA 3 5 complement (mem. bit) MOV1 C,mem. bit AA 3 4 Cc < (mem. bit) MOV1 mem. bit,C CA 3 6 C—> (mem bit) aaa
SPC 700 COMMANDS
Table C-19 Program Status Flag Operation Commands
Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC CLRC 60 1 2 clear carry flag SETC 80 1 2 set carry flag NOTC ED 1 3 complement carry flag CLRV Eo 1 2 clear V and II CLRP 20 1 2 clear direct page flag SETP 40 1 2 set direct page flag El AO 1 3 set interrupt enable flag DI co 1 3 clear interrupt enable flag
Table C-20 Other Commands
Mnemonic Operand Code Bytes Cycles Operation NVPBHIZC NOP 00 1 2 Mooperation —aesaee
SLEEP EF 1 3 standby SLEEP mode
STOP FF 1 3 standbySTOP mode ——itt_—"unnn...
C-10
ES
Appendix D. Data Transfer Procedure
D.1 Data Transfer Procedure
Sound CPU Side Direction SNES CPU Side Procedur PORTO = OAAh H P|] Confirm Aa, BB PORT1 = OBBh|>}
| PORT1 = NOT 0 PORTO = PTO |¢|PORT2 = ADDRESS LOW (Data Transfer Start Address 2) l-}| PORT3 = ADDRESS HIGH I¢-|PORTO = 0CCh }»| (PTO is data written at PORTO by the Main CPU, and it is OCCh in this case.)
Data Transfer Start
le-| PORT1 = DATA | PORTO = 000h Ly | PORTO = PTO
Repeat le-| PORT1 = DATA l¢-| PORTO = (previous PORTO data) + 1 PORTO = PTO}+
-———_ When sending the next data block | PORT1 = NOT O t¢-| PORT2 = ADDRESS LOW (Data Transfer) +) PORT3 = ADDRESS HIGH l¢-| PORTO = (previous PORTO data) + 2 to 127
- Total #0 PORTO = PTO }»
aa | Return to Data Transfer Start
After sending the last block
PORT1 = 000 PORT2 = ADDRESS LOW (Program Start Address) PORT3 = ADDRESS HIGH PORTO = (previous PORTO data) + 2 to 127
PORT = PTO
Complete Data Transfer (7)
DATA TRANSFER PROCEDURE [
D.2 Data Transfer Instruction
The transfer program on the Sound CPU is stored in the internal ROM called IPL ROM. This ROM functions after reset. The program ROM functions using the Main CPU and PORT 0 through 3. (5)
(6)
SS
(10)
(11) The sound CPU writes AAh to PORT 1. The Main CPU reads and confirms data at PORT 0 and 1. The Main CPU writes Start Address to PORT 2 and 3. After storing Port 2 and 3, store any number except 0 to PORT 1 and store CCh to PORT 0. The sound CPU checks PORT 0 for CCh and writes CCh to PORT 0. Start data transfer. The Main CPU writes first data to PORT 1 and writes 00h to PORT 0. The Sound CPU reads data from PORT 1 and writes 00h to PORT 0. The Main CPU checks PORT 0, writes next data to PORT 1, and increments of PORT 0. This is the data transfer procedure. The data block contains the quantity of data to be transferred. When PORT 0 stops incrementing, proceed to the next step. The value that the SNES CPU writes to PORT 0 must not be 00h. Write any value but 00h to PORT 1. The Sound CPU writes the same value to PORT 0 and then returns to step (4). After sending all data blocks using steps (4) through (6), the data transfer is completed. Program Start Address is stored to PORT 2 and 3, Write 00h to PORT 1.
D2
E |
D.3 Data Block Organization
Data is divided into several blocks having consecutive addresses. The quantity of data (2 byte) and address (2 byte) are stored in front of data.
Data Block Example:
Data Quantity Transfer Address \ es dw 000010h, 010000h db 030h, 031h, 032h, 033h, 034h, 035h, 036h, 037h : First Data Block db 038h, 039h, 03ah, 03bh, 03ch, 03dh, 03fh
dw 0001h, 020000h db 030h, 031h, 032h, 033h, 034h, 035h, 036h, 037h : Last Data Block db 038h, 039h, 03ah, 03bh, 03ch, 03dh, 03eh, 03th
dw 00000h, 00800h
Transfer End Code Program Start Address
D-3
This page reads as a drawing: its text was drawn rather than typeset, and comes out in fragments. See the original scan.