Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: GreatLor on May 08, 2004, 12:35:35 PM

Title: help to make OWN "ram:" device
Post by: GreatLor on May 08, 2004, 12:35:35 PM
I really need to make an OWN ram-device/-disk, because if I'm not mistaking even if I break WB as soon as it starts downloading, it still has download stuff into the mem cos when I do an "avail" I see approximately 800k+, this, when I have 1024K mem, so I figured if I format a disk and just create needed directorys/files ONLY (for a well functioning ram-device and a few dos-commands there should then be ebnough ram left to download an adf-image (about 911k) to write to disk, right ?
However, the other part of the story getting better and better (read 'worse and worse'), last time I had this problem with a adf2disk progg that required OS 2.0+, so I download another one, now this one requires something about 3.9+ (?)  :lol:
now I dont even DARE thinking about more adf-/image-2disk stuff  :-)

This is really redicilous, how the hell should I overcome this  :-x
Title: Re: help to make OWN "ram:" device
Post by: Piru on May 08, 2004, 01:16:27 PM
Quote
I really need to make an OWN ram-device/-disk, because if I'm not mistaking even if I break WB as soon as it starts downloading, it still has download stuff into the mem cos when I do an "avail" I see approximately 800k+, this, when I have 1024K mem, so I figured if I format a disk and just create needed directorys/files ONLY (for a well functioning ram-device and a few dos-commands there should then be ebnough ram left to download an adf-image (about 911k) to write to disk, right ?

Wrong. Ram Disk is not device, but handler. Also Ram Disk is dynamic, it doesn't take any memory if empty.

The memory lost initially is used by the system itself.

Quote

This is really redicilous, how the hell should I overcome this

Buy more memory?

Other than that there are some tricks, like not copying ENV: to RAM at all. This should leave some more memory to system, esp if ENVARC: is crowded.
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 08, 2004, 01:34:04 PM
quote]
Quote

This is really redicilous, how the hell should I overcome this

Buy more memory?

Other than that there are some tricks, like not copying ENV: to RAM at all. This should leave some more memory to system, esp if ENVARC: is crowded.[/quote]

hmm... , thats why I wanted to make a new ram-devi.. uhh I mean ram-handler, hehe, the WB-startup-sequence looks like a real mess ( :-D ), so can you come up with a script to take care of this problem man ? I would really be thankful If I could have say 960k+ ram when in cli  :-)
Title: Re: help to make OWN "ram:" device
Post by: ChaosLord on May 09, 2004, 09:56:54 AM
It is 2004.

Hard drives have been available for Amiga since 1986.

Buy a hard drive.

Title: Re: help to make OWN "ram:" device
Post by: Thomas on May 09, 2004, 12:14:09 PM
Quote

GreatLor wrote:
the WB-startup-sequence looks like a real mess ( :-D ), so can you come up with a script to take care of this problem man ?


Add the following lines between FailAt 21 and C:MakeDir RAM:T ... in S:Startup-Sequence:

delete >nil: "Sys:Ram Disk" all force quiet
assign RAM: dismount
makedir "Sys:Ram Disk"
assign RAM: "Sys:Ram Disk"

The following is optional, if you want to get your Ram Disk icon back on the desktop:

Start IconEdit, open envarc:sys/def_ram.info, change the type to Drawer and save it as Sys:Ram Disk.info.

Now open your Workbench drawer, click once on Ram Disk and choose Leave Out from the menu.

Reboot and see how much RAM you saved.

Quote

I would really be thankful If I could have say 960k+ ram when in cli  :-)


If you totally delete or rename startup-sequence, you'll directly end in the CLI window and have as much free RAM as possible.

Bye,
Thomas
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 10, 2004, 01:35:40 PM
Quote

ChaosLord wrote:
It is 2004.

Hard drives have been available for Amiga since 1986.

Buy a hard drive.


Wow, such great assistance some ppl give !!!


Quote

If you totally delete or rename startup-sequence, you'll directly end in the CLI window and have as much free RAM as possible.


Thank you Thomas.
By the way I looked in startup-sequence yesterday and noticed something weird, when I "break" into CLI at immediately at startup, the line "echo A500/2000 ..." (or something like it) never gets executed, so this ram-handler must be defined in one of the (three ?) first commands before the "echo" command (since it obviously isnt executed), does it mean that those  (three ?) first lines are enough for a functioning ram-handler ? just curious now  :-)
Title: Re: help to make OWN "ram:" device
Post by: LP on May 10, 2004, 01:51:01 PM
@GreatLor

How about posting your startup-sequence here so we can see if you've got any really memory absorbing programs...

Could't maybe help you out for a start :)
Title: Re: help to make OWN "ram:" device
Post by: LP on May 10, 2004, 01:56:40 PM
If you "break" (assuming you do a Ctrl + C or D) into CLI while the startup-sequence is being executed, you simply stop the startup- sequence so it's quite clear that nothing executes after the break...

And BTW the echo command is just a little program that writes the lines to the working CLI window.. :)
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 10, 2004, 02:11:52 PM
Well daaaa !! :-o , need you REALLY tell me that echo just writes text to the screen ? Cheeezes, I wasnt looking for an description on what "echo" is and how it works  :-D , I wondered if those few lines BEFORE it were enough for a functioning ram-handler !
Oh, I cant post you my startup-, I'm not at home.
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 10, 2004, 02:37:06 PM
Why is everyone making this so tough for the poor guy?  All he wants is more free RAM at boot-up.

I suggest:

1) make a backup of your workbench disk.
2) go to the backup, and delete s:startup-sequence
3) boot from backup
4) about a half second later, you'll be greeted with a command prompt, along with as much free RAM as you possibly can have on your configuration.

Granted, you'll be missing the nice workbench interface, shell-seg, setpatch, and a few other nicities, but it's a command prompt, with a heap of free RAM, which IS the goal here.  (note, RAM: disk may not function with no startup-sequence, at all.  I forget.  If this is the case, you may need a startup-sequence that contains the command "binddrivers" -- I'd try it without, first.)
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 10, 2004, 02:47:52 PM
That "ram:" probably wouldnt work without startup-sequence was my very guess.
And no, I dont need a GUI, just 960k+ ram with its handler.
Title: Re: help to make OWN "ram:" device
Post by: Noster on May 10, 2004, 02:59:38 PM
Hi

> I wondered if those few lines BEFORE it were enough for a functioning ram-handler !

You are running Kickstart/Workbench 1.3 ? The code for the RAM-handler is found in the "l" directory of your Workbench-disk. An entry in the "so called" DOSList addressing this handler is created during system-startup, no way to suppress this (the according code is stored in the Kickstart ROM :-)).
The handlers code itself is loaded during the first access to the RAM-disk, i.e. the first time the volume "RAM:" is accessed (usually by the commandline "Assign T: RAM:T" in the "startup-sequence").
If you create a startup-sequence without any reference to "RAM:". There will not be a "RAM-disk" icon on your Workbench screen, but it will occure at that moment you type something like "dir RAM:" in a CLI (or any application tries to access "RAM:").

If you need maximum memory, create an empty disk and "initialize" it, so it contains a boot-block and use this empty disk for booting. You will get the initial CLI and nothing else.
I recommend you to have a look to ebay and buy a memory expansion for a few bucks. There are a lot of games that also will benefit from more than 1MB ram.

Noster

EDIT - Do you have additonal disk-drives connected to your Amiga ? Remove them, every additional disk-drive costs at least 50 Kb memory.
EDIT-2 - I don't think you will get 960+ KB memory, whatever you are doing, there are several structures according to the OS that are created by the code in the Kickstart ROM during system startup, you can't suppress this, and I think this uses more than 50Kb.
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 10, 2004, 03:11:18 PM
Quote

That "ram:" probably wouldnt work without startup-sequence was my very guess.
And no, I dont need a GUI, just 960k+ ram with its handler.


nope... Noster confirmed what I suspected...  All you need is the handler in your L: directory.  code in your kickstart ROM takes care of the rest.  Don't need a startup-sequence, at all.  That make your job easier?  :-)  I'd use a copy of a workbench disk for this, rather than the blank initialized disk he suggests, though.  That way you don't have to hassle yourself with copying things like CD, DIR, LIST, etc...

Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 10, 2004, 03:23:17 PM
Thank you both very much, appreciate it very much.

ps: hey where do you usually buy your amiga devices ? just curious ! (as always  :-) )
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 10, 2004, 03:35:42 PM
You're welcome... Let us know how it works out for you.  We really should write this up into a FULL tutorial, as the topic of writing ADFs for Amiga 500's comes up every few months.  (And we've kinda given inconsistant answers over time, because it is such an in-depth procedure...)

Quote
ps: hey where do you usually buy your amiga devices ? just curious ! (as always :-) )


I'm in the US...  I've worked with our own "redrumloa" and his Anachronism Industries, as well as the old stand-by of Software Hut, and been quite satisfied.  Mostly, lately, though, I just pick up odds and ends here and there that add to my collection.  (random finds, saving Amigas from scrapheaps, etc...)  Heck, I'VE probably got as much inventory as some dealers...  ;-)
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 10, 2004, 03:49:28 PM
Yes, I'll post the outcome tomorrow, just hope it'll work, not too optimistic though !  :oops:
Title: Re: help to make OWN "ram:" device
Post by: LP on May 10, 2004, 03:59:40 PM
Quote

GreatLor wrote:
Well daaaa !! :-o , need you REALLY tell me that echo just writes text to the screen ? Cheeezes, I wasnt looking for an description on what "echo" is and how it works  :-D , I wondered if those few lines BEFORE it were enough for a functioning ram-handler !

That's properbly why I putted the BTW letters in front of my reply to you. To inform you if you didn't know it ;)
And I'm sorry I couldn't see the lines you where talking about anywhere in your posts...
Quote

Oh, I cant post you my startup-, I'm not at home.

Too bad I guess...
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 11, 2004, 12:32:22 PM
Darn, it worked, but it gave me 941k  :pissed:
f.u.c.k  :lol: , I just need some 19k more, GRRRR ...
yepp, destiny is truely a funny shot !
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 11, 2004, 03:10:01 PM
Hmm....  Why not try add21k or add36k?  They free up extra chip ram by stripping the extra screen bitplane (reducing you to two colors).  Also, delete "L:system-configuration" from your boot floppy.

I found an aminet link to add36k under util/misc.
description link (http://www.aminet.net/util/misc/add36k.readme)

Maybe it'll put you over the top!
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 11, 2004, 03:26:53 PM
Are lzh-files extracted with lha ? in that case lets see what the baby can give me ?

You know, I was also wondering if I could remove 1 or 2 dos-librarys that are in the RAM and who do not get accessed unless called from specific dos-commands, I thought if it would be possible to do it by calling the FreeMem-routine in exec.library or are these libs untouchable ?
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 11, 2004, 04:15:59 PM
Quote
Are lzh-files extracted with lha ? in that case lets see what the baby can give me ?


"lha" should be able to extract the older lzh files.  If not, "lharc" can.   Wacky old WB1.3 programs.  :-)  

Quote
You know, I was also wondering if I could remove 1 or 2 dos-librarys that are in the RAM and who do not get accessed unless called from specific dos-commands, I thought if it would be possible to do it by calling the FreeMem-routine in exec.library or are these libs untouchable ?


If you're not running a s:startup-sequence, the only libs in ram should be things in use.  Most likely, the libs you're seeing are part of your kickstart ROM, and can't really be freed.  ;-)
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 11, 2004, 05:22:01 PM
Got the message !  :-)
Title: Re: help to make OWN "ram:" device
Post by: platon42 on May 11, 2004, 05:49:29 PM
In the good old days, you could get some more memory by freeing one bitplane of the initial workbench screen using a command called Add21K (I only found ftp://de.aminet.net/pub/aminet/util/misc/add36k.lzh on Aminet, but the original Add21K seems to be found in ftp://de.aminet.net/pub/aminet/demo/disk/mlw_cr.lha aswell). And on Kick2.0 and higher you can also do an

AddBuffers DF0: -999

to get some more memory. Hope this helps.
Title: Re: help to make OWN "ram:" device
Post by: Steady on May 12, 2004, 09:36:42 AM
Quote

platon42 wrote:
...And on Kick2.0 and higher you can also do an

AddBuffers DF0: -999

to get some more memory. Hope this helps.


What exactly does that do? Does it just remove all buffers?
Title: Re: help to make OWN "ram:" device
Post by: Thomas on May 12, 2004, 09:55:40 AM

It removes 999 buffers from DF0. Let's calculate. It has 10 buffers by default, in Startup-Sequence another 20 are added, then 999 are removed, so -969 are remaining. I suppose the addbuffers command has some kind of range check built in, probably the minumim required remains. Probably 5 or 1 or something like that.

One buffer needs the same amount of memory as the block size of the disk. So 10 buffers takes you 5 kb of memory (512 bytes per block).

Bye,
Thomas
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 12, 2004, 01:10:33 PM
It seems my missfortune has NO PLANS of taking a vecation, guess what now, ok, I go and buy 10 "verbatim" disks, and amiga-format them in the amiga, then I unpack an lha file and copy to the disk, I insert that disk and try to "dir", but no, "not a dos-disk in df0:", I format them again with other formatting tools, it's still "not a dos disk in df0:", now, have anyone ever experienced these "verbatim" disks ?
Title: Re: help to make OWN "ram:" device
Post by: Noster on May 12, 2004, 03:58:12 PM
Hi

Verbatim disks have been very good disks, I've liked to use them and have no bad experience.

To your problem: Try to load the Workbench, open a CLI and enter "Format drive df0: name foo". This should format the disk in the floppy drive. If any error occurs, this tool will notify you. If it works to format, the disk is Ok and should occur on your Workbench screen.

Noster
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 13, 2004, 01:34:20 PM
Nope, it didnt work the format command says "bad sector" or something like it, this is REALLY weird !!!  :pissed:
Title: Re: help to make OWN "ram:" device
Post by: Noster on May 13, 2004, 08:33:55 PM
Hi

> Nope, it didnt work the format command says "bad sector" or something like it, this is REALLY weird !!!

Did none of your disk could be formated ?
Maybe your disk drive is misfunctional ? (Do the problems ever end for you ?? ;-))

Noster
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 13, 2004, 09:11:18 PM
Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 14, 2004, 12:55:54 PM
Problems ?  8-) , you've seen nothing yet, I'm a guy with EXETREME bad luck, I dont know, it seems the universe doesnt want me !  :-(

Quote

I might try a cleaning disk on the A500. Also, see if you can find a known-good 3.25 disk to test with. Verbatim's were fairly good disks back in the day, but lots could have happened to your box of them, since then. I don't think Verbatim has made DS/DD 3.25 disks in about 10 years!


The disks I bought are HD disks.

Anyway could it be the drive which is a problem ? I mean, while there are still a few disks about which the system doesnt complain, however, more and more disks get "read/write error" everyday it seems, so where would I get a cleaning disk ? are the ones for pc fully copatible with A500 ?
Title: Re: help to make OWN "ram:" device
Post by: ncafferkey on May 14, 2004, 03:42:52 PM
Quote

GreatLor wrote:

The disks I bought are HD disks.


They're the wrong type. You need DD disks.
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 14, 2004, 05:36:15 PM
HD disks could well be the problem.  I've had various amounts of luck with them.  Some have worked fine, others appear to work, and then develop read errors within minutes, and others refuse to even format....  You really need to find some DS/DD 3.5 floppies....

As for the cleaning disk, any type should work.  For Amiga, it should have both the top and bottom read areas open.  (Double sided)  Almost all cleaning disks are like this.  (As almost all drives are, as well.  Not many 3.5 single sided drives out there!)  I've heard of various techniques to making the Amiga drive spin for the cleaning.  Personally, for my A500, I just turned it on, waited for the insert Workbench screen, and inserted the cleaning disk.   oooops, it couldn't boot workbench :lol:   etc, for a couple minutes.  

Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 15, 2004, 12:42:10 PM
So where in hell could I get DD disks then ? Is there NEW DD disks sold anywhere ?

I have "FUJIFILM" HD disks who work (some of them have got "read/write error" but this they got when I used them as 1.44 MB floppy disks for the PC), but these verbatim disks wont work.
Where's 89-93 when you need'em ?
Title: Re: help to make OWN "ram:" device
Post by: iamaboringperson on May 17, 2004, 04:26:17 AM
(Haven't read through the entire thread yet, so this may have been answered)

Have you done a 'dir' through your RAM: ?

Perhaps a program has a memory leak?
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 17, 2004, 04:39:34 AM
Quote
So where in hell could I get DD disks then ? Is there NEW DD disks sold anywhere ?


Not that I know of.  Some places probably still sell new/old stock DS/DD disks.  Some might also sell recycled/used 3.5" DS/DD.  (They run on eBay sometimes....)  But, AFAIK, there are no companies that make DS/DD 3.5" floppies, anymore.

Title: Re: help to make OWN "ram:" device
Post by: adolescent on May 17, 2004, 06:42:50 AM
Nope, there are plenty of places to get new DS/DD disks (even 5.25" and 8" disks!).  I've heard good things about http://www.athana.com and http://www.xdr2.com.

Title: Re: help to make OWN "ram:" device
Post by: GreatLor on May 17, 2004, 01:07:52 PM
Is there something wrong with the prices or what ???  :-o
Title: Re: help to make OWN "ram:" device
Post by: Noster on May 17, 2004, 01:30:01 PM
Hi

> Is there something wrong with the prices or what ???

As you have already determined by your own, these disks are extremely rare.

This reminds me to the days in the early 80th, when I've bought disks for my CPC-6128 in 3" format, each single disk about 7,-DM (~ 3.50 $) :-D

Noster
Title: Re: help to make OWN "ram:" device
Post by: BouncingAyatollah on May 17, 2004, 02:21:25 PM
You could try this, DD disks have one hole in them at the corner, HD disks have two. Use a small sticky label or a strip of sticky tape to cover both sides of the hole on the LEFT of the HD disk - left as you look at it label side up with metal shutter nearest to you.

This can fool the drive into accepting the disk as a DD one, but may not work.
Title: Re: help to make OWN "ram:" device
Post by: Steady on May 17, 2004, 04:42:26 PM
The extra hole on HD disks were designed to let a HD disk drive recognise when a high density disk was inserted as a sort of backward compatibility to allow it to also support DD disks. DD disk drives did not need anything extra to support DD disks (as that's what they do ;-)), and don't need to specifically detect HD disks, cos they can't support it anyway.

As a result, I imagine most DD drives neither know nor care about the extra hole, so that idea will most likely not work.

I think it's time to bite the bullet and buy the disks. You get 50 in a pack, even if it is expensive compared to standard disks.

Definitely better value than 8" disks  :-o
Title: Re: help to make OWN "ram:" device
Post by: Ilwrath on May 17, 2004, 07:03:00 PM
Well, I couldn't find prices on the Athana site.  As for xdr2, a box of 50 for $12.95 seems pretty cheap, to me.  Not much worse than the prices for buying in that quantity back in the day...  (Seems like I remember about $18-$20 for 100 disks being the going rate...  Considering how scarce they are nowadays, $26 for 100 seems pretty reasonable.)

Thanks for the link.  I didn't know anywhere still sold them.  Learn something new every day...