Back when I were looking into the memory issues I had with my EII I started translating the memory test instructons into a little program that helped me quicker identify where my problem was.
Now, since I've sorted my memory problems out and have a working machine, thate "project" became dormant.
Recently I've tried helping out a fellow EII owner from the Yahoo board to sort out his memory problems, which made me wake up the idea of having a piece of software to easier translate the HEX gibberish into the actual IC that is causing the problem.
So far, it gives the board (memory or digital) and the row of IC's, so it's narrowing it down to one of eight at least. It remains to do the binary comparisome between the result and s/b (should be) but maybe it's useful to someonein its current state?
The program language is Java, something I havn't done in 12 years (I'm sure the code can be optimised and please do, if you have the skills)
However, the class file attached should be runnable on all java enabled platforms.
Let me know if there's something wrong, I've just written the code based on the documentation in the Technical handbook. And I suppose it only works for a 512Kb EII.
Here's the code:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
// Version 0.5, only giving the range of ICs
public class Emumem {
public static void main(String args[]){
boolean memoryBoard=false;
String board = "";
// Getting the troublesome address
String address="";
Integer outputDecimal=null;
while (outputDecimal==null || (outputDecimal > 524287)) {
try{
System.out.print("Enter Memory Address (00000-7FFFF): ");
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
address = bufferRead.readLine();
outputDecimal = Integer.parseInt(address, 16);
System.out.println("Decimal Equivalent: "+outputDecimal);
if (outputDecimal > 524287){
System.out.println("Out of range");
}
} catch(NumberFormatException ne){
System.out.println("Invalid Input. Please enter a valid HEX-value.");
} catch (IOException e) {
System.out.println("IO Error");
}
}
// Divide by 32768 (#8000) to get the segment (0-15).
int segment = outputDecimal/32768;
// Check whether the chip is on the Digital- or Memory-board
if (segment>7) {
memoryBoard=true;
board = "Memory Board";
} else {
board = "Digital Board";
}
int base=0;
// Check first for EPROM and Static RAM errors, if no error, check segment and set base IC
if (outputDecimal<8192) {
System.out.println("EPROM Error. IC 42 on the Digital board.");
} else if (outputDecimal > 8192 && outputDecimal < 10240){
System.out.println("Static RAM Error. IC 59 on the Digital board.");
} else {
// Translate segmentet till Location.
switch (segment){
// Digital Board
case 0: case 1: base=13; break;
case 2: case 3: base=32; break;
case 4: case 5: base=51; break;
case 6: case 7: base=71; break;
//Memory Board
case 8: case 9: base=2; break;
case 10: case 11: base=11; break;
case 12: case 13: base=20; break;
case 14: case 15: base=29; break;
}
int base2 = base +7;
System.out.println("Location " + board + " IC " + base + " - " + base2 + ".");
} // Now we got the right board and the right bag o'chips
} //End main
} //End class