English Amiga Board Home Mobile Skin      


Go Back   English Amiga Board > Coders > Coders. General

Reply
 
LinkBack Thread Tools
Old 16 February 2009, 16:45   #1
Leffmann with two n's
 
Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,205
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   Reply With Quote
AdSense AdSense  
Advertisement:
Old 16 February 2009, 17:07   #2
Team Chaos Member
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Pierre, SD USA
Age: 38
Posts: 235
Send a message via Yahoo to Samurai_Crow
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?
__________________
Member: Total Chaos team and AROS Development Team.
Samurai_Crow is offline   Reply With Quote
Old 16 February 2009, 17:14   #3
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,576
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   Reply With Quote
Old 16 February 2009, 17:26   #4
Leffmann with two n's
 
Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,205
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   Reply With Quote
Old 16 February 2009, 17:37   #5
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 12,034
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   Reply With Quote
Old 16 February 2009, 17:44   #6
Leffmann with two n's
 
Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,205
Alright I'll take that as a definite answer. Thanks.
Leffmann is offline   Reply With Quote
Old 16 February 2009, 18:34   #7
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 12,034
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   Reply With Quote
Old 16 February 2009, 18:47   #8
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,576
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   Reply With Quote
AdSense AdSense  
Advertisement:
Old 16 February 2009, 19:18   #9
Leffmann with two n's
 
Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,205
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   Reply With Quote
Old 16 February 2009, 19:26   #10
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,576
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   Reply With Quote
Reply


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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ways of accessing to the early startup? _ThEcRoW support.Other 2 25 June 2007 16:25
Accessing my Amiga HDD on my pc RDLister New to Emulation or Amiga scene 5 03 November 2006 08:01
Is there a way to have a menu at boot time to choose AOS/MOS ? keropi support.Apps 3 23 August 2006 20:08
For those of you that must run old MS-DOS games, DOS Box has been ported Pyromania Amiga scene 19 06 June 2003 11:44
Making a shared library from a gcc .a library JoJo Coders. General 1 10 March 2003 19:06


All times are GMT +2. The time now is 10:25.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO ©2011, Crawlability, Inc.
Page generated in 0.21812 seconds with 9 queries