Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > simple disc menu?
2008-09-13 20:07
spinal
Account closed

Registered: Jan 2005
Posts: 47
simple disc menu?

Before asking my question, a little about why i'm asking...

I have recently been messing about with frodo (ported to the Nintendo DS by GPF_Error), but don't be fooled into thinking i'm a good coder, i'v just been tweaking bits here and there. One thing i noticed, is that with this emulator sometimes you have to load games by hand, especially if there is more than one on a single .d64 image. First i had though of finding an existing disc menu, something simple so i could use the joystick to select a file from the disc and load it. I couldn't however find anything (easily anyway) but i did have a slightly different idea. The emulator is able to fill the keyboard buffer up, so i was thinking (without knowing how large this buffer is)...

Does there exist already, a disc menu, that would allow the user to select a file and load+run it, written entirely in BASIC?
2008-09-14 05:03
Oswald

Registered: Apr 2002
Posts: 5094
use Vice
2008-09-14 10:27
doynax
Account closed

Registered: Oct 2004
Posts: 212
Quote: use Vice

As far as I'm aware Vice hasn't been ported to the DS, and would almost certainly be too slow to be useful at any rate.

As for the disc menu my BASIC skills aren't quite up to the challenge of writing a joystick-based selector, but here's a first version to get things started. The idea here is to sufficiently annoy some BASIC hacker to do it right ;)
0 I=I+1
1 READ N$
2 IF N$="" GOTO 5
3 PRINT I,N$
4 GOTO 0
5 RESTORE
6 INPUT C%
7 FOR I=1 TO C%
8 READ N$
9 NEXT
10 LOAD N$,8 : RUN
11 DATA "ALPHA"
12 DATA "BETA"
13 DATA "GAMMA"
14 DATA ""
At any rate I should think there are tools available to create 'all-singing, all-dancing' menus with little effort. Though I suppose you'd have to avoid turbo-loaders, which might complicate things.
2008-09-14 10:57
spinal
Account closed

Registered: Jan 2005
Posts: 47
Looks good, but the main part i was expecting to have trouble with, would be reading the filenames from the disk. I can't find anything on the internet to simply read the filenames into strings and i can't find my manual anywhere either.
2008-09-14 11:17
Oswald

Registered: Apr 2002
Posts: 5094
I remember seeing programs called like "!" which read the dir, then you can choose a file and finally it gets loaded with a fastloader.
2008-09-14 11:23
Zyron

Registered: Jan 2002
Posts: 2381
Maybe something like Fastload Menu V1.0 could work? The .t64 would still stay attached when changing disks I guess. Never used Frodo myself.
2008-09-14 11:31
tlr

Registered: Sep 2003
Posts: 1790
Turbo Menu Maker C64 is nice, but the requires the menu to be "installed" on the actual disks.
2008-09-14 12:48
Marauder/GSS
Account closed

Registered: Jul 2006
Posts: 224
try something like this...

10 C=1:DIM F$(144):PRINT "{CLR/HOME}"
20 OPEN 1,8,0,"$":GET#1,A$:GET#1,A$
30 GET#1,A$:GET#1,B$:PRINT VAL(A$);
40 FOR X=0 TO 27:GET#1,A$:PRINT A$;:NEXT:PRINT
50 GET#1,A$:GET#1,A$
60 GET#1,S$:GET#1,SH$:PRINT ASC(S$+CHR$(0))+256*ASC(SH$+CHR$(0));
70 F=0:F$(C)="":FOR X=0 TO 27:GET#1,A$:PRINT A$;
80 IF ASC(A$+CHR$(0))=34 THEN F=F+1:NEXT
90 IF F=1 THEN F$(C)=F$(C)+A$
100 NEXT:PRINT
110 IF ST=64 THEN 140
120 PRINT TAB(30)"{CRSR-UP}["C"]":C=C+1
130 GOTO 50
140 CLOSE 1:PRINT:PRINT
150 INPUT "{CRSR-UP}ENTER FILE # TO LOAD";X$:X=VAL(X$)
160 IF X<1 OR X>=C THEN 150
170 PRINT "{CLR/HOME}LOADING "CHR$(34)F$(X)CHR$(34)"..."
180 LOAD F$(X),8:RUN

2008-09-14 13:31
d0c

Registered: Apr 2006
Posts: 186
grab the c64 prg generator here..

http://www.ajordison.co.uk/

now cut&paste and generate it to a runnable prg file ;)
2008-09-14 13:43
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
hrm. your menu needs more elephants.
2008-09-14 14:46
spinal
Account closed

Registered: Jan 2005
Posts: 47
Quote: grab the c64 prg generator here..

http://www.ajordison.co.uk/

now cut&paste and generate it to a runnable prg file ;)


Too late, I already typed it in (vice, pc) and what a pain that was, surely it would be better to map the c64 key to their equivalent pc ones, rather than key in the same place as them.
 
... 10 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
t0m3000/hf^boom!^ibx
Brataccas/HF
kbs/Pht/Lxt
rexbeng
XmikeX
megasoftargentina
McMeatLoaf
Peacemaker/CENSOR/Hi..
Technotron/I-I F
Andy/AEG
CA$H/TRiAD
Conjuror
Chesser/Blazon
Courage
lA-sTYLe/Quantum
marley
Fungus/Nostalgia
Guests online: 136
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.