Tuesday, June 23, 2009

Asteroids

Andrew Welburn, over at MAME World, posted information about the fourth set (rev 4) of asteroids, earning 500 SETI points!

"so here they are, Asteroids Revision 04E as
mentioned in the Star Tech Journal Vol 2 #5 :-
"
Atari Asteroids E-Prom Kit

Players with increased skill levels may cause
excessive game times. If you have this problem,
Atari has a solution. You may purchase an E-PROM
kit which will:

1) Allow small saucer to use wrap-around feature,
2) Allow small saucer to fire immediately when
entering the playing area, and
3) Prevent the intermittent loss of 3rd initial on
10th highest score.

"

Already known from arcadehistory.com

The Rev.1 version had an invulnerability glitch, which allowed players to hide in the upper corners of the screen (in the score) and be invulnerable to collisions. Also, players could make their ship fly backwards by thrusting in one direction until reaching full speed, and then quickly turn around 180 degrees and continue thrusting.


The Rev.2 version says '1979 Atari' at the bottom of the title screen, instead of the 'Asteroids by Atari' that was displayed in Rev.1. Also, the invulnerability glitch of Rev.1 is corrected.

Wednesday, April 29, 2009

Silkworm

stephh from The Ultimate Patchers earns 1000 points!

SPOT THE DIFFERENCE : 'silkworm' and 'silkwrm2'
Version 1.0 - Copyright Steph from The Ultimate Patchers, 2009.04.26

Besides a completely different sound CPU, in the main CPU, there are only 3 (THREE) bytes of difference !

Z:\>fc /B silkworm.4 r4
Comparing files silkworm.4 and R4
00000570: 51 59
00000598: 29 21
000042AE: C9 21

Let's now compare the Z80 code :
Z:\>diff silkworm.asm silkwrm2.asm
739c739
<> 056F: CB 59 bit 3,c
765c765
<> 0597: CB 21 sla c
9804,9806c9804
<> 42AE: 21 40 C8 ld hl,$C840

Routine at 0x42ae is called in attract mode after the scores are displayed ...Its purpose is to display a Japan warning screen ...So in S1, there is NO Japan warning screen, even if the text is still in the ROM !

Here is the full routine where there are the 2 other changes :

0562: 21 23 D0 ld hl,$D023
0565: 11 21 D0 ld de,$D021
0568: 3A 0F F8 ld a,($F80F)
056B: 2F cpl
056C: 4F ld c,a
056D: 06 02 ld b,$02
056F: CB 51 bit 2,c CB 59 bit 3,c
0571: 20 03 jr nz,$0576
0573: 34 inc (hl)
0574: 18 1E jr $0594
0576: 7E ld a,(hl)
0577: B7 or a
0578: 28 1A jr z,$0594
057A: 36 00 ld (hl),$00
057C: FE 18 cp $18
057E: 30 14 jr nc,$0594
0580: 23 inc hl
0581: 34 inc (hl)
0582: 7E ld a,(hl)
0583: 23 inc hl
0584: BE cp (hl)
0585: 38 0D jr c,$0594
0587: 2B dec hl
0588: 36 00 ld (hl),$00
058A: 23 inc hl
058B: 23 inc hl
058C: 1A ld a,(de)
058D: 86 add a,(hl)
058E: 12 ld (de),a
058F: 3E 01 ld a,$01
0591: 32 06 F8 ld ($F806),a
0594: 21 28 D0 ld hl,$D028
0597: CB 29 sra c CB 21 sla c
0599: 10 D4 djnz $056F

To sum up, this routine handles coinage ...

In S1, bit 2 is tested first (code at 0x056f) then bit 3 is tested due to the 'sra' instruction at 0x0597.
In S2, bit 3 is tested first (code at 0x056f) then bit 3 is tested due to the 'sla' instruction at 0x0597.

As there are no other changes, this means that COIN1 and COIN2 are swapped ...

As an example, do this in the 2 sets with MAME 0.131 or prior version
(this won't work with a further version as I'll fix that) :
- change "Coin A" Dip Switch to "2 Coins 1 Credit"
- change "Coin B" Dip Switch to "1 Coin 2 Credits"
- reset the game and you shall see a "2 COINS 1 PLAY" message
next screen after the "ALL RIGHTS RESERVED" message
- press COIN1 twice
- press COIN2 twice

In S1, you'll get 0 credit, 1 credit, 3 credits, 5 credits ...
In S2, you'll get 2 credits, 4 credits, 4 credits, 5 credits ...

S2 is a Japan set, but what about S1 ? Is it an export version ? Is it official ?And why are the coins mechanisms swapped between these 2 versions ?Unfortunately, code doesn't help here, and only an old Tecmo coder or project coordonatorcould answer such weird question ... If you ever find the answer, please let me know ...

Friday, March 6, 2009

Zaxxon Sets dissected

stephh from The Ultimate Patchers earns 1000 points!

Determined set one of Zaxxon corrected a near imperceptible defect in the way Zaxxon set two (zaxxon2) handled fractions of a credit, only seen when earning free credits through game play when the credits-per-token is set to a fraction.

The details he posted at MAMEWorld.info:

SPOT THE DIFFERENCE : 'zaxxon' and 'zaxxon2'
Version 1.0 - Copyright Steph from The Ultimate Patchers, 2009.06.03


There are only 3 (THREE) bytes of difference !

Z:\>fc /B zaxxon1.u29 zaxxon1a.u29
Comparing files ZAXXON1.U29 and ZAXXON1A.U29
00000FFE: 21 79
00000FFF: DD DC

These 2 bytes are for checksum (LSB first), so they are of not much interest ...

Z:\>fc /B zaxxon3.u27 zaxxon3a.u27
Comparing files ZAXXON3.U27 and ZAXXON3A.U27
00000C71: C9 21

Here is the byte that does everything ... Let's now compare the Z80 code :

Z:\>diff zaxxon.asm zaxxon2.asm
1874,1876c1874
< 0C71: C9 ret
< 0C72: 12 ---
< 0C73: 60 ---
---
> 0C71: 21 12 60 ld hl,$6012
0C74: 7E ld a,(hl)
0C75: A7 and a
0C76: C0 ret nz
0C77: 2B dec hl
0C78: 77 ld (hl),a
0C79: C9 ret

To sum up the routine in Z2 sets contents of 0x6011 to 0 if contents of 0x6012 = 0 ...

So what do we have at these addresses ? 0x6012 is the number of credits (BCD coded, range 0x00-0x90)
and 0x6011 is a value for partial credits ... WTF is that ? To make it short, let's see the
useful values :

. 0x00 : no partial credit
. 0x40 : 1/4 credit
. 0x56 : 1/3 credit
. 0x80 : 1/2 credit
. 0xab : 2/3 credit
. 0xc0 : 3/4 credit

Now let's go back to the routine in Z2 and imagine this situation : you set "Coin A" to 2/1 3/2 4/3,
you insert 2 coins, you play a one player game, and you insert another coin ...

When 1st coin is inserted, contents of 0x6011 = 0xc0 and contents of 0x6012 = 0x00 ...
You still have 0 credit, so you need to insert another coin to start a one player game ...
When 2nd coin is inserted, contents of 0x6011 = 0x80 and contents of 0x6012 = 0x01 ...
You now have 1 credit, you start a one player game, and number of credits is back to 0 ...
When the game is over, the routine is called, and contents of 0x6011 is ALSO turned to 0x00 !
So when 3rd coin is inserted, contents of 0x6011 = 0xc0, contents of 0x6012 = 0x00,
you still have 0 credit, so you need AGAIN to insert another coin to start a one player game !

In Z1, the behaviour is different because the routine is NOT called due to the 'ret' instruction ...
Let's simulate the previous situation with this new behaviour ...

When 1st coin is inserted, contents of 0x6011 = 0xc0 and contents of 0x6012 = 0x00 ...
You still have 0 credit, so you need to insert another coin to start a one player game (same as in Z2) ...
When 2nd coin is inserted, contents of 0x6011 = 0x80 and contents of 0x6012 = 0x01 ...
You now have 1 credit, you start a one player game, and number of credits is back to 0 (same as in Z2) ...
When the game is over, the routine is NOT called, so NOTHING happens ...
So when 3rd coin is inserted, contents of 0x6011 = 0x40, contents of 0x6012 = 0x01,
you have 1 credit, so you DON'T need to insert another coin to start a one player game !


Z2 is the original first revision of the game, but what about Z1 ? The way the code is patched
(one opcode of difference and code is NOT shifted - leaving 2 unused bytes at 0x0c72 and 0x0c73)
tells this was done on purpose ... It could be a bug fix to avoid partial credits being lost
(who could have complained about that as I doubt someone would have found the "trick" ?),
but what is the interest as players would require to insert less coins in the machine ?
Unfortunately, code doesn't help here, and only an old Sega coder or project coordonator
could answer such weird question ... If you ever find the answer, please let me know ...

Saturday, January 17, 2009

Alexx Kid, Hangly Man

Dissected Sets:

alexkid1 Alex Kidd: The Lost Stars (set 1)--> protected: specific platforms in gameplay move upward.
alexkidd Alex Kidd: The Lost Stars (set 2)--> unprotected: specific platforms in gameplay move downward.
Thanks to Stefen Lindberg

Hanglyman Set1--> Powerpellets black the map on level 2 only, until clear level or die.
Hanglyman Set2--> Powerpellets black the map on even levels, until pellet wears off.
Hanglyman Set3--> Powerpellets black the map on even levels, until pellet wears off. Twice as many rom images, each 1/2 sized.
Thanks to Gatinho