The Video System testing is now complete, and everything works perfectly.
For this test, I worked out all of the Video, Sprite and Playfield functions. These commands will be common to all processors and micro-controllers, making up what I call the Kernal routines. All routines will be optimized assembly for their platform, callable from the C main loop. Here are the AVR calls...
Code:
extern int GPU_Startup();
extern int ReadJoystick(uint8_t);
extern int SetMemory(uint8_t);
extern int DrawVideo(uint16_t,uint16_t,uint8_t);
extern int ReadVideo(uint16_t,uint16_t);
extern int SwapVideo();
extern int RunSprite(uint16_t,uint16_t,uint16_t,uint16_t,uint32_t);
extern int ReadSprite(uint32_t);
extern int DrawSprite(uint16_t,uint16_t,uint8_t);
extern int SetAlpha(uint8_t);
extern int RunPlayfield(uint16_t,uint16_t,uint16_t,uint16_t);
extern int SetPlayfield(uint8_t);
extern int ReadPlayfield(uint16_t,uint16_t);
extern int DrawPlayfield(uint16_t,uint16_t,uint8_t);
This may not look like a lot of commands, but they offer a LOT of power for a minimum of overhead.
This command will use about 60 processor cycles, but can move a 400x300 image around the screen easily.
Code:
RunSprite(Ball_X,Ball_Y,Width,Height,8Ball[Rot]);
100 large sprites flying around (including alpha pixels) is no problem for the Vulcan hardware.
For this test, I decided to use floats for all variables, just to see if there would be any slowdown!
I gave myself 2 hours max to do this one, and that time included making the wall and 8-ball graphics in photoshop...
Here is a quick video...
https://youtu.be/HqSYwKYwtOo60 frames per seconds was no problem at all, even dropping the AVR clock to 2MHz!
To make this code even more "inefficient", the collision between the ball and ledge is Raytracing in floats!!!
The background image is 1024x1024, and the sprite is 128x128 in size. No more balls next time... promise!
It's too bad that filming the screen looks so choppy and washed out, the real deal is so smooth and bright!
Pure floats, and raytraced collision detection!
I am now moving on to the Sound Generator Hardware.
Time will be in short supply for a while, but I will poke at it when I can and post the progress.
Cheers!
Radical Brad