Welcome, Guest. Please login or register.

Author Topic: Making ShapeShifter video drivers work with version 3.11 instead of 3.10  (Read 4964 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
I hacked the CardTrickEVD for 3.11 once. It involved looking for correct offset for 3.11 and poking it inside the EVD binary.

[EDIT] Let me look into my backups, maybe I still have the stuff about [/EDIT]
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Ok, it looks like I don't have the hack around anymore.

I can replicate it however, if someone sends me ShapeShifter 3.10 binary (I need to find the offsets from the previous version so I can find the matching ones from 3.11).

Ahh, found shape 3.10, no need to send. Ok, lets see how long it takes to remember all this stuff. :-)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Nah from the backups.

Anyhow, working on it.. Already half way done.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
It's rather complicated stuff. I need to patch the EVD so that it can runtime patch the 3.11 binary. I do this by examining what the EVD does against 3.10, and then applying the same for 3.11.

To give you some idea, here's some notes:

Here's the EVD checking for ShapeShifter 3.10 and then setting the offsets for various things:
Code: [Select]

                ...
.not3           move.l  (_returnaddr,pc),a0
                lea     ($194C,a0),a0
                cmp.w   #$4A39,(a0)
                bne.w   .not4
                cmp.w   #$6644,(6,a0)
                bne.w   .not4
                cmp.w   #$0C79,(8,a0)
                bne.w   .not4
                cmp.w   #$2079,($0012,a0)
                bne.w   .not4
                sub.l   #$00010EFE,a0
                cmp.l   #'.10 ',(a0)
                bne.b   .not4
                move.l  (_returnaddr,pc),a0
                sub.l   #$0000EA74,a0
                move.l  (a0),a0
                tst.l   (a0)
                bne.b   .ok
                move.w  #$FFFF,(_success)
                move.w  #310,(_version)
                move.l  #$0000194C,(_off1)
                move.l  #$00000010,(_off2)
                move.l  #$0000036E,(_off3)
                move.l  #$000000FC,(_off4)
                move.l  #$00000118,(_off5)
                move.l  #$00001ADC,(_off6)
                move.l  #$0000063A,(_off7)
                bra.b   .ok
                ...

From the offset usage I've determined what the things are inside ShapeShifter 3.10:
Code: [Select]

version:   $3a2a                    version in $VER string
retaddr:   $12fdc                   EVD lvo call return addr
func1:     retaddr + $194c = $14928 func1
verdelta:  func1 - $3a2a   = $10EFE ok
indptr:    retaddr - $ea74 = $4568  indirect ptr to value determining if func1 is called
func1bne:  func1 + $0010            bne inside func1
indcgxptr: func1 + $036e   = $14C96 indirect cgxbase ptr
off4:      retaddr + $00fc = $130D8 indirect openwindowtags taglist
off5:      retaddr + $0118 = $130F4 move.l #$408,d2 after openwindowtags
off6:      retaddr + $1adc = $14AB8 move.l (4,a0),a0 / move.l a0,a1
off7:      retaddr - $063a = $129A2 tst.l (abs).l

And then derived the same for ShapeShifter 3.11:
Code: [Select]

version:   $3a40
retaddr:   $13006
func1:     retaddr + $195C = $14962
verdelta:  func1 - $3a40 = $10F22
indptr:    retaddr - $EA7E = $4588
func1bne:  func1 + $0010
indcgxptr: func1 + $0370 = $14CD2
off4:      retaddr + $0102 = $13108
off5:      retaddr + $011E = $13124
off6:      retaddr + $1AEE = $14AF4
off7:      retaddr - $0640 = $129c6

...which will give us all the needed values and offsets to poke into the EVD.

Don't worry if you didn't understand that.

This stuff is highly specific to CardTrickEVD, and it isn't directly applicable for other EVDs. I doubt many of those need to patch ShapeShifter binary however...

[EDIT]

Now that I have the offsets needed, I'll go thru all of them yet again and see if I next correct offsets for each offset usage. If I do, I'll prepare a patched CardTrickEVD.

[/EDIT]
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Ok here goes: CardTrickEVD.bin

Notes:

- I replaced ShapeShifter 3.9 entry with 3.11 one. So this particular binary will not work with ShapeShifter 3.9 anymore.

- I didn't test it (I'm too lazy to set up ShapeShifter for UAE). Let me know if blitter acceleration doesn't appear to work with ShapeShifter 3.11.

- If I made a mistake it is likely that the system will crash. Be ready for this.

- Installation: Copy this file over the original CardTrickEVD in your ShapeShifter installation. It's a good idea to keep the old one around just in case I made a mistake.

- If it doesn't work I'll prolly have to delay fixing it (I guess in that case I need to build that ShapeShifter UAE thing after all.. :-D)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
@Flashlab

Oh coolness. Was this difference really visible or did you try some benchmark? (Just trying to rule out the 'blacebo effect' :-D)

As I remember it, the blitter support really made a difference and the speedup was quite visible. It has been a while though, so my memory might serve me wrong.

Anyhoo, since it appears to work I'll prepare a spatch for the thing.

[EDIT]

CardTrickEVD-SS-3.11.lha

[/EDIT]
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Quote
Oh Piru could you put ShapeShifter 3.10 also on your site?

I only have the main binary, so I wonder if that'd be of much use.

[EDIT]

But fear not, the 3.10 archive can be found from http://uae.is.free.fr/UAE-archives.htm

[/EDIT]
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Sure. It's slightly different code, but shares many things with the CardTrickEVD. Maybe during the weekend (it's quite time consuming work).
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Quote
mmh, i tried some esternal video driver with SS 3.11 and they work very well.

Some drivers patch the ShapeShifter binary for additional speed (but work slower if the binary can't be patched). Some don't even work unless if they can patch the binary.

What I'm doing here is to patch these drivers to work with ShapeShifter 3.11 that wasn't available at the time the drivers were written.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
@Flashlab
Quote
could you do the same thing to the PippinEVD driver Piru?

Give this a try: PippinEVD.bin

Again, the usual caveats apply. Let me know if it works.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
And the spatch version:

PippinEVD-SS-3.11.lha
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
@motorollin
Quote
I meant what is the point of the modification made by Piru since it seems to work fine in ShapeShifter 3.11 for me.

Read the CardTrickEVD.guide about "Blitter acceleration support"

For the lazy:
Quote
CardTrickEVD activates these acceleration routines as well. This requires applying a few run-time patches to ShapeShifter's code because the current EVD interface does not offer this feature yet. CardTrickEVD 1.2 supports the release versions 3.6 to 3.10 of ShapeShifter. Others will work too, but not be accelerated.

Note: ShapeShifter 3.11 doesn't have the acceleration with the original.

My patch enables the acceleration for 3.11 aswell.