Jump to content
anny84

Coke wins could be hacked...?

Recommended Posts

Yay! now the game is not timmed at all, you start with 3 lives, and when you clear the screen, you get another. If a missle hits you, you lose a live. Now the score needs to be hacked, it does not go very high.

 

Careful...there is no penalty for just hanging around to do "UFO hunting", since the invaders do not ever reach Earth in Coke Wins. So you can rack up some huge scores if you are good at dodging missiles (if you keep 4 invaders in both of the edge columns, you don't even need to do that).

 

One of the now-unused timers could be used as a UFO counter...so that only a limited number of them appear in any wave.

 

Yes, this is why I changed it so you can not get more lives.

 

Where is the UFO code and how does the game decide to have the UFO on the screen?

Share this post


Link to post
Share on other sites

Working on the original Space Invaders cartridge could be nice.

What a pity I cannot give my contribution since I'm not a programmer :( :ponder:

 

I will keep track of all tips until now and some new tip:

 

- Gaining/Losing time (+1min for a wave, +25sec for a mothership, -1min when lose a life)

- Gaining/Losing lifes (+1life for a wave and/or, for example, every 1.500 points)

- Life number variable (1 to 5)

- Different score computation (e.g. 1 to 6 for ufos, 10 for mothership)

- No shields

- More faithful sprites for Ufos and Motherships

- Smaller sprites for Ufos, if possible

- Beautiest score fonts like the Coke Wins version

- Leaving cannon position unaltered after losing a life like in the Cokie Wins version

 

If anyone has other improvement tips please copy this list in a new message and add to it.

 

Anny

Share this post


Link to post
Share on other sites
Where is the UFO code and how does the game decide to have the UFO on the screen?

 

My memory is a little fuzzy regarding SI...but it looks like it's done here:

 

LF5AA:
   dec	$C6					;5 decrease UFO delay
   bne	LF5D1				  ;2 branch if anything left
   lda	$91					;3 load # invaders left
   cmp	#$04				   ;2 at least 4?
   bcc	LF5D1				  ;2 branch if less (skip UFO)

;added
   lda	UFOcounter			 ;3 check the number of UFO's remaining
   beq	LF5D1				  ;2 branch if already zero
   dec	UFOcounter			 ;5 decrease the count


   bit	$9F					;3
   bmi	LF5BA				  ;2
   bvc	LF5D1				  ;2

 

The 3 added lines should work. Use one of your free bytes of ram for the UFOcounter, and Reset it to how many you want in a wave at the start of each wave (or life, etc.)

Share this post


Link to post
Share on other sites

Ok...

 

Coke Wins! COKEWINS 4K 78BIOS

 

 

To play this on the Cuttle Cart 2

 

And I got a score of 8,380... fun game. I can see why you like this version of Space Invaders.

Share this post


Link to post
Share on other sites
Ohhh Can I get one too? "Pepsi Invaders 2" or "Coke wins Again" !

 

I can probably make you a cart for around $25.

 

 

I might be interested in that offer. :cool:

Share this post


Link to post
Share on other sites

Would anyone know a good font that looks like the coke logo? I always thought Coke Wins was a nice twist on the classic, and this hack deserves it's own cart.

Share this post


Link to post
Share on other sites
Ohhh Can I get one too? "Pepsi Invaders 2" or "Coke wins Again" !

 

I can probably make you a cart for around $25.

 

 

I might be interested in that offer. :cool:

 

 

If you are interested, send me a PM, but I only have 1 cartrige shell left, and that one is reserved for something else. If you want one, then You will have to wait till I get some more cartrige shells, which should be soon.

Share this post


Link to post
Share on other sites
Where is the UFO code and how does the game decide to have the UFO on the screen?

 

My memory is a little fuzzy regarding SI...but it looks like it's done here:

 

LF5AA:
   dec	$C6			;5 decrease UFO delay
   bne	LF5D1				;2 branch if anything left
   lda	$91			;3 load # invaders left
   cmp	#$04				 ;2 at least 4?
   bcc	LF5D1				;2 branch if less (skip UFO)

;added
   lda	UFOcounter		;3 check the number of UFO's remaining
   beq	LF5D1				;2 branch if already zero
   dec	UFOcounter		;5 decrease the count


   bit	$9F			;3
   bmi	LF5BA				;2
   bvc	LF5D1				;2

 

The 3 added lines should work. Use one of your free bytes of ram for the UFOcounter, and Reset it to how many you want in a wave at the start of each wave (or life, etc.)

 

i do not know why the space ship is not comming up, this is what I added:

 

LF3FB:

   iny						  ;2

   adc	#$10				  ;2

   cmp	$D7				;3

   bcc	LF3FB				 ;2

   sty	$EF				;3

   ldx	$F0				;3

   lda	LFCDC,Y			;4

   and	$92,X				 ;4

   beq	LF3D7				 ;2

   eor	$92,X				 ;4

   sta	$92,X				 ;4

   lda	LFD2B,X			;4

   sta	$E8				;3

   lda	#$02				  ;2

   jsr	LFE80				 ;6

   dec	$91				;5 decrease invader count

   bne	LF429				 ;2 branch if any left



;all invaders shot (positive timer adjustment)
lda #1
sta UFOcounter


   lda	$A9				;3

   and	#$0F				  ;2

   cmp	#$09				  ;2

   beq	LF420				 ;2 branch if already at 9 minutes

 

and...

 

LF5AA:							
   dec	$C6				;5

   bne	LF5D1				 ;2

   lda	$91				;3

   cmp	#$04				  ;2

   bcc	LF5D1				 ;2

lda UFOcounter
beq LF5D1
dec UFOcounter

 

and at the top:

 

UFOcounter	   equ $A8

cokewins22.bin

Edited by Wickeycolumbus

Share this post


Link to post
Share on other sites
Would anyone know a good font that looks like the coke logo? I always thought Coke Wins was a nice twist on the classic, and this hack deserves it's own cart.

 

Try this one.

Share this post


Link to post
Share on other sites

Thanks for your job! ;)

Just for a summary: please can you write a short detail down, with all differences you made on the original Coke Wins?

Of course, no need to publish again the source differences, just a "whatsnew" with game play differences.

 

Anny

Edited by anny84

Share this post


Link to post
Share on other sites

I'd be interested in a cart too. I woud send you a combat or something to use for the shell

Edited by midnight8

Share this post


Link to post
Share on other sites
I'd be interested in a cart too. I woud send you a combat or something to use for the shell

 

Sure, send me a PM.

 

If anyone else wants one, I only have 8 boards, so let me know. These are the ones on hold right now:

 

1) FireTiger
2) midnight8
3)
4)
5)
6)
7)
8) Mine

Share this post


Link to post
Share on other sites
Would anyone know a good font that looks like the coke logo? I always thought Coke Wins was a nice twist on the classic, and this hack deserves it's own cart.

 

Try this one.

Ah, yes. I came across that one on my journeys, but I was thinking about using this one:

post-16761-1209251702.jpg

I guess they only use it for Diet Coke now?

 

Anyways, I'll just use a similar one.

Edited by cosmosiss

Share this post


Link to post
Share on other sites

OK, two problems here. First the score flips at 10,000, which is only a couple of rounds.

 

Second: this game, since it's supposed to be timed, doesn't increase in difficulty. Making it a life-based game basically means any halh-way decent player will never loose and play forever. Also I think it looses it's charm and becomes just another Space Invaders.

 

So far I think the best version is the second one: 10 min game, lose a min when hit, gain a min when round is cleared.

 

This is all, of course, my opinion :dunce:

Share this post


Link to post
Share on other sites

Update on the cart purchases/reservations:

 

1) FireTiger
2) midnight8
3) Elw00d
4)
5)
6)
7)
8) Mine

 

Here is a pic of what you will get for $25 plus $5 shipping to the US. If you send me a cart, I will subtract $5 from the price of the cart. I accept paypal and Money Order.

post-12776-1209256048_thumb.jpg

Share this post


Link to post
Share on other sites

Well, I tried to make it a bit more challenging. I started with Nukey's (hope you don't mind), so it's three minutes, take one when hit, give one when wave is cleared. Now invaders move faster from the beginning and the last one (the alien) blinks, and it can't be shot when invisible. And now the I is smaller ;)

 

Also fixed those horrible colors and changed some of the sprites. Your base is now smaller to balance things out a bit.

 

Next I'm gonna try to figure out how to divide all point awards by ten. This would make it more difficult to flip the score.

 

coke_wins_again.bin

Share this post


Link to post
Share on other sites

Table LFD2B holds the point values. It's listed right in the disassembly.

LFD2B:;points per invader...6 bytes
   .byte $05; |	 X X| $FD2B
   .byte $10; |   X	| $FD2C
   .byte $15; |   X X X| $FD2D
   .byte $20; |  X	 | $FD2E
   .byte $25; |  X  X X| $FD2F
   .byte $30; |  XX	| $FD30

 

 

The code for the flying logo points is here:

LF3B8:
   bit	$82					;3
   bvc	LF3D3				  ;2
   lda	$C9					;3
   and	#$39				   ;2
   cmp	#$39				   ;2
   beq	LF3D3				  ;2
   lda	#$39				   ;2
   sta	$C9					;3
   lda	#$04				   ;2 4 (x100)
   sta	$C6					;3
   sta	$E7					;3 save to high adder

 

 

The LDA near the end sets the point value. To divide this by 10, use a value of 40 and store to the other addition variable...

 

	   lda	#$40				   ;2 40
   sta	$C6					;3
   sta	$E8					;3 save to low adder

 

 

All point values in the addition variables are multiplied by the wave #.

Share this post


Link to post
Share on other sites

Ah, yes I remember seeing the points table, but I was so busy looking for the colors (they were a b!7ch to find) I forgot all about it.

 

How come the tables on your disassemblies look so neat? is that cfg made by yourself? Mine come out like this:

 

LFD2B: .byte $05,$10,$15,$20,$25,$30

 

 

 

All point values in the addition variables are multiplied by the wave #.

All this is over my head ATM, but is there an easy way to eliminate this? I promise to keep on reading my ASM book :dunce:

Share this post


Link to post
Share on other sites

Yeah, I use my own .cfg files. The contents are always shown at the top of the disassembly. A .cfg allows 4 operators - ORG, CODE, DATA, and GFX. While it's suggested to use DATA for any non-bitmap values, GFX has the advantage of automatically placing each value on a seperate line and listing it's address where it exists in the rom. I normally use 2 preliminary steps to create a .cfg...by examining a temp file that Distella created automatically without a .cfg, then once again in "dumb mode" (-d) to see if it lists any coded routines that Distella missed detecting. A 3rd time using the .cfg is the final run.

 

IMO the GFX tag would have been better implemented if it automatically converted values to binary...and DATA if it too placed all values on seperate lines.

/gripe

 

 

The multiplication is done right in the score addition routine...the SED instruction usually points right at such routines, and this game is no different:

 

 

	   sed						   ;2 BCD mode
   ldx	$99					;3 wave #
   inx						   ;2 bump by 1
LF4A9:
   lda	$DC					;3 score LSB
   clc						   ;2
   adc	$E8					;3 low adder
   sta	$DC					;3
   sta	$ED					;3
   lda	$DB					;3 score MSB
   adc	$E7					;3 high adder w/carry
   sta	$DB					;3
   sta	$EC					;3
   dex						   ;2
   bne	LF4A9				  ;2 loop (x wave#)
LF4BD:
   cld						   ;2 end BCD mode

 

So the quick "dirty" way to disable the multiplication is just to replace the branch at the bottom with 2 NOP's...killing the loop. Optimally, you can just comment out the LDX, INX ,DEX, and BNE lines.

Share this post


Link to post
Share on other sites

Man, I am lost here. Seems like everything I do messes up the graphics.

 

I decided to go a different route and added this:

	   ldx	$99				   ;3 wave #
   inx						  ;2 bump by 1
   dex

so that the wave # remains the same. It works well, and the point awards for the next wave remain the same, but the game freezes when the ship is hit. I believe it has to do with the ship points, which you posted above, more specifically this line:

 

sta	$E7				   ;3 save to high adder

 

When I try to add a second INX anywhere inside LF4B9, everything goes to hell :(

 

I appreciate your help. All this is just starting to make sense to me.

Share this post


Link to post
Share on other sites
Man, I am lost here. Seems like everything I do messes up the graphics.

 

I decided to go a different route and added this:

	   ldx	$99				  ;3 wave #
   inx						 ;2 bump by 1
   dex

so that the wave # remains the same.

I'm afraid not. The score routine is not altering the wave #. It's just the fact that the wave # counter starts with a value of zero, so the INX bumps this up by 1 to make the loop function correctly. After a pass through the score routine, the DEX reduces this value and loops back up if it has not yet counted to zero...in effect, multiplying the added points by the wave number.

 

 

It works well, and the point awards for the next wave remain the same, but the game freezes when the ship is hit.

Oops...I hadn't considered that at the end of the loops, the X register is known to be a value of zero (hence, no loop). I suggest changing the branch instruction (that was previously changed to 2 NOP instructions) to be an LDX #$00 instruction instead.

 

 

	   sed						   ;2
   ldx	$99					;3 wave #
   inx						   ;2 bump by 1
LF4A9:
   lda	$DC					;3
   clc						   ;2
   adc	$E8					;3
   sta	$DC					;3
   sta	$ED					;3
   lda	$DB					;3
   adc	$E7					;3
   sta	$DB					;3
   sta	$EC					;3
   dex						   ;2
;;;	   bne	LF4A9				  ;2 loop (removed)
   ldx	#$00				   ;2

 

I believe it has to do with the ship points, which you posted above, more specifically this line:

 

sta	$E7				  ;3 save to high adder

 

When I try to add a second INX anywhere inside LF4B9, everything goes to hell :(

As it should...the disassembly of the game hasn't been fully reverse-engineered, so moving things around in it is a no-no in some areas. But as stated, the original program with the loop intact would count X down to zero before proceeding. It seems conclusive that a later routine expects X to equal zero. I didn't bother tracing, but replacing the branch with LDX worked.

 

 

I appreciate your help. All this is just starting to make sense to me.

Sorry for confusing you further ;)

Share this post


Link to post
Share on other sites
Sorry for confusing you further ;)
You just did it again :P

 

I'll get back to this in a lil while.

 

--simply amazing. The change didn't even require changes in # of bytes.

 

So now hitting an invader gains you one point no matter which one or how many waves are completed.

 

WELCOME TO THE HOUSE OF PAIN!

 

Also changed the score for the ship to 100 (#$04 to #$01) and it seems that the ship appears much more often, possibly only when hit. Maybe that value is somehow used twice? I gotta play some more to see if I can figure out a pattern.

 

coke_wins_again.bin

Edited by cosmosiss

Share this post


Link to post
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.

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