Simple Falling Sand in 6502 assembler

All aspects of programming on the Commander X16.
Post Reply
User avatar
darvidanoar
Posts: 15
Joined: Wed Mar 22, 2023 7:53 pm
Location: Australia

Simple Falling Sand in 6502 assembler

Post by darvidanoar »

I'm learning 6502 assembler and what a machine to learn on :)

As my first attempt at doing something on my new Commander X16, I thought I'd have a crack a very simple Falling Sand program.

The objectives for me were to learn how to:
  • use the ca65 assembler
  • communicate with the VERA
  • set a graphics mode
  • plot pixels using the VERA
  • read pixel values back from the VERA
Image

It's not mind-blowingly fantastic, but I thought I'd share this anyway so that others who are learning might have some sample code to look at.

Source code: https://github.com/Darvidanoar/FallingSand_X16/

David
David aka BKD (Bee Keeper Dave)
GitHub: https://github.com/Darvidanoar/
User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

Re: Simple Falling Sand in 6502 assembler

Post by JimmyDansbo »

That's a cool program.

I took the liberty to assemble it and attached it here as Try It Now!
Attachments
fallingsand.prg
(644 Bytes) Downloaded 97 times
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
User avatar
darvidanoar
Posts: 15
Joined: Wed Mar 22, 2023 7:53 pm
Location: Australia

Re: Simple Falling Sand in 6502 assembler

Post by darvidanoar »

Cheers Jimmy
David aka BKD (Bee Keeper Dave)
GitHub: https://github.com/Darvidanoar/
mortarm
Posts: 302
Joined: Tue May 16, 2023 6:21 pm

Re: Simple Falling Sand in 6502 assembler

Post by mortarm »

Couple ideas:
1) Ability to drop sand in front of previously dropped sand.
2) Ability to adjust speed of dropping sand.

First thing I thought of while messing with this was that it was a neat way creating mountain ranges.
Post Reply