Game Corner coins on the ground
Posted by: Bent`
Date: 2012-03-19 02:29:06
[img]http://iimarck.us/etc/gamecorner.png[/img]
Red boxes are hidden coins. There are two glitches here.
One I circled in blue. These ten coins cannot be picked up because the slot machine (which is also implemented as a hidden object) takes priority. (The slot machine cant be played, either, because it cant be accessed from the side and a gambler blocks the front.)
The other I circled in green. Internally, the game stores 40 coins here. Game Corner coins are stored in BCD instead of plain hexadecimal. The conversion routine is a simple ifelse:
cp 10
jr z, .bcd10
cp 20
jr z, .bcd20
cp 40
jr z, .bcd20 ;
jr .bcd100
.bcd10
ld a, $10
ld [$ff00+$a1], a
jr .done
.bcd20
ld a, $20
ld [$ff00+$a1], a
jr .done
.bcd40
ld a, $40
ld [$ff00+$a1], a
jr .done
.bcd100
ld a, $1
ld [$ff00+$a0], a
.done
Notice the line I commented. Due to a copypaste error, the 40 coin handler gives 20 coins instead. .bcd40 is never used.