Login
Back to forumReply to this topicGo to last reply

Posted By

MIRKOSOFT
on 2013-08-07
15:17:06
 How to checkC16/116 RAM size

Hi!

I'm really programmer of Commodore 128. We preparing BIOS which can work on platforms:
128/64/64DTV/64SX/16/116/+4/TED

For Commodore 16, 116 and 232 I need check size of RAM (I mean main memory or internal upgrade if is available, no external RAM expansions).
Exist any PEEK or ML routine how to check it? Nice will be checking RAM size of C+4.

For TED series I know these values which make it different than other computer models:
PEEK (65532) / (65534) / (53296)
16 / 246 / 255 / 255
232 / 246 / 255 / 255
264 / 246 / 255 / 255
364 / 246 / 255 / 255
+4 / 246 / 255 / 0

Many thanks for every help, reply or comments.

Miro

Posted By

Csabo
on 2013-08-07
19:30:45
 Re: How to checkC16/116 RAM size

Hi Miro,

I think the standard way of checking memory is writing to a location and reading back the value. On a C16, memory areas above $4000 are all mapped to the available memory. (So, for example, writing a value to $1000, or $5000, or $9000 all go to $1000).

Here's the pseudo code:
- Write $AA to $5000, and then write $55 to $1000. (The values don't really matter, all that matters is that they are different.)
- read from $5000. If it's $55, then you have only 16K memory.

Checking for 32K would be done the same way, but with memory locations $1000 and $9000.

Hope this helps, let me know if you need the actual code, but I think based on the above you should be able to write it easily.

Posted By

MIRKOSOFT
on 2013-08-08
10:37:18
 Re: How to checkC16/116 RAM size

Many thanks, works!

My wish is now only one:

Is possible to find any difference between:
C16 and C116? If, how to do it, they have both 16K RAM...
C264 and C364? If, how to do it, also same RAM size 64K, but C364 has speech module...

I mean that every machine must to have st. different:
C16 has other keyboard layout than C116 and also 264 than 364 - e.g. NumPad.
But I'm not TED programmer... this causes many Qs...

Many thanks for all, idea, help, reply or comments.

Miro

Posted By

MIRKOSOFT
on 2013-08-08
10:48:53
 Re: How to checkC16/116 RAM size

BTW. Commodore 128 needs extra decoding of keyboard 'cause has NumPad and other control keys.
These keys 64 mode don't see if it is not programmed to allow 64 mode see these keys...

This was why I wrote about keyboards layout of 364 and 116...

In case of 364 I mean NumPad makes keyboard other decoding 'cause matrix for standard keyboard (+4/16/232/264, maybe 116 too) has enought space for decoding type as C64...

Thank you for help.

Miro

Posted By

Csabo
on 2013-08-08
13:01:00
 Re: How to checkC16/116 RAM size

I personally don't know of a way to distinguish between the C16 and C116, I don't think there's a way. The two machines should be identical, except for the keyboard type / case.

Detecting the 364 is probably possible, Gaia should be able to help you out. He has very good knowledge of the extra chip that's in it, since he added emulation of this machine to YAPE. However, that discussion will be only academic (=pointless happy) - in practice, there won't be any machines to run this code on. AFAIK only 3 units were ever made, and those were only prototypes.

Posted By

MIRKOSOFT
on 2013-08-08
16:48:26
 Re: How to checkC16/116 RAM size

Thank you.

I meant difference between C16 and 116 can be in matrix 'cause case and keyboard is other.
But if these machines are hardware and software identical, it's not possible to check it.
C116 has missing SHIFT LOCK key. It was in case of C64 and C128 hardwired. So, this is only one way how to check difference.
Of course by software is SHIFT LOCK working as left shift, but with C128 I did software detection its status and used it in national models of C128 as CAPS LOCK 'cause they have instead CAPS LOCK national charset switcher named ASCII/DIN(CC)...
My program works in this order:
ASCII/DIN - switches Chargen ROM and layout standard/national
SHIFT LOCK - activates CAPS LOCK matrix and interrupt checks if was pressed left shift or SHIFT LOCK... when is SHIFT LOCK released, activates standard matrix.

This option is in case of C116 not available and no one key is hardwired. Matrix is the same, 'cause SHIFT LOCK is mapped like LEFT SHIFT. But if I can detect SHIFT LOCK on C128 then is not possible to detect SHIFT LOCK on C116...

Machine C364:
Yes, I know that its very rare model, but if is creating any software, cannot happen that anywhere is confusion... computers don't know state "confused" and when program has to run correctly, must to calculate with all options.

I try to contact Gaia, is he on this forum?

Miro

Posted By

Csabo
on 2013-08-08
16:53:04
 Re: How to checkC16/116 RAM size

Yeah, he visits most days, so I think he will respond here (eventually). happy

Posted By

Gaia
on 2013-08-14
16:43:36
 Re: How to checkC16/116 RAM size

I don't see the point in making anything detection for the C364 when there exist only 2 known working prototypes...? Anyway...

The speech glue logic ASIC (MOS8706) is mapped in at $FD20-FD22 on the C364 where register #2 is the DATA register, so try writing the aforementioned $55/$AA values in there and reading them back at least twice. In case you can read back the previously written value reliably then you are most likely dealing with a C364. Most likely... it is only speculation as there is almost noone on Earth who could test this hypothesis. It could just as well be so that this register is write-only (similarly to the SID), just looking at the Speech ROM we can not tell because it is only writing to it but never reading back anything and alas we do not have any schematics either.

Posted By

Litwr
on 2013-08-16
01:17:05
 Re: How to checkC16/116 RAM size

The kernal ROM image from [http://www.zimmers.net/cbmpics/cv364.html] is not the same as for +4. 898 bytes differ it from NTSC standard ROM and 350 bytes from standard PAL ROM.

Posted By

Csabo
on 2013-08-16
10:44:04
 Re: How to checkC16/116 RAM size

Good idea, but without real machines to verify any of this, it's not much use... It's possible that each of the prototypes had a different ROM version. So probably checking for the presence of the chip is best, but again, it's not something we can test.

Posted By

SVS
on 2013-08-16
11:30:57
 Re: How to checkC16/116 RAM size

C16 & C+4: Rom at $800A = $20
C364: Rom at $800A = $53

hoping to be right wink

Posted By

crock
on 2013-08-17
18:18:14
 Re: How to checkC16/116 RAM size

That '364' ROM image linked to is the well known 318004-01 revision 1 kernal ROM found in all the prototype machines I've seen, including my 232 and prototype C16 board.

Posted By

siz
on 2013-08-18
03:48:41
 Re: How to checkC16/116 RAM size

As the V364 KERNAL ROM is a standard 264 series KERNAL there should be no differences in the keyboard handling of the machines. I seem to remember that I've read somewhere that the numeric keypad's wires are connected to the normal keyboard so you can't differentiate between a keypress on the numeric keypad or the alphabetic keyboard.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon