We just released a Feb. 5 '89 prototype of DuckTales for the NES!
If you'd like to support our preservation efforts (and this wasn't cheap), please consider donating or supporting us on Patreon. Thank you!

Dorke and Ymp

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Dorke and Ymp

Also known as: Dorque and Imp, Dorke n' Ymp
Developer: Norse
Publisher: Piko Interactive
Platforms: Unlicensed SNES, Windows
Released internationally: October 4, 2015 (SNES), October 19, 2016 (Windows)


SourceIcon.png This game has uncompiled source code.


Dorke and Ymp is a commercially-released homebrew SNES platformer that was originally developed by a small team of Swedish hobbyists in the early 90s, who eventually shelved the game after failing to find a publisher.

A few prototype builds were released online, with homebrew publisher Piko Interactive later being responsible for the game being finished and given a physical cartridge release. A Steam release using a customized version of the Mednafen emulator followed about a year later.

Uncompiled Code

Various fragments of audio-related source code are scattered throughout part of the ROM, possibly as a result of unused ROM space being filled with uninitialized memory.

At offset 15B000:

;-------------------------------------------------

;-         TEMPLATE FOR A NEW SPCBANK            -

;-------------------------------------------------

DONOTDEFINETRANSFEREND:


 INCLUDE SPCPLAYR.SPC   ; INCLUDE THE SPCPLAYR ROUTINES

 

        
;---------------------------------------------------------------

; ---------   SPCOBJECT IS THE BASE FOR THE WHOLE   ------------

; ---------     BANK OF SONGS AND SOUND EFFECTS     ------------

; ---------   IT MUST BE DEFINED IN ORDER FOR THE   ------------

; ---------    APUINIT BEING ABLE TO INSTALL        ------------



SPCOBJECT:
        DB $FF          ; MASTERVOL
        DB $01          ; (MONO)/STEREO
        DB $B0          ; DEFAULT SFXVOL
        DB $D0          ; DEFAULT SONGVOL

        DW SFXLIST      ; ADDR OF SFXLIST
        DW SONGLIST     ; ADDR OF SONGLIST




SONGLIST:
        DW CLOUDSONG



SFXLIST:
        DW SFXDORQUEHIT

        DW SFXIMPSPIT

	DW SFXPULLEVER

        DW SFXCREATHIT
        DW SFXPICKUPTHING
        DW SFXTHINGLANDED
        DW SFXEXPLOSION

        DW SFXCHESTOPEN


;---------------------------------------------------------------

; INCLUDES FOR SFX


SFXCREATHIT:
        INCLUDE CREATHIT.DFX

SFXDORQUEHIT:
        INCLUDE DRQUEHIT.DFX

SFXIMPSPIT:
        INCLUDE IMPSPIT.DFX

SFXPICKUPTHING:
        INCLUDE PICKUP.DFX

SFXTHINGLANDED:
        INCLUDE THINGLND.DFX

SFXEXPLOSION:
        INCLUDE BOMBEXPL.DFX

SFXCHESTOPEN:
        INCLUDE CHESTOPN.DFX

SFXPULLEVER:
	INCLUDE PULLEVER.DFX

;---------------------------------------------------------------

; INCLUDES FOR SONG


CLOUDSONG:      INCLUDE CLOUDS.DSC

SYNBASS1:       INCLUDE SYNBASS1.DSC

SHAKER2:        INCLUDE SHAKER2.DSC

DRYBDRUM:       INCLUDE DRYBDRUM.DSC

TRIMUTE:        INCLUDE TRIMUTE.DSC

TRIANGLE:       INCLUDE TRIANGLE.DSC

ANWMIDST:	INCLUDE ANWMIDST.DSC

DRYSDRUM:	INCLUDE DRYSDRUM.DSC

ANWSYNCH:	INCLUDE ANWSYNCH.DSC

;---------------------------------------------------------------

TRANSFEREND:    DW $0000,CODE

At offset 15BA00:

ITIAL:
	    CMP $2140
	    BNE BOOT_INITIAL
	    A8BIT
	    LDA #$CC
	    BRA BOOT_ENTRY1
BOOT_REPEAT:
	    LDA [$FD],Y
	    INY
	    XBA
	    LDA #$00
	    BRA BOOT_ENTRY2
BOOT_LOOP:
	    XBA
	    LDA [$FD],Y
	    INY
	    XBA
BOOT_WAIT1: CMP $2140
	    BNE BOOT_WAIT1
	    INC
BOOT_ENTRY2:
	    A16BIT
	    STA $2140
	    A8BIT
	    DEX
	    BNE BOOT_LOOP
BOOT_WAIT2: CMP $2140
	    BNE BOOT_WAIT2
BOOT_ZERO:  ADC #$03  
	    BEQ BOOT_ZERO
BOOT_ENTRY1:
	    PHA
	    A16BIT
	    LDA [$FD],Y
	    INY
	    INY
	    TAX
	    LDA [$FD],Y
	    INY
	    INY
	    STA $2142
	    A8BIT
	    CPX #$0001
	    LDA #$00
	    ROL
	    STA $2141
	    ADC #$7F
	    PLA
	    STA $2140
BOOT_WAIT3: CMP $2140
	    BNE BOOT_WAIT3
	    BVS BOOT_REPEAT
	    PLP


            PHP
            A8BIT
           
            
;             LDA #$FE
;WAITFORSPCINIT:         
;             CMP $2140
;             BNE WAITFORSPCINIT
             
             LDA #$01
             STA STEREOVAL

             LDA #$80
             STA PANVAL

             LDA #$00
             STA SFXNR

             STA SFXCNTR

             LDA #$0B
             STA SFXMAX

            PLP
            RTS


STARTVBLOOP:
            JSR XFERSOUND
            JSR DOWNLOADSOUND




VBLOOP:
	    JSR WRITECHAR
            JSR INCCOLORS
            JSR HANDLEJOY
            JSR UPDATESFX

	    A16BIT
	    LDA ACTPAL
	    INC
	    INC
	    INC
	    CMP #$0200
	    BMI 

                if ~def(maingrp)
                inform 2,"This module cannot be assembled sepperately!"
                elseif


                pushs


                section volcanomusicsec,code6

@startsongvolandsteps	 equ $5400

@sfxconst_dorquehit      equ 0
@sfxconst_impspit        equ 1
@sfxconst_lildevilhit    equ 3
@sfxconst_pickupthing    equ 4
@sfxconst_thinglanded    equ 5
@sfxconst_explosionblast equ 6
@sfxconst_devilshoot     equ 4
@sfxconst_lildevil       equ 4
@sfxconst_fireball       equ 2
@sfxconst_rockfall       equ 8
@sfxconst_openchest      equ 7
@sfxconst_devilhit       equ 3

@sfxvol_impspit        equ 110
@sfxvol_dorquehit      equ 128
@sfxvol_lildevilhit    equ 128
@sfxvol_pickupthing    equ 128
@sfxvol_thinglanded    equ 128
@sfxvol_explosionblast equ 255
@sfxvol_devilshoot     equ 128
@sfxvol_lildevil       equ 128
@sfxvol_fireball       equ 128
@sfxvol_rockfall       equ 190
@sfxvol_openchest      equ 192
@sfxvol_devilhit       equ 128


@sfx_impspit        rb 1
@sfx_dorquehit      rb 1
@sfx_lildevilhit    rb 1
@sfx_pickupthing    rb 1
@sfx_thinglanded    rb 1
@sfx_explosionblast rb 1
@sfx_devilshoot     rb 1
@sfx_lildevil       rb 1
@sfx_fireball       rb 1
@sfx_rockfall       rb 1
@sfx_openchest      rb 1
@sfx_devilhit       rb 1


@sfxpan_impspit         rw 1
@sfxpan_dorquehit       rw 1
@sfxpan_lildevilhit     rw 1
@sfxpan_pickupthing     rw 1
@sfxpan_thinglanded     rw 1
@sfxpan_explosionblast  rw 1
@sfxpan_devilshoot      rw 1
@sfxpan_lildevil        rw 1
@sfxpan_fireball        rw 1
@sfxpan_rockfall        rw 1
@sfxpan_openchest       rw 1
@sfxpan_devilhit        rw 1




@clearsamples:  proc far,mx:2
                stz @sfx_impspit
                stz @sfx_dorquehit
                stz @sfx_lildevilhit
                stz @sfx_pickupthing
                stz @sfx_thinglanded
                stz @sfx_explosionblast
                stz @sfx_devilshoot
                stz @sfx_lildevil
                stz @sfx_fireball
                stz @sfx_rockfall
                stz @sfx_openchest
                stz @sfx_devilhit
                rtl
                endp


@playsamples:   proc far,mx:2

                if ~(musicon=0)
                lda usesound
                bne @playsound
                rtl
@playsound:

                xy8bit
                ldy #2
                ldx #0

                lda @sfx_explosionblast
                beq @playsw2
                senddummy
                a16bit
                lda @sfxpan_explosionblast
                bpl @playswpan1
                lda #0
                bra @playswpan2
@playswpan1:    cmp #$100
                bmi @playswpan2
                lda #$ff
@playswpan2:    a8bit
                sta $2143
                lda #@sfxvol_explosionblast
                sta $2142
                txa
                ora #@sfxconst_explosionblast*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw2
                brl @playswend
@playsw2:
                lda @sfx_rockfall
                beq @playsw15
                senddummy
                a16bit
                lda @sfxpan_rockfall
                bpl @playswpan27
                lda #0
                bra @playswpan28
@playswpan27:   cmp #$100
                bmi @playswpan28
                lda #$ff
@playswpan28:   a8bit
                sta $2143
                lda #@sfxvol_rockfall
                sta $2142
                txa
                ora #@sfxconst_rockfall*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw15
                brl @playswend
@playsw15:
                lda @sfx_dorquehit
                beq @playsw3
                senddummy
                a16bit
                lda @sfxpan_dorquehit
                bpl @playswpan3
                lda #0
                bra @playswpan4
@playswpan3:    cmp #$100
                bmi @playswpan4
                lda #$ff
@playswpan4:    a8bit
                sta $2143
                lda #@sfxvol_dorquehit
                sta $2142
                txa
                ora #@sfxconst_dorquehit*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw3
                brl @playswend
@playsw3:
                lda @sfx_openchest
                beq @playsw16
                senddummy
                a16bit
                lda @sfxpan_openchest
                bpl @playswpan29
                lda #0
                bra @playswpan30
@playswpan29:   cmp #$100
                bmi @playswpan30
                lda #$ff
@playswpan30:   a8bit
                sta $2143
                lda #@sfxvol_openchest
                sta $2142
                txa
                ora #@sfxconst_openchest*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw16
                brl @playswend
@playsw16:
                lda @sfx_lildevilhit
                beq @playsw4
                senddummy
                a16bit
                lda @sfxpan_lildevilhit
                bpl @playswpan5
                lda #0
                bra @playswpan6
@playswpan5:    cmp #$100
                bmi @playswpan6
                lda #$ff
@playswpan6:    a8bit
                sta $2143
                lda #@sfxvol_lildevilhit
                sta $2142
                txa
                ora #@sfxconst_lildevilhit*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw4
                brl @playswend
@playsw4:
                lda @sfx_devilhit
                beq @playsw17
                senddummy
                a16bit
                lda @sfxpan_devilhit
                bpl @playswpan31
                lda #0
                bra @playswpan32
@playswpan31:   cmp #$100
                bmi @playswpan32
                lda #$ff
@playswpan32:   a8bit
                sta $2143
                lda #@sfxvol_devilhit
                sta $2142
                txa
                ora #@sfxconst_devilhit*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw17
                brl @playswend
@playsw17:
                lda @sfx_impspit
                beq @playsw5
                senddummy
                a16bit
                lda @sfxpan_impspit
                bpl @playswpan9
                lda #0
                bra @playswpan10
@playswpan9:    cmp #$100
                bmi @playswpan10
                lda #$ff
@playswpan10:   a8bit
                sta $2143
                lda #@sfxvol_impspit
                sta $2142
                txa
                ora #@sfxconst_impspit*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw5
                brl @playswend
@playsw5:
                lda @sfx_pickupthing
                beq @playsw7
                senddummy
                a16bit
                lda @sfxpan_pickupthing
                bpl @playswpan13
                lda #0
                bra @playswpan14
@playswpan13:   cmp #$100
                bmi @playswpan14
                lda #$ff
@playswpan14:   a8bit
                sta $2143
                lda #@sfxvol_pickupthing
                sta $2142
                txa
                ora #@sfxconst_pickupthing*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw7
                brl @playswend
@playsw7:
                lda @sfx_thinglanded
                beq @playsw8
                senddummy
                a16bit
                lda @sfxpan_thinglanded
                bpl @playswpan15
                lda #0
                bra @playswpan16
@playswpan15:   cmp #$100
                bmi @playswpan16
                lda #$ff
@playswpan16:   a8bit
                sta $2143
                lda #@sfxvol_thinglanded
                sta $2142
                txa
                ora #@sfxconst_thinglanded*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw8
                brl @playswend
@playsw8:
                lda @sfx_devilshoot
                beq @playsw12
                senddummy
                a16bit
                lda @sfxpan_devilshoot
                bpl @playswpan21
                lda #0
                bra @playswpan22
@playswpan21:   cmp #$100
                bmi @playswpan22
                lda #$ff
@playswpan22:   a8bit
                sta $2143
                lda #@sfxvol_devilshoot
                sta $2142
                txa
                ora #@sfxconst_devilshoot*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw12
                brl @playswend
@playsw12:
                lda @sfx_fireball
                beq @playsw14
                senddummy
                a16bit
                lda @sfxpan_fireball
                bpl @playswpan25
                lda #0
                bra @playswpan26
@playswpan25:   cmp #$100
                bmi @playswpan26
                lda #$ff
@playswpan26:   a8bit
                sta $2143
                lda #@sfxvol_fireball
                sta $2142
                txa
                ora #@sfxconst_fireball*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw14
                brl @playswend
@playsw14:
                lda @sfx_lildevil
                beq @playsw13
                senddummy
                a16bit
                lda @sfxpan_lildevil
                bpl @playswpan23
                lda #0
                bra @playswpan24
@playswpan23:   cmp #$100
                bmi @playswpan24
                lda #$ff
@playswpan24:   a8bit
                sta $2143
                lda #@sfxvol_lildevil
                sta $2142
                txa
                ora #@sfxconst_lildevil*2
                sta $2141
                sendplaysmp
                inx
                dey
                bne @playsw13
                brl @playswend
@playsw13:


@playswend:     xy16bit
                senddummy
                lda #$00
                sta $2140

                call @clearsamples

                endif
                rtl
                endp


@startsonga:    proc far,mx:0

                if ~(musicon=0)
                a8bit
                lda usemusic
                bne @playmusica
                a16bit
                rtl
@playmusica:    a16bit

                lda #@startsongvolandsteps
                sta $2142
                lda #$0009
                sta $2140
                a8bit
@startsonga1:   cmp $2140
                bne @startsonga1
                lda #0
                sta $2140
                a16bit

                endif
                rtl
                endp



                pops

                endif

At offset 15F000:

; This file was generated by MakeMuza.

; It contains necessary information to be included into
; a snes program and then downloaded into the SPC700.


        ; Header

        db $00          ; Song id number
        db $01          ; Number of instruments
        db $00          ; Number of sfxs
        DB $FF          ; MASTERVOL
        DB $01          ; (MONO)/STEREO
        DB $A0          ; DEFAULT SFXVOL
        DB $FF          ; DEFAULT SONGVOL


        ; Instrument 0 - ANWMIDST.DSC

        DB $40               ; DEFAULT CHANVOL
        DB $40               ; DEFAULT CHANPAN
        DB $00               ; BASEOCT
        DB $8F               ; ADSR1
        DB $E0               ; ADSR2
        DB $00               ; GAIN
        DB $00               ; PITCH FACTOR
        DW $0000             ; AFTERTOUCH FACTOR
        db $00               ; Waveform id number
        DW $08FB             ; BASEFREQ


CTS     ------------

; ---------   IT MUST BE DEFINED IN ORDER