VDC size in C64 mode

Started by MIRKOSOFT, October 03, 2009, 03:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!

I know that in C64 mode of C128 can be used VDC-RAM area, through registers $D600/$D601 like in C128 mode.

But how to know that VDC-RAM is 16kB or 64kB?

Why?
I want to write C64 utility which detects if is running on real C64 or in C64 mode of C128 - then, if in C64 mode of C128 I want to use VDC-RAM as buffer for data, if on real C64, buffer will not to be used.

VDC-register 28, bit 4 - detects (no automatic) which type of chip is used 4164 (64kB RAM) or 4416 (16kB RAM), but at "Mapping your C128" is written that it's not only size of RAM. There's written that VDC-RAM can be in four 4416 RAM chips (4 x 16 = 64), or in one 4164 (1 x 64).

So, VDC-register, bit 4 is only chip type or RAM size, or how to detect size of VDC-RAM in C64mode of C128?

Thanks for every reply.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

BigDumbDinosaur

There's a program I posted under this section that shows how to determine how much VRAM is attached to the VDC.  You should be able to suitably modify it to run in 64 mode.  Just take out the calls to the C-128 screen kernal 80 column primitives, replace them with code that talks directly to the VDC, and remove the screen kernal call that refreshes the character defs.
x86?  We ain't got no x86.  We don't need no stinking x86!