12/06/2016 at 21:02 •
I started putting together the hardware for this project. As I will be on the road for most of December, I do not expect to create anything more fancy than the prototype circuit I have already built. After all I see this more as a software competition than a Hardware one. The prototying board I'm using is a "777" board from futurlec.
The circuit is centred around the Attiny 2313, with USB connector for Power, the ISP connector at the top, and a connector for the VGA / Kbd breakout module on the right side.
The VGA breakout board is from Parallax. It also contains PS-2 connector for keyboard and mouse, but I will not use them for this project.
The controller is a cheap one I got from eBay. I need to break it open and connect to the switches as I suspect that there is some kind of uController inside this one.
From the background in these pictures, you can see that christmas has already come to my house.
Update: After doing some research on the controller I found that it actually contains a 16 bit parallell load, serial out shift register, no code / firmware. The buttons are just making contact directly on the PCB surface, so it would not be straightforward to wire each switch to a digital input. I now plan on using the serial signal as input to the game rather than discrete switches, maybe using the USI peripheral in the attiny (like a SPI bus). If the code required for this is too much to fit, I will have to change plans to use discrete switches (left, right and fire) instead of the hand controller.
01/03/2017 at 23:26 •
As the deadline is fast approaching I seem to run from problem to problem on this project. Having made a brave leap from AVR studio to the GNU toolchain on OSX (because of computer problems that I already try to forget), I have been on a constant and steep learning curve this last week.
Things are finally starting to behave they way that was intended, but documentation and examples on these tools are scarce, so I have been practising a lot of trial and error along the way, and probably hit the bigger part of the "gotchas" that are out there. Just to show that this project is still alive I decided to post a screen-shot.
The VGA routine is up and running, as is the initialisation and house-keeping logic. I still need to add the the other VGA colours (solder the Red and Green signals to the VGA connector) and include the rest of the game logic. I ended up stripping it all down to individual components to make it easier to troubleshoot when things got really strange the other night.
Code and data is currently at 618 bytes, but some of that goes away when I´m done debugging. If all continues according to plan, I should be wrapping up this project with 5 minutes to spare before the deadline on Thursday.
01/05/2017 at 01:39 •
Starting to count the hours now, rather than the days. Got a few more pieces of the puzzle in place, and with a little luck I might actually see this project finished in time. Got to hook up and test the game controller logic tomorrow, then tweak the alien move pattern some more and finally test the missile firing and collision detection. If all goes well I might even be able to put back in the bunker damage / shielding function that I took out for size reasons. Compiled code and data is currently sitting at 824 bytes., which on the Attiny 2313 and its 16 bit opcodes actually is less than 400 instructions + some data.
Currently I'm rewriting the sound routine to use the 8 bit timer in CTC mode rather than the VGA interrupt routine I used initially.
01/06/2017 at 02:53 •
So I finally got a working game in 1024 bytes, and this will be my final entry into the competition.
The following features are somewhat working
- All functionality implemented in software on an Attiny 2313, only supported by passive components.
- VGA 640 by 480 display in RGB colours, actual resolution is a lot less, but video signals are in line with the VGA specifications.
- VGA colours and pixel offsets are updated on the fly line pr line while the video signal is generated. At 20MHz clock and cycles pr pixel.
- Control by a "Nintendo style" hand controller, left right and fire.
- All graphic objects are implemented as "tile objects" but the VGA driver implemented in assembly software handles pixel offsets to allow for smooth movement and accurate placement of the tiles
- Score updated when destroying aliens.
- Tiles are alternated between frames to mimic the original.
This is what happens when you do the system drawing on a cellphone without the proper software at 4 o'clock at night just before a deadline.
01/16/2017 at 15:22 •
Just a quick update now that the dust has settled after the judges results are out. I´m still working on this even if the hope of a nifty 3D Printer or any other price is now officially crushed. No hard feelings, there was some serious competition, and I´m sure the judges had a hard time comparing apples to oranges and still arriving at the final decision. I loved the competition, and send my thanks to HaD for putting this on, and regards to all fellow competitors.
In the coming weeks I will bring back the shoe-horn and polish to get the last functionality included as space is made available by furter refining the code. In hindsight I also need to spend some more time updating the documentation both for quantity and quality.
Stay tuned for more, and again congratulations to the winners.