Kroah Posted April 2, 2008 Share Posted April 2, 2008 (edited) Hi all, Recently Igor Barzilai (author of some Atari 2600 games) contacted me with the idea to play MULE after the 12th month. Because his idea was a brillant one, I felt the motivation to investigate the code. After few hours of digging, i enumerated the part of codes which could be involved by this change. I wanted the number of months for the Standard and Tournament level being set to 24. Even if I think it's a little bit too much, it's easier to implement. Because i've only patched the ATR (no code added), there're still 2 problems (they don't prevent to play though): - after round 12, the wampus and gambling bonuses are incorrect (arrays are too small). The amount is about half it should be. Those 2 points can't be fixed without adding some new codes. You'll find the original and the updated ATR in attachments. Any feedbacks are welcome! I hope you'll enjoy it, and thanks to Igor for the idea. Here's the updates i've done to the ATR: Description: Music length differs every 4 rounds. Change: Set to the maximum (as round 12). 252C: search: LDA numRound = A5 B1 (4A 4A 0A A8 B9 1F) update: LDA #12 = A9 0C 2540: search: CMP #12 = C9 0C (90 05 A9 00 8D A0) update: CMP #24 = C9 18 Description: Food requirement increases every 4 rounds. Change: Food requirement increases every 8 rounds. 315E: search: AND #3 = 29 03 (D0 01 C8 98 0A 0A) update: AND #7 = 29 07 6294: search: AND #3 = 29 03 (D0 03 EE 76 B3 AD) update: AND #7 = 29 07 Description: Crystite price = round * 4 + 100. Change: Crystite price = round * 2 + 100. 34A9: search: ASL A = 0A (69 64 8D F7 B2 A2 03) update: NOP = EA Description: Gambling bonus = random [0; timeleft] + gambling_bonus_6A7E [round / 4] (max 250) Change: To do Description: Hardcoded month limit (12). Change: Set to 24. 6E01: search: CMP #12 = C9 0C (D0 43 A9 10 85 D4) update: CMP #24 = C9 18 6F59: search: CMP #12 = C9 0C (D0 03 20 98 30 A9) update: CMP #24 = C9 18 7002: search: CMP #12 = C9 0C (D0 07 AD 25 B3 C9) update: CMP #24 = C9 18 70A9: search: LDA #12 = A9 0C (C5 B1 D0 12 AD 25) update: LDA #18 = A9 18 71E6: search: LDY #12 = A0 0C (C4 B1 D0 0C AC 25) update: LDY #18 = A0 18 89E0: search: CMP #12 = C9 0C (D0 03 4C 43 8D A9) update: CMP #24 = C9 18 Description: Events quality (cash gained or lost) depends on round. Amount = A * 25 * (GAME_NUM_ROUND/4 + 1) with A between [1; 8] (50 to 800). Change: Amount = A * 15 * (GAME_NUM_ROUND/4 + 1) 8292: search: LDY #25 = A0 19 (20 30 11 A8 A5 B1) update: LDY #15 = A0 0F Description: Wampus bonus = wamping_bonus_8D3B [round / 4]. Change: To do Description: Initialization of the number of months for the standard and tournament level (12). Change: Set to 24. 45DA: search: LDA #12 = A9 0C (8D 6F B3 A9 00 8D) update: LDA #18 = A9 18 Description: The event probability decreases when it occurs. Change: Doubled all the events probability. 7B7D: search: 03 02 03 03 03 02 02 02 update: 06 04 06 06 06 04 04 04 Description: The success message depends on the score. Change: Doubled the needed score for each message. 6E05: $2710 (10000) -> $4E20 (20000) search: LDA #$10 = A9 10 (85 D4 A9 27 85 D5 20 AA D9) update: LDA #$10 = A9 20 search: LDA #$27 = A9 27 (85 D5 20 AA D9 20 B6 DD A2) update: LDA #$4E = A9 4E 6E24: $4E20 (20000) -> $9C40 (40000) search: LDA #$20 = A9 20 (85 D4 A9 4E 85 D5 20 AA D9) update: LDA #$40 = A9 40 search: LDA #$4E = A9 4E (85 D5 20 AA D9 20 B6 DD A2) update: LDA #$9C = A9 9C Have fun! Kroah Mule___24_months.zip Edited April 2, 2008 by Kroah Quote Link to comment Share on other sites More sharing options...
jacobus Posted April 3, 2008 Share Posted April 3, 2008 Awesome stuff! ... I always wanted the game to last longer! Have you tried it with Kaillera? Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 3, 2008 Share Posted April 3, 2008 Nice. Some time ago, I worked out the patch to increase months, but didn't go beyond that - so naturally, things started working not quite how they should at the 12 month mark. It's an option which they should have included in the game. 6, 9, 12, 16, 24 would have been good options. The shorter ones good for a quick game seeing as it takes around an hour to play 12 rounds on the top level. Quote Link to comment Share on other sites More sharing options...
jacobus Posted April 3, 2008 Share Posted April 3, 2008 I tried playing a 24 month game ... everything was going well until round 23 ... I have discovered that money is stored as a 2 byte integer – I rolled it over and lost $65536! First to last place instantly! CRAP! Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 3, 2008 Share Posted April 3, 2008 You'd probably want to more than double the ranking requirements. From memory, you usually achieve half wealth around the 9th month in the top level. Although, the growth would probably flatten out a bit thanks to no new land plots. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted April 3, 2008 Share Posted April 3, 2008 never change this classic... Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 3, 2008 Share Posted April 3, 2008 An updated version (totally new) would be good. Incorporate some elements found in Millenium 2.2 and Megalomania. Like: - satellites. Initially, they provide power but after some learning curve, can defend against pirates - sabotage. Ability to play havoc with other player's plots. - alliances. 2 vs 2 play with shared resources (food/energy) Quote Link to comment Share on other sites More sharing options...
Potemkyn Posted April 17, 2008 Share Posted April 17, 2008 I've kicked the idea around myself of making M.U.L.E. using Flash. Never really got anywhere beyond thinking and writing out some things. Is there a text file of the original code? Are there any with comments? I've downloaded your version and will give it a try. As soon as I get an emulator working again. Thanks! Mike Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 17, 2008 Share Posted April 17, 2008 Pretty sure there's a French site that reverse-engineered the whole game. Should be a thread around here about it - pretty sure it was MULE. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted April 17, 2008 Share Posted April 17, 2008 Kroah did it... a simple "kroah mule" in google might help... Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted April 17, 2008 Share Posted April 17, 2008 Nice Please excuse me...my brain hurts now. Quote Link to comment Share on other sites More sharing options...
joeventura Posted April 20, 2008 Share Posted April 20, 2008 There is an online version availabel at: http://atarimule.neotechgaming.com/index.htm I've kicked the idea around myself of making M.U.L.E. using Flash. Never really got anywhere beyond thinking and writing out some things. Is there a text file of the original code? Are there any with comments? I've downloaded your version and will give it a try. As soon as I get an emulator working again. Thanks! Mike Quote Link to comment Share on other sites More sharing options...
Kroah Posted April 21, 2008 Author Share Posted April 21, 2008 never change this classic... I couldn't stop myself, this is my drug... I've fixed the gambling and wampus bonuses. There's still the cash overflow bug, i don't know how to resolve it easily... any idea? Do you easily roll over your score? Here are the new changes: Description: Wampus bonus = wamping_bonus_8D3B [round / 4]. round 1 to 3: 100 round 4 to 7: 200 round 8 to 11: 300 round 12: 400 Change: Wampus bonus = wamping_bonus_AF4B [round / 4]. round 1 to 3: 100 round 4 to 7: 150 round 8 to 11: 200 round 12 to 15: 250 round 16 to 19: 300 round 20 to 23: 350 round 24: 400 8C52: search: ADC $8D3B,X = 7D 3B 8D 99 BA B2 B9 BB update: ADC $AF4B,X = 7D 4B AF 8C5B: search: ADC $8D3C,X = 7D 3C 8D 99 BB B2 B9 09 update: ADC $AF4C,X = 7D 4C AF 8C94, 8C97: search: LDX $8D3B,Y = BE 3B 8D B9 3C 8D 20 LDA $8D3C,Y update: LDX $AF4B,Y = BE 4B AF B9 4C AF LDA $AF4C,Y AF4B: search: A6 8C 10 D0 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 update: 64 00 96 00 C8 00 FA 00 2C 01 5E 01 90 01 Description: Gambling bonus = random [0; timeleft] + gambling_bonus_6A7E [round / 4] (max 250) round 1 to 3: 100 round 4 to 7: 150 round 8 to 11: 200 round 12: 250 Change: Gambling bonus = random [0; timeleft] + gambling_bonus_AF6B [round / 4] (max 250) round 1 to 3: 100 round 4 to 7: 125 round 8 to 11: 150 round 12 to 15: 175 round 16 to 19: 200 round 20 to 23: 225 round 24: 250 6AA0: search: ADC $6A7E,X = 7D 7E 6A 90 02 A9 FA AA update: ADC $AF6B,X = 7D 6B AF AF6B: at address: 0x0166FB change to: 64 7D 96 AF C8 E1 FA Have fun, Kroah Mule___24_months___v0.2.zip Quote Link to comment Share on other sites More sharing options...
TimsterAA Posted April 22, 2008 Share Posted April 22, 2008 There's still the cash overflow bug, i don't know how to resolve it easily... any idea? Do you easily roll over your score? I don't know enough about assembly programming to know how easy or difficult this fix would be. The score rolls over 65535 - which tells me that the score is stored in a 2-byte field in hex (x'FFFF' = 65535). Could a spare four (or three?) byte area be found somewhere else in storage to be used for the score (actually four of them I guess, one for each player)? If so, could the code then be changed to point to these new locations for storage and calculation of the money amounts? Perhaps base the code/storage on the TOTAL money amount for each player, or even the colony total value, as these already go above the 65535 limit. I doubt this does more than just state the obvious, but that's my layman's take on it. Also - as jacobus found, it happened to me in both the games I played, one on month 22, and the other on month 23, so I'd say that it is indeed easy to roll over this amount. Great work, by the way. My MULE playing buds can't wait to play this once the bugs are worked out. I get 2-3 guys over once a month just to play a couple games of MULE - on the real hardware (both Atari & C64). We have a blast! --Timster-- Quote Link to comment Share on other sites More sharing options...
Kroah Posted April 22, 2008 Author Share Posted April 22, 2008 There's still the cash overflow bug, i don't know how to resolve it easily... any idea? Do you easily roll over your score? I don't know enough about assembly programming to know how easy or difficult this fix would be. The score rolls over 65535 - which tells me that the score is stored in a 2-byte field in hex (x'FFFF' = 65535). Could a spare four (or three?) byte area be found somewhere else in storage to be used for the score (actually four of them I guess, one for each player)? If so, could the code then be changed to point to these new locations for storage and calculation of the money amounts? Perhaps base the code/storage on the TOTAL money amount for each player, or even the colony total value, as these already go above the 65535 limit. I doubt this does more than just state the obvious, but that's my layman's take on it. Also - as jacobus found, it happened to me in both the games I played, one on month 22, and the other on month 23, so I'd say that it is indeed easy to roll over this amount. Great work, by the way. My MULE playing buds can't wait to play this once the bugs are worked out. I get 2-3 guys over once a month just to play a couple games of MULE - on the real hardware (both Atari & C64). We have a blast! --Timster-- Effectively, players cash are stored in 2 bytes each. Since developers thought no-one could reach $65535 (in 12 months), no overflow checks was added. Let's look at some alternatives: 1) Expand the cash to 3 bytes: given that all arithmetics (straight binary and BCD) are done with the 2 bytes, lots of code must be updated. 2) Add overflow checks: not interesting because, like the first idea, lots of code must be updated, and $65535 is easily reached. 3) Decrease the number of months to 18: if we are sure nobody reach $65535 in 18 months, it's possible. Don't you think 24 months are a little too much? 4) Decrease all prices/cash value, so $65535 could not be easily reach: possible, but i dislike the idea to change the original game in this way. I think 3) is the best solution... do you? Kroah Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 22, 2008 Share Posted April 22, 2008 I think a player could probably reach 65K in 18 months. Try the old technique of getting a huge score. Play 2 player, and transfer most of the assets to one player (ie sell the other players land to him in an auction collusion). With > half the available land, the player should then achieve massive production, based solely on the learning curve. Quote Link to comment Share on other sites More sharing options...
VW Posted April 22, 2008 Share Posted April 22, 2008 This wouldn't happen in a competitive game however, I say make the limit 18 months. Of course I'm not doing any of the work... Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 23, 2008 Share Posted April 23, 2008 Another possibility might be to use some "deflation". Devalue everything by some amount, such that it becomes very unlikely that a player will hit 65K. Quote Link to comment Share on other sites More sharing options...
Urchlay Posted April 23, 2008 Share Posted April 23, 2008 End the game early if someone hits $65535 and declare that player the winner? (No idea if that'd be easy to squeeze into the existing game logic) Quote Link to comment Share on other sites More sharing options...
goblin072 Posted April 23, 2008 Share Posted April 23, 2008 Yea its cool playing around with the code. I personally think 12 months is fine. Fix the AI on the mechtrons so they don't crash the smithore market and ya have a good hack. Maybe add more than 128 different maps. Some people memorize the crystite layouts. I wish someone would port it to a N64 (4 joystick ports) and keep the classic version. I have a feeling anyone thinking they can improve on the game will just end up mucking it up. It happened in defender 2000, the classic was much better. Don't mess with near perfection. I feel sorry for those that have never played 4 player MULE. 3 or less is not even the same game. Huge difference. Quote Link to comment Share on other sites More sharing options...
TimsterAA Posted April 30, 2008 Share Posted April 30, 2008 So.... any chances of some of these suggestions being implemented? Any idea on what to do with the Money amount going too big for individual players (limit to 18-20 months / move those values to a larger variable / etc...)? I have another 4-Player MULE night coming up next Friday (5/9)!!!! Great work so far - I do hope some more refining is done with this neat hack. --Timster-- Quote Link to comment Share on other sites More sharing options...
wrenchien Posted May 12, 2008 Share Posted May 12, 2008 So.... any chances of some of these suggestions being implemented? Any idea on what to do with the Money amount going too big for individual players (limit to 18-20 months / move those values to a larger variable / etc...)? I have another 4-Player MULE night coming up next Friday (5/9)!!!! Great work so far - I do hope some more refining is done with this neat hack. --Timster-- i'd like to see a 3 year long mule game with the playfield extending out after the 18th month, tripling the size of the playfield... (have good vision)! and hope the $$$$ counter can be extended, maybe to 6 digits.... Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 12, 2008 Share Posted May 12, 2008 Add to that, a Save/Load function. One problem I see is that even in normal MULE, the game becomes "samey" by about the 10th month, ie - all the land's gone. Also, thanks to the learning curve, plots would probably hit full production by month 14 or so. Quote Link to comment Share on other sites More sharing options...
doctorclu Posted May 12, 2008 Share Posted May 12, 2008 (edited) Effectively, players cash are stored in 2 bytes each. Since developers thought no-one could reach $65535 (in 12 months), no overflow checks was added. Let's look at some alternatives: 1) Expand the cash to 3 bytes: given that all arithmetics (straight binary and BCD) are done with the 2 bytes, lots of code must be updated. 2) Add overflow checks: not interesting because, like the first idea, lots of code must be updated, and $65535 is easily reached. 3) Decrease the number of months to 18: if we are sure nobody reach $65535 in 18 months, it's possible. Don't you think 24 months are a little too much? 4) Decrease all prices/cash value, so $65535 could not be easily reach: possible, but i dislike the idea to change the original game in this way. I think 3) is the best solution... do you? Kroah This is awesome!! How did you decompile this? I love hacks. I used to hack into game when I was a kid, changing the text, but it was fun to add my own personal twist to games I like. Like I made a Elfquest version of Archon, and wanted to make an Andromeda version of Star Raiders... which would have been easy enough, since I altered Star Raiders for another sci-fi story I made. And then then was Star Trek 3.5 (Scott Adams version) where because it was basic I would give my ship ridiculous amounts of power. Fun stuff. Edited May 12, 2008 by doctorclu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.