Lanier Diaries, Part XIV

Big update. Little picture.

Arduino set up to dump PROM

Set up my Arduino to dump the boot PROM of the Lanier.

Wrote a cheap-n-cheerful program to extract it:

#include

// Ugly 512-byte PROM dump for TBP1842 512 x 8 Prom.

void setup() {
pinMode(2,OUTPUT); // A0 - chip 1
pinMode(3,OUTPUT); // A1 - chip 2
pinMode(4,OUTPUT); // A2 - chip 3
pinMode(5,OUTPUT); // A3 - chip 4
pinMode(6,OUTPUT); // A4 - chip 5
pinMode(7,OUTPUT); // A5 - chip 16
pinMode(8,OUTPUT); // A6 - chip 17
pinMode(9,OUTPUT); // A7 - chip 18
pinMode(10,OUTPUT); // A8 - chip 19
pinMode(11,INPUT); // D0 - chip 6
pinMode(12,INPUT); // D1 - chip 7
pinMode(13,OUTPUT); // #CS - chip 15 (Drives an LED n the Arduino also)
pinMode(A0,INPUT); // D2 - chip 8
pinMode(A1,INPUT); // D3 - chip 9
pinMode(A2,INPUT); // D4 - chip 11
pinMode(A3,INPUT); // D5 - chip 12
pinMode(A4,INPUT); // D6 - chip 13
pinMode(A5,INPUT); // D7 - chip 14
digitalWrite(2,LOW); // Set the Arduino without pull-up (LOW)
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,HIGH); // Start out with #CS disabled (HIGH).
digitalWrite(A0,LOW);
digitalWrite(A1,LOW);
digitalWrite(A2,LOW);
digitalWrite(A3,LOW);
digitalWrite(A4,LOW);
digitalWrite(A5,LOW);

Serial.begin(115200); // Serial port output speed to PC
}

void loop() {
uint32_t addr = 0; // Initialize address at 000000000.
delay(1000); // Wait 1000 millisecond for everything to stabilize
Serial.println(""); // Print a carriage return to screen
while (addr < 512) { // Maximum address set (512 byte max) digitalWrite(10,bitRead(addr,8)); // Set A8 digitalWrite(9,bitRead(addr,7)); // Set A7 digitalWrite(8,bitRead(addr,6)); // Set A6 digitalWrite(7,bitRead(addr,5)); // Set A5 digitalWrite(6,bitRead(addr,4)); // Set A4 digitalWrite(5,bitRead(addr,3)); // Set A3 digitalWrite(4,bitRead(addr,2)); // Set A2 digitalWrite(3,bitRead(addr,1)); // Set A1 digitalWrite(2,bitRead(addr,0)); // Set A0 Serial.print(digitalRead(10)); // Print A8 to screen Serial.print(digitalRead(9)); // Print A7 to screen Serial.print(digitalRead(8)); // Print A6 to screen Serial.print(digitalRead(7)); // Print A5 to screen Serial.print(digitalRead(6)); // Print A4 to screen Serial.print(digitalRead(5)); // Print A3 to screen Serial.print(digitalRead(4)); // Print A2 to screen Serial.print(digitalRead(3)); // Print A1 to screen Serial.print(digitalRead(2)); // Print A0 to screen Serial.print(" "); // Print a space digitalWrite(13,LOW); // Enable chip select delay(100); // Wait 100 ms for the line to settle Serial.print(digitalRead(A5)); // Read state of D7 and print to screen Serial.print(digitalRead(A4)); // Read state of D6 and print to screen Serial.print(digitalRead(A3)); // Read state of D5 and print to screen Serial.print(digitalRead(A2)); // Read state of D4 and print to screen Serial.print(digitalRead(A1)); // Read state of D3 and print to screen Serial.print(digitalRead(A0)); // Read state of D2 and print to screen Serial.print(digitalRead(12)); // Read state of D1 and print to screen Serial.print(digitalRead(11)); // Read state of D0 and print to screen Serial.println(""); // Print carriage return to screen digitalWrite(13,HIGH); // Disable chip select addr++; // Move on to next address } // Loop to beginning of "while" statement digitalWrite(13,HIGH); // Once the while loop has finished, disable chip select while (1) { // Infinite loop (halt) } }

Which resulted in the following output:
Lanier PROM boot code

Which is good, as it begins with a few sane instructions. I have another set of eyeballs on it right now, someone who knows 8080 assembly better than I.

Leave a Reply