English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 20 January 2015, 13:31   #1
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Basic Amos Issues

Hi, I`m hoping somebody can help me out with a particular problem. I have some med modules I've compressed into the ".abk" format. The reason I've done this is to save on disk space, looking to fit 5 modules on one disk. It's been soooo long since I've used amos that I've completely forgotten the bare basics. I just want to load the songs and have them play. This is the code I have.

dir$="df0:mods"
reserve as data 3,151492
bload"music1.abk",3
music 3

Then amos returns: music bank not found. I know there is something in bank 3 because it shows up after typing "List bank"

I`m thinking that because the file used to be a med module then it's compressed to .abk amos is getting confused?

I would really like to know the simplest way to compress a MED module in AMOS and then have it unpacked and played.

Update: Much hair pulling and dead links later... Ok put simply does amospro support powerpacker? If I was to pack a module with powerpacker, could I then load said file into Amos and have It unpack into a bank? Or is there another much simpler method I`m overlooking? I could avoid compression altogether but I`m looking to make a single music disc and space is tight.

Last edited by lordofchaos; 20 January 2015 at 19:30.
lordofchaos is offline  
Old 20 January 2015, 20:12   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Try using Load instead of bload. Also you could try imploder load on the AMCAF extension for better decompression.
Samurai_Crow is offline  
Old 20 January 2015, 20:37   #3
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Thanks for the suggestions Samurai_Crow. I have already tried using the normal load and bload function but amos just says, this is not a med file. This AMCAF extension you speak of, where might I download it? Sorry for the dumb questions I`m really out of the loop in this area.

Update: I've just downloaded AMCAF150Final.lha from aminet, unpacked it to the HD but after running the installation the Amiga goes into Guru land and crashes. I`m using a A1200 config with WinUAE, nothing exotic.

Last edited by lordofchaos; 20 January 2015 at 21:00.
lordofchaos is offline  
Old 20 January 2015, 21:48   #4
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by lordofchaos View Post
Update: I've just downloaded AMCAF150Final.lha from aminet, unpacked it to the HD but after running the installation the Amiga goes into Guru land and crashes. I`m using a A1200 config with WinUAE, nothing exotic.
The AMCAF installation causes it to crash, or AMOS (with AMCAF as an extension)?

I have the same version (I believe it was the last version Chris Hodges ever wrote), but I don't think I used the AMCAF Installation program. I think all I did was copy the "AMOSPro_AMCAF.Lib" and "AMOSPro_AMCAFUpdate.Lib" into AMOS Pro's "APSystem" sub-directory. Then set up AMOS Pro to load them into the correct extension slots.

Which raises a question: I assume you are using AMOS Professional and not AMOS? (I don't believe AMCAF is compatible with the original AMOS)
Lonewolf10 is offline  
Old 20 January 2015, 21:57   #5
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Yes I`m using AMOS Pro (2.0) The AMCAF installation it's self causes the crash once I run the install executable. I can try copy the files you mention into Amos Pro's APSystem, but how do you get AMOS Pro to load them into the correct extension slots?

This reminds me of the old days, all this faffing about to play some compressed modules hehe.
lordofchaos is offline  
Old 20 January 2015, 22:05   #6
leathered
Registered User
 
leathered's Avatar
 
Join Date: Oct 2011
Location: UK
Age: 47
Posts: 304
I'm assuming that you are using the .abk compressor in one of the older AMOS disks? – as that is the only one I know of. I certainly had some issues with it also, but got there by messing with the formats that I saved the original song to before compressing with said (what is it called?) 'abk file creator'. Some of the formats didn't work at all.
I used this file from the older disk within AMOS PRO. Hope you get there with AMCAF - it looked like a really good extension but I never used it much. I can't remember which extension slot it needs to be loaded into but it may be specific, got any documentation?
leathered is offline  
Old 20 January 2015, 22:21   #7
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Cheers. To tell you the truth I`m no longer sure which compressor I used, It was one of the amos example programs buried in a source code folder (years ago I horded a bunch of example files from various sources) and I instinctively saved it using the .abk extension, which was probably not the correct thing to do.

I'm still looking around the internet checking any relevant sources that may help.. I have the Amos Pro manual which should come in handy for the basic stuff. This AMCAF extension does sound quite promising though. It's amazing how quickly this stuff leaves you when your not using it anymore.

Edit: I just found the program I used to compress the files originally, one is simply called "pack" and the other "unpack". I only used the "pack" one. I have attached them if anybody is interested. As standalone programs they work just fine but not sure how to implement them into my code
Attached Files
File Type: zip amosprogs.zip (2.8 KB, 229 views)

Last edited by lordofchaos; 20 January 2015 at 23:13.
lordofchaos is offline  
Old 21 January 2015, 01:22   #8
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
The one that AMCAF uses for packing is called Fimp. It might get you better compression though. Packing MED files is unwise because it loads only samples to Chip RAM and the rest to any memory.
Samurai_Crow is offline  
Old 21 January 2015, 11:03   #9
leathered
Registered User
 
leathered's Avatar
 
Join Date: Oct 2011
Location: UK
Age: 47
Posts: 304
AMOS and AMOS Pro require all music to be in .abk format in order to play if I remember correct?
You might be better off trying to source the original med files and running them through the Amos .abk creator (or whatever), or AMCAF Fimp as Samurai Crow suggests.

The .abk creator was on one of the previous versions of AMOS and as I recall was not loadable as an accessory – you had to run the program from the editor.

Sounds like you managed to unpack your files – if you want to do this within your code you can check through the source and try to adapt the 'business' end of the code into your program.

It would probably be a lot easier to get it working in a proper extension though – and I'm sure AMCAF is compilable too. AMCAF had a lot going for it, probably including proper med support by the sounds of it.
leathered is offline  
Old 21 January 2015, 13:19   #10
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Quote:
Originally Posted by leathered View Post
It would probably be a lot easier to get it working in a proper extension though – and I'm sure AMCAF is compilable too. AMCAF had a lot going for it, probably including proper med support by the sounds of it.
I shall spend some more time over the week getting the AMCAF extensions set-up and study the documentation in more detail. I`m sure I won't need many of the features, just some basic ones for now.

Quote:
Originally Posted by Samurai_Crow View Post
The one that AMCAF uses for packing is called Fimp. It might get you better compression though. Packing MED files is unwise because it loads only samples to Chip RAM and the rest to any memory.
Yeah your right about the memory but it shouldn't matter too much for this particular project, I don't have much choice on using MED, I use it for writing my modules and I`m out of touch with the other trackers.

Thanks for your help guys When I get it done I`ll upload it to the zone, it will basically be a slideshow with a different song per picture and maybe even a text scroller if I`m feeling adventurous
lordofchaos is offline  
Old 21 January 2015, 20:38   #11
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by lordofchaos View Post
I can try copy the files you mention into Amos Pro's APSystem, but how do you get AMOS Pro to load them into the correct extension slots?
Check the "s" folder for a file called "AMOSPro_Interpreter_Config". Make a backup of this file (it stores a list of all the extensions AMOS Pro needs to load at start-up).

Start AMOS Pro, right click and select "Config" along the top, and then "Set Interpreter" at the bottom of the list.

Click "Load Default Configuration". Wait a few seconds (for it to load) and then click on "Set Loaded Extensions".

A list of all the extensions you wish to load will now appear. The top 6 slots contain most of the core ones that AMOS Pro uses as a default. The remaining slots are used by 3rd-party extensions (e.g. those written by AMOS fans).
AMCAF goes in slot 8. Highlight the slot and clicking the left mouse button.
Type "AMOSPro_AMCAF.Lib" (or whatever the extension is called) into it.

Click "Ok", then "Exit" (top-left corner of the screen). Click on "Save Configuration". It should now say something along the lines of "restart AMOS for the changes to take effect". Click "ok", close AMOS and then wait a few seconds (to allow AMOS/workbench to free up the memory that was used) before trying to restart it again
If all has gone well, AMOS will start up and you will see the editor. If there was a mistake made during adding/removing extensions in the config file then workbench will display an error message.
Take the backup of "AMOSPro_Interpreter_Config" that we made earlier and copy it into the "S" drawer, overwriting the existing file. AMOS will now work again, and you'll have to try adding/removing the extension/s again.

For a list of all known AMOS extensions and their respective slot numbers, you can check www.AmigaCoding.com (not my site, but I have contributed quite a bit to it over the years).


I have examined "AMCAFUpdate.Lib". It is not a normal AMOS extension library (perhaps a file used by the installation program?), so ignore it for now. I'm sure it must be mentioned in the AMCAF docs somewhere.

Last edited by Lonewolf10; 21 January 2015 at 21:02. Reason: quoted the wrong bit!
Lonewolf10 is offline  
Old 21 January 2015, 21:49   #12
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
@Lonewolf10. Thanks for the tips and the install guide, I shall try it out using your steps and let you know how it pans out.
lordofchaos is offline  
Old 21 January 2015, 22:32   #13
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
if it is in abk format you should just be able to do
Code:
load "music1.abk",3
music 1
it doesn't make sense for it to say it's not a med file because the "load" instruction doesn't load med files.

Note that the number in the "music" instruction is the number of the tune within the music bank, not the bank number.

you can load and save powerpacked files using ppload/ppsave, but these save with their own header that AMOS adds, you can't just load files you packed externally in Powerpacker. Music banks are unlikely to compress very well, though.
Mrs Beanbag is offline  
Old 21 January 2015, 22:57   #14
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Quote:
Originally Posted by Mrs Beanbag View Post
if it is in abk format you should just be able to do
Code:
load "music1.abk",3
music 1
it doesn't make sense for it to say it's not a med file because the "load" instruction doesn't load med files.

Note that the number in the "music" instruction is the number of the tune within the music bank, not the bank number.

you can load and save powerpacked files using ppload/ppsave, but these save with their own header that AMOS adds, you can't just load files you packed externally in Powerpacker. Music banks are unlikely to compress very well, though.
That was a mistake on my part, I packed the MED file with a program called "packer", after it had crunched the file AMOS asked me to save it but didn't provide the extension, so foolishly I figured it must be .abk and named it "music1.abk". Once I tried to load the packed file AMOS was having none of it. I tried using "Music 3" (and every other number out of frustration) and that didn't work, then I tried "med play" that didn't work, just returned "not a med file" or something to that effect.

I got myself in a complete muddle and decided to start again.

Samurai cow mentioned "Fimp", a compressor supported in AMCAF? Could I not use that? Also you mentioned powerpacked files.. So I can't use powerpacker to compress the files and load them into AMOS using the ppload function?

Last edited by lordofchaos; 21 January 2015 at 23:03.
lordofchaos is offline  
Old 21 January 2015, 23:08   #15
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
i'm not sure what exactly you are trying to do... an AMOS music bank is not just a compressed Med file. AMOS has its own special format for storing music (which is quite space efficient but not compressed as such), you have to convert the Med file using a converter program, there used to be one supplied with AMOS 1.3 but i never used .abk music format in AMOS Pro. It is really kind of obsolete now that AMOS can play Med and Protracker files directly, and the conversion process wasn't perfect (the AMOS music format certainly doesn't support all of Med's features, anyway).

The easiest and best thing for you to do is simply Med Load your music and then ppsave it, then you can ppload it and play it.

BUT sample data is notoriously difficult to compress so you might not save very much, if it even works at all.
Mrs Beanbag is offline  
Old 21 January 2015, 23:23   #16
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
You`ll have to forgive my clumsiness in trying to explain the problem, I was never really cut out for coding but with lot's of trial and error I was able to get stuff to work in the past, but the passage of time has eroded the basic knowledge I once had

I can tell you have much experience in this matter and this must be so 101 page 1 of basic stuff for you. I`ll take your advice and load the MED files in and then compress with ppsave. I don't suppose you could write a few basic lines I could follow? Would it be along the lines of:

dir$="df0:mods"
med load"music1.med"
ppsave"music1.pp"

Thanks for helping
lordofchaos is offline  
Old 21 January 2015, 23:38   #17
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
was just trying to find the ppload instruction in the AMOS Pro manual to no avail... thought i was going mad.

it's actually in the AMOS Pro Compiler extension! So i hope you have that installed.

Code:
dir$="df0:mods"
med load "music1.med",3
ppsave "music1.pp",3,4
the "4" at the end of the ppsave instruction refers to the packing efficiency, it ranges from 1 (fast) to 5 (best) i think, i don't have the compiler manual handy. Then you can do, in your program:
Code:
dir$="df0:mods"
ppload "music1.pp",3
med play 3
However, ppsave *may* throw the error "cannot pack this bank"
Mrs Beanbag is offline  
Old 21 January 2015, 23:54   #18
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
Nice, I shall try that out tomorrow along with installing AMCAF.. I`m pretty sure I have the Compiler extension installed though. Thanks once again for the help!
lordofchaos is offline  
Old 22 January 2015, 21:09   #19
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,205
I can't thank you guys enough! AMCAF installed without any problems, thanks to Lonewolf10 for the guide. And the code example for compressing the modules worked like a charm, a big thanks to Mrs Beanbag.

The Original file size for the module was 237260, after compression 140884.

Now all I have to is get some pictures and title stuff sorted.
lordofchaos is offline  
Old 22 January 2015, 21:49   #20
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
oh another tip, instead of loading all your images with "load iff" all the time, use the "spack" command to pack them into a memory bank, and then save it with "ppsave".
Mrs Beanbag is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMOS or Blitz Basic 2 Dreedo Coders. General 42 23 September 2014 21:48
Compilation issues using Amos Pro and WinUAE CaptainNow Coders. Language 3 06 May 2014 15:22
jAMOS - new AMOS BASIC reimplementation in Java Mequa News 16 03 June 2012 16:58
jAMAL - AMOS BASIC AMAL reimplementation in Java! Mequa News 26 31 January 2012 02:12
Where's the amos.library on the 3-disk AMOS set? andreas support.Apps 0 15 November 2001 16:04

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10983 seconds with 14 queries