All good on the DE2 now OzPropDev. Thanks Potatohead for the buttons. Not sure about what I was doing wrong on Friday other than pressing F10 not F11 in the new Pnut.
Most fun I've had on the DE2 yet!
Now what to do with the extra cogs? I wonder how hard it would be to get the cogs synced up so they each paint into a 1/9th of the screen (3x3 invaders, with just a static logo in the middle of the screen)?
When the real P2 arrives, it would be interesting to see how may separate Space Invaders could be run simultaneously. Just imagine the whole family all running their own space invaders
I'm just finishing off the latest instalment (Version 1.44) today.
I have a 8 screen version nearly completed as well.
I'm short of Cogs, Screens and HANDS to test it though!
Cheers
Brian
I've been working on version 1.45 the last couple of days and fixed a few things.
The DEMO mode had a bug or two which are now resolved.
The cannon and saucer had some video sync issues which are now fixed. (Well spotted Potatohead!)
I've added a launcher so multiple instances of the game can be started.
Each game requires a few configuration values to set controller IO pins and video buffer.
game1 long @video
long left_button
long right_button
long fire_button
game2 long @video2
long left_button2
long fire_button2
long right_button2
etc...
Here's where I had a bit of drama.
In this example I have 4 games setup.
At the end of the code you will see where I have allocated the video buffers.
'Video buffers
video long $11111111[(cols / 32) * rows]
video2 long $22222222[(cols / 32) * rows]
video3 long $33333333[(cols / 32) * rows]
video4 long $44444444[(cols / 32) * rows]
These buffers fall well short of the DE0 32k limit. The code fails in this configuration.
If I reduce the size of "video3" to 400 longs for example, game4 will operate fine.
Its seems if I cross the $6990 address space weird things happen.
I'm not sure if I fried my DE0 board or not.
Here's my BETA version 1.45 anyway.
Can someone with a DE0 board try it?
Hmmm....
Brian
Update: 5thSeptember 2013 - Problem solved (Brian fade the cause!)
Really nice work ... but you may need to wait for test chips to try more than one display - my understanding is that the DACS needed for video are only implemented for one cog even on the DE2-115
- my understanding is that the DACS needed for video are only implemented for one cog even on the DE2-115
Bill
That's right. My new code is setup for the real chips but runs a single instance on the FPGA boards.
Hopefully we will see some chips soon...
Cheers
Brian
This has assorted tweaks and fixes.
It now includes a multiple game launcher (4 game example).
For each instance of the game a separate controller and screen will be required.
Each game requires a few values to define video buffer, i/o settings.
We'll have to wait for the real chips to test it in this format.
In theory, 8 cogs = 8 games!
It still runs both FPGA boards though.
Enjoy!
This has assorted tweaks and fixes.
It now includes a multiple game launcher (4 game example).
For each instance of the game a separate controller and screen will be required.
Each game requires a few values to define video buffer, i/o settings.
We'll have to wait for the real chips to test it in this format.
In theory, 8 cogs = 8 games!
It still runs both FPGA boards though.
Enjoy!
After your bio...include the human story of how you came to write: reps #16,@:loop ?
rio__
I couldn't remember where I first saw the use of @ in REPS.
I think Ariba was right , it probably was in Chip's PASM code.
It all seems a blur at the moment.
Cheers
Brian
I'm dying for the real chip so I can start some demo scene coding with Graphics and Sound.
I've only been waiting since the first announcement of the PropII a few years back. : ]
Hi Guys
Here I go again with a another version of Invaders. I'm emulating iTunes with a new version every week!
Version 1.50 now has 800x600 VGA instead of 640x480. I cleaned things up a bit as well.
It now supports real sound effects as well . Audio is streamed at 10kHz into a 4 bit R2R ladder network.
Four colour schemes are selectable from the diagnostic monitor. (see Readme file)
...though I haven't figured out how to launch multiple games just yet.
Hi Lachlan
Good to hear it runs Ok on DE2 board.
Have you tried capturing images with your video gadget?
Did you try the sound feature?
The code is ready to go for multiple games, but we all are short of DAC's....we wait....
Yes, I had some initial trouble with the sound but it seems my tv monitor is in "mute" mode and the remote control is temporarily lost. I hooked up the scope to verify and then some headphones, 47 ohm and 82 ohm resistors for the R2R, and a big series cap to AC couple. Certainly adds to the whole "invader experience".
I've had a quick look at your code for the first time. At first glance it appears everything runs through a (256*150=4.8k) mono bitmap for each cog, is that right? Or are you doing some overlay work locally
The DE2 allows 5 cogs and I was thinking it may be possible to start games in cogs 1..4 based on what you already have (they won't be able to directly drive the DACs but that's ok because...) Then we create a new cog0 that just renders those 4 video buffers quadrant style to the VGA monitor. So for the top scanlines we pick the appropriate fore and background colours then dump out buffers "Video" then "Video2", and halfway down the screen we cut over to Video3 and Video4 for the lower half. I haven't studied your code in great detail yet, but does that have a chance of working? We could use your new background colour feature to give each quadrant some "personality"
For the i/o I think we have P0..28 free, so 7 i/o per game. How about we split that so
cog 1 has 3 buttons, 2 monitor (tx/rx), 4 audio into the "left" channel of the stereo
cog 2 has 3 buttons, 2 monitor (tx/rx), 4 audio into the "right' channel of the stereo
cog 3 has 3 buttons, 2 monitor (tx/rx) only, no audio
cog 4 has 3 buttons, 2 monitor (tx/rx) only, no audio
cog 0 has control of the DACs
Let me know your thoughts. I don't have a whole lot of time but I do have a DE2 and not doing this feels like a bit of a crime
I haven't tried the VGA to Ethernet converter box just yet but will do so
With a bit of work I could do the following arrangement.
COG0 - VGA driver/Diagnostic monitor
COG1-4 4 x game engines/sound
This would also allow me to free up threads for multi channel sound and complete effects!
The DE2 opens up a whole new world to me(128k RAM for starters).
It's all possible.
The only problem I have is its a little difficult to test/develop on my DE0 board.
Got me thinking though....
I see a few more late nights ahead....
Cheers
Brian
Update: Re-mapped video for 6 x split display test.
Each instance now has it's own window
DE2-115 will support 4 x instances
Comments
Most fun I've had on the DE2 yet!
Now what to do with the extra cogs? I wonder how hard it would be to get the cogs synced up so they each paint into a 1/9th of the screen (3x3 invaders, with just a static logo in the middle of the screen)?
I have a 8 screen version nearly completed as well.
I'm short of Cogs, Screens and HANDS to test it though!
Cheers
Brian
Well, a 5 screen version can be tested on the FPGA... If we get it onto TV, I can test three... :
I've been working on version 1.45 the last couple of days and fixed a few things.
The DEMO mode had a bug or two which are now resolved.
The cannon and saucer had some video sync issues which are now fixed. (Well spotted Potatohead!)
I've added a launcher so multiple instances of the game can be started.
Each game requires a few configuration values to set controller IO pins and video buffer.
Here's where I had a bit of drama.
In this example I have 4 games setup.
At the end of the code you will see where I have allocated the video buffers.
These buffers fall well short of the DE0 32k limit. The code fails in this configuration.
If I reduce the size of "video3" to 400 longs for example, game4 will operate fine.
Its seems if I cross the $6990 address space weird things happen.
I'm not sure if I fried my DE0 board or not.
Here's my BETA version 1.45 anyway.
Can someone with a DE0 board try it?
Hmmm....
Brian
Update: 5thSeptember 2013 - Problem solved (Brian fade the cause!)
I will try and get a better one later.
Cheers
Brian
Really nice work ... but you may need to wait for test chips to try more than one display - my understanding is that the DACS needed for video are only implemented for one cog even on the DE2-115
Bill
That's right. My new code is setup for the real chips but runs a single instance on the FPGA boards.
Hopefully we will see some chips soon...
Cheers
Brian
I just updated to Version 1.46 (See first post)
This has assorted tweaks and fixes.
It now includes a multiple game launcher (4 game example).
For each instance of the game a separate controller and screen will be required.
Each game requires a few values to define video buffer, i/o settings.
We'll have to wait for the real chips to test it in this format.
In theory, 8 cogs = 8 games!
It still runs both FPGA boards though.
Enjoy!
Cheers
Brian
You can repost Your's video in first post so people without FPGA find it directly to se Your's work.
NICE one
After your bio...include the human story of how you came to write: reps #16,@:loop ?
rio__
I couldn't remember where I first saw the use of @ in REPS.
I think Ariba was right , it probably was in Chip's PASM code.
It all seems a blur at the moment.
Cheers
Brian
I'm just testing the latest version of Invaders which now has a 10kHz audio streamer for real sound effects!
It works great!
It's official, my little DE0 board is maxed out now.
Stay tuned....
I've been playing around with some VGA and TV over IP converters.
Here's your invaders working nicely. I don't have one that does sound, unfortunately.
I need to order some arcade buttons for the 4 cog version
Very cool, a nice little gadget!
The new version of Invaders will also have 800x600 instead of 640x480.
It looks a lot nicer.
Cheers
Brian
I can imagine some of the really cool demos people could make with a 160Mhz 8 cog chip.
I've only been waiting since the first announcement of the PropII a few years back. : ]
Here I go again with a another version of Invaders. I'm emulating iTunes with a new version every week!
Version 1.50 now has 800x600 VGA instead of 640x480. I cleaned things up a bit as well.
It now supports real sound effects as well . Audio is streamed at 10kHz into a 4 bit R2R ladder network.
Four colour schemes are selectable from the diagnostic monitor. (see Readme file)
Enjoy!
Cheers
Brian
Audio is a brilliant touch. Audio, VGA, monitor, gameplay all in a single cog, with 7 spare. What a remarkable achievement!
Next week I'll order some sets of arcade buttons, then we can get serious
regards
Lachlan
Hi Lachlan
Good to hear it runs Ok on DE2 board.
Have you tried capturing images with your video gadget?
Did you try the sound feature?
The code is ready to go for multiple games, but we all are short of DAC's....we wait....
Cheers
Brian
I've had a quick look at your code for the first time. At first glance it appears everything runs through a (256*150=4.8k) mono bitmap for each cog, is that right? Or are you doing some overlay work locally
The DE2 allows 5 cogs and I was thinking it may be possible to start games in cogs 1..4 based on what you already have (they won't be able to directly drive the DACs but that's ok because...) Then we create a new cog0 that just renders those 4 video buffers quadrant style to the VGA monitor. So for the top scanlines we pick the appropriate fore and background colours then dump out buffers "Video" then "Video2", and halfway down the screen we cut over to Video3 and Video4 for the lower half. I haven't studied your code in great detail yet, but does that have a chance of working? We could use your new background colour feature to give each quadrant some "personality"
For the i/o I think we have P0..28 free, so 7 i/o per game. How about we split that so
cog 1 has 3 buttons, 2 monitor (tx/rx), 4 audio into the "left" channel of the stereo
cog 2 has 3 buttons, 2 monitor (tx/rx), 4 audio into the "right' channel of the stereo
cog 3 has 3 buttons, 2 monitor (tx/rx) only, no audio
cog 4 has 3 buttons, 2 monitor (tx/rx) only, no audio
cog 0 has control of the DACs
Let me know your thoughts. I don't have a whole lot of time but I do have a DE2 and not doing this feels like a bit of a crime
I haven't tried the VGA to Ethernet converter box just yet but will do so
cheers
Lachlan
Interesting idea...
With a bit of work I could do the following arrangement.
COG0 - VGA driver/Diagnostic monitor
COG1-4 4 x game engines/sound
This would also allow me to free up threads for multi channel sound and complete effects!
The DE2 opens up a whole new world to me(128k RAM for starters).
It's all possible.
The only problem I have is its a little difficult to test/develop on my DE0 board.
Got me thinking though....
I see a few more late nights ahead....
Cheers
Brian
Update: Re-mapped video for 6 x split display test.
Each instance now has it's own window
DE2-115 will support 4 x instances
Stay tuned....
In Your code You used instruction
testb - Can You point me to place this instruction is described