UK Vintage Radio Repair and Restoration Discussion Forum

UK Vintage Radio Repair and Restoration Discussion Forum (https://www.vintage-radio.net/forum/index.php)
-   Vintage Computers (https://www.vintage-radio.net/forum/forumdisplay.php?f=16)
-   -   Non-working Commodore PET 3016 (https://www.vintage-radio.net/forum/showthread.php?t=174829)

SiriusHardware 6th Feb 2021 1:19 pm

Re: Non-working Commodore PET 3016
 
2 Attachment(s)
I made the mistake of looking at that tutorial code to see how hard it would be to make it into a specific PET PROM reader and ended up with a more or less working version, so here it is.

In the attached .zip is a Raspberry Pi Python (.py) program file which reads every byte from every address of a 4K PROM and displays the code as 16-column hex. It displays the line start addresses and the ASCII equivalent of the bytes (where printable) to the right of the hex display.

It also calculates and displays the 16-bit checksum of the code which has been read out, which can be a useful first line check if you know what the checksum should be.

It's not completely finished, you could add code to either write each byte read out to a binary file so that the file created can be compared against a known good file, or you could have it open a named binary file and check (verify) each byte read out of the PROM against the corresponding byte in the file.

As has been said earlier, this Pi based reader -requires- level downshifters at least between the PROM data pins and the Rpi inputs used to read them, and ideally also level upshifters between the PET PROM address inputs, the CS1 and CS3 pins and the Rpi pins used to drive them.

You can run this in IDLE PYTHON 3 on the Pi although it will run at the speed of treacle due to the tortuously slow rate at which IDLE outputs text. Better to run it from a terminal command line, in which case you will need to make it executable by your user with

chmod +x petprom.py

after which you should be able to run it with

./petprom.py (if you are in the same folder as the file)

or just

petprom.py

.. if you place it in your home/bin folder.

I found that I could not use GPIO 2 as a _CE output because it had strange 'double' leading and trailing edges when used as an output - its 'other' function is as part of an I2C interface, although I do have all that turned off in raspi-config. I therefore moved the CS signals to GPIO pins 3 and 4 as shown in the drawing. While GPIO 3 is also part of an I2C interface it shows no adverse effects when used as a plain logic output and it happens to have a pullup resistor on it so it keeps the PROM naturally disabled unless it is intentionally enabled.

Also in the .zip file, the full sized version of the connection diagram attached below. Note the pin connections indicated are specifically for a 4K PET PROM.

As always this comes with no guarantees, if it breaks you get to keep both pieces.

'Error correction: PROM CS3 is pin 21, not pin 23 as wrongly indicated in the attached diagram below'

ScottishColin 6th Feb 2021 2:55 pm

Re: Non-working Commodore PET 3016
 
Quote:

Originally Posted by SiriusHardware (Post 1338926)
I made the mistake of looking at that tutorial code to see how hard it would be to make it into a specific PET PROM reader and ended up with a more or less working version, so here it is.

In the attached .zip is a Raspberry Pi Python (.py) program file which reads every byte from every address of a 4K PROM and displays the code as 16-column hex. It displays the line start addresses and the ASCII equivalent of the bytes (where printable) to the right of the hex display.

It also calculates and displays the 16-bit checksum of the code which has been read out, which can be a useful first line check if you know what the checksum should be.

It's not completely finished, you could add code to either write each byte read out to a binary file so that the file created can be compared against a known good file, or you could have it open a named binary file and check (verify) each byte read out of the PROM against the corresponding byte in the file.

As has been said earlier, this Pi based reader -requires- level downshifters at least between the PROM data pins and the Rpi inputs used to read them, and ideally also level upshifters between the PET PROM address inputs, the CS1 and CS3 pins and the Rpi pins used to drive them.

You can run this in IDLE PYTHON 3 on the Pi although it will run at the speed of treacle due to the tortuously slow rate at which IDLE outputs text. Better to run it from a terminal command line, in which case you will need to make it executable by your user with

chmod +x petprom.py

after which you should be able to run it with

./petprom.py (if you are in the same folder as the file)

or just

petprom.py

.. if you place it in your home/bin folder.

I found that I could not use GPIO 2 as a _CE output because it had strange 'double' leading and trailing edges when used as an output - its 'other' function is as part of an I2C interface, although I do have all that turned off in raspi-config. I therefore moved the CS signals to GPIO pins 3 and 4 as shown in the drawing. While GPIO 3 is also part of an I2C interface it shows no adverse effects when used as a plain logic output and it happens to have a pullup resistor on it so it keeps the PROM naturally disabled unless it is intentionally enabled.

Also in the .zip file, the full sized version of the connection diagram attached below. Note the pin connections indicated are specifically for a 4K PET PROM.

As always this comes with no guarantees, if it breaks you get to keep both pieces.

Thank you very much. My arduino has turned up so I'm going to give that a bash first with the UD6-9 ROMs over the weekend and then send them to you Monday if I get no success.

Are you able to link me to what the contents of the ROMs should be so I can compare if I am successful?

The voltage shifters are due Monday so I'll try this then with the 'spare' ROM.

Colin.

SiriusHardware 6th Feb 2021 4:12 pm

Re: Non-working Commodore PET 3016
 
I can point you to two of them. Go to this page:

http://www.zimmers.net/anonftp/pub/c...pet/index.html

And locate these two files under 'Files' (scroll down)


Code:

basic-2-c000.901465-01.bin2009-08-184096
Also available as 6540-020 + 6540-021.

basic-2-d000.901465-02.bin2009-08-184096
Also available as 6540-022 + 6540-023.

The 901465-xx numbers should coincide with two of your PROMs. For the other two, since they are not marked, my plan was to read them and then try to find something on that page which matched. I have a vague idea that the other two PROMs may be the 'Kernel' PROM and the 'Edit' PROM but I have not confirmed that yet (confirmation / further info would be welcome), so my suggestion is that for now you focus on the marked PROMs which we definitely do have the code for. The code files are plain (raw) binary, by the way.

As the marked ones are the BASIC PROMs, if you are successful in reading them you should see a fair bit of plain text in them (I would have thought).

The main thing when doing this is absolutely not to muck up making the power connections to the PROM - any other sort of punishment it could probably take, but it won't forgive you if you accidentally get the supply the wrong way around.

The sketch we were talking about earlier is intended for reading EPROMs which have two active-low chip enables so when reading one of your PROMs tie its CS3 pin (pin 21) to +5V (like it is when it is in the PET) and use the Arduino output intended to drive either EPROM _OE or _CE on the EPROM to drive CS1 (pin 20) on the PROM.

Your first mission is to download and install the Arduino IDE from Arduino's own website, and then you can try loading that sketch into it and running it. Do that first without a PROM even attached, the sketch will still run and it will produce an output which you can view in the tools\serial monitor feature of the Arduino IDE. The data will be nonsense or all 00 or all FF if there is no attached device to be read, but you will at least see that the sketch / program is working.

SiriusHardware 6th Feb 2021 5:01 pm

Re: Non-working Commodore PET 3016
 
Actually, looking at that sketch again I see it doesn't even try to work the chip enables on the target IC, so in that case tie PROM pin 21 to +5V and PROM pin 20 to 0V, connect the appropriate Arduino pins to PROM D0 to D7 and A0 to A11, connect Arduino +5V to PROM pin (24) and Arduino GND to PROM pin (12) and away you go.

SiriusHardware 6th Feb 2021 5:31 pm

Re: Non-working Commodore PET 3016
 
Looking further down the list of files pointed to in #503, I think one of your other PROMs will be this one

Code:

kernal-2.901465-03.bin2009-08-184096
KERNAL for BASIC 2. Also available as 6540-025 + 6540-026.

And the remaining one will be one of these two, depending on whether your machine is a 'consumer'(N) or 'business' (B) model.

Code:

edit-2-b.901474-01.bin2009-08-182048
Screen editor ($E000-$E7FF) for BASIC 2, business keyboard,
no CRTC (40 columns)

edit-2-n.901447-24.bin2009-08-182048
Screen editor for BASIC 2, normal keyboard, no CRTC (40 columns)


ScottishColin 6th Feb 2021 6:37 pm

Re: Non-working Commodore PET 3016
 
I can get ASCII or Hex out from the sketch - what format is the .BIN in so I can compare?

Colin.

ScottishColin 6th Feb 2021 6:41 pm

Re: Non-working Commodore PET 3016
 
If I go for ASCII for example, I get this for UD6 (assuming it's a 4K ROM).

@.W.........b...
.....././.....B.
>.R.............
....j...v.......
..|.Z.E...d...Y.
z.^...........(.
....V.?...e.....
....yu.y5.{6.{..
.g.P..F..}..Z..d
..EN.FO.NEX.DAT.
INPUT.INPU.DI.RE
A.LE.GOT.RU.I.RE
STOR.GOSU.RETUR.
RE.STO.O.WAI.LOA
.SAV.VERIF.DE.PO
K.PRINT.PRIN.CON
.LIS.CL.CM.SY.OP
E.CLOS.GE.NE.TAB
.T.F.SPC.THE.NO.
STE......AN.O...
.SG.IN.AB.US.FR.
PO.SQ.RN.LO.EX.C
O.SI.TA.AT.PEE.L
E.STR.VA.AS.CHR.
LEFT.RIGHT.MID.G
..NEXT.WITHOUT.F
O.SYNTA.RETURN.W
ITHOUT.GOSU.OUT.
OF.DAT.ILLEGAL.Q
UANTIT.OVERFLO.O
UT.OF.MEMOR.UNDE
F'D.STATEMEN.BAD
.SUBSCRIP.REDIM'
D.ARRA.DIVISION.
BY.ZER.ILLEGAL.D
IREC.TYPE.MISMAT
C.STRING.TOO.LON
.FILE.DAT.FORMUL
A.TOO.COMPLE.CAN
'T.CONTINU.UNDEF
'D.FUNCTIO..ERRO
R..IN....READY..
....BREAK.......
.....!.G......F.
...G......F.....
..i....`.(..../8
.W.\....X.]....#
.W8...W...X8.U..
.U...V...W.U....
W.U.X.V...`.i>.5
.......`.1.(...0
."H...H.T.......
.h.^.0.h.h.1....
.0..`.MF........
........C....H).
.E..h...........
..7......F......
...o..w.x.p.....
..7.....L...s...
....,..D...\...*
...].".\..\.e*.*
.!.+i..+.].8.\.*
.....".e........
.!......"....r..
@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@
@@..............
................
................
................
................
................
................
................
................
................
................
................
................
................
................
................
................
))))))))))))))))
))))))))))))))))
................
................
................
................
////////////////
HHHHHHHHHHHHHHHH
))))))))))))))))
................
................
................
................
................
................
................
................
FFFFFFFFFFFFFFFF
................
................
................
HHHHHHHHHHHHHHHH
cccccccccccccccc
DDDDDDDDDDDDDDDD
................
FFFFFFFFFFFFFFFF
................
................
eeeeeeeeeeeeeeee
................
HHHHHHHHHHHHHHHH
................
................
...@............
;.6.7...;;;;;;;;
.....L~.L.......
;..LW..:........
.6.7`..Lr..y....
......xH.wH.7H..
H..H.v....L...s.
....7.....8ew.x.
.....(.).0....\.
..w.]...x`.....G
..........,.ZLW.
L..hh.6h.7h.wh.x
.....ew.w...x`.:
,...............
..w........"....
....v...........
^........v...L..
L...x.H.........
b..hL...p..s..,.
.h`........./...
..........&..&.e
.....e.....&...e
........p.Ly..m.
.F.G.......H..H.
..h*.....h...'..
.....a.F..b.F`L.
.h.G...O......@.
..^.c.n.(.....n.
n.(.............
n.............x.
`.....X`...}...L
#../L.....a.1...
...a.0...b.+....
.a.*...a.bLs....
a.O..M.N.l.m.T..
^...M.N......M.F
..M.F..M.F`...L.
..x....,........
.(L......v..5.?.
..I....D.,.3.;.Q
...$.0.....a....
.9..............
.....E....E.I.`.
.8....I.i.....u.
.).](...........
..p.L...9....a..
............E...
......L&.......,
..,.?$.0....).`.
...0......<.=.6.
7L........LW....
.....:.;.w.x`...
.#...p..x..,....
..............@.
......`.x..,....
................
`F.."......;....
......,.........
...)......L.....
.......LQ......C
..9.Lo..>.?..,..
...@.A.m..F.G.w.
x.H.I.@.A.w.x.v.
..$.P...........
..0u.....C.....w
.x.p.$..1$.P...w
........."...:..
.,....w.xi.....g
.......L........
...v....,..LO..w
.x.@.A.H.I.w.x.v
..,...L.........
.*..w.m..w.<..w.
.=.w........LR..
@.A....L:....@..
........L..`?EXT
................
................
................
................
................
................
................
................
................
$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$
................
................
aaaaaaaaaaaaaaaa
................
................
................
................
................
................
................
._H.............
................
gh.hh.higggggggg
l.^`.....p......
....z...........
Lp..I...........
....."...w.xi.ii
..a.L.........;.
...bI...aI.Lm...
..L......L......
...),.(,.,...w..
Lp...LW...hhL...
m..a.b.B.C...%..
.m$b...T.......i
..[..n...Z.$.t.L
I.`.......a...a.
.Lm.$b.*.T...I."
.i....L[.....x..
.X._`.S...T....L
H..a.bL...H..p..
...............h
..bH.aH.H.x.h..H
L.....h.....R...
.S.Q.L....,.....
...aE....bE.....
.....bE.%.E...aE
.%.E.Lm.......k.
.%g.g.f...g..LC.
.....J....^._.`.
i.j....i.j.8.^..
.....^...c......
..c0.....i._....
......*%.....LH.
.....r..v...`...
v....B.v......L.
........p.......
.......+.....$..
.......%........
...........p..C8
.)....L.......*.
........-...,.".
.........Q.}...\
\\\\\\\\........

SiriusHardware 6th Feb 2021 6:56 pm

Re: Non-working Commodore PET 3016
 
That output looks very promising, loads of plain text in there. Shows that none of the data pins are damaged and everything is connected up right.

The files online are plain binary so it's up to you to read them and display the contents in whatever format you wish, or use them in some other way.

For loading and viewing files, assuming you are a Windows man, I suggest the free / shareware HxD file editor

https://mh-nexus.de/en/hxd/

The default mode of that software is to show the contents of files both as HEX and ASCII side by side, just like the Arduino sketch does when all its various options are turned on.

Another thing you could do is declare a 16 bit variable at the start of the Main() loop

Code:

unsigned int Checksum=0;
and every time the sketch reads a byte, have it add the value of the byte to Checksum, and then at the end have it print the hex value of Checksum...

Code:

Serial.print(Checksum,HEX);
When you load the original file into HxD, HxD will tell you the checksum of that file. If the checksum of the code you read in from the PROM matches the checksum of the 'good' file there is a very high chance that the PROM is OK.

ScottishColin 6th Feb 2021 7:05 pm

Re: Non-working Commodore PET 3016
 
UD7 is completely blank. UD8 has some recognisable words, and UD9 has non-zeros, but no recognisable text.

Here's the sketch I have been using to ensure I have scanned correctly - I have treble checked the pin locations on the Arduino/breadboard:


/*
ROM Reader. Quick Arduino program to read a parallel-accessed ROM and dump it to the serial
port in hex.

Oddbloke. 16th Feb 2014.
*/

// How I've wired the digital pins on my Arduino to the address and data pins on
// the ROM.
static const int kPin_A0 = 53;
static const int kPin_A1 = 51;
static const int kPin_A2 = 49;
static const int kPin_A3 = 47;
static const int kPin_A4 = 45;
static const int kPin_A5 = 43;
static const int kPin_A6 = 41;
static const int kPin_A7 = 39;
static const int kPin_A8 = 46;
static const int kPin_A9 = 48;
static const int kPin_A10 = 52;
static const int kPin_A11 = 50;
static const int kPin_A12 = 37;
static const int kPin_A13 = 44;

static const int kPin_D0 = 28;
static const int kPin_D1 = 30;
static const int kPin_D2 = 32;
static const int kPin_D3 = 33;
static const int kPin_D4 = 31;
static const int kPin_D5 = 29;
static const int kPin_D6 = 27;
static const int kPin_D7 = 25;

const char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};

void setup()
{
// set the address lines as outputs ...
pinMode(kPin_A0, OUTPUT);
pinMode(kPin_A1, OUTPUT);
pinMode(kPin_A2, OUTPUT);
pinMode(kPin_A3, OUTPUT);
pinMode(kPin_A4, OUTPUT);
pinMode(kPin_A5, OUTPUT);
pinMode(kPin_A6, OUTPUT);
pinMode(kPin_A7, OUTPUT);
pinMode(kPin_A8, OUTPUT);
pinMode(kPin_A9, OUTPUT);
pinMode(kPin_A10, OUTPUT);
pinMode(kPin_A11, OUTPUT);

// set the data lines as inputs ...
pinMode(kPin_D0, INPUT);
pinMode(kPin_D1, INPUT);
pinMode(kPin_D2, INPUT);
pinMode(kPin_D3, INPUT);
pinMode(kPin_D4, INPUT);
pinMode(kPin_D5, INPUT);
pinMode(kPin_D6, INPUT);
pinMode(kPin_D7, INPUT);

Serial.begin(9600);
}

void SetAddress(int addr)
{
// update the address lines to reflect the address we want ...
digitalWrite(kPin_A0, (addr & 1)?HIGH:LOW);
digitalWrite(kPin_A1, (addr & 2)?HIGH:LOW);
digitalWrite(kPin_A2, (addr & 4)?HIGH:LOW);
digitalWrite(kPin_A3, (addr & 8)?HIGH:LOW);
digitalWrite(kPin_A4, (addr & 16)?HIGH:LOW);
digitalWrite(kPin_A5, (addr & 32)?HIGH:LOW);
digitalWrite(kPin_A6, (addr & 64)?HIGH:LOW);
digitalWrite(kPin_A7, (addr & 128)?HIGH:LOW);
digitalWrite(kPin_A8, (addr & 256)?HIGH:LOW);
digitalWrite(kPin_A9, (addr & 512)?HIGH:LOW);
digitalWrite(kPin_A10, (addr & 1024)?HIGH:LOW);
digitalWrite(kPin_A11, (addr & 2048)?HIGH:LOW);
digitalWrite(kPin_A12, (addr & 4096)?HIGH:LOW);
digitalWrite(kPin_A13, (addr & 8192)?HIGH:LOW);
}

byte ReadByte()
{
// read the current eight-bit byte being output by the ROM ...
byte b = 0;
if (digitalRead(kPin_D0)) b |= 1;
if (digitalRead(kPin_D1)) b |= 2;
if (digitalRead(kPin_D2)) b |= 4;
if (digitalRead(kPin_D3)) b |= 8;
if (digitalRead(kPin_D4)) b |= 16;
if (digitalRead(kPin_D5)) b |= 32;
if (digitalRead(kPin_D6)) b |= 64;
if (digitalRead(kPin_D7)) b |= 128;

return(b);
}

void loop()
{
byte d[16];
int x, y, addr;

// The only reason I'm choosing to read in blocks of 16 bytes
// is to keep the hex-dump code simple. You could just as easily
// read a single byte at a time if that's all you needed.

Serial.println("Reading ROM ...\n");

for (addr = 0; addr < 4096; addr += 16)
{
// read 16 bytes of data from the ROM ...
for (x = 0; x < 16; x++)
{
SetAddress(addr + x); // tells the ROM the byte we want ...
d[x] = ReadByte(); // reads the byte back from the ROM
}

// now we'll print each byte in hex ...
//for (y = 0; y < 16; y++)
//{
// Serial.print(hex[ (d[y] & 0xF0) >> 4 ]);
// Serial.print(hex[ (d[y] & 0x0F) ]);
//}

// and print an ASCII dump too ...

Serial.print(" ");
for (y = 0; y < 16; y++)
{
char c = '.';
if (d[y] > 32 && d[y]<127) c = d[y];
Serial.print(c);
}

Serial.println("");
}

// All done, so lockup ...
while (true) {delay(10000);}
}

Mark1960 6th Feb 2021 7:06 pm

Re: Non-working Commodore PET 3016
 
Looks promising.

You might find HxD helpful. Official homepage according to wikipedia is:
https://mh-nexus.de/en/hxd/

I think if you load the ascii output from the prom you could compare with the binary file.

SiriusHardware 6th Feb 2021 7:35 pm

Re: Non-working Commodore PET 3016
 
1 Attachment(s)
I've had a really close look at a photo Colin posted earlier and it is actually possible to read the numbers on three of four of Colin's PROMs

UD6 = 901465-01 = Basic 2 Rom #1
UD7 = 901465-02 = Basic 2 Rom #2
UD8 = only just not readable
UD9 = 901465-03 = Kernel for Basic 2

As to the unreadable writing on UD8, find attached an image of the ROMs in another PET - barely readable but luckily it is possible to make out the number on UD8, which is 901447-24. Therefore, UD8 must be the 'edit' ROM, so its contents should match either the 901447-24.bin file or the 901474-01.bin file (I wonder if the 447 / 474 difference is just a typo?)

SiriusHardware 6th Feb 2021 7:43 pm

Re: Non-working Commodore PET 3016
 
1 Attachment(s)
One problem with just trying to compare ASCII content is that hex editors usually translate unprintable characters (code below 32 or above 128) to a 'dot'. Really needs to be a hex with hex comparison.

Attached, what the start of the content of UD7 should look like. I think we already did suspect that UD7 might be toast because the measurements on it were quite different to UD6 which clearly seemed and probably is healthy.

SiriusHardware 6th Feb 2021 7:53 pm

Re: Non-working Commodore PET 3016
 
1 Attachment(s)
And the start of UD9 should look like this. Curiously enough it does have some plain text right at the start and you say your UD9 does not but your UD8 does, so I am wondering if your UD8 / UD9 have been swapped at some point.

When you first posted a picture of your board the IC in UD9 position definitely had -03 on the end of its ID number.

Slothie 6th Feb 2021 7:57 pm

Re: Non-working Commodore PET 3016
 
The dump in #507 looks a little worrying, with all the strings of identical characters:
Quote:

)))))))))))))))
))))))))))))))))
................
................
................
................
////////////////
HHHHHHHHHHHHHHHH
))))))))))))))))
................
................
................
................
................
................
................
................
FFFFFFFFFFFFFFFF
................
................
................
HHHHHHHHHHHHHHHH
cccccccccccccccc
DDDDDDDDDDDDDDDD

SiriusHardware 6th Feb 2021 7:59 pm

Re: Non-working Commodore PET 3016
 
Yes, it really needs to be read out hexwise and compared with the good code. Have to say by the way, I'm impressed by the way Colin hit the ground running with his Arduino - he's only had it a few hours as far as I know.

ScottishColin 6th Feb 2021 8:05 pm

Re: Non-working Commodore PET 3016
 
EDIT: Ignore all of this. Apologies. It's my patch wires. they're slightly too thing so I'm getting intermittent connection with various random ones of them.

I'll get some more...

Colin.



I can't make any sense of this any more - I must have something wrong (again). I am checking UD9 which is marked as 901465-03 and the results are changing every time I run the sketch....this cannot be right.

I have %v (measured as 4.9V) connected to pin 24 and pins 20 and 12 connect to GND.

All the address pins and the ouput pins are connected as per the code in post 509.

Example run (first few lines) of UD9:

PKK.IAH_.@IHA.@I
HA.IPA.@IHA.HOP.
IPA.@MHA.HOP.@OW
L..UAAPALMHE.@OP
..PRCSS.PHC[...P
CCKRB.KJ.PCPC...
LME..UTMPMLE..PE
TMD.DETMEE.LMT$T
PAQAH.HKP.IHPQP.
@IH.HIP.IQPPQP.@
ON..DOWLD..OO..P

Next example run of UD9 with nothing changed...

PII.IAHYA@HHA.@I
HA.IPA.@HIP.HIP.
IPA.@IHA.@IP.@KS
A..UAAPA.@MA.@OP
C.RRCSS....P...P
BBKRB.KJC..[C...
.MA..UPM.MHE..PE
DMD.DETMME$LMT$T
HAQAH.HIPQP`PQP.
HIP.HIP.QP.@QP.@
FN..DOWNO..TO..T

Is there anything obvious that I'm doing wrong?

Colin.

SiriusHardware 6th Feb 2021 8:23 pm

Re: Non-working Commodore PET 3016
 
Might just be reading the chip too fast, not leaving enough time between changing the address and reading the data. Try inserting a delay as indicated:

Code:

// read 16 bytes of data from the ROM …
for (x = 0; x < 16; x++)
{
SetAddress(addr + x); // tells the ROM the byte we want

delayMicroseconds(50);  // <---------------added delay

d[x] = ReadByte(); // reads the byte back from the ROM
}

In the example given the program pauses for 50 microseconds between writing out the address and reading the data. See if it then reads consistently.

Are you tying PROM 21 to +5V and PROM 20 to 0V? otherwise the PROM will just activate whenever the mood takes it.

Edit: Just caught your edit. Yes, those pin jumpers are often a rather loose fit in breadboard sockets.

SiriusHardware 7th Feb 2021 9:57 am

Re: Non-working Commodore PET 3016
 
1 Attachment(s)
Groan, just noticed an error on the diagram attached to post #501 (And therefore also the one in the zip file attached to that post) - it shows PROM CS3 as pin 23 - that is incorrect.

CS1 output is to PROM pin 20 (via level upshifter)
CS3 output is to PROM pin 21 (via level upshifter)

Corrected version attached.

SiriusHardware 7th Feb 2021 4:43 pm

Re: Non-working Commodore PET 3016
 
A further observation about the PROM contents of the files pointed to in posts #503 and #505: While the UD6 / UD7 BASIC PROMs are both 4K, the 'Kernel' and 'Edit' files (UD9 and UD8 respectively) are only 2K (2048 bytes) each.

ScottishColin 7th Feb 2021 4:52 pm

Re: Non-working Commodore PET 3016
 
Right - I've done what I can; UD6-9 are packaged up and will be in the post to you tomorrow for your expert view.

Thanks.

Colin.


All times are GMT. The time now is 1:56 pm.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright ©2002 - 2021, Paul Stenning.