![]() |
![]() |
![]() |
#1 |
Registered User
![]() Join Date: Mar 2016
Location: Ozherele
Posts: 186
|
Amiga drive list
I need to get all Amiga hardware drive list, e.g., DF0: DF1: DH0: RAM:
I know that 'info' utility can produce such a list. Is it possible to get its sources? Maybe someone knows how it works? I have tried to use a call to Lock function but it works poorly because it invokes an irritating dialog window "Please insert volume XXX: in any drive" if the pointed disk is not used in the tested system. The same dialog appears when I use a call to Open-function. Is it possible to block this dialog invocation? It seems that WB has such a list of drives but I don't know how to get it. ![]() Any hints are welcome. Thank you. |
![]() |
![]() |
#2 |
ex. demoscener "Bigmama"
![]() Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,194
|
IIRC, you can block dos dialogs by setting the window pointer of your process (pr_WindowPtr) to -1, but I'm not sure how that helps in getting a drive list.
|
![]() |
![]() |
#3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,564
|
dos.library has list that can be used to find all devices, volumes and assigns.
KS2.0+ has dos library functions to access it (LockDosList etc), under KS 1.x you need to do it manually. |
![]() |
![]() |
#4 | |
Registered User
![]() Join Date: Mar 2016
Location: Ozherele
Posts: 186
|
Quote:
Code:
SUB.L A1,A1 MOVE.L ExecBase.w,A6 JSR FindTask(A6) move.l d0,a4 move.l #-1,$b8(a4) ;pr_Windowptr Do I need to save an old value of pr_Windowptr? I have read that it is better to restore it before the program finishes but I don't understand a reason for this. Would someone like to help me to clarify this matter? IMHO there are not many typical disk drive names for Amiga. They are only DFn, DHn, and RAM. So I can just check every possible case while the list is being built. |
|
![]() |
![]() |
#5 | |
Registered User
![]() Join Date: Mar 2016
Location: Ozherele
Posts: 186
|
Quote:
I have just tried to traverse the driver list by the next code. Code:
lea.l name(pc),a1 ;pointer to a device name, e.g., df0: move.l ExecBase,a6 lea.l 350(a6),a0 ;pointer to the device list jsr FindName(a6) ![]() |
|
![]() |
![]() |
#6 | |
ex. demoscener "Bigmama"
![]() Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,194
|
Quote:
![]() The first part of the process structure is the task part of the process, so when using FindTask(0) in a process, you get a pointer to a task+process-specific data at the end of it. Have a look here. You need to save the value in pr_WindowPtr and restore it when done as your process is the same as the CLI process when you start your program from CLI. |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Workbench 1.3 hard drive games list | Bloodwych | project.ClassicWB | 40 | 15 September 2015 00:11 |
Wanted: Amiga External Floppy Drive Case/Housing with Interface (or dead drive) | Starglider 2 | MarketPlace | 1 | 04 August 2015 16:53 |
Gotek Drive - Cant press enter on list? | ADz | support.Other | 3 | 31 August 2014 16:32 |
List in alphabetical order in dropdown list of Floppy Drives | Zed | request.UAE Wishlist | 1 | 06 February 2010 18:26 |
Strange Amiga 1200 floppy drive... PC drive converted to amiga? | jbenam | support.Hardware | 8 | 30 March 2009 20:24 |
|
|