If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Phantom 2040 (Game Gear)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Phantom 2040

Developer: Unexpected Development
Publisher: Viacom New Media
Platform: Game Gear
Released in US: June 1995
Released in EU: 1995


SourceIcon.png This game has uncompiled source code.


Corrupted Source Code

Hmmm...
To do:
Extract the rest of the badly corrupted text.

While there is a lot of code in here, all of it is corrupted, with every 1st and 9th character out of every 16 character line randomly missing and replaced with NULLs. An example can be seen at 2BB80:

Original Reconstruction
GColorC cBufr
          ld	bc,3 
	call ClearRA 
$bigl op
	cl a
	ld	 Temp1), 
	ld	b 16
	ld hl,BGCo orCycBu r
	ld	 e,(Defa ltBGPal 
$loop 
	ld	a, hl)
	a d	0F0h

 	ld	c,a
 
	ld	a, de)
	a d	0F0h

 	cp	c
 jr	z,$s ip2
	l 	a,(hl)
 
	add	a 010h
	 d	(hl), 
	ld	a 1
	ld	 Temp1), 
$skip 
	ld	a (de)
	 nd	00Fh
 
	ld	c, 
	ld	a (hl)
	 nd	00Fh
 
	cp	c
 	
        jr	z,$ kip3
	 nc	(hl) 
	
        ld	a, 
	ld	( emp1),a 
$skip3 

	inc	d 
	inc	 l

	l 	a,(de)
 
	cp	(h )
	jr	 ,$skip

 	inc	(h )
	ld	 ,1
	ld (Temp1) a
$ski 
	inc	 e
	inc hl

	 jnz	$lo p
	ld	 l,BGCol rCycBuf 
	call SetBGPa lette
 
	ld	a, 0
	cal 	WaitFo VBlank
 
	ld	a (Temp1)
 
	or	a

 	jr	nz, bigloop
 
	ld	hl (Defaul BGPal)

 	jp	Set GPallet e	;inst ad of c ll,ret
 
;---- ------- ------- ------- ------- ------- ------- ------- ------- 

;FadeI ScreenB  - Give  destin tion sp ite and backgro nd pall ttes, f de
;		 n to th se pall tte fro  an all black s reen.
 ------- ------- ------- ------- ------- ------- ------- ------- ----
; tarts s reen co pletely black,  ades in to B&W  ersion  f
;pal ette in icated  y point r in (D faultBG al), th n turns on colo .
Fade nScreen W
;Ini ialize  allette
GColorCycBufr
          ld	bc,3 
	call    ClearRA 
$bigloop
	cpl     a
	ld	(Temp1),a 
	ld	b,16
	ld      hl,BGColorCycBufr
	ld	de,(DefaultBGPal) 
$loop 
	ld	a, (hl)
	and	0F0h

 	ld	c,a
 
	ld	a, (de)
	and	0F0h

 	cp	c
        jr	z,$skip2
	ld	a,(hl)
 
	add	a 010h
	ld	(hl),a 
	ld	a,1
	ld	(Temp1), a
$skip2
	ld	a,(de)
	and	00Fh
 
	ld	c,a
	ld	a,(hl)
	and	00Fh
 
	cp	c
 	
        jr	z,$skip3
	inc	(hl) 
	
        ld	a,1
	ld	(Temp1),a 
$skip3 

	inc	d 
	inc	hl

	ld	a,(de)
 
	cp	(hl)
	jr	nz,$skip4

 	inc	(hl)
	ld	a,1
	ld      (Temp1),a
$skip4
	inc	de
	inc     hl

	jnz	$loop
	ld	hl,BGColorCycBuf 
	call    SetBGPallette
 
	ld	a, 0
	cal 	WaitForVBlank
 
	ld	a,(Temp1)
 
	or	a

 	jr	nz, bigloop
 
	ld	hl (DefaultBGPal)

 	jp	SetBGPallette	;instead of call,ret
 
;-------------------------------------------------------------------- 

;FadeInScreenBW - Gives destination sprite and background pallettes, fade
;		 in to these pallettes from an all black screen.
 --------------------------------------------------------------------
;Starts screen completely black, fades in to B&W version of
;pallette indicated by pointer in (DefaultBGPal), then turns on color.
FadeInScreenBW
;Initialize pallette
(Source: Original TCRF research)