Manuel Alfayate Corchete

Results 532 comments of Manuel Alfayate Corchete

@EmperorPenguin18 The problem only happens with `v4l2m2m`. With `v4l2m2m-copy`, however, no frames are dropped. (In both cases, using `video-sync=display-resample`). Please try them both `v4l2m2m` and `v4l2m2m-copy` with `video-sync=display-resample` and you...

Use RetroArch, maybe? There's no reason for not using it.

@notaz: I am using the RetroArch core. You can reproduce it by jumping repeatedly. You will notice the jump audio effect differs between jumps, while it's uniform on Genesis Plus...

> This isn't actually true. Nintendo's artists stopped trying to compensate for the stretch after the NES. Every square and circle in lttp, smw, smetroid, only holds that shape at...

It seems that, according to RetroArch docs, gl_core requires GL 3.2+ or GLES3, so changing from OpenGL 3.2 to GLES 3.1 should be enough, and the Pi does support GLES...

More on this. I made this: https://github.com/snesrev/zelda3/blob/91d771ecc4532e4e40995b133edd9d82a39d61ac/opengl.c#L215 Into this: ``` void OpenGLRenderer_Create(struct RendererFuncs *funcs) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); ``` Commented out this: https://github.com/snesrev/zelda3/blob/91d771ecc4532e4e40995b133edd9d82a39d61ac/opengl.c#L45 Made this: https://github.com/snesrev/zelda3/blob/91d771ecc4532e4e40995b133edd9d82a39d61ac/opengl.c#L83 ..into...

Moving the context to GLES 3.1 seems to be causing some problem with glTexImage2D here: https://github.com/snesrev/zelda3/blob/91d771ecc4532e4e40995b133edd9d82a39d61ac/opengl.c#L185 In GDB, debugging `OpenGLRenderer_EndDraw()`, I can see this: ``` 187 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, g_draw_width,...

Oh, it seems that GLES's glTexImage2D() doesn't support the **GL_UNSIGNED_INT_8_8_8_8_REV** data type that is used on the screen buffer! :( https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml

Changing `GL_UNSIGNED_INT_8_8_8_8_REV` to `GL_UNSIGNED_BYTE` in **opengl.c**, the game works perfectly well on GLES 3.1 on the Raspberry Pi with shaders! Yay!

To prevent the GLSL shader compiler from complaining when compiling some shaders for GLES, I also had to change this: https://github.com/snesrev/zelda3/blob/91d771ecc4532e4e40995b133edd9d82a39d61ac/glsl_shader.c#L217 ..into this: `static const char kFragmentPrefix[] = "#define FRAGMENT\n#define...