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 Jun 2022, 2:39 pm   #421
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default Re: Perth PET

I don't think that's it because I don't think the PET is that clever. To the best of my knowledge, no code gets executed until the RUN command is typed. So the whole program will get loaded into memory but nothing will run until told to by the user.

I've been told elsewhere (PET Facebook Group) that there are 191 bytes available for the second cassette buffer - 033A-03F9 - it's possible that some programs assume no second port and fail in a horrible heap when there is something there.

Page 456 in this PDF:

http://www.zimmers.net/anonftp/pub/c...p(Osborne).pdf

Colin.


Quote:
Originally Posted by SiriusHardware View Post
The issue with tape loading could be something like this - Purely hypothetical, but for example:-

The initial part of the program on tape may be a basic program which has a relatively small bit of custom machine code embedded in it, whose purpose is to load and run a much larger lump of machine code. The custom machine code loader could very well be hard-coded to read the code in from cassette port 1, regardless of which port the initial loader is originally loaded in from.

This could also explain why - when you try to save one of these programs - you have problems, because you are only saving the BASIC program with the embedded tape loader and not the bulk of the machine code itself.

As I said, purely hypothetical - to solve this particular problem you really need the help of some proper PET people, people who know PET software as well as they know PET hardware.
ScottishColin is offline  
Old 6th Jun 2022, 2:57 pm   #422
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default Re: Perth PET

So does PET basic have specific LOAD and SAVE syntax for binary files? If not, how are machine language programs loaded on a PET, is the machine code held in the BASIC program in the form of DATA statements, or something like that?

I'm not completely sure what you are trying to do so I don't know if this will be any use but I came across this:

https://portcommodore.com/dokuwiki/d...form_emulation

Third paragraph "How Can I get Pet programs onto disk?" Gives a native C64 basic program which lifts files from tape and writes them to disc, there is a suggestion that this can be adapted for the PET.

Second paragraph "How can I get PET programs from disc onto tape" describes a method of going the other way, so I suppose what I'm saying is that this seems to be a possible way to get software off tape #1 and onto another tape on tape #1 using a disc as the intermediate medium.

I have no idea if this is helpful in your context.

Last edited by SiriusHardware; 6th Jun 2022 at 3:25 pm.
SiriusHardware is online now  
Old 6th Jun 2022, 3:38 pm   #423
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default Re: Perth PET

LOAD is the same regardless of the application. If it's a binary app, then the LIST consists of (something like)

10 SYS (1039)

And that's it.

Thanks - I'll try that listing and see what happens.

Colin.
ScottishColin is offline  
Old 6th Jun 2022, 5:32 pm   #424
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default Re: Perth PET

I found this book:

https://doc.lagout.org/science/0_Com...of_PET-CBM.pdf

If you run down to book page 78 / PDF page 84 there is a chapter titled "Mixing BASIC and machine code"

It seems the trick is to enter a basic program such as your one-line 'SYS (nnnn), and then go into the built in monitor and use that to enter the machine code into the memory bytes immediately following the end of that line of BASIC.

Then, you use the load / save feature of the monitor to save the memory area from the beginning of the line of BASIC to the end of the added machine code+1, and apparently once you have done that you can load it like any other BASIC program. Still only the BASIC portion is visible, but the machine code is also loaded in behind it and can then be executed with the BASIC SYS (nnnn) command.

If you are attempting to load and then save a hybrid BASIC / machine code file written by someone else then it is up to you to determine where the end of the added machine code is in order to inform the monitor of the correct from-to range to save. One way you could do this is to use the monitor to flood most of the memory with a known value like AA, then load the program and then go back into the monitor to find the address where the program code ends and AA AA AA AA begins.

If you just save the one BASIC line which you can see using the BASIC SAVE command then I think it will literally only save the BASIC portion of the program, not the hidden machine code.

Anyway, the article I have pointed to above probably explains it better.
SiriusHardware is online now  
Old 7th Jun 2022, 6:56 pm   #425
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default Re: Perth PET

I've just had a power extender delivered which allows me to power the SD2PET from port #2. With a datasette now plugged into port #1, I can load machine code games (eg Microchess) successfully and save them with a simple SAVE command to the SD2PET.

Looks like I can get on with archiving my old tapes now.

https://www.thefuturewas8bit.com/extend.html

Colin.
ScottishColin is offline  
Old 7th Jun 2022, 8:00 pm   #426
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default Re: Perth PET

Well, shows how much I don't know

Glad you have a solution to your problem.

I wonder if anyone is still writing new PET software now? Some of the slightly later machines (C64, Spectrum) have quite a lively 'New Software' scene, with new titles appearing on a regular basis.
SiriusHardware is online now  
Old 7th Jun 2022, 8:07 pm   #427
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default Re: Perth PET

There's some here:

https://www.indieretronews.com/searc...dore%20PET?m=1

And I've seen this lot too.

https://www.thefuturewas8bit.com/sho.../699range.html

I can't believe there's any money in it. Although PETs sold well, they were nothing compared to the next generation of home computers.

Colin.


Quote:
Originally Posted by SiriusHardware View Post
Well, shows how much I don't know

Glad you have a solution to your problem.

I wonder if anyone is still writing new PET software now? Some of the slightly later machines (C64, Spectrum) have quite a lively 'New Software' scene, with new titles appearing on a regular basis.
ScottishColin is offline  
Old 7th Jun 2022, 8:25 pm   #428
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default Re: Perth PET

This is the one which catches my eye - 3D Monster Maze (The ZX81's original Killer App) ported to the PET!

https://www.thefuturewas8bit.com/cas022.html

Needs 32K, but that's just a switch click away on your TB, I think.

Edit: A video of it running. Far slicker than the ZX81 original.

https://www.youtube.com/watch?v=-vvFPcVvvnA
SiriusHardware is online now  
Old 7th Jun 2022, 8:51 pm   #429
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,762
Default Re: Perth PET

I remember that too. Sound from the PET is next on my list. Looks simple enough to do. I can remember doing it 40-odd years ago on my original PET so it can't be tricky.

Colin.


Quote:
Originally Posted by SiriusHardware View Post
This is the one which catches my eye - 3D Monster Maze (The ZX81's original Killer App) ported to the PET!

https://www.thefuturewas8bit.com/cas022.html

Needs 32K, but that's just a switch click away on your TB, I think.

Edit: A video of it running. Far slicker than the ZX81 original.

https://www.youtube.com/watch?v=-vvFPcVvvnA
ScottishColin is offline  
Old 7th Jun 2022, 9:03 pm   #430
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default Re: Perth PET

Well, here's an idea of what might come out of it (A PET music demo!). Not bad, considering it's coming out of a single digital output.

https://www.youtube.com/watch?v=JEhGa5avUKM

I've found quite a few PET 'demos' on a short voyage around Youtube.
SiriusHardware is online now  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 9:52 am.


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.