|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
6th Jun 2022, 2:39 pm | #421 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,803
|
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:
|
|
6th Jun 2022, 2:57 pm | #422 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,553
|
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. |
6th Jun 2022, 3:38 pm | #423 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,803
|
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. |
6th Jun 2022, 5:32 pm | #424 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,553
|
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. |
7th Jun 2022, 6:56 pm | #425 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,803
|
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. |
7th Jun 2022, 8:00 pm | #426 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,553
|
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. |
7th Jun 2022, 8:07 pm | #427 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,803
|
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:
|
|
7th Jun 2022, 8:25 pm | #428 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,553
|
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 |
7th Jun 2022, 8:51 pm | #429 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,803
|
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:
|
|
7th Jun 2022, 9:03 pm | #430 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,553
|
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. |