UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 6th Feb 2021, 2:19 pm   #501
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Non-working Commodore PET 3016

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'
Attached Thumbnails
Click image for larger version

Name:	PET_PROM_To_RPi.jpg
Views:	46
Size:	71.3 KB
ID:	226070  
Attached Files
File Type: zip RpiPetPromReader.zip (162.9 KB, 36 views)

Last edited by Radio Wrangler; 7th Feb 2021 at 12:01 pm. Reason: Correction requested by poster. There is a corrected table in a later post
SiriusHardware is online now  
Old 6th Feb 2021, 3:55 pm   #502
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by SiriusHardware View Post
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.
ScottishColin is offline  
Old 6th Feb 2021, 5:12 pm   #503
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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 is online now  
Old 6th Feb 2021, 6:01 pm   #504
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.

Last edited by SiriusHardware; 6th Feb 2021 at 6:06 pm.
SiriusHardware is online now  
Old 6th Feb 2021, 6:31 pm   #505
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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)
SiriusHardware is online now  
Old 6th Feb 2021, 7:37 pm   #506
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default 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 is offline  
Old 6th Feb 2021, 7:41 pm   #507
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default 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.}...\
\\\\\\\\........
ScottishColin is offline  
Old 6th Feb 2021, 7:56 pm   #508
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.

Last edited by SiriusHardware; 6th Feb 2021 at 8:05 pm.
SiriusHardware is online now  
Old 6th Feb 2021, 8:05 pm   #509
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default 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);}
}
ScottishColin is offline  
Old 6th Feb 2021, 8:06 pm   #510
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,264
Default 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.
Mark1960 is offline  
Old 6th Feb 2021, 8:35 pm   #511
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Non-working Commodore PET 3016

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?)
Attached Thumbnails
Click image for larger version

Name:	2001-32N.jpg
Views:	39
Size:	49.5 KB
ID:	226103  
SiriusHardware is online now  
Old 6th Feb 2021, 8:43 pm   #512
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Non-working Commodore PET 3016

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.
Attached Thumbnails
Click image for larger version

Name:	UD7_Start.jpg
Views:	40
Size:	131.5 KB
ID:	226104  
SiriusHardware is online now  
Old 6th Feb 2021, 8:53 pm   #513
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Non-working Commodore PET 3016

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.
Attached Thumbnails
Click image for larger version

Name:	UD9_Start.jpg
Views:	42
Size:	119.6 KB
ID:	226106  
SiriusHardware is online now  
Old 6th Feb 2021, 8:57 pm   #514
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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
Slothie is offline  
Old 6th Feb 2021, 8:59 pm   #515
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.

Last edited by SiriusHardware; 6th Feb 2021 at 9:05 pm.
SiriusHardware is online now  
Old 6th Feb 2021, 9:05 pm   #516
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default 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.

Last edited by ScottishColin; 6th Feb 2021 at 9:27 pm.
ScottishColin is offline  
Old 6th Feb 2021, 9:23 pm   #517
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.

Last edited by SiriusHardware; 6th Feb 2021 at 9:32 pm.
SiriusHardware is online now  
Old 7th Feb 2021, 10:57 am   #518
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Non-working Commodore PET 3016

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.
Attached Thumbnails
Click image for larger version

Name:	PET_PROM_To_RPiV1_1.jpg
Views:	43
Size:	71.0 KB
ID:	226144  
SiriusHardware is online now  
Old 7th Feb 2021, 5:43 pm   #519
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.
SiriusHardware is online now  
Old 7th Feb 2021, 5:52 pm   #520
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default 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.
ScottishColin is offline  
Closed Thread

Thread Tools



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


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


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