funkheld Posted November 10, 2020 Share Posted November 10, 2020 (edited) Hi good afternoon. where please can I find the character set for the "case" from kickc? Kickc-case: "A" = 63 "..." B "= 21? Thank you. greeting #pragma encoding(atascii) #pragma zp_reserve(0x00..0x7f) #include <string.h> #include <stdlib.h> char * const CH = 0x2FC; void * CIOV = 0xE456; struct ATARI_IOCB { char ICHID; char ICDNO; char ICCOM; char ICSTA; char* ICBA; char* ICPT; char* ICBL; char ICAX1; char ICAX2; char ICAX3; char ICAX4; char ICAX5; char ICAX6; }; struct ATARI_IOCB * const IOCB0 = 0x340; void main() { while (1) { *CH = 0xff; while(*CH == 0xff) ; char keyPressed = *CH; switch(keyPressed) { case 63: print("pebi-63\n"); break; case 21: print("pebi-21\n"); break; default: print("nix\n"); break; } } } void printc(char c) { char buffer[20]; memset(buffer, 0, 20); utoa(c, buffer, HEXADECIMAL); print(buffer); } void cputln() { print("\n"); } void print(char* message) { char *p = message; while (*p != 0) { if (*p == '\n') *p = 0x9b; p++; } IOCB0->ICCOM = 0x0b; IOCB0->ICBA = message; IOCB0->ICBL = strlen(message); asm { ldx #0 jmp CIOV } } Edited November 10, 2020 by funkheld Quote Link to comment Share on other sites More sharing options...
ilmenit Posted November 10, 2020 Share Posted November 10, 2020 (edited) 2 hours ago, funkheld said: Hi good afternoon. where can I find the character set for the "case" from kickc? Kickc-case: "A" = 63 "" B "= 21? you can check value of the pressed key to find it yourself Edited November 10, 2020 by ilmenit Quote Link to comment Share on other sites More sharing options...
zbyti Posted November 10, 2020 Share Posted November 10, 2020 I added this question to: 1 Quote Link to comment Share on other sites More sharing options...
xxl Posted November 10, 2020 Share Posted November 10, 2020 2 hours ago, funkheld said: where please can I find the character set for the "case" from kickc? Kickc-case: "A" = 63 "..." B "= 21? ldy $02fc lda ($79),y A = atascii code of pressed key you're welcome Quote Link to comment Share on other sites More sharing options...
Wilheim Posted November 10, 2020 Share Posted November 10, 2020 41 minutes ago, xxl said: ldy $02fc lda ($79),y A = atascii code of pressed key you're welcome Do you know if that works on OS-B? 1 1 Quote Link to comment Share on other sites More sharing options...
fenrock Posted November 10, 2020 Share Posted November 10, 2020 Hey @funkheld, this has nothing to do with kickc, it's a system value. I googled "atari internal key code CH" and found this page: https://atariwiki.org/wiki/Wiki.jsp?page=CH which has a nice table of values. 2 Quote Link to comment Share on other sites More sharing options...
zbyti Posted November 10, 2020 Share Posted November 10, 2020 As long as you keep responding in new threads, he will create them - simple as that. 2 Quote Link to comment Share on other sites More sharing options...
xxl Posted November 10, 2020 Share Posted November 10, 2020 1 hour ago, Wilheim said: Do you know if that works on OS-B? I do not think so The reference operating system is that shipped with XL / XE / XEGS computers. (if you write for Windows10, will you keep Windows95 compatible?) 2 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 10, 2020 Share Posted November 10, 2020 2 hours ago, xxl said: you're welcome Mad skillz, bruh. Quote Link to comment Share on other sites More sharing options...
Blues76 Posted November 10, 2020 Share Posted November 10, 2020 1 hour ago, zbyti said: As long as you keep responding in new threads, he will create them - simple as that. Isn’t it more organized to have a thread per question ? I’m wondering why would all the questions about X should be on one thread ? or maybe is better? I’m not arguing — Just curious. 1 Quote Link to comment Share on other sites More sharing options...
ivop Posted November 10, 2020 Share Posted November 10, 2020 1 hour ago, fenrock said: Hey @funkheld, this has nothing to do with kickc, it's a system value. I googled "atari internal key code CH" and found this page: https://atariwiki.org/wiki/Wiki.jsp?page=CH which has a nice table of values. I have recently typed in a similar table: https://github.com/ivop/pokey-explorer/blob/master/scancodes.s Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted November 10, 2020 Share Posted November 10, 2020 5 hours ago, ilmenit said: you can check value of the pressed key to find it yourself Just like this 10 CH=764 20 POKE CH,255 30 A=PEEK(CH):IF A=255 THEN 30 40 ? A 50 GOTO 20 Quote Link to comment Share on other sites More sharing options...
funkheld Posted November 10, 2020 Author Share Posted November 10, 2020 Hello, thanks for the help. I didn't know the table for CH. greeting Quote Link to comment Share on other sites More sharing options...
+Stephen Posted November 10, 2020 Share Posted November 10, 2020 2 hours ago, Wilheim said: Do you know if that works on OS-B? Will it break on an Ultimate 1MB equipped machine? Quote Link to comment Share on other sites More sharing options...
xxl Posted November 10, 2020 Share Posted November 10, 2020 6 minutes ago, funkheld said: I didn't know the table for CH. of course, the address is here: KEYDEF = 79.7A ($ FB51) you don't need any external arrays and the idea of checking is bizarre 3 minutes ago, Stephen said: Will it break on an Ultimate 1MB equipped machine? try to run SynFile + on a computer with U1MB you will find out ? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted November 10, 2020 Share Posted November 10, 2020 44 minutes ago, funkheld said: I didn't know the table for CH. @ivop and @fenrock have given you links to sites that show you the conversion codes or just use the BASIC program I gave you to look them up yourself Quote Link to comment Share on other sites More sharing options...
zbyti Posted November 10, 2020 Share Posted November 10, 2020 (edited) 2 hours ago, Blues76 said: Isn’t it more organized to have a thread per question ? I’m wondering why would all the questions about X should be on one thread ? or maybe is better? I’m not arguing — Just curious. Not in this case This guy have a long history of asking the same questions over and over without noticeable progress in understanding A8 hardware. Looks like he thinks that programming language is the key to his problems, he tried more programming languages on A8 then me and came to conclusion: "all of them are bad" Edited November 10, 2020 by zbyti typo 1 1 Quote Link to comment Share on other sites More sharing options...
xxl Posted November 10, 2020 Share Posted November 10, 2020 12 minutes ago, zbyti said: This guy have a long history of asking the same questions over and over without noticeable progress in understanding A8 hardware. maybe take care of your own life and let others progress at their own pace 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted November 10, 2020 Share Posted November 10, 2020 (edited) 46 minutes ago, xxl said: maybe take care of your own life and let others progress at their own pace If you say so... Who will teach @funkheld better then you? :] Edited November 10, 2020 by zbyti typo 1 1 Quote Link to comment Share on other sites More sharing options...
Gury Posted November 10, 2020 Share Posted November 10, 2020 1 hour ago, xxl said: maybe take care of your own life and let others progress at their own pace Of course we take care of our own lives, but that guy really annoys me and some others, too. I have nothing against his learning course and its progress (if we can call it so), but he keeps up with spaming this forum with continuing (similar) questions. That is why I created a topic for him, but he ignores it. I really don't know what funkheld wants to accomplish. He just drive himself between various languages and keep asking very basic stuff. 1 Quote Link to comment Share on other sites More sharing options...
xxl Posted November 10, 2020 Share Posted November 10, 2020 and what? moreover, probably not so basic, since some of the answers reveal an even lower level of knowledge. if you are annoyed by his questions, do not read them. Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted November 10, 2020 Share Posted November 10, 2020 5 hours ago, Wilheim said: Do you know if that works on OS-B? The whole method is not recommended since the keyboard table and its interpretation is system dependent. You can check whether a key is pressed, but to find out which key is pressed, use the K: handler. That is, along the lines: 10 OPEN #1,4,0,"K:" 20 IF PEEK(764) = 255 THEN REM NO KEY PRESSED 20 GET #1,A:REM NOW THAT IS THE KEY This way, the operating system is responsible for the translation, which is a portable solution. The above would work irrespectively of the Os version. Quote Link to comment Share on other sites More sharing options...
ivop Posted November 10, 2020 Share Posted November 10, 2020 (edited) Funkheld progressing with "the kickc" Edited November 10, 2020 by ivop Quote Link to comment Share on other sites More sharing options...
zbyti Posted November 10, 2020 Share Posted November 10, 2020 11 minutes ago, ivop said: Funkheld progressing with "the kickc" more to come, no worry Quote Link to comment Share on other sites More sharing options...
ivop Posted November 10, 2020 Share Posted November 10, 2020 11 minutes ago, zbyti said: more to come, no worry I think you misunderstood my comment. He actually is progressing. Look at his code in that thread. It's far from perfect, but a lot better than before. And practice.... And maybe, one day, we can convince him to not spam the forum with new threads every other day 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.