Steem experiments with Visual C++ 2010 - DrCoolZic Build

A place to discuss current and future developments for STeem

Moderators: Mug UK, Steem Authors, Moderator Team

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1755
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem experiments with Visual C++ 2010 - DrCoolZic Build

Postby Steven Seagal » Thu Aug 27, 2015 8:14 pm

DrCoolZic wrote:This is what I did but stops with
error C1083: Cannot open include file: 'd3dx9core.h': No such file or directory
u:\projects\steemsse-code-399-trunk\steemsse\steem\code\display.decla.h 35 1 Steem

might be MSC_VER 2013 is 1800? 2015 is 1900


I think DX9 libraries were standard in VS2008.
You just need mentioned files. Maybe change:

Code: Select all

#if _MSC_VER == 1200 || defined(MINGW_BUILD) //mingw TODO?


Code: Select all

#if _MSC_VER == 1200 || _MSC_VER == 1900 || defined(MINGW_BUILD) //mingw TODO?


Yes definitively. I have read the description and it seems to be better than the one I use. :mrgreen:
I am having problem with my current DPLL: since I tweaked some parameters to read correctly Dungeon Master fuzzy tracks I now have problem with copylock tracks :(



Notice that Steem may have trouble with one version of Dungeon Master SCP (not the 5rev).
I'm not sure about this image.

Notice I just integrated it in Steem, without understanding the inner working.
The reference is in SSE.H

Code: Select all

#define SSE_WD1772_DPLL // code inspired by MAME/MESS (wd_fdc.c)


And I'd like to cite again the real author:

Code: Select all

/*  This is the correct algorithm for the WD1772 DPLL (digital phase-locked
    loop) system, as described in patent US 4808884 A.
    It allows us to read low-level (flux level) disk images such as SCP.
    Thx to Olivier Galibert for some inspiration, otherwise the code
    would be a real MESS, err, mess...
*/

Yes I have noticed the code in Steem but I would like to see the original in Mame, but I could not locate it.
would be nice if you remember from which file in MAME came your inspiration
I grabbed on Olivier Galibert but this guy wrote tons of code in MAME

I might rewrite from scratch based on patent but algo is complex.


Did you miss it:

Code: Select all

#define SSE_WD1772_DPLL // code inspired by MAME/MESS (wd_fdc.c)


wd_fdc.c
Don't repeat this ( :oops: ), but the algo in Steem is nearly a copy of it.
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm

User avatar
DrCoolZic
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2144
Joined: Mon Oct 03, 2005 7:03 pm
Location: France
Contact:

Re: Steem experiments with Visual C++ 2010 - DrCoolZic Build

Postby DrCoolZic » Thu Aug 27, 2015 8:50 pm

Steven Seagal wrote:
DrCoolZic wrote:This is what I did but stops with
error C1083: Cannot open include file: 'd3dx9core.h': No such file or directory
u:\projects\steemsse-code-399-trunk\steemsse\steem\code\display.decla.h 35 1 Steem

might be MSC_VER 2013 is 1800? 2015 is 1900


I think DX9 libraries were standard in VS2008.
You just need mentioned files. Maybe change:

Code: Select all

#if _MSC_VER == 1200 || defined(MINGW_BUILD) //mingw TODO?


Code: Select all

#if _MSC_VER == 1200 || _MSC_VER == 1900 || defined(MINGW_BUILD) //mingw TODO?



Error 659 error C2061: syntax error : identifier 'D3DCONTENTPROTECTIONCAPS' U:\Projects\steemsse-code-399-trunk\steemsse\3rdparty\d3d\d3d9.h 2661 1 Steem
???

User avatar
DrCoolZic
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2144
Joined: Mon Oct 03, 2005 7:03 pm
Location: France
Contact:

Re: Steem experiments with Visual C++ 2010 - DrCoolZic Build

Postby DrCoolZic » Thu Aug 27, 2015 8:56 pm

Steven Seagal wrote:wd_fdc.c

Got it!

I am analyzing the patent and I am not sure that this code implement the patent.4808884
It is close (as all dpll algorithm for fdc are) do but it actually looks as a compromise between the algorithm I am using and the patent 4808884

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1755
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem with Visual C++ 2010 - DrCoolZic Build

Postby Steven Seagal » Sun Jun 26, 2016 12:10 pm

DrCoolZic wrote:As provided the draw_c.cpp code does not compile because there are several macros like this one:

Code: Select all

#define OSD_DRAWPIXEL(c) *(((WORD*)dadd)++)=(WORD)c;


which expand to wrong code! It does not compile with error C2105 '++' needs l-value under VC++
This source may compile on some C++ compiler but it is wrong because this suppose that an intermediate variable is created and destroyed by the comp (not C++ compliant)
Here is an example of right and wrong:

Code: Select all

BYTE* dadd = 0;
WORD* tmp= (WORD*)dadd;
tmp++;  // OK
((WORD*)dadd)++ // Wrong error C2105

I have fixed the problem by changing the above macro with

Code: Select all

#define OSD_DRAWPIXEL(c) dadd_w=(WORD*)dadd;*(dadd_w++)=(WORD)c;dadd=(BYTE*)dadd_w;

Of course this also requires to add the dadd_w var declaration in the functions using this macro.

The problem is allover the place in draw_c.cpp and in in some cases it is less intuitive . for example

Code: Select all

#define DRAW_2_BORDER_PIXELS *(((DWORD*)(draw_dest_ad))++)=*(DWORD*)(PCpal);*(((DWORD*)(draw_dest_ad))++)=*(DWORD*)(PCpal);*(((DWORD*)(draw_dest_ad))++)=*(DWORD*)(PCpal);*(((DWORD*)(draw_dest_ad))++)=*(DWORD*)(PCpal);

needs to be replaced by

Code: Select all

#define DRAW_2_BORDER_PIXELS draw_dest_ad_dw=(DWORD*)draw_dest_ad; *(draw_dest_ad_w++)=*(DWORD*)(PCpal);*(draw_dest_ad_w++)=*(DWORD*)(PCpal);*(draw_dest_ad_w++)=*(DWORD*)(PCpal);*(draw_dest_ad_w++)=*(DWORD*)(PCpal);draw_dest_ad=(BYTE*)draw_dest_ad_w;



Long time no see this one...

Finally had a go at draw_c too, for a x64 build of Steem.
It's C code or x64 versions of Steem x86 routines, which is out of my league.
By definition, x64 processors are powerful enough to draw in C.
Had the same "l-value" problem, solved another way, without intermediate variable:

Code: Select all


#define OSD_DRAWPIXEL(c) *(((WORD*)dadd))=(WORD)c,dadd+=2;

instead of

#define OSD_DRAWPIXEL(c) *(((WORD*)dadd)++)=(WORD)c;



dadd being a BYTE pointer.

You copy the value, then you adjust the pointer by hand.
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm

User avatar
DrCoolZic
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2144
Joined: Mon Oct 03, 2005 7:03 pm
Location: France
Contact:

Re: Steem experiments with Visual C++ 2010 - DrCoolZic Build

Postby DrCoolZic » Mon Jun 27, 2016 12:37 pm

excellent. Thanks for the fix


Social Media

     

Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest