Third entry.. most code moved to thread commands..

Greetings..
Well, this is my third entry to the blog. The work of 3 days ago had a lot of the code running the game rules in C code.. as it is written, it can run both threads and C code at the same time. But the big idea is that there is no game specific C code at all! I have most of the code moved over to the threads method, which involved adding new commands as they were needed. Most of the new commands deal with moving data into and out of an 'accumulator' and decisions such as equal to zero, greater than or equal to, and so forth. I hope to have the game back into 'primitive play' mode in another day.

And a problem arises.. the non-volatile variables are stored as a block which is shuttled into the processor's own flash memory when a change is sensed. So for instance, when you coin up, and the credits change, the code wants to store away the non-volatiles. Since it takes about 50mS to do so, and the processor halts briefly, the multiplexing displays blink! It is not a crisis, but noticeable. And I suspect that there will be a crowd out there that will stand up and shout foul.. "it is not the same as the original!". So I am considering adding a small external flash chip that will hold the non-volatiles, instead of keeping it in the processor.

Once the basic operations are all in threads, and the game is playable again, the next step is to add to the threads the details of flashing and sounds. Right now, when I hit target 1, it just lights. The proper way is to blink it three times, throw a sound code out, and then after a delay, go back to background. (or something to that effect). If I represent these accurately, nobody will be able to tell the difference between the original and the new version!

Onward to the next phase.
Chris~

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this entry.
Comments
  • No comments exist for this entry.
Leave a comment

Submitted comments will be subject to moderation before being displayed.

 Enter the above security code (required)

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.