Loading 3D model… large boards can take a moment.
A minimal game console based on the z80 CPU. Something like a console from the 70s/80s such as the original PAC-MAN arcade, but without video/sound chips which are hard to find.
This repo contains:
Board:
Emulator:
Specs:
Working games:
Possible future games:
I can use RAM/ROM at full speed without caring about read times:
I can read the LCD without caring about read times. But LCD instructions are slow, I always have to poll if it is ready before using it:
LCD speed:
I don't have a timer chip like the z80 CTC. So I can count in software the amount of NMI, comes from a 555 timer. The interrupt happens at falling edge so there is no problem on leaving the NMI pin low for a long time.
The counter will be 8 bit. The value 255 could be equivalent to approx 2s so in that case I should call NMI at approx 128Hz. I do this with a 555 which apparently can reach until 100kHz.
Game start:
Game loop, in order:
Ball: Clear old position of ball and move ball coordinate
Bricks: If collision with ball, redraw if modified or draw zeros to clean area.
Powerups: If collision with pad, draw zeros to clean area and give powerup.
Powerups: Draw the 8x3 graphic with OR. Should draw even if not descending because if the ball comes and it is stationary then there will be conflicts, but very unlikely and avoidable if both ball and powerup move together
Pad: Draw with OR with shifting/rotation.
Ball: Draw with OR with shifting/rotation.
Powerups:
Bigger pad
Smaller pad
Faster ball
Slower ball
Extra ball
Move all bricks downwards
Extra life
Will have a DUL (Drawing Update List) containing coordinates and the byte of graphics that will be drawn. Some kind of compressed framebuffer. This is used so I can overlap graphics with AND operations in RAM before writing to the LCD.
Game start:
Drawing/updating, in order:
Bricks: If collision with ball, redraw if modified or draw zeros to clean area.
Powerups: If collision with pad, draw zeros to clean area and give powerup.
Powerups: Draw in the DUL the 8x4 graphic. The graphic is actually 8x3 but the top line is empty so it will erase the old frame. Draw even if not descending because if the ball comes and it is stationary then there will be conflicts
Pad: Draw in the DUL using shifting/rotation.
Ball: Draw in the DUL using shifting/rotation.
Old ideas:
Powerups: Collision detection with ball and pad, redraw to clean area in that case. If moving downward in this frame, draw full 8x4 object. The graphic is actually 8x3 but the top line is empty so it will erase the previous. Will be destroyed as soon as it touches the ball or the pad, so no problems in drawing order.
Pad: Draw using shifting/rotation. Draw each time it moves. Draw it in a framebuffer that only covers the last
Ball: Draw using shifting/rotation. Draw each time it moves, do it last
Ground plane in the back layer?
Check datasheet for recommendations of decoupling capacitors
Check "return paths" for high speed signals
Route more important signals first so I minimize the length, vias, etc.
Add test points, with ground clips
Add mounting holes in corners first
I can add jumper resistors
I can make the SRAM with wide holes too
Vertial traces in one side and horizontal traces on the other, that way the ground plane is mostly intact
No 90deg angles, https://www.alternatezone.com/electronics/files/PCBDesignTutorialRevA.pdf
"I rarely go smaller than 10 mil for any trace unless I have to, and for power I try to use at least 30 mil" As a start, you may like to use say 25 thou for signal tracks, 50 thou for power and ground tracks, and 10-15 thou for going between IC and component pads
Pads 2x the diameter og the hole. There are some common practices used when it comes to generic component pads. Pads for leaded components like resistors, capacitors and diodes should be round, with around 70 thou diameter being common. Dual In Line (DIL) components like IC’s are better suited with oval shaped pads (60 thou high by 90-100 thou wide is common). Pin 1 of the chip sould always be a different pad shape, usually rectangular, and with the same dimensions as the other pins.p
At least 15 thou is a good clearance limit for basic through hole designs
Ensure that no part of the silkscreen overlaps a bare pad.
As a general rule, you should use at least one bypass capacitor per IC or other switching component if possible. Common values of bypass capacitors are 100nF for general purpose use, 10nF or 1nF for higher frequencies, and 1uF or 10uF for low frequencies.
Put name and description in silkscreen
Check that solder points have thermal relief pads
No comments yet. Be the first to ask about this board.