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 20th Oct 2022, 10:32 am   #1
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
Default PET Application ROMs

So I know this is possible, but I need some hints on how to get started.

What I'd like to be able to do is put an app or game (BASIC or machine code) into a ROM, put the ROM into one of my spare sockets and (I'm guessing here) call it with a SYS command from the command prompt.

Has anyone done this? I have some spare 2532s I can use.

Any help gratefully received.

Thanks.

Colin.
ScottishColin is online now  
Old 20th Oct 2022, 1:10 pm   #2
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
Default Re: PET Application ROMs

Not a PET expert as you know, but:

First step would be to save an 'image' file of the programme from where it normally resides in RAM - maybe save it on an SD card so you can then transfer it to your PC.

Copy that code to one OR MORE eproms, however many you need to contain all of the code - given that each one can contain up to 4K. However many EPROMs you need to contain the application, there should be some empty space at the end of the last one, unless your app is exactly 4K/8K/12K/16K long.

Write a short machine code program which will first copy the code out of the EPROMs and back into the original RAM addresses it came from, and then secondly jump to the original execution address of the code in RAM.

Place this self-written machine code copy/run code at a known address in the empty space at the end of the last EPROM.

To run the code and thereby copy the program back into RAM and run it, enter SYS (known address), where 'known address' is the address in EPROM where your copy / run code starts.

There are probably all sorts of reasons why this won't work and I can't help you with the exact detail, but that is broadly the way I would look to do it.

Programs which were written to run in RAM can't be assumed to be able to work directly from EPROM, the reason being that they may use memory locations within the area of the code itself to store values which change. If you try to run a normally RAM resident program directly from ROM, it may fall over because it is unable to write to / change some of the areas it expects to be able to. Hence the suggestion that the code would need to be copied from the EPROM back to its original location in RAM first, and then run there.

Programs which do run from ROM, i.e., were always intended to be supplied in a ROM, are 'aware' that if they want to store variables or counters or any other quantity, they have to do it in RAM which is external to the ROM.
SiriusHardware is online now  
Old 21st Oct 2022, 8:27 am   #3
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
Default Re: PET Application ROMs

If you know your way around the VICE Commodore emulator, that's probably the best way to experiement with this as I think it lets you 'install' image files as EPROMs, although that may or may not cover ALL of the EPROM slots.

VICE might also let you make memory snapshot files, so that could be the easiest way to convert a program loaded in VICE to an equivalent binary file for programming into an EPROM or set of EPROMs.
SiriusHardware is online now  
Old 21st Oct 2022, 4:47 pm   #4
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,807
Default Re: PET Application ROMs

VICE is a really good idea. Thanks. Away for a few days in St Andrews and Dunbar so I'll start when I get back.

Colin.
ScottishColin is online now  
Closed Thread




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