PETSCII Side-Scrolling Platformer

Post Reply
jimbo
Posts: 12
Joined: Mon Oct 09, 2023 11:23 am

PETSCII Side-Scrolling Platformer

Post by jimbo »

A side-scrolling platform game inspired by games like Super Mario Bros and Sonic The Hedgehog.

Run, jump, collect coins, crush henchmen, battle the bosses, rescue friends. 8 levels of action.

Originally written for the Commodore PET, and now ported to the Commander X16.

Screenshot 2023-10-13 at 3.13.19 PM.png
Screenshot 2023-10-13 at 3.13.19 PM.png (509.32 KiB) Viewed 7803 times

Preview video:
https://youtu.be/2_ahLZNUwzk

Try it now:
https://cx16forum.com/webemu/x16emu.htm ... hp?id=2139

Download (v1.3 fixes issues identified in the comments below):
PSSPX16.prg
(24.25 KiB) Downloaded 469 times
Last edited by jimbo on Sun Dec 03, 2023 9:57 pm, edited 4 times in total.
User avatar
desertfish
Posts: 1075
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: PETSCII Side-Scrolling Platformer

Post by desertfish »

Keep 'm coming :D
voidstar
Posts: 447
Joined: Thu Apr 15, 2021 8:05 am

Re: PETSCII Side-Scrolling Platformer

Post by voidstar »

Incredible :D And can slide the turtles off screen and they return haha!

But, I gotta report: gamepad 1 and 2 isn't responding for me on the hardware. In fact, I had to unplug both gamepads in order to use keyboard. I tried again with just gamepad 1 inserted -- pressing DOWN sort of works (for level section), but none of the other buttons are responding and can't start the level.

The CONTEST.PRG program that test all the gamepad reports, it's showing these controllers as working ok - and they work for other titles like Montezuma and Scumbotron.
Last edited by voidstar on Mon Oct 16, 2023 8:18 am, edited 1 time in total.
User avatar
ahenry3068
Posts: 1084
Joined: Tue Apr 04, 2023 9:57 pm

Re: PETSCII Side-Scrolling Platformer

Post by ahenry3068 »

I've been all over the forums and DISCORD. I just ordered a couple of SNES controllers, but I'm really getting the impression that the Hardware is super fussy, dussy, about what you actually plug into those ports. We should get a thread together to just compare controller notes. Maybe find a supplier who is 100% compatible.... Maybe ?
voidstar
Posts: 447
Joined: Thu Apr 15, 2021 8:05 am

Re: PETSCII Side-Scrolling Platformer

Post by voidstar »

For the sub-$10 controllers, it's just going to be hit or miss - the folks who carry those, they are probably inconsistent on their "unlabeled" suppliers anyway. We opened some controllers up - even from the same place, they are built differently inside just depending on the season they were made.


All I can say is that SO FAR, I haven't come across an "official Nintendo" controller that didn't work on the X16. I think those tend to be above $20/ea tho (AND they have a ridiculously short extension cable, so then you need a cable extension on top of that unless you're able to just sit right on top of your X16)
jimbo
Posts: 12
Joined: Mon Oct 09, 2023 11:23 am

Re: PETSCII Side-Scrolling Platformer

Post by jimbo »

(Game author here.) I don't have hardware and this game was adapted from my PET version (which used either keyboard or SNES) .. so I really just took a flyer on the X16 SNES controller code testing it as much as possible using the "0" controller keys. If you do have hardware with a controller and "down" works to select levels, can you actually select the level to start playing it? Or only the "down" key works? If you can start a level but not move, does "down" still work (the little man will "crouch down").
voidstar
Posts: 447
Joined: Thu Apr 15, 2021 8:05 am

Re: PETSCII Side-Scrolling Platformer

Post by voidstar »

Yep, I have and testing on hardware.

Only just DOWN worked. None of the other buttons responded (could not do START to actually start).

And unfortunately the UserPort on the X16 is a bit different then PET and legacy CBM systems. I had hoped the PETSCII Robot SNES UserPort gamepad adapter would work on the X16, but unfortunately does not. Actually, I'll test that again to be sure.. [ edit: verified, the gamepad adapter used on PET UserPort doesn't work on X16; forget the reason, couple pins different and tied to CPU IRQ rather than NMI? ]

That said I'm curious how you did audio in your Side-Scrolling Platformer, since I thought that PET code went through the UserPort in some fashion?
jimbo
Posts: 12
Joined: Mon Oct 09, 2023 11:23 am

Re: PETSCII Side-Scrolling Platformer

Post by jimbo »

ok thanks for confirming that only "down" works on an actual hardware computer using SNES controller. For clarity, the START button doesn't do anything - you are simply supposed to move around that first menu to select which world/level you want to start on and then press the button to start (probably the B or the Y button - but one of those 4 on the right of the controller). I will re-read the code to try to figure out what might be wrong.

My mention of the PET was a bit of red herring here .. I rewrote the sound, i/o (keyboard and SNES) and screen writing for the port of the game to the X16 (I was more trying to convey that I do have the SNES working on the PET version). My goal is to have generic routines for this so that all my PET games can be ported fairly easily.

Regarding the sounds specifically, yes PET sounds are generated by a timer that is set to 0-255 .. so I simply wrote a translation routine that took whichever PET tone I wanted to output and sent it to VERA in the proper format (simple VERA -> PSG mode, single channel, non-stereo, etc). eg note A is 440 Hz which on PET timer is 140, so look up table at 140 gets the hi / lo for 440 and shoves that out to VERA.
jimbo
Posts: 12
Joined: Mon Oct 09, 2023 11:23 am

Re: PETSCII Side-Scrolling Platformer

Post by jimbo »

ok I have fixed up the areas that people identified in various comments here and elsewhere:
1. SNES controller on hardware should work (much appreciated if someone can test this)
2. keyboard controls better match modern keyboard layouts like the X16 (eg use arrow keys to move)
3. the henchmen generally disappear when they are off the screen
voidstar
Posts: 447
Joined: Thu Apr 15, 2021 8:05 am

Re: PETSCII Side-Scrolling Platformer

Post by voidstar »

- game pad support worked fine for me in R45 hardware! Including the accelerator button to run/jump faster.
my only issue here: if the game pad is connected, you have to use it; it doesn't seem any way to fallback or override and use the keyboard [ it's fine, just can be a known way it works- I recall it being an issue in my own PET game, as it "cost too much runtime" to check which device is active all the time-- although your title screen says "OR" on the controls :D ]

- START on gamepad is acting like button Y and X (e.g. firepower); was expecting SELECT or START to PAUSE the game??

- "VGA only"; as we're preparing the "launch SD card" of the next batch, we're finding a lot of software inadvertently assumes use of VGA out, which means they don't support the Composite CRT output. And true, this is hard to test/observe without the hardware yet. SSP here was no exception: with the Composite CRT out enabled, starting SSP switches back over to VGA on startup. just mentioning since I think in general this is an easy fix for most software.


Such awesome work here! Might the 8mhz gives you enough wiggle room to think about a little color? It's just one offset away! Speaking of 8mhz, the timer countdown seems a tad fast from 400; maybe its normal/as expected, or just wondering if its accelerated relative to the PET 1mhz version. On the X16, it seems about 1/4 second each tick about??
Post Reply