First Handheld Electronic Game, the 1976 Mattel Electronics Auto Race.
I was playing around with this game and gave it to my kids to mess around with. They were mildly interested, but did not really get it. So much for the first entirely digital handheld electronic game. One had to shift into high gear while the car (represented by a LED light) was at the bottom of the track and steer clear of the on-coming cars (more LED lights). As the player's car makes its way up the track there is less time to react to on-coming cars. To compensate the player downshifts using the GEAR controls to slow the pace of cars. Once back at the bottom of the screen the driver can shift back into a higher gear. The lower the score the better, and the worst score is 99.
512 bytes of program storage (not 512K). The Auto Race was followed by the better-known Mattel Electronics Football.