Contra used a Sharp SM-511 MCU (game # BH002, die ID 773)
Patent - with ROM dump (note the actual game uses the SM-511, not SM-510)
ROM dump - From the patent.
Melody ROM dump - From the patent. The bits on the die are the same, except the 19 unused bytes at the end are $3F instead of $FF
raw ROM dump - visually dumped from decap
ROM dump - visual dump - only difference from patent is that every 64th byte is $80 instead of $00
The schematic in the patent doesn't quite match the PCB: the CPU is an SM511, not SM510, and only has one R output, and the buttons and LCD are connected differently.
K1 K2 K3 K4 S1 on -- -- -- S2 button 3 sound off fire S3 left up* down* right *up and down are not used, but PCB is wired for them
The LCD segments are numbered in the patent, but there are some issues: most of the items aren't independently numbered, the score digits and timer only have one number, the words "GAME OVER", "CONGRATULATIONS" and "BONUS STAGE" as well as the "death lines" around the player and a line at the far right are unnumbered.
Here's the segment diagram from the patent with numbers added to the items that appear multiple times with the same number.
Here are the LCD segment connections to the SM-511.
site with lots of info and pics
another site with pics and audio and video