To download the Source Code and the compiled ROM, click here:
http://goo.gl/bphDe
If you want add the Centiseconds in Sonic 1, follow the step below.
In sonic1.asm, go to Hud_ChkLives and add this line:
- Code:
bsr.s CentiSecond
Now below this code:
- Code:
Hud_End:
rts
Add these lines:
- Code:
CentiSecond:
move.l #$75400003,d0
moveq #0,d1
move.b ($FFFFFE25).w,d1 ; load frames
mulu.w #$1AA,d1
lsr.l #8,d1
jsr Hud_Secs
rts
In \_maps\obj21.asm, change all the code by this code fully commented:
- Code:
; ---------------------------------------------------------------------------
; Sprite mappings - SCORE, TIME, RINGS
; ---------------------------------------------------------------------------
dc.w byte_1C5BC-Map_obj21, byte_1C5F0-Map_obj21
dc.w byte_1C624-Map_obj21, byte_1C658-Map_obj21
; Y-Pos, layout, VDP (2bytes - plane, pallet line (2bits), flip, mirror, first tile (11bits) - ), X-Pos
byte_1C5BC: dc.b $C
dc.b $80, $D, $80, 0, 0 ; SCOR
dc.b $80, $D, $80, $18, $20 ; E + score left numbers
dc.b $80, $D, $80, $20, $40 ; score right numbers
dc.b $90, $D, $80, $10, 0 ; TIME
dc.b $90, $D, $80, $28, $28 ; minutes : seconds
dc.b $90, 1, $80, $2A, $48 ; :
dc.b $90, 5, $80, $E0, $50 ; centiseconds
dc.b $A0, $D, $80, 8, 0 ; RING
dc.b $A0, 1, $80, 0, $20 ; S
dc.b $A0, 9, $80, $30, $30 ; number of rings
dc.b $40, 5, $81, $A, 0 ; lives icon
dc.b $40, $D, $81, $E, $10 ; lives counter
dc.b 0
byte_1C5F0: dc.b $C
dc.b $80, $D, $80, 0, 0 ; SCOR
dc.b $80, $D, $80, $18, $20 ; E + score left numbers
dc.b $80, $D, $80, $20, $40 ; score right numbers
dc.b $90, $D, $80, $10, 0 ; TIME
dc.b $90, $D, $80, $28, $28 ; minutes : seconds
dc.b $90, 1, $80, $2A, $48 ; :
dc.b $90, 5, $80, $E0, $50 ; centiseconds
dc.b $A0, $D, $A0, 8, 0 ; RING
dc.b $A0, 1, $A0, 0, $20 ; S
dc.b $A0, 9, $80, $30, $30 ; number of rings
dc.b $40, 5, $81, $A, 0 ; lives icon
dc.b $40, $D, $81, $E, $10 ; lives counter
dc.b 0
byte_1C624: dc.b $C
dc.b $80, $D, $80, 0, 0 ; SCOR
dc.b $80, $D, $80, $18, $20 ; E + score left numbers
dc.b $80, $D, $80, $20, $40 ; score right numbers
dc.b $90, $D, $A0, $10, 0 ; TIME
dc.b $90, $D, $80, $28, $28 ; minutes : seconds
dc.b $90, 1, $80, $2A, $48 ; :
dc.b $90, 5, $80, $E0, $50 ; centiseconds
dc.b $A0, $D, $80, 8, 0 ; RING
dc.b $A0, 1, $80, 0, $20 ; S
dc.b $A0, 9, $80, $30, $30 ; number of rings
dc.b $40, 5, $81, $A, 0 ; lives icon
dc.b $40, $D, $81, $E, $10 ; lives counter
dc.b 0
byte_1C658: dc.b $C
dc.b $80, $D, $80, 0, 0 ; SCOR
dc.b $80, $D, $80, $18, $20 ; E + score left numbers
dc.b $80, $D, $80, $20, $40 ; score right numbers
dc.b $90, $D, $A0, $10, 0 ; TIME
dc.b $90, $D, $80, $28, $28 ; minutes : seconds
dc.b $90, 1, $80, $2A, $48 ; :
dc.b $90, 5, $80, $E0, $50 ; centiseconds
dc.b $A0, $D, $A0, 8, 0 ; RING
dc.b $A0, 1, $A0, 0, $20 ; S
dc.b $A0, 9, $80, $30, $30 ; number of rings
dc.b $40, 5, $81, $A, 0 ; lives icon
dc.b $40, $D, $81, $E, $10 ; lives counter
even