You are not logged in.

MIRKOSOFT

Unregistered

1

Thursday, September 16th 2010, 10:41pm

Has C64 layout vectors like C128?

Hi!

I have stupid Q:

Has C64 layout vectors like C128?

I think:
830-831/$033E-$033F Unshifted
832-833/$0340-$0341 SHIFT
834-835/$0342-$0343 Commodore
836-837/$0344-$0345 CONTROL
838-839/$0346-$0347 ALT (same as unshifted)
840-841/$0348-$0349 CAPS LOCK

(Yes, I know that layout of ALT & CAPS LOCK has not)

Thank you very much for reply.

Miro

2

Friday, September 17th 2010, 12:17am

From the "Commodore 64 Bedienungshandbuch":

Source code

1
2
3
4
5
6
028D    652    Flag for SHIFT/CNTRL 1=SHIFT, 2=COMMODORE, 4=CONTROL
028E    653    last SHIFT pattern on keyboard
               (some else please explain the difference to the previous address)
028F    654    pointer to the keyboard decoding table, low byte normaly: $48
0290    655    pointer to the keyboard decoding table, high byte normaly: $EB
0291    656    SHIFT mode (0=set, 128=locked)


I'll attach a small C listing and binary, just for my enjoyment.
P.S: Perhaps I did not get you right, or you asked the wrong question. Did you perhaps mean location of pointers to (shifted) charsets?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <conio.h>

int main( void )
{
    unsigned int i;
    clrscr();
    for (;;)
    {  
        gotoxy(0,0);
        for ( i = 653; i < 658; ++i )
        {  
            cprintf("$%4x / %3d:  $%-2x\n\r", i, i, *(unsigned char *) i );
        }
    }
}
moiree has attached the following file:
  • shift.prg (2.49 kB - 1 times downloaded - latest: Feb 18th 2011, 11:19pm)

MIRKOSOFT

Unregistered

3

Friday, September 17th 2010, 12:56am

It's OK

You gave me correct answer.

I mean keyboard layout, so you wrote:

$028F $48 $EB

so layout is at $EB48...

Also, need to know keyscan routine (address) - indirect jump so:

JSR ($XXXX)

not

JSR $XXXX

know you this?

Why I want this?

I did keyscan driver for Slovak keyboard on C128 (not released yet), uses all Slovak characters... so I want to create it also on C64...

So, write also vector of keyscan routine.
Many thanks.

Miro

4

Friday, September 17th 2010, 1:21am

From http://www.zimmers.net/anonftp/pub/cbm/maps/C64rom.doc

Source code

1
2
3
4
5
6
7
8
ea87    60039   scnkey  Scan Keyboard
eadd    60125   -   Process Key Image
eb79    60281   -   Pointers to Keyboard decoding tables    WORD
eb81    60289   -   Keyboard 1 -- Unshifted         DATA
ebc2    60354   -   Keyboard 2 -- Shifted           DATA
ec03    60419   -   Keyboard 3 -- Commodore         DATA
ec44    60484   -   Graphics/Text Control
ec78    60536   -   Keyboard 4 -- Control           DATA

MIRKOSOFT

Unregistered

5

Friday, September 17th 2010, 1:26am

Thank you...

...but know you any indirect vector?

To change:

JMP my_scan
---key found > cont
---key not found > JMP original_scan

Miro

6

Friday, September 17th 2010, 1:43am

Sorry, I am lost there.
Perhaps you want to look at $EADD yourself?

Source code

1
EADD: 6C 8F 02  JMP ($028F)   ; Vector: Routine to determine Keyboard table

MIRKOSOFT

Unregistered

7

Friday, September 17th 2010, 1:53am

Thank you!

In this I can find it, many many thanks for this link!


Miro