xboxscene.org forums

Pages: 1 ... 19 20 [21] 22 23 24

Author Topic: Mameox128 - Working Romset Project  (Read 2685 times)

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #300 on: April 25, 2008, 09:26:00 PM »

Hey Xyteam,

You're entitled to your opinions just as I am entitled to mine.  I know there are people who agree with both sides, so it is what it is.  You don't have the privelage of seeing things like BP taunting me in PMs about things such as his suprise that he put in the emu specifically for me.  I would think just the fact that he crippled it just to get under my skin would make it all pretty self evident.  He likes insulting me behind the scenes where I like keeping things public.  As for everyone being sick of this or whatever, I suggest they stop looking at the thread if it offends their delicate sensibilities.  As of writing this, the thread has 14,070 views since it's inception January 13th, so apparently there are a lot of people who enjoy punishing themselves.  

Take care...




BP... Let's be real man.  Everyone knows CoinOPS, Arcades, Platinum or whatever it will be called in the future is your baby, with or without your name on it.  That's a dead issue.  I'm glad you got people helping out with your side work, and the community will definately benefit from that, but that's all it is... it's side work.  The stuff you're too busy to do.  I know that nobody has the source but you, and that's what I'm referring to here.  I applaud you for learning a little bit about teamwork though regardless.

And you're right.  We will never be able to work together.  But just for the record, it is because bridges are burnt, not because there is too much water under the bridge.  If there were water under the bridge between us, we'd both be shaking hands now and working together.  

Regards,
~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #301 on: April 25, 2008, 09:48:00 PM »

I'll be releasing mine when it's something worth releasing.  I still have a lot of comlex controller fixes to do like the ones I've done for for The Tin Star and Arcade Classics and about 20 others that desparately needed them.  I just wrapped up purging 13MB of code from the emu for much faster build times and polishing all Titles, Manufacturers and Years for beautification of the GUI.  The main thing I want to do is get the 2 player alternating games working right before I release anything.  I'm about halfway there, but that's turning out to be a lot more complicated than I thought it would have been.  Not impossible, mind you, just very complicated.  Once I figure out how to keep all 2 player alternating games from flipping in cocktail mode, I will be making "Cocktail" mode the default mode for these games so they all work as if you were playing 2 players on the Nintendo.  It's kinda BS now how you have to press the 2nd player start button to start 2 players, but then you just throw the joystick back and forth between you when you die.

There are some people who already have, or are welcome to have what I have done up until this point.  But you can rest assured that I will release full source with my build and any subsequent builds as well, so feel free to have a blast when I do.... or don't.  That's freedom, ain't it?

Regards,
~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #302 on: April 25, 2008, 10:32:00 PM »

QUOTE
1239      PORT_DIPNAME(0x80, 0x80, DEF_STR( Cabinet ) )
 1240      PORT_DIPSETTING(   0x80, DEF_STR( Upright ) )
 1241      PORT_DIPSETTING(   0x00, DEF_STR( Cocktail ) )


to:

QUOTE
1239      PORT_DIPNAME(0x80, 0x00, DEF_STR( Cabinet ) )
 1240      PORT_DIPSETTING(   0x80, DEF_STR( Upright ) )
 1241      PORT_DIPSETTING(   0x00, DEF_STR( Cocktail ) )


Which is making the game then load directly into cocktail mode.  (All of these are slightly different, but it's the same principal for each one)

But, as we already know, when you do cocktail mode the second player is upside-down.  The problem I have at this point is that I apparently have not pinpointed the source of the screenflipping in the source code.  I have been able to comment out code in two spots in generic.c and the 3DRender driver which successfully fixed 1942, Black Tiger and all CPS1 games (I'm sure a lot more were fixed with this, but I don't really want to test more roms until I finish this fix in case I break something else in the process).

This also partially fixed all the games on the Bagman.c driver too when I commented out those two spots, but this made both players upside down.  It took me a while to figure out about the ROT270 function at the bottom of the driver.  That was put there because originally the rom needed to be rotated 270 degrees to display correctly and my editing out the code broke that.  I had to change the ROT270 to ROT90 and these games then worked perfect as well.  

QUOTE
GAME( 1982, bagman,   0,       bagman,  bagman,  0,        ROT270, "Valadon Automation", "Bagman", 0 )


QUOTE
GAME( 1982, bagman,   0,       bagman,  bagman,  0,        ROT90, "Valadon Automation", "Bagman", 0 )



Recently, I tried to comment out a line in the writemem section on the unfixed drivers that pertains to flipscreen:

QUOTE
AM_RANGE(0x5003, 0x5003) AM_MIRROR(0xaf38) AM_WRITE(pacman_flipscreen_w)


This code is a little different because I had to pull it from the new build on mamedev.org since I'm not at home now, but you get the idea.

This worked perfect for Mad Alien, but the weirdest thing happens on Mr Do, Pac-Man and all of the other games on those drivers. It keeps the background from flipping, such as the maze in Pac-Man, but all of the sprites are upside down as if cocktail mode was working like normal for them. It's the strangest thing to see the ghosts upside down in the maze and when Pac-Man goes down on the left side of the screen the dots are disappearing upwards on the right side of the screen. Same with Mr Do and all of the other games.  For the life of me I just can't figure out where the writemem code controlling the sprites is.  

If there is a single place, or a few that would fix all of these games though, that would be much better than messing around with writemem code for hundereds of games.  I'm open to any ides you've got, and I really hope that this dialogue can be kept up.

Regards,
~Rx
Logged

BritneysPAIRS

  • Archived User
  • Sr. Member
  • *
  • Posts: 394
Mameox128 - Working Romset Project
« Reply #303 on: April 25, 2008, 10:50:00 PM »

port->cocktail = (type & IPF_COCKTAIL) ? 1 : 0; that is the code that grabs the driver info for cocktail. You can then make it = 1 to make sure every game that calls  IPF_COCKTAIL is turned on. The way you are doing things will introduce bugs the screen roation code can be stopped in one place as well ill find it later. But it would mean rolling back all your changes they will bug it out.

the rotate code is in driver.h and search for ROT270 you will find the cases just disable them from rotationing just change them all from
#define   ROT0   0
#define   ROT90   (ORIENTATION_SWAP_XY|ORIENTATION_FLIP_X)   /* rotate clockwise 90 degrees */
#define   ROT180   (ORIENTATION_FLIP_X|ORIENTATION_FLIP_Y)      /* rotate 180 degrees */
#define   ROT270   (ORIENTATION_SWAP_XY|ORIENTATION_FLIP_Y)   /* rotate counter-clockwise 90 degrees */

to

#define   ROT0   0
#define   ROT90   0
#define   ROT180   0
#define   ROT270   0

just a quick guess id say that will stop it on all games.... once again no offense but you are actually introducing bugs with what your doing and it will take forever to do it that way. Plus you cant update your drivers without looking at all of this stuff. That will do it on any game now or any game added
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #304 on: April 25, 2008, 10:52:00 PM »

Oh, ok... gotcha.  That will definately save a lot of time.  Thanks.

Still gotta figure out how to disable the flipping on all the other games that my changes haven't effected, but that one little fix is nice to know.

Thanks BP,
~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #305 on: April 26, 2008, 12:11:00 AM »

QUOTE
the rotate code is in driver.h and search for ROT270 you will find the cases just disable them from rotationing just change them all from
#define   ROT0   0
#define   ROT90   (ORIENTATION_SWAP_XY|ORIENTATION_FLIP_X)   /* rotate clockwise 90 degrees */
#define   ROT180   (ORIENTATION_FLIP_X|ORIENTATION_FLIP_Y)      /* rotate 180 degrees */
#define   ROT270   (ORIENTATION_SWAP_XY|ORIENTATION_FLIP_Y)   /* rotate counter-clockwise 90 degrees */

to

#define   ROT0   0
#define   ROT90   0
#define   ROT180   0
#define   ROT270   0

just a quick guess id say that will stop it on all games.... once again no offense but you are actually introducing bugs with what your doing and it will take forever to do it that way. Plus you cant update your drivers without looking at all of this stuff. That will do it on any game now or any game added


Can't do it that way my friend.  Ekszbox and I have been talking about this for a few weeks and he already came up with that idea.  True, it will work on some or even most games, but it will render games such as Bagman unplayable because of the reason I put in the other post.  That game automatically calls a ROT270 because without it the game plays sideways.  I've also seen the ROT calls in the game drivers for other misc. games along the way.  We need to leave the rotate code in for that reason.  

My desire is to find the piece of code that says "Hey, when we put cocktail mode on, rotate the screen 180 degrees for the 2nd player".  I'm pretty sure there has to be something along those lines somewhere in the volumes of source.  I just haven't found it yet.  

Heh  see man... I'm thinking about the bugs.  I want every game to play right after I've made this change.  That's why I'm not really testing any games until I get the ones that I know aren't working to work right.  I won't do my final testing until I'm 99.9% sure that I won't be making any more major source changes.


Regards,
~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #306 on: April 26, 2008, 07:47:00 AM »

Heh.... that's great.  I didn't even think of just disabling the 180 and it feels dumb having never thought of it before with all the really complex ways I was going about doing it.  I guess I figured that if I did that there would be a lot of games not working.  Maybe there will be, but I don't recall too many ROT180s in the GAME code in the drivers and the code to fix the other games is probably a real easy step to do once you know which games need to be fixed.   It's gotta be easier than the weeks of trial and error I was going to go through doing this driver by driver.

That should probably fix 90-95% or more of the games in one step and I can probably re-add all of the code I've already commented out in genric.c and the 3DRenderer driver after doing whatever minor fixes I need to do to  get the last few games working.  

I'll give it a shot and let you know how it works BP.  I might be able to release a build and the source in a few weeks now.

Really man, thanks.  Don't know why we are, but I'm glad we're talking now,

~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #307 on: April 26, 2008, 09:25:00 AM »

(type & IPF_COCKTAIL)   ? 1 : 0;

to:
port->cocktail   = 1;

when that didn't work for me, I also tried changing it to:
port->cocktail   = 0;


Second, disabling flip by making it read "#define ROT180 0"....

/* monitor parameters to be used with the GAME() macro */
#define   ROT0   0
#define   ROT90   (ORIENTATION_SWAP_XY|ORIENTATION_FLIP_X)   /* rotate clockwise 90 degrees */
#define   ROT180   0
#define   ROT270   (ORIENTATION_SWAP_XY|ORIENTATION_FLIP_Y)   /* rotate counter-clockwise 90 degrees */

That part didn't work either.  This too might be because of previous changes that I'd have to roll out and I plan on trying that by earlier next week.

I'm wondering though where the code to use ROT190 is when it's 2nd player's turn.  I might be mistaken, but I'm thinking that this particular code is only used in the "Monitor" part on the GAME code lines in the game drivers:

#define GAME(YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME)

GAME( 1980, pacman,   puckman,  pacman,   pacman,   0,        ROT90,  "Namco", "Pac-Man" )

If that's the case, this particular fix won't work.  I'm going to try it on an unchanged build first and also mess aorund with those other settings you mentioned first and see what happens.

Later,
~Rx


EDIT:  I'll also just try cleaning the build and building it from scratch.  I've noticed that sometimes you have to do that to get a change in the code to take effect.
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #308 on: April 27, 2008, 08:58:00 PM »

Well... I still haven't figured out how to disable the screen flip or make cocktail default, but the spots you gave me BP have given me other leads that I'm working on.

I did however manage to remove the "Strongly Disliked" switch for the GUI within the source, so with a few more changes I can make it just regular games and Favorites.  I know you do that by other means yourself, but I don't know how you do it so this works for me.  I figure the 5 categories of Strongly Disliked, Disliked, Average, Liked and Favorite sucks anyways so I'm not hurting anything by removing this from the source, even if I figure out your way of doing it down the road.  

I'll let you know if I figure out the screenflip and cocktail mode thing.

~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #309 on: April 28, 2008, 08:09:00 AM »

Cool man.  I know you're busy.  I do appreciate your help.

I'm going to work on it a while longer and I'm right in the middle of doing quite a bit of testing on a few different things, so if I do end up needing the help I'd want to clean it up and back some things out before uploading it to you so there isn't other stuff getting in your way of fixing it up.  

I did manage to get about 30-40 more games working right with manipulating code for "flip_screen_x_set" and "flip_screen_y_set" with no apparent bugs introduced.  Commenting out code for them positively effected about 15-20 game drivers which used them in the hardware initilization.  The great thing is, it seems that when I do make a successful change for this project, many different game drivers are fixed, so this isn't an individual driver fix and shouldn't take a fraction of the time to finish and work out the bugs that I thought it would.

Unfortunately, the only immediate result of changing the ROT180 code was that it introduced UI bugs in the code so that a lot of the games displayed the UI OPTIONS upside down.  It looks to me like the only calls for ROT180 are in about 15 games in the MONITOR line of the games drivers, and the UI OPTIONS screen initializer.  So I have changed ROT180 back and am looking for other ways to fix the problem.

I'm still working on getting Cocktail mode to be default.  I believe the cocktail settings that you spoke of earlier might just effect controller input at this point.  I can't say for sure yet though, but unless I did it wrong, it doesn't make Cocktail default.  I only suspect that it is input because that particular code is found in  "inputport.c" and part of the line is "IPF_COCKTAIL" which is a common definition used in the input ports section on game drivers.

Thanks for offering to fix it.  I just might take you up on that offer if I can't get it working.  I'll let you know when I upload it.  

~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #310 on: April 29, 2008, 05:50:00 AM »

In the mean time BP, if you or anybody else have a free minute from what they're doing and want to try to figure out how to get Pac-Man to keep from flipping, either in the base MAME code or the pacman driver itself, that would be awesome.  If we can get Pac-Man to keep from flipping, that should take care of a ton more games, even if I have to do them all individually.  

Thanks either way,
~Rx
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #311 on: April 29, 2008, 06:47:00 AM »

Hey BP,

It pretty much would be one of various hacks I've had to do...

The problem is, I haven't been able to figure out exactly where the call to flip the screen in cocktail mode is.  I really don't think it's in just one place.  If it were, a switch to have it on or off wouldn't be a problem.  Like I said earlier, the ROT180 isn't the spot to do that, because it breaks the UI interface on a lot of games and since some games depend on the ROT180 from the beginning to display right, all of them are broken that way too.  Many of the other things I've tried that give some positive results end up breaking something else.  I think the problem here is that since there were so many people working on this in the beginning without any set rules to get a driver submitted, they call the flip-for-cocktail function a bunch of different ways.  That's why I only fix some of the games when I make a change.  I hear people are working on cleaning up drivers and making them work the same way in the newer builds.

For example, right now, I've figured out how to fix this by individually going into the writemem sections in the game drivers and commenting out lines that look like this:

//   AM_RANGE(0xa806, 0xa806) AM_WRITE(galaxian_flip_screen_x_w)
//   AM_RANGE(0xa807, 0xa807) AM_WRITE(galaxian_flip_screen_y_w)

Code similar to this seems to be in many of the drivers, so this should fix a lot, and since it's just effecting the individual driver/game it shouldn't break anything else external to it.

I've also considered that some people might want cocktail mode, but I really don't think it will be too many since this is a console emulator.  Your emu is great and since you guys are putting in arcade fixes they can just go with your emulator instead if they're putting it in a table.  My emu is just for people with an XBox who want to play a majority of the 2 player alternating games without having to throw the controller back and forth.

If there were another, easier way to do this, I would have done it but I just couldn't think of one.
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #312 on: April 29, 2008, 08:25:00 AM »

Nevermind.... that last fix does fix a few games, but I just tried it on Galaxian, and other galaxian type games, and even though it keeps the ship, enemies and background all in the right direction, the freakin' bullets you shoot and the enemies shoot come from the wrong side of the screen.  I have no clue where to fix that.

I don't know if I'm going to be able to do this, just because a lot of the code for flipping in MAME is so intertwined with other parts of the emu that you're almost sure to break something if you mess with it.   Damn.... I thought this was going to be a lot easier.

Oh well... even if I don't make anymore progress, I still fixed about 70 games doing this.
Logged

BritneysPAIRS

  • Archived User
  • Sr. Member
  • *
  • Posts: 394
Mameox128 - Working Romset Project
« Reply #313 on: April 29, 2008, 10:27:00 PM »

it is handled in one area...as I say the way your doing it will prob introduce issues as I can see many places the r180code r090etc are used in alsorts of stuff... you need to lock the rotation once the games initalised and turn on cab mode. I cant help you sorry any other way as the way you are doing stuff leaves alot of issues and the changes you mentioned will have bugs when you rotate the screen at present by looks
Logged

ressurectionx

  • Archived User
  • Hero Member
  • *
  • Posts: 2778
Mameox128 - Working Romset Project
« Reply #314 on: April 30, 2008, 04:53:00 AM »

Hey BP,

Nope... no issues on anything I've left in at this point.  I'm doing a lot of testing and if there are issues I back the change out.

Go ahead and try manipulating the code the way you're suggesting on one of your builds.  It doesn't work.

I'd love to find the one place that it does this, but I don't believe there is just one.  There are far too many different ways that the machines are set up.  Since the ability to flip in cocktail mode was present in each individual arcade originally, there are probably many different ways that it calls for that too, making it even harder to streamline them from one driver to another.  You can usually find a fix that will effect many drivers, but I haven't found the one that effects them all.  There is just too many variables, and they're tied in different ways.  As I said, if I mess with the ROT180 code like you originally said, it breaks the UI options for a lot of games among other problems.  The suggestion you gave to make Cocktail default didn't work at all either.

I'm willing to back out a lot of what I did, and I have the ability to do that if a single fix is found.  I just don't think it's possible, and I have tons and tons of hours messing with this now as evidence enough for myself that this isn't just a simple little fix like you're assuming it is.

Thanks
~Rx
Logged
Pages: 1 ... 19 20 [21] 22 23 24