Disk menu's

Page 6/6
1 | 2 | 3 | 4 | 5 |

By giuseve

Paladin (744)

giuseve's picture

11-05-2014, 09:29

@nyyrikki
having another look to your FANTASTIC loader, I saw that using a basic program you was able to:
- include a .PSG sound file
- play it in the background
What is a .pSG file? How did you obtained it?
And what is the routine to include and then play a .PSG or any other musicfile-type?

Regards !!!

By NYYRIKKI

Enlighted (5873)

NYYRIKKI's picture

11-05-2014, 15:27

It is not really own or official music fomat... IIRC it is just PT3-file with BLOAD-header

By FiXato

Scribe (1709)

FiXato's picture

30-05-2021, 07:10

NYYRIKKI wrote:

Don't use the first posted menu system... It will not work with HDD's... 

I now also wrote a little menu system for you to modify:

10 ' Small menu example Made By: NYYRIKKI
    20 DEFINT A-Z:DIM NN$(200)
    30 FM$="????????.BAS" 'File mask '?' means any character
    40 DA$="0E11110E12C51100C10E1ACD7DF3C11180C0CD7DF332F8F7C9"
    50 AD=&HC080:POKE AD,0'Drive: 0=Default, 1=A: 2=B: ... 8=H:
    60 FOR I=1 TO 12:AD=AD-(I<>10):POKE AD,ASC(MID$(FM$,I,1)):NEXT I
    70 FOR I=&HC08C TO &HC0C0:POKE I,0:NEXT I
    80 FOR I=0 TO 25:POKE &HC000+I,VAL("&H"+MID$(DA$,I*2+1,2)):NEXT I
    90 DEFUSR=&HC000:DEFUSR1=&HC003
    100 IF USR(0)>0 THEN PRINT"Error: No files to load":END
    110 FC=FC+1:FOR I=1 TO 12:NN$(FC)=NN$(FC)+CHR$(PEEK(&HC100+I))
    120 IF I=8 THEN NN$(FC)=NN$(FC)+"."
    130 NEXT I
    140 IF USR1(0)=0 THEN 110
    150 CLS:NN$(0)=SPACE$(12):NN$(FC+1)=NN$(0)
    160 PRINT "------------------"
    170 PRINT "|  ";NN$(S);  "  |"
    180 PRINT "| >";NN$(S+1);"< |"
    190 PRINT "|  ";NN$(S+2);"  |"
    200 PRINT "------------------"
    210 A$=INPUT$(1):S=S-(A$=CHR$(31)ANDS<FC-1)+(A$=CHR$(30)ANDS>0)
    220 IF A$<>" " AND A$<>CHR$(13) THEN LOCATE 0,1:GOTO 170
    230 RUNNN$(S+1)

I know it's a really old post, but I was wondering if you could help make it work on an (emulated) turboR? Smile
Currently it returns Bad filename in 230:

By bsittler

Master (245)

bsittler's picture

30-05-2021, 17:58

Does this help?

230 N$="":FOR I=1 TO LEN(NN$(S+1))
240 IF MID$(NN$(S+1),I,1)<>" " THEN N$=N$+MID$(NN$(S+1),I,1)
250 NEXT I
260 RUNN$

By FiXato

Scribe (1709)

FiXato's picture

30-05-2021, 22:56

Unfortunately that returns the same error for me.
For completeness sake: N$ in your example does end up containing the filename, minus the whitespace.

Page 6/6
1 | 2 | 3 | 4 | 5 |