Commodore 128 Alive!

Commodore 128 => 128 programmers => VDC Programming => Topic started by: MIRKOSOFT on December 11, 2010, 01:22 PM

Title: VDC RAM SIZE - how to get it EASY?
Post by: MIRKOSOFT on December 11, 2010, 01:22 PM
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
Title: Re: VDC RAM SIZE - how to get it EASY?
Post by: BigDumbDinosaur on December 11, 2010, 03:42 PM
How about if you actually search the site before posting such questions.  You could start by looking right here (http://www.commodore128.org/index.php?topic=2294.0), which was under your nose as you posted.
Title: Re: VDC RAM SIZE - how to get it EASY - solved in assembler too
Post by: MIRKOSOFT on December 11, 2010, 03:53 PM
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

EhPortal 1.34 © 2025, WebDev