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

Hunchback (ZX Spectrum)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Hunchback

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


SourceIcon.png This game has uncompiled source code.


Source Code Fragment

A decent chunk of the code was included in this game. The code seen below can be seen with a hex editor at $911D in the .tap dump of the game.

       LD B,2
       LD A,(SOL.E)
       LD E,A
CB     PUSH BC
       LD D,88
       LD C,1
       LD A,58
       PUSH DE
       CALL 9A90H
       POP DE
       INC E
       POP BC
       DJNZ CB
       RET 
RPI    CALL 60000
       LD A,(ON#)
       CP 1
       JR Z,RPI1
       LD IX,MAN.A
       LD A,(IX+0)
       LD D,(IX+1)
       LD E,(IX+2)
       LD C,(IX+3)
       CALL 47000
       LD A,(IX+1)
       ADD 16
       LD D,A
       LD A,(IX+3)
       ADD 1
       LD C,A
       LD E,(IX+2)
       LD A,(IX+0)
       CALL 47000
       LD A,(CSTM)
       LD (IX+3),A
       LD A,(ESTM)
       LD (IX+2),A
       LD E,A
       LD A,(IX+0)
       LD D,(IX+1)
       LD C,(IX+3)
       CALL 47000
       LD A,(IX+1)
       ADD 16
       LD D,A
       LD A,(IX+3)
       ADD 1
       LD C,A
       LD E,(IX+2)
       LD A,(IX+0)
       CALL 47000
       RET 
DEW    JP ZZZ
RPI1   LD IX,MAN.A
       LD A,(IX+1)
       ADD 3
       LD D,A
       LD C,(IX+3)
       LD E,(IX+2)
       LD A,(IX+0)
       CALL 47000
       LD A,(IX+1)
       ADD 19
       LD D,A
       LD A,(IX+3)
       ADD 1
       LD C,A
       LD E,(IX+2)
       LD A,(IX+0)
       CALL 47000
       LD A,0
       LD (ON),A
       LD (ON#),A
       LD A,2
       LD (MAN.C),A
       JP ASD
TOWER  LD A,58
       LD (22680),A
       LD (22681),A
       LD (22682),A
       LD (22683),A
       LD (22712),A
       LD (22715),A
       LD (22744),A
       LD (22747),A
       LD (22776),A
       LD (22779),A
       LD (22808),A
       LD (22811),A
       LD (22840),A
       LD (22841),A
       LD (22842),A
       LD (22843),A
       LD (22872),A
       LD (22873),A
       LD (22874),A
       LD (22875),A
       LD A,2
       LD (22777),A
       LD (22778),A
       LD (22809),A
       LD (22810),A
       LD A,70
       LD (22713),A
       LD (22714),A
       LD (22745),A
       LD (22746),A
       RET 
CHANG  LD BC,384
       LD HL,50000
       LD DE,31000
CHA1   LD A,(HL)
       EX AF,A'F'
       LD A,(DE)
       LD (HL),A
       EX AF,A'F'
       LD (DE),A
       INC HL
       INC DE
       DEC BC
       LD A,B
       OR C
       JR NZ,CHA1
       RET 
CHEK5   LD A,(ON1)
       CP 0
       RET NZ
       LD A,(ON)
       CP 0
       RET NZ
       LD A,(ON#)
       CP 0
       RET NZ
       LD A,(ON1#)
       CP 0
       RET NZ
       LD A,(JUMP#)
       CP 0
       RET NZ
       LD A,(MAN.D)
       CP 56
       RET NZ
       LD A,(SCREN)
       CP 1
       RET Z
       JP CHEK7
CHEK6  LD A,(MANOD)
       CP 46
       JR NC,CH6
       CP 35
       RET NC
CH6    LD A,(MANOD)
       LD B,3
TT1    SUB 8
       JR C,TT2
       INC B
       JR TT1
TT2    LD A,(MANOE)
       ADD 1
       LD C,A
       LD A,(MANOC)
       CP 4
       CALL Z,TT3
       CALL ATTR
       CP 6
       JP Z,SETD#
       CP 3
       JP Z,SETD#
       CP 5
       JP Z,SETD#
       LD B,0
       LD A,(MANOD)
TTT1   SUB 8
       JR C,TTT2
       INC B
       JR TTT1
TTT2   LD A,(MANOE)
       ADD 1
       LD C,A
       LD A,(MANOC)
       CP 1
       CALL Z,TTT3
       CALL ATTR
       CP 6
       JP Z,SETD#
       RET 
TT3    LD A,(MANOE)
       LD C,A
       RET 
TTT3   LD A,(MANOE)
       ADD 1
       LD C,A
       RET 
RADAR  LD A,(RADE)
       LD E,A
       LD D,178
       CALL 33500
       LD A,(RADE)
       ADD 1
       LD E,A
       LD D,178
       CALL 33500
       LD A,(RADE)
       LD E,A
       LD D,179
       CALL 33500
       LD A,(RADE)
       ADD 1
       LD E,A
       LD D,179
       CALL 33500
       RET 
CHEK7  LD A,(ROPE#)
       CP 0
       JR NZ,PIT
       LD A,(BELL4)
       CP 0
       JR NZ,PIT
       LD A,(MAN.E)
       CP 6
       JR NZ,TESTC
       LD A,(MAN.C)
       CP 1
       JP NZ,SETD
       RET 
TESTC  LD A,(MAN.E)
       CP 7
       JP Z,SETD
       CP 8
       JP Z,SETD
       CP 15
       JP Z,SETD
       CP 14
       JP Z,SETD
       CP 21
       JP Z,SETD
       CP 22
       JP Z,SETD
       LD A,(MAN.E)
       CP 13
       JR Z,TESTD
       CP 20
       JR Z,TESTD
       RET 
TESTD  LD A,(MAN.C)
       CP 1
       JP NZ,SETD
TESTE  RET 
PIT    LD A,(MAN.E)
       CP 22
       JR Z,TESTX
       CP 8
       JR Z,TESTY
       CP 9
       JP Z,SETD
       CP 10
       JP Z,SETD
       CP 11
       JP Z,SETD
       CP 12
       JP Z,SETD
       CP 13
       JP Z,SETD
       CP 14
       JP Z,SETD
       CP 15
       JP Z,SETD
       CP 16
       JP Z,SETD
       CP 17
       JP Z,SETD
       CP 18
       JP Z,SETD
       CP 19
       JP Z,SETD
       CP 20
       JP Z,SETD
       CP 21
       JP Z,SETD
       RET 
TESTX  LD A,(MAN.C)
       CP 1
       JP Z,SETD
       RET 
TESTY  LD A,(MAN.C)
       CP 1
       JP NZ,SETD
       RET 
KLM    LD HL,SCORE+4
       LD A,(HL)
       CP 56
       RET Z
       LD A,1
       LD (EXTRA),A
       LD HL,LIVES
       INC (HL)
       RET 
SETD   LD A,1
       LD (FALL),A
       JP SETD#
PAINT  LD HL,22623
       LD DE,32
       LD A,3
       LD B,9
DFG    LD (HL),A
       ADD HL,DE
       DJNZ DFG
       RET 
       END