Here is 0xDEADBEEF, the first game written for Dodo. The concept is that you are an alien trying to abduct cows. The alien's only downfall is that methane is quite toxic. Earn points by abducting cows while avoiding the farts.
I am getting decent performance out of Dodo. The game is running at 20 fps and Dodo is doing all of the pushing of sprites into video memory, and dumping video memory to the display. There is no dedicated graphics hardware. I tweaked the simulator to show me how many CPU cycles are taken per frame and I worked on bringing the number down. When I started it was averaging about 70,000 cycles and I brought it down to 40,000. It needs to be under 50,000 to hit the target 20fps. I have an interrupt firing every 50ms, and at the end of drawing each frame it waits for an interrupt. If the game code is slow and it misses an interrupt, it needs to wait for another one, so when the game was at 70k cycles that meant 10fps.
The game speed drops significantly while abducting and it is entirely due to the line drawing algorithm. I am leaving it the way it is for now because it is sort of a feature, time slows down while abducting. Note that even when the game slows, the music stays correct because it is all interrupt driven.
Here is the game running in my simulator:
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Thanks! The simulator wasn't too bad because the 6502 is probably the most emulated processor on the planet. I ported an existing one to start. I then added a simulated Rom and Ram that match dodo's address space and they are really nothing more than byte arrays. The display was the trickiest part.
Are you sure? yes | no
Right on, cool project, all-round :)
Are you sure? yes | no
Cool. I didn't quite get what all went into making the simulator, but it sounded like a lot of work. Good to see a side-by-side here. Both seem to work great. Funny game, too.
Are you sure? yes | no