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 9th Apr 2021, 1:28 am   #1461
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by SiriusHardware View Post
Colin may not know that the 28C16 is a more modern equivalent of the 2716 EPROMs he is currently running test code in. Programming a conventional EPROM requires a special mix of unusual voltages and programming algorithms, and to erase them so you can use them again you need to shine a particular wavelength of u-v light on them for about 20 minutes. In other words you need a specific programmer unit and an EPROM eraser unit.

The 28C16 can be programmed -and- erased using no more than 5V and something which can generate the right programming / erasing signals, such as an Arduino. Once you have that setup you can write bits of code yourself, and programme them into a 28C16 and drop it into the UD9 position (with the same adaptor you use for 2716s).
Yes, I had mentioned a few post ago that something like this would have been very handy for fault-finding on this, with ability to rapidly customise the diagnostic firmware. And should be quite low-cost (especially if you've already got an RPi or Arduino (or buy a clone for a few pounds) to hand).
- Might be able to update the firmware on Sirius's readout / checksum one.
Or maybe even a USB PC BIOS IC reprogrammer, as I'm sure I've seen this for a few pounds, from Far East suppliers, that may have a reasonably good PC GUI to control it all.

And FLASH (with single voltage erase & write) / EEPROM's are so much nicer to use than all the hassle of extra circuitry to program EEPROM's + waiting for UV erasing (unless you've got a Dataman Xenon-strobe eraser gun, that I picked one up a while ago for a few pounds after previously using one at work). With towards 1Mbit DIL FLASH IC's available v.cheap, that you can use DIL switches on the upper address lines to select lots of different versions ROM-images in it.
ortek_service is offline  
Old 9th Apr 2021, 2:04 am   #1462
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by Slothie View Post
Quote:
Originally Posted by ScottishColin View Post
How did you learn? Any useful web sites?

Colin.
Well I had a PET 2001 when I was 16 (Well, it was my dads but it soon moved to my bedroom!) and learnt from reading the PET manuals and Rodney Zax's book "Programming the 6502" ( https://archive.org/details/Programming_the_6502_OCR ). I was doing computer studies at school too.

I also read Nick Hampshires "The PET Revealed" and "PET and the IEEE-488 Bus" (more a hardware book but useful insights into the OS) both of which are at http://primrosebank.net/computers/pet/pet_docs.htm

And of course the user manual https://www.commodore.ca/manuals/pdf...ser_Manual.pdf and the monitor listing in the http://www.zimmers.net/anonftp/pub/c...l_(2001-8).pdf
Yes, those are all classic titles - I most remember Rodnay Zak's Programming the Z80, and only recently saw his 6502 one. And all now quite easy to find on the 'net / can often buy good used (as well out of print) copies quite cheap from various online booksellers or radio rallies (where I've acquired lots of Nick Hampshire's Commodore ones over the years).

We had to save up a bit to obtain these books back in the 80's, as they weren't often in most libraries (which are generally much worse for technical books these days), and I recall buying the BBC Computer Advanced User guide which helped me a lot in working out how to program that with its built-in 6502 assembler, after originally not really achieving too much in Z80 on the Spectrum (but a friend when we were about 13, managed to write his own car-racing game in Z80 on the ZX81, inspired by 3D monster maze)

The 6502 is much simpler, with only 59 fairly self-explanatory instructions to learn, and (like it's buses) is also very similar to many of the Motorola 68xx processors instruction set and registers, that I subsequently did quite a bit on the 6802(6800) & the extended instruction set 68HC11 at Uni. Although the lack of many 16bit registers can be a bit of a pain at times, with a lot of swapping around between registers and temporary zero-page RAM / using stack.
I also remember the PET Wallchart I'd got back in the 80's, had brief details about the 6502 Instruction etc. as well as summary of the PET architecture - with a (only low-res?) copy I found here: http://www.commodore.ca/wp-content/u...PET_Poster.jpg

Disassembling and reverse-engineering commercial etc. programs also helped to teach you quite a bit (but much easier to follow when you've got other people's original source, particularly when well-commented)

PC based Cross-assemblers & disassemblers for virtually all processors are also freely available (especially under Linux, or run using Cygwin) these days. And lots of other online resources, with a bit of Googling / linked from: http://6502.org/

Last edited by ortek_service; 9th Apr 2021 at 2:16 am.
ortek_service is offline  
Old 9th Apr 2021, 11:21 am   #1463
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Non-working Commodore PET 3016

Yes, I use 64tass assembler https://sourceforge.net/projects/tass64/ since it produces commodore-compatible files and has support for PETSCII etc. It also uses a syntax similar to the syntax used in the original commodore documentation. I run it on Linux but I would assume there is a windows build somewhere. However most 6502 assemblers can be used, and there are plenty around most of which are linked in the 6502.org link ortek posted.
Slothie is offline  
Old 9th Apr 2021, 12:25 pm   #1464
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
Default Re: Non-working Commodore PET 3016

I've been running KDE Neon for a few weeks now on my main computer and have pretty much switched to it 100% now. I keep Windows on dual boot for Fusion 360 which I use for 3D printing design work, but apart from that I'm sticking with this for now. I have Windows in a VM as an experiment with Fusion 360 - we'll see how that goes.

Anyway - I installed VICE a week or so back too - hadn't really realised that I can do assembler work in there too.

Is there any way of taking the code that is in the ROMs you have sent to me and load it into VICE so I can see what is supposed to happen?

Colin.


Quote:
Originally Posted by SiriusHardware View Post
There is also a well known general Commodore emulator program called 'VICE' which emulates the C64, VIC-20 and the PETs, among others. It would be a useful way to learn, write and test PET 6502 code while you don't have a fully working PET.
ScottishColin is online now  
Old 9th Apr 2021, 12:26 pm   #1465
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
Default Re: Non-working Commodore PET 3016

Thanks - I have the PET revealed already in dead-tree format; I've downloaded the ones you have linked to.

Colin.


Quote:
Originally Posted by Slothie View Post
Quote:
Originally Posted by ScottishColin View Post
How did you learn? Any useful web sites?

Colin.
Well I had a PET 2001 when I was 16 (Well, it was my dads but it soon moved to my bedroom!) and learnt from reading the PET manuals and Rodney Zax's book "Programming the 6502" ( https://archive.org/details/Programming_the_6502_OCR ). I was doing computer studies at school too.

I also read Nick Hampshires "The PET Revealed" and "PET and the IEEE-488 Bus" (more a hardware book but useful insights into the OS) both of which are at http://primrosebank.net/computers/pet/pet_docs.htm

And of course the user manual https://www.commodore.ca/manuals/pdf...ser_Manual.pdf and the monitor listing in the http://www.zimmers.net/anonftp/pub/c...l_(2001-8).pdf
ScottishColin is online now  
Old 9th Apr 2021, 1:09 pm   #1466
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
Default Re: Non-working Commodore PET 3016

Quote:
Is there any way of taking the code that is in the ROMs you have sent to me and load it into VICE
Good thinking.

I only know OF vice not ABOUT vice so I can't help directly but I would assume that in common with other emulators you have to supply the 'ROMs' as code files acquired elsewhere because technically, the original PROM content is still someone's IP.

In this case you would just substitute the 'proper' ROM file with the alternative test file for that IC position. Someone who actually runs VICE can probably tell you more precisely than that.
SiriusHardware is online now  
Old 9th Apr 2021, 1:34 pm   #1467
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
Default Re: Non-working Commodore PET 3016

Hmm. Settings in VICE doesn't seem to allow me to substitute any files in the right place.

I'll go look at command line options.

Colin.

Quote:
Originally Posted by SiriusHardware View Post
Quote:
Is there any way of taking the code that is in the ROMs you have sent to me and load it into VICE
Good thinking.

I only know OF vice not ABOUT vice so I can't help directly but I would assume that in common with other emulators you have to supply the 'ROMs' as code files acquired elsewhere because technically, the original PROM content is still someone's IP.

In this case you would just substitute the 'proper' ROM file with the alternative test file for that IC position. Someone who actually runs VICE can probably tell you more precisely than that.
Attached Thumbnails
Click image for larger version

Name:	VICE ROM Settings.jpg
Views:	43
Size:	47.1 KB
ID:	231260  
ScottishColin is online now  
Old 9th Apr 2021, 1:40 pm   #1468
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by Slothie View Post
Yes, I use 64tass assembler https://sourceforge.net/projects/tass64/ since it produces commodore-compatible files and has support for PETSCII etc. It also uses a syntax similar to the syntax used in the original commodore documentation. I run it on Linux but I would assume there is a windows build somewhere. However most 6502 assemblers can be used, and there are plenty around most of which are linked in the 6502.org link ortek posted.

For those who don't already use Linux, then as well installing a version as dual-boot with Windows, or booting from a Kubuntu etc. 'Live' CD/DVD version, to not affect your existing PC's installation, then if you use Windows 10 then this has a built-in Linux subsystem that lets you run an installed version of Linux within a Window / virtual-machine style. Although there is a bit of MS provided etc. setup instructions to follow, and I'm still trying to get MS Webstore to download any version of Linux to a work PC to complete this to try it.


Yes, it looks like tass64 is very much optimised for ease of producing code for Commodore (64 etc) computers, as well as being a more generic 65xx assembler. And I had a look at that sourceforge page linked to (downloading their latest 64tass-1.55.2200.zip from about a year ago that's also under Files - binaries). Plus I found a link from their to website for it: http://tass64.sourceforge.net (which seems to be just the 64tass v1.55 r2200 reference manual).

It wasn't that clear to me what systems tass64 was targeted at, just that it said it was written in Open source portable C with minimal dependencies. And a bit of Googling found it was also on Github: https://github.com/irmen/64tass
- Where there was Amigaos4 & Debian Folders in the source files.

I noticed this is (a bit later) Release 1.55.2257 version, which clicking on lead to here: https://github.com/irmen/64tass/releases/tag/v1.55.2257
Where it says: Compile yourself if on Mac or Linux. Windows users can compile or use the supplied .exe - with link to 64tass.exe under there
(that isn't in the 64tass-master.zip main page's 'Code' download, although that does also include a Makefile.Win)

However, the slightly older 64tass-1.55.2200.zip from Sourceforge, does include 64tass.exe, which seems to work under WinXP 32bit command line OK.

Last edited by ortek_service; 9th Apr 2021 at 1:54 pm.
ortek_service is offline  
Old 9th Apr 2021, 1:47 pm   #1469
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by ScottishColin View Post
Hmm. Settings in VICE doesn't seem to allow me to substitute any files in the right place.

I'll go look at command line options.

Colin.

It looks like you just click on 'Browse' next to the 'Kernal' box, and navigate to the binary image of the Diagnostic ROM.
It shouldn't matter what's in the other ROM image boxes, if these are not actually called from the Diagnostic routine replacement-for-Kernal
ortek_service is offline  
Old 9th Apr 2021, 1:53 pm   #1470
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by ScottishColin View Post
I've been running KDE Neon for a few weeks now on my main computer and have pretty much switched to it 100% now. I keep Windows on dual boot for Fusion 360 which I use for 3D printing design work, but apart from that I'm sticking with this for now. I have Windows in a VM as an experiment with Fusion 360 - we'll see how that goes.

Anyway - I installed VICE a week or so back too - hadn't really realised that I can do assembler work in there too.

Is there any way of taking the code that is in the ROMs you have sent to me and load it into VICE so I can see what is supposed to happen?

Colin.


Quote:
Originally Posted by SiriusHardware View Post
There is also a well known general Commodore emulator program called 'VICE' which emulates the C64, VIC-20 and the PETs, among others. It would be a useful way to learn, write and test PET 6502 code while you don't have a fully working PET.

I don't think you can actually do assembler work within VICE, as it is just an emulator. I interpreted SiriusHardware's post as meaning you could use VICE to test your code without needing a real PET, after you'd already written and assembled your code, so would enable people to learn how to write 6502 for the PET / debug it.
ortek_service is offline  
Old 9th Apr 2021, 2:09 pm   #1471
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
Default Re: Non-working Commodore PET 3016

Yes, I was assuming the code would be written in the PC Windows or Linux environment using a cross assembler (Like 64Tass) to produce the actual binary code, and that said code would then be substituted for the Kernel PROM in VICE.

To write asssembly language in the native PET environment you would need a native PET assembler program. Was there ever one?

I don't know if the working environment on the PET made it simple to load and run machine code - was it like the ZX81 where you had to 'stuff' BASIC REM statements with code, or was it more like the Spectrum with a proper distinct 'binary load' capability? I have always assumed that the better / slicker games for the PET must have been written in Assembly rather than BASIC.
SiriusHardware is online now  
Old 9th Apr 2021, 2:40 pm   #1472
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
Default Re: Non-working Commodore PET 3016

I have VirtualBox on my Mac, so I should be able just to spin up a new Ubuntu instance and install Vice on that. I'm fairly confident that persuading test code to run won't involve much more than just renaming some files; perhaps a bit of trickery with dd if all the ROM images have to be combined into one file.

I learned 6502 assembly language on the BBC Micro, but it's all the same until you need to do any input or output!
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments.
julie_m is offline  
Old 9th Apr 2021, 2:52 pm   #1473
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
Default Re: Non-working Commodore PET 3016

Judging by the image bolted onto Colin's post #1467 (q.v.), the Kernel, Edit, Basic and Character generator PROMs can all be browsed to and chosen individually as Owen suggested in #1469.
SiriusHardware is online now  
Old 9th Apr 2021, 3:38 pm   #1474
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Non-working Commodore PET 3016

Although - especially if using Windows version (it does seem you can get VICE for Unix, DOS, Win32 etc. from description I found on Sourcefoge, but a Wki page says that Windows port is called WinVICE) - it may be looking for a specific .rom / .bin etc. file extension when you browse to where the Diagnostic firmware EPROM-image is.

So, if you can't change it to look for *.*, then may need to rename file extension on the Diagnostic firmware image.
ortek_service is offline  
Old 9th Apr 2021, 3:56 pm   #1475
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Non-working Commodore PET 3016

I just run VICE using the xpet command:
Code:
xpet +confirmonexit -model 2001 -kernal petdiag.rom
The -kernal options specified the file to replace the kernal ROM - xpet is looking for a 4k file so I just concat my code compiled for F800-FFFF twice to make a 4k file.
I do all this using "make" so just typing "make run" will assemble, concatenate and run xpet.
Code:
ian@FX503VD:~/Projects/PETdiag$ cat Makefile 
all: petdiag.rom
.PHONY: all run

petdiag.bin: petdiag.a64
	64tass petdiag.a64 -opetdiag.bin -b --list=petdiag.lst --verbose-list -Wno-star-assign

petdiag.rom: petdiag.bin
	cat petdiag.bin petdiag.bin >petdiag.rom

run: petdiag.rom
	xpet +confirmonexit -model 2001 -kernal petdiag.rom

clean:
	-rm *.lst 2>/dev/null
	-rm *.bin 2>/dev/null
	-rm *.rom 2>/dev/null
zip: petdiag.bin petdiag.a64
	zip petdiag.zip Makefile petdiag.bin petdiag.a64
ian@FX503VD:~/Projects/PETdiag$
Slothie is offline  
Old 9th Apr 2021, 4:04 pm   #1476
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by SiriusHardware View Post
Yes, I was assuming the code would be written in the PC Windows or Linux environment using a cross assembler (Like 64Tass) to produce the actual binary code, and that said code would then be substituted for the Kernel PROM in VICE.

To write asssembly language in the native PET environment you would need a native PET assembler program. Was there ever one?

I don't know if the working environment on the PET made it simple to load and run machine code - was it like the ZX81 where you had to 'stuff' BASIC REM statements with code, or was it more like the Spectrum with a proper distinct 'binary load' capability? I have always assumed that the better / slicker games for the PET must have been written in Assembly rather than BASIC.
Yes there were several native PET assemblers.

The standard commodore file format has a 2 byte address followed by all the bytes of the program. This is done with BASIC programs as well, they just load directly into location 1024 onwards. To make an assembler program just run like a basic program you can embed a dummy BASIC program at the beginning:
Code:
;
        *=$0400
;ENTER COMPILED BASIC TEXT
        .BYT 0,13,4,10,0,158
        .BYT '(1039)',0,0,0
START 
        LDA  #10   ; Program starts here at 1039 ($040F)
If you load the program and list it you just get a one-line BASIC program
Code:
10 SYS(1039)
Slothie is offline  
Old 9th Apr 2021, 6:56 pm   #1477
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
Default Re: Non-working Commodore PET 3016

UE10 new socket and replacement IC fitted.

Screenshot attached.

I guess this is good?

Colin.
Attached Thumbnails
Click image for larger version

Name:	IMG_20210409_185515.jpg
Views:	108
Size:	49.6 KB
ID:	231302  
ScottishColin is online now  
Old 9th Apr 2021, 7:04 pm   #1478
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
Default Re: Non-working Commodore PET 3016

Yahoo!
Timbucus is offline  
Old 9th Apr 2021, 7:07 pm   #1479
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Non-working Commodore PET 3016

Quote:
Originally Posted by ScottishColin View Post
UE10 new socket and replacement IC fitted.

Screenshot attached.

I guess this is good?

Colin.
16k of RAM is good for a 3016!! Well done
Slothie is offline  
Old 9th Apr 2021, 7:10 pm   #1480
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
Default Re: Non-working Commodore PET 3016

Blimey!!!

So fingers crossed, put everything back as it should be and... see what happens now.

Note to Slothie: You forgot to update the version number. . But thanks for that, that made it so much easier to see that problem.
SiriusHardware is online now  
Closed Thread




All times are GMT +1. The time now is 11:04 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.