Anyone have success running "PET LOADER"

Discuss anything related to the VIC
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Anyone have success running "PET LOADER"

Post by ral-clan »

I tried to use PET LOADER from zimmers last night.

http://www.zimmers.net/anonftp/pub/cbm/ ... index.html

Zimmers only says it needs 8K. I had a 16K expander plugged in. If I loaded it with ,8 I would get a Syntax error when trying to run it, and listing only showed one garbled line of code.

If I load it with ,8,1 it will load but then I get a error when I try to load anything else.

How do I use this program? Does it have to be sys'd or loaded into block 5?

I assume it is a 40 column emulator and translates all the PET pokes to VIC pokes, or something.

Can anyone help? There is no documentation.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

You need at least 8K memory in block 1 AND 8K in block 5, which is where the cartridge image loads. If you don't have a regular memory expansion as well, it just hangs upon starting.

Do a soft reset (SYS 64802) to start the program. Out of the 11775 bytes free, only 4985 remain. Exactly what it does, to which degree it emulates a PET w.r.t. memory map, I don't know.
Anders Carlsson

Image Image Image Image Image
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

Okay, thanks. On Zimmers it doesn't mention anything about it being a cartridge image, or needing to be in block 5...or the sys. This is probably something they should add there!

I do have a 32K Ram expander which should handle this, then.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Well, the file is located in roms/tools/8k which tells me it is a ROM dump, most likely from some cartridge. If not otherwise specified, they tend to go into block 5 and no further comment about memory expansion would be needed. But feel free to improve the description, in particular if you find out that it will work with some 40 column PET software or not. I suppose you want all expansion memory enabled to get as much space for loading programs as possible.
Anders Carlsson

Image Image Image Image Image
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

You guys got my curiosity ignited with that PET loader and I tried it just for the fun of it.

I looked at the file content using WinHex and found the load address is $A000 so there is your confirmation this most certainly was a cart destined to BLK5.

The first thing I noticed is that it doesn't seem to like NTSC at all. That's too bad cuz it would be nice to have a 40x25 display available in ROM on the real VIC. But this seems like it would be an easy issue to fix for anyone who's a good programmer willing to sift through the code to shift the screen right/left and up/down alignment.

Blindly type POKE36864,6 and POKE36865,25 and the display will go back within normal range for NTSC.

The other thing I noticed is that hitting shift-Commodore to switch upper/lower case no longer works. The good old VIC-40 (the software, not the machine) supports that and so does a real PET, I believe.

However, typing ?CHR$(14) does switch you to lower case and the beauty of it is that you can have both upper case mode characters and lower case mode characters at the same time on screen and neither the real PET or VIC can normally do that.

The last thing I noticed is that unlike many PETs, this does not carry Basic V4. Also since the VIC's Basic V4 cart also is made to show up at $A000 then you can't have it in at the same time.

The 40 column emulation is quite good and all custom Commodore graphic characters are supported but some of them have been garbled. Try C= A for example.

I guess the rest will come from using real PET software with it.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

Oh, thanks for that bit of info Eslapion.

I hope someone can fix it for NTSC. I really enjoyed using a PET back in the 80s and would like to load some of the software on my VIC.

Since I have a 40 column card I can obviously convert some of the software manually, but it would be nice to have an automatic emulator like this.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Actually, the start address is $BA86. The ROM dump is for most part empty all the way up to $B088, where some text in German appears: "Ein gabe im format".

The screen is set up based on values stored in $B480 and onwards, which is copied to $2680 (RAM). In theory, it would be enough to:

POKE 46208,6:POKE 46209,25:SYS64802 to adjust it for NTSC.
Anders Carlsson

Image Image Image Image Image
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Post by eslapion »

carlsson wrote:Actually, the start address is $BA86. The ROM dump is for most part empty all the way up to $B088, where some text in German appears: "Ein gabe im format".

The screen is set up based on values stored in $B480 and onwards, which is copied to $2680 (RAM). In theory, it would be enough to:

POKE 46208,6:POKE 46209,25:SYS64802 to adjust it for NTSC.
Correct me if I am wrong but this actually modifies the ROM dump so it becomes NTSC compatible.

There is a lot of other games which could be made NTSC compatible with little tricks like that.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Post by ral-clan »

I did try PET LOADER with carlsson's POKES and got it to function. While it is impressive in its 40 column screen, it unfortunately does not translate PET POKE calls to VIC RAM locations....therefore, any PET games which POKE to the screen, etc. do not work entirely.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Yes, I think nbla000 with a little help from me went through a number of cartridge images (as well as tape images) earlier this year and adopted them from NTSC to PAL. Preferrably one would patch each image so it positions correctly independent on video mode. Sometimes it is easy to do, sometimes more difficult. That only applies to those programs where screen positioning is trivial.

I'm not surprised that the PET "emulator" doesn't emulate much of a PET. There is a similar program for the C64. Does anyone know if it translates common POKEs?
Anders Carlsson

Image Image Image Image Image
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post by MacbthPSW »

carlsson wrote:I'm not surprised that the PET "emulator" doesn't emulate much of a PET. There is a similar program for the C64. Does anyone know if it translates common POKEs?
I'm pretty sure it just configures the C64 memory map to match that of the PET as closely as possible. It doesn't do any actual step by step translation/emulation as a program RUNs.
Forbidden64
Vic 20 Hobbyist
Posts: 146
Joined: Sun Feb 28, 2016 9:59 pm
Location: CA USA

Re:

Post by Forbidden64 »

eslapion wrote: Thu Dec 28, 2006 2:37 am
carlsson wrote:Actually, the start address is $BA86. The ROM dump is for most part empty all the way up to $B088, where some text in German appears: "Ein gabe im format".

The screen is set up based on values stored in $B480 and onwards, which is copied to $2680 (RAM). In theory, it would be enough to:

POKE 46208,6:POKE 46209,25:SYS64802 to adjust it for NTSC.
Correct me if I am wrong but this actually modifies the ROM dump so it becomes NTSC compatible.

There is a lot of other games which could be made NTSC compatible with little tricks like that.
Necro-bump! I did exactly that, and saved it out to a prg with vice monitor.

Thanks for hunting down the sequence, sir. The only way I found them was to hunt for sequence and match what was at 2680 with what was between a000-bfff which was listed later around ~b84e to copy from lda 2680,y to sta 9000,y. I couldn't find any reference actually copying the data down to 2680 from b480. Maybe we did the same thing? Or perhaps you did more digging than I did. Anyway, easy peasy thanks to you!

Unfortunately, I don't see any option to attach the zip file in the forum like there used to be :< .

Anyway, what I can see this being is a 16KB ram board with an 8KB rom cartridge also built in. When you plug it in, it just boots right into 40 columns! Otherwise you would have to use a bus extension to add multiple carts. Else, you could get away with using a 32k expander and loading from whatever source you want. wavprg could make a tape image for example.

I can't seem to get tinyupload to work either so...anyway I DO have it if anyone wants it. I tested it to work on NTSC + 8K. Works fine.

Also, I think this program needs some work. For starters where is the green screen!? Or at least black and white to simulate the 2001-8. Also, the BASIC prompt is all wrong. Maybe I can use all that space in A000-AFFF for some noodling around to make some cosmetic changes.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: Anyone have success running "PET LOADER"

Post by ral-clan »

It still needs to do POKE translations on the fly though to be a real PET emulator (i.e. just load PET software and play).
PS: I can't believe I posted the original post FOURTEEN YEARS ago! Wow!
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
desiv
Vic 20 Newbie
Posts: 10
Joined: Sat Feb 22, 2020 4:52 pm
Location: Oregon
Occupation: IT Manager

Re: Anyone have success running "PET LOADER"

Post by desiv »

Yeah about the Pokes.
According to Techtinkering, the best program for PET compatibility is Vic40/Fat40.
https://techtinkering.com/articles/40-c ... re-vic-20/

I've only tested one basic BASIC :-) PET program (Avalon Hill's NukeWar) and that worked fine in several of the 40 column programs including PET Loader, so it must not use those pokes.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: Anyone have success running "PET LOADER"

Post by ral-clan »

I think the Avalon Hill games were programmed in almost vanilla (i.e. cross platform) BASIC so they could easily be ported across systems. Therefore I would expect few to no POKEs.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
Post Reply