January 28, Nintendo. Bob Rost January 28, 2004

Similar documents
February 11, Nintendo. Bob Rost January 14, 2004

February 18, Nintendo. Bob Rost January 14, 2004

NES FPGA Emulator. Sergio Morales Hector Dominguez Omar Torres Randy Truong Kevin Mitton

XiNES Design Document. XiNES is a Nintendo Entertainment System simulator coded in pure VHDL

6.111 Final Project Jonathan Downey Lauri Kauppila Brian Myhre

AN INTRODUCTION TO SCRATCH (2) PROGRAMMING

Hello! My name is PC and I am learning how to use a computer. Let s learn together! Unit1

Platform Games Drawing Sprites & Detecting Collisions

12/15/2008. All about Game Maker. Integrated Development Environment for 2D games Global idea

Asset List & Content Creation

Copyright 1998 CH-UH Schools Revised 10/31/98 Authored by: Bob Torrelli Jim Harmon Hannah Reid. Technology Specialists, CH-UH Schools

The word pixel means a picture element, or if you must a dot on the screen.

Animate a Name Cards

Scratch Lesson 2: Movies Made From Scratch Lesson Framework

A 2D Game Engine Using Bitmaps

ebooks & ecomics WHAT: Book Creator is an ipad and Android app that lets you design and publish your own customized ebook.

Interpolation, extrapolation, etc.

SLOGGER' S ELECTRON EXPANSION 2.0. For the Acorn Electron with the ROMBOX PLUS or Acorn PLUS1 USER GUIDE

To make programs readable and usefull it is wise to use instead of the numbers variables and give that variables the correct numbers

Rev. A 02/02/2016 Downers Grove Public Library Page 1 of 50

Report for Digital Preservation of Console Video Games (SNES)

Continuous Controller Parameters

Welcome! Graphics Fundamentals. Lecture 2. Welcome! Lecturer: Jacco Bikker

Handout Objectives: a. b. c. d. 3. a. b. c. d. e a. b. 6. a. b. c. d. Overview:

Game Programming with DXFramework. Jonathan Voigt University of Michigan Fall 2005

Using Graphics. Digital Camera. Auto Shapes

Sprite Multiplexing. on Nintendo DS. Daniel -MsK`- Borges 2007/03/15 0.1

8-Bit Wonderland. Executing custom Code on the Nintendo Game Boy. Belial

Assignment 1 What is a Computer?

MoleMash for App Inventor 2. Getting Started. Introduction. Workshop, S.1

ECE 598 Advanced Operating Systems Lecture 18

Appendix B Import (CAD Transfer) Mode Keyboard Shortcuts

Pong in Unity a basic Intro

Lesson 6 page 1. If you look at the bottom right of the Scratch color choices, you will see it say MORE BLOCKS in Purple.

JavaScript: Tutorial 5

CS1114 Assignment 5 Part 1

The Crypt Keeper Cemetery Software Online Version Tutorials To print this information, right-click on the contents and choose the 'Print' option.

Introduction to Scratch

vis website building a page

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite.

Teaching Kids to Program. Lesson Plan: Catch the Ball

Recipes4Success. Create a Character Scrapbook. Share 4

Storybook Weaver Deluxe 2004 User Guide

Using PowerPoint - 1

All Blocks of Scratch

The Environment. Scratch Programming. The Environment. The Environment. The Environment. The Environment. Lesson 1: Introduction THE STAGE

Section 3. XGA Function

SPECTRUM DOS BY BOB COLIN

This lesson will focus on the Bouncing Ball exercise.

Reviewers: Approval Date: REF No:

Platformer Tutorial Part 9 Andrew Van Beck, 2009

Teacher Guide: Introduction to Computer Science

Flash offers a way to simplify your work, using symbols. A symbol can be

IGCSE ICT Section 16 Presentation Authoring

Fantasy Cartography with Adobe Photoshop: Adapted for Gimp

Libraries. Multi-Touch. Aero Peek. Sema Foundation 10 Classes 2 nd Exam Review ICT Department 5/22/ Lesson - 15

A QUICK USER GUIDE FOR THE FIOS REMOTE CONTROL

USB Hub-Audio Series. January 1999 A

Aircraft Combat. A mini game.

Motivation. Gray Levels

A QUICK USER GUIDE FOR THE FIOS REMOTE CONTROL

Subtracting with Multi-Digit Numbers Adaptable for 2 nd, 3 rd, 4 th, and 5 th grades*

B2G Music Application Application Wireframes

Lesson 2. Introducing Apps. In this lesson, you ll unlock the true power of your computer by learning to use apps!

Scripting in Python Laborations and projects

Smoother Graphics Taking Control of Painting the Screen

Add in a new balloon sprite, and a suitable stage backdrop.

The Nintendo Entertainment System

This lesson will focus on the Bouncing Ball exercise. Feel free to start from scratch or open one of the accompanying demo files.

Creating Loopable Animations By Ryan Bird

Thank you for backing the project. Hope you enjoy these PDFs over the next few months <3

Meet the Cast. The Cosmic Defenders: Gobo, Fabu, and Pele The Cosmic Defenders are transdimensional

How to draw and create shapes

Cassette2CD Wizard 2.05 User's Manual

Making Your First Character

Making a maze with Scratch

Revision of Level I. In this lesson you will: Revise the topics learnt in the previous level.

Purpose of this ebook Background history with computers Passion for programming My experience with the Commodore 64

Timer Interrupt Programming

Quick Start Guide. Use your phone for more than just talking CV Music Player 2.0 Megapixel Camera with Video Record Video Share

CSCI-1200 Data Structures Fall 2018 Lecture 5 Pointers, Arrays, & Pointer Arithmetic

UI Elements. If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI)

SKEW. Skewed Requirements

Designer Reference 1

Unplanned Blocky Puzzles Creating PETSCII for the Commodore 64

WRISTBAND CREATOR Tool Instructions

Scratch. Creative Computing

Mario Kart Wii Classic Controller Controls Tricks

Robocolor II System. users guide

Section 1. System Technologies and Implications. Modules. Introduction to computers. File management. ICT in perspective. Extended software concepts

Tutorial: How to make low poly car. By Jirayu Tanabodee

Human Computation. Melissa Winstanley

How Your First Program Works

CSCI-1200 Data Structures Fall 2017 Lecture 5 Pointers, Arrays, & Pointer Arithmetic

PocketLab and Scratch STEM Coding Challenge

Windows 7 Tutorial For Beginners Games Pc 3d

imovie with Still Pictures

Challenges in the Architecture of Electronic Games

Creating a Title in Photoshop

Transcription:

98-026 Nintendo Bob Rost January 28, 2004

Today s Schedule Postmortem: Sack of Flour, Heart of Gold Emulator image scaling overview The game loop Joystick input A Demo ROM

Postmortem Sack of Flour, Heart of Gold

Image Scaling NES has a fixed resolution of 256x240 Your monitor is bigger Playing games in a tiny window is no fun

Image Scaling Nearest Neighbor Bilinear Filtering Horizontal 50%

Image Scaling Simple Smoothing 2x SaI Super Eagle Super 2x SaI

Image Scaling hq3x hq3x image scaling examples (compared to nearest neighbor)

How a Game Works Initialization Set up graphics Set initial values The Game Loop Draw the screen Get player input Calculate the next frame

Example nbasic Game start: gosub init_screen gosub init_vars mainloop: gosub vwait //wait for next frame gosub draw_stuff //draw the new frame gosub handle_joystick //get input gosub calculate_things //game logic gosub update_sound //make some noise goto mainloop

NES Registers Special memory addresses that allow interfacing with parts of the system

Common Registers $2000, $2001 PPU Initialization $2003, $2004 Sprite Control $2005 Scrolling $2006 PPU Memory Address $2007 PPU Memory Access $4014 Sprite DMA $4000-$400F Music Control $4015 Sound Setup $4016, $4017 Joysticks

Joystick Input Joystick 1 is register $4016 Joystick 2 is register $4017 Strobe by writing 1 then 0 to port Read one byte for each button (A, B, Select, Start, Up, Down, Left, Right) Bit 0 tells button status

Example Joystick Code The demo roms I create usually have a file common.bas, including common graphics and input routines. The joystick1 function called below is one of these routines. handle_joystick: gosub joystick1 //strobe and read joystick 1 if joy1a = 1 gosub jump if joy1b = 1 gosub shoot if joy1right = 1 gosub move_right if joy1left = 1 gosub move_left if joy1start = 1 gosub pause return

A Demo Rom Drawing a sprite Handling user input

Accessing PPU Memory PPU has its own memory space, which you can access through registers Write high and low byte of target PPU address to $2006 Read and write $2007. Internal pointer auto-increments

Drawing Sprites Each sprite has 4 attribute bytes Y coordinate Tile number Attribute byte X coordinate Set the sprite memory, through either PPU memory access or DMA

Sprite Attribute Byte bits 0-1 Sub palette bits 2-4 unused bit 5 behind background bit 6 flip horizontal bit 7 flip vertical

Background Sprite Demo Rom Drawing a multi-sprite character Going behind the background Simple gravity physics

Drawing Sprites Standard (Slow) Method Works for small numbers of sprites Write the starting sprite memory byte to $2003 (Sprite Number * 4) Start writing sprite memory to $2004 The internal pointer auto-increments

Drawing Sprites Awesome (DMA) Method Necessary for handling lots of sprites Keep your own copy of sprite memory, update during calculation part of game loop Write (address / $100) to $4014 Note that your memory must be aligned by $100 for this to work

Setting the Palette Background palette has PPU address $3F00 Foreground palette has PPU address $3F10 Write the global palette indices to PPU memory set $2006 $3f set $2006 $00 set $2007 [palette 0]... set $2007 [palette 31] example nbasic code to set foreground and background palettes

Scrolling Wait for vertical retrace Write horizontal scroll value to $2005 Write vertical scroll value to $2005

Deconstructulator Dynamic demonstration of sprite memory during game play http://acg.media.mit.edu/people/fry/deconstructulator/

Assignment 2 If you re going to drop the course, do it before you screw over other people Groups of 1-4 people I encourage you to work with people you don t normally work with Take advantage of each other s talents Due around mid semester break (before? after?) Your project must be approved by me

Assignment 2 pick one Make a useful development tool Must be pre-approved Make a complete game Works well Quality artwork (in-game, box art, manual) Sound and Music Decent story if appropriate Might result in fame and riches Make a partial game Some restrictions may apply Not for use with some sets

Assignment 2 Form groups now? Later?