Jump to content
Karl G

QuadTari sample code for bB

Recommended Posts

I've created a sample 4-player QuadTari game for bB using the standard kernel. My implementation uses a small code change to the standard kernel, which should be rolled into a future batari Basic release. Versions for the Multisprite kernel and the DPC+ kernel will be forthcoming.

 

For now, to use this code, place the included std_kernel.asm file in your project directory. To enable the QuadTari code, dim a variable with the name qtcontroller, e.g.:

 

	dim qtcontroller=y

 

This variable will be used to set which pair of controllers will be read on the next frame (after drawscreen). Note that only bit 0 of this variable is used, so the other 7 bite can be used in the project without being overwritten.

 

By default, controllers 1 and 2 will be selected at the beginning of your game. To read from controllers 3 and 4, set the qtcontroller variable to 1, and then do a drawscreen. On the next frame, controllers 3 and 4 will be selected. To switch back to controllers 1 and 2, set the qtcontroller variable back to 0, and do a drawscreen. Note that if you are using the other bits of this variable for other purposes, you will instead want to set bit0 directly instead of setting the whole variable.

 

To allow Stella to detect your game as a QuadTari game, you can include the following data statement:

 

	data quadtari_detection
	$1B, $1F, $0B, $0E, $1E, $0B, $1C, $13
end

 

The included demo game "raindrops" also includes code to detect if the QuadTari hardware is detected (either present in Stella, or on real hardware). If it is not detected, the background color is turned to red.

 

Let me know if you have any questions, or find any bugs in this code.

 

Version 3 2/13/2021:

 

bb-qt-stdkernel.zip

raindrops.bin

 

 

 

raindrops.bas_3.thumb.png.203d34dbfc5ebfa4aab56b1944f8902a.png

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

Raindrops game description:

 

You are a magical flying umbrella. Like all magical flying umbrellas, your goal is to avoid getting hit by raindrops, and capture purple things flying across the sky. If you get hit by a raindrop, you go back to your starting point. If you capture the purple thing, you gain a point. First player to 9 points wins the game.

  • Like 3

Share this post


Link to post
Share on other sites

Thank you for the example!

 

Really excited for the multi sprite kernel version.  I know there isn't much CPU time in that.. but, all my QuadTari game designs revolve around it :)

Share this post


Link to post
Share on other sites

@Gemintronic - your wish is my command.  ;-)

 

This is the version for the Multisprite kernel. It is used the same way as the standard kernel version, except that it will be the modified multisprite_kernel.asm that you place in your project directory.

 

The sample code shows an example of setting the active controllers using a single bit, and using another bit in the same variable for another purpose. This is also a demo of using the left side of the QuadTari, with a normal controller plugged into the right side for a 3-player game demo.

 

The sample code is a simple game called Space Debris. You are in a piloting competition in a hazardous sector. You are competing against 2 other pilots to see who can demonstrate the best piloting skills. Avoid the space debris and asteroids flying towards your ship. Each hit reduces your shield strength by one. The last pilot with remaining shields wins.

 

Version 3 (2/13/2021):

 

 

 

 

bb-qt-multisprite.zip

 

spacedebris.bin

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

I just compiled a 32k version of your multi sprite example and it works in Stella.  Haven't tried the real console yet because impatience :)

 

But, very promising!  Big thanks to Karl G and Gauauu!!

  • Like 1

Share this post


Link to post
Share on other sites

And last but not least - here is the version for the DPC+ kernel, plus yet another game demo with sample code. I realized that the other two samples did not use the fire button, so this one makes use of it.

 

Witch's Tower: Your tower is being attacked by multiple dragons! Dragons can only be defeated by the combined power of 4 witches controlling their wands remotely. To shoot a dragon, all 4 players must be aiming their wands the same direction AND all 4 players must be hitting the fire button.

 

Version 2:

bb-qt-DPCplus.zip

witchtower.bin

 

witchtower.bas_1.thumb.png.05a1f85aabe7c82a60d15b7a7d2fe2d4.png

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Sounds were missing from the last upload, so I uploaded a new version to the last post. I also did a minor update to the "raindrops" game since I originally posted it.

  • Like 1

Share this post


Link to post
Share on other sites

QUADTARI WORLD DEBUT!

 

ZeroPage Homebrew will be playing the three QuadTari demo games Raindrops, Space Debris and Witch's Tower that use Nathan Tolbert's brand new four joystick adapter, the QuadTari on tomorrow's (Fri Feb 12, 2021) stream LIVE on Twitch at 6PM PT | 9PM ET | 2AM GMT! Hope everyone can watch!

 

 

Games:

 

 (SET VIDEO TO 1080P60 FOR FULL QUALITY)

 

 

 

Edited by ZeroPage Homebrew
  • Like 3

Share this post


Link to post
Share on other sites

@ZeroPage Homebrew It's cool that you are including these on your show tomorrow. I hope that it's clear that these are quick and dirty proof-of-concept code, and not intended to be serious games. My family did seem to enjoy testing Raindrops, though. 🙂

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, Karl G said:

@ZeroPage Homebrew It's cool that you are including these on your show tomorrow. I hope that it's clear that these are quick and dirty proof-of-concept code, and not intended to be serious games. My family did seem to enjoy testing Raindrops, though. 🙂

Oh definitely, it's great that you've made these demos to show how people can start putting to use the QuadTari in batari Basic. I'm really looking forward to all the creative multiplayer games that will be coming out!

 

- James

Edited by ZeroPage Homebrew
  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, Karl G said:

@ZeroPage Homebrew It's cool that you are including these on your show tomorrow. I hope that it's clear that these are quick and dirty proof-of-concept code, and not intended to be serious games. My family did seem to enjoy testing Raindrops, though. 🙂

I'm looking forward to seeing them. My QuadTari is scheduled to arrive tomorrow. I won't have a chance to test it before the show. Too busy with work.

  • Like 1

Share this post


Link to post
Share on other sites

I have updated the Multisprite kernel demo to be 3 players instead of 4. This is so I have a demo where the QuadTari is only plugged into one controller port (left). A normal controller is plugged into the right controller port to make a 3-player game. It also gives each of the ships more room to maneuver.

 

@ZeroPage Homebrew - if it's not too late, the new version of Space Debris might be better for the show tonight.

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, Karl G said:

I have updated the Multisprite kernel demo to be 3 players instead of 4. This is so I have a demo where the QuadTari is only plugged into one controller port (left). A normal controller is plugged into the right controller port to make a 3-player game. It also gives each of the ships more room to maneuver.

 

@ZeroPage Homebrew - if it's not too late, the new version of Space Debris might be better for the show tonight.

Thanks for the heads up Karl! I'll download the new version for tonight. 🙂

 

- James

Share this post


Link to post
Share on other sites
14 minutes ago, Karl G said:

I have updated the Multisprite kernel demo to be 3 players instead of 4. This is so I have a demo where the QuadTari is only plugged into one controller port (left). A normal controller is plugged into the right controller port to make a 3-player game. It also gives each of the ships more room to maneuver.

 

@ZeroPage Homebrew - if it's not too late, the new version of Space Debris might be better for the show tonight.

I really need to your games. -Thanks.👍

Share this post


Link to post
Share on other sites

I've updated the Space Debris demo above based on issues identified in the ZPH stream:

 

  • 4th player score is no longer visible
  • Immortality bug has been fixed
  • Increased X-axis mobility for Tanya

spacedebris.bas_1.thumb.png.194c55e1ede6a5b57e68d4281299fbcb.png

  • Like 3

Share this post


Link to post
Share on other sites

I've updated Raindrops demo above to add the following:

 

  • Left difficulty A: faster drops
  • Right Difficulty A: more raindrops
  • Like 3

Share this post


Link to post
Share on other sites
8 hours ago, Karl G said:

I've updated the Space Debris demo above based on issues identified in the ZPH stream:

  • 4th player score is no longer visible
  • Immortality bug has been fixed
  • Increased X-axis mobility for Tanya

The extra room to move is great, Tanya says thank you! 🙂

 

- James

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...