Gameduino on Pipistrello


mkarlsson

Recommended Posts

Just like Jack I have been playing with Gameduino, a really cool project by James Bowman.

Originally it was a add-on shield for an Arduino board that implemented a sprite engine and much more, while the Arduino board did all the computing and sending commands to the Gameduino shield via a SPI interface.

For more info see this link to the Gameduino page: http://excamera.com/sphinx/gameduino/ with cool pictures and a complete description of the system

To port this to Pipistrello I expanded the code by adding two more blocks so it's basically now made up of three blocks:
* Original Gameduino block (no functional changes, just some code cleanup)
* VGA-to-DVI converter to send out the display via HDMI to a DVI monitor instead of VGA
* Microblaze_mcs system running at 100 MHz with added hardware I/O modules (SPI, timer, DIO, UARTs etc.)

The Microblaze_mcs I/O system is designed to simplify the porting of the core Arduino code to this new platform.

The result is a completely self-contained system that can run most of the example sketches for Gameduino without any extra hardware, using the familiar Arduino GUI.

Links to a few bit files to show off what it can do (just download the bit file to the fpga, i.e. fpgaprog -v -f <bitfile.bit>)

256 sprites: http://www.saanlima.com/download/pipistrello-v2.0/sprites256.bit
collision: http://www.saanlima.com/download/pipistrello-v2.0/collision.bit
asteroids game: http://www.saanlima.com/download/pipistrello-v2.0/asteroids.bit (pins A3 - A6 controls the game)

Link to my version of the Arduino GUI (windows) with Microblaze support that can be used to compile and download the demo sketches (included as examples)
http://www.saanlima.com/download/pipistrello-v2.0/arduino-1.5.2-gameduino.zip

Instructions:
* Download the Arduino zip file (it's about 160 MB) to your computer (sorry, windows-only at the moment)
* Unzip to any directory
* Go to this directory and launch the Arduino GUI by clicking on the Arduino icon
* In Tools -> Board select "Microblaze_mcs with Gameduino"
* Connect the Pipistrello board to the computer, a DVI monitor and optionally a sound system
* Load one of the Gameduino examples by going to File -> Examples -> Gameduino
* Click on the Upload button. The sketch will be compiled, then merged with the base bit file and then downloaded to the Pipistrello board

Enjoy!

Magnus

Link to comment
Share on other sites

  • 2 years later...

Hi Magnus.

I recently purchased a pipistrello board from your shop and I am very happy with it.

My goal is to use it at a core brain for my pinball project (to drive the LCD virtual DMD / play sounds and manage I/O's) not sure if I'll be able to to all but we will see.

I played around with the DVI_SERDES example and I managed to tweak it to generate a 1280x390 DVI signal

My screen (LTA149B780F) has a custom ratio that is quite close to the ratio of a real DMD(128x32) (see attachment). I managed to render a 128x39 matrix (8x8 pixels)

FB_IMG_1491062213872.jpg

BTW I had to swap the Red and Green pairs (U7/V7 and U8/V8) to get the right colors with my screens (probably a problem with my lcd driver board).

 

I am now trying to read data from the SDCARD via SPI (Images at first) and although I am a software engineer. it is a bit low level for my taste (I have done some Assembler very long time ago).

So I am looking at this Gameduino port you did and it look very interesting I tried it  with another screeen with a regular 16:9 ratio but I have a weird behavior with all the examples (see second screenshot)

IMG_20170401_174349.jpg

Any idea where what would cause this ?

Sadely the project is written in Verilog and I haven't a single clue where to find the generation of the signal (hsync/vsync/RGB) if you could point me in the right direction it would be much appreciated.

Meanwhile I'll keep digging.

Have a great day.

Edit: I found where the signal is generated and I am now trying to understand how to set the FrontPorch/BackPorch/Sync

 

 

Edited by maddog_fr
Situation changed
Link to comment
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.