rsrc_saddr where are some examples

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

rsrc_saddr where are some examples

Postby charles » Tue Feb 03, 2009 2:30 am

rsrc_saddr
is there a chance rsrc_saddr has ever been used by anyone here in their code?
..and if so can we have an example?

i thought it corrected the rsc file's placement and offsets , but
any user actually used this without bombing?

it only allows one object to be "set" or is the index,input, as requiring an address ?
i been using gfa to try

~rsrc_saddr(type,index,adr)

it did not work well for me and i don't want to identify these actions as bugs!
charles
atari is my lifestyle,not a hobby.
User avatar
charles
Atari God
Atari God
 
Posts: 1326
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada

Re: rsrc_saddr where are some examples

Postby daeghnao » Tue Feb 03, 2009 9:45 pm

I haven't myself seen any example of this call being used. The GEM documentation says:

Code: Select all
To get or set any pointer in the OBJECT, TEDINFO, ICONBLK or BITBLK structures, the application calls RSRC_GADDR and RSRC_SADDR.


So, to point the TEDINFO index 3 to your reserved memory mem%, you'd do:

Code: Select all
tedinfo&=2 ' Standard GEM definition
~RSRC_SADDR(tedinfo&,3,mem%)


charles wrote:i thought it corrected the rsc file's placement and offsets


This doesn't sound like what the call does. Why do your placement and offsets need fixing? Are you doing something other than RSRC_LOAD()?
User avatar
daeghnao
Captain Atari
Captain Atari
 
Posts: 448
Joined: Wed Oct 27, 2004 12:41 pm
Location: York, UK

Re: rsrc_saddr where are some examples

Postby charles » Wed Feb 04, 2009 12:05 am

yep doing it the hard way .
loading resource right from data lines.
embedding we called it ....

i tried and tried ,
and
what appears to be a easy code
to pass the tedinfo ///....///or whatever type
at a given offset///....//whatever index
to the peice address///....///appropriate address

i got the compendium out and consulting it to find items in the rsrc header
but am now boggled ,

few more tests then maybe goes on a list i have called .."areas of uncertainty"

i came to a conclusion that if i had two object trees to
pass the adress to
i would not be able to differenciate them apart!

so which adress would i be setting?

and am i iniatating the proper term setting?

which is what i made of"set" in the instructions..

because i know the rsc file is not consistant ,
it has displacement in the file where pointer to address go
for tedinfo,image icon ,,etc etc..
and all this is to create a format known as the resource.

which is what rsrc_load does at execution time/ and can not be done if the resource data is in data lines.

rsrc_saddr=this function sets the address of a resource daqta in the memory.

so would adr in the call as the last parameter
woul;d it return a adress
or
need a value to set an address?



maybe i went to far again!

charles
atari is my lifestyle,not a hobby.
User avatar
charles
Atari God
Atari God
 
Posts: 1326
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada

Re: rsrc_saddr where are some examples

Postby lp » Wed Feb 04, 2009 3:18 am

Dumping a rsc into data lines is a waste of time. In a raw RSC file all pointers are stored as offsets and all x/y coordinates are stored in characters, not pixels. Even if you manage to get rsrc_saddr() to work at the tree level, you are still screwed. Bombs away. :lol: I guess you didn't bother to read how RSC files are stored on disk.

CAll RSRC_LOAD() and be done with it. Or plan "B", ignore me. :wink:
User avatar
lp
Atari Super Hero
Atari Super Hero
 
Posts: 944
Joined: Wed Nov 12, 2003 11:09 pm

Re: rsrc_saddr where are some examples

Postby ppera » Wed Feb 04, 2009 3:21 pm

Yeah. rsrc_saddr is one of AES calls which are almost never used (or saying it not so nice: useless one :D ).
Real thing with RSCs is to integrate them in executable.
ppera
 

Re: rsrc_saddr where are some examples

Postby charles » Wed Feb 04, 2009 11:45 pm

plus lonny forgot to mention it only seems to work if the file is loaded with rsrc_load

i consult the gfa manual , then later consulted the compendium.

what does this means of x/y by character indicate?

for simple rsc i can get all the co-ordinates corrected and the images and strings , but for large multiple tree rsc i get screwd ,,or better yet bombed ,,i have survived several thosand bombings in the past week.

charles
atari is my lifestyle,not a hobby.
User avatar
charles
Atari God
Atari God
 
Posts: 1326
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada

Re: rsrc_saddr where are some examples

Postby stevee » Thu Feb 05, 2009 12:54 am

Of course we do have 'rsrc_rcfix' which will do exactly what you want but available only in MagiC and AES versions 4.0 and greater.
Shame!

As for the coors stored in character base, thats because low/med res the chars are 8bit high, and hi res 16bit high.
Stevee

Atari ST programming - my first love
User avatar
stevee
Atariator
Atariator
 
Posts: 22
Joined: Tue Dec 30, 2008 8:31 pm
Location: South East, UK

Re: rsrc_saddr where are some examples

Postby lp » Thu Feb 05, 2009 12:56 am

charles wrote:plus lonny forgot to mention it only seems to work if the file is loaded with rsrc_load

i consult the gfa manual , then later consulted the compendium.

what does this means of x/y by character indicate?

for simple rsc i can get all the co-ordinates corrected and the images and strings , but for large multiple tree rsc i get screwd ,,or better yet bombed ,,i have survived several thosand bombings in the past week.


I didn't forget to mention that. It should be obvious if you researched stuff before attempting to do it. Seriously, just look at the parameters for rsrc_saddr(). Do you see a parameter that tells the ASE the base address of the rsc file? No. Obviously it's going to fail.

Since ppera is so keen on the idea, I'll leave all further assistance to him. Good luck. :mrgreen:
User avatar
lp
Atari Super Hero
Atari Super Hero
 
Posts: 944
Joined: Wed Nov 12, 2003 11:09 pm

Re: rsrc_saddr where are some examples

Postby Desty » Thu Feb 05, 2009 12:56 am

charles wrote:but for large multiple tree rsc i get screwd ,,or better yet bombed ,,i have survived several thosand bombings in the past week.

"... So I turned my ST upside down and it said on the bottom: Manufactured in Israel. No wonder it was bombing so much."

:ehum:
tá'n poc ar buile!
User avatar
Desty
Atari God
Atari God
 
Posts: 1794
Joined: Thu Apr 01, 2004 2:36 pm
Location: 53 21N 6 18W


Return to Coding

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests