E-mu Emulator Sampler User Forum for the EIII EII EI and EIII XP - Memory test - a little easier?

Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 03:20:29 AM
Home Help Search Login Register
News: Problems registering? Send an email to: EIII @ telenet.be (without the spaces)

+  E-mu Emulator Sampler User Forum for the EIII EII EI and EIII XP
|-+  General Category
| |-+  EII Technical Issues / Tips
| | |-+  Memory test - a little easier?
« previous next »
Pages: [1] Print
Author Topic: Memory test - a little easier?  (Read 3783 times)
modmaker
Jr. Member
**
Offline Offline

Posts: 20


« on: September 27, 2014, 10:43:16 AM »

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:

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

* Emumem.class (2.14 KB - downloaded 345 times.)
« Last Edit: October 16, 2014, 12:44:39 PM by modmaker » Logged

EII, EIIIxp, Proteus/1, EIVk, ESI-2000, E5000, E4XT
modmaker
Jr. Member
**
Offline Offline

Posts: 20


« Reply #1 on: September 28, 2014, 10:56:10 AM »

An update. I hope I've done this right.
Now the program also takes in "Data" and "S/B" as HEX-values (as shown by the test software).
It then translates the values into two binary numbers and compares the values left to right.
If there's a mis-match it uses the segment base IC-number (taken from the service manual) and adds an offset (the leftmost bit being the base IC and the rightmost is base+7).

I've tried comparing the results with the very few memory issues that has been posted on the board with the result of the program but it's inconclusive. So, use the program at your own risk.
If I'm wrong in my assumptions on how to identify a faulty IC on an Emulator, please let me know.
I hope it will be useful to someone.

Code:
import java.io.*;
import java.math.*;
// Version 0.5, only gave the range of ICs
// Version 0.8, added compare by using chararray of two strings containing 8-bit binary values
public class Emumem {
public static void main(String args[]){

String board = "Digital Board";

// Getting the troublesome address
Integer outputDecimal = getValue(524287, "Memory Address (00000-7FFFF): ");
int segment = outputDecimal/32768; // Divide by 32768 (#8000) to get the segment (0-15).
// Check whether the chip is on the Digital- or Memory-board
if (segment>7) {
board = "Memory 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 segment into location, base=starting IC in range.
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;
// Get the first HEX value and translate into binary
int outputWas = getValue(255, "Data (00-FF): ");
String binWas = hexToBin(Integer.toString(outputWas));
binWas = makeEight(binWas);

// Get the second HEX value and translate into binary
int outputsb= getValue(255, "S/B (00-FF): ");
String binSB = hexToBin(Integer.toString(outputsb));
binSB = makeEight(binSB);

// Compare the binary numbers bit by bit, if they differ, we have a faulty IC which is base+offset (0-7).
char[] first  = binWas.toLowerCase().toCharArray();
char[] second = binSB.toLowerCase().toCharArray();
// Loop position and compare values for each position
for(int offset = 0; offset < 8; offset++){
if (first[offset] != second[offset]) {
System.out.println("IC "+(base+offset)+" on the " + board + " looks faulty.");
}
} // End Else
}// Now we should have the right board and the right circuit located.
} //End main
static String hexToBin(String Hex) { //Converts a string containing a HEX value to a String containing its binary value.
return Integer.toBinaryString(Integer.parseInt(Hex));
}
static String makeEight(String s){ // Makes sure a bin is eight chars long as a String
int l = s.length();
if (l != 8) {
for (int i=(8-l); i>0 ;i--){
s= "0" + s;
}
}
return s; //Should now always be a string of eight character (1s or 0s)
}
static int getValue(int maximum, String what){ // Asks user for numeric (HEX) input and returns an int. Takes in max value that is accepted (as an int) and a string to instruct user what to give input on.
int value=(maximum+1);
while (value<0 || (value > maximum)) {
try{
System.out.print("Enter " + what+": ");
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
String input = bufferRead.readLine();
value = Integer.parseInt(input, 16);
if (value > maximum){
System.out.println("Out of range: "+value);
}
} catch(NumberFormatException ne){
System.out.println("Invalid Input. Please enter a valid HEX-value.");
} catch (IOException e) {
System.out.println("IO Error");
}
}
return value;
}
} //End class

* Emumem.class (2.7 KB - downloaded 350 times.)
« Last Edit: October 16, 2014, 12:44:01 PM by modmaker » Logged

EII, EIIIxp, Proteus/1, EIVk, ESI-2000, E5000, E4XT
dr.c
E-mu Doctor
Hero Member
*****
Offline Offline

Posts: 903


I'm a hot dog !


« Reply #2 on: October 07, 2014, 02:32:30 PM »

How to find a faulty memory chip among 65.536 chips within 16 operations on any machine.

Note the error message.
 if your machine has a memory piggyback board, intervert the chips and relaunch the test.
If the error message is the same, it means that your piggyback memory chips are okay.

Then intervert a quarte of the chips on the main board.
Same message ? These two quarters are okay.
Intervert now half of a quarte of the chips. Mssage changed ? It means the bad chip is in the two quarters you have inverted. Take on half of the quarter and intervert them with knowed good chips. Same message ?
The faulty chip is on the other half quarter !

Etc...
Logged
modmaker
Jr. Member
**
Offline Offline

Posts: 20


« Reply #3 on: October 09, 2014, 02:27:26 PM »

You're right dr.c. That's the method I used when fixing mine.
It worked too.  Grin
« Last Edit: October 11, 2014, 08:43:04 AM by modmaker » Logged

EII, EIIIxp, Proteus/1, EIVk, ESI-2000, E5000, E4XT
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

E-mu Emulator Sampler User Forum for the EIII EII EI and EIII XP - Memory test - a little easier?

SEO light theme by © Mustang forums. Powered by SMF 1.1.21 | SMF © 2015, Simple Machines