• Please review our updated Terms and Rules here

Weird data from PET expansion EPROM (random numbers from 0-filled 2K chip)

natevw

Member
Joined
Oct 22, 2019
Messages
34
Location
Richland, WA (USA)
I picked up a spare 2716 EPROM (SGS M2716-1F1) and since I've been on a 6502 bent and recently repaired another chip in my PET Model 4016, I figured I'd try just dropping in a ROM and reading data off it. Nothing complicated like a true "option ROM" yet, just something like hiding a message for one of the kids and seeing if they can find it :)

However it's turned out to be not quite so simple. Seems like there's something funny on the bus re. the ROM ranges but the computer is otherwise working (BASIC 4.0, 15359 bytes free, GPIB now working w/a PETdisk MAX, no display issues, etc. etc.)

My first test was to simply write "HELLO WORLD\0\0\0" to the 2716 with a TL866II+ and drop the chip into UD12. My understanding is that the ROM's contents should then simply appear between 0x9000 and 0x9800. I wrote a little loop in BASIC something like:


Code:
5 BASE=36864
6 SIZE=2048
10 FOR I=0 TO SIZE-1
20 N = PEEK(BASE+I)
30 PRINT N " " CHR$(N),
40 NEXT I

And expected to see the codes and letters for H, E, L, L, O, " ", W, … etc. logged out followed by a bunch of 255 (0xFF) data. But instead I got back fairly random garbage.

Experimenting a bit, I found some other funniness:

With nothing in UD12 at all, the values are all 144 for a while. E.g. if I `?PEEK(36864)` I get 144, if I `?PEEK(36865)` I get 144, and so on up until `?PEEK(37120)` when it turns to 145, until `?PEEK(37376)` where it turns to 146. So basically the "data" read back increments by one after each 256 byte block.

So I cleared the 2716 to solid zeroes, expecting to maybe see just those same numbers just XORed or ORed or something with the "no ROM" values. But the only pattern I see in the first handful of bytes is just a pseudo-random sequence afaict. That is, the first handful of bytes read starting at 36864 are: 20, 69, 83, 84, 73, 78, 102, 32, 48, 50, 51, 52, 49, 20, 51, 56, 0, 0, 40, 16, 255, 252, 32, 120, 220… so I guess I did get two zeroes, in a row even, but also a 255 and just about everything in between too!

The EPROM seems just fine when accessed via the TL866II programmer, read its initial data, cleared to all 0xFFs in its mini tanning bed, wrote and verified sample data, zero-filled and verified that, etc.

Any idea what might be going on here, or how to troubleshoot? What values are expected when PEEKing at empty ROM sockets normally?



Some references I've been using:

http://primrosebank.net/computers/pe...multi_roms.htm

https://www.atarimagazines.com/compu...MODORE_PET.php
 
Last edited:
A 2716 on UD12 will be selected only when A11 = 0, since these expasion sockets are meant for 2332 ROMs (or 2532 EPROMs if you don't have any funny expansion living in the 6502 socket that needs to disable the motherboard's ROMs).
Since you read a floating databus, the read byte is the high byte of the address bus

HTH
Frank IZ8DWF
 
Haven't fully circled back to this yet, but appreciate the response!

A 2716 on UD12 will be selected only when A11 = 0, since these expasion sockets are meant for 2332 ROMs (or 2532 EPROMs if you don't have any funny expansion living in the 6502 socket that needs to disable the motherboard's ROMs).


Ah, very helpful information! I was having trouble tracking down which ROMs where used in which sockets on which models, but something I found made it look like the 2716 was more pin compatible than I thought. With these chip numbers I should be able to track down the lines used better.


Since you read a floating databus, the read byte is the high byte of the address bus

Interesting, and totally explains what I was seeing. Is that a behavior of the 6502 itself?
 
Interesting, and totally explains what I was seeing. Is that a behavior of the 6502 itself?

Since there're no data buffer transceivers between the 6502's databus and the ROMs databus on a PET, then the floating databus getting the high part of the address bus happens inside the 6502.

Frank IZ8DWF
 
Back
Top