VDC VIDEO RAM DETECTION & SETUP

Started by BigDumbDinosaur, May 21, 2008, 03:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BigDumbDinosaur

The attached program is an enhanced version of a VDC RAM detection program I published a while ago.  This one includes code that will correctly configure the VDC in a flat 128 that has been upgraded to 64K of video RAM (VRAM)

After loading this program, run it from BASIC as follows:

    BANK 15 : SYS DEC("0B00") : RREG VS
    PRINT "This C-128 has";VS;"K video RAM."


VS will equal 16 for a C-128 with 16K of VRAM or 64 for a machine with 64K of VRAM.

If your C-128 is a flat unit with 1985 ROMs but has been upgraded to 64K of VRAM, it will not automatically recognize the extra RAM.  The 1985 ROMs always tell the VDC that it has 16K.  This program will detect such a situation and change the VDC settings so it does recognize the full extent of VRAM.  This reconfiguration process will disrupt the 80 column display, which can be corrected by clearing the screen afterward.

As a side note, the 80 Column Display Manager includes this enhanced detection process.
x86?  We ain't got no x86.  We don't need no stinking x86!

airship

Does this mean my VDC is NOT using the 16K upgrade RAM in my flat C128?

BASIC 8 runs fine...
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

RobertB

#2
Quote from: airship on September 01, 2009, 01:30 AM
Does this mean my VDC is NOT using the 16K upgrade RAM in my flat C128?
16K video ram is the standard on the flat C128.  An upgrade would be to change it over to 64K video ram or to use a C128DCR which already has 64K video ram.
QuoteBASIC 8 runs fine...
With 16K video ram, BASIC 8 would run fine, but it wouldn't run at its full potential.  Here are some relevant quotes from the BASIC 8 manual.

"...it is not possible to display a full 640 x200 color screen in any of the color modes with only the standard 16K."

"If you have installed the full 64K of ram (or have a C128D) you can use any display mode as well as virtual screens larger than 640 x 200.  However in a standard C128 there is only 16K, so to get around this limitatation and still provide color, you must define screens that are less than 200 pixels high, which frees some ram to be used for color information.  You can define your own screens using the @SCRDEF (SCReen DEFinition) command, or simply use the @MODE,0 command to define 8 separate screens designed for the 16K C128.  These screens make allowances for the limited memory, and create screen displays of various heights and resolutions.  They are as follows:

SCREEN 0   640 X 200 Monochrome
SCREEN 1   640 X 192 Color 8 X 16
SCREEN 2   640 X 176 Color 8 X 8
SCREEN 3   640 X 152 Color 8 X 4
SCREEN 4   640 X 104 Color 8 X 2
SCREEN 5   640 X 176 Color 8 X 8   Interlaced
SCREEN 6   640 X 152 Color 8 X 4   Interlaced
SCREEN 7   640 X 104 Color 8 X 2   Interlaced "

                 Truly,
                 Robert Bernardo
                 Fresno Commodore User Group
                 http://videocam.net.au/fcug
                 The Other Group of Amigoids
                 http://www.calweb.com/~rabel1/
                 Southern California Commodore & Amiga Network
                 http://www.sccaners.org

airship

Typo. I meant '64K upgrade', of course.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

BigDumbDinosaur

If I correctly recall, BASIC 8 probes the VDC to see if 64K of VRAM is present.

By default, an upgraded flat 128 will not know the extra RAM is there because the 1985 ROMs assume 16K.  80CDM tests for 64K of VRAM and if it is found, compares the VDC setup (specifically the setting of bit 4 in register 28) against what is required to recognize 64K of VRAM.  If necessary, 80CDM will tell the VDC it has 64K of VRAM and in the process, regenerate the font definitions, since the change invalidates the VDC's present notion of how RAM is organized.

If the machine has 1986 ROMs nothing has to be changed, since those ROMs assume the presence of 64K.
x86?  We ain't got no x86.  We don't need no stinking x86!

dr.v

Quote from: BigDumbDinosaur on May 21, 2008, 03:07 PM
The attached program is an enhanced version of a VDC RAM detection program I published a while ago.  This one includes code that will correctly configure the VDC in a flat 128 that has been upgraded to 64K of video RAM (VRAM)

BDD - did you publish this in the sense that you published the source code?  If so, could you direct me to the source?  I'm working on a project where I would like to use the VDC ram for purposes other than for the 8563.

Tom

BigDumbDinosaur

Quote from: dr.v on April 16, 2010, 12:40 PMBDD - did you publish this in the sense that you published the source code?  If so, could you direct me to the source?  I'm working on a project where I would like to use the VDC ram for purposes other than for the 8563.

Tom
Please see attachment.
x86?  We ain't got no x86.  We don't need no stinking x86!