Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
39 user(s) are online (24 user(s) are browsing Forums)

Members: 0
Guests: 39

more...

Headlines




« 1 (2)


Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@Fredrik, Daniel
Yeah, thanks both of you! That works!


@Daniel
Quote:

You can comment in / out the first BEQ.W. If the behaviour doesn't change for sure then salass00's asumption that the coder falsely asumed that movea changes cc is likely to be correct.


Yeah, commented out, and nothing changes (i.e. same works as before, DSI gone).


@All
I found another 2 issues for now:

1. In the game itself, every 3 seconds, everything "pauses" for a little while, like maybe for half of a second. But that happens stable and in the menu, and in-game itself, it's like dbl-buffering issues or WaitTOF/something dunno.

Any ideas are welcome.

If it is related to that "null pointer crash" issue it is unclear, can be that this DSI hits because of another issue coming from somewhere, or that can be just an independent issue very well as well.


2. When we exit from preferences (that is another binary), we always crash.

Seeing information to the patches released for the game back in past, they have the same issue and it should be fixed in the patch applied, but it is still not. So seems there is some general bug with which they try to fix (and maybe fix for os3), but on OS4 we, as usual, can catch everything bad, and the bug seems still there.

A bug is not skippable and complete lockup. That bug happens to be there even 10 years ago on pretty older amigaos4 versions and on different hardware (at least on A1 and on Sam440 for sure) so that something with the code of the preferences 100%.


There are 2 logs of that crash:

1. With Petunia JIT enabled:

http://kas1e.mikendezign.com/aos4/68k ... _on_exit_with_petunia.txt

2. With Petunia JIT disabled via compatibility prefs:

http://kas1e.mikendezign.com/aos4/68k ... exit_petunia_disabled.txt

Crashes look 1:1 the same and crashed part also the same.

There are disassembled codes of the preference binary:

http://kas1e.mikendezign.com/aos4/68k_patches/Exodus/SetUp.asm

The crash is just a lockup, those logs i got from serial, so no luck for GR. So there is even no 68k stack trace as far as i can see.

I only can see that everything comes from intuition, and such hardcore lockups usually happen when one fucked up with Send/Recv IMSGs, etc or something.

Will try to trace all the intuition calls on OS3 to see what is called when we hit the close button.

But at least what is for sure, is that crash happens before CloseWindow() call (i already tried to put RTS before).

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@all
Tried to find roots of DSI when we exit from preferences.

Made a trace on os3 of all intuition and gadtools calls when we exit, there they are:

main loop:

 
gadtools GT_FilterIMsg
 gadtools 
GT_PostFilterIMsg
 gadtools 
GT_FilterIMsg
 gadtools 
GT_PostFilterIMsg
 gadtools 
GT_FilterIMsg
 gadtools 
GT_PostFilterIMsg

next we press close gadget or hit cancel button and then:

 
intuition UnlockPubScreen
 intuition 
ClearMenuStrip
 intuition 
ModifyIDCMP
 intuition 
BeginRefresh
 intuition 
GetScreenDrawInfo
 intuition 
FreeScreenDrawInfo
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
PrintIText
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
EndRefresh
 intuition 
PrintIText
 intuition 
GetScreenDrawInfo
 intuition 
FreeScreenDrawInfo
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetScreenDrawInfo
 intuition 
FreeScreenDrawInfo
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
PrintIText
 intuition 
PrintIText
 intuition 
PrintIText
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
GetAttr
 intuition 
DrawImageState
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject

; if put "RTS" or "illegal access" for DIS before CloseWindow we still crashso it happens before

 intuition 
CloseWindow
 intuition 
DisposeObject
 intuition 
FreeScreenDrawInfo
 gadtools 
FreeVisualInfo
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 intuition 
DisposeObject
 gadtools 
FreeGadgets


I already tried to put RTS and/or "illegal access" to swap DSI right before CloseWindow, and it still fails the same even doesn't come to my DSI.


Then i tried to put it right before Unlock to produce DSI, just like this:

LAB_003E:

;
call for skippable DSI
    TST
.B $aaaaaaaa
    
    MOVE
.L    -32592(A5),D0        ;1daa202d80b0
    MOVE
.L    D0,-(A7)        ;1dae2f00
    MOVE
.L    -32696(A5),D0        ;1db0202d8048
    MOVE
.L    D0,-(A7)        ;1db42f00
    MOVEA
.L    (A7)+,A1        ;1db6225f
    MOVEA
.L    (A7)+,A0        ;1db8205f
    MOVEA
.L    -32744(A5),A6        ;1dba2c6d8018
    JSR    
-516(A6)        ;1dbe4eaefdfc
    JSR    LAB_03E5        
;1dc24eb90000c28e
LAB_003F
:



And still the same freeze, and I can't see my DSI...

Of course, binary also uses dos.library and exec.library, but it just feels like freeze happens exactly when we are about to break the main loop. It's like window settings done in some wrong way, which only arise when we about to close window.


Edited by kas1e on 2022/1/14 14:02:46
Edited by kas1e on 2022/1/14 14:04:25
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Quite a regular
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 680
@kas1e

About prefs, is there a way to know what "format"/layout/struct the prefs file has?
So maybe an updated ReAction prefs GUI can be made.

   Report Go to top

Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@jabirulo
Yeah, the prefs file is a small one, and the format file is not a big one too.

I thought about writing prefs too before, but that can take more time IMHO in comparison with just one bug fixed. But if there will be no luck, then yep...


edit: their prefs real buggy, when I just press RMB (as they have an RMB menu too for some options), and navigate through the menu, it just freezes the same as when I hit close/chancel/etc. So seems their whole main loop broken


Edited by kas1e on 2022/1/14 15:05:19
Edited by kas1e on 2022/1/14 15:08:13
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@All
So after Javier offers help to write reaction-based preference for Exodus so it will be not only without bugs but will not be that weird in all areas as original, i just reparse prefs format of exodus and there is (just for reference purposes later):

Quote:

32 bytes : name of cdda device
1 byte : unit # of cdda device
1 byte : language : 0 : poland, 1 : english, 2 : deutch
1 byte : game screen : 0 : lowres 1 : hires
1 byte : GfxDirect : 1 enabled , 0: disabled
1 bytes : PlayCD : 1 enabled, 0 : disabled
1 byte : Use Paula : 1 enabled, 0: disabled
4 bytes : screenmode ID 1 (for playing movies, 320x240)
4 bytes : screenmode ID 2 (for a game, 640x480)
1 byte : task priority (slider from -15 to +15)
1 byte : skip anim, 1 : enabled, 0 : disabled
32 bytes : name of null-modem device
4 bytes : baud rate of null-modem device (slider, from 9200 to 115200)
1 byte : unit number for null modem
1 byte : Force Intuition Mouse Pointer: 1 enabled, 0 : disabled.
2 bytes : 00 00 reserved?



So probably with Prefs we can chill out and concentrate instead on the Game's bugs.

Imho at this point, we need to deal with that "pause every 3 seconds bug".



_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@All
Some good findings of the "pause" bug.

Once I disable music (that one which plays from CD-Audio), then NO pause.

I.e.
just sound effects: no pauses
sounds effects + music: pauses
just music: pauses

For sake of tests, i do that: disable music from the game, keep on sound effects, switch back to the workbench, run playCDDA, and start to play the exact same track from exactly the same place. Back to the game, and while having the same sound+music, have no pauses!

That means their Cd-Audio player suck. Or it doing something weird our cdplayer.library/cddapatch do not support.

@Frederik
Maybe you as an expert and author of cdplayer/cddpatch have any idea what it can be, and where to look? I.e. what functions, etc to see their cd player code in disassembly.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@all
So asked on EAB 68k coders what were used back in times for playing CD-Audio, and seems there were just 2 ways: one was cdplayer.library and another way was direct play over SCSI device via DoIo/IoReq/etc, by using HD_SCSICMD and sending a "PLAY AUDIO" command.

So far Napalm and WipeOUT use cdplayer.library : those ones ok.

Other games probably use "direct way", and while for example Foundation, Payback and Exodus do work via our CDDAPatch. Games as Earth2140 and Heretic2 fail for some reason to work with our current CDDAPatch (through Earth2140 says that CD audio initialized OK, but then in-game we have no list of tracks).

Anyway, long story short, in Exodus we need to understand if they indeed use HD_SCSICMD and "Play Audio" command to play audio CD tracks, and once we found what way was used, we may move further with bug-fix.

Reading SCSI list of commands i found that there is not only "PLAY AUDIO(10) (code: 0x45)" but also "PLAY AUDIO MSF (code: 0x47) and also "PLAY AUDIO 12 (code: 0xA5). Which ones are used in Exodus dunno at the moment. The length of the commands also can be different...

So will try now at first to find the filling of the IOStdReq structure with HD_SCSICMD, and then if so, what kind of commands it uses. That at least should bring us to their audio-cd-player's code.


EDIT: find out, Exodus indeed use HD_SCSICMD:


LAB_092B:
    
MOVEA.L    8(A4),A1        ;15fc8226c0008
    MOVE
.L    #$0000001e,36(A1)    ;15fcc: 237c0000001e0024
    
LEA    0(A3),A0        ;15fd441eb0000
    MOVE
.L    A0,40(A1)        ;15fd823480028
    MOVE
.W    #$001c,28(A1)        ;15fdc: 337c001c001c
    
MOVE.L    1536(A3),0(A0)        ;15fe2216b06000000
    MOVE
.L    1540(A3),4(A0)        ;15fe8216b06040004
    MOVE
.W    #$0000,28(A0)        ;15fee: 317c0000001c
    
LEA    30(A3),A1        ;15ff443eb001e

    MOVE
.L    A1,22(A0)        ;15ff821490016
    MOVE
.L    1544(A3),12(A0)        ;15ffc216b0608000c
    MOVE
.W    1548(A3),16(A0)        ;16002316b060c0010
    MOVE
.B    #$03,20(A0)        ;16008: 117c00030014
    
MOVEA.L    8(A4),A1        ;1600e226c0008
    MOVEA
.L    ABSEXECBASE,A6        ;160122c7900000004
    JSR    
-456(A6)        ;160184eaefe38
    
    MOVE
.B    31(A1),D5        ;1601c1a29001f
    RTS                
;160204e75



See, -456 is DoIO, all the previous MOVE it's about filling Req struct. For example part starts at "MOVE.W #$001c,28(A1)" is "req->io_Command = HD_SCSICMD;" Now need to find a place where UBYTE struct for command placed, and we can find what command is used, and then based on this can think wtf.



Edited by kas1e on 2022/1/15 21:22:41
Edited by kas1e on 2022/1/15 21:27:27
Edited by kas1e on 2022/1/15 21:36:46
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7284
@all
In the meantime wip of new prefs for Exodus by Javier:

Resized Image

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Exodus The Last War patching : work in progress
Just popping in
Joined:
2007/1/10 21:56
From Stockholm Sweden
Posts: 202
@kas1e @javier(jabirulo?)

Great progress!
Keep on hacking!

_________________
1989-> A500, A600, A3000, A4000, A1200, CD32, µA1, PegII, A1XE, CDTV, Amy/416D79, A1X5000, Vampire 500 V2+, Vampire 600 V2, Amy-ITX<-2021
   Report Go to top


« 1 (2)



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project