Re: [cc65-devel] c64 - getting seemingly random chars on screen
cc65 - a freeware C compiler for 6502 based systems
Brought to you by:
gpz
|
From: Michael P. <mp...@bl...> - 2021-03-02 23:45:11
|
On Tue, 2 Mar 2021, gr...@gm... wrote: > I'd use watchpoints on the entire screen, like > > . watch store 0400 07e7 > . x > > (assuming your screen memory is at 0400) > > then when the first wrong character pops up break into the monitor > again, and you'll see a list of writes to the screen. find out which > one wrote the wrong character, and you know where it happens. Thanks, I'll give that a shot. > that said, i took a quick peek at the source - it seems you are mixing > conio and stdio functions (eg scanf, and even a direct jsr to $ffd2) - > that is a nono and can lead to all kind of undesirable effects. Yeah, I wanted to do it all with conio, but some stuff didn't work right. For instance, cscanf() doesn't handle backspaces, it would immediately act as though I'd hit 'return' and take that as input. The $ffd2 is to kick things back into caps/PETSCII mode, conio bypasses the kernal, so 'cputc(142)' doesn't do it, and 'POKE(53272,21)' isn't portable between C-64 and X-16. I was using 'cbm_k_bsout (CH_FONT_UPPER)', but that wouldn't compile on the C-64, so I went with the __asm__ bit. -- Michael Parson Pflugerville, TX |