Here is the patch thus far -- It is not clean or anything... (cvs -q diff - straight from my tree) --I think this patch will work and allow you to run specific ogl and d3d apps (with enough stack fudging see below)
--Here is an example of the stack fudging --Since this is too hard to add to all entry points... I did not bother doing it en mass (only for functions that were causing crashes for demos -- waiting for gcc goodness)
void WINAPI SomeApiEntryPoint() { //begin stack alignment asm("pushl 0(%ebp)");//save ebp` asm("movl %esp, 0(%ebp)");//hope that 0(%ebp) is not used in function //save esp -- ebp -> esp -> ebp` asm("subl %ebp, %esp");//calc n asm("addl %esp, %esp");//n*2 asm("addl %ebp, %esp");//n*2+esp asm("subl $0x10, %esp");//pad out stack asm("andl $0xFFFFFFF0, %esp");//align the stack //end stack alignment ... //body ... //begin stack restore asm("movl 0(%ebp), %esp");//restore esp -- ebp -> esp -> ebp` asm("popl 0(%ebp)");//restore ebp` + esp //end stack restore return; }
WEEEEEEEEE so fun
- Nick
Whow sorry about messing up the patch there guys... Serves me right for posting at 3am
In the future ill be a better citizen -- sorry again
- Nick
On Sun, 30 Apr 2006 14:26:17 -0700, Nick Burns wrote:
Whow sorry about messing up the patch there guys... Serves me right for posting at 3am
Heh, don't worry, I was suffering a bit of 3am syndrome myself last night it seems ...
thanks -mike