;z80 ;zx-spectrum ;assembler ; Disassembly of the file "beepmusic.bin" ; ; CPU Type: Z80 ; ; Created with dZ80 2.0 ; ; on Sunday, 23 of April 2006 at 02:27 PM ; org 25500 call beepmusic1 call beepmusic2 call beepmusic3 ld b,6 fadeup_main halt halt halt halt push bc call fadeup pop bc djnz fadeup_main ld a,6 out (254),a ld hl,fox_scr ld de,0x4000 call dehrust call makefont ld hl,scrollwksp ; clear the scroll wkspace ld de,scrollwksp+1 ld (hl),l ld bc,0x11ff ldir ld hl,0x5000 ld de,foxback ld bc,0x0800 ldir call stc_init_entry mainlp halt call stc_play_entry call scroll call spin_bottle jr mainlp ; ret fadeup ld hl,0x5800 ld bc,0x300 fadeup_lp ld a,(hl) and 7 cp 7 jr nc,fadeup_next inc (hl) fadeup_next ld a,(hl) and 0x38 cp 0x38 jr nc, fadeup_next2 ld a,(hl) add a,8 ld (hl),a fadeup_next2 inc hl dec bc ld a,b or c jr nz, fadeup_lp ret makefont ld de,0x3d00 ld bc,0x0300 ld hl,font_out makefont_lp ld a,(de) push de ld de,0 rept 8 srl a rr d rr e sra d rr e endm ld (hl),d inc hl ld (hl),e inc hl ld a,d or 0x55 ld (hl),a inc hl ld a,e or 0x55 ld (hl),a inc hl pop de inc de dec bc ld a,b or c jr nz,makefont_lp ret org 0x7000 foxback dehrust include dehrust.asm fox_scr incbin foxsocls.scr.pck font_out equ 0x7800 org 35000 include beepmusic3.asm bottle include bottle.asm include stc_player.asm incbin greenhill.stc scroll scrollbits ld a,1 dec a jp nz,nonewchar scrollpos ld hl,scrolltext ld a,(hl) or a jr nz,noscrollwrap ld hl,scrolltext ld a,(hl) noscrollwrap inc hl ld (scrollpos+1),hl ; translate char to bitmap in font ld l,a ld h,0 add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl ld de,font_out - 0x0400 add hl,de ld de,scrollwksp+32 rept 16 ldi ldi dec e dec e inc d endm ld a,4 nonewchar ld (scrollbits+1),a ld hl,scrollwksp+33 ld b,16 scroll_lp push bc push hl rept 34 rld dec hl endm rld pop hl inc h pop bc djnz scroll_lp sinepos ld hl,sine inc l inc l ld (sinepos+1),hl ld c,(hl) ld b,ytable / 256 ld hl,scrollwksp rept 17 push bc push hl ld a,(bc) ld e,a inc b ld a,(bc) ld d,a rept 3 ldi endm rept 11 set 5,d ld a,(de) res 5,d or (hl) ld (de),a inc l inc e endm rept 18 ldi endm pop hl inc h pop bc inc c endm ret spin_bottle bottle_trigger ld a,3 dec a jr nz,no_bottle bottle_frame ld a,0 inc a and 7 ld (bottle_frame + 1),a ld e,a ld d,0 ld hl,0 add hl,de ; x3x32 add hl,de add hl,de add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl ld de,bottle add hl,de ; ld hl,bottle ld de,0x44f6 ld b,32 spin_bot_lp push bc push de ldi ldi ldi pop de call upde pop bc djnz spin_bot_lp ld a,3 no_bottle ld (bottle_trigger+1),a ret upde inc d ld a,d and 7 ret nz ld a,e add a,32 ld e,a ret c ld a,d sub 8 ld d,a ret scrollwksp equ 0xae00 ; needs to be on 256b boundary org 0xafa2 include beepmusic1.asm beepmusic1_end org 0xc000 ytable ; low bytes rept 3 db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 db 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20 db 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 db 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60 db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 db 0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0 db 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0 db 0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0 endm org 0xc100 ; high bytes rept 8 db 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47 endm rept 8 db 0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f endm rept 8 db 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57 endm org 0xc200 sine include sine_16.asm org 0xc347 include beepmusic2.asm scrolltext incbin scrolly.txt db 0 org 0xfec0 include beepmusic2a.asm