Mail has been fixed; you should now be able to confirm your e-mail address, watch pages, and the like.
Please report any issues on Discord.

Moon Alert!

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Moon Alert!

Developer: Ocean
Publisher: Ocean
Platform: ZX Spectrum
Released in EU: 1984


SourceIcon.png This game has uncompiled source code.


Source Code Fragments

A decent amount of the code is left in the game. The code seen below can be seen with a hex editor at the addresses below in the .tap dump of the game.

675A:

JONPLOT	INC	E
	DJNZ	CLRMSL
	POP	HL
	LD	(CHBAS),

6C92:

	 ALL	MSGPUT
	LD	HL,STDBYS
	CALL	SPEAK
	CALL	PLAYNMS
	LD	BC,5000
	CALL	LNGDEL
	LD	C,0
	LD	B,14
	CALL	CLRMES
	POP	HL
	POP	DE
	POP	BC
	POP	AF
	RET
PLAYPL	DB	27,106
     	DB	'Ready Player '
PNMTP1	DB	' ',0
STDBYS	DB	55,17,24,11,21,1,28,6,0FFH,
;INKEYN - Wait for keypress, max. delay = 2 mins.6
ENTRY:	None
;EXIT :	A = Character pressed or 0 if delay exceeded
;	Flags set
INKEYN	PUSH	DE
	PUSH	HL
	LD	HL,0
	LD	(FRAMES),HL
	XOR	A
	LD	(LASTK),A
	LD	A,(FLAGS2)
	SET	3

7320:

     	LD	A,(PAUSE)
	OR	A
     	JR	NZ,WTPAUS
	XOR	A
     	LD	(LASTK),A
PAUSLP	LD	A,(LASTK)
	OR	A
	JR	Z,PAUSLP
	XOR

7920

	INC	HL
	LD	(HL),0
	INC	HL
	LD	(HL),0
	INC	HL
	LD	(HL),0
	POP	HL
	LD	A,(HL)
	CP	5
	JR	NZ,NTL1Z

7B9B:

	CALL	ADDSCR
	CALL	GETPLY
	INC	HL
	INC	HL
	INC	HL
	INC	HL
	LD	(HL),0
EXTBPS	LD	BC,10000
	CALL	LNGDEL
	POP	HL
	POP	DE
	POP	BC
	POP	AF
	RET
POINTM	DB	27,106Q,'CONGRATULATIONS!',13,13
        DB	27,107Q,'   You have reached Point '
POINCH1	DB	'A!',0
TIMESM	DB	27,104Q,'Target Time:',13,13
  	DB	27,105Q,'       Your Time:',13,13
	DB	27,107Q,'    Bonus Points:',0
SORRYB	DB	27,103Q,'Sorry No Bonus!',0
ENDL1	DB	27,106Q,'End of Level Bonus:'
	DB	'10,000 Points',0
ENDCRS	DB	27,106Q,'Mission Completion Bonus:'
  	DB	'50,000',0
ACCSSN	DB	27,105Q,'Crator-Vator Enabled',0
PREPAR	DB	27,107Q,'Prepare for journey to Level \'
	DB	0
PTLTTB	DB	'FKPUZ'
TTIMTB	DW	180H
 	DW	200H
	DW	200H
	DW	200H
	DW	200H
	DW	200H
	DW	200H
	DW	200H
	DW	200H
	DW	200H
RAIDERS	DB	20,203,20,0,20,192,80,171
 	DB	120,128,20,0,20,228,20,0
	DB	20,203,160,192,40,0,20,171
	DB	20,0,20,152,80,135,120,96
	DB	20,0,20,152,20,0,20,135
	DB	80,128,80,114,40,102,0FFH
GRTGUYS	DB	36,84

83B9:

 	        (PNUM),A
NOALPL	LD	A,(NPLAY)
 	INC	A
	LD	B,A
HLFMLP	PUSH	BC
 	CALL	GETPLY
	CALL	BUBBLE
 	CALL	HOFNAME
 	POP	BC
	LD	A,(PNUM)
	XOR	1
	LD	(PNUM),A
	DJNZ	HLFMLP
	POP	HL
	POP	DE
	POP	BC
	POP	AF
	RET
;BUBBLE - Check and insert new score in table
ENTRY:

8584:

BLOOP	CALL	CMPBCD
 	JR	C,XITBUB
	LD	A,B
	CP	1
	JR	Z,XITBUB
	PUSH	DE
	LD	DE,25
 	ADD	HL,DE
	POP	DE
 	DJNZ	BUBLOOP
XITBUB	LD	A,

873A:

 	POP	HL
	POP	DE
	EX	DE,HL
	LD	BC,3
	LDIR
 	EX	DE,HL
 	POP	BC
NOINSET	POP	DE

8CBA:

THNM    EX	DE,HL
 	LD	HL,MRNOBY
	LD	BC,10
	LDIR
EXTHNM	POP	HL
 	POP	DE
	POP	BC
	POP	AF
	RET
AMAZSC	DB	27,107Q,'AMAZING Score',0
GRTSCR	DB	27,107Q,'  GREAT Score',0
HNPLY	DB	27,107Q,'Player '
HNPNP1	DB	'[!',0
ENTHOFM	DB	27,6,'Please enter your name',13
 	DB	'   Press ',27,307Q,'ENTER',27,6
 	DB	' when Finished',0
ALCHTB	DB	' !#&'',-./:;'
MRNOBY	DB	'Mr. Nobody'
GRTSPS	DB	100,39,20,13,3,55,42,58,0FFH
AMAZSP	DB	24,16,84,43,12,11,36,0FFH
;BEEPER - Makes loudspeaker beep
;ENTRY:	A = value indicating frequency
;	BC = value giving number of half cycles
;EXIT :	None
BEEPER	PUSH	AF
 	PUSH	BC
 	PUSH	DE
 	LD	E,A
 	LD	A,(BACKGND)
BEEPLP	XOR	24
 	LD	D,A
	OUT	(COLSND),A
	PUSH	BC