Jump to content

Recommended Posts

Included here are the initial set of sources for the game "Colony".

The intention is to use this thread as a place for discussion/submission

of patches to these in order to produce a working game.

 

Initial discussions on the bugs in the game can be seen on this thread:

http://www.atariage.com/forums/index.php?showtopic=71245

 

I've included the patches mentioned in that thread within the graphics.s file.

So this first build should at least gets us past the graphics corruption :)

 

Recommendations for suitable names for address labels are welcome too :cool:

 

The executable is built using the tools found in the CC65 suite, driven by a makefile.

Turning this into source for a different assembler shouldn't be difficult,

generally in CA65 you have a character after a label (i.e. ':') and use

directives such as .BYTE, .WORD and .RES which can easily be search&replaced.

 

Ultimately I'd like to iron out some of the address references such that the

whole source can be relocated easily to anywhere in memory. That would

then make a good base for anyone wish to make a 5200 port as I'm sure

the working RAM used in the game is < 16K!

 

An example of what I mean would be the tables at $3E6C for VectorsLo & VectorsHi.

This could be replaced with a .WORD array of the actual routine name labels instead.

 

Good luck!

 

Mark / Wrathchild

colony_patched_sources_release_1.zip

Edited by Wrathchild

Hi,

 

I've messed around with C# today (for a change) and wrote

a silly(*) application to display the graphics out of the dumped

memory image. This was based on tables found in the data

used to draw images in the game.

 

As you can see the Black & White graphics are the ones corrupted

and so these need to be re-made. I'm not sure that the same

graphics are used in the C64 game and so could be lifted?

Anyway, I think the way to find out what each image is would be

to run the current game build and pick up various objects,

ordering them if necessary, and checking the corrupted patterns

against those in the attached picture to know where to replace

the data. For example, the image at $85F6 looks to begin with

the grown mushroom, so I'd expect the next image to maybe

be the first decay stage of a mushroom?

 

If anyone wants the source for the program then let me know

and I'll post it up (developed using the 2005 Express Edition).

 

Regards,

Mark

 

(*) Silly as it redraws quite slowly as I used a FillRectangle

to plot very pixel, does anyone have a quicker Atari 'byte'

to screen in 2 or 4colours drawing routine?

 

[EDIT] actually speed was hampered by running in debug mode,

running the resulting exe directly worked much better ;)

post-1822-1189778441_thumb.jpg

Edited by Wrathchild

Do you mean different versions of the A8 game or from different platforms?

I wouldn't suspect the corruption to occur on other platforms as they would

have been built from different source code. The data area corrupted contains

some source code and so I'd think this an error on the programmer creating

the master image.

Aside from the corrupted graphics - which is more of an annoyance,

the bugs to be fixed center around the addition of random objects to

the map which interferes with the game, for example I had something

like bullets appearing which when walked over sapped all of your

energy causing you to die. Most often it was mountain characters

starting to appear in the town!

 

Some further checks to see if this occurs as a result of:

1) the supply ship landing or

2) the activation of the support droid

I suspect something to do with the later as the random

appearences seem to increase whilst you're playing.

 

It probably requires importing the labels into the A800WinPLus

emulator and running a big trace to file and then trawling through

that. Using the 'B' facility for a write within an address range,

it could be possible to detect the writes to the map memory

and then work back from there, but as much is moving (enemies,

mushroom states etc) that may prove tricky unless checking

the value too for something specific, e.g a mountain.

 

Regards,

Mark

Do you mean different versions of the A8 game or from different platforms?

 

I meant check the existing versions on a8 (e.g. that one i've found on mapy.atari8.info site (someone told me that it's different a bit - it was attached in "Colony" topic in Atari 8-bit section of AA-forum, too).

Thanks Miker, certainly the Mapy game image

has the Black&White graphics almost correct,

only at $8706 I changed $0F, $40 to $10, $02

and at $874A the four bytes $18, $03, $10, $02

to $10, $02, $00, $00.

 

The Mapy image does crash also soon after

giving the droid the battery and so I have

looked at the code and this does differ slightly

and so some analysis of 'what' would need to

be done. At first glimpse it looks like some code

changes have been made around address $33CF

causing lots of address references to differ by

7 bytes. These logic behind these extra instructions

should be investigted too. Also it should be confirmed

if Mastertronic put out different versions or if there

has been some previous attempts at patching?

 

Attached is the updated graphics.s source file

and a rebuilt executable.

 

Regards,

Mark

colony_patched_sources_release_2.zip

post-1822-1189981212_thumb.jpg

I really doubt there was a cassette release other than the one we all know. They didn't do it for Universal Hero so they certainly wouldn't have spent development time and money on fixing Colony (this was a budget game after all). Maybe they weren't even aware of the bug at the time.

 

Why is the code different on that tape-to-disk crack?

 

--

Atari Frog

http://www.atarimania.com

I can only speculate :( :?:

 

Perhaps the original coder had a pang of guilt and

decided to release a better version on the sly?

The disk version does have a set of three NOPs

together though at $33D1 so it may have been

a 'scene' patched version after all?

 

I'll need to reverse engineer the disk based version

before proper conclusions can be made though and

I've some other coding I need to finish up first.

 

Regards,

Mark

Just a quick comparison of the memory dumps

of the 2 versions shows that the Cassette verison

has empty memory from $53D0 to the start of

the music/sound routines at $5A00. The Disk version

has code here and the strings inside imply that

this may have been a release specifically for disk?

post-1822-1190022706_thumb.jpg

Can a scripting guru quickly knock this up for me?

 

Loop through the attached file and replace any

hex address in the range 0x33D0 to $59FF with

that value plus 7, e.g. line 1547 would change from:

MakeName	(0x412b,	"NoBeaconFound");

to

MakeName	(0x4132,	"NoBeaconFound");

I'm interested to see how this could be done

in either 'sed', 'perl' or anything else people tend to use :)

 

Thanks,

Mark

Colony_idc.zip

Edited by Wrathchild

My guess is that it was made with a tape-to-disk copy utility, specifically one that will create a boot disk from a tape you just loaded. The only official release was on cassette.

 

--

Atari Frog

http://www.atarimania.com

  • 1 month later...
Oh, haven't looked here for ages.

 

Any news on this?

 

Btw. the attachment has been sent to someone who can deal with it. ;)

Thanks Miker, I'd seriously considered doing it by hand, :D

but seriously would love to see script for the transform.

 

The altered file would be used to confirm those differences,

but I think the remaining bugs in the game would remain

and hence would need to be fixed.

 

Best wishes,

Mark

Edited by Wrathchild
  • 2 weeks later...
If anyone wants the source for the program then let me know

and I'll post it up (developed using the 2005 Express Edition).

 

Regards,

Mark

 

(*) Silly as it redraws quite slowly as I used a FillRectangle

to plot very pixel, does anyone have a quicker Atari 'byte'

to screen in 2 or 4colours drawing routine?

 

[EDIT] actually speed was hampered by running in debug mode,

running the resulting exe directly worked much better ;)

Can you post the C# code. I'd be interested in taking a look at it. :)

  • 1 month later...
Can a scripting guru quickly knock this up for me?

 

Loop through the attached file and replace any

hex address in the range 0x33D0 to $59FF with

 

Replying to an old post, but... Are you still looking for a perl/whatever script to do this?

 

I threw something together in perl, see if this works and/or makes any sense:

 

#!/usr/bin/perl -w

sub fixaddr {
my $addr = hex($_[0]);
return sprintf "0x%04x", $addr + 7 if $addr >= 0x33d0 && $addr <= 0x59ff;
return "0x$_[0]";
}

while(<>) {
s/0x([0-9a-f]{4})/fixaddr($1)/ge;
print;
}

 

Paste into a text file, run it as "perl scriptname.pl colony.idc > colony_fixed.idc"

 

Also attaching the output, in case it's inconvenient for you to install/run perl on your OS...

 

colony_idc_fixed.zip

I understand that there's a 'debugged' or patched version of Universal Hero available (I think it was done in eastern europe) any idea where i can get it from (emulator format)

  • 2 weeks later...

Hi,

I'll check this out shortly and feed back any findings.

I had checked this but have only just gotten around to reporting back ;)

 

The differences aren't worth worrying about. In the version I first used the Init code looks like this:

GameInit:
SEI	 
CLD	 
LDX	 #$FF
TXS	 
JSR	 TitleScreen
GameLoop:

In the other version it looks like this:

GameInit:
SEI	 
CLD	 
LDX	 #$FF
TXS	 
LDA	 #$FE
NOP	 
NOP	 
NOP	 
JSR	 TitleScreen
LDA	 #$58; 'X'
GameLoop:

And so the additional code (7 bytes) actually has no effect other to simply shift quite a chunk of the game code forward a bit in memory. As the jump/call addresses are (relatively) the same between the two, I can only conclude that there must have been separate builds produced as opposed to someone hacking one to produce the other. Strange...

 

Mark

Edited by Wrathchild
  • 3 months later...

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...