Am9217/8316A ROM Reading

This ROM was discovered in the Chess Champion computer which another project to reverse engineer and fix, as this is a 2K rom I thought it would be interesting to dump the and examine the code.

ROM specifications

The Am9217/AM8316 devices are high performance, 16384-bit, static, mask programmed, read only memories. Each memory is implemented as 2048 words by 8 bits per word. This organization simplifies the design of small memory systems and permits incremental memory sizes as small as 2048 words. The fast access times provided allow the ROM to service high performance microcomputer applications without stalling the processor.

  • 2048 x 8 organization
  • Plug-in replacement for 8316A
  • Access times as fast as 450 ns
  • Fully capacitive inputs - simplified driving
  • 3 fully programmable Chip Selects - increased flexibility Logic voltage levels compatible with TTL
  • Three-state output buffers - simplified expansion
  • Drives two full TTL loads
  • Single supply voltage - +5.0V
  • Low power dissipation
  • N-channel silicon gate MOS technology
  • 100% MIL-STD-883 reliability assurance testing

Reading the ROM

To dump the ROM data it was required to build a ROM reader as my eeprom programmer did not recognise the device, instead used a Raspberry PICO micro controller and some Python code. The first issue is the voltage differences, the ROM requiring 5v and the Pico running at 3.3v, this was solved using 3 TXS0108E voltage shifters, 2 for the 11 address lines and 1 for data lines.

The second issue is the chip select lines, the AM8316A has 3 CS lines allowing the 8 ROM on the same address and data buses, this is configured at time of creation, not documented for this ROM, so was case of trial and error until data produce, with the following settings:

  • Pin 13 - high
  • Pin 14 - low
  • Pin 15 - low

Parts required

Wiring

PICO Wiring

  • GPIO lines 0 - 11: the address lines
  • GPIO lines 14 - 22: the data lines
  • GND: connects to the 3.3v and 5v grounds
  • Pin 36: supplies the 3.3 rail

TXS0108E Wiring

  • VA: 3.3v rail
  • A1 - A8: 3.3v signals from/to the PICO
  • OE: 3.3v high
  • VB: 5v rail
  • B1 - B8: 5v signals from/to ROM
  • GND: Any ground

AM8316A Wiring

  • Pin 12: GND
  • Pin 24: 5V
  • A1 - A11: 5v signals from the level shifter
  • D1 - D8: 5v signals to the level shifter
  • Pin 13 - high (CS)
  • Pin 14 - low (CS)
  • Pin 15 - low (CS)

Power

  • 3.3v: supplied by the PICO
  • 5v: supplied by a bench poer supply (or similar)

image alt text

Python code reading ROM

from machine import Pin
import time

# Data
data = []
for dn in range(0, 8):
    data.append(Pin(14 + dn, Pin.IN))

# Address lines
address = []
for an in range(0, 11):
    address.append(Pin(an, Pin.OUT))


file=open("rom_dump.bin","w")
for la in range(0,2048):
    
    for an in range(0, 11):
        if (la & pow(2, an) == pow(2, an)):
            address[an].high()
        else:   
            address[an].low()
    time.sleep_ms(10)
  
    dv = 0
    for dn in range(0, 8):
        if (data[dn].value() == 1):
            dv += pow(2,dn)
    
    file.write(dv.to_bytes(1, 'big'))

file.close()

print ('complete')

Example output

0x00 0x28 0x02 0x04 0x20 0x1a 0x5c 0x28 
0x01 0xbf 0x25 0x0e 0x91 0xf4 0x24 0xf8 
0x91 0xf0 0x84 0xee 0x63 0x6a 0x5c 0x20 
0x3e 0x62 0x68 0x5d 0x20 0xce 0x5c 0x28 
0x01 0xbf 0x25 0x02 0x91 0x68 0x52 0x2a 
0x18 0x00 0x20 0x78 0x56 0x20 0x80 0x17 
0x36 0x94 0xfd 0x2a 0x18 0x15 0x78 0x56 
0x70 0x17 0x17 0x17 0x17 0x17 0x17 0x17 
0x17 0x8d 0x8d 0x36 0x94 0xf3 0x42 0x25 
0x02 0x7f 0x84 0x32 0x2a 0x18 0x15 0x2c 
0x2a 0x01 0x8b 0x20 0x12 0x52 0x16 0x2c 
0x17 0x2c 0x32 0x94 0xfa 0x20 0xee 0x8e 
0x2c 0x20 0x3b 0x8e 0x20 0x12 0x52 0x2c 
0x16 0x2c 0x18 0x1f 0x17 0x20 0xfe 0x8e 
0x32 0x94 0xf5 0x2a 0x18 0x5e 0x20 0xef 
0x17 0x20 0xf8 0x17 0x70 0x63 0x6c 0x5c 
0x2a 0x18 0x78 0x20 0x14 0x52 0x70 0x6f 
0x5c 0x17 0x32 0x94 0xfd 0x28 0x02 0x04 
0x62 0x6e 0x71 0x5c 0x28 0x01 0xbf 0x25 
0x08 0x91 0x76 0x52 0x2a 0x01 0x9d 0x8e 

Full binary dump

Python Code Validation

The Following code is to check all the bits are set across all the bytes

byte_state = 0;

with open('chess_champion_rom_dump.bin','rb') as f:

    bytes_read = f.read()
    print("Bytes read: ", len(bytes_read) )

    for b in bytes_read:
        byte_state |= b
        if byte_state == 255:
            break
        
    print("Bits set:", byte_state)