• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Merchant Prince Trader Software

Foen

SOC-6
At the back of CT book 7, Merchant Prince, it mentions that an Apple II+ Trader program was available, written in BASIC, to handle trading:

As the Merchant Prince trade system was created and tested, extensive use of a computer simulation helped the designer analyze and understand various aspects of the system. Now, this computer program for the Apple II + (DOS 3.3, 48K, one disk drive) is available on disk as a Traveller referee aid or for solitaire player activity. Sit at your computer and navigate your ship through the Spinward Marches, carrying passengers and freight as you try to make enough money to cover your ship payments. Buy cargos with your excess money and sell them at a profit (or loss) in the next system. Let the computer handle the basic details of navigation for any merchant activities.

Does anyone know if this still exists and/or has access to the source code? It might make an interesting retro project to bring this back to life...

Stuart
 
I've got the Apple II disks Marc released as freeware.

PM me your email, and I'll zip and send them.
 
Babel

Hehe, seek and ye shall find...

The disks contain AppleBasic programs (no surprise there) but my ability to convert them to a current platform is somewhat limited: AppleBasic is much like the languages of my yoof, and nothing like structured programming languages. For fun, here is a snippet:
Code:
[color=red]2000[/color]  PRINT  CHR$(4);"OPEN ";FI$;",L50": PRINT  CHR$(4);"READ ";FI$;",R";A: INPUT A$: IF OP < >6  THEN 2110
[color=red]2050[/color]  IF XL = 0  THEN 2110
[color=red]2060[/color]  IF  MID$ (A$,42,1) < >"*"  THEN CR = CR +50000
[color=red]2070[/color]  A$ =  LEFT$(A$,41) +"*" +"    ": PRINT  CHR$(4);"WRITE ";FI$;",R";A: PRINT A$:XR = XR -1
[color=red]2110[/color]  PRINT  CHR$(4);"CLOSE": RETURN
I think it would be easier to re-write from scratch than try to convert this code.

Oh well, can't blame me for wanting to try.

Foen
 
Hehe, seek and ye shall find...

The disks contain AppleBasic programs (no surprise there) but my ability to convert them to a current platform is somewhat limited: AppleBasic is much like the languages of my yoof, and nothing like structured programming languages. For fun, here is a snippet:
Code:
[color=red]2000[/color]  PRINT  CHR$(4);"OPEN ";FI$;",L50": PRINT  CHR$(4);"READ ";FI$;",R";A: INPUT A$: IF OP < >6  THEN 2110
[color=red]2050[/color]  IF XL = 0  THEN 2110
[color=red]2060[/color]  IF  MID$ (A$,42,1) < >"*"  THEN CR = CR +50000
[color=red]2070[/color]  A$ =  LEFT$(A$,41) +"*" +"    ": PRINT  CHR$(4);"WRITE ";FI$;",R";A: PRINT A$:XR = XR -1
[color=red]2110[/color]  PRINT  CHR$(4);"CLOSE": RETURN
I think it would be easier to re-write from scratch than try to convert this code.

Oh well, can't blame me for wanting to try.

Foen
Actually, that's not too bad; the difference between Applesoft BASIC (which that is) and GW-BASIC is mostly in the file I/O , which was handled via DOS commands in Applesoft, but via internal commands in GW. Translation should actually be pretty straightforward. I'll take a look at it when I have a couple of hours - probably Exmess weekend.
 
Translation should actually be pretty straightforward. I'll take a look at it when I have a couple of hours - probably Exmess weekend.

Heh, this is exactly the thinking that lead me to writing an environment to run the original code, as per my notes in http://www.travellerrpg.com/CotI/Discuss/showthread.php?t=21233

I started translating it to JavaScript to run in a web page. (Why would anyone code for a desktop environment, and deal with security, distribution and compatibility issues - but I digress?) I kept waffling between translating it as mechanically as possible and taking advantage of the more advanced language/library features available. The latter risked introducing inconsistencies, and made a re-adaptation from Book 7 more enticing. The former was also risky, since it would be difficult to ensure that the original code behaved the same way as the translated code. So I decided to just make the original code run in a web page...

(I took the other approach when porting the Elite trading engine - which isn't up anywhere yet - and did a literal translation then refactored heavily so it is somewhat respectable JavaScript code.)
 
Heh, this is exactly the thinking that lead me to writing an environment to run the original code, as per my notes in http://www.travellerrpg.com/CotI/Discuss/showthread.php?t=21233

I started translating it to JavaScript to run in a web page. (Why would anyone code for a desktop environment, and deal with security, distribution and compatibility issues - but I digress?) I kept waffling between translating it as mechanically as possible and taking advantage of the more advanced language/library features available. The latter risked introducing inconsistencies, and made a re-adaptation from Book 7 more enticing. The former was also risky, since it would be difficult to ensure that the original code behaved the same way as the translated code. So I decided to just make the original code run in a web page...

(I took the other approach when porting the Elite trading engine - which isn't up anywhere yet - and did a literal translation then refactored heavily so it is somewhat respectable JavaScript code.)
You were translating from one language and paradigm to another language with a different paradigm. I'm proposing to translate from one dialect of a Microsoft-developed BASIC to a slightly different dialect of a Microsoft-developed BASIC, and not worrying about the niceties of more modern environments - IOW, it'd essentially be a 'console' app under Windows, running in either GWBASIC or QBASIC.

Refactoring and updating for a true windowed or browser-based environment would indeed be a major project, and not one that I'd be willing to undertake - it would probably be easier to re-implement from first principles if one wanted to do that, and Universe II - see the other thread - looks to be a good implementation-in-progress of that idea.
 
Back
Top