From: Tim Schürmann (tischuer_at_web.de)
Date: 2003-03-16 10:39:47
Hi! Ullrich von Bassewitz schrieb: > On Sat, Mar 15, 2003 at 05:08:34PM +0100, Tim Schürmann wrote: > > Now, i have another problem: after switching to the upper memory, cursor(1) has > > a strange behavior. On each screen-position it shows a diffrent charcter. Is > > this correct or did i something wrong? > > I cannot really imagine how this error looks, and I don't know which memory > area is used for the character set, so I cannot comment on that. I've done some tests and wrote a little testing-program. When you run it, you can see that the chars are correct (in the testphrase; even the lower-case charset is there if you switch to it by pressing C= and Shift). But if you try to type the letter "t", the cursor looks not very normal. To see the difference, delete the "copy"-part in the beginning. It don't matter where you place the charset and the screen (under the kernal): the result is the same. btw: when i use the memory-configuration from the plasma.c demo (screen at $e000, char at $e800), the lower-case charset is gone or messed up. Does anybody know why? ----- snipp ---- #include <stdlib.h> #include <conio.h> #include <string.h> #include <6502.h> /* for CLI and SEI-macros */ /* POKE and PEEK macros */ #define POKE(A,X) (*(unsigned char *)A) = (X) #define PEEK(A) (*(unsigned char *)A) int main (void) { /* do some colour tings */ bordercolor (COLOR_BLACK); bgcolor (COLOR_BLACK); textcolor (COLOR_GRAY3); /* move the screen to upper memory */ /* copy chars to upper memory */ SEI (); /* disable interrupts */ POKE(1, PEEK(1)&251); /* turn chars on */ memcpy((void*)0xe000, (void*)0xd000, ((256*8)*2)); /* copy chaset to $e000*/ POKE(1, PEEK(1)|4); /* turn on I/O */ CLI (); /* enable interrupts */ /* tell vic new adresses */ POKE(0xdd00, (PEEK(0xdd00)&252)|0 ); /* move VIC-bank to $c000 (bank 3) */ POKE(0xd018, (PEEK(0xd018)&15)|192 ); /* screen to $f000 */ POKE(648,240); /* tell kernal new screen-adress */ POKE(0xd018, (PEEK(0xd018)&240)|8 ); /* tell vic where the chars are */ /* do some input-stuff to show the cursor problems */ clrscr(); cursor(1); cprintf("testphrase: abcde12345-ABCDE"); gotoxy(0,1); while (!0) { cprintf("%c", cgetc()); } } --- snap ------------- Bye, Tim ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-03-16 10:38:49 CET