28 June 2008, 21:23 | #41 |
HOL Team Member
Join Date: Dec 2001
Location: Manchester
Posts: 2,513
|
You ever going to fix the typo in the thread title?
|
28 June 2008, 21:27 | #42 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
No it makes the thread title unique
|
28 June 2008, 21:39 | #43 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Close but no cigar It's allocating cleared mem.
Quote:
|
|
28 June 2008, 21:41 | #44 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
how big is the amiga stack when not defined?
|
28 June 2008, 22:17 | #45 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Ok nobody answered so I'm gonna take a stab in the dark at 4096bytes, unless modified in the icon tooltypes or using the stack command
I guess this game uses amigaos quite a bit. where is the stack located? |
28 June 2008, 23:07 | #46 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
if the program dos the following
Code:
START JMP ADDY1 <code> ADDY1 move.l sp,address <code> move.l address,sp RTS |
29 June 2008, 09:54 | #47 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Quote:
Quote:
|
||
29 June 2008, 11:06 | #48 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
This is probably just to save the current stack pointer and restore it later when the program ends. E.g. Code:
START lea InitialStack(pc),a0 move.l a7,(a0) ; store sp bsr alotofthings .... END move.l InitialStack(pc),a7 ; restore sp ... ; some other cleanup stuff rts |
|
30 June 2008, 15:03 | #49 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
The game uses a lot of LINK etc and the game accesses the register that is linked alot and I need to follow what it is doing
Anyway have the following code, which loads the system prefs, then modifies I think and saves them back. Code:
lbC0040AA LINK.W A5,#-4 MOVEM.L D2/D3/A6,-(SP) PEA ($E8).W PEA (_PrefBuffer).L JSR (_GetPrefs).L ADDQ.W #8,SP PEA ($E8).W PEA (_PrefBuffer2).L JSR (_GetPrefs).L ADDQ.W #8,SP CLR.L (-4,A5) lbC0040DA MOVE.L (-4,A5),D0 ASL.L #1,D0 LEA (lbL024E98).L,A0 CLR.W (A0,D0.L) ADDQ.L #1,(-4,A5) CMPI.L #$24,(-4,A5) BLT.B lbC0040DA CLR.L -(SP) PEA ($E8).W PEA (_PrefBuffer2).L JSR (lbC009AD4).L LEA (12,SP),SP MOVEM.L (SP)+,D2/D3/A6 UNLK A5 RTS The lines i'm unsure of I have made bold. If you could tell me what is happening, andf why there is stuff like clr.l -4.a5 etc.. why is it doing the -4? what is a5 pointing to? Thanks |
30 June 2008, 15:05 | #50 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Don't be so impatient I just answered that question in a pm :P
|
30 June 2008, 15:17 | #51 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
hehehe sorry thoght you was busy, and I have work in an hour
|
30 June 2008, 15:59 | #52 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
I just had a meeting and thus couldn't reply immediately :P
Last edited by StingRay; 30 June 2008 at 21:31. Reason: typo fixx0red :) |
30 June 2008, 20:51 | #53 |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,538
|
any chance of seeing a copy of that reply for the sake of those of us who like to learn?
|
30 June 2008, 21:33 | #54 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Of course, no problem! Here's what I wrote to bippym:
A5 is the ptr to the local variables that is created using the LINK instruction at the beginning. As you can see, it's just a simple counter and the clr instruction is just to initialise the counter. In "normal" (i.e. not produced by a compiler) asm it could look like: Code:
lbC0040DA MOVE.L .counter(pc),D0 ASL.L #1,D0 LEA (lbL024E98).L,A0 CLR.W (A0,D0.L) ADDQ.L #1,.counter CMPI.L #$24,.counter BLT.B lbC0040DA ... .counter dc.l 0 |
02 July 2008, 16:31 | #55 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 866
|
this program is compiled using Aztec-C, if you are using ReSource you should 'run the .rcl file' CFuncs.rcl supplied with ReSource.
this will name most Compiler and clib stuff PS: the usage of frestore is 68060 incompatible (workaround in the 68060.library) because the stackframe (size) has changed Last edited by Wepl; 02 July 2008 at 16:37. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Darkmere WHD Problem | Steve | support.Games | 7 | 06 March 2013 15:46 |
Possible problem with Battle Squadron WHD | jimmy2x2x | project.WHDLoad | 8 | 20 May 2011 21:08 |
WHD-Problem | Cannibalpinhead | support.Games | 1 | 14 November 2005 19:16 |
WHD Games Problem | Shinobi | support.WinUAE | 2 | 24 September 2003 11:24 |
Same problem w several WHD installs | benjamin79 | support.Games | 6 | 30 November 2002 21:14 |
|
|