I've been making mule in java for fun to try and learn to use a graphics library and found your disassembly of mule. One part in particular I didn't understand was the bit on determining store prices. I tried using google to translate it to english but either it didn't do a good enough job or I'm not understanding it regardless. any possibility of giving an example of it working? Since that is pretty much the most important aspect of the game (the economy) I really want to do it right. I just want to say while I'm writing this what a great job I think you've done.

Well I have never played with mule but I guess it won't be far before I try it. I know from so long how good it is by press article.
I like a lot Kroah work and do by myself also some decompilation work.

Please feedback your source code and your web page on mule.

Here is a rough translation I have just done for you. I have not used spelling correctors and haven't read again the translation. So possible mistakes embedded. Also without knowing mule vocabulary I could be a little far at some time from the right word.

Do not hesitate to ask question. I guess Kroah will be better qualified to answer than me but I'll take a look. Other else the 6502 commented code is available. Oups, sorry it is in French. Well I suggest then to you to learn French it is a very nice language with a very good and rich litterature.

Inputs:
* good type (Food, Energy or Smithore/Mule)
* current(or maybe in the exchange only) total quantity for the next round (Food, Energy or Mule)
* total quantity needed for the next round (Food, Energy or Mule)
* current price (Food, Energy or Smithore)
* minimum price (Food, Energy or Smithore)

Offer and demand ration is calculated by divided the current (or maybe in the exchange only) total quantity by the total quantity needed. A ratio >1 indicates that offer is not enough versus the demand. A ration <1 indicates that the offer is > to the demand.

In the case of Smithore/mule, the ratio is borned by excluded 0.25 to included 3.0.

The theoric quantity of mules required is calculated by summing:
* the number of free land suceptible to be taken in the next round (maximum 4)
* the number of land without exploitation (and so which need a mule)

The total initial quantity in the game is equal to:
* for the real or simulate (AI) calculated price: the quantity of the store
* for the next simulated prices (AI): to the current (or maybe the current exchange only) total final quantity of the previous simulated caculation

In the first step, calculation of the total unity number that there will be at the eof the round owned by each player. Then calculation of the 3 phases (Usage, Spoilage and Production):
* Usage (borned by 0): quantity owned -= needed quantity
* Spoilage: owned quantity *=2/4
* Production: quantity owned += produced quantity

La quantité totale finale en jeu est alors calculée en sommant la quantité totale initiale en jeu et la quantité possédée par chaque joueur après les 3 phases.
The current (or maybe the current exchange only) final total quantity is then calculated by summing the initial total quantity in the game and the owned quantity by each player after the 3 phases.

Finaly, the new price is calculated by applying demand/offer theory with as parameters:
* good type (Food)
* current (or maybe the current exchange only) final total quantity for the next round
* total required quantity for the next round
* current price
* minimum price

The price variation of the Food takes into account the owned unities number by each playser. So as far as the players keep a sufficant quantity, the Food price won't increase even if the store is empty.

Inputs:
* current (or maybe the current exchange only) initial total quantity
* owned quantity by each player
* produced quantity by each player
* needed quantity of each player for the round
* current price
* minimum price
Sorties:

* la quantité totale finale en jeu
* le nouveau prix

Outputs:
* current (or maybe the current exchange only) final total quantity
* new price

The algorithm is the same as the one for the Food, with the following differences:
* the needed quantity is specificic to each player (and not dependant of the round)
* the Spoilage is of 3/4 (and not of 2/4)
* the total needed quantity for the next round is equal to the sum of the needed quantity for each player of this round + 4 (for the the futurs exploitations)
* variation of the offer/demand is calculated for the Energy good

The quantity of mules potientally available is equal to:
* for the real or simulated (AI) price calculation: mules quantity in the store + half the Smithore in the store
* for the next simulated (AI) prices: potentially availables mules fo the previous simulated calculation minus the previous needed mules quantity (=5)

At the opposite of the Food and Energy price, the Smithore price doesn't take into account the owned unities from the players, but only the unities in the store and the available number of mules. This means, the price will increase as soon as the store will run out of and/or the number of mules will not be enought and this whatever is the number of unities owned by the players.

I found it because I didn't understand the references to the "My document section" on the News page, not realizing that the "Decompilation" link would display the document being described (I figured it would be the disassembled snapshot -- I'd recommend changing references to "My document" to "Decompilation"). Then I noticed this thread in the forum, pretty good timing! If only I was a couple weeks earlier!

I want to thank Kroah for such amazing work. I'm astounded at the detail in these decompilations!

BTW, I would be very interested in your Java MULE project. I am remaking Ultima I-V in Java myself (have an unfiinished, but playable version of Ultima I already).