Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Scientists are people who build the Brooklyn Bridge and then buy it. -- William Buckley


devel / comp.sys.apple2.programmer / Re: Possibly stupid question about cc65 and the Language Card

SubjectAuthor
* Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
`* Re: Possibly stupid question about cc65 and the Language CardOliver Schmidt
 `* Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
  +* Re: Possibly stupid question about cc65 and the Language CardOliver Schmidt
  |`* Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
  | `* Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
  |  `* Re: Possibly stupid question about cc65 and the Language Cardqkumba
  |   `- Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
  `* Re: Possibly stupid question about cc65 and the Language Cardfadden
   `* Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
    `* Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
     `* Re: Possibly stupid question about cc65 and the Language Cardqkumba
      `* Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira
       `* Re: Possibly stupid question about cc65 and the Language Cardqkumba
        `- Re: Possibly stupid question about cc65 and the Language CardColin Leroy-Mira

1
Possibly stupid question about cc65 and the Language Card

<20230106004202.19966041@SGX-CMP-480>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=260&group=comp.sys.apple2.programmer#260

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Possibly stupid question about cc65 and the Language Card
Date: Fri, 6 Jan 2023 00:42:02 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20230106004202.19966041@SGX-CMP-480>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="d85bbd988e88b0fdd7f0a6cb16510158";
logging-data="3085092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HQwa6N4PeCYW6zoxQ3ys5GMCxkftjP6c="
Cancel-Lock: sha1:xLHuSiO+NbA/5KRuOuNedREGyag=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Thu, 5 Jan 2023 23:42 UTC

Hi,

I'm experimenting with pushing parts of programs to the language card,
using #pragma code-name (push, "LC") with cc65.

This gives good results on my Apple //c. I get ~3k more heap available,
and everything seems fine.

But the same programs crashes hard when emulated on MAME. I noticed
that the `mame apple2c -listslots` does not list a language card
(contrary to `mame apple2 -listslots`.

Is this wrong, or am I wrong? Is there a way to verify the presence of
that card in my Apple //c?

Thanks in advance,
--
Colin Leroy-Mira

Re: Possibly stupid question about cc65 and the Language Card

<tp7ss9$ojis$1@solani.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=261&group=comp.sys.apple2.programmer#261

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: ol....@web.de (Oliver Schmidt)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Fri, 6 Jan 2023 01:18:01 -0000 (UTC)
Message-ID: <tp7ss9$ojis$1@solani.org>
References: <20230106004202.19966041@SGX-CMP-480>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 6 Jan 2023 01:18:01 -0000 (UTC)
Injection-Info: solani.org;
logging-data="806492"; mail-complaints-to="abuse@news.solani.org"
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:3bwPI9Qr4ehwyiChPb98l5q+NpY= sha1:NgIFjuj6xnT+H590r4RkXFvr6eU=
X-User-ID: eJwFwQERADEIAzBLz6DlJoc+4F/CEjiNfwbBwGKPiGsaZ0ZW3dTYAmJnb3yi1U7rrBMR5g8fRREy
 by: Oliver Schmidt - Fri, 6 Jan 2023 01:18 UTC

Hi Colin,
> I'm experimenting with pushing parts of programs to the language card,
> using #pragma code-name (push, "LC") with cc65.

:-)

> This gives good results on my Apple //c. I get ~3k more heap available,
> and everything seems fine.

:-))

> But the same programs crashes hard when emulated on MAME.

:-(

> I noticed
> that the `mame apple2c -listslots` does not list a language card
> (contrary to `mame apple2 -listslots`.
>
> Is this wrong, or am I wrong? Is there a way to verify the presence of
> that card in my Apple //c?

The 16kB Language Card upgraded an Apple ][ from 48kB to 64kB. All later
Apple II came with at least 64kB - meaning that they all contain a "logic"
Language Card.

The Apple //c came even with 128kB - meaning that it always contains two
"logic" Language Cards.

Apart from that: ProDOS uses 13kB of the 16kB Language Card. So if there's
no "logic" Language Card, ProDOS won't boot at all.

Regards,
Oliver

Re: Possibly stupid question about cc65 and the Language Card

<20230106180515.3617a49b@SGX-CMP-480>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=262&group=comp.sys.apple2.programmer#262

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Fri, 6 Jan 2023 18:05:15 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <20230106180515.3617a49b@SGX-CMP-480>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="d85bbd988e88b0fdd7f0a6cb16510158";
logging-data="3085092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/y1yPYpTAL7PdyN95qI5Z+MFQC6lNC+yw="
Cancel-Lock: sha1:Y4Xj7fETxApASsuEUZWUBDCaXG8=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Fri, 6 Jan 2023 17:05 UTC

Hi,

> > This gives good results on my Apple //c. I get ~3k more heap
> > available, and everything seems fine.
>
> :-))
>
> > But the same programs crashes hard when emulated on MAME.
>
> :-(

Well. In fact, I also have crashes on the real hardware when pushing to
LC. They don't always happen, but I am quite sure there is something
fishy going on even if there's no dropping to the Apple 2's monitor.
Sadly I'm very much not good enough at assembler to figure out if that's
something in my code, or something related to pushing code to the
language card.

At the very least, cc65's .s generated files are exactly the same, with
offsets being just one or two off, when using code-name LC and not.

The vast majority of my code runs with absolutely no errors in its
libc/x86-64 form under Valgrind, but I also know that it doesn't make
sure there isn't some stupidity in the rare #ifdef __CC65__ parts, *or*
an integer/signed-unsigned overflow issue somewhere. I probably have an
issue, and it's probably just more visible with code in $D400-DFFF.

I've looked a lot at internet resources to figure out if I could
somehow get some higher level of debugging that I could handle, but
didn't find anything :/ Maybe my only choice is to try to build my
program for c64 and check with vice?

> > I noticed
> > that the `mame apple2c -listslots` does not list a language card
> > (contrary to `mame apple2 -listslots`.
> >
> > Is this wrong, or am I wrong? Is there a way to verify the presence
> > of that card in my Apple //c?
>
> The 16kB Language Card upgraded an Apple ][ from 48kB to 64kB. All
> later Apple II came with at least 64kB - meaning that they all
> contain a "logic" Language Card.

Thanks for confirming that :)
--
Colin Leroy-Mira

Re: Possibly stupid question about cc65 and the Language Card

<tpbekr$q9to$1@solani.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=263&group=comp.sys.apple2.programmer#263

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: ol....@web.de (Oliver Schmidt)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Sat, 7 Jan 2023 09:39:39 -0000 (UTC)
Message-ID: <tpbekr$q9to$1@solani.org>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 7 Jan 2023 09:39:39 -0000 (UTC)
Injection-Info: solani.org;
logging-data="862136"; mail-complaints-to="abuse@news.solani.org"
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:QZrmiJwY7BpOHPQsDvccWcWnyns= sha1:n7AyPR1G6IHLv8l/qsIGNUK6O5o=
X-User-ID: eJwNwokRwDAIA7CVymfCOMDF+4+QnhQGwaYj4MFfte+kDKkiXEzfBgWjX3uq+UHddCsznOADJ3kQ1w==
 by: Oliver Schmidt - Sat, 7 Jan 2023 09:39 UTC

Hi Colin,

> Well. In fact, I also have crashes on the real hardware when pushing to
> LC. [...]

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.

BTW: Beside the usual optimization related compiler flags you certainly
should consider the --static-locals flag. It makes (non reentrant) code
usually both faster and smaller. The latter may be relevant to if have
space issues.

Regards,
Oliver

Re: Possibly stupid question about cc65 and the Language Card

<6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=264&group=comp.sys.apple2.programmer#264

 copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:ac8:6eca:0:b0:3a9:68ba:4c10 with SMTP id f10-20020ac86eca000000b003a968ba4c10mr1981991qtv.676.1673108737654;
Sat, 07 Jan 2023 08:25:37 -0800 (PST)
X-Received: by 2002:a05:6870:14c7:b0:144:a626:9572 with SMTP id
l7-20020a05687014c700b00144a6269572mr2426505oab.162.1673108737319; Sat, 07
Jan 2023 08:25:37 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Sat, 7 Jan 2023 08:25:37 -0800 (PST)
In-Reply-To: <20230106180515.3617a49b@SGX-CMP-480>
Injection-Info: google-groups.googlegroups.com; posting-host=24.130.68.111; posting-account=UAtoeQoAAADrX7T-MHdWWRC4Fzf0dsLP
NNTP-Posting-Host: 24.130.68.111
References: <20230106004202.19966041@SGX-CMP-480> <tp7ss9$ojis$1@solani.org> <20230106180515.3617a49b@SGX-CMP-480>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
Subject: Re: Possibly stupid question about cc65 and the Language Card
From: fad...@fadden.com (fadden)
Injection-Date: Sat, 07 Jan 2023 16:25:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1803
 by: fadden - Sat, 7 Jan 2023 16:25 UTC

On Friday, January 6, 2023 at 9:05:20 AM UTC-8, Colin Leroy-Mira wrote:
> > > But the same programs crashes hard when emulated on MAME.

> I've looked a lot at internet resources to figure out if I could
> somehow get some higher level of debugging that I could handle, but
> didn't find anything :/ Maybe my only choice is to try to build my
> program for c64 and check with vice?

Both MAME and AppleWin provide debuggers. You can find a couple of "cheat sheets" here:
https://6502disassembly.com/applewin-dbg.html
https://6502disassembly.com/mame-dbg.html

I'm not sure how they compare to VICE.

Re: Possibly stupid question about cc65 and the Language Card

<20230107182519.04915d11@SGX-CMP-480>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=265&group=comp.sys.apple2.programmer#265

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Sat, 7 Jan 2023 18:25:19 +0100
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <20230107182519.04915d11@SGX-CMP-480>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="82c4081a9828cc608750db90ed2f4a27";
logging-data="3085092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Qu/z4bRxp/bfPzfwLuqkGsNcfK8W+ojg="
Cancel-Lock: sha1:JeSfPVim8+91SANcHj1FUm9/UMk=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Sat, 7 Jan 2023 17:25 UTC

Hi,

fadden said:

> Both MAME and AppleWin provide debuggers. You can find a couple of
> "cheat sheets" here: https://6502disassembly.com/applewin-dbg.html
> https://6502disassembly.com/mame-dbg.html

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

Re: Possibly stupid question about cc65 and the Language Card

<20230107191503.08c1398a@SGX-CMP-480>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=266&group=comp.sys.apple2.programmer#266

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Sat, 7 Jan 2023 19:15:03 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <20230107191503.08c1398a@SGX-CMP-480>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
<20230107182519.04915d11@SGX-CMP-480>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="82c4081a9828cc608750db90ed2f4a27";
logging-data="3085092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187YWBSVDqUDZuFAcQcExqoRia65rTBpzk="
Cancel-Lock: sha1:xb0qKAhN6Jz6wqFTw2kOQun9E7o=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Sat, 7 Jan 2023 18:15 UTC

Replying to myself...

> Yes, actually, maybe my problem comes from the use of both LC and the
> "less-well-tested" serial driver:

Mmmh, I just moved the ser_install/ser_apple2_slot/ser_open calls out of
the LC code, and it seems to work perfectly now (both on real hardware
and MAME emulation).

Did I just hide my problem again or could it make some sense ?
--
Colin

Re: Possibly stupid question about cc65 and the Language Card

<2aafcc02-0582-43b8-8750-465015a03202n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=267&group=comp.sys.apple2.programmer#267

 copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a37:40b:0:b0:705:b1d6:3e68 with SMTP id 11-20020a37040b000000b00705b1d63e68mr121893qke.579.1673148778286;
Sat, 07 Jan 2023 19:32:58 -0800 (PST)
X-Received: by 2002:aca:2402:0:b0:363:b7d5:ade2 with SMTP id
n2-20020aca2402000000b00363b7d5ade2mr1366877oic.30.1673148777923; Sat, 07 Jan
2023 19:32:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Sat, 7 Jan 2023 19:32:57 -0800 (PST)
In-Reply-To: <20230107191503.08c1398a@SGX-CMP-480>
Injection-Info: google-groups.googlegroups.com; posting-host=47.148.193.115; posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 47.148.193.115
References: <20230106004202.19966041@SGX-CMP-480> <tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480> <6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
<20230107182519.04915d11@SGX-CMP-480> <20230107191503.08c1398a@SGX-CMP-480>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2aafcc02-0582-43b8-8750-465015a03202n@googlegroups.com>
Subject: Re: Possibly stupid question about cc65 and the Language Card
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Sun, 08 Jan 2023 03:32:58 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1380
 by: qkumba - Sun, 8 Jan 2023 03:32 UTC

If you want to share the code, I'd be happy to investigate.

Re: Possibly stupid question about cc65 and the Language Card

<20230108114146.746fba77@SGX-CMP-480>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=268&group=comp.sys.apple2.programmer#268

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Sun, 8 Jan 2023 11:41:46 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <20230108114146.746fba77@SGX-CMP-480>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
<20230107182519.04915d11@SGX-CMP-480>
<20230107191503.08c1398a@SGX-CMP-480>
<2aafcc02-0582-43b8-8750-465015a03202n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="2c589604be80c29726b2e110435d5ec9";
logging-data="4018885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PoIf080ED811gFJWHBbuheLgaWqs3k3k="
Cancel-Lock: sha1:xHJNYGDdCLfNHO04lHop0tde764=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Sun, 8 Jan 2023 10:41 UTC

Hi,

>If you want to share the code, I'd be happy to investigate.

This is very nice of you!

The code is published on my repo at
https://github.com/colinleroy/a2tools

It may be a little annoying to setup, but if you got questions, I can
answer them.

I'm doing a little project of a serial/network proxy for my Apple //c.

There's the server part, that runs on the PC (I'm coding on Linux, I
hope it's portable), in src/surl-server. You start it with
export A2_TTY=/dev/ttyUSB0
export A2_TTY_SPEED=9600
export A2_TTY_HW_HANDSHAKE=1
../src/surl-server

(use A2_TTY_HW_HANDSHAKE=0 if your serial cable only has TX/RX, or
when emulating, depending on your emulator - using MAME, ser2net and a
TCP socket bitbanger, I have to set it to 0.).

And the client part is in src/stp/.
Problems arise very quickly if you put the simple_serial_open() function
of src/lib/simple_serial.c inside the #pragma code-name(push,"LC").

If it's too much of a bother to test, I'll totally understand :)
--
Colin
https://www.colino.net/

Re: Possibly stupid question about cc65 and the Language Card

<823f889b-8c60-4bbf-a2eb-13c3d3fe68dcn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=269&group=comp.sys.apple2.programmer#269

 copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:ac8:6eca:0:b0:3a9:68ba:4c10 with SMTP id f10-20020ac86eca000000b003a968ba4c10mr2188801qtv.676.1673278216191;
Mon, 09 Jan 2023 07:30:16 -0800 (PST)
X-Received: by 2002:a05:6808:108:b0:35a:d20d:52be with SMTP id
b8-20020a056808010800b0035ad20d52bemr4933954oie.270.1673278215773; Mon, 09
Jan 2023 07:30:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Mon, 9 Jan 2023 07:30:15 -0800 (PST)
In-Reply-To: <20230108114146.746fba77@SGX-CMP-480>
Injection-Info: google-groups.googlegroups.com; posting-host=47.148.193.115; posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 47.148.193.115
References: <20230106004202.19966041@SGX-CMP-480> <tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480> <6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
<20230107182519.04915d11@SGX-CMP-480> <20230107191503.08c1398a@SGX-CMP-480>
<2aafcc02-0582-43b8-8750-465015a03202n@googlegroups.com> <20230108114146.746fba77@SGX-CMP-480>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <823f889b-8c60-4bbf-a2eb-13c3d3fe68dcn@googlegroups.com>
Subject: Re: Possibly stupid question about cc65 and the Language Card
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Mon, 09 Jan 2023 15:30:16 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1542
 by: qkumba - Mon, 9 Jan 2023 15:30 UTC

Does it still have the crashing problem, though? My message might have been too late if you've solved it already. :-)

Re: Possibly stupid question about cc65 and the Language Card

<20230109163625.468d23b8@SGX-CMP-480>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=270&group=comp.sys.apple2.programmer#270

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Mon, 9 Jan 2023 16:36:25 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <20230109163625.468d23b8@SGX-CMP-480>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<6aa3fa25-8629-4d49-bb47-31c751bfd779n@googlegroups.com>
<20230107182519.04915d11@SGX-CMP-480>
<20230107191503.08c1398a@SGX-CMP-480>
<2aafcc02-0582-43b8-8750-465015a03202n@googlegroups.com>
<20230108114146.746fba77@SGX-CMP-480>
<823f889b-8c60-4bbf-a2eb-13c3d3fe68dcn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="0e5e43a7c43c9c40fa9a8d8d0e92b1bc";
logging-data="256133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX195xTb+LufZbTVrQge5lThmlW5K93UthdU="
Cancel-Lock: sha1:8POzBI9ysap9GX/6gShCqztux0o=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Mon, 9 Jan 2023 15:36 UTC

Hi,

>Does it still have the crashing problem, though? My message might
>have been too late if you've solved it already. :-)

As long as you add -DSERIAL_TO_LANGCARD in src/stp/Makefile's CLCFLAGS,
yes :)

--
Colin
https://www.colino.net/

Re: Possibly stupid question about cc65 and the Language Card

<20230815170329.53a2f2c4@laptop-sigfox>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=339&group=comp.sys.apple2.programmer#339

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Tue, 15 Aug 2023 17:03:29 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20230815170329.53a2f2c4@laptop-sigfox>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<tpbekr$q9to$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="31b446465080706f05929a57ee24329c";
logging-data="1836438"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zZ1TJKCJIr8p0SAed2PlhSyWdXE6cpKI="
Cancel-Lock: sha1:YYQKH+1RrERkrr3vdCPEYOMAYQA=
X-Newsreader: Claws Mail 3.19.1git30 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Tue, 15 Aug 2023 15:03 UTC

Hi,

>> Well. In fact, I also have crashes on the real hardware when pushing
>> to LC. [...]
>
>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.

Holy hell I have figured that out after 48 hours of diving into
assembly!! I'm so proud of myself.

I'll file a bug report to cc65 when I'm rested a bit ! :-)
--
Colin
https://www.colino.net/

Re: Possibly stupid question about cc65 and the Language Card

<20230815222850.033e37a7@laptop-sigfox>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=340&group=comp.sys.apple2.programmer#340

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Tue, 15 Aug 2023 22:28:50 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <20230815222850.033e37a7@laptop-sigfox>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<tpbekr$q9to$1@solani.org>
<20230815170329.53a2f2c4@laptop-sigfox>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="31b446465080706f05929a57ee24329c";
logging-data="1836438"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NF1ZUHu1MwizmK/UevEmELB+mFriIDNg="
Cancel-Lock: sha1:o0FBe0RJC+sgq+aOeRzFPE7aIJI=
X-Newsreader: Claws Mail 3.19.1git30 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Tue, 15 Aug 2023 20:28 UTC

Hi,

>Holy hell I have figured that out after 48 hours of diving into
>assembly!! I'm so proud of myself.
>
>I'll file a bug report to cc65 when I'm rested a bit ! :-)

Oliver, if you want the details, I wrote about this investigation in
https://www.colino.net/wordpress/archives/2023/08/15/tracking-and-killing-a-cc65-corruption-bug/

and I opened a pull request at https://github.com/cc65/cc65/pull/2160

In the hope the resource can help other people debugging for the Apple
II, and also not to forget how I did for the next time I have to do
such a exhausting (for me) debugging session :)

In fact I'd love if you would give a look at the PR, I *think* this is
the correct fix, but I'm not a hundred percent sure.
--
Colin
https://www.colino.net/

Re: Possibly stupid question about cc65 and the Language Card

<c6dc4494-18e1-4f6d-bf90-2102564bc537n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=341&group=comp.sys.apple2.programmer#341

 copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a37:8606:0:b0:76a:f46f:a04f with SMTP id i6-20020a378606000000b0076af46fa04fmr2161qkd.6.1692138105626;
Tue, 15 Aug 2023 15:21:45 -0700 (PDT)
X-Received: by 2002:a63:7e56:0:b0:564:9d36:f3e7 with SMTP id
o22-20020a637e56000000b005649d36f3e7mr42006pgn.0.1692138105064; Tue, 15 Aug
2023 15:21:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Tue, 15 Aug 2023 15:21:44 -0700 (PDT)
In-Reply-To: <20230815222850.033e37a7@laptop-sigfox>
Injection-Info: google-groups.googlegroups.com; posting-host=76.82.169.167; posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 76.82.169.167
References: <20230106004202.19966041@SGX-CMP-480> <tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480> <tpbekr$q9to$1@solani.org>
<20230815170329.53a2f2c4@laptop-sigfox> <20230815222850.033e37a7@laptop-sigfox>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c6dc4494-18e1-4f6d-bf90-2102564bc537n@googlegroups.com>
Subject: Re: Possibly stupid question about cc65 and the Language Card
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Tue, 15 Aug 2023 22:21:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1301
 by: qkumba - Tue, 15 Aug 2023 22:21 UTC

Very nice!

Re: Possibly stupid question about cc65 and the Language Card

<20230816042946.04f92f8b@laptop-sigfox>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=342&group=comp.sys.apple2.programmer#342

 copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Possibly stupid question about cc65 and the Language Card
Date: Wed, 16 Aug 2023 04:29:46 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <20230816042946.04f92f8b@laptop-sigfox>
References: <20230106004202.19966041@SGX-CMP-480>
<tp7ss9$ojis$1@solani.org>
<20230106180515.3617a49b@SGX-CMP-480>
<tpbekr$q9to$1@solani.org>
<20230815170329.53a2f2c4@laptop-sigfox>
<20230815222850.033e37a7@laptop-sigfox>
<c6dc4494-18e1-4f6d-bf90-2102564bc537n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="3506c14f097990393b142b9d57d5c61e";
logging-data="3329007"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xDWu+PifGt7D7wfwtkl2FgDXY1TaM+Yc="
Cancel-Lock: sha1:PsYVR2nlI6dDjiNPsuqSUtGXkTw=
X-Newsreader: Claws Mail 3.19.1git30 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Wed, 16 Aug 2023 02:29 UTC

Hi,

>Very nice!

Thanks :)
--
Colin
https://www.colino.net/

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor