|
Post by nbla000 on Jun 5, 2012 17:28:32 GMT -5
Hi, I'm reading a lot of web pages but I don't understand if there is an easy way to know if a program with a certain name is present on DTV filesystem.
For 15x1 drives you may use these basic rows that could be "translated" in ASM:
10 OPEN15,8,15,"R0:FILENAME=FILENAME" 20 INPUT#15,E,E$ 30 CLOSE15 40 PRINTE$ E$ returns (FILE NOT FOUND) or (FILE EXIST) but if I change this row for drive #1:
10 OPEN15,1,15,"R0:FILENAME=FILENAME" I get a garbage screen on row 40, at least in VICE (x64dtv 2.3.0)
Do I need to read the directory structure from $010000 like intro programs ? there isn't an easy way ? if not there is a sample code to check ?
Thanks.
|
|
|
Post by tlr on Jul 19, 2012 13:06:15 GMT -5
I guess this forum isn't very active but I'll bother myself to reply.  There is no support for directory listing in the kernal, only loading, so you indeed need to check the structure at $010000. The kernal code and format of the file system is documented here: DTV2_Kernal_disassembly (or here: dtv2_kernal.txt) Basically keep checking the first 24 bytes of each 32 byte chunk against the filename until a chunk starting with $00 is encountered.
|
|
|
Post by nbla000 on Jul 28, 2012 1:49:56 GMT -5
hi tlr, happy to see you here too.
Thanks for your suggestion, I've suspected that.... Now I move my program in memory than directly load the file from the FileSystem by using a routine in datassette ram area and check Carry: 0 = No errors, 1 = Error;
|
|