Share on facebook
Share on twitter
Share on linkedin
Share on email
Share on print
Table of Contents

Tetris was contributed by forum member Rayman, and incorporates the Ahle2 simpleSound engine. This code was written in C with FlexProp, and incorporates the use of Spin2 files for video, mouse and keyboard. 

The hardware is a Propeller 2 board with the P2 Eval A/V Breakout Add-on Board for audio and VGA. In this configuration, you play through the FlexProp terminal with your computer’s WASD keys. You may also use a USB keyboard and mouse connected to the P2 Eval Serial Host Add-on Board. 

Open the Platform.h file from FlexProp to configure your own I/O pins:

'//Note:  You must currently edit vga driver to set the base pin
#define AV_BasePin 0  //Base pin for A/V expansion board connected to Eval Board
#define AV_LeftPin (AV_BasePin+6)
#define AV_RightPin (AV_BasePin+7)

//USB pin definitions Parallax USB adapter board for P2 Eval Board
#define USB_DM_PIN (SERIAL_HOST_BASEPIN+6)  //USB is on +6 and +7 for lower port, +2 and +3 for upper port
#define USB_ERR_LED_PIN 57       //Using P2 Eval board's P57 led for error display
#endif // Board_Eval

Thank you to Rayman for this entertaining contribution to P2 Quick Bytes! 

Source Code
Programming Language
Tools and Operating System
Document Author
Source Code Author
Table of Contents
0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments