English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. System (http://eab.abime.net/forumdisplay.php?f=113)
-   -   workbench.library 45.132 patch to try out (http://eab.abime.net/showthread.php?t=65735)

PeterK 08 September 2012 07:41

workbench.library 45.132 patch to try out
 
1 Attachment(s)
Changes made in workbench.library 45.132 (beta test version):

Code:

* - ICONCTRLA_NewBumpRevision of $REV 130/131 was checking icon.library only
*  for Lib_Revision being exactly 4 and not if the version was 45.4 or newer.
* - Workbench.library copy function sometimes came up with a requester asking
*  to insert a disk with the strange volume name "afadaba..." in any drive.
*  This bug also caused many Enforcer hits and sometimes freezes or Gurus.
* - The requirements for the version of exec.library have been reduced to V39.
*  Thus, you can use this workbench.library now together with Kickstart 3.0.

Usage: spatch -onewfile -ppatchfile oldfile

spatch -oworkbench.library -pWbLib_45.127-45.132.pch workbench.library.45.127
or
spatch -oworkbench.library -pWbLib_45.131-45.132.pch workbench.library.45.131

Update: The 2nd bug is still not perfectly fixed. But the strange requester won't come up anymore.

clauddio 08 September 2012 09:32

Quote:

Originally Posted by PeterK (Post 838432)
Changes made in workbench.library 45.132:

Code:

* - ICONCTRLA_NewBumpRevision of $REV 130/131 was checking icon.library only
*  for Lib_Revision being exactly 4 and not if the version was 45.4 or newer.
* - Workbench.library copy function sometimes came up with a requester asking
*  to insert a disk with the strange volume name "afadaba..." in any drive.
*  This bug also caused many Enforcer hits and sometimes freezes or Gurus.
* - The requirements for the version of exec.library have been reduced to V39.
*  Thus, you can use this workbench.library now together with Kickstart 3.0.

Usage: spatch -onewfile -ppatchfile oldfile

spatch -oworkbench.library -pWbLib_45.127-45.132.pch workbench.library.45.127
or
spatch -oworkbench.library -pWbLib_45.131-45.132.pch workbench.library.45.131

good work....it seems you removed the KICK 3.1 malicious check
so now it is possible to run OS 3.9 on kickstart 3.0 without the patchlibrary fix?

gulliver 08 September 2012 09:37

Thank you for your work :)

PeterK 08 September 2012 09:44

No. I have doubt about that being possible, since there are probably lots of other libraries and tools where their programmers never really checked their code for the real requirements. There are indeed only a very few new functions which have been introduced with OS 3.1, but unfortunately most programmers insist on v40 instead of v39. I would say, maybe 95 % of these programs could work without problems on OS 3.0, too.

clauddio 08 September 2012 09:59

1 Attachment(s)
Quote:

Originally Posted by PeterK (Post 838441)
No. I have doubt about that being possible, since there are probably lots of other libraries and tools where their programmers never really checked their code for the real requirements. There are indeed only a very few new functions which have been introduced with OS 3.1, but unfortunately most programmers insist on v40 instead of v39. I would say, maybe 95 % of these programs could work without problems on OS 3.0, too.

I know it is possible because I have OS3.9 installed on my A1200+ kickstart 3.0 since long time ago....and it works like a charm
supposedly I always assumed that the malicious check for V40 libraries are inside the workbench.library

here is the beginning of my startup-sequence


run >nil: patchlibrary expansion.library 40
run >nil: patchlibrary exec.library 40
run >nil: patchlibrary utility.library 40
run >nil: patchlibrary graphics.library 40
run >nil: patchlibrary layers.library 40
run >nil: patchlibrary keymap.library 40
run >nil: patchlibrary intuition.library 40
run >nil: patchlibrary dos.library 40
run >nil: patchlibrary gadtools.library 40

PeterK 08 September 2012 10:27

Yes, thank you very much clauddio.

That's what I expected, not just one or two libraries have to be changed.


@gulliver
Please don't include this workbench.library in your BB4 package. This is NOT a final version yet. I've just noticed that my fix for this strange "afadaba...." requester is still not working perfectly. When I repeat that test, I get Enforcer hits again.

gulliver 08 September 2012 19:23

Quote:

Originally Posted by PeterK (Post 838446)
@gulliver
Please don't include this workbench.library in your BB4 package. This is NOT a final version yet. I've just noticed that my fix for this strange "afadaba...." requester is still not working perfectly. When I repeat that test, I get Enforcer hits again.

Thank you for your advice, I was going that road...:)

matthey 08 September 2012 21:13

@gulliver
It's always good to do testing before release, preferably on different setups with Enforcer/MuForce/MuGuardianAngel. It's too easy to make mistakes no matter how good we appear to be sometimes.

@PeterK
There is the workbench.library bug with fonts that seemed to be introduced in the later fixes. I get pink text in Workbench if ENVARC:sys/font.prefs or diskfont.library does not exist. Might be worth looking into. You might also consider a basic library cleanup:

1) SAS/C CopyMem() -> exec.library/CopyMem()
2) .b and .w branches to .l branches is slower and doesn't save much code (time consuming to fix)
3) divul/divsl always use the same form, remainder unneeded sometimes
4) mulu/muls doesn't use <ea> form most of the time either
5) Func_Table could be short version
6) Some smaller functions could be inlined (especially if only called from 1 location)
7) Scc Dn+NEG.B Dn+EXT.L Dn -> Scc Dn+EXT.L Dn+NEG.L Dn for 68060

The library is nearly clean of dead code which is very good for SAS/C :). The library uses the library base A6 inefficiently which is tricky and slow to eliminate :(. I do have the whole library disassembled, reassembled and appears to be working but it is large (~4MB with the ADis comments). Are you reassembling the whole library or are you just patching?

PeterK 10 September 2012 01:19

Hi Matt,
thank you for all your recommended improvements. I will add them to the ToDo-list, but atm, I do not even have a recompilable version of the workbench.library. Usually, I won't start to make any changes to the existing code before I can recompile it with the result of getting a 100 % identical executable again. I didn't have the time yet to build a commented ASM source listing. That's why I only patched the v45.131 with a hex editor, in order to avoid any label movements and maybe broken branches. I'm not sure, if I should start a workbench.library project before the icon.library is finished. The library meight be nearly clean of dead code, but I'm sure there is a very large easter egg in the workbench.library too which corresponds with other parts in the original icon.library (both written by Olaf Barthel) and also in IPrefs (the easter egg manager). I still don't know how to trigger that large easter egg. I just know the hidden tags.

matthey 10 September 2012 04:50

Hi Peter,
Yes, it's more risky to create a recompiled version of an executable but it's easier to work with and the savings are nice. I've tediously patched by hand with a hex editor also. ADis can list file offsets which makes it easier.

Let me know if you want my disassembled version of the workbench.library. I know where most of the trouble spots for ADis are and how to correct them. I could do a basic cleanup too. There is always a working original version to roll back to if there is a problem. I can see trying to isolate the problem by reducing the possibility of introducing more problems though ;).

I doubt eliminating the easter eggs in workbench.library will save much. More could probably be saved by combining duplicate text. I see "rexxsyslib.library" twice for example. The diskfont.library had 3 versions of the same string in some cases. It's interesting what is found in programs sometimes.

tom256 22 September 2012 01:43

Quote:

Originally Posted by PeterK (Post 838441)
No. I have doubt about that being possible, since there are probably lots of other libraries and tools where their programmers never really checked their code for the real requirements. There are indeed only a very few new functions which have been introduced with OS 3.1, but unfortunately most programmers insist on v40 instead of v39. I would say, maybe 95 % of these programs could work without problems on OS 3.0, too.

Here is the link with various ROM3.x with changes made inside:
http://privat.bahnhof.se/wb409723/bl...00/romcomp.htm
I hope it will be useful.

PeterK 22 September 2012 02:03

Thanks tom256 !
Very interesting, I've never heard anything of Kickstart 40.55 before. I will make a screenshot or copy. My information about new functions is based on the LVO listings.

NovaCoder 03 October 2012 04:04

Carry on the good work guys, make those system libraries as fast and bug free as possible :)

emufan 16 October 2012 19:20

the patch for 45.132 fails here. version of original says 45.131 ( size 191928 ), command line is ok: "incorrect version of original file". disabled JIT in winuae ( you never know ...). what am I doing wrong?

PeterK 16 October 2012 22:19

Your workbench.library 45.131 is NOT the original, it's probably a version of 131 which I once modified to make it usable with Kickstart 3.0. It was included in one of the demo packages. You can see the difference with a hex editor and the date of the original should be 28.06.2006. My version will have a newer date and a different ID string inside.

emufan 16 October 2012 23:04

yes, from icon.library demo adf. i'll look for the real one.

Edit: found workbench.library 45.127 in BoingBag #1. patch for 45.132 is working now, but version says 45.131 after patching.

apex 17 October 2012 10:14

@PeterK
If there will be a final version from the workbench.library, it would be also nice to get this information on a1k. :) Or just a small PM to me.

PeterK 17 October 2012 22:23

Hi apex,

no need to worry about that since there is already a thread at a1k.org, too: http://www.a1k.org/forum/showthread....170#post551170

However, please don't expect that I would start writing a new workbench.library soon. I've no intentions to do anything like this ATM.

tom256 14 November 2012 23:08

Works fine with WinUAE.

mfilos 14 November 2012 23:14

Not only with WinUAE but with the real thing as well :)
I have it from day 1 and never experienced a problem in my heavy custom setup.


All times are GMT +2. The time now is 17:36.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.

Page generated in 0.04485 seconds with 11 queries