Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Coolit on May 23, 2007, 10:54:28 PM

Title: AFA Setup help - morelibspace
Post by: Coolit on May 23, 2007, 10:54:28 PM
Hi All,

I've been updating my A1200 over the last few days and decided to remove powericons and replace it with AFA. I've successfully removed powericons and installed the latest AFA following the instructions to the letter as far as I can tell (did a manual install).

I have been partially successful, as far as I can tell everything works except the 32bit icons, the fonts look lovely btw! Now I've narrowed the problem down using snoopdos, it shows the following error continually in a cycle:-

ramlib load LIBS:icon_lib.exe error c/morelibspace not start Fail

From this I guess this means morelibspace hasent been started or has fallen over through a conflict with something during boot up, I've tried disabling a few things in startup-sequence but with no success (spent most of the day on this!)

Has anyone had the same problem? or can suggest what to try next?

Here s my startup-sequence:-

;PsdLoadModule DEVS:input.device QUIET ;Added by Poseidon-Installer - not used loaded by blitzkick
C:ATA3.driver QUIET
C:stack 8192
; $VER: Startup-Sequence_HardDrive 45.1 (25.11.00)
; Startup-Sequence for hard drive systems

If Exists C:IDEFix
  C:IDEFix
EndIf

;Sets sync on HDD
Run > NIL: myunitcontrol unit 0 device 1230scsi.device period 10 reselect

;Sets SFS cache on HDDs
Run > NIL: SetCache QDH0 Lines=40 ReadAhead=32768
Run > NIL: SetCache QDH1 Lines=40 ReadAhead=32768
Run > NIL: SetCache QDH2 Lines=20 ReadAhead=16384
Run > NIL: SetCache QDH3 Lines=20 ReadAhead=16384
Run > NIL: SetCache QDH4 Lines=20 ReadAhead=16384
Run > NIL: SetCache demos Lines=20 ReadAhead=16384
Run > NIL: SetCache games Lines=40 ReadAhead=32768
Run > NIL: SetCache backup Lines=20 ReadAhead=16384

C:morelibspace

;ADDED NOROMUPDATE FOR BLIZKICK
C:SetPatch NOROMUPDATE QUIET

;Blizkick
BlizKick KICKFILE=DEVS:rom_v45.57 EXTRESBUF=150000 HOGWAITBLIT SPEEDROM LOCALFAST MODULE DEVS:input.device FastFileSystem FileSystem.resource SCSI.device ram-handler console.device NoClick BBlank SpeedyIDE RemCards QUIET

C:Version >NIL:
C:AddBuffers >NIL: DF0: 15
FailAt 21

C:MakeDir RAM:T RAM:Clipboards RAM:ENV RAM:ENV/Sys
C:Copy >NIL: ENVARC: RAM:ENV ALL NOREQ

Resident >NIL: C:Assign PURE
Resident >NIL: C:Execute PURE

Assign >NIL: ENV: RAM:ENV
Assign >NIL: T: RAM:T
Assign >NIL: CLIPS: RAM:Clipboards
Assign >NIL: REXX: S:
Assign >NIL: PRINTERS: DEVS:Printers
Assign >NIL: KEYMAPS: DEVS:Keymaps
Assign >NIL: LOCALE: SYS:Locale
Assign >NIL: LIBS: SYS:Classes ADD
Assign >NIL: HELP: LOCALE:Help DEFER

BindDrivers
C:Mount >NIL: DEVS:DOSDrivers/~(#?.info)

C:LoadMonDrvs

;IF EXISTS DEVS:Monitors
;  IF EXISTS DEVS:Monitors/VGAOnly
;    DEVS:Monitors/VGAOnly
;  EndIF

;  C:List >NIL: DEVS:Monitors/~(#?.info|VGAOnly) TO T:M LFORMAT "DEVS:Monitors/%s"
;  Execute T:M
;  C:Delete >NIL: T:M
;EndIF

SetEnv Language "english"
SetEnv Workbench $Workbench
SetEnv Kickstart $Kickstart
UnSet Workbench
UnSet Kickstart

C:AddDataTypes REFRESH QUIET
C:AFA_OS_loader
Run > NIL: "Applications:VisualPrefs/VisualPrefs"
C:IPrefs
C:ConClip


Path >NIL: RAM: C: SYS:Utilities SYS:Rexxc SYS:System S: SYS:Prefs SYS:WBStartup SYS:Tools SYS:Tools/Commodities

SYS:System/REXXMast >NIL:

IF EXISTS S:User-Startup
  Execute S:User-Startup
EndIF

Resident Execute REMOVE
Resident Assign REMOVE

run >NIL: birdie c:window_enabled.jpg c:window_disabled.jpg activepattern PUBSCREENS REDRAWBITMAPS
Run >NIL: Applications:FreeWheel/FreeWheel QUIET
;Run >NIL: PowerIcons
;Run >NIL: Workbench:Internet/Genesis/GenesisRA QUIET
C:LoadWB
EndCLI >NIL:
Title: Re: AFA Setup help - morelibspace
Post by: klesterjr on May 23, 2007, 10:57:47 PM
I don't see 'morelibspace' in your Startup.sequence -- it needs to be the very first thing.
Title: Re: AFA Setup help - morelibspace
Post by: Ancalimon on May 23, 2007, 10:59:49 PM
just a guess and an advice. use stackattack.
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 23, 2007, 11:04:30 PM
Ahh, I took it out last boot, edited it and put it back where I had it:)
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 23, 2007, 11:48:07 PM
Thanks for the advice FaLLeNOnE, StackAttack seems like a wise move so I've installed it but theres still no change in my problem :-(
Title: Re: AFA Setup help - morelibspace
Post by: CannonFodder on May 23, 2007, 11:55:33 PM
Quote

FaLLeNOnE wrote:
just a guess and an advice. use stackattack.



Nooooooooooooo! Use Stack Attack 2 (http://www.rycochet.com/other/stackattack2.php) instead.
Title: Re: AFA Setup help - morelibspace
Post by: CannonFodder on May 24, 2007, 12:08:30 AM
Once you've got your libspace problem sorted, try adding these patches for a nice speed boost. :-)

FBlit (http://aminet.net/package.php?package=util/boot/fblit.lha)
FText (http://aminet.net/package/util/boot/FText)
Executive (http://aminet.net/package/util/misc/Executive)
Key file for Executive (http://aminet.net/package/util/misc/Executive_key)
FScreen (http://www.grey13.com/files/fscreen021ntta.zip)
SystemPatch (http://digilander.libero.it/ziosante/download/SystemPatch299.lha)
BlazeWCP (http://aminet.net/package/util/boot/Blazewcp)

There is a patch that forces everything to run in FastRAM but I forget its name and I've sold all my classic hardware now.
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 24, 2007, 12:14:14 AM
Woow nice post CannonFodder, I'll look into all these once I get this problem sorted, thanks :) It was StackAttack 2.9 that I installed btw :)

Hmm, think I may join the AFA forums and post there too (or maybe not as they arnt taking registrations to the forums).
Title: Re: AFA Setup help - morelibspace
Post by: AmiKit on May 24, 2007, 12:20:25 AM
@Coolit

Like klesterjr said, morelibsapce needs to be the very first thing in your startup-sequence. Then cold reboot and try again.

I don't see AfA_OS_Loader right after C:AddDataTypes REFRESH QUIET line.

Also try to reduce BlizKick's arguments to load the ROM only. If it helps, add the arguments back one by one to see which one is problematic.

Btw. the VisualPrefs should be run before IPrefs.
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 24, 2007, 12:37:13 AM
Again forgot to add C:AFA_OS_loader back in after playing about with it earlier, I've added it where I have it.

The author suggests to put C:morelibspace before the setpatch line, tried it as the very first line and it didn't make any difference.

Thanks for pointing out about VisualPrefs, Ive made the change, ta :)

Tried removing all the Blizkick arguments earlier, except the ROM one, that didn't do it :(
Title: Re: AFA Setup help - morelibspace
Post by: AmiKit on May 24, 2007, 01:15:16 AM
Remember to always switch your computer off and on when manipulating with morelibspace as simple reboot is not enough.

Do you use AFA_OS_Libs: assign? I have the following command right after the AfA_OS_Loader line:
Assign >NIL: AfA_OS_Libs: SYS:Utilities/EXPANSION/AfA_OS/AfA_OS_Libs

If it doesn't help, wait till weekend when the new version of AfA_OS appears. I'll tell the author about your problem meanwhile.

Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 24, 2007, 09:17:15 AM
A user report me that before 3-4 days blitzkick dont work with blitzkick.

I hear that blitzkick can add resident Programs.Not sure if this is release for public or not.
If this can do in your blitzkick try add the residnet module morelibspace or morelibspace V45.See in scout resident modules (when
you have deactivate blitzkick)

I give the User the suggestion to ask the blitzkick coder or remus coder to add morelibspace feature to blitzkick or remus.
morelibspace is 100% compatible and is ndependent from AFA OS, it only allow more room in some libraries for more functions and data
by change the AOS command MakeLibrary.the source in asm is in the AFA OS archive.

That morelibspace increase not all libraries it detect with the positive lib space if a librarary must increase or not.
So it do that only with 5 libraries  


begin
MOVEM.l a0-a6/d0-d7,-(a7)
MOVE.l $4,a6
MOVE.l a6,a1
LEA newfunc(pc),a0
MOVE.l a0,d0
MOVE.l #-84,a0     ;makelibrary
JSR -420(a6)
LEA oldfunc(pc),a0
MOVE.l d0,(a0)
MOVEM.l (a7)+,a0-a6/d0-d7
RTS



newfunc
MOVEM.l d1/a1/a2/a3,-(a7)
CMP.l #1492,d0            ;diskfont
BEQ 'ok
CMP.l #134,d0             ;diskfont
BEQ 'ok
CMP.l #3150,d0            ;intuition library
BEQ 'ok
CMP.l #544,d0            ;graphics library
BEQ 'ok
CMP.l #46,d0            ;layers library
BEQ 'ok
CMP.l #348,d0           ;icon.library
BEQ 'ok
BRA 'skip
'ok
MOVEQ #0,d0
CMP.w #-1,(a0)
BNE 'dolong
MOVE.l a0,a2
ADDQ.w #2,a0
LEA funcs(pc),a1
'g1 CMP.w #-1,(a0)
BEQ 'em1
MOVE.w (a0)+,d1
EXT.l d1
ADD.l a2,d1
MOVE.l d1,(a1)+
ADDQ.l #1,d0
BRA 'g1
'em1 ADDQ.l #1,d0
LEA dummy(pc),a0
MOVE.l a0,(a1)+
CMP.l #350,d0
BNE 'em1
MOVE.l #-1,(a1)+
LEA funcs(pc),a0
BRA 'doit
'dolong


LEA funcs(pc),a1
'g2 CMP.l #-1,(a0)
BEQ 'em1
MOVE.l (a0)+,(a1)+
ADDQ.l #1,d0
BRA 'g2

'doit MOVE.l #10000,d0
'skip MOVEM.l (a7)+,a1/a2/d1/a3
MOVE.l oldfunc(pc),-(a7)
RTS
dummy: TRAP #0
       RTS
funcs: Ds.l 410
oldfunc: Dc.l 0
name: Dc.b "morelibspace",0
name2: Dc.b "morelibspace V45",0
Even
endresi
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 24, 2007, 09:56:55 AM
@ AmiKit

Tried that didn't work, thanks again anyway:)

@ bernd_afa

So from what you've said, AFA morelibspace currently doesn't work if your using Blizkick? But it will work if the Blizkick author patches it to handle a morelibspace module? can you confirm this

My problem is that if I disable Blizkick and remove the NOROMUPDATE added to the setpach line, startup gets stuck after the setpatch reboot, so I'm not really sure where to go from here although I guess this is because of my limited knowledge in reversing the patch. Any help with this would be greatly appreciated.

Thanks for the help
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 24, 2007, 10:07:30 AM
@bernd_afa

Quote
A user report me that before 3-4 days blitzkick dont work with blitzkick.

...

Quote
I hear that blitzkick can add resident Programs.Not sure if this is release for public or not.

 BlizKick.lha (http://www.iki.fi/sintonen/sw/BlizKick.lha)

Quote
I give the User the suggestion to ask the blitzkick coder or remus coder to add morelibspace feature to blitzkick or remus.

Just make your resident module such that once loaded by LoadSeg it will appear as full-blown resident tag. Then it can be used as BlizKick and remus as-is.

[code...]

Eeek, what a hack.

Frankly I don't know why it would only break with BlizKick, but I surely hope rest of AFA isn't that bad.

Some bugs in it:

- It's non re-entrant: Two simultanous (matching) callers and the thing will explode and crash the system.

- If some matching library should already have more than 350 functions, the routine will overwrite the whole system memory and crash the system. Separately: If there are at least 411 functions, the old MakeLibrary funcptr is trashed and system will crash aswell.

- KickTags should be placed to MEMF_KICK memory.

- The routine patching the kicktag to system doesn't look correct (it doesn't maintain the linked list properly).

- The KickTagPtr memory is allocated using AllocAbs, which means that the first 8 bytes can be trashed. If that'd happen, it would nuke the kicktag linkage.

- It will patch unrelated libraries which happen to match the 6 possizes compared. Nukes the system if the library in question has more than 350 functions (see above).

- If any library possize is different from the hardcoded values used to catch the specific libraries, the library will not be patched. I can see this causing problems with some diskfont.library versions for example (though assuming patching is not critical for other parts, this might not be fatal).

- Weird: Why is every patched library negsize expanded to include fixed number of 350 slots? That sounds rather excessive for certain libraries.

- Weird: Why is the every patched library possize expanded to 10KB? I can't possibly see any reason for that (surely AFA isn't doing any dirty tricks with library possize area?).
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 24, 2007, 12:42:43 PM
Piru and Bernd, working together - the next AfA_OS is going to be bloody terrific! ;)

Keep up the good work chaps,
James
x
Title: Re: AFA Setup help - morelibspace
Post by: klesterjr on May 24, 2007, 02:27:02 PM
@jmbattle
Quote
Piru and Bernd, working together


Hmmm ...

I wouldn't work with anyone who had just thoroughly trashed my work in a public forum.
Title: Re: AFA Setup help - morelibspace
Post by: itix on May 24, 2007, 03:55:58 PM
Quote

I wouldn't work with anyone who had just thoroughly trashed my work in a public forum.


Pointing out serious bugs is not trashing.
Title: Re: AFA Setup help - morelibspace
Post by: pVC on May 24, 2007, 04:01:14 PM
Especially when code is presented in public forum. Would be harmful to leave serious bugs uncommented.
Title: Re: AFA Setup help - morelibspace
Post by: klesterjr on May 24, 2007, 05:09:00 PM
@itix
Quote
Pointing out serious bugs is not trashing.


No -- but doing it in the manner Piru did is (in MY opinion).

An e-mail would have been more appropriate (in MY opinion).
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 24, 2007, 05:25:45 PM
@klesterjr

So why didn't you email or send private message to me then?

But hey don't worry, you don't need to work with me.

Anyhow, if you would have followed my earlier posts to any coding related threads, you'd noticed that I'm rather pedantic about coding. I am quite direct when pointing out errors, too. I was quite apalled to find out how broken this particular code was, so my comments probably were even stronger than usual.

If someone feels offended, well I'm sorry I hurt your feelings. The bugs are real though, and should be fixed.
Title: Re: AFA Setup help - morelibspace
Post by: AmiKit on May 24, 2007, 11:51:46 PM
Easy guys. I am sure Piru didn't mean it bad. His comments already helped to enhance Amijeweled code and I hope for the same with the AfA_OS.
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 25, 2007, 12:11:27 AM
Yup I'm sure Piru's comments will help get the compatibility sorted with AFA_OS.

I have to say I'm pretty surprised this incompatibility hasn't been talked about on here before, Blizkick is such a widely used program!
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 25, 2007, 03:18:26 PM
>Especially when code is presented in public forum. Would be harmful to leave serious bugs uncommented.

Thats the reason i post that code, maybe get some hints doing it better.

>[code...]

Eeek, what a hack.

Yes, maybe, reason is i never see any code in RKM how to write a resident module at Priority 70 style conform.
amigaOSrom patch or filesystems use a lower priority and are nort so critical.

If you can post me such clean resident code snipped i can rework that  

>- If any library possize is different from the hardcoded values used to catch the specific libraries,
>the library will not be patched. I can see this causing problems with some diskfont.library versions for example

Most( i know nobody that use old libs) users  use the newest library.I dont want increase all library space
every AFA modul check if the library space is enough and give output in snoopdos.read the first post what happen

>- Weird: Why is the every patched library possize expanded to 10KB?
>I can't possibly see any reason for that (surely AFA isn't doing any dirty tricks with library possize area?).

I see no way doing it better when the design goal is that morelibsapce should work with all existing and future AFA OS.

The fixed size is choose for simplify this.It is choosen that there need not every new AFA release a new morelibspace
and users can get trouble because of wrong morelibspace or i can forget release new version.

AROS iconlibrary for example have in the positive lib space a hash table of 5000 bytes of size.This must fit in the library

The rule i use is largest library size i ever see *2.

This mean if the largest AOS library get 2* more functions or 2* more pos libspace then a new morelibspace is need.
I see as largest library intuition library with ca. 180 funcs.so i choose 350 funcs.I see so far no other AOS with 350 funcs, maybe this limit never happen...  
 
>Frankly I don't know why it would only break with BlizKick, but I surely hope rest of AFA isn't that bad.

that happen because blitzkick seem overwrite makelibrary function.The library is not increase and so iconlib dont work.

>Hmm, think I may join the AFA forums and post there too (or maybe not as they arnt taking registrations to the forums).

The AFA forum is nonworking too much spammers want register here.I get before some days a mail  
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 25, 2007, 05:05:12 PM
Thanks for posting back,

Ahh, I understand about your forum, just glad your checking this forum too.

Is the Blizkick compatibility issue something that will get worked on for future updates of AFA_OS? It's just I love the AA fonts and the png icons, but Blizkick is a must have part of my set-up like many other classic users.

Thanks  :-)
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 25, 2007, 05:21:48 PM
I read in blitzkick docu about KEEPEXEC Switch.

Maybe that help that morelibspace work.

KEEPEXEC/S
                    Try to retain exec.library and reset proof
                applications when rebooting the system. There
                really is no reason to use this switch, but
                sometimes it could be useful, if the reset
                proof application can cope ROM changing on
                them. PLEASE DON'T USE THIS SWITCH WITHOUT
                A GOOD REASON. You have been warned. Normal
                users can forget all about this switch. :)              

also you can try the
loadresident C:morelibspace
command in your blitzkick dir.

I cant test, because i use winuae and here come error EXTRES Buffer API not found.

I know somebody do blitzkick that work on winuae but if that feature work same as on real amiga i dont know.



 
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 25, 2007, 06:33:06 PM
@bernd_afa

Well, morelibspace should be after BlizKick to avoid excessive rebooting at power up (you should get 2 reboots then, instead of 3). In this case KEEPEXEC isn't required either.

To work reliably, the bugs should be fixed aswell.

Quote
also you can try the
loadresident C:morelibspace
command in your blitzkick dir.

This will not work with the current morelibspace. The morelibspace should have the resident tag inside it for this to work (just like any regular library or device). With this the morelibspace would work:

a) as blizkick module
b) with loadresident
c) as remus module
Title: Re: AFA Setup help - morelibspace
Post by: quenthal on May 25, 2007, 09:08:41 PM
@bernd_afa
Quote

With this the morelibspace would work:

a) as blizkick module
b) with loadresident
c) as remus module


What would be cool, is that all libraries of AFA_OS could be "ROMmable" modules, is this possible someday?

I'm sure there would be many who would use it 1) with blizkick for one boot system, or 2) with kickflash or some other flashrom-card or 3) even burn their own 1mb rom for a1200/a4000.
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 25, 2007, 09:39:16 PM
@quenthal
Quote
What would be cool, is that all libraries of AFA_OS could be "ROMmable" modules, is this possible someday?

Well, if they're regular libraries/devices/etc, then in theory it should be possible to just include them as BlizKick modules (this works for the EXTRESBUF area is it's actually RAM, not ROM).

I doubt the modules are truly (remus) "ROM"able though, for that the modules should not contain any static variables (all static variables should be in the library base). It is well possible to fix the modules to be truly "ROM"able, but might require quite a bit of adjustment of the existing AROS code.
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 25, 2007, 11:59:32 PM
After following this thread, I am confident that AfA_OS will continue to improve, while becoming more stable and compatible - hats off to you chaps!

Keep up the good work,
James
x
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 26, 2007, 08:55:46 AM
>Well, morelibspace should be after BlizKick to avoid excessive
>rebooting at power up (you should get 2 reboots then, instead of 3). In this case KEEPEXEC isn't required either.

morelibspace do no reboot when you dont use the parameter REBOOT.Only OS3.1 users must use REBOOT.

morelibspace add a resident module after load.When setpatch on OS > 3.1 do the reboot then after the reset in the
early bootphase at priority 70 it change the exec Funktion MakeLibrary.That Exec is not kill after every reset is a document AOS Feature.
Exec is only create when switch on the amiga, if the checksum is wrong or *exec\KickCheckSum is wrong.
And blitzkick seem support this with the Option.
makelibrary must patch so early because AOS create intuiton layer graphics etc libraries.
blitzkick seem use priority 0 (same as amiga rom update)or i am wrong ?.
When use priority 0 all system libraries are create and it is not possible to add new library functions to layer intuition graphics.

When blitzkick do exec not kill, then the Boot check for resident tags, find the morelibspace resident
and patch Makelibrary long time before blitzkick do any action.So all must work  

here is complete source in amiblitz.(pointers have always a * before.? is a address label

If FindResident_("morelibspace") Then End
memsize=?endresi-?begin+150+SizeOf .Resident
*kicktag.MemList=AllocMem_(memsize,$10001)
*resi.Resident=*kicktag+80
codemem.l=*resi+SizeOf .Resident
*kicktag\ml_Node\ln_Type=0;#NT_KICKMEM
*kicktag\ml_NumEntries=1
*kicktag\ml_ME\meu_Addr=*kicktag,memsize
*resi.Resident\rt_MatchWord=$4afc
*resi\rt_Flags=#RTF_COLDSTART
*resi\rt_Version=45,0,70
*resi\rt_Name=(?name-?begin)+codemem,(?name2-?begin)+codemem
*resi\rt_Init=codemem
*resi\rt_EndSkip=SizeOf .Resident;+(codemem+(?endresi-?begin +SizeOf .Resident))
*resi\rt_MatchTag=*resi
CopyMem_ ?begin,codemem,?endresi-?begin
*exec.ExecBase=execbase
*kicktag\ml_Node\ln_Succ=*exec\KickMemPtr
*exec\KickMemPtr=*kicktag
Poke.l *resi-4,*exec\KickTagPtr OR $80000000
Poke.l *resi-8,*resi
*exec\KickTagPtr=*resi-8
*exec\KickCheckSum=SumKickData_
CacheClearU_
If NumPars=1 AND Par$(1)="REBOOT" Then ColdReboot_
End

begin
MOVEM.l a0-a6/d0-d7,-(a7)
MOVE.l $4,a6
MOVE.l a6,a1
LEA newfunc(pc),a0
MOVE.l a0,d0
MOVE.l #-84,a0     ;makelibrary
JSR -420(a6)
LEA oldfunc(pc),a0
MOVE.l d0,(a0)
MOVEM.l (a7)+,a0-a6/d0-d7
RTS



newfunc
MOVEM.l d1/a1/a2/a3,-(a7)
CMP.l #1492,d0            ;diskfont
BEQ 'ok
CMP.l #134,d0             ;diskfont
BEQ 'ok
CMP.l #3150,d0            ;intuition library
BEQ 'ok
CMP.l #544,d0            ;graphics library
BEQ 'ok
CMP.l #46,d0            ;layers library
BEQ 'ok
CMP.l #348,d0           ;icon.library
BEQ 'ok
BRA 'skip
'ok
MOVEQ #0,d0
CMP.w #-1,(a0)
BNE 'dolong
MOVE.l a0,a2
ADDQ.w #2,a0
LEA funcs(pc),a1
'g1 CMP.w #-1,(a0)
BEQ 'em1
MOVE.w (a0)+,d1
EXT.l d1
ADD.l a2,d1
MOVE.l d1,(a1)+
ADDQ.l #1,d0
BRA 'g1
'em1 ADDQ.l #1,d0
LEA dummy(pc),a0
MOVE.l a0,(a1)+
CMP.l #350,d0
BNE 'em1
MOVE.l #-1,(a1)+
LEA funcs(pc),a0
BRA 'doit
'dolong


LEA funcs(pc),a1
'g2 CMP.l #-1,(a0)
BEQ 'em1
MOVE.l (a0)+,(a1)+
ADDQ.l #1,d0
BRA 'g2

'doit MOVE.l #10000,d0
'skip MOVEM.l (a7)+,a1/a2/d1/a3
MOVE.l oldfunc(pc),-(a7)
RTS
dummy: TRAP #0
       RTS
funcs: Ds.l 410
oldfunc: Dc.l 0
name: Dc.b "morelibspace",0
name2: Dc.b "morelibspace V45",0
Even
endresi

>What would be cool, is that all libraries of AFA_OS could be "ROMmable" modules, is this possible someday?

I dont know. blitzkick must support the increase of library space to have room for additional OS functions

for example AFA graphicslib support that functions but the original library creation code have no room for this functions in the library.that the functions can add is the job of morelibspace

SETFUNC(AndRegionRegionND,Graphics,GfxBase);
SETFUNC(CopyRegion,Graphics,GfxBase);
SETFUNC(NewRectRegion,Graphics,GfxBase);
SETFUNC(SetRegion,Graphics,GfxBase);
SETFUNC(ClearRegionRegion,Graphics,GfxBase);
SETFUNC(IsPointInRegion,Graphics,GfxBase);
SETFUNC(CreateRastPort,Graphics,GfxBase);
SETFUNC(FreeRastPort,Graphics,GfxBase);
}
 
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 26, 2007, 11:15:00 AM
@bernd_afa
Quote
morelibspace do no reboot when you dont use the parameter REBOOT.Only OS3.1 users must use REBOOT.

Yes I noticed that.

Quote
morelibspace add a resident module after load.When setpatch on OS > 3.1 do the reboot then after the reset in the early bootphase at priority 70 it change the exec Funktion MakeLibrary.

Yes, that is obvious.

Quote
That Exec is not kill after every reset is a document AOS Feature. Exec is only create when switch on the amiga, if the checksum is wrong or *exec\KickCheckSum is wrong.

Or if the exec version changes. And this can happen when you use BlizKick.

Thus, to use it with BlizKick, there are couple of options:
1) Create BlizKick compatible version of the patch, so it can be used as a module. Just adding the resident structure inside the binary is enough.

2) Instruct users to start the program after BlizKick, with REBOOT option.

Obviously the bugs listed still need to be fixed, too.

Quote
makelibrary must patch so early because AOS create intuiton layer graphics etc libraries.

If you want to patch the libraries to include new functions, then yes, obviously.

Quote
blitzkick seem use priority 0 (same as amiga rom update)or i am wrong ?

You are wrong. The BlizKick source code is included btw, you don't need to guess.

BlizKick can add any priority resident modules to system. It's just like expanding the ROM. BlizKick does not use KickTagPtr or KickMemPtr at all, either.

Quote
When blitzkick do exec not kill, then the Boot check for resident tags, find the morelibspace resident
and patch Makelibrary long time before blitzkick do any action.So all must work

It will work just fine. There will be two reboots though, but that is the only option (2) if you insist in not doing the simple thing and adding the resident structure.

Quote
here is complete source

The complete source is what I commented earlier. See the earlier post about the bugs.

Quote
>What would be cool, is that all libraries of AFA_OS could be "ROMmable" modules, is this possible someday?

I dont know. blitzkick must support the increase of library space to have room for additional OS functions

With BlizKick you could replace the whole ROM resident module with a new one, without need to patch anything. Then obviously there would be no need to increase any library function table.

If you don't want this, the easy step of adding the resident structure to the binary (+fixing the bugs) would make it BlizKick compatible.
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 26, 2007, 12:38:55 PM
I guess this means we won't be seeing a new version of AfA_OS released this weekend, huh Jan? ;)

Cheers,
James
x
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 26, 2007, 12:58:36 PM
>If you don't want this, the easy step of adding the resident structure to the binary (+fixing the bugs) would make it BlizKick compatible.

Can you please show me a blitzkick compatible source that can use with loadresident ?.In the blitzkick archive i see nothing.  
Because i cant test on my classic, i can then only copy the source of resident structure in morelibspace
and modify it and send a tester with blitzkick to test and hope it work ;-)

>(+fixing the bugs) would make it BlizKick compatible.

Only bug maybe possible is reentrant, my point of few was that , that always the ramlib task call makelibrary.
so that must not reentrant.

I have now change code that a task switch is disable with forbid so other task must wait.so it should be rock solid ;-)
others you told as  bugs are only limits.
 
Have you ever see a library that come near 250 Functions ?.

I see AROS libs and they are far far awy from the limit.
Or should i better increase the Limit to 1000 Functions ?.

Cost only 6000 bytes more memory.
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 26, 2007, 12:59:49 PM
>I guess this means we won't be seeing a new version of >AfA_OS released this weekend, huh Jan? ;)

morelibspace in not very important, can maybe later release.
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 26, 2007, 01:29:21 PM
Quote
Can you please show me a blitzkick compatible source that can use with loadresident ?


Like I've explained twice already, just a regular resident tag like in any library/device:

Code: [Select]
#include <exec/nodes.h>
#include <exec/resident.h>

void Init(void);

struct Resident res =
{
    RTC_MATCHWORD,
    &res,
    &res + 1,
    RTF_COLDSTART,
    1,
    NT_UNKNOWN,
    70,
    &quot;whatever&quot;,
    &quot;whatever 1.0 (26.5.2007)\r\n&quot;,
    Init
};

void Init(void)
{
}


Regarding the bugs you don't consider bugs: Well it's your choice. IMO those are potentially fatal bugs, but if you don't see them as such, I can't possibly force you to fix them.

Regarding number of functions in a library: Yes I've seen a library with more than 250 functions. Arbitrary limitations suck: Just because you don't know of a library with x functions doesn't mean that such a thing can't exist. It's good coding practice to be ready for unexpented, and don't blow up the whole system when the unexpected arrives. This is especially true when patching OS functions, since then you have no control of the potential input.
Title: Re: AFA Setup help - morelibspace
Post by: itix on May 26, 2007, 03:06:11 PM
Quote

Have you ever see a library that come near 250 Functions ?.

I see AROS libs and they are far far awy from the limit.
Or should i better increase the Limit to 1000 Functions ?.


Many libraries ported from Linux can easily have few hundred functions. glib.library for MorphOS has about 950 functions :-P

Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 26, 2007, 04:43:39 PM
>Many libraries ported from Linux can easily have few hundred functions. glib.library for MorphOS has about 950 functions

thats an reason i understand, but luckily 68k use clib2 OS4 use too, thats linker libs.also most linux libs are linker libs.
Also the library expand code is only execute when a library have this pos size.

CMP.l #1492,d0            ;diskfont
BEQ 'ok
CMP.l #134,d0             ;diskfont
BEQ 'ok
CMP.l #3150,d0            ;intuition library
BEQ 'ok
CMP.l #544,d0            ;graphics library
BEQ 'ok
CMP.l #46,d0            ;layers library
BEQ 'ok
CMP.l #348,d0           ;icon.library
BEQ 'ok
BRA 'skip

I get the idea to check if the function number is lower 200.
If a library with more functions than 200 really fit the pos size it is sure that it is not 1 of this ROM libraries that should enhance.
this should be really 100% safe or i am wrong ?.

The reason wy i must check for pos size is that it is the only indicator of library size.The AOS ROM diffrent librariey  versions have same pos size.
only differ in function size.

Check if the ROM library is large enough to fit new AROS code is Job of the AFA module.
 
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 27, 2007, 10:17:58 PM
Just as Jan suggested, a new version has just been released:

http://amidevcpp.amiga-world.de/afa_binarie_upload.php

I'm off to test it now. ;)

Cheers,
James
x
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 28, 2007, 08:15:32 AM
Yes 3.96 is release and too new morelibspace.

I hope now it work in blitzkick with that code...

If FindResident_("morelibspace") Then End
memsize=?endresi-?begin+150+SizeOf .Resident
*kicktag.MemList=AllocMem_(memsize,$10001)
*resi.Resident=*kicktag+80
codemem.l=*resi+SizeOf .Resident
*kicktag\ml_Node\ln_Type=0;#NT_KICKMEM
*kicktag\ml_NumEntries=1
*kicktag\ml_ME\meu_Addr=*kicktag,memsize
*resi.Resident\rt_MatchWord=$4afc
*resi\rt_Flags=#RTF_COLDSTART
*resi\rt_Version=45,0,70
*resi\rt_Name=(?name-?begin)+codemem,(?name2-?begin)+codemem
*resi\rt_Init=codemem
*resi\rt_EndSkip=SizeOf .Resident;+(codemem+(?endresi-?begin +SizeOf .Resident))
*resi\rt_MatchTag=*resi
CopyMem_ ?begin,codemem,?endresi-?begin
*exec.ExecBase=execbase
*kicktag\ml_Node\ln_Succ=*exec\KickMemPtr
*exec\KickMemPtr=*kicktag
If *exec\KickTagPtr
Poke.l *resi-4,*exec\KickTagPtr OR $80000000
End If

Poke.l *resi-8,*resi
*exec\KickTagPtr=*resi-8
*exec\KickCheckSum=SumKickData_
CacheClearU_
If NumPars=1 AND Par$(1)="REBOOT" Then ColdReboot_
End

;#include          ;example from Piru for blitzkick comaptible
;#include
;
;void Init(void);
;
;struct Resident res =
;{
;    RTC_MATCHWORD,
;    &res,
;    &res + 1,
;    RTF_COLDSTART,
;    1,
;    NT_UNKNOWN,
;    70,
;    "whatever",
;    "whatever 1.0 (26.5.2007)\r\n",
;    Init
;};
;
;void Init(void)
;{
;}




ROMTag:   Dc.w  #RTC_MATCHWORD  ; UWORD RT_MATCHWORD
          Dc.l  ROMTag          ; APTR  RT_MATCHTAG
          Dc.l  ROMTag+1        ; APTR  RT_ENDSKIP
          Dc.b  #RTF_COLDSTART  ; UBYTE RT_FLAGS
          Dc.b  1               ; UBYTE RT_VERSION
          Dc.b  #NT_UNKNOWN     ; UBYTE RT_TYPE
          Dc.b  70              ; BYTE  RT_PRI
          Dc.l  name            ; APTR  RT_NAME
          Dc.l  name2           ; APTR  RT_IDSTRING
          Dc.l  begin           ; APTR  RT_INIT

begin
MOVEM.l a0-a6/d0-d7,-(a7)
MOVE.l $4,a6
MOVE.l a6,a1
LEA newfunc(pc),a0
MOVE.l a0,d0
MOVE.l #-84,a0     ;makelibrary
JSR -420(a6)
LEA oldfunc(pc),a0
MOVE.l d0,(a0)
MOVEM.l (a7)+,a0-a6/d0-d7
RTS



newfunc
MOVEM.l d1/a1/a2/a3,-(a7)
JSR -$84(a6)
CMP.l #1492,d0            ;diskfont
BEQ 'ok
CMP.l #134,d0             ;diskfont
BEQ 'ok
CMP.l #3150,d0            ;intuition library
BEQ 'ok
CMP.l #544,d0            ;graphics library
BEQ 'ok
CMP.l #46,d0            ;layers library
BEQ 'ok
CMP.l #348,d0           ;icon.library
BEQ 'ok
BRA 'skip
'ok
MOVE.l d0,d0store
MOVE.l a0,a0store
MOVEQ #0,d0
CMP.w #-1,(a0)
BNE 'dolong
MOVE.l a0,a2
ADDQ.w #2,a0
LEA funcs(pc),a1
'g1 CMP.w #-1,(a0)
BEQ 'em1
MOVE.w (a0)+,d1
EXT.l d1
ADD.l a2,d1
MOVE.l d1,(a1)+
ADDQ.l #1,d0
BRA 'g1
'em1 ADDQ.l #1,d0
LEA dummy(pc),a0
MOVE.l a0,(a1)+
CMP.l #350,d0
BNE 'em1
MOVE.l #-1,(a1)+
LEA funcs(pc),a0
BRA 'doit
'dolong
LEA funcs(pc),a1
'g2 CMP.l #-1,(a0)
BEQ 'em1
MOVE.l (a0)+,(a1)+
ADDQ.l #1,d0
CMP.l #300,d0             ; failsave libs over 300 Slots are no romlib dont increase
BEQ 'wrong
BRA 'g2
'wrong
 MOVE.l d0store,d0
 MOVE.l a0store,a0
 BRA 'skip
'doit MOVE.l #10000,d0
'skip MOVEM.l (a7)+,a1/a2/d1/a3
MOVE.l a3,-(a7)
;MOVE.l oldfunc(pc),-(a7)
MOVE.l oldfunc(pc),a3
JSR (a3)
MOVE.l (a7)+,a3
JSR -$8a(a6)
RTS
dummy: TRAP #0
       RTS
funcs: Ds.l 410
oldfunc: Dc.l 0
d0store: Dc.l 0
a0store: Dc.l 0
name: Dc.b "morelibspace",0
name2: Dc.b "morelibspace V45",0
Even
endresi
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 28, 2007, 02:03:54 PM
Bernd, thank you for the new release.

I have just updated my AIAB installation (previously using AfA_OS v3.95), yet for some reason using v3.96 diskfont_lib.exe, the system does not boot completely.

I have tried disabling patches, including MCP, VisualPrefs etc. without success.  However, reverting back to v3.95 diskfont_lib.exe, the system boots correctly.

May I therefore ask what has changed with this file between v3.95 and v3.96?

I have uploaded an archive to http://aiab.emuunlim.com/r10.5/!bleedingedge/ and would appreciate your suggestions as to why I am experiencing issues.

Kind regards,
James
x
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 28, 2007, 03:00:43 PM
I have the same problem jmbattle, if I change the diskfont_lib.exe back to the 3.95 version it works fine.

Another side effect of this problem is if you launch AFA_OS after workbench has loaded, it will launch (without AA fonts though) but if you try to change the font with the font prefs it hangs.

I've still to test the new morelibspace for Blizkick compatibility.
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 28, 2007, 03:13:44 PM
@bernd_afa

Hm, it looks like you made a mistake when translating the C code to assembler:
Code: [Select]
Dc.l ROMTag+1 ; APTR RT_ENDSKIP
is wrong, it should be:

Code: [Select]
Dc.l ROMTag+RT_SIZE ; APTR RT_ENDSKIP

The actual amount added doesn't matter much, as long as it's >0, even and within the module. If it can be arranged easily, it should point to the end of this particular module.

Odd endskip is rather bad, as it causes further modules to be missed (and crashes 68000/68010).
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 28, 2007, 03:20:35 PM
the diskfont fix is done for a function that used only by fixfonts.I see less chance that the fix make problems.
 
I test AIAB several times before and have no problems or boot crashes.I use all AFA libs i release (included icon zune and intuition.library)
I dont know what scalos you have and additional Fonts you use.maybe there is newer aiab ?.I use latetest from HP with JIT addon.

Also have you add in your  startup sequence  morelibspace ?
if use morelibspace on OS3.1 need a reboot.

;---Start the "Full Boot" option...
morelibspace REBOOT
c:setpatch >nil:                  
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 28, 2007, 03:34:37 PM
>The actual amount added doesn't matter much, as long as it's >0, even and within the module.
>If it can be arranged easily, it should point to the end of this particular module.

thanks for your help

I get that too in mind and i think if this work blitzkick use the filesize.

I modify now my code endresi is the label at end of code.but release soon is not important ?

ROMTag:   Dc.w  #RTC_MATCHWORD  ; UWORD RT_MATCHWORD
          Dc.l  ROMTag          ; APTR  RT_MATCHTAG
          Dc.l  endresi         ; APTR  RT_ENDSKIP
          Dc.b  #RTF_COLDSTART  ; UBYTE RT_FLAGS
          Dc.b  45              ; UBYTE RT_VERSION
          Dc.b  #NT_UNKNOWN     ; UBYTE RT_TYPE
          Dc.b  70              ; BYTE  RT_PRI
          Dc.l  name            ; APTR  RT_NAME
          Dc.l  name2           ; APTR  RT_IDSTRING
          Dc.l  begin           ; APTR  RT_INIT


You told a simple resident structur for libraries is enough.But a library look diffrent to your example

Here is library code.But i see here too end of code is use (EndOfLib)

ROMTag:   Dc.w  #RTC_MATCHWORD  ; UWORD RT_MATCHWORD
          Dc.l  ROMTag          ; APTR  RT_MATCHTAG
          Dc.l  EndOfLib        ; APTR  RT_ENDSKIP
          Dc.b  #RTF_AUTOINIT   ; UBYTE RT_FLAGS
          Dc.b  #VERSION        ; UBYTE RT_VERSION
          Dc.b  #NT_LIBRARY     ; UBYTE RT_TYPE
          Dc.b  0               ; BYTE  RT_PRI
          Dc.l  LibName         ; APTR  RT_NAME
          Dc.l  LibId           ; APTR  RT_IDSTRING
          Dc.l  InitStuff       ; APTR  RT_INIT

LibName:  !LIBRARYNAME
.LibId:    Dc.b  "own.library 1.6 (16/02/2000)",0
          Even  ; was ds.w 0 - you can use Even with ASM only progs, seems to work OK

InitStuff:Dc.l  SizeOf.LibraryBase  ; Structure size
          Dc.l  Functions           ; Jump table address
          Dc.l  LibBaseData         ; Information for the initialization
          Dc.l  InitRoutine         ; Own initialization routine

Functions:Dc.l  r_Open      ; Open routine address
          Dc.l  r_Close     ; Close routine address
          Dc.l  r_Expunge   ; Expunge routine address
          Dc.l  r_Null      ; ** Reserved **
.functiontable
          Dc.l  r_First     ; First user routine address
          Dc.l  r_second    ;second user routine in basic
          Dc.l  -1          ; Table ends

Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 28, 2007, 03:37:24 PM
@bernd_afa
I stripped out all the additional fonts that I had added and tried with only the default fonts that came with AFA_OS, still the same problem with diskfont.

I've tested morelibspace with blitzkick and it's not working unfortunately, is this problem related to the code that Piru highlighted?

@Piru or bernd_afa
Do I need to pass any special arguments to blizkick? and should I position the C:morelibspace before setpatch or after blizkick? (I know there was some talk about this earlier).

Thanks :-)
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 28, 2007, 03:42:58 PM
Bernd, thank you for your prompt response.

The most recent version of AIAB is the one that I uploaded a few hours ago, however this is based on AIAB r10.5 - the last 'official' release.

I have not experienced any issues with AfA-OS until now.

Finally, am I still required to use morelibspace if I am using  Scalos, and do not have the 'icon_lib.exe' installed?  As stated previously, v3.95 performed beautifully - it is just the single 'diskfont_lib.exe' from v3.96 that has introduced problems.

Kind regards,
James
x

EDIT: Indeed, adding c:morelibspace REBOOT to the startup-sequence addresses things, however I do not see why this should now be required if it was not necessary with v3.95 - I was under the impression that morelibspace was simply introduced in v3.94 to allow for the larger, updated icon.library (PNG icons etc.), yet was otherwise not required for font anti-aliasing, picture.datatype improvements etc.
Title: Re: AFA Setup help - morelibspace
Post by: Piru on May 28, 2007, 03:49:47 PM
Quote
I modify now my code endresi is the label at end of code.

Yeah, it looks good now.
Quote
but release soon is not important ?

Well for BlizKick support (for use as blizkick module) it is. The previous odd endskip causes troubles (read the previous post).

Quote
You told a simple resident structur for libraries is enough.But a library look diffrent to your example

Well, obviously because it is for a library. Such resident will work ok with BlizKick too, but obviously it should be used with libraries, not simple executed functions.
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 28, 2007, 04:41:25 PM
I release now new morelibspace in AFA Page
Hope this work better.

When use morelibspace in blitzkick morelibspace should remove from startup sequence i think.

>Finally, am I still required to use morelibspace if I am using Scalos, and do not have the 'icon_lib.exe' installed?

currently not when you dont need new iconlib.
But is better when you let run it too.If later maybe new layers library come or more from intuition library you need it and cant forget ;-)  
Title: Re: AFA Setup help - morelibspace
Post by: Coolit on May 28, 2007, 05:55:49 PM
Success!

I can confirm that the new morelibspace is working perfectly with blizkick.

Here is the steps I took for anyone interested in running them together,

1. Extract the blizkick ready morelibspace from the AFA_OS site into your Workbench:Devs/Modules drawer.

2. Add "morelibspace" after the blizkick "MODULE" argument in your startup-sequence (I put it at the end, before QUIET)

3. If you already have C:morelibspace in your startup-sequence like bernd said, remove it as its not needed.

Thanks to Bernd and Piru for sorting this out :) off to play with my new icons now :lol:
Title: Re: AFA Setup help - morelibspace
Post by: jmbattle on May 28, 2007, 10:55:15 PM
Bernd,

>currently not when you dont need new iconlib.

But as I have already stated, I do not use the new iconlib, however the Amiga will not boot completely without the morelibspace command in the startup-sequence.

Kind regards,

James
x
Title: Re: AFA Setup help - morelibspace
Post by: unusedunused on May 29, 2007, 06:43:12 PM
>however the Amiga will not boot completely without the >morelibspace command in the startup-sequence.

Thanks for release new aiab.I check and notice its problem when no morelibspace is used.

I think i should change all libs that it not work without it.its better to increase teh lib instead of having 2 libs woth same name on diffrent memory positions
Title: Re: AFA Setup help - morelibspace
Post by: quenthal on June 22, 2007, 04:11:28 PM
Quote

bernd_afa wrote:
I release now new morelibspace in AFA Page
Hope this work better.

When use morelibspace in blitzkick morelibspace should remove from startup sequence i think.

>Finally, am I still required to use morelibspace if I am using Scalos, and do not have the 'icon_lib.exe' installed?

currently not when you dont need new iconlib.
But is better when you let run it too.If later maybe new layers library come or more from intuition library you need it and cant forget ;-)  


Ok, next step is to change that icon_lib.exe and other AFAOS components so I can use them with my custom kickstart (either with blizkick or flashrom-card) replacing older libraries completely.. ;-)