PET startup sequence?? (was LF: Commodore PET schematics, troubleshooting info)

From: Ethan Dicks <dickset_at_amanda.spole.gov>
Date: Tue Aug 10 21:03:20 2004

On Tue, Aug 10, 2004 at 09:45:44PM -0400, Dave Dunfield wrote:
> I did remove and socket the ROM's today - so with an EPROM emulator I can put
> boot code in fairly easily - anyone know what the minimum I need to do to setup
> the video and any other essential hardware is?

If you want the keyboard to work, you'll need to set up one of the 6520s. If
you just want to see stuff on the screen, there's a table in the ROMs that is
loaded into the 6545 CTRC. There are two sets of values, one for 4032 and one
for 8032 (different ROMs). The other chips are used for IEEE-488, cassette
control, and the user port. No initialization for your purposes required AFAIK.

> Also a memory MAP would be
> handy (I think I saw one in the Archive - I'll look, however if anyone knows
> where the RAM limits are and where Video memory is - could save me sime time.

RAM is $0000-$7FFF on a 32K PET. Video memory starts at $8000. ROM space
starts at $9000 and goes to $FFFF except for a chunk in the $Exxx block that
is for I/O chips (6520, 6522...). Note that depending on how your machine is
equipped, it is likely that there are a couple of empty ROM blocks at the
bottom of ROM space. On a BASIC 4 machine, ISTR $9000 and $A000 were open
for user-added firmware (BASICaid, BASIC Toolkit, TMON, WordPro, etc.).
Mine were always full. :-)

> If I can figure out where the RAM is, and how to write to the screen, I can
> boot a small RAM test in the Kernal ROM space.

Once you extract the table and load the 6545, you should be able to sling
bytes at the screen starting at $8000. Remember that "POKE codes" are not
ASCII nor PETSCII, they are character codes from the chargen ROM (not
accessible to 6502 memory space). There should be some docs on this on funet.
As an example, though, while you might "PRINT CHR$(65)" to get an 'A' on the
screen, you'd "POKE 32768,1" to get that 'A' to appear in the upper left
corner of the screen.

As for a memory map... $0000-$00FF is zero-page... 99% of it is allocated when
running BASIC. $0100-$01FF is the stack. $0200-$03FF is used by various
things like line edit buffers, cassette buffers, 8032 screen editor variables,
etc. BASIC RAM starts at $0400 with a zero byte, then your program goes from
$0401 up. At this level of detail, all PETs are the same. What changes from
model to model is exactly which zero page locations are used for exactly
which functions, etc. Note that unlike the VIC-20 or C-64, you cannot move
screen RAM around by twiddling a video chip register... the video is fixed
on PETs.

-- 
Ethan Dicks, A-130-S      Current South Pole Weather at 11-Aug-2004 01:50 Z
South Pole Station
PSC 468 Box 400       Temp -65.8 F (-54.3 C)    Windchill     -106.6 F (-77 C)
APO AP 96598          Wind  15.6 kts Grid 348   Barometer  682.5 mb (10532 ft)
Ethan.Dicks_at_amanda.spole.gov     http://penguincentral.com/penguincentral.html
Received on Tue Aug 10 2004 - 21:03:20 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:33 BST