diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-21 12:20:26 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-21 12:20:26 +0200 |
| commit | fb4f5809224913b342c5cfae9c91787faa61eed4 (patch) | |
| tree | f965a9dede1133dec21f5937579bdd8f36aede08 /src/emu | |
| parent | 15842f3464decd5d5c0809f394cf48af908fa454 (diff) | |
| download | box64-fb4f5809224913b342c5cfae9c91787faa61eed4.tar.gz box64-fb4f5809224913b342c5cfae9c91787faa61eed4.zip | |
[BOX32] Added some more 32bits wrapped functions (Chicken Invaders 3 works, but need SDL12COMPAT_OPENGL_SCALING=0)
Diffstat (limited to 'src/emu')
| -rwxr-xr-x | src/emu/x86int3.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index f9f72a76..ca7b4fac 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -99,8 +99,14 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff, 256, "%s", " ... "); } } else - if(strstr(s, "SDL_RWFromFile")==s || strstr(s, "SDL_RWFromFile")==s) { + if(strstr(s, "SDL_PollEvent")==s) { + snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); + pu8 = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)); + post = 10; + } else if(strstr(s, "SDL_RWFromFile")==s || strstr(s, "SDL_RWFromFile")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%s, %s)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); + } else if(strstr(s, "SDL_WarpMouse")==s) { + snprintf(buff, 255, "%04d|%p: Calling %s(%hd, %hd)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(uint16_t*)from_ptr(R_ESP+4), *(uint16_t*)from_ptr(R_ESP+8)); } else if(strstr(s, "glColor4f")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f, %f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8), *(float*)from_ptr(R_ESP+12), *(float*)from_ptr(R_ESP+16)); } else if(strstr(s, "glTexCoord2f")==s) { @@ -371,6 +377,15 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) case 8: if(!R_EAX) snprintf(buff2, 63, " [%p]", from_ptrv(*pu32)); break; case 9: if(errno) snprintf(buff2, 63, " (errno=%d/\"%s\")", errno, strerror(errno)); else snprintf(buff2, 63, " (errno=0)"); break; break; + case 10: if(R_EAX) + switch(*pu8) { + case 4: + snprintf(buff2, 63, " [type=%hhd, x=%hd, y=%hd, relx=%+hd, rely=%+hd]", *pu8, *(uint16_t*)(pu8+4), *(uint16_t*)(pu8+6), *(int16_t*)(pu8+8), *(int16_t*)(pu8+10)); + break; + default: + snprintf(buff2, 63, " [type=%hhd]", *pu8); + } + break; } if(perr==1 && ((int)R_EAX)<0) |