English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 19 October 2016, 20:17   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
More FFS patches needed for booting on pre-1.1 Kickstart?

WinUAE can patch FastFileSystem (version 36.03 as on Workbench 1.3.2) to allow booting on Kickstart 1.1 and earlier. It patches four calls to CopyMem() because that function was first implemented in Kickstart 1.2.

I was looking at the FFS code and noticed some other places that should be patched. Or maybe I just didn't see where in the WinUAE source you already handle this???

OpenLibrary (-$228) is not implemented in Kickstart 1.0 and earlier. That's called to open dos.library at offset $7F2 in FFS 36.03 ($7F6 in FFS 34.85). That should be changed to call OldOpenLibrary (-$198) on 1.0 or earlier.

(What I call) the ShowRequester function opens intuition.library then calls AutoRequest(). For Kickstart 1.0 and earlier the call to OpenLibrary (-$228) should be changed to OldOpenLibrary (-$198). However AutoRequest() doesn't exist in Kickstart 0.7, so ShowRequester should be patched out when running on a pre-1.0 Kickstart.

Patch offsets summary
Code:
FFS34.85 FFS36.03
07F6     07F2     JSR (_LVOOpenLibrary,A6) (dos) (for <= Kick 1.0)
2A2E     2A4A     BMI.W (change to BRA.W for pre-1.0 Kickstart)
2A50     2A6C     JSR (_LVOOpenLibrary,A6) (intuition) (for Kick 1.0)
For completeness, the CopyMem patch offsets for FFS 34.85 (as on Workbench 1.3) are:
Code:
0786	MOVEQ #$30,D0 / JSR (_LVOCopyMem,A6)
07BC	MOVEQ #$28,D0 / JSR (_LVOCopyMem,A6)
158C	MOVE.L D6,D0 / JSR (_LVOCopyMem,A6)
15A4	MOVE.L D6,D0 / JSR (_LVOCopyMem,A6)
(Maybe supporting FFS 34.85 could be helpful for some existing HDF with that version in the RDB?)
mark_k is offline  
AdSense AdSense  
Old 19 October 2016, 20:56   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
What does it do with dos.library? If it is only used for something that only happens in error condition: I am not sure if I bother with it..

Patching is in filesys.asm, "wrap BCPL filesystem call to non-BCPL filesystem". EDIT: part of it is there, another part is in filesys.cpp/filesys_bcpl_wrapper().
Toni Wilen is offline  
Old 19 October 2016, 23:10   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
DOS is opened in the initialisation routine. If open fails probably the filesystem won't work. Elsewhere in the code it reads dl_Root from DosBase then references rn_Info from that, returning a pointer to di_DevInfo. The subroutine which does that is called from several places.

On Kickstart 1.0 the call to the "new" OpenLibrary (-$228) will probably fall through to the jump for GetCC. On Kickstart 27.6 it will probably fall through to the jump for RawDoFmt.

It should be very easy to patch; just change -$228 to -$198 for OpenLibrary->OldOpenLibrary. And bypass the requester routine if on a pre-1.0 Kickstart. Those Kickstarts are probably crashy enough already...
mark_k is offline  
Old 20 October 2016, 17:52   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
OpenLibrary's patched, at least 1.0 now boots to WB 1.0 properly from HDF.

0.7 does not work, it seems to ignore filesystem for some reason.
Toni Wilen is offline  
Old 21 October 2016, 21:20   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Does 0.7 crash or hang, or does booting continue from floppy?
mark_k is offline  
Old 21 October 2016, 21:43   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by mark_k View Post
Does 0.7 crash or hang, or does booting continue from floppy?
I don't know. Something weird is happening. If only FFS WB1.0 HDF is mounted, it boots and CLI screen opens. WB1.0 disk can be inserted now and for example df0:c/info runs. (without showing DH0:)

But UAE debugger TO does list mounted DH0: (using ROM filesystem) in dos lists.

It looks like 0.7 boots as long as boot block is valid. Working filesystem is not required.
Toni Wilen is offline  
Old 25 October 2016, 19:46   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
I traced it to dos/DeviceProc("DH0:") returning zero. It looks like WB 1.3 FastFileSystem fails to initialize under 0.7. It is not generic FS problem because UAE directory filesystem works fine.
Toni Wilen is offline  
Old 26 October 2016, 20:01   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by Toni Wilen View Post
It is not generic FS problem because UAE directory filesystem works fine.
It does not work. I guess I accidentally used wrong config.

There is no way to get it to work without larger updates. I quickly found following breaking changes between 0.7 vs 1.0:

- DosList dol_Name is BCPL string array, not a pointer. (Easy to work around)
- FileSysStartUpMsg does not seem to exist. (This should not cause any problems when using directory filesystem)
- Level 2 interrupt server chain (probably 6 too) don't seem to exist or at least they don't work, only ROM built-in CIA routine is called. (Not easy to work around and these probably aren't the only breaking changes..)

This become "not worth the trouble". It is not "would be fun to support ancient ROM versions" anymore.

KS 1.0 is oldest "compatible" ROM. At least until someone finds KS version that is newer than 0.7 but older than 1.0.
Toni Wilen is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-booting under Kickstart 1.2 mark_k Coders. System 6 11 October 2015 14:27
Long delay booting to kickstart -Acid- support.Hardware 19 17 April 2015 02:53
Booting alternate Kickstart levels in software? shirsch support.Other 2 16 June 2007 02:25
A3000 not booting, advice needed AMIGAZ support.Hardware 9 19 February 2005 18:38
Some rare pre-installed WHDLoad games needed... Shoonay request.Old Rare Games 5 27 August 2004 21: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 00:37.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.14003 seconds with 11 queries