Ruud, my apologies for missing this post for 8 months. Had not been reading in here and all.
My code is for an upcoming replacement board for the Bally Brain series. They made a series of home pinballs, their most famous being Fireball.
http://www.ipdb.org/showpic.pl?id=4116&picno=16561
http://mirror1.ipdb.org/images/4116/image-10.jpg
The CPU uses the Fairchild CPU. And that is the killer. If the chips go out, literally no one can repair them.
My design is based on Daryl's first SBC, but with some twists I needed. It is not compatible with his design. A POST LED for example.
The hardware requires a constant strobing of the matrix lines. It uses the same 8 matrix lines to run the dispaly, switch and light matrix. Less wiring but curiously strange. So one requirement, the matrix has to be kept going. The original design changed the matrix strobing speed to change the music pitch.
I run it at either 30 or 60 hz, I forget which right now. For some reason, I have lousy luck with interrupts so I am not using them, though the POST routine does test the interrupt from the 65C22. The basic loop is simple.
POST
init variables
LOOP
jsr hardware processing
jsr software processing
jmp LOOP
All forms of inputs and flags are read on the fly as the loop is constantly running. I use a small delay routine at the end of the software processing.
One thing nice about the 65xx series is the immediate memory access which the AVR is pretty painful about. Since I set up with 32k of ram (-256 bytes for i/o), I use software variables like they are going out of style. I expect to have about 2,000 variables when all is said and done.
This shindig has been going on about 4 years now, back into it once again. (still tweaking the score display message routine to be real easy to use.
If you want, hit me up with a private message and email and I can send you the code if you want. It has a ton of comments.
Again, apologies for not answering for so long. (lousy job I got out of, got busy, new job which is much better right now