Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: AMOS & Processing power?  (Read 9883 times)

0 Members and 2 Guests are viewing this topic.

Volvo_0ne

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 71
  • A1200 lover
AMOS & Processing power?
« on: February 16, 2018, 06:50:39 PM »

Is it possible to make AMOS claim all the processing power of a system from (say) a floppy boot?
Any hints/tips much appreciated

TIA
V1
Logged
Transuranic heavy elements may not be used where there is life.

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: AMOS & Processing power?
« Reply #1 on: February 16, 2018, 07:14:39 PM »

Use an extension to bump the task priority to maximum and lose the keyboard handler or call the equivalent function using exec call.
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: AMOS & Processing power?
« Reply #2 on: February 17, 2018, 12:35:03 PM »

Hi Volvo_One

You could also disable multi-tasking completely. This gives you quite a speed boost. Some extensions support it like Turbo and AMCAF.

Slightly off topic, but being able to get the 'rastport' address that your AMOS screen is using is very handy as well as it allows you to use functions in the graphics library. Some are actually slower than AMOS but some are faster. Early versions of the Easylife extension support this as well as AMCAF.
Logged

Volvo_0ne

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 71
  • A1200 lover
Re: AMOS & Processing power?
« Reply #3 on: February 18, 2018, 06:44:46 PM »

Hi Volvo_One

You could also disable multi-tasking completely. This gives you quite a speed boost. Some extensions support it like Turbo and AMCAF.

Slightly off topic, but being able to get the 'rastport' address that your AMOS screen is using is very handy as well as it allows you to use functions in the graphics library. Some are actually slower than AMOS but some are faster. Early versions of the Easylife extension support this as well as AMCAF.
Thanks KevG
Is there any way to do this at startup (eg without using extensions) ?

I'm not a huge fan of them(extensions), as there almost always seems to be some kind of limitation  or faffing about to use their commands.
Thus I like to use pure AMOS and/or Compiler.

TIA
V1
Logged
Transuranic heavy elements may not be used where there is life.

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: AMOS & Processing power?
« Reply #4 on: February 21, 2018, 10:35:18 AM »

To disable multi-tasking use 'forbid()'
To enable multi-tasking use 'permit()'

Both functions are called from the Exec.library with an offset value.
for example....

D=Execall(-132) : Rem Disable multi-tasking
E=Execall(-138) : Rem Enable multi-tasking

These functions don't use additional arguments so the DREG and AREG arrays can be left alone.


Be careful though. Disabling multi-tasking can lock out the keyboard so you won't be
able to break out of a program if you wish.

What I do in my game loops is check for the right mouse button and if clicked
I jump to a routine to enable multi-tasking again.

As for getting the 'rastport', You will need to do a lot of research, unless you use an extension.

Hope this helps.
« Last Edit: March 02, 2018, 01:02:53 PM by KevG »
Logged

Volvo_0ne

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 71
  • A1200 lover
Re: AMOS & Processing power?
« Reply #5 on: February 28, 2018, 08:59:10 PM »

Thanks KevG
I'll give this some attention later in the week when I have the time...

Regards
V1
Logged
Transuranic heavy elements may not be used where there is life.

adrazar

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • Generic Amiga User
Re: AMOS & Processing power?
« Reply #6 on: February 28, 2018, 10:22:33 PM »

A test I just made indicated that the rastport address is located in Screen Base + 164.
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: AMOS & Processing power?
« Reply #7 on: March 01, 2018, 09:32:58 AM »

Quote
A test I just made indicated that the rastport address is located in Screen Base + 164.

Try quitting AMOS and run the program again with the same offset value of 164. The reason I ask this is because you tend to get different values when you reset AMOS. Also, try out a graphics library function for example writepixel to see if it works.
« Last Edit: March 01, 2018, 09:41:33 AM by KevG »
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: AMOS & Processing power?
« Reply #8 on: March 01, 2018, 05:31:34 PM »

Quote
A test I just made indicated that the rastport address is located in Screen Base + 164.

That is not correct. Post your test code below please.
Logged

adrazar

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • Generic Amiga User
Re: AMOS & Processing power?
« Reply #9 on: March 01, 2018, 08:33:57 PM »

Ops, I forgot to multiply the offset by 2! The address I found was actually Screen Base + 328.

Code: [Select]
For I=0 To 7
   Screen Open I,320,200,16,Lowres
   SB=Screen Base
   RASTPORT=Scrn Rastport
   Screen To Front 0 : Screen 0
   Print Hex$(RASTPORT,8),Hex$(Leek(SB+2*164),8)
Next I

Scrt Rastport is from the AMCAF extension.
(the test code was pretty simple: For I=-2000 to 2000 : If Leek(Screen Base+2*I)=Scrn Rastport Then Print I : Next I)
« Last Edit: March 01, 2018, 08:37:40 PM by adrazar »
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: AMOS & Processing power?
« Reply #10 on: March 02, 2018, 12:48:46 PM »

Oh dear. Where do I start?

1. It does not work.
2. I know about the function in the AMCAF extension. Why are you using it here?
3. Why are you opening 8 screens?
4. There is no link from the AMOS Screen Base to the Rastport so why are you using it?
5. Do you actually know what a Rastport is?
6. You stated in a post above that you made a test that confirmed the Rastport is an offset from the Screen Base. This is not the case. You cannot get the Rastport from the Screen Base.
7. Your code is absolute nonsense.

Please explain to me why you posted this?
Logged

adrazar

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • Generic Amiga User
Re: AMOS & Processing power?
« Reply #11 on: March 02, 2018, 04:55:37 PM »

5. Do you actually know what a Rastport is?

No! ;D

So sorry about not making sense, my posts were based on the assumption that the said rastport was the address you would get by using Scrn Rastport from AMCAF.
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: AMOS & Processing power?
« Reply #12 on: March 02, 2018, 04:58:13 PM »

A RastPort is made every time you open a new screen.  It sits at a different address every time.  It's dynamically allocated, in other words.
Logged

adrazar

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • Generic Amiga User
Re: AMOS & Processing power?
« Reply #13 on: March 04, 2018, 06:04:07 PM »

Wait a minute, it actually does work..!  :o
Code: [Select]
Areg(1)=Leek(Screen Base+328)
Dreg(0)=100 : Dreg(1)=100 : Ink 5
If Gfxcall(-324) Then Print "WritePixel failed"
A lot of the information referred to in the help section "AmigaDos --> Libraries" can be found here:
http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node000F.html
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: AMOS & Processing power?
« Reply #14 on: March 04, 2018, 10:09:21 PM »

Adrazar...

I give you top marks for your persistence but it is still not correct.
The highest offset in the AMOS screen base structure is 190 ($BE) and that
is the offset for the Autoback value. So your offset of 328 cannot be correct.

Although you are using the correct offset in the graphics library for the 'writepixel' function, it returns ZERO which indicates success. However, there is no pixel plotted on the screen.

The AMOS screen structure is described below for your information....
http://www.amigacoding.com/index.php/AMOS:Screenbase_structure

As you can see, it is a lot different from a standard Intuition screen structure and there is no reference to the RASTPORT at all.

There must be another way to do it. I'll have a try myself once I get some spare time.


Logged
Pages: [1] 2   Go Up
 

TinyPortal 2.2.2 © 2005-2022