English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 16 February 2009, 16:45   #1
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Accessing dos.library during boot time

Is it possible to open dos.library and get DOS file access during boot time? OpenLibrary fails, and calling FindResident and InitResident will just put me right in AmigaDOS with the CLI open.
Leffmann is offline  
Old 16 February 2009, 17:07   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Dos.library should always be accessible. It is in the Kickstart. I don't know why OpenLibrary would fail. Are you specifying an incompatible version number?
Samurai_Crow is offline  
Old 16 February 2009, 17:14   #3
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Leffmann View Post
Is it possible to open dos.library and get DOS file access during boot time? OpenLibrary fails, and calling FindResident and InitResident will just put me right in AmigaDOS with the CLI open.
I don't think that loading files via dos.library during boot is possible. Why do you need something like that anyway? "Workaround" would be to use trackdisk.device to load files directly.
StingRay is offline  
Old 16 February 2009, 17:26   #4
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by Samurai_Crow View Post
Dos.library should always be accessible. It is in the Kickstart. I don't know why OpenLibrary would fail. Are you specifying an incompatible version number?
Nope I'm calling it correctly, specifying version 33 for 1.2.

I don't really need to open files during boot time but I'm very curious to know if it's doable without that expansion.library trick. Using trackdisk.device works I guess, though if you intend to store data as DOS files it will be one hell of a workaround.

If anyone knows how to, please post
Leffmann is offline  
Old 16 February 2009, 17:37   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
dos isn't available at boot time, it gets initialized after boot block returns and it can't be initialized like other libraries. Dos is special case..
Toni Wilen is offline  
Old 16 February 2009, 17:44   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Alright I'll take that as a definite answer. Thanks.
Leffmann is offline  
Old 16 February 2009, 18:34   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Create task from boot block that polls library list and continue when dos.library appears?

Note that even if dos.library is available, you couldn't call any interesting functions because boot block code isn't using Process environment.

btw, WinUAE clipboard sharing does some (stupid) tricks. It starts a task during boot phase, checks every few seconds if dos.library is initialized, opens it, creates a process which finally can open clipboard.device..
Toni Wilen is offline  
Old 16 February 2009, 18:47   #8
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
I'd just store the pointer to the filename somewhere and then just have a small loader which would load the file (like it was done in all the boot menus back in the day). This of course is not exactly what you want (as the file is not loaded during boot) but may be ok as workaround?
StingRay is offline  
Old 16 February 2009, 19:18   #9
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by Toni Wilen View Post
Note that even if dos.library is available, you couldn't call any interesting functions because boot block code isn't using Process environment.
Which means no reading of DOS files. I should've realized it wasn't doable since no one else had done it before.

Quote:
Originally Posted by StingRay View Post
I'd just store the pointer to the filename somewhere and then just have a small loader which would load the file (like it was done in all the boot menus back in the day). This of course is not exactly what you want (as the file is not loaded during boot) but may be ok as workaround?
You mean to exit to the CLI and let a loader take over from there? Loading from inside the boot block would be neatest though. I've digested files straight to the disk and used trackdisk.device to do it before and it still seems to be the only option I guess.
Leffmann is offline  
Old 16 February 2009, 19:26   #10
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Leffmann View Post
You mean to exit to the CLI and let a loader take over from there? Loading from inside the boot block would be neatest though. I've digested files straight to the disk and used trackdisk.device to do it before and it still seems to be the only option I guess.

Yeah, that's what I meant. If you really want to load directly from bootblock you need to use trackdisk.device. If you save your files on disk with a custom tool which saves all offsets/lengths in a table it shouldn't be much of a problem to do that.
StingRay 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
Open-source dos.library Don_Adan Coders. System 273 02 September 2020 00:42
execute function from dos.library Foul Coders. Asm / Hardware 5 08 August 2012 17:56
dos.library Open() hangs MrD Coders. Asm / Hardware 15 24 July 2012 19:55
Dos.library question. Thorham Coders. General 2 11 January 2011 21:03
dos.library LockRecord() function fails LamboJay support.WinUAE 12 24 September 2010 21:05

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 23:22.

Top

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