Hardware Analysis

Find quick help here to get you started with Hollywood
Post Reply
SpawnPPC
Posts: 61
Joined: Fri Mar 15, 2024 11:51 pm

Hardware Analysis

Post by SpawnPPC »

Hello everyone.

I'm getting familiar with Hollywood even if I'm not yet capable of making a complete code on my own starting from 0. I'm practicing. Having said that, is it possible to create Hardware Analysis software for AmigaOS, for example?

In the sense, if I wanted to interact with the RAM for example, and know how much CHIP RAM and how much FAST RAM an Amiga has and above all how much CHIP RAM and FAST RAM are actually available, how could I do it? Is there a way to query the operating system for RAM details?

Thank you all !

Emmanuel
plouf
Posts: 666
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Hardware Analysis

Post by plouf »

we have a contradiction here.
you claim you are a begginer "difficult to write an entire app yourself currently" however you want to do advanced stuff, which are beyond hollywood target anyway !

in general you must know exactly how things work and have API call to do stuff like than
you can get SOME info with GetMemoryInfo() and GetSystemInfo() , and receive even more with external tools like identify lib ->https://aminet.net/package/util/libs/IdentifyDev
Identify lib has command line interface AND AREXX interface.

however after that, if you want to do memory corruption test for example, you neek to do Peek() and Poke() with precily knowledge of the memory position !! things get very very advances !
Christos
SpawnPPC
Posts: 61
Joined: Fri Mar 15, 2024 11:51 pm

Re: Hardware Analysis

Post by SpawnPPC »

Hello and thanks for the reply.

To answer you, I have to mention a detail that I did not specify previously and for this I apologize.

I'm certainly not an expert Hollywood programmer, but still I'm a former programmer with fairly high knowledge and with 40 years of computer science under my belt, so I'm not a novice.
I'm simply starting over with programming by learning Hollywood rather than another language.
That said, I'm already familiar with Hollywood's direct commands, but I thought there was something else I was missing. So, from what I understand, I have to go outside Hollywood with an AREXX script, because from what I understand, Hollywood has some gaps from this point of view. Well, no problem, nothing could be simpler. I will use AREXX while we wait for Hollywood to evolve in this area. Thanks again.

Emmanuel
zylesea
Posts: 231
Joined: Tue Feb 16, 2010 12:50 am
Location: Westfalen/Germany
Contact:

Re: Hardware Analysis

Post by zylesea »

For easy things like Fastram/Chipram availability you can run the DOS command "avail" via Hollywood command run (or ecxecute)

Code: Select all

Run ("Sys:avail >ram:bla")
And access the result from ram:bla from your code. Instead of using a temp file that you access you can use the new syntax of run (staring from Hollywood9) that allows to pass on output of the lauched program to an event handler (haven't tried that myself yet). Going the temporarily file is a non sophisticated, but an easy manual way.

if you want to do things that Hollywood is not intended for, just do that critical part in a small C/C++-Program (or what ever your other language is) launch that via run/execute and catch your user data.
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Hardware Analysis

Post by jPV »

zylesea wrote: Mon Oct 07, 2024 9:16 pm For easy things like Fastram/Chipram availability you can run the DOS command "avail" via Hollywood command run (or ecxecute)

Code: Select all

Run ("Sys:avail >ram:bla")
BTW. it should be C:Avail, not SYS:Avail.
And access the result from ram:bla from your code. Instead of using a temp file that you access you can use the new syntax of run (staring from Hollywood9) that allows to pass on output of the lauched program to an event handler (haven't tried that myself yet). Going the temporarily file is a non sophisticated, but an easy manual way.
The problem with Run() is that it executes asynchronously, so your code must wait it to return for sure before continuing. Synchronous Execute() is much easier in that regard, because you can be sure that data has been written in the temp file when Hollywood continues from that function.
if you want to do things that Hollywood is not intended for, just do that critical part in a small C/C++-Program (or what ever your other language is) launch that via run/execute and catch your user data.
Or you could write a Hollywood plugin to do things you want. Never done that myself though :)

If you create an external program in other languages and want to use it with Execute() or Run(), you can also hide it from users by linking it in the Hollywood application and writing it to a temporary location like T:.

I have made it sometimes like this:

Code: Select all

@FILE 1, "myLittleHelperTool"
StringToFile(ReadBytes(1), "T:myLittleHelperTool")
; Do your things with Execute() etc. and cleanup
DeleteFile("T:myLittleHelperTool")
SpawnPPC
Posts: 61
Joined: Fri Mar 15, 2024 11:51 pm

Re: Hardware Analysis

Post by SpawnPPC »

Hi and thanx to all for suggests !!! XD

I will try them !

Emanuele
Post Reply