VIC-20 Disk Menu on a Cartridge

Basic and Machine Language

Moderator: Moderators

Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I think so too... Thanks!

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

An idea: it is not that your program changes any pointers (like valuable zero page locations) or memory locations that the Basic subsystem - which these calls go to - relies on? If so, it is not strange if it crashes out in the middle of a run.
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Seems I now have got it working! It works better in 1541-speed than 1540-speed for some reason. So I switch it down to 1541 speed for the directory read and then back again. I also use CHRIN instead of ACPTR. Anyway, it now reads the directory with a speed of 6 filenames per second. I think that is pretty fast. The old program only managed 1.6 filenames/second. I have also added the printing function. I will probably upload the new version tomorrow. Thanks again Björg for the great tip!!! I think I will have a lot of help of that trick in the future.

I am now listening to Sweden-Switzerland in the hockey quarter final on the radio (2-1 right now). I don't hav TV3 so I can't see it on TV :cry: But I'm happy anyway now when I have got the menu working :lol: I have worked quite hard with that ML directory for two whole days...

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Great news about the software development. As long you only need a numeric value, it may be interesting to have a look at the USR() function too. It is a little different to use, but pretty cool if you find an usage of it. WAIT is also an interesting instruction which should be possible to use in combination with your own routines, at least if you have installed something that runs on interrupt.

The icehockey.. I stopped bothering ten years ago, but the final result was as you posted it. I do have the broadcasting TV channel, but it gotta be a really important game or I would be bored to watch it these days.
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I was a bit haisty in saying that it worked... Because it didn't.... It still stops sometimes... I won't upload it today anyway...

But it seems to work a lot better now since I start every ML routine with a call to SETTMO to turn off some time out. (It works pretty well in 1540 speed too). But I will try to improve it more...

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I have fixed it now! (I hope! ;) ) I thought the locking of the computer happened somewhere in my ML routines so I made many changes to them, and that took some effort as I'm using Hesmon on a real vic-20. But it turned out that my ML routines were fine all along. The problem was that I mixed them with the basics GET# command. It was when returning from the ML and using GET# when the computer hang... sometimes. Not often... like one time out of 900 maybe... Problems like that are hard to find...

Anyway. It now works fine and reads the directory with the quite amazing speed of 9.6 to 9.99 filenames per second. So I am wondering - with this speed, would you still like to keep the functions to save and load a list, sort and remove items from it? Removing those functions would of course save some space. I am also wondering if you ever use the "8" and "1" keys, or if you always use "return" for auto load?

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

It's now up in 10.7 names/second...

I removed the list things and now have:

F1: Help
F5: Refresh
Crsr up&down
Space
Return
8
1
D delete
P print
and R for rename.

It's now 6 blocks (the basic). I don't know if I will keep "8" and "1". I have never used them...

What do you think?

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
vic user
VicGyver
Posts: 1401
Joined: Thu Mar 25, 2004 9:40 am

Post by vic user »

sweet!

going to be fun to use!

chris
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I kept the "8" and "1"... They didn't take up that much anyway... It's just 6 blocks now with ML and all included. I think it's ready now.... For the fun of it, I made some speed comparances of how long it takes to load a 128 files directory:

Our menu: 13 seconds
Load"$",8 on 1541: 12 seconds
Load"$",8 on 1540: 10 seconds
Directory command on FinalCart/C64: 16 seconds
Directory command on C128 with 1571: 13 seconds
Directory command on 2MHz C128 VDC 1571: 10 seconds.
Load "$" on above 1571: 4 seconds

(Searching for $ included)

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

And as it's smaller now, running on the unexpanded vic the menu can now handle something like 126-128 names!
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
KilrPilr
Vic 20 Afficionado
Posts: 342
Joined: Wed Mar 24, 2004 12:09 pm

Post by KilrPilr »

This is a very cool development! Thanks Boray and all who helped. I want to put this on a cart myself. I hope that it will be compatible with the 1581 and sfd1001.

I dont know why but this makes me want an ide controller interface (like ide64) for my Vic-20 now too! :D


Leo
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I don't know what sfd1001 is... But the 1581... It can handle more files right? Then you need to change line number 5

5 P=145:IFPEEK(... etc..

Exchange the P=145 above to the maximum number of files that the 1581 can handle.... And that will only work on the expanded vic. On the unexpanded, 128 is still the limit because of the small memory...

There is also a limit of the name lenght of 16 characters. If the 1581 can have longer names, then you have to make M$ longer on line 9.

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Hm, does the 1581 support a directory structure? :)
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Post Reply