[Bug 28875] NullDC 1.0.4 (Dreamcast emulator) crashes when starting system (shader 'register' keyword used at global scope)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Mar 2 06:09:51 CST 2014


https://bugs.winehq.org/show_bug.cgi?id=28875

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |focht at gmx.net
            Summary|NullDC 1.0.4 r136: NullDC   |NullDC 1.0.4 (Dreamcast
                   |starts but graphics fail to |emulator) crashes when
                   |load.                       |starting system (shader
                   |                            |'register' keyword used at
                   |                            |global scope)
     Ever confirmed|0                           |1

--- Comment #4 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming.
Your crash was likely related to the d3d compiler stub at that time:

--- snip ---
fixme:d3dcompiler:D3DCompile data 0x1c6700, data_size 3215, filename
"vs_hlsl.fx", defines 0x1c61d0, include 0x2e3e650, entrypoint
"VertexShader_main",
target "vs_3_0", sflags 0, eflags 0, shader 0x2e3e860, error_messages 0x2e3e864
stub!
wine: Unhandled page fault on read access to 0x00000000 at address 0x1f380dd
(thread 0029), starting debugger...
--- snip ---

I got some DC BIOS files from here:
http://www.theisozone.com/downloads/dreamcast/emulators/nulldc-104-final-with-bios/

and put them into 'data' folder.

1) click 'start' in 'system' menu.
2) select 'no disk' -> crashes shortly after

--- snip ---
$ wine ./nullDC_Win32_Release-NoTrace.exe
...
shil generation status : 81% cpu done[149 of 182] , 100% fpu done[31 of 31]
Sh4 Init
Dynarec cache : size is 32.00MB
recSh4 Init
Sh4 Reset
recSh4 Reset
LoadFileToSh4Mem: can't load file "Z:\home\focht\Downloads\data\syscalls.bin"
to memory , file not found
LoadFileToSh4Mem: can't load file "Z:\home\focht\Downloads\data\IP.bin" to
memory , file not found
fixme:win:EnumDisplayDevicesW ((null),0,0x2cee3b0,0x00000000), stub!
Device Supports D24FS8
Device caps... VS : FFFE0300 ; PS : FFFF0300
Will use Float Z Buffering (D24FS8)
Will use Vertex Shaders
drkpvr: Initialising windowed  AA:0x0
drkpvr: Render target size 640x480
Using Vertex Shaders/vs_3_0
Using Pixel Shaders/ps_3_0
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
err:d3dcompiler:compile_shader HLSL shader parsing failed.
vs_hlsl.fx:44:22: error: syntax error, unexpected KW_REGISTER, expecting
VAR_IDENTIFIER or TYPE_IDENTIFIER or NEW_IDENTIFIER

wine: Unhandled page fault on read access to 0x00000000 at address 0x1da86cd
(thread 002b), starting debugger...
--- snip ---

This is the snippet of shader code:

--- snip ---
//Vertex Shader :)
//_HW_INT_ -> Intesity needs to be calculated , the factors are stored in z/w
of texcoords
//scale_type_1 -> use old way of scaling , needs W_min/W_max to have valid
values
//RES_X -> x resolution
//RES_Y -> y resolution
//ZBufferMode -> z buffer mode :p
//ZBufferMode : 0 -> fp fixup
//ZBufferMode : 1 -> nothing
//ZBufferMode : 2 -> non linear rescale
//ZBufferMode : 3 -> non linear rescale
//ZBufferMode : 4 -> linear rescale
//FixedFunction : 0 if ps, 1 if fixed function
#ifndef FLT_MIN
#define FLT_MIN 1.17549435e-38f
#endif

#ifndef FLT_MAX
#define FLT_MAX 3.40282347e+38f
#endif

struct vertex_in 
{ 
    float4 pos : POSITION; 
    float4 col : COLOR0;
    float4 spc : COLOR1; 
    float2 uv : TEXCOORD0; 
};

struct vertex_out
{ 
    float4 pos : POSITION; 

    #if FixedFunction == 1
        float4 col : COLOR0;
        float4 spc : COLOR1; 
        float4 uv : TEXCOORD0; 
    #else
        float4 uv : TEXCOORD0; 
        float4 col : TEXCOORD1;
        float4 spc : TEXCOORD2; 
    #endif
};

float W_min: register(c0);
float W_max: register(c1);
float4 res_scale: register(c2);
float4 texture_size:  register(c3);
float4 res_align_offset:  register(c4); //
float2((-1.0/res.x)-1.0,(1.0/res.y)+1.0);
--- snip ---

It doesn't like 'register' keyword here.
Refining summary.

MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd607359%28v=vs.85%29.aspx

$ sha1sum nullDC_104_r136.7z 
05e25f3d63904f8333aa10c4bb478ef97d4bac73  nullDC_104_r136.7z

$ du -sh nullDC_104_r136.7z
896K    nullDC_104_r136.7z

$ wine --version
wine-1.7.13-118-g0eb6265

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list