Welcome, Guest. Please login or register.

Author Topic: LoadModule vs LoadResident  (Read 9580 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Oldsmobile_MikeTopic starter

LoadModule vs LoadResident
« on: January 18, 2017, 04:32:30 AM »
I'm trying to figure out something dumb and this is a piece of the puzzle.  What, exactly, is the difference between the LoadResident command and the LoadModule command?

(besides that LoadModule seems to be newer and have more features)

Are there certain modules/libraries/etc. that can only be loaded with one or the other?  Is one more "reset-proof" than the other?  From what I've seen they seem to be pretty interchangeable...
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline Pat the Cat

Re: LoadModule vs LoadResident
« Reply #1 on: January 18, 2017, 04:48:42 AM »
Quote from: Oldsmobile_Mike;819943
I'm trying to figure out something dumb and this is a piece of the puzzle.  What, exactly, is the difference between the LoadResident command and the LoadModule command?

(besides that LoadModule seems to be newer and have more features)

Are there certain modules/libraries/etc. that can only be loaded with one or the other?  Is one more "reset-proof" than the other?  From what I've seen they seem to be pretty interchangeable...

I think LoadResident started more as a way to have a resource kept handy by the OS, rather than loading it from disk. C commands, executables that were going to be used a lot. Helped a lot with a using a floppy system sometimes, if you didn't have to load the resource repeatedly. Also true of other things, but not so good for selecting a different age or version of system module, like a different version of device, handler, library etc. IIRC you had to get everything in place before the magic "binddrivers" command in a WB 1.3 startup system. After that point, you were kind of locked in to what you had setup previously. Not for executables, but for system modules.

LoadModule uses more "joined up thinking" in the matter, lets you change things like exec.library, maybe. Things that LoadResident could not handle.

That could be why some stuff works on both, some you have to use one or the other for, to get correct operation. LoadResident was good, but it was not fool proof in the early days. I think LoadModule is what you should mostly use for 2.0 onwards really. The delayed release of 2.0 caused a lot of issues in the matter. Certainly it did for me.

Confused the hell out of me at the time. I was trying to answer the phone in one hand while asking questions over the phone in the other hand, and usually both receiving and transmitting the wrong information. Developers in theory were better informed, but they were not paying money to answer "casual questions" from non-developers, even if they were friendly enough to chat.
« Last Edit: January 18, 2017, 05:06:57 AM by Pat the Cat »
"To recurse is human. To iterate, divine."

A1200, Vanilla, Surf Squirrel, SD Card, KS 3.0/3.z, PCMCIA dev
A500, Vanilla, A570, Rev 5, KS 1.2/1.3 Testbench system
Rasp Pi, UAE4ARM, 3D laser scanner, experimental, hoping for AmigaOS4Arm, based on Watterott Fabscan Pi
 

Offline Oldsmobile_MikeTopic starter

Re: LoadModule vs LoadResident
« Reply #2 on: January 18, 2017, 04:57:23 AM »
Quote from: Pat the Cat;819944
I think LoadResident started more as a way to have a resource kept handy by the OS, rather than loading it from disk. C commands, executables that were going to be used a lot. Helped a lot with a using a floppy system sometimes, if you didn't have to load the resource repeatedly.

I think that was just "resident", not "LoadResident".   i.e., you'd put "Resident C:Assign" into your floppy-based startup-sequence right before your list of 20 assign commands.  So it wouldn't have to load the command each time.  But I can't remember, it's been over 20 years since I used 1.3.  ;)
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline Oldsmobile_MikeTopic starter

Re: LoadModule vs LoadResident
« Reply #3 on: January 18, 2017, 05:04:14 AM »
Basically here's what I'm trying to do (see attached picture).  Am currently loading all those libraries and modules through a carefully organized sequence of those two commands.  It works fine, but my OCD is getting to me and I'd like to try to make it cleaner, without it erroring out at "SYS:C/LoadModule: command too long", LOL.  :lol:
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline Oldsmobile_MikeTopic starter

Re: LoadModule vs LoadResident
« Reply #4 on: January 18, 2017, 05:11:13 AM »
Attached screenshot shows how it is currently.  And yes, it works fine like this.  But it's messy and I'm OCD.  Keep trying to find a way to clean it up that doesn't involve getting the hardware to burn my own custom ROM's.  ;)
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline Pat the Cat

Re: LoadModule vs LoadResident
« Reply #5 on: January 18, 2017, 05:22:14 AM »
Looks pretty good. Not sure why you are doing a Version >NIL, but making Assign resident is a very smart thing to do, any Amiga age. PATH was good for making resident too, you wanted multiple paths to look for things that might be in different places.

I kind of remember 1.3 so vividly because it was always a big deal, getting things setup before the drivers got bound, on a bootable disk release. You could put the lines after that, but your LoadWB might not activitate properly unless things were set "just so" prior to that. Binddrivers was like a "glue in place" action.

WB 2.0 onwards was much nicer for that sort of thing, you might get error messages, but at least the system would startup, in some form or other. Getting a "LoadWB failed" error code and a DOS prompt was not a trivial thing, it meant I had screwed up massively somewhere already. L handler, Dev or library, setpatch, etc. Something was setup wrong.

I guess having an ENV folder was a key concept change. You wanted to tailor an environment, just use that properly. Nice idea, didn't always work, but it was a clear direction rather than a mess of spaghetti.

You could have your regular libs, devs etc in the "correct" place, and put any upgrades or downgrades in ENV and use that module instead. Saved a lot of deleting, copying, renaming stuff. Maybe that was the whole point of ENV. Most people didn't really use it, but they might have if somebody had oversight and direction of the issues.
« Last Edit: January 18, 2017, 05:46:44 AM by Pat the Cat »
"To recurse is human. To iterate, divine."

A1200, Vanilla, Surf Squirrel, SD Card, KS 3.0/3.z, PCMCIA dev
A500, Vanilla, A570, Rev 5, KS 1.2/1.3 Testbench system
Rasp Pi, UAE4ARM, 3D laser scanner, experimental, hoping for AmigaOS4Arm, based on Watterott Fabscan Pi
 

Offline SnkBitten

  • Full Member
  • ***
  • Join Date: Feb 2016
  • Posts: 113
  • Country: us
  • Gender: Male
  • Amithlon Fanatic
    • Show only replies by SnkBitten
    • http://amithlon.snkbitten.com
Re: LoadModule vs LoadResident
« Reply #6 on: January 18, 2017, 05:59:48 AM »
The latest LoadModule can use an AUTO statement and automatically load all the modules you have in the proper places.

http://aminet.net/package/util/boot/LoadModule

Offline Oldsmobile_MikeTopic starter

Re: LoadModule vs LoadResident
« Reply #7 on: January 18, 2017, 06:03:49 AM »
Quote from: SnkBitten;819950
The latest LoadModule can use an AUTO statement and automatically load all the modules you have in the proper places.

I tried that but couldn't seem to get it to work.  Think I need more documentation.  Is there a list of exactly what it loads, and from where?  Alternatively, if I fill up a directory with everything I want loaded, can I just point it at that directory?

A lot of the custom modules I load have names like "LIBS:graphics.library_42.8b11-02" and I think the AUTO switch only works with "standard" names (i.e., scsi.device).
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline SnkBitten

  • Full Member
  • ***
  • Join Date: Feb 2016
  • Posts: 113
  • Country: us
  • Gender: Male
  • Amithlon Fanatic
    • Show only replies by SnkBitten
    • http://amithlon.snkbitten.com
Re: LoadModule vs LoadResident
« Reply #8 on: January 18, 2017, 06:14:47 AM »
There should be some info in the .Lha, maybe more related to ExtractModule and where it would place them.  



It may also require more direct naming like LIBS:graphics.library instead of LIBS:graphics.library_42.8b11-02

Offline Pat the Cat

Re: LoadModule vs LoadResident
« Reply #9 on: January 18, 2017, 06:26:34 AM »
Hmmm... depends on the syntax of the command. It might be OK with wildcards, after a CD. It's been too long since I used Amiga wildcards, but in theory they work with most commands.

CD Fullpath/Newmodules/
Loadmodule *.* AUTO

That way you can keep all the new stuff in a separate folder, but don't forget to CD back to SYS:S or have PATHs all lined up. Else the system might get a bit lost about locating and running the next line of startup-sequence. Unlikely, but it does no harm to be "correct as you can".

Sometimes is is helpful for system changes to be reported, and you can redirect that output into a logfile somewhere, rather than output the messages to NEWCON: or the starting shell window or whatever.

Paths are a double edged sword. While they help with getting the system to find the right pieces, they do also add a bit of overhead, and can confuse things mightily if you have multiple HDF images stored and PATH'd out. Use wisely, it's not a shotgun really.
« Last Edit: January 18, 2017, 06:41:36 AM by Pat the Cat »
"To recurse is human. To iterate, divine."

A1200, Vanilla, Surf Squirrel, SD Card, KS 3.0/3.z, PCMCIA dev
A500, Vanilla, A570, Rev 5, KS 1.2/1.3 Testbench system
Rasp Pi, UAE4ARM, 3D laser scanner, experimental, hoping for AmigaOS4Arm, based on Watterott Fabscan Pi
 

Offline Oldsmobile_MikeTopic starter

Re: LoadModule vs LoadResident
« Reply #10 on: January 18, 2017, 06:42:59 AM »
Hummm.  Trying the above (including renaming the files and using *.* wildcards) but keep getting various "object is not of the required type" and "already resident - object already exists" errors.

Will keep poking at it.  Not a huge priority, just had a few minutes of free time tonight and thought maybe I'd get lucky...
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline kolla

Re: LoadModule vs LoadResident
« Reply #11 on: January 18, 2017, 07:33:01 AM »
Yes, the AUTO flag of new LoadModule will look in certain paths for certain filenames, it is all very detailed described in the documentation. Only thing not described so well is which modules it will look for automatically.

"*.*" is wrong platform, what you would want is "#?.#?".
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline Pat the Cat

Re: LoadModule vs LoadResident
« Reply #12 on: January 18, 2017, 07:40:23 AM »
Quote from: Oldsmobile_Mike;819956
Hummm.  Trying the above (including renaming the files and using *.* wildcards) but keep getting various "object is not of the required type" and "already resident - object already exists" errors.

Will keep poking at it.  Not a huge priority, just had a few minutes of free time tonight and thought maybe I'd get lucky...

Well, might be the intiial CD. Commands like that are very sensitive to what they're pointing at, and exactly where the system is looking, when they are run. Unless the new module replaces an existing module just right, I would expect some errors. Maybe they have to happen in a certain order? Hmmm... L handlers, Dev devices, Lib Libraries. It depends how dependent the new ones are on each other? That would make sense. If a device needs a library, you have to make the library available first. Likewise, if an device needs a handler, you need the handler first?

It's a puzzle trying to work out the priority, but there  should be  a pretty simple concept behind that.  Can't work it out now.

Quote from: kolla;819960
Yes, the AUTO flag of new LoadModule will look in  certain paths for certain filenames, it is all very detailed described  in the documentation. Only thing not described so well is which modules  it will look for automatically.

"*.*" is wrong platform, what you would want is "#?.#?".

Whatever. A wildcard is pretty much the same basic concept, but the way it's handled is kind of unique to each platform.

So I guess maybe wildcards with paths and assigns, or you really do have to put things in the right place... nah, that doesn't make sense, you don't have an AUTO option unless there's a manual option too, somehow. Manual you retain control, automatic could do any kind of system without you being aware of what's really happening,
« Last Edit: January 18, 2017, 07:50:20 AM by Pat the Cat »
"To recurse is human. To iterate, divine."

A1200, Vanilla, Surf Squirrel, SD Card, KS 3.0/3.z, PCMCIA dev
A500, Vanilla, A570, Rev 5, KS 1.2/1.3 Testbench system
Rasp Pi, UAE4ARM, 3D laser scanner, experimental, hoping for AmigaOS4Arm, based on Watterott Fabscan Pi
 

Offline Oldsmobile_MikeTopic starter

Re: LoadModule vs LoadResident
« Reply #13 on: January 18, 2017, 08:13:50 AM »
Quote from: kolla;819960
Yes, the AUTO flag of new LoadModule will look in certain paths for certain filenames, it is all very detailed described in the documentation. Only thing not described so well is which modules it will look for automatically.


Guess I would need the "for dummies" guide. As in, "AUTO will only load graphics.library from LIBS:, and only if the filename is "graphics.library".

I know the docs mention stuff about wildcards, and also putting stuff in subfolders, but I couldn't get it to work.  I created subfolders inside DEVS:, LIBS:, and L: and called them A2000B, and stuck copies of all my custom libraries in them, but the most I could get out of it were errors that the library had already been loaded when I tried cold booting. :(

Quote from: kolla;819960
"*.*" is wrong platform, what you would want is "#?.#?".


True enough. I remembered that after I posted. I know *.* works on my Miggy but I think that's only after it's booted, and only because of one of the multi-function commodities I'm running. Memory is a bit hazy, didn't they make some kind of change to that around Workbench 2 or 3?
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline cha05e90

  • Full Member
  • ***
  • Join Date: Feb 2003
  • Posts: 232
  • Country: de
    • Show only replies by cha05e90
    • http://www.ruthe.info
Re: LoadModule vs LoadResident
« Reply #14 on: January 18, 2017, 08:32:24 AM »
Quote from: Oldsmobile_Mike;819963
True enough. I remembered that after I posted. I know *.* works on my Miggy but I think that's only after it's booted, and only because of one of the multi-function commodities I'm running. Memory is a bit hazy, didn't they make some kind of change to that around Workbench 2 or 3?

In the old times there were patches - "official" support for this was introduced with AmigaOS 3.5 if I remember correctly. Though you had to activate this in the Prefs.
« Last Edit: January 18, 2017, 08:34:32 AM by cha05e90 »
X1000|II/G4|440ep|2000/060|2000/040|1000