MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

ambhai
MAME Fan
Reged: 09/17/07
Posts: 5
Send PM


Color not correct? VcMame 0.105 Embedded in 3D app
#126675 - 09/28/07 01:39 AM


Due to lack of experience with gnu tools and lack of VS2005 project for latest mame. I decided to use old vcmame 0.105.

However I am not getting collect colors.
Here's a screen of midres.zip (Midnight Resistance)



NOTE: im using old Mame 0.105 version

To retrieve the game texture I inserted a callback inside
>> mame0105\src\windows\window.c
>> void win_update_video_window(mame_bitmap *bitmap, const rectangle *bounds, void *vector_dirty_pixels)

A memcpy is performed for copying texture data

-I tried both d3d and ddraw in mame
-I tried both formats in Ogre3d
PF_R5G6B5 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue.
PF_B5G6R5 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue
-A also see some big random blocks in rendered image not in original game.

But no difference. What possibly is wrong?



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: Color not correct? VcMame 0.105 Embedded in 3D app new [Re: ambhai]
#126852 - 09/30/07 02:33 AM


Keep in mind that MAME outputs different pixel formats per game. It can be 15-bit 0-5-5-5, 16-bit 5-6-5, or 24-bit 8-8-8. I gather from your screenshot that you're trying to consume MAME's 5-5-5 as 5-6-5. And if none of this makes sense to you, back away from what you're doing now.


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 40 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3323