Port DirMenu to Vic20?
Moderator: Moderators
Re: Port DirMenu to Vic20?
I admit to abusing inline assembler, and I'm sorry. I do it for efficiency: sometimes, inline assembler is both faster and smaller.
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Port DirMenu to Vic20?
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?
What happens if you apply the change I suggested?
Re: Port DirMenu to Vic20?
I tried your suggestions. One game displayed the same behavior, and two others displayed "?SYNTAX ERROR" after RUN. 

Re: Port DirMenu to Vic20?
When I type LIST, I get garbage. 

- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Port DirMenu to Vic20?
Then the code snippet - regardless whether it is yours or mine version - is not the culprit, and the fault lies somewhere else.HarryP2 wrote:[...] One game displayed the same behavior [...]
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?
So, no "proper" load either.When I type LIST, I get garbage.
Re: Port DirMenu to Vic20?
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. 

- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Port DirMenu to Vic20?
Fine.HarryP2 wrote:I fixed the problem [...] It works now.

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.BTW, thank you for the optimization: it only saved one byte, but one byte is good.
Re: Port DirMenu to Vic20?
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!
- huffelduff
- Vic 20 Enthusiast
- Posts: 154
- Joined: Sat Sep 05, 2020 9:14 am
Re: Port DirMenu to Vic20?
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
Re: Port DirMenu to Vic20?
I can e-mail you the binaries if you want. Just PM me. 

- huffelduff
- Vic 20 Enthusiast
- Posts: 154
- Joined: Sat Sep 05, 2020 9:14 am
Re: Port DirMenu to Vic20?
You're welcome, and thanks for the compliment. 
