01/08/94: Shanghai for Level 2 by Delphi, | Category: Delphi - Games & Graphics | 37 comments - (Comments are closed)

Shanghai for Level 2

84751 8-JAN 12:04 Games & Graphics
Shanghai for Level 2

I recently downloaded Shawn (EARTHER) Driscoll’s Shanghai for Level 2. Shawn
did an excellent job working within the confines of BASIC09 and illustrates
well the capabilities of his BASIC09 tools package, GUIB. Of course, it
goes without saying that it is slow in response and action. I had heard
that the OSK basic on my MM/1a was pretty much compatable at the source
level so I was wondering how fast it would run on my OSK system. I also have
a copy of Kevin Darling’s bgfx which is pretty much compatable with gfx2.

So, I go an edit the source to:

1) change all gfx2 calls to bfgx calls.

2) changed the window type codes in the DWSet and the GPLoad calls
from type 8 to type 3.

3) Haven’t changed these yet, but I suppose I will need to add second
and third params to the Palette calls there are.

4) Made the same changes in the guib.b09 program. It loads with no err
and packs just fine.

I am getting an error 102 though when I try to load the Shanghai.b09 and the
stopping point is accessing the return value from a SYSCALL. If I hadn’t taken
Basic manual out of my OSK manual set (you know typical it is for MW to have
more documentation than will fit in the binders they give you, right?) to
make some room (I hardly EVER mess with basic), I probably could look this
up for myself, but I have missplaced where I put the manual I extracted.

The program DIMs a variable regs to the datatype registers OK. But after a
SYSCALL to determine the PID, how do I reference the returned value in
Register D0? The CoCo3 version got it from regs.a, but there is no a register
on a 68K MPU. It comes back in the D0 register. I tried changing the
variable regs.a to regs.d0 but that gives me an 020 error during the
program load.

Can anyone help? If so, with Shawn’s permission, I will upload the OSK
source for this nice game.

Zack C Sessions

“I am Homer of Borg, prepare to be assimi … OOOOHHH, DOUGHNUTS!”

37 comments to Shanghai for Level 2

  • pucc_unknown

    84758 8-JAN 15:53 Games & Graphics
    RE: Shanghai for Level 2 (Re: Msg 84751)


    OSK basic SysCall requires a different stack frame than 6809, of course.

    Type r=d0,d1,d2,d3,d4,d5,d6,d7,a0,a1,a2,a3,a4:INTEGER
    Dim regs:r
    Run Syscall($0C,regs)

    Also, if you’re only using syscall to get the id, Kevin covered this for you:
    RUn BGFX(“ID”,id)

    The other thing you’ll have to watch for is data type. GFX2 took a lot of
    BYTE type variables. BGFX takes almost all INTEGER type. Also, mixing byte
    and integer data in a complex data type can cause problems. The type byte’s
    must travel in pairs (any even number), or you’ll get bus fault errors when
    trying to access the later integers.

    Scream if it keeps fighting you. I did quite a bit of this sort of thing back
    when the mm/1 first came out.


  • pucc_unknown

    84805 9-JAN 21:31 Games & Graphics
    RE: Shanghai for Level 2 (Re: Msg 84751)

    Why not just spend the LOW LOW price of $15 for TILES (see the VERY simple demo
    version 0.1 ) in the database. It’s the best shanghai/mahjongg I’ve seen!

  • pucc_unknown

    84814 10-JAN 03:35 Games & Graphics
    RE: Shanghai for Level 2 (Re: Msg 84751)


    I just uploaded version 1.2 of Shanghai OS-9 (it will be a few days
    before made available). This final version is faster when doing graphic
    re-draws and during the Dragon building process. It takes about 5
    seconds to generate a solveable Dragon instead of 3 minutes (now that
    some probability factors were fine-tuned). Also, the lag between the
    time a tile is clicked and it becomes high-lighted was reduced
    drastically (because the mouse is travelling across a 2D array instead
    of travelling through a 3D array, which bogged down the computer a bit).

    Anyway… Go ahead and make a version of the game for whatever
    computer you want. The reason why I give out source code is so that
    others can get ideas from it and create new things for OS-9. I want
    nothing more than to see new programs for OS-9 and I feel that source
    code is one way to help out. If I had made Shanghai shareware and
    charged money for it, not only would I never see any money, I wouldn’t
    be helping anyone wanting to give it their best shot at programming a
    game for OS-9. Source code is the key to more programs, I think.

    Also, I program in Basic09 because more people have it instead
    of C compilers. I admit that Shanghai 1.0 & 1.1 were slow (some brute
    force was used to get the games going and Christmas time was a few
    weeks away and I was hurting for play-testers). Version 1.2 is just
    as fast as any other game like it. I still play your Pyramid Solitaire
    game that you wrote in C way back when (it too is addictive).

    My next project is to write a game aid for GURPS or TRAVELLER and
    then I will find another game that I like that still has not been
    written for OS-9. What that game might be? I don’t know yet.

    Shawn Driscoll

  • pucc_unknown

    84828 10-JAN 23:57 Games & Graphics
    RE: Shanghai for Level 2 (Re: Msg 84814)

    I am angry. I am very angry at Earther (Shawn Driscoll). Since He uploaded
    Shanghai, I have not gotten anything accomplished since I am too busy playing
    it. All kidding aside, Shanw, this is excellant work on your part. I am
    extremely impressed. I will stack your program against anything that Tandy
    ever did and there would be no comparison. This is dynamite programming.
    Thank you for taking the time to write it and upload it.
    With all best wishes,
    Brother Jeremy, CSJW
    OS9 User’s Group Treasurer

  • pucc_unknown

    84932 15-JAN 21:17 Games & Graphics
    RE: Shanghai for Level 2 (Re: Msg 84814)

    How about a Missle Command type game for OS-9? Its one of my all time