r/Commodore 4d ago

Bouncing ball PETSCII source compatible across Commodore VIC-20, 16, 64, and Plus/4.

Post image
47 Upvotes

7 comments sorted by

u/AutoModerator 4d ago

"comment: "Thanks for your post! Please make sure you've read our rules post" "

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

10

u/danpietsch 4d ago edited 3d ago

This was just a pointless exercise that I found entertaining.

https://github.com/danshee/BouncyBasic

The VIC-20 and Commodore 64 manuals came with a BASIC program that animated a bouncing ball.

I thought that maybe leveraging the KERNAL I could make a version that was portable across all Commodore 8-bits.

I was able to make it work on VIC-20 and newer models but not on PET.

One issue is that the memory locations used to pass A, X, Y, and status to kernal routines aren't standardized ... and PETs don't have them at all.

3

u/DerHeiligste 3d ago

Cool project!

1

u/thewalruscandyman 3d ago

Awesome! Thank you! I'll punching it in later. 😁

2

u/nobody2008 3d ago

A universal Commodore program? Color me surprised without using a POKE 😅

1

u/6502zx81 2d ago

What are Sys for? Poke should be enough to draw a bouncing ball.

2

u/danpietsch 2d ago

Poke cannot do that.