Hi,
Thanks, I've started diving into mame and its debugger. I must say it's
quite complicated for me, as I don't know 65C02 assembly - but well,
maybe I'll get somewhere, I may not be too old to learn new stuff!
Oliver said:
> I can't solve your issue but I can say, that I'm using the LC in that
> way in most of my cc65 projects. At least some of my projects are
> somewhat popular and I never got any feedback that there would be an
> issue with that LC usage. So in contrast to e.g. the serial driver
> ;-) that LC usage is a well tested feature.
Yes, actually, maybe my problem comes from the use of both LC and the
"less-well-tested" serial driver:
I seem to have noticed that there are memory writes to the D400-DFFF
region when using the serial driver? If this is possible?
But I'm not even sure of my finding, and even then, I don't know why
that would crash, as according to my map file, my code doesn't go as far
(D400-D8ED according to the map file) as where those writes happen
(DFB7-DFC8 according to MAME).
I've uploaded a minimal reproducer in case you'd like to look at it and
tell me how I'm wrong - because I probably am, but don't feel any
pressure, I'll figure something out :)
https://colino.net/a2dbg/a2-min.c #for the Apple2
https://colino.net/a2dbg/pc-min.c #for the PC
https://colino.net/a2dbg/mame-log.txt #my debugger experiments.
I set the watchpoint when the Apple2 test program has output "any key to
install". The writes happen after receiving a character from the PC. If
the PC doesn't reply, or sleeps a few dozens milliseconds before
answering, no write happen to $DFB7-DFC8).
But at some point with my real program, they happen, even with liberal
use of usleep() before replying.
Thanks for reading me anyway, and I'll tell you guys if I make some
progress.
I miss valgrind a lot, haha !
--
Colin