PET memory mapping question

Let's talk about anything related to the 6502 microprocessor.
Post Reply
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

PET memory mapping question

Post by cbmeeks »

If you read the information at http://www.6502.org/users/andre/petindex/progmod.html you will see the following:
Quote:
$8000-$8FFF
Screen memory. Board #1 and #2 have 1k of screen RAM, mirrored 4 times. Board #3 has (1k for 40 cols or??) 2k of RAM, mirrored 2 times. The CRTC address range is limited to the screen RAM. Board #4 uses normal CPU memory for the screen, i.e. the screen memory size is 4k. The CRTC on board #4 can address 8k, however.
I'm a little puzzled by this. I can't imagine a 8032 PET (or similar) being able to use 4K for screen RAM. 80x25 characters would be a little under 2K. So I assume 4000-series PET's (40 columns) would only be able to access 1K (40x25 = 1000) and the 8000-series PETS could access 2K (80x25 = 2000). That makes sense. But which ones could access 4K completely and why was it used? Were there versions of PET with higher than 80 columns?

Thanks.
Cat; the other white meat.
User avatar
jim30109
Posts: 45
Joined: 31 Mar 2017

Re: PET memory mapping question

Post by jim30109 »

I'm not a PET guy (always wanted one, but couldn't afford it at the time), but we had a few at the college. They were used for data acquisition with various equipment so we didn't do any real programming of them for our classes.

I am going totally from memory, but I'm pretty sure there was some kind of trick to double the line count (so you had 80 characters by 50 lines) on at least one of the models we used. It wasn't particularly readable but there were character based graphics that could use that mode. I'm not sure if that was standard or a modification.

Jim
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: PET memory mapping question

Post by White Flame »

Double-buffering an 80x25 display would take 4k. Even outside of animation, that sort of thing can be useful for having a separate application screen vs debug/development screen, editing vs reporting screen, etc.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: PET memory mapping question

Post by barrym95838 »

cbmeeks wrote:
... I'm a little puzzled by this. I can't imagine a 8032 PET (or similar) being able to use 4K for screen RAM. 80x25 characters would be a little under 2K. So I assume 4000-series PET's (40 columns) would only be able to access 1K (40x25 = 1000) and the 8000-series PETS could access 2K (80x25 = 2000). That makes sense. But which ones could access 4K completely and why was it used? Were there versions of PET with higher than 80 columns?

Thanks.
I might have found a reasonable explanation here:

http://www.6502.org/users/sjgray/projec ... index.html
petdisplay.JPG
petdisplay.JPG (26.5 KiB) Viewed 978 times
Mike B.
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: PET memory mapping question

Post by sjgray »

Hey, that's from my Editor ROM page! ;-)

So, 4000 series have 1K ram installed. 8000 series has 2K ram. Ignore the colour info obviously.
The last 4000/8000 PET motherboard revision is called the "Universal Dynamic PET" motherboard. It is configurable for either 40 or 80 columns depending on jumpers installed plus memory chips etc. In the day you could install a big switcher to toggle between them, or install a 3rd-party board that used a bunch of multiplexer chips to do it for you (keep looking on my pages for an example ;-). Anyway, 1K or 2K is the normal amount of video ram that the "normal" PET machines used.

After the 4000/8000, Commodore released the 8296 machines. Its motherboard contained 128K ram. Like the C64, the entire address range can be ram if properly configured. Anyway, the CRTC video chip could access up to 8K (from $8000-$9FFF) as video memory. By re-configuring the CRTC chip registers you could set up alternate screen layouts. For example, a 100x30 character screen, or you could set the CRTC to only use 4-line high characters then double the rows to 50 (ie: 80x50 characters). By installing a special font rom you could get 160x100 "pixel" graphics (I have done this!). Of course there's no firmware support for these things but the CRTC chip is quite flexible.

Steve
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: PET memory mapping question

Post by sjgray »

jim30109 wrote:
I'm not a PET guy (always wanted one, but couldn't afford it at the time), but we had a few at the college. They were used for data acquisition with various equipment so we didn't do any real programming of them for our classes.

I am going totally from memory, but I'm pretty sure there was some kind of trick to double the line count (so you had 80 characters by 50 lines) on at least one of the models we used. It wasn't particularly readable but there were character based graphics that could use that mode. I'm not sure if that was standard or a modification.

Jim
If you have a specific 6545/6845 variant of the CRTC controller you can put the screen into interlace mode and have 50 lines, however you are still limited by the amount of video ram. So, if you have an 8032 it will have 2K ram. 80x25 just fits, but you could do 40x50. You can also play with the register that sets the character height (normally 8 lines in graphics mode, or 10 lines in text mode). There is a PET DEMO that modifies the height to display some amazing animated graphics: https://www.youtube.com/watch?v=ktUguF1TnJk

It's not a real "graphics mode", but it does increase the vertical resolution using the character height trick.

Steve
Post Reply