Description
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 SERIAL_HOST_BASEPIN 16
#define USB_BASE_PIN (SERIAL_HOST_BASEPIN+0)
#define USB_ENABLE_PIN (SERIAL_HOST_BASEPIN+1)
#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!
Document Author
- Ken Gracey (from Rayman)
Source Code Author
- Rayman