Port DirMenu to Vic20?

You need an actual VIC.

Moderator: Moderators

Port DirMenu to the Vic20?

Poll ended at Thu Jul 21, 2022 6:49 am

Yes.
3
75%
No.
1
25%
 
Total votes: 4

HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

I admit to abusing inline assembler, and I'm sorry. I do it for efficiency: sometimes, inline assembler is both faster and smaller.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Port DirMenu to Vic20?

Post by Mike »

Pro tip: You should concentrate on writing working programs. Thinking about "efficiency" at this point doesn't buy you anything.

What happens if you apply the change I suggested?
HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

I tried your suggestions. One game displayed the same behavior, and two others displayed "?SYNTAX ERROR" after RUN. :(
HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

When I type LIST, I get garbage. :(
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Port DirMenu to Vic20?

Post by Mike »

HarryP2 wrote:[...] One game displayed the same behavior [...]
Then the code snippet - regardless whether it is yours or mine version - is not the culprit, and the fault lies somewhere else.

Do the target programs otherwise load fine without DirMenu? Are they supposed to run with expanded memory? Is loading them with ",8,1" appropriate? Normally, it should be sufficient to load them with just ",8", especially if they're going to be started with RUN. Only 'pure' machine code programs should be loaded with ",8,1", and then one needs the correct SYS to start them! Finally, are you sure that zeropage and OS workspace are restored to be in a working state for the BASIC interpreter upon exit from your C program to direct mode?
When I type LIST, I get garbage. :(
So, no "proper" load either.
HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

I fixed the problem: the program uses some zp addresses other than the default, and it was not preserving the extra zp space. It works now. BTW, thank you for the optimization: it only saved one byte, but one byte is good. :)
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Port DirMenu to Vic20?

Post by Mike »

HarryP2 wrote:I fixed the problem [...] It works now.
Fine. :)
BTW, thank you for the optimization: it only saved one byte, but one byte is good. :)
My code sample was not intended as 'optimization' - its point was to provide alternate code for supposedly the same result. I derived it from a known working implementation in BASIC. As even that code ran into the same issues, I could be fairly sure that the problem was located elsewhere - which ultimately proved true.
HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

Hi! I have just finished and updated DirMenu with Vic20 support. It now supports the unexpanded, 3k-expanded and 8/16k-expanded Vic20s. You can find it at https://sourceforge.net/projects/cc65extra/files/ui/. Try it out!
User avatar
huffelduff
Vic 20 Hobbyist
Posts: 118
Joined: Sat Sep 05, 2020 9:14 am

Re: Port DirMenu to Vic20?

Post by huffelduff »

HarryP2 wrote: Sat Aug 06, 2022 9:46 am Hi! I have just finished and updated DirMenu with Vic20 support.
Hey Harry,

I tried to download it but Sourceforge won't let me. I clicked on problems downloading but still nada.
Then I remembered it could be the ad blocker that's interfering.
So I switched it off for Sourceforge but to no avail.
Now it may just be my bad internet connection or my chromium browser which is at fault.
But it could also be sourceforge I guess.
Anyway I'll try again in a day or so and give the software a whirl.

Greets

H
HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

I can e-mail you the binaries if you want. Just PM me. :)
User avatar
huffelduff
Vic 20 Hobbyist
Posts: 118
Joined: Sat Sep 05, 2020 9:14 am

Re: Port DirMenu to Vic20?

Post by huffelduff »

HarryP2 wrote: Sat Aug 06, 2022 11:57 am I can e-mail you the binaries if you want. Just PM me. :)
Hi Harry,

No worries. I got it downloaded. I tested the unexpanded version and made a disk with unexpanded games.
The menu worked well. Thanks.

greetings

H
HarryP2
Vic 20 Dabbler
Posts: 85
Joined: Sat Sep 26, 2015 8:40 am
Location: New York, U.S.A.

Re: Port DirMenu to Vic20?

Post by HarryP2 »

You're welcome, and thanks for the compliment. :)
Post Reply