Giter VIP home page Giter VIP logo

c64-smooth-scrolling's Introduction

Smooth scrolling screen on Commodore 64

Here is some sample code to implement horizontal smooth scrolling on a C64.

The algorithm in pseudo-code is:

when_graphics_chip_is_at_line_3() {
  if (xscroll == 0) {
    shift_upper_half_of_color_ram();
  }
}

when_graphics_chip_is_at_vblank() {
   xscroll--;
   if (xscroll == 4) {
      shift_upper_half_of_screen_ram_to_back_buffer();
   }
   else if (xscroll == 2) {
      shift_lower_half_of_screen_ram_to_back_buffer();
   }
   else if (xscroll < 0) {
      swap_screen_buffer();
      shift_lower_half_of_color_ram();
      draw_next_column_to_screen_and_color_ram()
   }
}

See http://1amstudios.com/2014-12-07-c64-smooth-scrolling for more details

DustLayer is a fanstastic site devoted to C64 internals with great descriptions and tutorials. Highly recommended!

c64-smooth-scrolling's People

Contributors

jeff-1amstudios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c64-smooth-scrolling's Issues

How to build?

So I read in the other issues that this is meant to use ACME Cross Assembler. What are the compile & link steps to make this project?

I too can't get this to run properly

I converted the whole code base to KickAss instead of ACME, got it all setup to run but doesn't scroll as intended. So I went and grabbed ACME and tried to build it from a clean repo. It doesn't run at start up, I have to SYS 49152 manually and then it doesn't work there either.

I know how to fix the startup issue, but if it doesn't scroll there's no point..

Unable to make it work property

Guess it's an acme source because I haven't found any information about the cross assembler used, however the program crashes with a syntax error.
If I try to start it manually by typing "sys 49152" the program behaves in an odd way.

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.