Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DirectDrawSurface::Blt in MPlayer (Developers)

posted by sherpya(R), 07.04.2013, 08:49

I have a problem in emulated ddraw.dll, I'm unable to understand why but here some info for developers:

It happens by using directx video output and requesting full screen draw with -fs.
It doesn't switch resolution but instead it blits stretched.

I have a video file with resolution 640x480, the screen set in .ini is 1024x768x16

mplayer calls DirectDrawSurface::Blt()

HRESULT Blt(
LPRECT lpDestRect,
LPDIRECTDRAWSURFACE lpDDSrcSurface,
LPRECT lpSrcRect,
DWORD dwFlags,
LPDDBLTFX lpDDBltFx
);

g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx);

rd is 0,0,1024,768
g_lpddsBack = @02176030
ddbltfx is a just allocated struct but the flag is ignored

with debug enabled I get this trace (values in hex)
DirectDrawSurface::Blt, Dst=2175FBC pSF=28D0000 Rect=0 0 400 300 bpp=10 pitch=800

I've added this to debug the fill function, that is in a loop, the Blt code is in DDDRAW\SURFACE.ASM
at line 663 in version 2.17 (call lpfnCopyProc) that is assigned to proc16to16_11 (if you set bpp=16 in ini)

proc16to16_11: shr ecx, 1 ; rep movsd - esi:4031000 edi:28D0000
...
proc16to16_11: shr ecx, 1 ; rep movsd - esi:40C6100 edi:29BE800
proc16to16_11: shr ecx, 1 ; rep movsd - esi:40C6600 edi:29BF000
proc16to16_11: shr ecx, 1 ; rep movsd - esi:40C6B00 edi:29BF800
*** exception C0000005 EIP=2864809 EAX=800 EBX=2175FBC ECX=C0 EDX=500
ESI=40C7000 EDI=29BFD00 FS=E7 BaseFS=125000 FS:[0]=364304 arg[1]=40C7000

---
in hxstderr.log:

dkrnl32: exception C0000005, flags=0 occured at BF:2864809
ax=800 bx=2175FBC cx=C0 dx=500
si=40C7000 di=29BFD00 bp=325CD8 sp=325CAC
exception caused by access to memory address 40C7000
ip = Module 'ddraw.dll'+3809
[eip] = F3 A5 C3 60 68 F9 8C 86 02 FF 15 A8
[esp] = 00000000 00127100 00325AAC 00325AAC 00325A8C 0033FA86
dkrnl32: fatal exit!

Any help is greatly appreciated
Thanks

 

Complete thread:

Back to the forum
Board view  Mix view
15115 Postings in 1359 Threads, 249 registered users, 18 users online (0 registered, 18 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum