Main Menu

Power Bobs

Started by Hungry Horace, 12 Nov, 2008, 10:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lonewolf10

Quote from: Sidewinder on 22 Nov, 2009, 02:41 AM
Last week I took a quick look at this library also, but didn't get very far.  I need more information on the exact format of Amos Pro extensions.  Is this information documented anywhere here or elsewhere on the Internet?

I have put together a basic guide to the layout of AMOS Pro extensions. You can find it here:

Extensions layout


Regards,
Lonewolf10


Lonewolf10


... just added info for AMOS 1.3 (and earlier?) extensions to the same thread.


Regards,
Lonewolf10


Hungry Horace

HolyMonkey sent me a bounty proposal for removing the nag screen on PowerBobs.

This time i've tried to do it "properly" - the old hack just involved nulling out the text iirc and making the button it waited for equal zero. (crude, but it sort of worked)

This time i'm using ReSource and actually removing the registration check by modifying the 68k ASM.

I think this version works, but i actually think i can still improve it.

I've attached a zip containing both extensions modified, and an example demo using it which has been compiled. I *think* it might still be briefly opening a screen. I'd be grateful if anyone could confirm it at least works, even if that is the case.

thanks
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


Tormentor

Thx i will test it.

MichaelVParent

I just tested it and it seems to work perfectly.  no pause, no screen with text, no wait for button press.

Great job Hungry Horace!

Lets please give this Nag-Free version a permanent place as a hosted file here at AmosFactory.

cheers.
Mike

Lonewolf10

Nice work Hungry Horace ;)

I shall download and add it to my pile of AMOS stuff  ;D


Quote from: MichaelVParent on 03 Aug, 2015, 10:05 PM
I just tested it and it seems to work perfectly.  no pause, no screen with text, no wait for button press.

Have you tried compiling something with Power Bob instructions in it?


Hungry Horace

would anyone mind trying this out....

it's a slightly 'cleaner' (in terms of redundant code being skipped) version of the hack.

Like before, i've tested the AmosPro version and it seems ok. What i'd like to know is if the AMOS1.3 version is ok as well really.

Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


james666

#22
Did you dissemble the whole extension Hungry Horace?  As noted above, the AmosPro "magic numbers" make it rather awkward.  From the extension structure I inferred that the cold start routine starts at $6DC.  Dissembling from here, I get the following code:


MOVEM.L A3-A6,-(SP)
LEA (lbL000298,PC),A3 * store address of datazone
MOVE.L A3,($1B8,A5)
LEA (lbL000024,PC),A0 * store address of default/run routine
MOVE.L A0,($1BC,A5)
LEA (lbL000024,PC),A0 * store address of cleanup routine (same as default/run)
MOVE.L A0,($1C0,A5)
MOVEM.L (SP)+,A3-A6
MOVEQ #12,D0 * Move extnb-1 to d0 - extension loaded OK.
RTS

lbL000024
LINK.W A3,#-$20
BSR.W lbC00012A * bsr to nag screen routine - replace this with $4E714E71 to skip
dl $FE31001D * AmosPro Rbsr
dl $FE31000A * AmosPro Rbsr
.
.
.


lbC00012A is the nag screen routine (easily identified by the text) so I found I could skip it simply by replacing the "BSR.W lbC00012A" with two NOPs.  This can be done by loading the extension binary into a hex editor, going to location $704 and replacing $61000100 with $4E714E71.

Hungry Horace

#23
Yes the whole thing was disassembled, but as you've seen,not much of it is relevant to the nag screen.

Not using NOPs though  I  inserted BRA instructions to "skip" the unwanted code when it checked for validity, in order to ensure I got rid of the screen open and additional delays etc.


It took longer on the 1.3 version, but I deduced the "shared" code it needed to miss.

Like yours, the patch was applied to the original file.
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


james666

On closer inspection I was able to identify the specific code that opens the nag screen and prints the message.  It's interesting that everything is done with internal amos.library calls. I wasn't aware that these were documented back in the day.  The equ.s file on the AmosPro tutorial disk has the equates for these functions but doesn't explain the input parameters.  The note at the top of the file just says "Be patient, we will soon (I hope) publish informations about the functions of the amos.library."


L0 MOVEM.L A3-A6,-(SP)
LEA (MB,PC),A3
MOVE.L A3,($1B8,A5) * store address of datazone
LEA (default,PC),A0
MOVE.L A0,($1BC,A5) * store address of default/run routine
LEA (default,PC),A0
MOVE.L A0,($1C0,A5) * store address of cleanup routine (same as default/run)
MOVEM.L (SP)+,A3-A6
MOVEQ #12,D0 * Move extnb-1 to d0 - extension loaded OK.
RTS

default LINK.W A3,#-$20
BSR.W nagscreen * bsr to nag screen routine - replace this with $4E714E71 to skip
dl $FE31001D * AmosPro Rbsr
dl $FE31000A * AmosPro Rbsr
.
.
.
nagscreen MOVEA.L ($1B8,A5),A2 *Dload flag from datazone
ADDQ.L #1,($5D4,A2)
BEQ.W lbC00091E *Skip nag screen if flag set
MOVE.L #6,-(A3)
MOVE.L #$140,-(A3)
MOVE.L #$C8,-(A3)
MOVE.L #4,-(A3)
MOVE.L #0,-(A3)
MOVE.L (A3)+,D5
ANDI.L #$8004,D5
MOVE.L (A3)+,D6
MOVEQ #1,D4
MOVEQ #2,D1
lbC00083E CMP.L D1,D6
BEQ.B lbC00084C
LSL.W #1,D1
ADDQ.W #1,D4
CMP.W #7,D4
BCS.B lbC00083E
lbC00084C MOVE.L (A3)+,D3
MOVE.L (A3)+,D2
MOVE.L (A3)+,D1
LEA ($95C,A5),A1
MOVEA.L (-8,A5),A0 * EcCall Cree (See wequ.s and equ.s)
JSR (12,A0) *
MOVE.L A0,($52C,A5)
MOVE.W ($BC,A0),($52A,A5)
ADDQ.W #1,($52A,A5)
MOVEA.L (-8,A5),A0 * EcCall CopForce
JSR ($20,A0) *
MOVEQ #5,D2
MOVEQ #0,D1
MOVEA.L (-12,A5),A0 * WiCall Locate
JSR ($10,A0) *
LEA (PowerBobsV10.MSG,PC),A1
MOVEA.L (-12,A5),A0 * WiCall Centre
JSR (8,A0) *
MOVEQ #7,D2
MOVEQ #0,D1
MOVEA.L (-12,A5),A0 * WiCall Locate
JSR ($10,A0) *
LEA (Unregisteredv.MSG,PC),A1
MOVEA.L (-12,A5),A0 * WiCall Centre
JSR (8,A0) *
MOVEQ #9,D2
MOVEQ #0,D1
MOVEA.L (-12,A5),A0 * WiCall Locate
JSR ($10,A0) *
LEA (PowerSoft.MSG,PC),A1
MOVEA.L (-12,A5),A0 * WiCall Centre
JSR (8,A0) *
MOVEQ #13,D2
MOVEQ #0,D1
MOVEA.L (-12,A5),A0 * WiCall Locate
JSR ($10,A0) *
LEA (PresstheEnter.MSG,PC),A1
MOVEA.L (-12,A5),A0 * WiCall Centre
JSR (8,A0) *
lbC0008D4 MOVEA.L (-4,A5),A0 * SyCall WaitVbl
JSR ($5C,A0) *
MOVEA.L (-4,A5),A0 * SyCall InKey
JSR (A0) *
CMP.W #13,D1 * Has chr$(13) been entered?
BNE.B lbC0008D4
MOVEQ #6,D1
MOVEA.L (-8,A5),A0 * EcCall Del
JSR ($10,A0) *
CLR.W ($52A,A5)
CLR.L ($52C,A5)
CMPA.L #0,A0
BEQ.B lbC00091E
MOVE.W ($BC,A0),D0
CMP.W #8,D0
BCC.B lbC00091E
ADDQ.W #1,D0
MOVE.W D0,($52A,A5)
MOVE.L A0,($52C,A5)
MOVEA.L (-8,A5),A0
JSR ($20,A0)
lbC00091E RTS

Lonewolf10

Quote from: james666
The equ.s file on the AmosPro tutorial disk has the equates for these functions but doesn't explain the input parameters.  The note at the top of the file just says "Be patient, we will soon (I hope) publish informations about the functions of the amos.library."
Yeah, I spent some time a few years back trying each of those routines and how to get them to work.

I believe I sent a copy of what I worked out to HungryHorace a year or so back. I can publish what I worked out here if you like?

james666

Quote from: Lonewolf10 on 23 Aug, 2015, 05:46 PM
I believe I sent a copy of what I worked out to HungryHorace a year or so back. I can publish what I worked out here if you like?

It would be great if it could be hosted here.  I'm sure it would help during the redevelopment work.

I was intrigued that extension writers were able to use these functions "back in the day".  Did they reverse engineer the amos libraries or was there some other official extension documentation that I missed? 

Hungry Horace

dont re-invent the wheel too much... Bruceuncle already resourced most extensions

http://www.ultimateamiga.com/index.php/topic,9794.msg46877.html#msg46877

Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


Lonewolf10

Quote from: james666 on 23 Aug, 2015, 06:59 PMI was intrigued that extension writers were able to use these functions "back in the day".  Did they reverse engineer the amos libraries or was there some other official extension documentation that I missed?

Francois documented the functions within a sourcefile located on one of the disks. All the info you need is in the attached file.

P.S. Apologies for the late reply.

Hungry Horace

anyone got any thoughts on why i cant get PBOBS to display my image number 101 from the bob bank?

is there a coded limit on what image numbers can be used??
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff