VDC RAM SIZE - how to get it EASY?

Started by MIRKOSOFT, December 11, 2010, 01:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!

I know some programming techniques how to detect size of VDC RAM, but I want to do it simplest as is possible...

Here's st. what I found in VDC-registers description:



R28/$1C (bit4) 8563 RAM TYPE (4416/4164)

4164 RAM (1 × 64 kB) or 4416 RAM (16 kB × 4)

Size of VDC-Ram    0 = 16 kB Ram
         1 = 64 kB Ram

so it could work with:

BANK15
SYS DEC("CDDA"),,28
RREG A = 64kB=63/16kB=47
A AND 16 = 64kB=1/16kB=0




but in any C128 book I found this:

>>>>no automatic recognized<<<<

so, how to get the correct value?
'Cause sometimes it returns first and sometimes 2nd...
(I have C128DCR 64kB VDC and C128 16kB VDC and it's mismatch with this register).

If you can help, it can be also in Assembler.

Many 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

How about if you actually search the site before posting such questions.  You could start by looking right here, which was under your nose as you posted.
x86?  We ain't got no x86.  We don't need no stinking x86!

MIRKOSOFT

Hi!


Many thanks!


At this night I solved it by small assembler code:
1. writting known values at VDC$C000
2. writting other known values at VDC$0000
3. testing values at VDC$C000
- if 64kB all equals
- if 16kB testing starts not at VDC$C000 (overflow $3FFF), but on $0000 and compare fails


Miro

MIRKOSOFT of megabytes

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

http://www.mirkosoft.sk