Coder Social home page Coder Social logo

64kramsystem / c64_asm_book_listings Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 43 KB

Listings from Commodore 64 Assembly books

Assembly 97.98% BASIC 2.02%
c64 commodore-64 asm assembly 6502 6510 6502-assembly 6510-assembly videogames source-code

c64_asm_book_listings's Introduction

C64 (Commodore 64) ASM Book Listings

Listings from (old) C64 ASM books I've studied on.

Many (if not all) of the books from the past don't have a digital edition, so, while studying them, I'm publishing their listings, along with fixes, improvements, extensions, comments, and in a format that can be compiled by Kick Assembler.

The details about the fixes have been, separately, published on my professional blog.

The filenames are in the format $book_name/$chapter.$page.$title.$ext.

Update: Since fixing and improving the routines has been very time-consuming, the current book may be the only one included in the project.

Current books/listings

Machine Code Games Routines for the Commodore 64

This book includes the ASM routines; only the BASIC listing invoking ASM have been added.

Routines:

  • 06.047: Spiral screen fill
    • includes 09.071: Rectangle fill
  • 09.071: Small memory fill (fixed and extended)
  • 09.071: Block fill
  • 09.074: Memory copy (with simple optimizations)
  • 09.076: Delay (3 versions)
  • 09.080: Fundamental Bomb Update (fixed)
  • 09.081: Hail Of Barbs (fixed, and dumped the ASM routine)
  • 09.085: 256 Byte Continuous Scroll (fixed)
  • 09.086: Scroll Into Lower Memory
  • 09.087: Line Blank
  • 09.090: Joystick Handling
  • 09.092: Inverting (characters)
  • 09.094: Attribute Flasher (fixed)
  • 09.094: Alternative Sprite System
  • 10.102: Sprite vectoring (with full ASM port of the BASIC program below)
    • 10.103: BASIC program including the above
  • 10.110: Interrupt-driven Tune Player (commented and added tune, but unverified)
  • 10.115: Window Projection (commented, but unverified)
  • 10.116: Projecting a Landscape (fixed and simplified)
  • 10.120: Array Routines 1: Plot Characters
  • 10.120: Array Routines 2: Move Characters
  • 10.121: Array Routines 3: Search Entry (simplified and optimized)
  • 10.122: Array Routines 4: Delete Entry
  • 10.124: Random Numbers
  • 10.130: Homing Motion (optimized and simplified; added randomized sprites)

The book intentionally uses relative jumps (typically CLC+BCC) instead of straight JMPs, for relocatability purposes; the modified code listings respect this design.

Since the book aims for simplicity rather than optimization, optimizations have been applied only where they don't affect readability (or when they simplify the logic). An optimization that hasn't always been applied is to turn INr/CPr/BNE / DEr/BNE loops into DEr/BPL (which saves a CMP in the first case, and removes the -1 offset in the second).

c64_asm_book_listings's People

Contributors

64kramsystem avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

commodore64128

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.