Thursday, May 22, 2014

Lab 15. Space Invaders. (ii) A finer ADC

I've had to come back to lab 14 (measure of distance) and make sure everything was working correctly.
In fact my ADC was connected wrong (thx lab 14 for your great help!). So once I got the correct ADC I had to update a little bit of code in the game. Now I really have a smooth battleship movement, I'm happy with it.

I've also checked moving the refresh of the LCD in the main loop. Good news, it works. Bad news, it looks flickering, it looks better inside the systick, lets see as long as I keep developing.

As a side effect I implemented a first collision algorithm which needs further development.
As a side effect as well I've seen that the LEDs are not as flashy as they use to be.

Next step. Collisions upgrade.

And now ... the video :-)


Wednesday, May 14, 2014

Lab 15. Space Invaders. (i)

Hi!

I've just done a first crappy version of the game. Just to get to the contest. It is not the final version, it is a "version" but there's still a lot of work dealing with the deployment of the code to get to the contest. I'm sure it will not be in the finals but it will be in the contest :-) (or at least I hope).
Deadline is tomorrow may 15th and I've yet to fix the ADC + the main loop doing the refresh + collisions + smoothing the joystick, vamos, ni de coña, I get to deliver a finer version.

So here it is the release version, in fact a youtube video is one of the requirements so here it is.

Enjoy it!!!


Thursday, May 8, 2014

Lab 15. Space Invaders. Testing module IV (Sounds)

Hi!

I'm just done with my sound test function and guess what ... It works. I'm so happy.



In fact the important thing finally, apart from the DAC, it was "the delay" between the chain of sounds.

My hypothesis: (I've got not taken an scope and maybe my guess is wrong but it makes sense to me) the clock time of the processor is 80Mhz which is way faster to run all my tests (at 11Khz with about 1sec in total of real sound). If you don't put a delay you won't be able to hear anything.

I was having as well a wrong interrupt, another part of my problem.

Finally my working sound_test function looks like this (all the rest equal):

// Testing Tools
void Sound_Test (void)
{
// Predefined sounds
Sound_Killed();
Delay100ms(20);
Sound_Shoot();
Delay100ms(20);
Sound_Explosion();
...

Here you can find the most significant files for the test:



During the Delay100ms I've the time to go through all the sampled sound with no other interruptions apart the one I'm interested.

And that's it, thx again to all of you

Lab 15. Space Invaders. Testing module III (Fire buttons & Joystick)

Hi everyone!
I think I've got already all the pieces to go through the game engine more confident in my hardware.
In fact my very hard problem is that I do not understand one of the pieces of my DAC testing. Going through all the sounds I've just got the very last one, it looks like if my test function is faster than my timer2 handler. No big deal for the game but frustrating as a test sound function.

Anyways, the fire button and leds had not really being a challenge, but integrating my joystick (the ADC) looks like it will be (is it not linear anymore??? weird?!)

By the way, I'm already @ 30K ! I've just got 2K left for the GameEngine (I guess and hope that I've enough ... )

As usual I let you with a proof of concept of this latest test module.

Have a nice day!