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

Pulsoids (ZX Spectrum)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Pulsoids

Also known as: Pulsoid
Developer: Silhouette Software
Publisher: Mastertronic
Platform: ZX Spectrum
Released in EU: 1988


SourceIcon.png This game has uncompiled source code.


Pulsoids is one of the many, many Breakout clones on 8-bit computers.

Source Code Fragment

The giant source code fragment seen below can be viewed with any hex editor at 1CFB in the .tap dump.

STARTKEY)
ADD HL,BC
LD (HL),A
CALL BEEP
LD A,(COUNT)
INC A
DB 50
DW COUNT
CP 3
JR NZ,NEXTKEY

ESCAPE:
CALL BEEP ;TEST FOR NO DOUBLES
LD HL,(STARTKEY)
LD A,(HL)
CP 255
RET

KEMP MODE
LD E,L
LD D,H
INC DE
LD B,2 

CVOUT:
PUSH BC
PUSH DE

CVL:
LD A,(DE)
CP (HL)
JR NZ,VOK
POP DE
POP BC
CALL BOOP
JP DEFINEKEYS

VOK:
INC DE
DJNZ CVL
POP DE
POP BC 
INC HL 
INC DE 
DEC B
JR NZ,CVOUT 
RET;KEYS OK

SETKEMP:
CALL BEEP
LD HL,(STARTKEY)
LD A,(HL)
CP 255
JR NZ,MFF
LD A,4
LD (HL),A
JP DEFINEKEYS

MFF:
LD A,255
LD (HL),A
JP DEFINEKEYS

KEMPMESS:
LD HL,TEXT6
CALL TOFF
JP FRMKEMPMESS


PRINTKEYNUMS: ;HIGHLIGHTING
;KEY "COUNT" 
LD B,0

PKS:
LD A,4
ADD A,B
SLA A
DB 50
DW LBUF+2
LD A,(COUNT)
CP B
CALL Z,FLASHON
LD HL,(STARTKEY)
LD E,B
LD D,0
ADD HL,DE
LD E,(HL)
LD A,E
CP 39 ;CAP SHIFT
JP Z,CONVERT
CP 32 ;SPACE
JP Z,CONVERT
CP 33 ;ENT
JP Z,CONVERT 
CP 24 ;SYMB
JP Z,CONVERT
LD HL,KTAB
ADD HL,DE
LD A,(HL)

FRMCONVERT:
DB 50
DW LBUF+3
LD HL,LBUF
PUSH BC
CALL TOFF
POP BC
INC B
LD A,B
CP 3
JR NZ,PKS
RET 

CONVERT:
CP 24
JR NZ,N24
LD A,34

N24:
CP 32
JR NZ,N32
LD A,35

N32:
CP 33
JR NZ,N33
LD A,36

N33:
CP 39
JR NZ,N39
LD A,33

N39:
JP FRMCONVERT

BOOP:
LD DE,256*80+100
JP CONTONE

BEEP:
LD DE,256*100+40
JP CONTONE

STARTKEY:
DW 0

LBUF:
DB 222,14,0
DB 0,216,7+64,255

KTAB:
DB "BHY65TGVNJU74RFCMKI83E"
DB "DZ LO92WSZ  P01QA " 

TEXT0:
DB 216,64+48,222,7,3
DB " PULSOID "
DB 216,7 DB 222,3,23
DB 37," 1988 MASTERTRONIC"
DB 222,3,20 DB 216,4
DB "PROGRAM DESIGN BY"
DB 222,3,21
DB "SILHOUETTE SOFTWARE"
DB 222,3,17
DB 216,5
DB "WRITTEN BY"
DB 222,11,18
DB "JOHN F CAIN"
DB 222,3,13,216,64+6
DB "Q  QUIT GAME"
DB 222,3,14
DB "P  PAUSE GAME"
DB 255

TEXT1:
DB 222,3,5
DB "1  ONE PLAYER GAME"
DB 216,64+7,255

TEXT2: DB 222,3,7
DB "2  TWO PLAYER GAME"
DB 216,64+7
DB 222,3,9
DB "3  DEFINE KEYS"
DB 222,3,11
DB "0  PLAY GAME"
DB 255 

TEXT3: DB 222,3,5 DB "DEFINE KEYS"
DB 222,3,8
DB "LEFT",222,3,10,"RIGHT"
DB 222,3,12,"FIRE"
DB 222,3,20
DB "PRESS Q TO QUIT"
DB 222,3,16
DB "PRESS P FOR"
DB 222,3,17
DB "KEMPSTON JOYSTICK"
DB 255 

TEXT4:
DB 222,3,3,"PLAYER" 
DB 222,10,3,216,64+7+128,"1"
DB 216,7+64 DB 255

TEXT5:
DB 222,3,3,"PLAYER" 
DB 222,10,3,216,64+7+128,"2" 
DB 216,7+64 DB 255 

TEXT6:
DB 222,3,10
DB "KEMPSTON JOYSTICK"
DB 222,3,13 DB "PRESS P TO CANCEL" 
DB 222,3,15
DB "PRESS Q TO EXIT" DB 255

;***********************
INTJIFF:
DB 0

TSTJIF:DB 0
INTCNT:DB 0
TSTCNT:DB 0

;*********************
ANYFIRE:
;IS EITHER PLAYER 
;PRESSING FIRE 

XOR A 
DB 50 
DW CURPLR 
CALL RDFIRE 
RET 
LD A,1 
DB 50 
DW CURPLR ;FALL 

RDFIRE: 
IN A,(31) 
LD E,A 
IN A,(31) 
CP E 
JR NZ,NOTSTK 
AND 31 
CP 16 
RET Z

NOTSTK: 
CALL 028EH 
LD A,(CURPLR) 
OR A 
JR Z,PLR1 
LD HL,KEYS+5 
LD A,E 
CP (HL) 
RET 

PLR1: 
LD HL,KEYS+2
LD A,E 
CP (HL) 
RET

TOGMU:
LD A,(MUFLG)
INC A
JR Z,MUSICON
LD A,255 
DB 50 
DW MUFLG 
LD A,5 
DB 50 
DW MUFLG+4 
DB 50
DW MUFLG+5
RET

MUSICON: 
LD A,1 
DB 50 
DW MUFLG 
RET 

KEYS: 
DS 6 

SETKEYS:
DB 4,19,38,4,19,38

KEMPSTON:
DW 0

STICK:
IN A,(31)
AND 31
LD E,A
IN A,(31)
AND 31
CP E
LD A,0
STET
RET

NZ
BIT 3,E
BIT 0,E
JR Z,NOTE2
OR 2

NOTE2:
BIT 1,E
JR Z,NOTW2
OR 8

NOTW2:
BIT 4,E
RET Z
OR 16
RET

RDSTICK:
LD HL,KEMPSTON
LD DE,(CURPLR)
LD D,0
ADD HL,DE
LD A,(HL)
OR A
JR NZ,STICK
CALL 028EH
LD A,(CURPLR)
LD HL,KEYS
OR A
JR Z,P1
LD HL,KEYS+3

P1: 
LD A,E
CP (HL)
JR NZ,NOTW
LD A,8
RET

NOTW:
INC HL
CP (HL)
JR NZ,NOTE
LD A,2
RET

NOTE:
INC HL
CP (HL)
JR NZ,NOTF
LD A,16
RET 

NOTF:
XOR A

RET 

;*********************
TSTPAUSE ; FROM SIMONS

RASTER
CALL 028EH
LD A,E
CP 16
JP Z,TOGMU
CP 37
KEY Q
JR NZ

NOTQUIT
LD A,4
DB 50
DW EOGAME
RET 

NOTQUIT:
CP 34

KEY P
RET
NZ
CALL WAITREL
LD A,34
KEY P
CALL WAITKEY

WAITREL:
CALL DELAY
LD A,255
CALL WAITKEY
JP DELAY 

;*******************

WAITKEY:
PUSH AF
CALL 028EH
POP AF
CP
JR NZ,WAITKEY
RET

DELAY: 
LD BC,1000

DLL: 
DEC BC 
LD A,B 
OR C 
JR NZ,DLL 
RET

STARTI:
DI
LD HL,9B00H
LD DE,9B01H
LD BC,256
LD (HL),0FEH
LDIR 
LD A,09BH
LD I,A
IM 2
EI 
RET

INITBITTABLE:
LD HL,BITTABLE
LD (HL),128
INC HL
LD (HL),64
INC HL 
LD (HL),32
INC HL
LD (HL),16
INC HL
LD (HL),8
INC HL
LD (HL),4
INC HL
LD (HL),2
INC HL
LD (HL),1
RET 

EXIT:
POP HL
RET

ADDR
LD HL,60*256
LD