ebook img

commodore 64 assembly language PDF

276 Pages·2012·25.66 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview commodore 64 assembly language

COMMODORE 64 ASSEMBLY LANGUAGE ARCADE GAME PROGRAMMING This book is dedicated to mypaients. COMMODORE 64 ASSEMBLY LANGUAGE ARCADE GAME PROGRAMMING STEVE BRESS ITABITAB BOOKS Inc. Blue Ridge Summit, PA 17214 Game design by Dan and Steve Bress. Illustrations by Elisa Frances Mosely. Revenge of the Phoenix artwork by Denise McDonald. PAC-Man is a trademark of Bally, Midway Mfg. Co. DONKEY KONG is a trademark of Nintendo. CENTIPEDE is a trademark of ATARI, Inc. FIRST EDITION FIRST PRINTING Copyright © 1985 by TAB BOOKS Inc. Printed in the United States of America Reproduction or publication of the content in any manner, without express permission of the publisher, is prohibited. No liability is assumed with respect to the use of the information herein. Library of Congress Cataloging in Publication Data Bress, Steve. Commodore 64 assembly language arcade game programming. On t.p. the registered trademark symbol "TM" is superscript following "64" in the title. Includes index. 1. Commodore 64 (Computer)-Programming. 2. Assembler language (Computer program language) I. Title. QA76.8.C64B73 1985 001.64'2 85-2803 ISBN 0-8306-0919-9 ISBN 0-8306-1919-4 (pbk.) Contents Introduction viii 1-You and Your TV 1 How a Computer Displays a Picture What Is Animation 2 2-A Language for Games 3 Assembly Language 4 Using an Assembler 4 What an Assembler Can Do for You 5 How to Choose an Assembler 6 3-Underlying Concepts 9 Bits and Bytes 9 The Hardware 10 6510 Architecture 11 4-The 6510 Assembly Language 13 Instruction Types 13 Addressing Modes 14 Immediate Mode Addressing-Zero Page Addressing-Zero Page Indexed Addressing-Absolute Addressing-Absolute Indexed Addressing-Indirect Addressing with Indexes-Implied Addressing Relative Addressing-Indirect Addressing 5-0rganizing Your Program 17 6-Working with Interrupts 19 7-Technical Information 21 Commodore 64 Address Space 21 Memory Control and Mapping 22 Graphics Memory Locations 28 Standard Text Mode 24 Color Memory 'Z1 Custom Character Sets 28 Multicolor Mode 28 Extended Background Color Mode 28 Bit Mapping 29 Multicolor Bitmapped Mode Sprites 30 Sprite Pointers-Sprite Controls Collision Detection 32 Blanking the Screen 33 The Raster Register 33 Video Interrupts 33 Scrolling 33 Joysticks 34 8-Sound Effects 36 Filtering 36 The Sound Generator Demo 41 The Sound Editor 41 9-Creating Graphics 47 Hand Coding Graphics 47 Using a Graphics Tablet 52 Using a Koalapad Using the Sprite Maker 55 Using the Screen Maker Utility 56 10-Some Arcade Games 57 Pac-Man 57 Donkey-Kong 58 Centipede 58 Revenge of the Phoenix 59 Game Play-Scoring 11-Elements of Game Design 61 Visual Impact 62 Sound Effects 62 Difficulty Levels 62 Scoring 63 12-How Boghop Works 64 The Start of the Program 65 The Macro Library-RAM Definitions-Musical Definitions-The Data Section-The Point Plotting Routine-The Equates Statements-Defining the System-Initializing RAM The Main Program Loop 70 Scores-Moving the Bad Guys-Incrementing the Level of Play-Seeing if the Bad Guy Is Hit Seeing if the Player Is Hit-Launching the Shots-Moving the Bad Guy's Shots-Moving the Player's Shots-Checking the Shot Positions Animating the Sprites 73 Displaying the Number of Lives-Resetting the Game-Maintaining the Timing The Interrupt Routines 74 The Player Controls-Clear and Pull-INT1-Moving Mountains The Movement Subroutines 76 An End Note 76 77 Appendix A-The Instruction Set Appendix B-The Macro Library 99 Appendix C-The Program Listings 119 254 Glossary 257 Index Introduction This book, written for those who want a greater • A description of the code for a game program understanding of their computer's operation, is recommended for programmers who are familiar with the essential concepts of machine language and After you have mastered some of the program experienced in programming home computers in ming techniques, you will be shown how to take a BASIC. It is also for machine language program game concept and turn it into a video game. Many mers. Many of the examples given in the book are of the routines presented in this book were created machine language subroutines that can be used by expressly for use in video game programming. machine language programmers or called from However, in many cases techniques used in pro BASIC to increase the speed of BASIC programs. gramming video games carry over into all other This book is divided into three sections: fields of programming. By experimenting with the new concepts and techniques as you read, you will • Thchnical information find that you are increasing your understanding of • Game and graphics design how to fully utilize your Commodore 64. viii

Description:
Commodore 64 assembly language arcade game programming. On t.p. the registered trademark symbol "TM" is superscript following "64" in the title.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.