It is currently Fri Jul 30, 2010 8:50 am

All times are UTC




 Page 1 of 1 [ 14 posts ] 
Author Message
 Post subject: Chuckie Egg... with more colour!
PostPosted: Fri Apr 29, 2005 11:31 am 
User avatar

Joined: Thu Jan 13, 2005 5:20 pm
Posts: 313
Location: Palma, Mallorca
I decided to take a look at Chuckie Egg the other day and figure out why it used so little colour for a Mode 2 game. It turns out that it can be persuaded to display as much colour as the Speccy version...

Image

...with a little prodding.

From the disc image on this site, load it with this Basic program instead of the regular one:

Code:
   edit: new patch below


Hopefully this now makes the Beeb version a contender for the Best Version Ever.

(The reason Chuckie Egg is so stingy on colour is that it defines lots of the palette to be the same colour (yellow or cyan) so that the places where sprites overprint using EOR (e.g. birds on ladders) look OK. However it's easy enough to get the eggs in white, and then the status is made red by a good old-fashioned raster interrupt.)

Of course, this has just reminded me how addictive Chuckie Egg is...


Last edited by Rich Talbot-Watkins on Tue Dec 20, 2005 11:01 am, edited 1 time in total.

Offline
 Profile  
 
 Post subject: Speccy
PostPosted: Fri Apr 29, 2005 3:54 pm 
User avatar

Joined: Wed Feb 02, 2005 3:13 pm
Posts: 1810
Location: Shadow in a Valley of Scotland
Dont see the diff with beeb version and crap speccy version, apart from red background 4 score, and the ladders change colour when u/geese go past them. So it really worse, and ive played it on the speccy MESS emulator, what a lot of crap! Cant even get up ladders properly, and also jumping! :evil:

Anyway, might give that wee proggy a go 2night 4 tha beeb. Cheers :!:


Offline
 Profile  
 
 Post subject:
PostPosted: Sat Apr 30, 2005 8:09 am 
User avatar

Joined: Thu Jan 13, 2005 5:20 pm
Posts: 313
Location: Palma, Mallorca
(post deleted - refers to old version of patch!)


Last edited by Rich Talbot-Watkins on Mon Aug 07, 2006 8:52 pm, edited 1 time in total.

Offline
 Profile  
 
 Post subject: Re: Chuckie Egg... with more colour!
PostPosted: Sat May 07, 2005 10:26 pm 
User avatar

Joined: Mon Mar 14, 2005 9:13 pm
Posts: 900
Rich Talbot-Watkins wrote:
Hopefully this now makes the Beeb version a contender for the Best Version Ever.


Well, I think it's safe to say that the majority of people reading this forum probably had the beeb version pegged as that already, even before your enhancement .. :)

I've added your loader to my site, Rich - it is definitely, most awesome.

For anyone wondering what the effect of the patch is:

Image

To save typing, there's a .SSD image of the latest patch provided with the Resource Kit from my site and I'll send it on to Dave for inclusion in the STH archives as well - probably under the Cheats/Ready Trained section I'd imagine.

Check this out Chuckie fans, it's the most colourful upgrade of all the hacks & upgrades I've detailed on the site ...

Sam.
The Chuckie Egg Professional's Resource Kit
http://www.bagshot-row.org/chuckie-egg/


Offline
 Profile  
 
 Post subject:
PostPosted: Mon May 09, 2005 9:34 am 

Joined: Mon Jan 03, 2005 1:38 am
Posts: 308
Rich Talbot-Watkins wrote:
Cheers!

Nice one RTW!


Offline
 Profile  
 
 Post subject: NEW patch
PostPosted: Mon May 09, 2005 12:59 pm 
User avatar

Joined: Thu Jan 13, 2005 5:20 pm
Posts: 313
Location: Palma, Mallorca
Hi all,

I have a better patch than the one above, which doesn't require the raster interrupt as before, but actually sneaks an extra colour into the palette. This new patch is the version on the Chuckie Egg site.

Scrap the old one above, and try this:
Code:
  10 HIMEM=&3100
  20 P%=&380:[OPT2
  30 LDA&7F:PHA:LDA#136:STA&7F
  40 JSR&1902:PLA:STA&7F:RTS:]
  50 *L.CH_EGG 3100
  55 IF !&49AB=&202AD720 A%=&4B7D:B%=&4CE6
ELSE A%=&4B73:B%=&4CDC
  60 A%?1=7:A%?11=1
  70 ?B%=32
  80 ?&3CC4=138:?&3D01=138
  90 ?&3DFD=136
100 ?&3B0D=128:?&3B0E=3
110 ?&3D23=128:?&3D24=3
120 P%=&900:[OPT2
130 LDX#&27:LDY#0:.q
140 LDA&3100,Y:STA&1100,Y:INY:BNEq
150 INCq+2:INCq+5:DEX:BNEq:JMP&29AB
160 ]
170 CALL&900


Enjoy.


Offline
 Profile  
 
 Post subject: How it works...
PostPosted: Mon May 09, 2005 1:18 pm 
User avatar

Joined: Thu Jan 13, 2005 5:20 pm
Posts: 313
Location: Palma, Mallorca
For those interested in how the patch works, and how I went about figuring it all out, here's a copy of a post I made recently to the BBC Micro mailing list...

----------------------------------------------------------

We load the executable &2000 bytes higher than its load address to allow room for that Basic loader. All the code at lines 110-160 is concerned with is relocating the executable down to the right place (quickly) and running it.


Line 60:
These poke new colours into the palette used by the game.

We deduce that the palette is stored at &2B7D from the following code in the game:

Code:
2B5B:  LDX #&0F         ; start at index 15
2B5D:  STX &88
2B5F:  LDX &88          ; loop start: get index
2B61:  STX &2B78        ; store colour index
2B64:  LDA &2B7D,X      ; lookup physical colour
2B67:  STA &2B79        ; store physical colour
2B6A:  LDX #&76
2B6C:  LDY #&2B
2B6E:  JSR &1A26        ; print string pointed to by &YYXX
2B71:  DEC &88          ; dec loop index
2B73:  BPL &2B5F        ; re-loop
2B75:  RTS
2B76:  <06>             ; length of string to print
2B77:  <13>             ; VDU 19
2B78:  <00>             ; poked with colour index
2B79:  <00>             ; poked with physical colour
2B7A:  <00> <00> <00>


As standard, the game makes special use of the following colours:

0 black (background)
1 yellow (eggs + lift)
2 magenta (grain + ladders + score)
3 green (platforms)
4 yellow (you + big bird+cage)
8 cyan (enemy birds)

The other palette entries echo these colours in appropriate ways. Since all sprites are EORed on the screen, other colours will arise, e.g. when a cyan bird climbs a ladder, we will get pixels in colour (8 EOR 2)=10. Hence the game sets colour 10 to cyan so we don't notice these artifacts (birds appear in front of ladders).

Now, it turns out that eggs have an independent palette entry (colour 1) to the main character and the big bird. This is so the big bird doesn't overprint eggs and leave a black egg-shaped hole (4 EOR 4 = 0). But this means we can trivially set this palette entry to colour 7 instead of 3 (?&4B7E=7). Voila, white eggs.

It also turns out there's an overprint which is never possible - cyan birds over green platforms (I think this is true anyway?). This corresponds to colour 11 (8 EOR 3), so we'll define this as red (?&4B88=1) and print our status sprites in this new colour.


Line 70:
This is a cosmetic change. We have changed colour 1 to white from yellow.

The main title 'CHUCKIE EGG' is printed in colour 1, so in order to make sure it stays in yellow, we now explicitly change its print colour to colour 4 (which is still yellow). Here's where this appears in the executable:

Code:
2CE5:  LDA #&02   ; select physical colour 1 (PATCHED)
2CE7:  STA &7F    ; store in 'colour' variable used by sprite plotter
2CE9:  LDA #&30   ; select sprite &30 ('C' in 'CHUCKIE EGG')
2CEB:  LDX #&02   ; X position 2
2CED:  LDY #&F0   ; Y position &F0 (0=bottom, &FF=top)
2CEF:  JSR &2DBE  ; plot sprite


2DBE is a generic routine which takes a colour in ?&7F, a sprite number in A, and coordinates in X,Y, and draws a sprite. By changing LDA#&02 to LDA#&20, we plot the sprite in colour 4. (The value used is the one which would set the leftmost pixel of the byte to the desired colour in MODE 2).


Line 80:
these are involved with changing the colour the status sprites ('score', 'level', 'time', 'player', 'bonus') are printed in, from magenta (colour 2) to red (colour 11). In each case, there is code setting ?&7F to 8 (colour 2: magenta). We just want to change it to 138 (colour 11: red). ?&3CC4=138 deals with the 'score' sprite:

Code:
1CC3:  LDA #&08   ; select colour 2 (PATCHED)
1CC5:  STA &7F
1CC7:  LDX #&00
1CC9:  LDY #&F8
1CCB:  JSR &1987  ; set up screen address from X/Y
1CCE:  LDA #&29   ; select sprite 'SCORE'
1CD0:  JSR &19DB  ; set up sprite address in A
1CD3:  JSR &1902  ; print sprite (screen+sprite addrs
                  ; must already be set up)


?&3D01=138 deals with the other status sprites:

Code:
1D00:  LDA #&08   ; (PATCHED)
1D02:  STA &7F
1D04:  LDX #&00
1D06:  LDY #&E8
1D08:  JSR &1987
etc



Line 90:
This pokes a routine which appears to print the score for the first time. We want white scores, so we need to overprint the red background in colour (11 (red) EOR 1 (white)) = 10. This corresponds to a screen byte value of 136. This does mean that scores not on a red background (i.e. other players') will appear cyan (colour 10), but hey-ho, it's all a bit of extra colour isn't it?

Lines 20-40, 100, 110:
This is all to do with plotting digits. We already know that we need to print them in colour 10. The game used to plot them in colour 2 (which, overprinted on a background of colour 2 yields colour 0 - black). In these cases, colour 2 is already set up, so these pokes patch the call to the sprite routine (JSR &1902) and replace it with a call to my own assembler routine in lines 20-40:

Code:
; generic number printing code (A = digit to print)
1B01:  PHA        ; save A
1B02:  JSR &1987  ; set up scrn address from X/Y
1B05:  PLA        ; restore A
1B06:  CLC
1B07:  ADC #&1F   ; add 31 (digits are sprites 31-40)
1B09:  JSR &19DB  ; set up sprite address in A
1B0C:  JSR &1902  ; print sprite (PATCHED)
1B0F:  RTS

; print player number
1D1A:  LDA &5D    ; player number
1D1C:  CLC
1D1D:  ADC #&20   ; digit 1 base
1D1F:  JSR &19DB  ; set up sprite address in A
1D22:  JSR &1902  ; print sprite (PATCHED)


My assembler routine just saves the colour at ?&7F, sets it to colour 10, calls the original routine, and then restores the old value of ?&7F. This seems to work very nicely because Chuckie Egg never touches the memory at &380..&3E0, so we're free to fill it with any patch code we need.


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 7:39 pm 

Joined: Wed Jun 08, 2005 7:32 pm
Posts: 2
Quote:
It also turns out there's an overprint which is never possible - cyan birds over green platforms (I think this is true anyway?).


Found one :wink:
Level Three
Bird in the bottom right hand corner.

When it climbs the ladder it (slightly) intersects the block above it giving a slightly red head. Hardly significant - but it is there...

Chris.


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Aug 07, 2006 1:27 pm 
User avatar

Joined: Mon Mar 14, 2005 9:13 pm
Posts: 900
The disk image I submitted has finally made it into the STH archive:

http://www.stairwaytohell.com/bbc/archi ... olours.zip
Jul 10 2006 23:56:17 10042 bytes

I added a !BOOT loader and modified Rich's patch so that it includes the other cheat patches he posted to the BBC Micro Mailing List. On loading, it provides the options to toggle the various extra cheats/features, including the extra colours, all without modifying the original source files. It can be used with either of the two known variants of BBC micro Chuckie Egg doing the rounds on the internet ...

Well worth upgrading your original CE disk to this ... !

Sam.


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Aug 07, 2006 5:05 pm 

Joined: Sun Dec 11, 2005 7:46 am
Posts: 75
Going a wee bit off topic... did anyone ever get past the third set of eight levels (i.e. past the set with the chickens only, then the set with the crazy duck only, then the set with both)...?

Cue a stream of 'yes' responses making me feel a bit inadequate... ;)


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Aug 07, 2006 6:59 pm 
User avatar

Joined: Wed Aug 24, 2005 12:13 pm
Posts: 1829
Location: Back of beyond
I could get on to those levels but not sure how far into them I got, probably same as you. However I'm sure my nephew got a fair way into them.


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 9:06 am 
User avatar

Joined: Mon Mar 14, 2005 9:13 pm
Posts: 900
Certainly did ... stealing from my own CE fansite, in relation to the BBC version:

Levels 1-8: First time round, there were two or three hens per level.
Levels 9-16: The second time around the duck came out of the cage, and would dive-bomb you all the time.
Levels 17-24: On the third time round, Harry has to avoid both the initial hens and the duck.
Levels 25-32: The fourth time round introduced the full compliment of five hens per level, making it even harder to avoid the duck.
Levels 33-40: Finally, the last set through had all five hens walking at top-speed, as well as the duck.

This last set was repeated all the way through until the final level (255, displayed as Level 0) - the only thing that changed from here was that the time available was reduced until it reached 100, which made it ridiculously hard to complete a level without losing a life.

When you complete level 255, it loops right back to level 1 and it all starts all over again ...

You can see screenshots with the initial placement of all five hens on each of the eight level layouts here:

http://www.bagshot-row.org/chuckie-egg/levels.html

HTH,

Sam.
--
The Chuckie Egg Professional's Resource Kit
http://www.bagshot-row.org/chuckie-egg/

P.S. I got past level 40 on my own, but getting to level 255 required the use of a level select - like the one built into the modified version of CE described in this thread! :)


Offline
 Profile  
 
 Post subject:
PostPosted: Sat Aug 18, 2007 1:15 pm 
User avatar

Joined: Mon Mar 14, 2005 9:13 pm
Posts: 900
Just in case anyone's interested - Rich's Chuckie Egg colour hack was pictured in Retro Gamer's Issue 40 The Making Of... Chuckie Egg article, tho he wasn't actually namechecked.

Sam.


Offline
 Profile  
 
 Post subject: CPC version
PostPosted: Thu Aug 23, 2007 9:04 pm 

Joined: Wed Jan 10, 2007 9:18 am
Posts: 33
Location: London
I tried the CPC version of Chuckie Egg recently and it is very similar to the BBC version but with more colours. The levels are squashed slightly to fit into 320x200 and if you jump and bang your head on the platform above you bounce off it downwards.

Image

Not quite as good as Rich's extra colours version, but definitely better than the Speccy one!


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: station240 and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

phpBB skin developed by: John Olson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group