Go Down

Topic: Classic 70's TV game reproduced on the Arduino/AMTEGA328 (Read 18840 times) previous topic - next topic


@Dirt Biker:

Did you make the changes as a conditional compile;  Or, just an edit?  If just a few lines, be nice to see the diff.



Aug 20, 2013, 02:34 am Last Edit: Aug 20, 2013, 02:40 am by DirtBiker Reason: 1
Just edited the values.  Did not even rename the defines.

Here they are:
Code: [Select]

const char FIELD_HEIGHT=100;          //Was 115
const char SOCCER_EDGE_HEIGHT=20;     //Was 25

Code: [Select]

beginVideo(80,100);          //Was (80,116)

Code: [Select]

#define _TIME_VERT_SYNC 60         //Was 58.85

Code: [Select]

#define _PAL_TIME_SCANLINE         63.625     //Was 64
#define _PAL_TIME_OUTPUT_START 11         //Was 12.5
#define _PALLine_FRAME 282        //Was 312
#define _PALLine_START_VSYNC 0          //NC
#define _PALLine_STOP_VSYNC 3          //NC
#define _PALLine_DISPLAY 220        //Was 260


Thanks for your comments on this - most appreciated - glad the page has been of use.
I'll take the values for NTSC and put them in the code. I intend to utilise a spare pin to say if the chip is to be in NTSC or PAL mode, as is done for the chip type. That way, only one code is needed for all.

I'm aiming for accuracy as much as possible, and I have been able to do side-by-side comparisons with the original chips (uncluding the annoying beeps ;) ). Currently I only have PAL versions of the chip, but I intend to get an NTSC version from eBay so that I can check that the field height, goal sizes etc. for it is exact.

DirtBike - OT stuff... yes, please feel free to send me any enhancements :) Not sure if yo have seen it, but I have recently put online a much simpler 6502 design (because it didn't need to fit in with the original UK101 memory map)
It also runs OSI/UK101 BASIC. I do like ehBASIC (have used it previously) and that is easily ported as well.

Best regards.



Aug 21, 2013, 04:56 pm Last Edit: Aug 21, 2013, 04:59 pm by DirtBiker Reason: 1

Using a free pin for NTSC would be a great idea.  My values were an educated guess on what would work.  I'm sure they'll have to be tweaked for authenticity.

OT from here -:

Yes, I saw your new minimal 6502.  Not bad at all.  If you use a 1.8432mHz oscillator (and not call it an IC) and use a 65C51 ACIA I think you could get it down to 5 chips (or 4 with the USB cable).

I'm really keen on that CP/M machine though.  If I get some spare time I'll build one of those.

I've attached a .png of my decode circuit for the UK101.

PS:  The guy's name in the file is not me, just the guy who did up the schematic from my hand scrawl.


Thanks all for the feedback here. I've ordered an NTSC version of the original chip from the US, so as soon as I get it I'll hook it up (assuming it works!) and set up mine to have the NTSC option pin so that it can switch between PAL (AY-3-8500) and NTSC (AY-3-8500-1) modes.

Probably take a week or so to get here (UK), but will update you (and the web page) once done.

Have fun.



I've modified the code and schematic to check for the value on pin 6 (PD4) of the ATMEGA328 (ie. ARDUINO DIGITAL PIN 4) at startup.
If it is low then the chip now displays using NTSC timing. Leave disconnected for PAL.

Currently, it uses information that I took from the datasheets. I am waiting for an AY-3-8500-1 NTSC version of the original chip to arrive. When I get it, I will tweak values if necessary.

Latest code and schematics online.

Any probs or queries, please feel free to contact me.



Sorry it's taken me so long to get back to you Grant.  Life got busy.

I tried your new code and it works great!

I was talking to a friend of mind that owns a small business making stuff for Arduinos.  He thought he might like to make a shield that accommodates this game.  Would you have an issue with this?

My next step in this is to build mine into a glass-top table and re-arrange the graphics slightly to make a '70s era bar video game.  Should be a great way to quaff a few pints of Guinness.  I know I spent a lot of time, money and my liver playing those bar games circa 1974 when I bought my Yamaha RD350.

Those were the days... bikes, bars and broa..err, ladies!.


Sep 01, 2013, 12:49 am Last Edit: Sep 01, 2013, 01:19 am by zx80nut Reason: 1
Hi DirtBiker.

Glad it's working for you.
Yeah, your friend is free to make a shield or whatever - glad it's of use. Obviously, no charging for my code, and a link to my original page please :)

I received the NTSC (AY-3-8500-1) version of the chip yesterday. I've been so busy at the moment that I haven't tried it yet, so hopefully in a few days power it up and I'll super-impose the original and my versions to see if any values need tweaking. I'll update when ready.

On free web hosting, so unfortunately sometimes the server is unavailable. If there is a problem loading any of my pages then please try again in a while/next day.

All the best.



The original NTSC version of the chip (AY-3-8500-1) arrived safely from the US. I connected it up and it works, so I was able to to an accurate side-by-side comparison between my implementation and the oritinal NTSC chip. I have now updated the code so that it accurately implements the NTSC version as well as the PAL versions.

Differences between the NTSC and PAL versions...
1. The scores on the NTSC version occupy 20 scanlines (4 lines per block) but the PAL version occupies 30 scanlines (6 lines per block) - as on the datasheets. The NTSC numbers are noticeably shorter.
2. The vertical net/centre line on the NTSC version is SOLID but the PAL version is DOTTED (as can be seen on the pictures below).
3. The NTSC picture has fewer scanlines, so a lower vertical resolution. This results in the ball appearing to travel at slightly steeper angles on the NTSC version because each step therefore has a larger Y displacement. Additionally, this lower resolution makes the bats appear longer.

Here are actual screenshots of the PAL (left) and NTSC (right) versions as created with my code (these match the actual original chips)...

Updated code and descriptions on my web page here...

Any queries, as always, feel free to ask.




Server issues...

There are problems with the server that holds my primary web pages.

Temporarily, I have also put the same pages on the following domain...



Please use the original URLs (searle.hostei.com) where possible, but use the ones above if the primary URLs are temporarily down.



Go Up