English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 23 July 2020, 09:01   #1
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
How to get a list of HDD partitions?

I was thinking about the possibility of having a game look for HDD partitions available, so game data could be saved to the hard disk instead of the floppy (NVRAM in the case of a CD32). Any ideas how this could be done?

Last edited by MickGyver; 23 July 2020 at 09:25.
MickGyver is offline  
Old 23 July 2020, 09:56   #2
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
The basics are that you lock the DOS list with the relevant flags for what you're looking for, then step through the items in the list, making a list of the ones you want, then unlock the DOS list. AmiBlitz3's includes have the relevant OS calls in wrapper functions in dos.include (dos_CreateDosList{}, dos_ScanVolumes{} etc.), and BB2 has a similar functionality from the RIDOSLib library (GetDeviceList, NextDevice). Note that I believe this functionality is OS 2.0+, and a different method is needed for OS 1.x machines...
Daedalus is offline  
Old 23 July 2020, 10:39   #3
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Actually you cannot get a list of HDD partitions from AmigaDOS. You can only get a list of volumes or devices, but you cannot distinct whether they are partitions, floppy disks, CD ROMs or something else.
thomas is offline  
Old 23 July 2020, 13:00   #4
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Yeah, fair point. Actually, that agnosticism is one of the things I like about the Amiga. Games that allow you to select a save location do list all volumes/devices, so you can choose yourself whether it's a floppy disk or hard drive partition (or whatever else) that you save to. Frontier in particular comes to mind.
Daedalus is offline  
Old 23 July 2020, 13:24   #5
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Thanks guys! I will try out the commands in the RIDOSLib.
MickGyver is offline  
Old 23 July 2020, 17:50   #6
Solo Kazuki
Registered User
 
Solo Kazuki's Avatar
 
Join Date: Sep 2004
Location: Poland
Posts: 1,301
If game could be installed on HDD, it could be used PROGDIR:, e.g. PROGDIR:Save/
Solo Kazuki is offline  
Old 24 July 2020, 12:30   #7
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Solo Kazuki View Post
If game could be installed on HDD, it could be used PROGDIR:, e.g. PROGDIR:Save/
Thanks, good to know!
MickGyver is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading HDD with too many partitions arti support.WinUAE 3 26 February 2019 04:22
ClassicWb 3.9 an big hdd partitions oddodo project.ClassicWB 1 08 February 2015 23:25
How to read sidecar scsi-hdd with amiga partitions? HNoll support.Hardware 9 30 October 2011 20:43
List in alphabetical order in dropdown list of Floppy Drives Zed request.UAE Wishlist 1 06 February 2010 17:26
'clone' virtual HDD in winuae to real Amiga HDD? gizmomelb support.Other 1 11 December 2009 09:13

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:21.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14856 seconds with 15 queries