1581 & subdirs

Started by MIRKOSOFT, February 24, 2010, 08:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!


I'm new owner of C1581. As everybody know they can have subdirs.
And here's my problem.
I used equivalent of BASIC command OPEN15,8,15,"/MYDIR":CLOSE15 in assembler.
Also tried "/0:MYDIR", but never was directory changed...


Can anybody explain it me?


Thank you all for every help.


Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

MIRKOSOFT

Please help me this:
I want to change partition to DIR on drive 8.

In attachment is source code, works not, don't know why...

Thanks.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

cbmguy

I'm assuming this: you have formatted the partition as a dos partition when you created the partition.  Sorry, for the overuse of the word partition in that last sentence...  partition.  partition.  he he.  Another 'quirk' of the '81 is that when it encounters an i0: command, it will jump out of any partition and send you back to the root directory.  I'm not too sure if a clrchn kernel call or something else in your other code is cosing an init to the '81 or not.  Just a thought here, but if you redirect the i0: command at location $198 in the '81s RAM to an RTS instruction, your problems might stop.  I don't know off-hand if an clrchn will initiate an init or not.  That is all my head has in it on this topic at the moment.

C

pearsoe

I haven't tested this but is "/DIR" really a file to be opened if you are sending a command to the command channel (equivalent to a PRINT#15,"/DIR")?

I believe you should open the command channel like this:
LDA #$0f
LDX drive ; your variable
LDY #$0f
JSR SETLFS
LDA #$00
TAX
TAY
JSR SETNAM

(on a 128 you should also perform a SETBNK ($ff68) to provide the bank the filename is in)
LDX #$00
LDA $C6
JSR SETBNK

JSR OPEN

Then you would send your command to switch to the /DIR directory to the open command channel.
My rig: C-128 w/JD SCPU, uIEC/SD, CMD-HD (500 MB), CMD-HD ZIP drive, CMD RAMLink, 1750XL 2 MB REU, FD-2000, 1581, Turbo232

Andrew Wiskow

I've actually never used this "feature" of the 1581... I honestly never had a need for it on an 800KB disk.
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

RobertB

Quote from: Andrew Wiskow on February 26, 2010, 08:17 AM...I honestly never had a need for it on an 800KB disk.
If you needed to put lots of small files (past Commodore's DOS limit) onto one disk, then partitions were the way to go.

                 Truly,
                 Robert Bernardo
                 Fresno Commodore User Group
                 http://videocam.net.au/fcug
                 The Other Group of Amigoids
                 http://www.calweb.com/~rabel1/
                 Southern California Commodore/Amiga Network
                 http://www.sccaners.org/

MIRKOSOFT

Hi!


Thanks for lot of help.
It was useful. Now I can change partition in 1581 disk.
But don't know how to display directory of any partition. Every time displays my routine whole directory, not only selected partition.


So, I want to ask how to display partition directory?


Thanks for every help.


Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

MIRKOSOFT

Here in attachment is source code of my directory routine.
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

pearsoe

Just to check, is the 1581 partition formatted and does it contain unique files? This was asked before but worth double-checking.
From my understanding of the 1581, after you select a partition it becomes the 'working drive'. In your code what are you using for 'dirname' (your variable)?

It seems if the desired partition is your 'working drive' then dirname should just be '$0'.

You might want to look at the program 'Partition Aid' on the 1581 test demo disk. It provides some good examples of code for working with 1581 partitions. There is ML attached to the end of this program.  You could examine it by breaking it and going into the monitor.

My rig: C-128 w/JD SCPU, uIEC/SD, CMD-HD (500 MB), CMD-HD ZIP drive, CMD RAMLink, 1750XL 2 MB REU, FD-2000, 1581, Turbo232