Ultimate Amiga

Please login or register.

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

Author Topic: Re:ReSource  (Read 15831 times)

0 Members and 1 Guest are viewing this topic.

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re:ReSource
« on: April 17, 2015, 04:03:43 PM »

From BruceUncle's extension source thread:
Quote
Be sure to read the docs I've written.  There's also a quick database report in PDF format of the essential Resource documentation that I've created from its Help files.  If anyone's interested, I've also got disassemblies of Resource V6.06's executable and library files.  It's a program that would benefit from some bug fixes and fixes to its Help File system.  Let me know if anyone's interested and I'll post them.
I have not worked with ReSource.  Since it isn't open-source as far as I know, I've used ADis on one occasion and found it to be useful.  Maybe it would be easier or, if nothing else, more legal to add what ReSource has but is lacking on ADis to the ADis sources.  Sources and binary code to ADis are at this link.
« Last Edit: April 17, 2015, 04:57:44 PM by SamuraiCrow »
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re:ReSource
« Reply #1 on: April 18, 2015, 03:22:10 AM »

The whole method of disassembly is different with Resource.  It's interactive, so it's a completely different way of working with a disassembly.  It's macro language is very powerful, though it takes some getting used to as the docs are in the broken help system.

It appears to be abondonware, so probably not strictly legal.  If it was still available I'd buy it.  Then complain bitterly about the crippled Help system that makes it hard to learn, and the few other bugs that crop up.  But would I get any support from a defunct company?

The last commercial version was V6.06.  The last commercial manual was V5.x.  It looks like the changes made for V6.06 were not made by the original author, Glen McDiarmid.  (Who incidentally came from Queensland, Australia).  The Puzzle Factory appears to be defunct long ago with the last references to it being circa 1998.
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re:ReSource
« Reply #2 on: April 25, 2015, 08:22:17 AM »

The whole method of disassembly is different with Resource.  It's interactive, so it's a completely different way of working with a disassembly.  It's macro language is very powerful, though it takes some getting used to as the docs are in the broken help system.

It appears to be abondonware, so probably not strictly legal.  If it was still available I'd buy it.  Then complain bitterly about the crippled Help system that makes it hard to learn, and the few other bugs that crop up.  But would I get any support from a defunct company?

The last commercial version was V6.06.  The last commercial manual was V5.x.  It looks like the changes made for V6.06 were not made by the original author, Glen McDiarmid.  (Who incidentally came from Queensland, Australia).  The Puzzle Factory appears to be defunct long ago with the last references to it being circa 1998.
It's in limbo.  McDiarmid licensed it to Puzzle Factory, who have the rights to sell it.  But the guy behind Puzzle Factory died or something, and McDiarmid hasn't been able to contact the wife, so cannot get the rights back.
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re:ReSource
« Reply #3 on: May 03, 2015, 05:56:31 AM »

It's in limbo.  McDiarmid licensed it to Puzzle Factory, who have the rights to sell it.  But the guy behind Puzzle Factory died or something, and McDiarmid hasn't been able to contact the wife, so cannot get the rights back.
Thanks for the info copse.  I wondered what had happened to The Puzzle Factory.  Do you know if it's possible to get in touch with McDiarmid?

From this thread:
Quote from: copse
Quote from: bruceuncle
If anyone's interested, I've also got disassemblies of Resource V6.06's executable and library files.  It's a program that would benefit from some bug fixes and fixes to its Help File system.  Let me know if anyone's interested and I'll post them.
What state are they in?  Can they be assembled into a fully working version of Resource v6.06?  Are they disassembled comprehensively with decent labels, or are they pretty raw?
I'll dig them out and post them in this thread to keep them separate from the AMOS stuff.

My main interest was to get at the Help text so I could get it organised into a usable format.  All the detailed stuff is in that Help text, not in the manual.  Especially when it comes to macros and strings.  So I abandoned any further work when I'd got what I needed.  The result is in that AMOS Extensions download in case you missed it in the detail.  I couldn't have written the macros for the AMOS Extension disassemblies without it.

From a vague memory, the library disassemblies are pretty much complete.  The Resource disassembly needs a lot of work as there are two huge offsets tables that are relocated to absolute addresses in its initialisation.  Many of the resulting target addresses point into the middle of code instructions (self-modifying the effective address or register, tut, tut, tut...) which really screws the disassembly!  Both the main executable and the libraries use a common data area referenced from A5 (mostly).  So they all really need a Resource Symbol Library created to take them any further.  Fill it in as we find out what each offset is used for.  Some are obvious but there's a stack of ones that can only really be determined by a lot of tedious hard work...  I may get back to it at some time in the distant future but I'm up to my neck in AMOS for a while yet.

My posts may be a bit few and far between for a while as my back needs some urgent medical attention.  So I'm regretting my phobia for laptops as, lying down, there's only so much reading and watching videos I can put up with!  ;D  And all my stuff's on this desktop PC...
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re:ReSource
« Reply #4 on: June 04, 2015, 03:46:24 AM »

Thanks for the info copse.  I wondered what had happened to The Puzzle Factory.  Do you know if it's possible to get in touch with McDiarmid?
You could try via linkedin, I think this is him.
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re:ReSource
« Reply #5 on: June 07, 2015, 05:30:25 AM »

Thanks for the info copse.  I wondered what had happened to The Puzzle Factory.  Do you know if it's possible to get in touch with McDiarmid?
You could try via linkedin, I think this is him.
Thanks for the info copse.  I'll chase it up.

And you reminded me that I hadn't posted the Resource disassembly files I promised a while back.  So I dug them out the archives and eyeballed the results.  I did these when I had little Resource experience, so I added a few comments and tidied up a bit.  And corrected a big blunder I'd made in Resource.rs.  I'd taken both offset tables as being base-relative instead of current-address-relative.  My original comments about possible self-modifying code were therefore wrong, wrong, wrong... :-[ (Well, I was new to Resource and re-learning 68k at the time.)  So I corrected that.  The files in the attachment are all in *.rs format.  Set any options recommended in the comments at start of file to get the correct formatted view for some of the tables.

Resource.rs   Would need a lot more work to understand.  Good basis now I corrected the tables though...
ReSourcehelp.library.rs   Contains the Help Index and Help Text tables.  This is the one I did the most work on.  It allowed me to extract the data to a database and sort out the Help Texts from there.  Finally producing the quickie reference manual (also in the attached zip).
ReSourcesyms.library.rs   Contains the data source structures for the Symbols requester listboxes and the symbol values themselves.  Lacks the format of the symbol values structures.  The rest should be fairly self-explanatory.
ReSourceutil.library.rs   Contains the Menu Text and definition tables.
ShowMacros.rs   Contains the Macro Instruction Text tables.  So the data's in two places!

The *.library.rs files would all be the most complete.  Hope they might be of some use.
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re:ReSource
« Reply #6 on: June 30, 2015, 12:49:31 AM »

I haven't had a chance to look yet bruce, but what I'm hoping to see in these is the .rs file format so I can target continuing older resource disassembly projects in my own disassembler.
Logged

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re:ReSource
« Reply #7 on: January 16, 2016, 05:00:41 PM »

I managed to force myself to get a start on trying to work out the .RS file format.

Loose notes on disassembling Resource executable in case it helps anyone else:

Quote
Jump tables:

   JT0_00DF00
      REFERENCE: 0x1D5BC   Relocates offsets.
   JT1_00E84C: 0xE84C -> 0x12978, ends with 0xFFFFFFFF
      REFERENCE: 0x1D5BC  Relocates offsets.
      REFERENCE: 0x2A7C4

As yet unreferenced code:

   0x16864   decompress
   0x1716a

Offsets in memory block (02A890 / JTD1_02A890):

   Offset   Bytes   Name                     Searched
      Negative offsets are named like -$18 -> ROF_N018 until completely processed
   -$388C   -      ...                                 0x27004
   -$2A90   -      ...                                 0x27E00
   -$2A14   -      ...                                 0x27E7C
   -$1FA0   -      ...                                 0x288F0      DoIO related
   -$1F3E   -      ...                                 0x28952      DoIO related
   -$F2A   -      ...                                 0x29966
   -$E2A   -      ...                                 0x29A66
   -$DF2   -      ...                                 0x29A9E
   -$D28   -      JTD1_029B68                           0x29B68      Set origin related
      REFERENCE: JT1_00FADA / 0xFADA = $298(unreferenced itself, part of jump table)
   -$C9E   -      JTD1_029BF2                           0x29BF2      Prompt execute command line related
      REFERENCE: JT1_00FA94 / 0xFA94 = $1C9(unreferenced itself, part of jump table)
   -$A8C   -      IntuitionRequests                     0x29E04
   -$A0A   -      IntuitionRequest                     0x29E86
   -$9F8   -      ...                                 0x29E98
   -$96C   -      SetPointers                           0x29F24
   -$914   -      IntuitionSetPointer                     0x29F7C
   -$902   -      ClearPointers                        0x29F8E
   -$8B0   -      IntuitionClearPointer                  0x29FE0
   -$878   -      ...                                 0x2A018
   -$73A   -      DosClose                     Y      0x2A156
      REFERENCES: 0xC94C ...
   -$728   -      ExecCloseDevice                  Y      0x2A168
   -$71C   -      ExecCloseLibrary               Y      0x2A174
   -$70C   -      ExecCopyMem                     Y      0x2A184
   -$700   -      ExecCopyMemQuick               DIRECT   0x2A190
   -$6F4   -      DosDelay                     Y      0x2A19C
   -$6E8   -      DosDeleteFile                  Y      0x2A1A8
   -$6AC   -      ExecDoIO                     Y      0x2A1E4
   -$69A   -      DosExamine                     Y      0x2A1F6
   -$690   -      DosExecute                     DIRECT   0x2A200
   -$684   -      ExecFreeMem                     Y      0x2A20C
   -$666   -      ExecWaitPort                  Y      0x2A22A
   -$65C   -      ExecFreeSignal                  DIRECT   0x2A234
   -$652   -      DosIoErr                     Y      0x2A23E
      REFERENCE: 0xC5B2
   -$648   -      DosLock                        Y      0x2A248
   -$63C   -      ExecOpenDevice                  Y      0x2A254
   -$632   -      DosLoadSeg                     Y      0x2A25E
      REFERENCE: 0x147E6
   -$628   -      DosUnLoadSeg                  Y      0x2A268
      REFERENCE: 0x1479E
   -$61e         DosOpenSeek                     Y      0x2A272
   -$60a         DosNewFile                     Y      0x2A286
   -$5b8         DosSeek                        UNREFD   0x2A2D8
   -$532         DosRead                        Y      0x2A35E
   -$4F6   -      DosWrite                     Y      0x2A39A
   -$4EA   -      ...                                 0x2A3A6
   -$4C4   -      ...                                 0x2A3CC
   -$46E   -      ...                                 0x2A422
   -$460   -      ...                                 0x2A430
   -$44C   -      ...                                 0x2A444
   -$408   -      ...                                 0x2A488
   -$3D2   -      ...                                 0x2A4BE
   -$264   -      ResetMenuStrip                        0x2A62C
      REFERENCES: 0x1BFD0 / 0x1C0C6
         REFERENCES: 0x28B8C
         REFERENCES: 0x28C9E
         REFERENCES: 0x2990C
      REFERENCES: 0x1BFDE / 0x1C0C6
         REFERENCES: 0xE874
         REFERENCES: 0x153A0
         REFERENCES: 0x1BCB2
         REFERENCES: 0x1BD04
   -$228   C      ...                                 0x2A668
   -$19C   C      ...                                 0x2A6F4
   -$17C   C      ShowResourceutilOpenFailDialog            0x2A714
   -$112   C      CallRULookupString               Y      0x2A77E
   -$CC   C      Table1Lookup                        0x2A7C4
      REFERENCE: 0x17178
      REFERENCE: 0x1D770
      REFERENCE: 0x1E3BE
      REFERENCE: 0x1FF20
      REFERENCE: 0x1FF28
      REFERENCE: 0x28CB6
      REFERENCE: 0x29932
   -$6C   C      ShowASLOpenFailDialog                  0x2A824
   -$2A   C      ...                                 0x2A866
   -$18   C      CallLocateAndOpenLibrary               0x2A878
   $36A   1                                       0x2ABFA
   $4A2   1                                       0x2AD32
      REFERENCE: 0x302A (test value == 0x78, case related)
      REFERENCE: 0x1C8CE (test value == 0x58)
      REFERENCE: 0x1F214 (store the value in a string)
      REFERENCE: 0x25656 (store the value in a string as a instruction suffix)
      REFERENCE: 0x25CD8 (store the value)
      
   $6E8   C      ... something to do with CCR            0x2AF78
   $B87   1      ...                                 0x2B417
   $BCC   1      ...                                 0x2B45C
   $BE8   2      ...                                 0x2B478
   $1B44   4      
   ...
   $25A8   4      WbMsg
   $25AC   4      ExecBase
   ...
   $25B0   4      TaskHandle
   $25B4   4      
   $25B8   4      DosBase                  Y
   $25BC   4      IntuitionBase
   $25C0   4      Resourceutil related?
   $25C4   4      Menu                              0x         struct Menu *
   $25C8   4      Resourceutil -$30 related
   $25CC   4      Resourceutil -$30 related
   $25D0   4      Resourceutil -$30 related
   ...
   $25D4   4      GraphicsBase
   $25D8   4      AslBase
   ...
   $25E4   4      GadtoolsBase
   $25E8   4      MathieeedoubbasBase
   $25EC   4      FpSupportBase
   ...
   $25F0   4      ReSourceUtilBase         
   $25F4   4      ReSourceSymsBase
   ...
   $2648   4      NewWindowScreenPtr
   ...
   $2650   4      ... memory ptr
   $2654   4      GadgetVisualInfoPtr
   $2658   2      ...
   ...
   $26A8   4      ...   memory ptr
   $26BA   ?      InterruptServerPtr                     0x         struct Interrupt *
   $26D0   1      ...
   $26D1   1      VBlankCounter                        0x
   $26D2   4      WindowPtr                           0x         struct Window *
   $26DA   4      ...
   $276E   4*6      SearchTypeStringPtrs
   $278A   4*2      SearchCaseStringPtrs
   $2796   4*2      SearchAlignStringPtrs
   $27A2   4*2      SearchFromStringPtrs
   $27B2   4*2      ... Pointer to gadget related
   $27E0   8      ... Two addresses
   ...
   $2850   4      FileHandle
   $2854   4      FileLockHandle
   $28F0   4*15   ... Seglist entries
   ...
   $2894   4      FailureMsgPtr?
   ...
   $296C   4      TaskWindowPtr
   ...
   $2944   4      NewWindowTitlePtr
   ...
   $29D2   4      OtherWindowPtr
   $29D6   4      OtherWindowUserPort
   $2A90   4      ? Ptr
   ...
   $2F0C   4      ...
   $4246   2      ...
   $42B1   1      ...
   $42B8   1      ...
   $42CD   1      ...
   
String entries of interest are the following / LocalStringTable / 0x3D3A:

   $271B   "Compressing"
      REFERENCE: 0x13ADA / 0x13AE0
         REFERENCE: 0x14114
   $271C   "Decompressing"
      REFERENCE: 0x13BD0 / 0x13BD6

Loose notes on disassembling resourceutil.library:

The function in Resource at -$112, which I call CallRULookupString, takes a message ID.  It either asks this library for the text (call offset -$2A), or it looks up another embedded list.

That appears to be the main usage of resourceutil.library.  The other usage (call offset -$30) is for building string descriptions of functionality, for things like keybinding.  FUNCTION: Blah/Blah/Absolute/StartOfFile or something.  This happens by returning a reference to a table entry, and that is used to lookup and concatenate a sequence of strings by Id, done within Resource.
« Last Edit: January 17, 2016, 02:29:56 AM by copse »
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re:ReSource
« Reply #8 on: January 16, 2016, 10:08:50 PM »

Good work Copse.  It looked like the Resource library files could be relatively easily fixed to get rid of the bugs in the help text and menu data.  But the code makes some assumptions about end-of-line that would also need fixing.  I gave up at that point as I'd already got the help text, menus and macro codes databased.  So I corrected the help text there and produced the help docs and macro commands.
Good to see you following up on this as I can't get too involved until AMOS work is complete.
I'll do post with the useful stuff in a zip when I'm next at my PC (doing this one on a smartphone, which is a real pain!).
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re:ReSource
« Reply #9 on: January 17, 2016, 02:32:26 AM »

Good work Copse.  It looked like the Resource library files could be relatively easily fixed to get rid of the bugs in the help text and menu data.  But the code makes some assumptions about end-of-line that would also need fixing.  I gave up at that point as I'd already got the help text, menus and macro codes databased.  So I corrected the help text there and produced the help docs and macro commands.
Good to see you following up on this as I can't get too involved until AMOS work is complete.
I'll do post with the useful stuff in a zip when I'm next at my PC (doing this one on a smartphone, which is a real pain!).
I've updated the above.

I was hoping to just find the RS loading and saving and document the format, but.. it's so complicated that it's starting to look like I'll have to just paint layers of detail on the disassembly until I have enough to work with.  At that point, it should be possible to almost get it compiling.

If Puzzle Factory hoped their memory references to data/code in the executable via A5/A6 were copy protection that stopped people from releasing hacked versions, they made a good choice.
Logged

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re:ReSource
« Reply #10 on: January 25, 2016, 12:06:06 AM »

Well, I now have it at the point where I am assembling it in devpac with no errors.

  • It crashes on exit.
  • If it is run from the assembler, and all the libraries and what not are not available, then it opens to a blank running Resource screen.  How usable it is, I do not know.
  • If it is put in the directory of a Resource installation, it crashes somewhere in auto configuration.
  • Resource itself can't disassemble the 680x0 instructions it uses, so they're in there as data.  There's still maybe one piece of unreferenced code. 
Logged

Wepl

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re:ReSource
« Reply #11 on: March 02, 2020, 01:50:48 PM »

I just want to note that I released a resourced ReSoure, see http://eab.abime.net/showthread.php?t=100964
Interesting to see that you also started at this topic. Are the mentioned rs.files downloadable here. I cannot see them anywhere.
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re:ReSource
« Reply #12 on: March 21, 2020, 09:53:54 PM »

I just want to note that I released a resourced ReSoure, see http://eab.abime.net/showthread.php?t=100964
Interesting to see that you also started at this topic. Are the mentioned rs.files downloadable here. I cannot see them anywhere.

nice one :)
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022