Re: cc65 printf substitions failing?

From: groepaz_at_gmx.net
Date: Fri, 14 May 2021 22:18:54 +0200
Message-ID: <2663050.DJkKcVGEfx_at_rakete>
Am Freitag, 14. Mai 2021, 22:02:56 CEST schrieb afachat_at_gmx.de:
>
> > It should work. Try giving -t to each step, not just the linker. My guess
> > would be that somehow the character encoding isnt the same in your program
> > and the library containing printf.
>
> Thanks, that seems to have done it. At least adding "-t pet" on the cc65
> stage.
>
> Unfortunately now the text is mangled because it tries to convert between
> PETSCII and ASCII ... which is not nice if you're trying to talk to an
> internet client in ASCII and print the text on screen - in PETSCII, but that
> would have been ok, as at least numbers should be all right, right? Not
> doing _any_ format conversion sounds not good to me...
>
> I guess I would have preferred to stay without the "-t pet" and convert the
> text to PETSCII myself, but:
> - removing "-t pet" from the linker stage complains about missing memory
> configuration and
> - only using "-t pet" on the linker results in no format substitution....
>
> I think I'll open up an issue with cc65, see what they recommend.

you'll have to use the same target for all stages, anything else will
certainly not result in something useful :)

regarding ascii vs petscii, you'll have to convert between them in your
program as needed, or use the CHARMAP pragma to change the compile-time
translation (there are some include files for ascii vs petcii)

--

http://hitmen.eu                 http://ar.pokefinder.org
http://vice-emu.sourceforge.net  http://magicdisk.untergrund.net

Aesthetic delight lies somewhere between boredom and confusion.
<E.H.Gombrick>
Received on 2021-05-14 23:00:36

Archive generated by hypermail 2.3.0.