PDA

View Full Version : WCW/NWO World Tour



Azimer
April 26th, 2002, 01:21
With so many working on graphics, I thought perhaps someone could give me a hand with a problem I have. I haven't gone to microcode yet for this game, but I had implemented some of the freaky functions that it requires. The real size of the screen is 480x240. Some of the polygons only on the wrestler models point to the center of the screen at 240,120 (or in this screenshot 240, 240 because I force a 1:3/4 aspect ratio which is an extra 120 pixels on the bottom of the image). My question... has anyone attempted to get this game working in their plugin and had problems with this rom image similar to the one I display? Off the top of my head, I would believe it to be a Matrix issue, but I have done a lot of Matrix fixing to make this game run. The clue that the polygons converge at a single point is very freaky... :) Not sure what else I can describe about the situation, except that ModifyVtx DOESN'T solve the problem. Infact, it doesn't seem to do anything. I even set the x/y screen coords to WAY off target and they still converged. Anyone?

Dave2001
April 26th, 2002, 10:03
Hmm... I haven't looked at that game yet, so I'm afraid I can't help with the triangle problem.

Maybe I can help you with the screen size problem though. I believe the answer is in the VI_X_SCALE and VI_Y_SCALE registers. Although I have not completely finished this stuff, most games seem to work with what I currently have (only two or so I know of that don't). Examine the contents of these registers on ViStatusUpdate or whatever the function is called and see for yourself what you can come up with.

Hope this helps :)

StrmnNrmn
April 29th, 2002, 04:36
Here's the code I'm using to correctly scale the screen. It seems to work well for everything I've tried. I hope the code tag works on this:



DWORD dwScaleX = *g_GraphicsInfo.xVI_X_SCALE_REG & 0xFFF;
DWORD dwScaleY = *g_GraphicsInfo.xVI_Y_SCALE_REG & 0xFFF;

float fScaleX = (float)dwScaleX / (1<<10);
float fScaleY = (float)dwScaleY / (1<<10);

DWORD dwHStartReg = *g_GraphicsInfo.xVI_H_START_REG;
DWORD dwVStartReg = *g_GraphicsInfo.xVI_V_START_REG;

u32 hstart = dwHStartReg >> 16;
u32 hend = dwHStartReg & 0xffff;
//DBGConsole_Msg( 0, "h start/end %d %d", hstart, hend ); // 128 725 - 597

u32 vstart = dwVStartReg >> 16;
u32 vend = dwVStartReg & 0xffff;
//DBGConsole_Msg( 0, "v start/end %d %d", vstart, vend ); // 56 501 - 445

mViWidth = (hend-hstart) * fScaleX;
mViHeight = ((vend-vstart)/2) * fScaleY; // /2 is because vertical is measured in half-lines

StrmnNrmn
April 29th, 2002, 15:27
Incidentally, you say you're updating the x/y and it has no effect, but what about the z? Maybe you've got a very high z, so that the perspective divide is movng the projected x/y to the origin? Just a thought!

Azimer
April 30th, 2002, 01:16
Great question, but I have an __asm int 3; located to break out when the Z coordinate is suppose to be modified. I don't believe this has an immediate effect. I suppose I will be looking more in to it as I complete my debugger. Thanks Dave2001 for some of your debugger ideas. I am sure some of mine will be handy for yourself as you get furthur into the development of Glide64. Thanks for replaying guys. :) I guess I should just fix the resolution right now while I can.