Jump to content
IGNORED

Project to make Mastertronic's "Colony" work


Recommended Posts

  • 3 months later...
  • 9 months later...

Sorry Miker, but this hasn't been on my radar for a long time :(

 

Anyone know if the C64 has the same bug? I'm presuming they must share a good deal of the code and so maybe a disassembly of that and a comparison with the XL version will shed some light on the error?

Link to comment
Share on other sites

I'm presuming they must share a good deal of the code

Disassembly of the C64 done, but an initial scan doesn't appear to give a lot of overlap with routines etc. Slightly odd that that should be the case but it means a more intense comparison is required, e.g. try and match function names, variables to make the C64 assembly more readable.

 

Sonar goes faint again ;)

Link to comment
Share on other sites

  • 13 years later...
On 6/23/2009 at 10:40 PM, Wrathchild said:

Sonar goes faint again ;)

Hi Mark,
somebody asked me recently about this on czech 8bit group on FB. I remembered there was some work done with this, so I dug up all the versions and I'm pretty sure I know why it crashes.

Any NPC has 4x4 sprites (4 directions x 4 animation frames), these are referenced from the table at $3749 (I used polish ATR with correct black&white graphics). The table has order ANT, BUG, DROID. The last droid sprite of going up should be at $9F9E. But the binary is shorter, which leads to crash. It is enough to put $20, $3 at $9F9E in debugger and it does no longer crash (it would blink, but no crashes).

Because I did not follow all of your patches, I'm leaving this in your hands to produce bug-free Colony binary.

Edited by jindroush
  • Like 1
Link to comment
Share on other sites

In that case I'm lost. I was aware of two bugs:
a) in widely circulated image, some bw icons of items were overwritten, then, after taking the items, the status got broken. This worked okay in "polish" image.

b) in both 'old' and 'polish' images, after the droid got battery, the screen/memory got randomly overwriten and game crashed after a while
Both of these should be solved.
Can you simulate the bug you mention? Because I can't - if the ship drops and beacon is on, the tables at $27E3/$27FE say where to drop items in beacon room. If beacon is off, the items are scattered at positions given in tables $27C3, $2783 & $27A3. And when I check memory after the drop, I can't see any problem... (active landscape map is between $1000-$1FFFF).

Edited by jindroush
Link to comment
Share on other sites

50 minutes ago, jindroush said:

Both of these should be solved

From the thread link in the 1st post of this topic, all of the candidates had the map corruption.

53 minutes ago, jindroush said:

Because I can't

Here you only describe the 'drop' and not post adding the battery to the droid.

From what I recall at that point a 'wipe seems to occur and it's possible that the corruption occurs during that. So a debug session should be able to help there, but it may help identifying some more labels to make that readable. 

Link to comment
Share on other sites

Uhmhm. Yes. The only necessary condition for this to happen is to give the droid battery (E 5340 FF FF) and be in the next room to the droid (this is only the assumption, but I've never seen it happen otherwise)

There is some pointer confusion in function $4330 which does clear fireball - the function wants the on-screen-pointer and writes 8 zeroes to clear it, but instead it is given the map pointer and creates 8 items of code 0 = rocks.

Link to comment
Share on other sites

Ok, in the main loop, remove third JSR (in my case $20 $3c $44), change it to $EA $EA $EA. That should do it - can you confirm it?
This code does play with removing fireballs and it always takes the last processed one - and since droid is always the last, it's only droids fireballs causing this. Since this code is also called from the main npc processing, I'm not sure why it was put here.
BTW: there are at least two additional bugs: there is destroyable elements table at $3949, containing $37,$3B,$3E,$53, and I think it should be $37,$3B,$3F,$53.
And, also, after the death of the player, the pmg/sound are in wrong state?
BTW: Should droid be eating fences?

Edited by jindroush
  • Like 1
Link to comment
Share on other sites

The only reference I see to $443c is here?

 

sub_0_4435:                ; CODE XREF: seg000:33D8�p
                ; sub_0_3476+58�p
    LDA    word_0_FD
    ORA    word_0_FD+1
    BNE    loc_0_443C
    RTS    
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

loc_0_443C:                ; CODE XREF: sub_0_4435+4�j
    LDA    word_0_FD
    STA    VecPtr1
    LDA    word_0_FD+1
    STA    VecPtr1+1

 

and $3949 contains code?
 

loc_0_3946:                ; CODE XREF: seg000:3992�j
    LDY    #0
    LDA    (word_0_FD),Y
    SEC    
    SBC    #1
    STA    (word_0_FD),Y

loc_0_394F:                ; DATA XREF: seg000:399F�r
    JMP    loc_0_39B0

 

So not sure what you're working with.

Link to comment
Share on other sites

  • 3 weeks later...

So, after a bit of testing, I present 'maybe probably likely perhaps possibly fixed' Colony version.

Attached is ATR and also the (almost) complete disassembly of the game, so anybody can continue the fixing.

The fixes:
1 - black & white inventory images overwritten by assembly - this was fixed in the 'polish' version I started with (causing status window destruction when taking certain items), also done by Wrathchild
2 - added 'empty' droid going up4 image, because of shortened dump by one sector (causing memory overwrites and game crash as soon as droid moved), also done by Wrathchild
3 - finally fixed droid image up3 & up4 by switching colors 2 & 3 from player images
4 - fixed b&w droid spare body inventory image, done by Wrathchild
5 - removed second call for fireball cleaning (this was causing random map overwrites, because of double call when droid was activated, writing to map thus dropping rocks, instead of screen, cleaning fireball)
6 - fixed fence list ($3F instead of $3E) - this is more of a guess
7 - removed some disk editor data - this was only in polish version, some data of disk editor/copier in middle of image
8 - fixed bw font - some letters on the left were borken, fixed according to my taste ;)
9 - lengthened PMG background under selected tool in status window by 1 line - 1-off mistake
10 - removed extra lda's in init, extra initialization of unused variables, removed one never-called routine etc.
11 - adding graphic as mentioned here, done by Wrathchild

 

What could be done better and I did not do it in order to preserve binary image for easy comparison

A) Death - the death screen does not stop sound and PMG. Does stop interrupts and then waits forever for decrementing in interrupts. Etc.
B) Lots of empty memory blocks could be removed, also one of the graphics blocks could be removed (gr_mysterious) shortening the image.
C) Most of game variables could be removed from the binary altogether, again shortening the image.
 

colony.atr colony_src.rar

  • Like 8
Link to comment
Share on other sites

  • 1 year later...
On 1/16/2023 at 10:22 AM, jindroush said:

So, after a bit of testing, I present 'maybe probably likely perhaps possibly fixed' Colony version.

Attached is ATR and also the (almost) complete disassembly of the game, so anybody can continue the fixing.

The fixes:
1 - black & white inventory images overwritten by assembly - this was fixed in the 'polish' version I started with (causing status window destruction when taking certain items), also done by Wrathchild
2 - added 'empty' droid going up4 image, because of shortened dump by one sector (causing memory overwrites and game crash as soon as droid moved), also done by Wrathchild
3 - finally fixed droid image up3 & up4 by switching colors 2 & 3 from player images
4 - fixed b&w droid spare body inventory image, done by Wrathchild
5 - removed second call for fireball cleaning (this was causing random map overwrites, because of double call when droid was activated, writing to map thus dropping rocks, instead of screen, cleaning fireball)
6 - fixed fence list ($3F instead of $3E) - this is more of a guess
7 - removed some disk editor data - this was only in polish version, some data of disk editor/copier in middle of image
8 - fixed bw font - some letters on the left were borken, fixed according to my taste ;)
9 - lengthened PMG background under selected tool in status window by 1 line - 1-off mistake
10 - removed extra lda's in init, extra initialization of unused variables, removed one never-called routine etc.
11 - adding graphic as mentioned here, done by Wrathchild

 

What could be done better and I did not do it in order to preserve binary image for easy comparison

A) Death - the death screen does not stop sound and PMG. Does stop interrupts and then waits forever for decrementing in interrupts. Etc.
B) Lots of empty memory blocks could be removed, also one of the graphics blocks could be removed (gr_mysterious) shortening the image.
C) Most of game variables could be removed from the binary altogether, again shortening the image.
 

colony.atr 31.89 kB · 43 downloads colony_src.rar 48.85 kB · 28 downloads

 

Wow!  Only noticed this thread resurfacing last week.  As a 'campaigner' of this project im a little disappointment that i never kept up on developments and late in checking this out.

 

Anyway - a big thank you to @Wrathchild and @jindroush for the work put into this.

 

I glad to say that the remote droid is up and running and has no random rock generation going on.  (although he is completely mad and goes on a rampage with no agenda! 😃)

 

Ive play tested around 10 hours worth and its definitely a playable version that's now available - well done guys!

 

 

Now that the worst is fixed, its clear that the developer(s) had other issues during programming.  The bugs left are don't spoil things too much but ive listed what ive noticed:

 

1. Some of the fence storage facilities state that you have 0 in stock but if you pick up fences the real inventory appears when counting. (it still keeps stock of what you really have but sometimes shows 0 on screen)

 

2. Sometimes if you pick up seeds from a drop off and go to the seed store and click drop mushrooms off - you get several thousand credits instead (nice to have as its a killer in normal play to get any build up.)

 

3. Occasionally the game will just freeze up for no reason (luckily i play this in Altirra so i save periodically).

 

4. Remote droid is known to just vanish out off the game with no reason (not often but hapoens) new droid needed on next shipment. 

 

Other than that its a enjoyable spinning plate/management game that keeps you interested.

 

(20k - would take me weeks to get that in a normal game)

image.thumb.png.e744c4cd619cbe7e1378c05b0582e767.png

 

 

 

 

 

 

 

Edited by Magic Knight
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Many thanks to jindroush and Wrathchild for great work on this ! You have repaired my favourite game, that i played in my childhood. Now, after 35 years, I can finally play it without crashes.

I'm amazed how could Mastertronic sell unplayable game.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...