Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Single Joystick control of Defender and Battlezone (patch), ROTJ mouse patch...  (Read 17550 times)

0 Members and 1 Guest are viewing this topic.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
For those who want the option, here is a patch that lets you select to control Defender and Battlezone from a single joystick.  Feel free to use the patch in any build you want.

It is based on the old code removed from MAME.  Updated to new standards and selectable between Real/8-way in the Driver Config menu.

Have fun.

(edit) fixed patch so other williams games do not crash.
« Last Edit: January 25, 2011, 09:49:12 pm by Derrick Renaud »

iano

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:June 15, 2011, 03:39:11 pm
Re: Single Joystick control of Defender and Battlezone (patch)
« Reply #1 on: January 24, 2011, 11:54:25 pm »
Thank you.
:)

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: Single Joystick control of Defender and Battlezone (patch)
« Reply #2 on: January 25, 2011, 08:28:06 am »
Oops looks like the defender patch breaks the other williams games.  I'll try to fix it in the next day or 2.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: Single Joystick control of Defender and Battlezone (patch)
« Reply #3 on: January 25, 2011, 08:07:36 pm »
Fixed.  See first post.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Here is a patch to allow selection of trackball/mouse control in Return of the Jedi.

Moving the trackball up is moving the player forward in his POV, so that means to the up right on screen.

Not sure if it is worth it to do a code rotate of the controls 45 degrees.  I don't even like the game, but this is the start of making it playable with my mouse.

(edit) I added a third option that rotates the trackball 45 degrees.  So you move the trackball to the top right to move the player forward towards the top right of the screen.  I have not tested it much, because I suck at the game.

You probably will want to play with the sensitivity.  I use 200%.
« Last Edit: January 26, 2011, 11:13:17 am by Derrick Renaud »

DARRAT

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 14, 2012, 03:52:33 am
Does the def_bz.diff work with 141 or only specific versions?  Tried this earlier, had to run it through todos.exe first, but ended-up with an error.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Does the def_bz.diff work with 141 or only specific versions?  Tried this earlier, had to run it through todos.exe first, but ended-up with an error.

They are based on the latest source 141u1.  They should work for a few versions back, but I am not sure how far.  Sorry, but I can only work/code with the latest source.  I used tortisesvn to create it if that helps.
« Last Edit: January 28, 2011, 01:09:52 pm by Derrick Renaud »

DARRAT

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 14, 2012, 03:52:33 am
Thanks for the reply.  Will give it another go.

update: compiled successfully.  Got my brand-new sparkling mame.exe.  Will test it out tonight,

Works great.  Thanks.  Unfortunately, have discovered that 141u1 breaks the sound on a few games.  This of course has nothing to do with the defnder diff.
« Last Edit: February 05, 2011, 03:26:31 am by DARRAT »

mst3kpimp

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:May 04, 2012, 01:36:05 am
ok I'm dumb, where i put these files and what do i do after that?

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
You have to patch MAME.
-Banned-

frl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:December 11, 2016, 07:20:35 am
Sorry for ressurecting such an old thread...  I thought I'd share this in case anyone is interested.  I updated Derrick's patch to work with 151.  Seems to do the required job on both Defender and Battlezone.

I noticed 152 was released today - it applies okay to that version but I haven't tested a compiled build yet.

Cheers,
Chris

specfire

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 127
  • Last login:April 23, 2016, 10:39:09 pm
  • Shhh...
Thank you frl !!!

This is fantastic.  In fact, I was trying to implement either mame v.84 (the last version with hacked defender controls) or try to use the v.127 patch from this thread http://forum.arcadecontrols.com/index.php?topic=83571.0, but I could not get the hacked controls for either version to function.

From this thread, I have not been able to successfully patch v.141 using Derrick's patch file.

Your patch worked first try.  Now I finally have a chance to get beyond the second or third wave.

Thanks again! 
« Last Edit: January 11, 2014, 11:22:44 pm by specfire »
Read to your kids, you'll all be better for it.

specfire

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 127
  • Last login:April 23, 2016, 10:39:09 pm
  • Shhh...
For anyone interested, this patch does not remove any function of the actual driver, it just adds the option of using an 8-way joystick, however, the original controls remain the default.

I had a look at the v.127 diff patch from TheShanMan linked one post up to see if I could figure out how to add STARGATE to the patch for v.151 on this forum post, however, no luck so far.

Does anyone think this could be easily done?  Were there many williams.c driver changes between v.127 and v.152?

Thanks,

John
Read to your kids, you'll all be better for it.

frl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:December 11, 2016, 07:20:35 am
In case anyone is interested, it looks like my update to Derrick's original patch is going to be a non starter on v153.

The change below has removed the functions that the patch uses and I think figuring out another way of doing it is going to be well beyond my basic hacking attempts!  I'll give it a go but I'm not confident.  If anyone else wants to take a crack at it, I sure would appreciate it.

For now, anyone wanting this patch should stick with v152, at least for Defender and Battlezone.

-Converted PIA6821 to DEVCB2, Removed
 porta_r/portb_r/ca1_r/ca2_r/cb1_r/cb2_r functions as they only returned
 what you'd written to the chip, only a couple of those were ever used
 (by audio/exidy.c). Removed some ca*/cb* read callbacks that just
 returned what had already been pushed or always returned 0. As there
 are no longer any cb2 read callbacks that functionality has been
 removed. reduced the number of callers to set_a_input by calling
 porta_w & made the WRITE8_HANDLER call that as well, instead of the
 other way round and having to lookup an address space that is never
 used [smf]

frl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:December 11, 2016, 07:20:35 am
Seems I jumped the gun - working patch for v153 attached :)

Seems to work fine on both Defender and Battlezone.

Cheers,
Chris

D_BIZZZZ

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:August 16, 2015, 05:51:29 am
  • I want to build my own arcade controls!
Apologies for messaging on a very old topic, but I love this patch and oddly have only just discovered it,
I can finally play one of my favorites on my 3 button and also get my kids involved how to play it.

Unfortunately on my arcade cab I run MAME 0.124 ,, but none of the patches here work.
I don't want to use mame version over 0.124 because that knocks out the resolution for games like frogger

Would anyone care to share a 0.124 patch for defender controls, or could you tell me what I would need to do to get it to work on 0.124
is it just a case of modifying a couple of lines on the williams.c

any help is most appreciated

Thanks
DB

D_BIZZZZ

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:August 16, 2015, 05:51:29 am
  • I want to build my own arcade controls!
Actually v0.146 with cabmame frogger.diff works really well for me too ...

don't suppose anyone could provide instructions how to apply the defender controller hack ?

Mordwaffe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:February 23, 2015, 03:34:44 pm
  • I want to build my own arcade controls!
Is there a 155 version of this patch yet?

frl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:December 11, 2016, 07:20:35 am
Sorry, I don't check this topic very often, I should really setup a notification or something...

Here's a 155 version of the patch - I haven't tested it extensively so YMMV.  It seems to do the job though.

D_BIZZZZ - the MAME source has changed extensively in the areas this patch changes since 124 (or even 146)... it wouldn't be easy (for me at any rate!) to rework this for an older version.  Have you considered using your front end (I assume you use one) to fire up a more recent version of MAME specifically when you launch Defender?

Cheers,
Chris

Mordwaffe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:February 23, 2015, 03:34:44 pm
  • I want to build my own arcade controls!
Thanks for the update. I appreciate the effort in doing this.

Edit: as for the fronted, i am still working that part of my build and have not settled on which one i plan on using, and yes i think i may end up doing multiple mame versions for oddball support here ad there.

« Last Edit: November 10, 2014, 11:57:41 am by Mordwaffe »

frl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:December 11, 2016, 07:20:35 am
A long time ago, specfire asked me if I'd look at updating this patch to give Stargate the same selectable control scheme that Defender has.  I've finally got around to doing this (thanks for being patient specfire!) and in the process made another few improvements.  Here's a changelog...

1) Added 8-way controller support for Stargate (works in the same way as Defender, selectable from in-game menu)
2) Patch updated for v162 source
3) Removed crashes that were happening in Colony 7, Mayday and Jin with the patch applied.

It hasn't had a huge amount of testing yet but should be fine, the core hasn't really changed much.

Cheers,
Chris

specfire

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 127
  • Last login:April 23, 2016, 10:39:09 pm
  • Shhh...
Hi frl,

Thanks for your awesome work.

These control options make Defender and Stargate accessible for those that don't have the proper control panel layout, and are frankly, just more intuitive.  Also, Williams went to this style control layout with the 1991 successor/sequel Strike Force.  Even if you are a purist, the controls are an optional setup.  The original control configuration is maintained as well, user selectable under the "Tab" menu.

Read to your kids, you'll all be better for it.

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4098
  • Last login:May 12, 2024, 06:16:00 am
  • NOM NOM NOM
Hi frl,

Thanks for your awesome work.

These control options make Defender and Stargate accessible for those that don't have the proper control panel layout, and are frankly, just more intuitive.  Also, Williams went to this style control layout with the 1991 successor/sequel Strike Force.  Even if you are a purist, the controls are an optional setup.  The original control configuration is maintained as well, user selectable under the "Tab" menu.

The successor stinks.  Isnt 1/10th as intense.

 Defender, is almost impossible as it is...  but without the proper controls, forget about it.

specfire

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 127
  • Last login:April 23, 2016, 10:39:09 pm
  • Shhh...
:)  You're right about Strike Force being lousy.  I just mentioned that the control schema for Strike Force used this very control schema.

Also, Defender was not a game that the developers deliberated over during it's design, it was being programmed right up to a few hours before the AMOA, right on the show floor!  The controls they chose worked, so that was probably enough for them since they were under such tight time pressure to complete the game.  I suspect they didn't spend too much time deliberating such nuances as to what control scheme would be "better."

I get that you are a purist and that's cool, in fact, I play Defender both ways, I just find that I can get way farther into the game with the modified controls and I enjoy the game more that way. 

What is awesome about this patch is that both control options are available, this new one is purely optional.  That way, you can have the option, for friends maybe if not for yourself, to make the game more accessible.

Finally, it doesn't change the game, it just incorporates reverse and thrust into the joystick that the player has to hold onto anyway.

Happy playing!
Read to your kids, you'll all be better for it.

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4098
  • Last login:May 12, 2024, 06:16:00 am
  • NOM NOM NOM
Quote
Also, Defender was not a game that the developers deliberated over during it's design, it was being programmed right up to a few hours before the AMOA, right on the show floor!  The controls they chose worked, so that was probably enough for them since they were under such tight time pressure to complete the game.  I suspect they didn't spend too much time deliberating such nuances as to what control scheme would be "better."

That simply is not true.

 While a game may have been programmed right up until its release... that has NO bearing on how much thought and testing went into the controls and playability.   In fact, its more likely that the control scheme was designed first, and after the main gameplay was established, the majority of that time that went into the game... was merely on the actual games difficulty ramp and balance.    Thats typically how the classics were programmed.

 They didnt have to spend months on graphics looks... because the hardware was extremely limited.   So what did the programmers spend all that time doing?   Trying to compress the software as small as possible, to eek out as much memory and performance as they could get.   The rest of the time, it was to establish a near perfect difficulty ramp.

 You see, unlike the "Continue" style games...   The arcade games were far different.   If the players got too good, too quickly... they could spend 20 minutes, to several hours... on a machine.   This was a real problem with Operators... because they wouldnt make good money that way.  They would complain to the MFG,  and either return the game, and or never buy a game from that company again.   

 While yes... even the classics have people whom can and did master games to a level where they could be played for hours or days at a time...  That level of skill took a LOT of money worth of practice to get that good.    So long as the difficulty ramp was balanced deep enough, spanning many levels deep... it would allow the Ops to get good return on their machines.    And that level balance was usually so good... that only a small percentage would invest that much effort to be able to rock a machine for such long spans.  And by that time... the game was probably getting pushed into the corner, where a new game was now taking its prime spot.


 As for the reasons of the controls being so different...   thats a lot of explaining, but its a good example... so here goes...

 First, you could say that Robotrons controls would be more Intuitive, if you only used One joystick right?  Fire whichever direction you are facing.   However, try it in Mame this way... and you can quickly see the reason why its NOT good to do this.  You need to be moving away from the enemy as you fire... or you will quickly get over-run by masses of enemies.

 The more controls you have to work with... the more actual Control you get over the game.


 Now, I will break down each control and the reasons for them:

1) Fire Button

 If you didnt already know, theres a MASSIVE difference between a real classic arcade Leaf-switch button, and a modern Microswitch button.

 The main difference, is that the Microswitch has a very long throw distance, from start-position to depress, then to full Reset.  We are talking something like 3mm each direction, so a total of 6mm of full travel on each press.   Furthermore, the type of spring system used on them... is very strong at the start gate.  This causes you to use a good deal of physical pressure to overcome it.. for it to then Snap down to its contact points.  This force does not seen like a big deal if you are playing a game which used limited fire... but when you try to play a rapidfire game... such as Galaga, (Hallys Comet is an even better example)  you will see how your hands/fingers get tired.. quite quickly.

 A Leaf switch is completely different, in that the spring force is mild and increases as you depress... rather than the Micros set full force.   There is no buildup of pressure, and you can simply bounce or even "Vibrate" the button, with ease... much like bouncing on a trampoline.  Its smooth, near effortless.

 Because the contacts on a leaf can be a literal onion skin apart, you can vibrate or what they term as "Float", the contacts on and off with almost no vertical distance moved.   In this manor, you can fire like 10 times faster, and maintain this insane rate, for minutes or hours... without fatigue.     Try this with Halleys comet on a microswitch, firing as fast as you possibly can... and you will probably burn out in 3min of play... if that.

***  So... Why use a Thrust Button instead of a the stick???  (in two variants)

 A)  Instead of a Leaf-Based-Joystick?

 Leaf sticks are quite sensitive, but the main fact is... is that if you are trying to be very accurate with your vertical movements.. your speed control is going to suffer if you try to lump it into the direction system.   This is the Robotron style of example I stated before.

 Another example of this.. is trying to play a game like OutRun, where you have to press Up for Gas, and Down for brake.  What will happen when you try to curve?   It can be too easy to accidentally not press diagonal, and you will lose speed.  And if you had to brake suddenly in that turn... it would be too long a throw... and again, also... you might accidentally just press straight down... and not diagonally down... and so not move completely away from a car impact.. and or to keep from skidding off the road.

B)   Instead of a Microswitch-Based-Joystick?

 Microswitch sticks require about 6 times the travel distance, until the activation is achieved.   Its even slower in reaction time, to a microswitch button... due to the mechanics of the shaft.  As such, your reaction times and throttle control will be Butchered.   In addition, again, we have the same problem with greater fatigue, less precise speed control, and accidentals.


 * The main reason... pretty much Period. is far Superior speed control.   Much like in Asteroids.  You can activate the tinyest and quickest little bursts of thrusts.   This just is never gong to be even close to possible, using a joystick.

2)  Why a Reverse Button???

 So, much like Asteroids... we have a Thrust button in Defender.  Because its leaf based... you can have the shortest of micro-bursts... and get incredible precision and accuracy...   What can we do about turning around?

 If you tie the stick into activating Reverse...  its not only more CPU Cycle slower and require more program code (memory), but more importantly... you really cant afford to Accidentally reverse in the Heat of a battle.   Instinctively... if you were pressing forwards for thrust... you probably are going to thoughtlessly press backwards to Slow down...  but thats not how the game works.    You could make a game like that...  but there would be a complete gameplay implosion as a result.

 You see... if you press back to slow down.. you could make the game auto-turn-around after a certain timeframe / speed.  But that is making an Assumption... one that might Kill the player, and INFURIATE him in the process.

 So... either method here.. can result in loss of control, and angered players.

 The reverse button Guarantees that the player actually really wants / needs to reverse at that particular moment of time... and that there is no possibility of accidentally pressing backwards, on the heat of battle.   It also focuses on keeping the players Vertical movements far more precise.

3)  Why a 2-Way Leaf stick?

  The Defender stick is a very special beast.  One thing you notice... is that the balltop controller is a Lot lower than most stick controls.  Why?  Because it allows for quicker reaction times.. as there is less physical travel needed.

 Additionally, the stick does not have much of a deadzone... and activation of the leafs is very quick and precise.

 Using a typical microswitch stick.. and you are going to have to travel about 6 times the distances, for example. going from furthest Up to furthest down.   Imagine if you only have a fraction of a second to avoid a projectile?  With a leaf, you can do it. With a micro... your losing your ship.

4) Why are the buttons arranged so far apart and in an odd shape?

 Mostly, to avoid Accidentally pressing the wrong buttons at the wrong time.   Its easy to Forget what buttons do what.. if they are all lined up together.   However, if you know that the Hyperspace is in far center, you remember that far better than if it were sitting right next to the thrust.   And being that this button is quite a gamble at times... its best to keep it further away from accidental pressings.   

 You will find similar setups with dangerous controls in many other areas of life.   Some controls even have covers over them, as an extra precaution... such as a missile launch button on a fighter jet.   Flip it up, then depress.

 Another example of this style of layout, is Asteroids Deluxe.  The shield is in the center, far away from the other controls.  At first... you find it impossible to get to the thing in time.   Either forgetting about it, and or missing it by a hair.   But after a bunch of practice, it becomes easier and easier, and quite rewarding when you pull it off constantly, by the skin of your teeth.

 Originally, Id thought about modding my arcade machine... placing it closer.  But after playing for some hours.. I changed my mind.   It was easy enough, to accidentally mix up thrust from fire once in a while...  so imagine what would happen if you put the shield in the mix?!


 Again, these things were not just simply Hobbled together in a matter or minutes... and controllers were no "last minute" thought.   These games have razor sharp game balance... that todays modern games cant touch...  and the reason for that... is because the games today are designed to be played with Inferior standardized controllers... such as the analog thumb sticks.  They are slow, clunky, and take too much travel...  and so, game designers have to made the games far more easy as a result.   That.. and the simple fact that game makers today dont need to make a well balanced game.  The games have endings... and if you beat them in 2 hours of play, and never have the desire to play them again... they dont care.. nor suffer much consequence because of it.

 In fact, many people at Atari have stated that for a long period of time... every game being produced had to contain a unique controller.   Such as a Spinner, Trackball, Bike Grip.... and or combination of many controllers.

 Back then... there were no "Generic" Happs controllers.   For example, if you wanted a Shifter in your arcade machine... you needed to make it from scratch.  This meant a lot of time was spend designing, building, and testing various controllers.  Many of them having many revisions before making the cut to be installed permanently into a game.   

 A poor controller, one that broke down quickly / easily...  could Ruin a games and heck... the companies Reputation.  These machines were Not cheap back then!

 Fyi - an interesting factoid... that in the Original Marble Madness design... Mark Cerney has wanted the trackball to be Motorized... as to get the player actual force feedback.   A prototype was actually made.  However, he didnt realize, that when you add four points of contact to the thing.... it simply would no longer roll anymore.   With a time crunch looming, he decided to use a standard atari trackball instead.     The story shows that designers were Very thoughtful of their controllers.  You can find many other stories that mirror this as well,


 In ending... while for example... I could have modded my Asteriods Deluxe, and made it easier for me..  What I realized was that I didnt want the game to be easier.   I wanted to learn and become a better player, with the intended controllers... and in a short timeframe, with the desire and intense attitude, I DID become better.  It was highly rewarding.. and Im thankful that I restrained myself long enough to "get it".

 And about what you said... Yes, it DOES change the game.   As the gameplay IS effected vastly by the controls.
Especially the elder non continue based classics.    You just do not fully understand or appreciate the delicate balance and benefits yet.   No offense, but your statement is somewhat of a   "White-Belt"   level of understanding / functioning.


 Regardless, enjoy.
 :)
« Last Edit: June 13, 2015, 04:10:24 pm by Xiaou2 »

specfire

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 127
  • Last login:April 23, 2016, 10:39:09 pm
  • Shhh...
Wow, um, thank you for the detail and effort you put into the post.  Re my suspicion about Defender, it was my recollection from comments Eugene Jarvis made in an interview, paraphrased by me as such: it was lucky that Defender even worked at all because everything they did on it was seat of the pants.  Also, I understand the difference between short and long throw etc for engagement precision and timing.  My joysticks are hall effect and adjustable for this reason and I have leaf buttons.  And anyway, this patch enables "optional" controls, the original controls are still the default.

I think I am better off just surrendering.  FWIW, I think the patch is fantastic!  Big thanks again to frl.
Read to your kids, you'll all be better for it.

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
A long time ago, specfire asked me if I'd look at updating this patch to give Stargate the same selectable control scheme that Defender has.  I've finally got around to doing this (thanks for being patient specfire!) and in the process made another few improvements.  Here's a changelog...

1) Added 8-way controller support for Stargate (works in the same way as Defender, selectable from in-game menu)
2) Patch updated for v162 source
3) Removed crashes that were happening in Colony 7, Mayday and Jin with the patch applied.

It hasn't had a huge amount of testing yet but should be fine, the core hasn't really changed much.

Cheers,
Chris


Thank you very much, this is fantastic. Love being able to play defender on my 3 button cab.

Really appreciate your effort and posting the patch here.


h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Updated for 0169.
« Last Edit: January 15, 2016, 10:33:02 pm by h0tw1r3 »

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Updated for 0169.

That post was fail. Uploaded the wrong patch.  :banghead:

Attached is the correct patch updated for mame 0169.  :angel: More fail. See "fixed" version in later post.
« Last Edit: February 01, 2016, 09:41:04 pm by h0tw1r3 »

lowlytech

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 74
  • Last login:February 07, 2019, 08:12:12 am
  • I want to build my own arcade controls!
Had a quick question on this DIFF patch.  I am using the Mame compiler 2.0.169 and am not terribly versed in compiling source code.  I get the following error in the info box when trying to compile mame .169 source.

Applying Diff Patch...
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/mame/audio/bzone.cpp b/src/mame/audio/bzone.cpp
|index 26bd532..8f0923a 100644
|--- a/src/mame/audio/bzone.cpp
|+++ b/src/mame/audio/bzone.cpp
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
Finished!


I checked and made sure that the src/mame/audio/bzone.cpp file was there and in the proper directory path.   I can get the compiler to successfully build an EXE with the hi_169 diff file, so I must me missing something when trying to use this defender patch.  Any help would be appreciated.   Thanks

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Had a quick question on this DIFF patch.  I am using the Mame compiler 2.0.169 and am not terribly versed in compiling source code.  I get the following error in the info box when trying to compile mame .169 source.

Applying Diff Patch...
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/mame/audio/bzone.cpp b/src/mame/audio/bzone.cpp
|index 26bd532..8f0923a 100644
|--- a/src/mame/audio/bzone.cpp
|+++ b/src/mame/audio/bzone.cpp
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
Finished!


I checked and made sure that the src/mame/audio/bzone.cpp file was there and in the proper directory path.   I can get the compiler to successfully build an EXE with the hi_169 diff file, so I must me missing something when trying to use this defender patch.  Any help would be appreciated.   Thanks

I'm not familiar with Mame Compiler, but try this attached one.
« Last Edit: February 01, 2016, 09:39:38 pm by h0tw1r3 »

lowlytech

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 74
  • Last login:February 07, 2019, 08:12:12 am
  • I want to build my own arcade controls!
Thanks for the updated DIFF file, appreciate you tweaking it.  It does indeed patch without error in MC.  The only problem now is about 30 minutes into the compile it errors out at the makefile command with some kind of windows_x64 error 2 and fails to produce an EXE.  It really has no good reason in the log why it failed, just an error 2.   I might try to replace the mame source code with a fresh copy and uninstall and reinstall the buildtools and MC program just to make sure something isn't messed up.

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
I'm getting exactly the same issue with MC.

I tried setting up the new compiler tools manually, but got stuck trying to use the diff file because there was no patch command.



Sent from my iPhone using Tapatalk

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
So I've now been able to successfully compile without the patch, but not with the patch.

After a successful compile, and application of the patch, I get the following output from a command line compile:

Code: [Select]
[MINGW64] C:\msys64\src\0169>make -j5 OSD=winui PTR=64
GCC 5.3.0 detected
Compiling src/mame/drivers/bzone.cpp...
Compiling src/mame/audio/bzone.cpp...
Compiling src/mame/audio/redbaron.cpp...
Archiving libatari.a...
Compiling src/mame/drivers/wmg.cpp...
Compiling src/mame/drivers/williams.cpp...
Compiling src/mame/machine/williams.cpp...
Compiling src/mame/video/williams.cpp...
In file included from ../../../../../src/emu/emu.h:112:0,
                 from ../../../../../src/mame/drivers/williams.cpp:491:
../../../../../src/mame/drivers/williams.cpp: In function 'device_t* construct_machine_config_stargate(machine_config&, device_t*, device_t*)':
../../../../../src/mame/drivers/williams.cpp:1500:32: error: 'williams_input_port_0_r' is not a member of 'williams_state'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
                                ^
../../../../../src/emu/devcb.h:37:52: note: in definition of macro 'DEVCB_READ8'
 #define DEVCB_READ8(_class, _func) read8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
                                                    ^
../../../../../src/mame/drivers/williams.cpp:1500:2: note: in expansion of macro 'MCFG_PIA_READPA_HANDLER'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
  ^
../../../../../src/mame/drivers/williams.cpp: In function 'device_t* construct_machine_config_defender(machine_config&, device_t*, device_t*)':
../../../../../src/mame/drivers/williams.cpp:1529:32: error: 'williams_input_port_0_r' is not a member of 'williams_state'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
                                ^
../../../../../src/emu/devcb.h:37:52: note: in definition of macro 'DEVCB_READ8'
 #define DEVCB_READ8(_class, _func) read8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
                                                    ^
../../../../../src/mame/drivers/williams.cpp:1529:2: note: in expansion of macro 'MCFG_PIA_READPA_HANDLER'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
  ^
midway.make:727: recipe for target '../../../../mingw-gcc/obj/x64/Release/src/mame/drivers/williams.o' failed
make[2]: *** [../../../../mingw-gcc/obj/x64/Release/src/mame/drivers/williams.o] Error 1
makefile:229: recipe for target 'midway' failed
make[1]: *** [midway] Error 2
make[1]: *** Waiting for unfinished jobs....
makefile:825: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2

[MINGW64] C:\msys64\src\0169>

Am I doing something wrong, or is the patch not working properly? Has anyone got this to work?

Martin


« Last Edit: February 01, 2016, 02:26:12 am by artyfarty »

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
I suck.
« Last Edit: February 04, 2016, 11:34:54 pm by h0tw1r3 »

lowlytech

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 74
  • Last login:February 07, 2019, 08:12:12 am
  • I want to build my own arcade controls!
Tried the newest patch again with MC and clean build, am not smart enough to get it to work.  I still get the makefile error_2.  Anyone else have any luck??
using msys64
« Last Edit: January 29, 2016, 06:51:01 pm by lowlytech »

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Tried the newest patch again with MC and clean build, am not smart enough to get it to work.  I still get the makefile error_2.  Anyone else have any luck??
using msys64

I tried MC, but couldn't even get it to install the source and build environment properly.

As far as the error, my guess is the actual compiler error is way before the actual error_2 message. Scroll up? Sorry I can't be more help. I cross-compile most things from linux, or use msys2 directly.

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
I'm also still getting errors compiling with this newer patch applied. Using MSYS64.

I can compile successfully without the patch, but after applying the diff, get essentially the same errors as with the "non-fixed" version of the patch (as above).

Code: [Select]
[MINGW64] D:\Games\MAMEdev\src\MR_mame0169_defender>make all -j8 OPTIMIZE=3 SYMLEVEL=1 SYMBOLS=0 PTR64=1 TOOLS=1 DIRECTINPUT=7
GCC 5.3.0 detected

[MINGW64] D:\Games\MAMEdev\src\MR_mame0169_defender>patch -p0 -E< D:\Games\MAMEdev_downloads\Defender-BattleZone-Stargate_169-MC-fixed.diff
patching file src/mame/audio/bzone.cpp
patching file src/mame/drivers/bzone.cpp
patching file src/mame/drivers/williams.cpp
patching file src/mame/includes/bzone.h
patching file src/mame/includes/williams.h
patching file src/mame/machine/williams.cpp

[MINGW64] D:\Games\MAMEdev\src\MR_mame0169_defender>make all -j8 OPTIMIZE=3 SYMLEVEL=1 SYMBOLS=0 PTR64=1 TOOLS=1 DIRECTINPUT=7
GCC 5.3.0 detected
Compiling src/mame/drivers/bzone.cpp...
Compiling src/mame/audio/bzone.cpp...
Compiling src/mame/audio/redbaron.cpp...
Compiling src/mame/drivers/wmg.cpp...
Compiling src/mame/drivers/williams.cpp...
Compiling src/mame/machine/williams.cpp...
Compiling src/mame/video/williams.cpp...
In file included from ../../../../../src/emu/emu.h:112:0,
                 from ../../../../../src/mame/drivers/williams.cpp:491:
../../../../../src/mame/drivers/williams.cpp: In function 'device_t* construct_machine_config_stargate(machine_config&, device_t*, device_t*)':
../../../../../src/mame/drivers/williams.cpp:1500:32: error: 'williams_input_port_0_r' is not a member of 'williams_state'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
                                ^
../../../../../src/emu/devcb.h:37:52: note: in definition of macro 'DEVCB_READ8'
 #define DEVCB_READ8(_class, _func) read8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
                                                    ^
../../../../../src/mame/drivers/williams.cpp:1500:2: note: in expansion of macro 'MCFG_PIA_READPA_HANDLER'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
  ^
../../../../../src/mame/drivers/williams.cpp: In function 'device_t* construct_machine_config_defender(machine_config&, device_t*, device_t*)':
../../../../../src/mame/drivers/williams.cpp:1529:32: error: 'williams_input_port_0_r' is not a member of 'williams_state'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
                                ^
../../../../../src/emu/devcb.h:37:52: note: in definition of macro 'DEVCB_READ8'
 #define DEVCB_READ8(_class, _func) read8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
                                                    ^
../../../../../src/mame/drivers/williams.cpp:1529:2: note: in expansion of macro 'MCFG_PIA_READPA_HANDLER'
  MCFG_PIA_READPA_HANDLER(READ8(williams_state, williams_input_port_0_r))
  ^
Archiving libatari.a...
midway.make:727: recipe for target '../../../../mingw-gcc/obj/x64/Release/src/mame/drivers/williams.o' failed
make[2]: *** [../../../../mingw-gcc/obj/x64/Release/src/mame/drivers/williams.o] Error 1
make[2]: *** Waiting for unfinished jobs....
makefile:232: recipe for target 'midway' failed
make[1]: *** [midway] Error 2♪◙make[1]: *** Waiting for unfinished jobs....
makefile:825: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2

[MINGW64] D:\Games\MAMEdev\src\MR_mame0169_defender>

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
I'm also still getting errors compiling with this newer patch applied. Using MSYS64.

I can compile successfully without the patch, but after applying the diff, get essentially the same errors as with the "non-fixed" version of the patch (as above).

Check a couple posts up (third times the charm). That error should be fixed now.

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
Hi h0tw1r3,

Appreciate your efforts with this, however I'm still struggling to get mame to compile with this patch.

Can you double check the file please?

I previously downloaded "Defender-BattleZone-Stargate_169-MC.diff.txt", and subsequently downloaded the newer "Defender-BattleZone-Stargate_169-MC-fixed.diff.txt", but it looks like they are the same (both 13,071 bytes, and fc reports no differences between the two files).

Thanks,

Martin

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
I had a look at the diff file for occurrences of williams_input_port_0_r (which appears to be what is giving compile errors), and replaced the two instances that I found with stargate_input_port_0_r and defender_input_port_0_r in the respective sections.

After applying this modified patch, the compile succeeds, and I get the option for 8-way joystick in defender.

Not sure whether this breaks anything else?

Martin

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Not sure whether this breaks anything else?

Those are the only two changes, and exactly what I thought I uploaded.  This is getting comical...

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
Thanks for the patch, much appreciated.  Martin

lowlytech

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 74
  • Last login:February 07, 2019, 08:12:12 am
  • I want to build my own arcade controls!
That did the trick for me too.  Complied with no problems.  Thanks so much..

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:Yesterday at 08:03:27 am
  • I want to build my own arcade controls!
Just thought I'd add a note for others who might find this post for the same reasons as me.

I originally discovered this thread when searching for a MAME binary that included the defender patch for a 4-way or 8-way joystick.

If you are looking for a MAME binary that already includes support for 8-way joystick control of defender, battlezone and stargate, go and get h0tw1r3's UXME fork of MAME.

See h0tw1r3's post at http://forum.arcadecontrols.com/index.php?topic=146146.0 or download from his UXME site at https://build.zaplabs.com/project/uxme/

Martin

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
So who's got the high score for 8way control Defender ?
« Last Edit: March 23, 2016, 02:00:12 pm by jimmer »
On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:June 03, 2024, 08:24:35 am
  • Mame forever.
    • https://github.com/oomek
In case someone is still interested, here's the LUA script that does the same, but does not require patching the exe. It has some limitations though for which I'm still trying to figure out the solution.
http://forum.arcadecontrols.com/index.php/topic,163525.0.html
« Last Edit: September 11, 2020, 05:19:54 pm by oomek »