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

Toy Pop (Sharp X1)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Toy Pop

Developer: Dempa
Publisher: Dempa
Platform: Sharp X1
Released in JP: July 1989


SourceIcon.png This game has uncompiled source code.


Source Code Fragment

Several strings of uncompiled source code can be found in offset 0x1275D:

LD      DE,(MML.DATA.ADR)
        ADD     HL,DE
        JP      NOTE.SET.LOOP

;

LOOP.BREAK.COM

        POP     HL
        LD      E,(IX+@LOOP.STACK.ADR)
        LD      D,(IX+@LOOP.STACK.ADR+1)
        LD      A,(DE)
        DEC     A
        JP      Z,LOOP.BREAK.COM.1
        INC     HL
        INC     HL
        JP      NOTE.SET.LOOP
LOOP.BREAK.COM.1
        DEC     DE
        LD      (IX+@LOOP.STACK.ADR),E
        LD      (IX+@LOOP.STACK.ADR+1),D
        LD      E,(HL)
        INC     HL
        LD      D,(HL)
        EX      DE,HL
        LD      DE,(MML.DATA.ADR)
        ADD     HL,DE
        JP      NOTE.SET.LOOP

;

LOOP.START.COM

        POP     HL
        LD      E,(IX+@LOOP.STACK.ADR)
        LD      D,(IX+@LOOP.STACK.ADR+1)
        INC     DE
        LD      A,(HL)
        INC     HL
        LD      (DE),A
        LD      (IX+@LOOP.STACK.ADR),E
        LD      (IX+@LOOP.STACK.ADR+1),D
        JP      NOTE.SET.LOOP

;

SOFT.LFO.COM

        POP     HL
        EX      DE,HL
        LD      HL,IX
        LD      BC,@LFO.SPEED
        ADD     HL,BC
        EX      DE,HL
;       LD      BC,5
        LDI:LDI:LDI:LDI:LDI
        JP      NOTE.SET.LOOP

;

LFO.DELAY.COM

        POP     HL
        LD      A,(HL)
        INC     HL
        LD      (IX+@LFO.DELAY),A
        JP      NOTE.SET.LOOP

;

LFO.SPEED.COM

        POP     HL
        LD      A,(HL)
        INC     HL
        LD      (IX+@LFO.SPEED),A
        JP      NOTE.SET.LOOP

;

PORTAMENTO.COM

        POP     HL
        PUSH    HL
        LD      A,(HL)
        SRL     A
        LD      H,A
        LD      L,0
        LD      E,(IX+@DETUNE)
        LD      D,(IX+@DETUNE+1)
        ADD     HL,DE
        LD      A,H
        LD      D,0

        CP      12*4
        JP      C,PORTAMENTO.COM.2
        SET     2,D
        SUB     12*4
PORTAMENTO.COM.2
        CP      12*2
        JP      C,PORTAMENTO.COM.3
        SET     1,D
        SUB     12*2
PORTAMENTO.COM.3
        CP      12
        JP      C,PORTAMENTO.COM.4
        INC     D
        SUB     12
PORTAMENTO.COM.4
        LD      H,A
        LD      (IX+@FREQNO),L
        LD      (IX+@FREQNO+1),H
;       INC     D
        LD      (IX+@OCTERVE),D
        CA