9th Apr 2021, 1:28 am | #1461 | |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: Non-working Commodore PET 3016
Quote:
- 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. |
|
9th Apr 2021, 2:04 am | #1462 | |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: Non-working Commodore PET 3016
Quote:
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. |
|
9th Apr 2021, 11:21 am | #1463 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
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.
|
9th Apr 2021, 12:25 pm | #1464 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
|
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. |
9th Apr 2021, 12:26 pm | #1465 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
|
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:
|
|
9th Apr 2021, 1:09 pm | #1466 | |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
Re: Non-working Commodore PET 3016
Quote:
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. |
|
9th Apr 2021, 1:34 pm | #1467 | ||
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
|
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:
|
||
9th Apr 2021, 1:40 pm | #1468 | |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: Non-working Commodore PET 3016
Quote:
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. |
|
9th Apr 2021, 1:47 pm | #1469 | |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: Non-working Commodore PET 3016
Quote:
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 |
|
9th Apr 2021, 1:53 pm | #1470 | |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
Re: Non-working Commodore PET 3016
Quote:
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. |
|
9th Apr 2021, 2:09 pm | #1471 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
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. |
9th Apr 2021, 2:40 pm | #1472 |
Dekatron
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
|
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. |
9th Apr 2021, 2:52 pm | #1473 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
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.
|
9th Apr 2021, 3:38 pm | #1474 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
|
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. |
9th Apr 2021, 3:56 pm | #1475 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Non-working Commodore PET 3016
I just run VICE using the xpet command:
Code:
xpet +confirmonexit -model 2001 -kernal petdiag.rom 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$ |
9th Apr 2021, 4:04 pm | #1476 | |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Non-working Commodore PET 3016
Quote:
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) Code:
10 SYS(1039) |
|
9th Apr 2021, 6:56 pm | #1477 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
|
Re: Non-working Commodore PET 3016
UE10 new socket and replacement IC fitted.
Screenshot attached. I guess this is good? Colin. |
9th Apr 2021, 7:04 pm | #1478 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: Non-working Commodore PET 3016
Yahoo!
|
9th Apr 2021, 7:07 pm | #1479 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Non-working Commodore PET 3016
|
9th Apr 2021, 7:10 pm | #1480 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
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. |