home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 561a.lha / S220to8SVX_v1.4 / S220to8SVX1.4.asm < prev    next >
Assembly Source File  |  1991-08-06  |  46KB  |  2,943 lines

  1. *************************************************************************
  2. *                                    *
  3. *    S220to8SVX Version 1.4 is FREEWARE !!!                *
  4. *    NO commercial use without written permission of the author    *
  5. *                                    *
  6. *    Copyright (c) 1991 Dieter Bruns                    *
  7. *    Lilienweg 131                            *
  8. *    W-2725 Hemsbünde                        *
  9. *    GERMANY                                *
  10. *                                    *
  11. *    Assembler: Devpac Version 2.14D                    *
  12. *           or A68K                         *
  13. *                                    *
  14. *************************************************************************
  15.  
  16.     IFND .A68K
  17.     incdir    "sys:devpac/include/"    ; FOR DEVPAC
  18.     ENDC
  19.     include    intuition/intuition.i
  20.     include    arpbase.i
  21.     include    hardware/custom.i
  22.  
  23.  
  24. custom        equ    $dff000
  25. rmb        equ    $dff016
  26.  
  27. aud1lc        equ    $b0
  28. aud1len        equ    $b4
  29. aud1per        equ    $b6
  30. aud1vol        equ    $b8
  31. aud0lc        equ    $a0
  32. aud0len        equ    $a4
  33. aud0per        equ    $a6
  34. aud0vol        equ    $a8
  35.  
  36. IREQW        equ    240
  37. IREQH        equ    40
  38. GX        equ    20
  39. GY        equ    27
  40. XO        equ    20
  41. YO        equ    160
  42. PAPERXO        equ    XO
  43. PAPERYO        equ    YO-33
  44. PAPERXU        equ    533
  45. PAPERYU        equ    YO+32
  46. REQW        equ    210
  47. REQH        equ    65
  48. REQOFFX        equ    REQW-40
  49. REQOFFY        equ    REQH-20
  50. TX        equ    20
  51. TY        equ    PAPERYO-50
  52. blue        equ    0
  53. white        equ    1
  54. black        equ    2
  55. orange        equ    3
  56.  
  57. NULL        equ    0
  58.  
  59. PRINTDEZ    MACRO
  60.     movem.l    d0-d7/a0-a6,-(sp)
  61.     move.l    \1,d2
  62.     bsr    decl
  63.     movem.l    (sp)+,d0-d7/a0-a6
  64.         ENDM
  65.  
  66. RELOL    MACRO
  67.     lea    \2(pc),a0
  68.     move.l    \1,(a0)
  69.     ENDM
  70.  
  71. RELOB    MACRO
  72.     lea    \2(pc),a0
  73.     move.b    \1,(a0)
  74.     ENDM
  75.  
  76. RELOW    MACRO
  77.     lea    \2(pc),a0
  78.     move.w    \1,(a0)
  79.     ENDM
  80.  
  81.     movem.l    d0/a0,-(sp)        ;save Para
  82.     sub.l    a1,a1
  83.     move.l    4,a6
  84.     jsr    -294(a6)        ;FindTask
  85.     move.l    d0,a2
  86.     tst.l    $ac(a2)            ;Process.pr_CLI
  87.     beq.s    Workbench
  88. ; CLI
  89.     movem.l    (sp)+,d0/a0        ;CLI-Para
  90.     bra    start
  91. Workbench
  92.     lea    $5c(a2),a0        ;Process.pr_MsgPort
  93.     jsr    -384(a6)        ;WaitPort
  94.     lea    $5c(a2),a0        ;Process.pr_MsgPort
  95.     jsr    -372(a6)        ;GetMsg
  96.     lea    WBmsg(pc),a0
  97.     move.l    d0,(a0)            ;save WBmsg
  98.     movem.l    (sp)+,d0/a0
  99. start
  100.     bsr.s    _main            ;Hauptprog.
  101.     move.l    d0,-(sp)
  102.     move.l    WBmsg(pc),d0
  103.     beq.s    exit            ;CLI-Start
  104.     jsr    -132(a6)        ;Forbid
  105.     move.l    WBmsg(pc),a1
  106.     jsr    -378(a6)        ;ReplyMsg
  107. exit
  108.     move.l    (sp)+,d0
  109.     rts
  110.  
  111. _main
  112.     move.l    #custom,a5
  113.     move.l    4,a6
  114.     lea    arpname(pc),a1
  115.     moveq    #ArpVersion,d0
  116.     jsr    -552(a6)        ;OpenLibrary
  117.     lea    _ArpBase(pc),a0
  118.     move.l    d0,(a0)+
  119.     beq    arpfailed
  120.     move.l    d0,a1
  121.  
  122.     move.l    IntuiBase(a1),(a0)+
  123.     move.l    DosBase(a1),(a0)+
  124.     move.l    GfxBase(a1),(a0)
  125.  
  126.     bsr    getmem
  127.     tst.l    d0
  128.     beq    memfailed
  129.  
  130.     lea    NewWindowStructure1(pc),a0
  131.     lea    _IntuitionBase(pc),a1
  132.     move.l    (a1),a6
  133.     jsr    -204(a6)        ;OpenWindow
  134.     tst.l    d0
  135.     beq    windowfailed
  136.     lea    FirstWindow(pc),a0
  137.     move.l    d0,(a0)
  138.     move.l    d0,a0
  139.  
  140.     lea    WScreen(pc),a1
  141.     move.l    46(a0),(a1)
  142.     lea    Port(pc),a1
  143.     move.l    wd_UserPort(a0),(a1)
  144.     move.l    wd_RPort(a0),a0
  145.     move.l    a0,a4
  146.     lea    LogoImage(pc),a1
  147.     move.w    #0,d0
  148.     move.w    #0,d1
  149.     jsr    -114(a6)        ;DrawImage
  150.  
  151.     move.w    #0,d0
  152.     move.w    #0,d1
  153.     move.l    a4,a0
  154.     lea    PlayText(pc),a1
  155.     jsr    -216(a6)        ;PrintItext
  156.     bsr    balken
  157.     bsr    paper
  158.  
  159. event
  160.     move.l    4,a6
  161.     move.l    Port(pc),d2
  162.     move.l    d2,a0
  163.     jsr    -384(a6)        ;WaitPort
  164.     move.l    d2,a0
  165.     jsr    -372(a6)        ;GetMsg
  166.     move.l    d0,a1            ;for ReplyMsg
  167.     move.l    im_Class(a1),d4
  168.     move.l    im_IAddress(a1),a2    ;grab the potential Gadget address
  169.     move.w    gg_GadgetID(a2),d3
  170.     move.w    im_Code(a1),d5        ;Code for MOUSEBUTTONS
  171.     jsr    -378(a6)        ;ReplyMsg
  172.  
  173.     cmpi.l    #GADGETUP,d4
  174.     beq    gadget
  175.  
  176.     cmpi.l    #GADGETDOWN,d4
  177.     beq    gadget
  178.  
  179.     cmpi.l    #CLOSEWINDOW,d4
  180.     beq    closewindow
  181.  
  182.     cmpi.l    #MOUSEBUTTONS,d4
  183.     bne    event
  184.  
  185.     cmpi.w    #MENUUP,d5        ;rmb released
  186.     beq    doplay
  187.     bra    event
  188.  
  189. gadget
  190.     move.l    40(a2),a0
  191.     jmp    (a0)
  192.  
  193. closewindow
  194.     lea    errornr(pc),a0
  195.     move.l    #0,(a0)
  196.     bra    ende
  197.  
  198. getmem
  199.     move.l    #67584,d0
  200.     move.l    #$10000,d1
  201.     jsr    -198(a6)        ;AllocMem
  202.     tst.l    d0
  203.     beq    fail
  204.     lea    bu(pc),a0
  205.     move.l    d0,(a0)
  206.  
  207.     move.l    #131072,d0
  208.     move.l    #$02+$10000,d1
  209.     jsr    -198(a6)        ;AllocMem
  210.     tst.l    d0
  211.     beq    fail
  212.     lea    conw(pc),a0
  213.     move.l    d0,(a0)
  214.  
  215.     move.l    #131072,d0
  216.     move.l    #$10000,d1
  217.     jsr    -198(a6)        ;AllocMem
  218.     tst.l    d0
  219.     beq    fail
  220.     lea    undo(pc),a0
  221.     move.l    d0,(a0)
  222. fail
  223.     rts
  224.  
  225. loadgadget
  226.     lea    fchar(pc),a0
  227.     move.b    #0,(a0)
  228.     lea    gethead(pc),a0
  229.     bsr    _filereq
  230.     tst.l    d0
  231.     beq    event
  232.     lea    filename(pc),a0
  233.     move.l    d0,(a0)
  234.     bsr    readsample
  235.     tst.l    d0
  236.     bne    event
  237.  
  238.     lea    type(pc),a0
  239.     move.b    (a0),d0
  240.  
  241.     cmp.b    #3,d0
  242.     ble    stru1
  243.  
  244.     cmp.b    #5,d0
  245.     ble    stru2
  246.  
  247.     cmp.b    #6,d0
  248.     ble    stru4
  249.  
  250.     cmp.b    #8,d0
  251.     ble    stru2
  252.  
  253.     cmp.b    #10,d0
  254.     ble    stru4
  255.  
  256. stru1
  257.     RELOL    #32768,conlen
  258.     RELOW    #6,step
  259.     RELOW    #64,multi
  260.     RELOW    #16,shift
  261.     RELOW    #1,add
  262.     moveq    #0,d4
  263.     bra    make
  264. stru2
  265.     RELOL    #65536,conlen
  266.     RELOW    #7,step
  267.     RELOW    #128,multi
  268.     RELOW    #32,shift
  269.     RELOW    #1,add
  270.     moveq    #1,d4
  271.     bra    make
  272. stru4
  273.     RELOL    #131072,conlen
  274.     RELOW    #8,step
  275.     RELOW    #256,multi
  276.     RELOW    #64,shift
  277.     RELOW    #1,add
  278.     moveq    #3,d4
  279. make
  280.     bsr    OpenMessage
  281.     move.l    conw(pc),a2
  282.     RELOL    #0,samplestart
  283.     lea    conlen(pc),a1
  284.     RELOL    (a1),sampleend
  285.     RELOL    (a1),undoconlen
  286.     RELOL    #0,sampleend
  287.     RELOW    #PAPERXO,oldstartd4
  288.     RELOW    #512+PAPERXO+2,oldendd4
  289.     RELOB    #0,from30to15
  290. doit
  291.     RELOL    #0,counter
  292.     move.l    file(pc),d1
  293.     move.l    bu(pc),d2
  294.     move.l    len(pc),d3
  295.     move.l    _DOSBase(pc),a6
  296.     jsr    -42(a6)            ;Read
  297.     cmp.l    d3,d0
  298.     bne    Req2
  299.     move.l    bu(pc),a0
  300. cont
  301.     move.l    #4,d0
  302.     move.l    #63,d1
  303. convertloop
  304.     moveq    #0,d2
  305.     move.b    3(a0),d2
  306.     lsl.l    #5,d2
  307.     lea    ber(pc),a1
  308.     move.l    d2,(a1)
  309.     moveq    #0,d2
  310.     move.b    4(a0),d2
  311.     lsr.b    #2,d2
  312.     or.l    d2,(a1)
  313.     move.l    ber(pc),d2
  314.     asr.w    d0,d2
  315.     move.b    d2,(a2)+
  316.     add.l    #2,a0
  317.     dbra    d1,convertloop
  318.  
  319.     lea    counter(pc),a1
  320.     add.l    #132,(a1)
  321.     move.l    counter(pc),d0
  322.     cmp.l    len(pc),d0
  323.     bge    done
  324.     add.l    #4,a0
  325.     bra    cont
  326. done
  327.     dbra    d4,doit
  328.  
  329. makeundo
  330.     move.l    conlen(pc),d4
  331.     move.l    conw(pc),a0
  332.     move.l    undo(pc),a1
  333. 1$    move.b    (a0)+,(a1)+
  334.     sub.l    #1,d4
  335.     beq    undodone
  336.     bra    1$
  337. undodone
  338.     move.l    _DOSBase(pc),a6
  339.     move.l    file(pc),d1
  340.     lea    wavepara(pc),a0
  341.     move.l    a0,d2
  342.     move.l    #$30,d3
  343.     jsr    -42(a6)            ;Read
  344.     cmp.l    d3,d0
  345.     bne    Req2
  346.     lea    wavepara(pc),a0        ;for filename
  347.     addq.l    #3,a0            ;offset
  348.     moveq    #8,d1
  349.     lea    samplename(pc),a1
  350. copy
  351.     move.b    (a0)+,(a1)+
  352.     dbra    d1,copy
  353.     move.b    #0,(a1)
  354.  
  355.     lea    sname(pc),a1
  356.     lea    samplename(pc),a0
  357.     moveq    #8,d0
  358. 1$
  359.     move.b    (a0)+,(a1)+
  360.     dbra    d0,1$
  361.  
  362.     lea    samplename(pc),a0
  363.     moveq    #9,d0
  364.     move.b    #0,0(a0,d0)
  365. filtspace
  366.     cmp.b    #32,0(a0,d0)
  367.     beq    addnull
  368.     bgt    switch3015
  369. t2
  370.     dbra    d0,filtspace
  371.     bra    switch3015
  372. addnull
  373.     move.b    #0,0(a0,d0)
  374.     bra    t2
  375.  
  376. switch3015
  377.     lea    wavepara(pc),a0
  378.     moveq    #0,d2
  379.     moveq    #0,d0
  380.     move.b    $10(a0),d2
  381.     move.b    $11(a0),d0
  382.     rol    #4,d0
  383.     or.w    d0,d2
  384.     sub.w    #$18,d2
  385.     lea    tnr(pc),a1
  386.     move.l    d2,(a1)
  387.     move.b    $E(a0),d0
  388.     move.l    d0,d2
  389.     btst    #0,d0
  390.     beq    dosamp30
  391.     RELOB    #0,loaded30
  392.     bsr    data15
  393.     bra    contswitch
  394. dosamp30
  395.     RELOB    #1,loaded30
  396.     bsr    data30
  397. contswitch
  398.     lea    reckey(pc),a0
  399.     move.l    tnr(pc),d1
  400.     lsl.l    #2,d1
  401.     add.l    d1,a0
  402.     move.l    #3,d1
  403.     lea    tonenrtext(pc),a1
  404. 1$
  405.     move.b    (a0)+,(a1)+
  406.     dbra    d1,1$
  407.  
  408.     bsr    prep
  409.     lea    rkey(pc),a1
  410.     jsr    -216(a6)        ;PrintItext
  411.  
  412.     lea    nameItexttext(pc),a1
  413.     moveq    #8,d0
  414. 3$
  415.     move.b    #32,(a1)+
  416.     dbra    d0,3$
  417.  
  418.     lea    samplename(pc),a0
  419.     lea    nameItexttext(pc),a1
  420.     moveq    #8,d0
  421. 2$
  422.     move.b    (a0)+,(a1)+
  423.     tst.b    (a0)
  424.     dbeq    d1,2$
  425.     bsr    prep
  426.     lea    nameItext(pc),a1
  427.     jsr    -216(a6)        ;PrintItext
  428.  
  429.     move.l    file(pc),d1
  430.     move.l    _DOSBase(pc),a6
  431.     jsr    -36(a6)            ;Close
  432.     move.l    #0,d0
  433.     RELOB    #1,sound
  434.  
  435.     lea    VolumeGadget1SIBuff(pc),a0
  436.     move.w    #"10",(a0)+
  437.     move.b    #"0",(a0)
  438.     lea    Volumepropgad1SInfo(pc),a0
  439.     move.w    #6600,2(a0)
  440.     lea    multiVolume(pc),a0
  441.     move.l    #100,(a0)
  442.  
  443.     lea    Startgad(pc),a0
  444.     move.w    #PAPERXO-SEGW,4(a0)
  445.     lea    Endgad(pc),a0
  446.     move.w    #PAPERXU,4(a0)
  447.  
  448.     bsr    CloseMessage
  449.     bsr    drawloop
  450.     bra    event
  451.  
  452. undoVolume
  453.     move.b    sound(pc),d0
  454.     tst.b    d0
  455.     beq    Req4
  456.  
  457.     move.l    undoconlen(pc),d4
  458.     bsr    OpenMessage
  459.     move.l    undo(pc),a0
  460.     move.l    conw(pc),a1
  461. 1$
  462.     move.b    (a0)+,(a1)+
  463.     sub.l    #1,d4
  464.     beq    2$
  465.     bra    1$
  466. 2$
  467.     lea    VolumeGadget1SIBuff(pc),a0
  468.     move.w    #"10",(a0)+
  469.     move.b    #"0",(a0)
  470.     lea    Volumepropgad1SInfo(pc),a0
  471.     move.w    #6600,2(a0)
  472.     lea    multiVolume(pc),a0
  473.     move.l    #100,(a0)
  474.     bsr    CloseMessage
  475.     move.b    from30to15(pc),d0
  476.     beq    3$
  477.     bsr    data1530
  478.     bra    c3015
  479. 3$
  480.     bsr    drawloop
  481.     bra    event
  482.  
  483. drawloop
  484.     move.l    conw(pc),a2
  485.     move.w    multi(pc),d7
  486.     move.w    shift(pc),d5
  487.     move.l    conlen(pc),d4
  488.     moveq    #XO+1,d6
  489.     bsr    paper
  490. nextdraw
  491.     sub.l    #1,d4
  492.     beq     fillstartend
  493.     move.b    (a2)+,d2
  494.     sub.w    #1,d7
  495.     bne    nodraw
  496.     add.w    add(pc),d6
  497.     move.w    multi(pc),d7
  498. nodraw
  499.     asr.b    #2,d2
  500.     and.b    #$FF,d2
  501.     ext.w    d2
  502.     move.w    #YO,d1
  503.     add.w    d2,d1
  504.     sub.w    #1,d5
  505.     bne    nextdraw
  506.     move.w    shift(pc),d5
  507.     move.l    a4,a1
  508.     move.w    d6,d0
  509.     jsr    -246(a6)        ;Draw
  510.     bra    nextdraw
  511. fillstartend
  512.     move.l    a4,a1
  513.     bclr    #3,33(a1)        ;NOAREAOUTLINE
  514.     move.w    #2,d0            ;COMPLEMENT
  515.     jsr    -354(a6)        ;SetDrMd
  516.     move.l    a4,a1
  517.     move.w    #blue,d0
  518.     jsr    -342(a6)        ;SetAPen
  519.  
  520.     lea    Endgad(pc),a0
  521.     move.w    4(a0),d0
  522.     move.w    #PAPERYO,d1        ;yo
  523.     move.w    #PAPERXU,d2        ;xu
  524.     cmp.w    d0,d2
  525.     beq    senofill1
  526.     move.w    #PAPERYU,d3        ;yu
  527.     move.l    a4,a1
  528.     jsr    -306(a6)        ;RectFill
  529. senofill1
  530.     lea    Startgad(pc),a0
  531.     move.w    4(a0),d2
  532.     add.w    #SEGW,d2
  533.     move.l    a4,a1
  534.     move.w    #PAPERXO,d0        ;xo
  535.     cmp.w    d0,d2
  536.     beq     newstartend
  537.     move.w    #PAPERYO,d1        ;yo
  538.     move.w    #PAPERYU,d3        ;yu
  539.     jsr    -306(a6)        ;RectFill
  540. newstartend
  541.     lea    samplestart(pc),a0
  542.     move.l    (a0),d0
  543.     PRINTDEZ d0
  544.     lea    StartGadgetSIBuff(pc),a1
  545.     lea    buffer(pc),a0
  546.     moveq    #6,d0
  547. 1$
  548.     move.b    (a0)+,(a1)+
  549.     dbra    d0,1$
  550.  
  551.     lea    conlen(pc),a0
  552.     move.l    (a0),d0
  553.     sub.l    sampleend(pc),d0
  554.  
  555.     PRINTDEZ d0
  556.     lea    EndGadgetSIBuff(pc),a1
  557.     lea    buffer(pc),a0
  558.     moveq    #6,d0
  559. 2$
  560.     move.b    (a0)+,(a1)+
  561.     dbra    d0,2$
  562.     bra    balken            ;(bsr rts)
  563.  
  564. drawstart
  565.     move.l    _GfxBase(pc),a6
  566.     move.l    a4,a1
  567.     bclr    #3,33(a1)        ;NOAREAOUTLINE
  568.     move.w    #2,d0            ;COMPLEMENT
  569.     jsr    -354(a6)
  570.     move.l    a4,a1
  571.     move.w    #blue,d0
  572.     jsr    -342(a6)        ;SetAPen
  573.  
  574.     moveq    #0,d0
  575.     move.w    step(pc),d0
  576.     move.l    samplestart(pc),d4
  577.     lsr.l    d0,d4
  578.     add.w    #PAPERXO,d4
  579.  
  580.     move.l    a4,a1
  581.     move.w    #PAPERXO,d0        ;xo
  582.     move.w    #PAPERYO,d1        ;yo
  583.     move.w    oldstartd4(pc),d2    ;xu
  584.     cmp.w    d0,d2
  585.     beq    snofill1
  586.     move.w    #PAPERYU,d3        ;yu
  587.     move.l    a4,a1
  588.     jsr    -306(a6)        ;RectFill
  589. snofill1
  590.     move.l    a4,a1
  591.     move.w    #PAPERXO,d0        ;xo
  592.     move.w    #PAPERYO,d1        ;yo
  593.     move.w    d4,d2            ;xu
  594.     cmp.w    d0,d2
  595.     beq    snofill2
  596.     move.w    #PAPERYU,d3        ;yu
  597.     move.l    a4,a1
  598.     jsr    -306(a6)        ;RectFill
  599. snofill2
  600.     RELOW    d4,oldstartd4
  601.     rts
  602.  
  603. data1530
  604.     move.w    step(pc),d0
  605.     addq    #1,d0
  606.     RELOW    d0,step
  607.     lea    samplestart(pc),a0
  608.     move.l    (a0),d0
  609.     asl.l    #1,d0
  610.     move.l    d0,(a0)
  611.     lea    conlen(pc),a0
  612.     move.l    (a0),d0
  613.     asl.l    #1,d0
  614.     move.l    d0,(a0)
  615.     lea    sampleend(pc),a0
  616.     move.l    (a0),d0
  617.     asl.l    #1,d0
  618.     move.l    d0,(a0)
  619.     rts
  620.  
  621. data3015
  622.     move.w    step(pc),d0
  623.     subq    #1,d0
  624.     RELOW    d0,step
  625.     lea    samplestart(pc),a0
  626.     move.l    (a0),d0
  627.     asr.l    #1,d0
  628.     move.l    d0,(a0)
  629.     lea    conlen(pc),a0
  630.     move.l    (a0),d0
  631.     asr.l    #1,d0
  632.     move.l    d0,(a0)
  633.     lea    sampleend(pc),a0
  634.     move.l    (a0),d0
  635.     asr.l    #1,d0
  636.     move.l    d0,(a0)
  637.     bra    data15            ;bsr rts
  638.  
  639. drawend
  640.     move.l    _GfxBase(pc),a6
  641.     move.l    a4,a1
  642.     bclr    #3,33(a1)        ;NOAREAOUTLINE
  643.     move.w    #2,d0            ;COMPLEMENT
  644.     jsr    -354(a6)
  645.     move.l    a4,a1
  646.     move.w    #blue,d0
  647.     jsr    -342(a6)        ;SetAPen
  648.     moveq    #0,d0
  649.     move.w    step(pc),d0
  650.     move.l    conlen(pc),d1
  651.     sub.l    sampleend(pc),d1
  652.     lsr.l    d0,d1
  653.     move.w    d1,d4
  654.     add.w    #PAPERXO+1,d4
  655.  
  656.     move.w    oldendd4(pc),d0        ;xo
  657.     move.w    #PAPERYO,d1        ;yo
  658.     move.w    #PAPERXU,d2        ;xu
  659.     cmp.w    d0,d2
  660.     beq    enofill1
  661.     move.w    #PAPERYU,d3        ;yu
  662.     move.l    a4,a1
  663.     jsr    -306(a6)        ;RectFill
  664. enofill1
  665.     move.w    d4,d0            ;xo
  666.     move.w    #PAPERYO,d1        ;yo
  667.     move.w    #PAPERXU,d2        ;xu
  668.     cmp.w    d0,d2
  669.     beq    enofill2
  670.     move.w    #PAPERYU,d3        ;yu
  671.     move.l    a4,a1
  672.     jsr    -306(a6)        ;RectFill
  673. enofill2
  674.     RELOW    d4,oldendd4
  675.     rts
  676.  
  677. adjustVolume
  678.     move.b    sound(pc),d0
  679.     tst.b    d0
  680.     beq    Req4
  681.  
  682.     lea    Volumerequester(pc),a0
  683.     move.w    28(a0),d0
  684.     btst    #13,d0
  685.     bne    event
  686.     move.l    FirstWindow(pc),a1
  687.     move.l    _IntuitionBase(pc),a6
  688.     jsr    -240(a6)        ;Request
  689.     bra    event
  690.  
  691. propVolume
  692.     move.l    a4,-(sp)
  693.     lea    Volumepropgad1SInfo(pc),a3
  694.     lea    Volumepropgad(pc),a4
  695.     lea    13(a4),a4        ;GADGET Flags
  696. propagain
  697.     moveq    #0,d0
  698.     move.w    2(a3),d0
  699.     divu    #66,d0
  700.     and.l    #$0000ffff,d0
  701.     lea    multiVolume(pc),a0
  702.     move.l    d0,(a0)
  703.     bsr    multiupdate
  704.     btst    #7,(a4)
  705.     bne    propagain
  706.     move.l    (sp)+,a4
  707.     bra    event
  708.  
  709. minus1Volume
  710.     moveq    #-1,d0
  711.     bra    dopmVolume
  712. plus1Volume
  713.     moveq    #1,d0
  714. dopmVolume
  715.     lea    multiVolume(pc),a1
  716.     add.l    d0,(a1)
  717.     move.l    (a1),d0
  718.     RELOL    #0,min
  719.     RELOL    #992,max
  720.     jsr    minmax
  721.     move.l    d0,(a1)
  722.     move.l    d0,d1
  723.     cmp.w    #992,d0
  724.     bne    notfull
  725.     move.w    #$FFFF,d1
  726.     bra    setfull
  727. notfull
  728.     mulu    #66,d1
  729. setfull
  730.     lea    Volumepropgad1SInfo(pc),a0
  731.     move.w    d1,2(a0)
  732.     bsr    multiupdate
  733.  
  734.     lea    Volumepropgad(pc),a0
  735.     move.l    FirstWindow(pc),a1
  736.     sub.l    a2,a2
  737.     moveq    #1,d0
  738.     jsr    -432(a6)        ;RefreshGList
  739.     bra    event
  740.  
  741. multiupdate
  742.     PRINTDEZ d0
  743.     lea    buffer(pc),a0
  744.     lea    4(a0),a0
  745.     lea    VolumeGadget1SIBuff(pc),a1
  746.     moveq    #2,d0
  747. 1$
  748.     move.b    (a0)+,(a1)+
  749.     dbra    d0,1$
  750.  
  751.     move.l    _IntuitionBase(pc),a6
  752.     lea    VolumeGadget1(pc),a0
  753.     move.l    FirstWindow(pc),a1
  754.     sub.l    a2,a2
  755.     moveq    #1,d0
  756.     jsr    -432(a6)        ;RefreshGList
  757.     rts
  758.  
  759. doadjustVolume
  760.     bsr    OpenMessage
  761.     move.l    undoconlen(pc),d4
  762.     move.l    conw(pc),a2
  763.     move.l    undo(pc),a1
  764.     move.l    multiVolume(pc),d1
  765. Volumeloop
  766.     sub.l    #1,d4
  767.     beq    Volumedone
  768.     move.b    (a1)+,d2
  769.     ext.w    d2
  770.     muls    d1,d2
  771.     divs    #100,d2
  772.     cmp.w    #127,d2
  773.     ble    notovermax
  774.     move.w    #127,d2
  775. notovermax
  776.     cmp.w    #-128,d2
  777.     bgt    notovermin
  778.     move.w    #-128,d2
  779. notovermin
  780.     move.b    d2,(a2)+
  781.     bra    Volumeloop
  782. Volumedone
  783.     bsr    CloseMessage
  784.     move.b    from30to15(pc),d0
  785.     beq    1$
  786.     bsr    data1530
  787.     bra    c3015
  788. 1$
  789.     bsr    drawloop
  790.     bra    event
  791.  
  792. c30_to_15
  793.     move.b    loaded30(pc),d0
  794.     beq    Req3
  795.     lea    samplefreq(pc),a0
  796.     cmp.l    #$7530,(a0)
  797.     bne    c1530
  798. c3015
  799.     move.l    conlen(pc),d0
  800.     move.l    conw(pc),a0
  801.     move.l    a0,a1
  802.     subq    #1,d0
  803. 1$
  804.     move.b    (a0),(a1)+
  805.     addq    #2,a0
  806.     dbra    d0,1$
  807.  
  808.     bsr    data3015
  809.  
  810.     RELOB    #1,from30to15
  811.     RELOW    #2,add
  812.     bsr    drawloop
  813.     bra    event
  814.  
  815. c1530
  816.     bsr    data1530
  817.     move.l    conlen(pc),d0
  818.     move.l    conw(pc),a1
  819.     move.l    undo(pc),a0
  820.     subq    #1,d0
  821. 1$
  822.     move.b    (a0)+,(a1)+
  823.     dbra    d0,1$
  824.  
  825.     bsr    data30
  826.  
  827.     RELOB    #0,from30to15
  828.     RELOW    #1,add
  829.     bsr    drawloop
  830.     bra    event
  831.  
  832. Req3
  833.     lea    ReqText3(pc),a1
  834.     bsr    showreq
  835.     bra    event
  836.  
  837. data15
  838.     bsr    prep
  839.     lea    srate15(pc),a1
  840.     jsr    -216(a6)        ;PrintItext
  841.     lea    per(pc),a0
  842.     move.w    #248,(a0)
  843.     lea    rate(pc),a0
  844.     move.w    #$3a98,(a0)
  845.     lea    samplefreq(pc),a0
  846.     move.l    #$3a98,(a0)
  847.     rts
  848.  
  849. data30
  850.     bsr    prep
  851.     lea    srate30(pc),a1
  852.     jsr    -216(a6)        ;PrintItext
  853.     lea    per(pc),a0
  854.     move.w    #124,(a0)
  855.     lea    rate(pc),a0
  856.     lea    samplefreq(pc),a1
  857.     move.l    #$7530,(a1)
  858.     move.w    #$7530,(a0)
  859.     rts
  860.  
  861. headerdata
  862.     move.l    conlen(pc),d0
  863.     sub.l    samplestart(pc),d0
  864.     sub.l    sampleend(pc),d0
  865.     lea    bodylen(pc),a0
  866.     move.l    d0,4(a0)
  867.     add.l    #$90,d0
  868.     lea    header(pc),a0
  869.     move.l    d0,4(a0)
  870.     move.l    conlen(pc),d0
  871.     sub.l    samplestart(pc),d0
  872.     sub.l    sampleend(pc),d0
  873.     lea    shotlen(pc),a0
  874.     move.l    d0,(a0)
  875.  
  876.     lea    frequenz(pc),a0
  877.     move.l    tnr(pc),d1
  878.     lsl.l    #1,d1
  879.     add.l    d1,a0
  880.     lea    tonefreq(pc),a1
  881.     move.w    (a0),(a1)
  882.     move.l    samplefreq(pc),d0
  883.     moveq    #0,d1
  884.     move.w    tonefreq(pc),d1
  885.     divu    d1,d0
  886.     and.l    #$00ff,d0
  887.     move.l    d0,d2
  888.     lea    hicycle(pc),a0
  889.     move.l    d0,(a0)
  890.     rts
  891.  
  892. prep
  893.     move.w    #0,d0
  894.     move.w    #0,d1
  895.     lea    _IntuitionBase(pc),a0
  896.     move.l    (a0),a6
  897.     move.l    FirstWindow(pc),a1
  898.     move.l    a4,a0
  899.     rts
  900.  
  901. save8SVX
  902.     lea    samplename(pc),a0
  903.     lea    fchar(pc),a1
  904.     moveq    #8,d0
  905. 1$
  906.     move.b    (a0)+,(a1)+
  907.     tst.b    (a0)
  908.     dbeq    d0,1$
  909.     move.b    #0,(a1)
  910.  
  911.     lea    fchar(pc),a0
  912.     bsr    getlen
  913.     sub.l    #1,a0
  914.     move.b    #".",(a0)+
  915.     move.b    #"8",(a0)+
  916.     move.b    #"S",(a0)+
  917.     move.b    #"V",(a0)+
  918.     move.b    #"X",(a0)+
  919.     move.b    #0,(a0)
  920.  
  921.     lea    savehead(pc),a0
  922.     bsr    _filereq
  923.     tst.l    d0
  924.     beq    event
  925.     lea    filename(pc),a0
  926.     move.l    d0,(a0)
  927.     bsr    savesample
  928.     bra    event
  929.  
  930. doplay
  931.     move.b    sound(pc),d0
  932.     tst.b    d0
  933.     beq    Req4
  934. play
  935.     move.w    #$0180,intreq(a5)
  936.     move.w    #$000f,dmacon(a5)
  937.     lea    aud1lc(a5),a0
  938.     move.l    conw(pc),d0
  939.     add.l    samplestart(pc),d0
  940.     move.l    d0,(a0)
  941.     lea    aud0lc(a5),a0
  942.     move.l    d0,(a0)
  943.     move.l    conlen(pc),d1
  944.     sub.l    samplestart(pc),d1
  945.     sub.l    sampleend(pc),d1
  946.     beq    event
  947.     lsr.l    #1,d1
  948.     RELOW    d1,audlen
  949.     move.w    audlen(pc),aud1len(a5)
  950.     move.w    #64,aud1vol(a5)
  951.     move.w    per(pc),aud1per(a5)
  952.  
  953.     move.w    audlen(pc),aud0len(a5)
  954.     move.w    #64,aud0vol(a5)
  955.     move.w    per(pc),aud0per(a5)
  956.  
  957.     move.w    #$00ff,adkcon(a5)    ;Modulation off
  958.     move.w    #$8203,dmacon(a5)    ;Kanal 1 on
  959. wait
  960.     btst    #8,intreqr(a5)        ;audio1 set ?
  961.     beq    wait
  962.     move.w    #$0180,intreq(a5)
  963. 1$
  964.     move.w    #$0f00,$dff186        ;Color03 ROT
  965.     btst    #10,rmb
  966.     beq    3$
  967.     btst    #8,intreqr(a5)        ;audio1 set ?
  968.     beq    1$
  969. 3$
  970.     move.w    #$0003,dmacon(a5)    ;Kanal 1 off
  971.     bra    event
  972.  
  973. Req4
  974.     lea    ReqText4(pc),a1
  975.     bsr    showreq
  976.     bra    event
  977.  
  978. memfailed
  979.     RELOL    #1,errornr
  980.     bra    ende
  981. windowfailed
  982.     RELOL    #2,errornr
  983.     bra    ende
  984. requesterfailed
  985.     RELOL    #3,errornr
  986.     bra    ende
  987. arpfailed
  988.     move.l    4,a6
  989.     lea    intname(pc),a1
  990.     moveq    #0,d0
  991.     jsr    -552(a6)        ;OpenLibrary
  992.     lea    _IntuitionBase(pc),a0
  993.     move.l    d0,(a0)
  994.     RELOL    #4,errornr
  995. ende
  996.     move.l    errornr(pc),d0
  997.     bne    dispalert
  998. closeall
  999.     move.l    FirstWindow(pc),d0
  1000.     beq    nowclose
  1001.     move.l    #0,a1
  1002.     move.l    _ArpBase(pc),a6
  1003.     move.l    d0,a0
  1004.     jsr    _LVOCloseWindowSafely(a6) ;CloseWindow
  1005. nowclose
  1006.     move.l    4,a6
  1007.     move.l    _ArpBase(pc),d0
  1008.     beq    bigfail
  1009.     move.l    d0,a1
  1010.     jsr    -414(a6)        ;CloseLibrary
  1011.  
  1012.     move.l    bu(pc),d0
  1013.     beq    no1
  1014.     move.l    bu(pc),a1
  1015.     move.l    #67584,d0
  1016.     jsr    -210(a6)        ;FreeMem
  1017. no1
  1018.     move.l    conw(pc),d0
  1019.     beq    no2
  1020.     move.l    conw(pc),a1
  1021.     move.l    #131072,d0
  1022.     jsr    -210(a6)        ;FreeMem
  1023. no2
  1024.     move.l    undo(pc),d0
  1025.     beq    bigfail
  1026.     move.l    undo(pc),a1
  1027.     move.l    #131072,d0
  1028.     jsr    -210(a6)        ;FreeMem
  1029. bigfail
  1030.     moveq    #0,d0
  1031.     rts
  1032.  
  1033. dispalert
  1034.     lea    _IntuitionBase(pc),a0
  1035.     move.l    (a0),d0
  1036.     beq    closeall
  1037.     move.l    d0,a6
  1038.     lea    Alertstring(pc),a0
  1039.     move.l    #Alertlen,d2
  1040.     move.l    errornr(pc),d1
  1041.     subq.l    #1,d1
  1042.     mulu    d1,d2
  1043.     add.l    d2,a0
  1044.     move.w    #80,d1
  1045.     moveq    #0,d0
  1046.     jsr    -90(a6)            ;DisplayAlert
  1047.     bra    closeall
  1048.  
  1049. readsample
  1050.     move.l    _DOSBase(pc),a6
  1051.     move.l    filename(pc),d1
  1052.     move.l    #1005,d2
  1053.     jsr    -30(a6)            ;Open
  1054.     lea    file(pc),a0
  1055.     move.l    d0,(a0)
  1056.     beq    Req2
  1057.  
  1058.     move.l    d0,d1
  1059.     lea    ctrl(pc),a0
  1060.     move.l    a0,d2
  1061.     moveq    #7,d3
  1062.     move.l    _DOSBase(pc),a6
  1063.     jsr    -42(a6)            ;Read
  1064.     cmp.l    d3,d0
  1065.     bne    Req2
  1066.     lea    ctrlname(pc),a1
  1067.     bsr    comp
  1068.     tst.l    d0
  1069.     beq    s220
  1070.     lea    ctrlnames10(pc),a1
  1071.     bsr    comp
  1072.     tst.l    d0
  1073.     bne    Req1
  1074. s220
  1075.     move.l    file(pc),d1
  1076.     lea    type(pc),a0
  1077.     move.l    a0,d2
  1078.     moveq    #1,d3
  1079.     move.l    _DOSBase(pc),a6
  1080.     jsr    -42(a6)            ;Read
  1081.     cmp.l    d0,d3
  1082.     bne    Req2
  1083.     move.l    #0,d0
  1084.     rts
  1085.  
  1086. Req1
  1087.     move.l    file(pc),d1
  1088.     jsr    -36(a6)            ;Close
  1089.     lea    ReqText1(pc),a1
  1090.     bsr    showreq
  1091.     moveq    #1,d0
  1092.     rts
  1093.  
  1094. Req2
  1095.     lea    ReqText2(pc),a1
  1096.     bsr    showreq
  1097.     move.l    file(pc),d0
  1098.     bne    closefile
  1099. cReq2
  1100.     moveq    #1,d0
  1101.     rts
  1102. closefile
  1103.     move.l    _DOSBase(pc),a6
  1104.     move.l    file(pc),d1
  1105.     jsr    -36(a6)            ;Close
  1106.     bra    cReq2
  1107.  
  1108. savesample
  1109.     bsr    headerdata
  1110.     move.l    _DOSBase(pc),a6
  1111.     move.l    filename(pc),d1
  1112.     move.l    #1006,d2
  1113.     jsr    -30(a6)            ;Open
  1114.     tst.l    d0
  1115.     beq    wopenf
  1116.     lea    file(pc),a0
  1117.     move.l    d0,(a0)
  1118.  
  1119.     move.l    file(pc),d1
  1120.     lea    header(pc),a0
  1121.     move.l    a0,d2
  1122.     move.l    #headersize,d3
  1123.     jsr    -48(a6)            ;Write
  1124.     cmp.l    d3,d0
  1125.     bne    writefail
  1126.  
  1127.     move.l    file(pc),d1
  1128.     move.l    conw(pc),d2
  1129.     add.l    samplestart(pc),d2
  1130.     move.l    conlen(pc),d3
  1131.     sub.l    samplestart(pc),d3
  1132.     sub.l    sampleend(pc),d3
  1133.     jsr    -48(a6)            ;Write
  1134.     cmp.l    d3,d0
  1135.     bne    writefail
  1136.  
  1137. writefail
  1138.     move.l    file(pc),d1
  1139.     jsr    -36(a6)            ;Close
  1140.     moveq    #0,d0
  1141.     rts
  1142. wopenf
  1143.     move.l    #1,d0
  1144.     rts
  1145. comp
  1146.     lea    ctrl(pc),a0
  1147.     moveq    #6,d0
  1148. h1
  1149.     cmp.b    (a0)+,(a1)+
  1150.     bne    diff
  1151.     dbra    d0,h1
  1152.     moveq    #0,d0
  1153.     rts
  1154. diff
  1155.     moveq    #1,d0
  1156.     rts
  1157.  
  1158. showreq
  1159.     lea    _IntuitionBase(pc),a0
  1160.     move.l    (a0),a6
  1161.     lea    Messreq(pc),a0
  1162.     move.l    a1,24(a0)
  1163.  
  1164.     move.w    #1,-(sp)
  1165.     move.l    FirstWindow(pc),a1
  1166.     move.l    a1,-(sp)
  1167.     move.w    #REQOFFY,-(sp)        ;offy
  1168.     move.w    #REQOFFX,-(sp)        ;offx
  1169.     move.w    #REQH+3,-(sp)        ;reqy
  1170.     move.w    #REQW+5,-(sp)        ;reqx
  1171.     bsr    mousetest
  1172.     add.l    #14,sp
  1173.  
  1174.     move.w    d0,4(a0)
  1175.     move.w    d1,6(a0)
  1176.     move.w    28(a0),d0
  1177.     btst    #13,d0
  1178.     bne    reqret
  1179.     move.l    FirstWindow(pc),a1
  1180.     jsr    -240(a6)        ;Request
  1181. reqret
  1182.     rts
  1183.  
  1184. _filereq
  1185.     lea    freq(pc),a1
  1186.     move.l    a0,(a1)
  1187.     move.l    _ArpBase(pc),a6
  1188.     lea    freq(pc),a0
  1189.     move.b    #%00001000,16(a0)
  1190.     move.l    FirstWindow(pc),12(a0)
  1191.     jsr    _LVOFileRequest(a6)
  1192.     tst.l    d0
  1193.     beq    retnull
  1194.     bsr    _build
  1195.     lea    fchar(pc),a0
  1196.     move.b    #0,(a0)
  1197.     lea    filetext(pc),a0
  1198.     move.b    (a0),d0
  1199.     beq.b    retnull
  1200.     move.l    a0,d0
  1201.     rts
  1202. retnull
  1203.     moveq    #0,d0
  1204.     rts
  1205.  
  1206. _build
  1207.     lea    dchar(pc),a0
  1208.     bsr    getlen            ;get len directory
  1209.     lea    filetext(pc),a1
  1210.     tst.l    d0
  1211.     beq    done2
  1212.     lea    dchar(pc),a0
  1213.     lea    filetext(pc),a1
  1214. cp
  1215.     move.b    (a0)+,(a1)+
  1216.     dbra    d0,cp
  1217.     cmp.b    #':',-2(a1)        ;subdirectory ?
  1218.     beq    done1            ;no
  1219.     move.b    #'/',-1(a1)        ;add /
  1220.     bra    done2
  1221. done1
  1222.     subq.l    #1,a1
  1223. done2
  1224.     lea    fchar(pc),a0
  1225.     bsr    getlen
  1226.     lea    fchar(pc),a0
  1227. paste
  1228.     move.b    (a0)+,(a1)+
  1229.     dbra    d0,paste
  1230.     rts
  1231.  
  1232. getlen
  1233.     moveq    #0,d0
  1234. w1
  1235.     cmp.b    #0,(a0)+
  1236.     beq    1$
  1237.     addq.l    #1,d0
  1238.     bra    w1
  1239. 1$
  1240.     rts
  1241.  
  1242. paper
  1243.     move.l    _GfxBase(pc),a6
  1244.     move.l    a4,a1
  1245.     move.w    #0,d0            ;JAM1
  1246.     jsr    -354(a6)
  1247.  
  1248.     move.l    a4,a1
  1249.     move.b    #black,27(a1)        ;OPen
  1250.     bset    #3,33(a1)        ;AREAOUTLINE
  1251.     move.w    #white,d0
  1252.     jsr    -342(a6)        ;SetAPen
  1253.     move.w    #PAPERXO-1,d0        ;xo
  1254.     move.w    #PAPERYO-1,d1        ;yo
  1255.     move.w    #PAPERXU+1,d2        ;xu
  1256.     move.w    #PAPERYU+1,d3        ;yu
  1257.     move.l    a4,a1
  1258.     jsr    -306(a6)        ;RectFill
  1259.  
  1260.     move.l    a4,a1
  1261.     move.w    #black,d0
  1262.     jsr    -342(a6)        ;SetAPen
  1263.  
  1264.     move.l    a4,a1
  1265.     move.w    #XO,d0
  1266.     move.w    #YO,d1
  1267.     jsr    -240(a6)        ;Move Nullpkt.
  1268.  
  1269.     move.l    a4,a1
  1270.     move.w    #PAPERXU,d0
  1271.     move.w    #YO,d1
  1272.     jsr    -246(a6)        ;Draw
  1273.  
  1274.     move.l    a4,a1
  1275.     move.w    #XO,d0
  1276.     move.w    #YO,d1
  1277.     jsr    -240(a6)        ;Move Nullpkt.
  1278.  
  1279.     move.l    a4,a1
  1280.     move.w    #orange,d0
  1281.     jsr    -342(a6)        ;SetAPen
  1282.     rts
  1283.  
  1284. OpenMessage
  1285.     lea    InfoReq(pc),a0
  1286.     move.w    28(a0),d1
  1287.     btst    #13,d1
  1288.     bne    ret1
  1289.  
  1290.     move.l    FirstWindow(pc),a1
  1291.     move.l    _IntuitionBase(pc),a6
  1292.     jsr    -240(a6)        ;Request
  1293.     tst.l    d0
  1294.     beq    ret1
  1295.     RELOB    #1,closereq
  1296. ret1
  1297.     rts
  1298.  
  1299.  
  1300. CloseMessage
  1301.     move.b    closereq(pc),d0
  1302.     beq    ret2
  1303.     lea    InfoReq(pc),a0
  1304.     move.l    FirstWindow(pc),a1
  1305.     move.l    _IntuitionBase(pc),a6
  1306.     jsr    -120(a6)        ;EndRequest
  1307. ret2
  1308.     RELOB    #0,closereq
  1309.     rts
  1310.  
  1311. mousetest
  1312.     movem.l    a0/a1/d2/d3/d4,-(sp)
  1313.  
  1314.     RELOW    24(sp),reqw
  1315.     RELOW    26(sp),reqh
  1316.     RELOW    28(sp),offx
  1317.     RELOW    30(sp),offy
  1318.     move.l    32(sp),a1
  1319.     RELOW    36(sp),flag
  1320.     move.w    flag(pc),d0
  1321.     beq    screen
  1322.  
  1323.     move.w    14(a1),d0        ;MouseX
  1324.     move.w    12(a1),d1        ;MouseY
  1325.     move.w    8(a1),d2        ;WindowW
  1326.     move.w    10(a1),d3        ;WindowH
  1327.     bra    mdoit
  1328. screen
  1329.     move.w    18(a1),d0        ;MouseX
  1330.     move.w    16(a1),d1        ;MouseY
  1331.     move.w    12(a1),d2        ;WindowW
  1332.     move.w    14(a1),d3        ;WindowH
  1333. mdoit
  1334.     sub.w    d0,d2
  1335.     move.w    reqw(pc),d4
  1336.     sub.w    offx(pc),d4
  1337.     cmp.w    d4,d2
  1338.     blt    corx
  1339. bcorx
  1340.     sub.w    d1,d3
  1341.     move.w    reqh(pc),d4
  1342.     sub.w    offy(pc),d4
  1343.     cmp.w    d4,d3
  1344.     blt    cory
  1345. bcory
  1346.     bra    makeoff
  1347. corx
  1348.     move.w    flag(pc),d0
  1349.     beq    getscreenW
  1350.     move.w    8(a1),d0        ;WindowW
  1351.     bra    mcont1
  1352. getscreenW
  1353.     move.w    12(a1),d0        ;ScreenW
  1354. mcont1
  1355.     sub.w    d4,d0
  1356.     bra    bcorx
  1357. cory
  1358.     move.w    flag(pc),d0
  1359.     beq    getscreenH
  1360.     move.w    10(a1),d1        ;WindowH
  1361.     bra    mcont2
  1362. getscreenH
  1363.     move.w    14(a1),d1        ;ScreenH
  1364. mcont2
  1365.     sub.w    d4,d1
  1366.     bra    bcory
  1367.  
  1368. makeoff
  1369.     sub.w    offx(pc),d0
  1370.     bmi    negx
  1371. bnegx
  1372.     sub.w    offy(pc),d1
  1373.     bmi    negy
  1374.     bra    mback
  1375. negx
  1376.     move.w    #0,d0
  1377.     bra    bnegx
  1378. negy
  1379.     move.w    #0,d1
  1380. mback
  1381.     movem.l    (sp)+,a0/a1/d2/d3/d4
  1382.     rts
  1383.  
  1384. AdjustFilereq
  1385.     move.w    #0,-(sp)
  1386.     move.l    WScreen(pc),a1
  1387.     move.l    a1,-(sp)
  1388.     move.w    #20,-(sp)        ;offy
  1389.     move.w    #150,-(sp)        ;offx
  1390.     move.w    6(a0),-(sp)        ;reqy
  1391.     move.w    4(a0),-(sp)        ;reqx
  1392.  
  1393.     bsr    mousetest
  1394.     add.l    #14,sp
  1395.  
  1396.     move.w    d0,(a0)
  1397.     move.w    d1,2(a0)
  1398.     rts
  1399.  
  1400. dostart
  1401.     move.b    sound(pc),d0
  1402.     tst.b    d0
  1403.     beq    Req4
  1404.  
  1405.     move.l    FirstWindow(pc),a3
  1406.     move.w    14(a3),-(sp)
  1407.     move.w    12(a3),-(sp)
  1408. nextstart
  1409.     moveq    #0,d0
  1410.     move.w    14(a3),d1
  1411.     move.w    2(sp),d6
  1412.     cmp.w    d1,d6
  1413.     beq    wait1
  1414.     sub.w    d6,d1
  1415.     move.w    14(a3),2(sp)
  1416.     lea    Startgad(pc),a2
  1417.     add.w    d1,4(a2)
  1418.     moveq    #0,d0
  1419.     move.w    4(a2),d0
  1420.     RELOL    #PAPERXO-SEGW,min
  1421.     lea    Endgad(pc),a0
  1422.     moveq    #0,d1
  1423.     move.w    4(a0),d1
  1424.     sub.w    #SEGW+1,d1
  1425.     RELOL    d1,max
  1426.     bsr    minmax
  1427.     move.w    d0,4(a2)
  1428.     move.w    d0,d4
  1429.     move.w    #PAPERXO-SEGW,d0
  1430.     lea    Startgad(pc),a0
  1431.     move.w    4(a0),d1
  1432.     sub.w    d0,d1
  1433.     and.w    #$ffff,d1
  1434.     moveq    #0,d0
  1435.     move.w    step(pc),d0
  1436.     lsl.l    d0,d1
  1437.     RELOL    d1,samplestart
  1438.     bsr    newstartend
  1439.     bsr    drawstart
  1440. wait1
  1441.     btst    #6,$BFE001        ;lmb
  1442.     beq    nextstart
  1443.     add.l    #4,sp
  1444.     bra    event
  1445.  
  1446. doend
  1447.     move.b    sound(pc),d0
  1448.     tst.b    d0
  1449.     beq    Req4
  1450.  
  1451.     move.l    FirstWindow(pc),a3
  1452.     move.w    14(a3),-(sp)
  1453.     move.w    12(a3),-(sp)
  1454. nextend
  1455.     moveq    #0,d0
  1456.     move.w    14(a3),d1
  1457.     move.w    2(sp),d6
  1458.     cmp.w    d1,d6
  1459.     beq    wait2
  1460.     sub.w    d6,d1
  1461.     move.w    14(a3),2(sp)
  1462.     lea    Endgad(pc),a2
  1463.     add.w    d1,4(a2)
  1464.     moveq    #0,d0
  1465.     move.w    4(a2),d0
  1466.     RELOL    #PAPERXU,max
  1467.     lea    Startgad(pc),a0
  1468.     moveq    #0,d1
  1469.     move.w    4(a0),d1
  1470.     add.w    #SEGW+1,d1
  1471.     RELOL    d1,min
  1472.     bsr    minmax
  1473.     move.w    d0,4(a2)
  1474.     move.w    d0,d4
  1475.     move.w    #PAPERXU,d0
  1476.     lea    Endgad(pc),a0
  1477.     move.w    4(a0),d1
  1478.     sub.w    d1,d0
  1479.     and.w    #$ffff,d0
  1480.     moveq    #0,d1
  1481.     move.w    step(pc),d1
  1482.     lsl.l    d1,d0
  1483.     RELOL    d0,sampleend
  1484.     bsr    newstartend
  1485.     bsr    drawend
  1486. wait2
  1487.     btst    #6,$BFE001        ;lmb
  1488.     beq    nextend
  1489.     add.l    #4,sp
  1490.     bra    event
  1491.  
  1492. startstring
  1493.     bsr    CorrInt
  1494.     lea    samplestart(pc),a1
  1495.     move.l    d0,(a1)
  1496.     bra    dospm
  1497. startplus
  1498.     moveq    #2,d0
  1499.     bra    startgpm
  1500. startminus
  1501.     moveq    #-2,d0
  1502. startgpm
  1503.     lea    samplestart(pc),a1
  1504.     add.l    d0,(a1)
  1505. dospm
  1506.     move.b    sound(pc),d0
  1507.     tst.b    d0
  1508.     beq    Req4
  1509.  
  1510.     move.l    (a1),d0
  1511.     RELOL    #0,min
  1512.     move.l    conlen(pc),d1
  1513.     sub.l    sampleend(pc),d1
  1514.     RELOL    d1,max
  1515.     bsr    minmax
  1516.     move.l    d0,(a1)
  1517.     bsr    drawstart
  1518.     move.l    samplestart(pc),d0
  1519.     moveq    #0,d1
  1520.     move.w    step(pc),d1
  1521.     lsr.l    d1,d0
  1522.     lea    Startgad(pc),a0
  1523.     move.w    d0,4(a0)
  1524.     add.w    #PAPERXO-SEGW,4(a0)
  1525.     bsr    newstartend
  1526.     bra    event
  1527.  
  1528. endstring
  1529.     bsr    CorrInt
  1530.     move.l    conlen(pc),d1
  1531.     sub.l    d0,d1
  1532.     lea    sampleend(pc),a1
  1533.     move.l    d1,(a1)
  1534.     bra    doepm
  1535. endplus
  1536.     move.l    #-2,d2
  1537.     bra    endgpm
  1538. endminus
  1539.     move.l    #2,d2
  1540. endgpm
  1541.     lea    sampleend(pc),a1
  1542.     add.l    d2,(a1)
  1543. doepm
  1544.     move.b    sound(pc),d0
  1545.     tst.b    d0
  1546.     beq    Req4
  1547.  
  1548.     move.l    (a1),d0
  1549.     RELOL    #0,min
  1550.     move.l    conlen(pc),d1
  1551.     sub.l    samplestart(pc),d1
  1552.     RELOL    d1,max
  1553.     bsr    minmax
  1554.     move.l    d0,(a1)
  1555.     bsr    drawend
  1556.     move.l    conlen(pc),d1
  1557.     sub.l    sampleend(pc),d1
  1558.     moveq    #0,d0
  1559.     move.w    step(pc),d0
  1560.     lsr.l    d0,d1
  1561.     move.w    #PAPERXO,d0
  1562.     add.w    d1,d0
  1563.     lea    Endgad(pc),a0
  1564.     move.w    d0,4(a0)
  1565.     bsr    newstartend
  1566.     bra    event
  1567.  
  1568. balken
  1569.     move.l    _GfxBase(pc),a6
  1570.     move.l    a4,a1
  1571.     bclr    #3,33(a1)        ;NOAREAOUTLINE
  1572.     move.w    #0,d0            ;JAM1
  1573.     jsr    -354(a6)
  1574.  
  1575.     move.l    a4,a1
  1576.     move.w    #black,d0
  1577.     jsr    -342(a6)        ;SetAPen
  1578.  
  1579.     move.w    #PAPERXO-SEGW,d0    ;xo
  1580.     move.w    #PAPERYO-10,d1        ;yo
  1581.     move.w    #PAPERXU+SEGW,d2    ;xu
  1582.     move.w    #PAPERYO-10+SEGH,d3    ;yu
  1583.     move.l    a4,a1
  1584.     jsr    -306(a6)        ;RectFill
  1585.  
  1586.     move.l    _IntuitionBase(pc),a6
  1587.     lea    Startgad(pc),a0
  1588.     move.l    FirstWindow(pc),a1
  1589.     sub.l    a2,a2
  1590.     moveq    #4,d0
  1591.     jsr    -432(a6)        ;RefreshGList
  1592.  
  1593.     move.l    conlen(pc),d0
  1594.     sub.l    samplestart(pc),d0
  1595.     sub.l    sampleend(pc),d0
  1596.     PRINTDEZ d0
  1597.     lea    buffer(pc),a0
  1598.     lea    samplelentext(pc),a1
  1599.     moveq    #6,d0
  1600. 1$    move.b    (a0)+,(a1)+
  1601.     dbra    d0,1$
  1602.     move.w    #0,d0
  1603.     move.w    #0,d1
  1604.     move.l    a4,a0
  1605.     lea    sampleleninfo(pc),a1
  1606.     jsr    -216(a6)        ;PrintItext
  1607.     rts
  1608.  
  1609.  
  1610. *****    a2=StrGadget LONGINT
  1611. CorrInt
  1612.     move.l    a6,-(sp)
  1613.     move.l    34(a2),a0        ;SInfo
  1614.     move.l    (a0),a0            ;StrBuff
  1615.     move.l    _ArpBase(pc),a6
  1616.     jsr    _LVOAtol(a6)
  1617.     move.l    (sp)+,a6
  1618.     rts
  1619.  
  1620. minmax
  1621.     movem.l    d1/d2,-(sp)
  1622.     ext.l    d0
  1623.     add.l    #50,d0
  1624.     move.l    min(pc),d2
  1625.     add.l    #50,d2
  1626.  
  1627.     cmp.l    d2,d0
  1628.     blt    setmin
  1629.  
  1630.     move.l    max(pc),d2
  1631.     add.l    #50,d2
  1632.     cmp.l    d2,d0
  1633.     bgt    setmax
  1634.     beq    domax
  1635.  
  1636.     sub.l    #50,d0
  1637.     bra    mmback
  1638. setmin
  1639.     bsr    _beep
  1640.     move.l    min(pc),d0
  1641.     bra    mmback
  1642. setmax
  1643.     bsr    _beep
  1644. domax
  1645.     move.l    max(pc),d0
  1646. mmback
  1647.     movem.l    (sp)+,d1/d2
  1648.     rts
  1649.  
  1650. _beep
  1651.     movem.l    d0/d1/a0/a1/a6,-(sp)
  1652.     move.w    #$0003,dmacon(a5)    ;clear audio 0+1 DMA-Kanal
  1653.     move.l    #wave,aud0lc(a5)
  1654.     move.w    #wavesize/2,aud0len(a5)
  1655.     move.w    #64,aud0vol(a5)
  1656.     move.w    #220,aud0per(a5)
  1657.  
  1658.     move.l    #wave,aud1lc(a5)
  1659.     move.w    #wavesize/2,aud1len(a5)
  1660.     move.w    #64,aud1vol(a5)
  1661.     move.w    #225,aud1per(a5)
  1662.  
  1663.     move.w    #$00ff,adkcon(a5)    ;Modulation off
  1664.  
  1665.     move.w    #$8203,dmacon(a5)    ;channel 0+1 on
  1666.     move.l    _DOSBase(pc),a6
  1667.     move.l    #7,d1
  1668.     jsr    -198(a6)        ;Delay
  1669.     move.w    #$0003,dmacon(a5)    ;channel 0+1 off
  1670.     movem.l    (sp)+,d0/d1/a0/a1/a6
  1671.     rts
  1672.  
  1673. decl
  1674.     clr.b    d3
  1675.     move.l    d2,d4
  1676.     bpl    plus
  1677.     neg.l    d2
  1678.     move.b    #1,d3
  1679. plus
  1680.     moveq    #5,d0            ;digits-1
  1681.     lea    buffer(pc),a0
  1682.     add.l    #1,a0
  1683.     lea    table10(pc),a1
  1684. ne    moveq    #'0',d1
  1685. dec    addq    #1,d1
  1686.     sub.l    (a1),d2
  1687.     bcc.s    dec
  1688.     subq    #1,d1
  1689.     add.l    (a1),d2
  1690.     move.b    d1,(a0)+
  1691.     lea    4(a1),a1
  1692.     dbra    d0,ne
  1693.     lea    buffer(pc),a0
  1694. rep
  1695.     move.b    #' ',(a0)+
  1696.     cmp.b    #'0',(a0)
  1697.     beq    rep
  1698.     tst.b    d3
  1699.     beq    done3
  1700.     move.b    #'-',-1(a0)
  1701. done3
  1702.     tst.l    d4
  1703.     bne    done4
  1704.     lea    buffer(pc),a0
  1705.     move.b    #"0",6(a0)
  1706. done4
  1707.     rts
  1708.  
  1709. table10
  1710.     dc.l    100000
  1711.     dc.l    10000
  1712.     dc.l    1000
  1713.     dc.l    100
  1714.     dc.l    10
  1715.     dc.l    1
  1716.  
  1717. buffer    ds.b    7
  1718.     dc.b    0
  1719.     cnop    0,2
  1720. freq
  1721.     dc.l    head
  1722. fname    dc.l    fchar
  1723.     dc.l    dchar
  1724.     dc.l    0
  1725.     dc.w    0
  1726.     dc.l    AdjustFilereq
  1727.     dc.l    0
  1728.  
  1729. head    ds.b    30
  1730.     cnop    0,2
  1731. fchar    ds.b    33
  1732.     cnop    0,2
  1733. dchar    ds.b    34
  1734.     cnop    0,2
  1735.  
  1736. header    dc.b    "FORM",$00,$00,$00,$00
  1737.     dc.b    "8SVXVHDR",$00,$00,$00,$14
  1738. shotlen    dc.b    $00,$00,$40,$00
  1739.     dc.b    $00,$00,$00,$00
  1740. hicycle    dc.b    $00,$00,$00,$00
  1741. rate    dc.b    $00,$00,$01,$00
  1742.     dc.b    $00,$01,$00,$00
  1743.     dc.b    "NAME",$00,$00,$00,$0c
  1744. sname    ds.b    12
  1745.     dc.b    "(c) ",$00,$00,$00,$2a
  1746.     dc.b    "for converter software: Dieter Bruns 1989",0
  1747.     dc.b    "ANNO",$00,$00,$00,$1a
  1748.     dc.b    "Sampling Hardware ROLAND",$00,$00
  1749.  
  1750. bodylen
  1751.     dc.b "BODY",$00,$00,$80,$00
  1752. headersize    equ *-header
  1753.     cnop    0,2
  1754. reckey
  1755.  dc.b 32,"C 1",32,"C#1",32,"D 1",32,"D#1",32,"E 1",32,"F 1",32,"F#1",32,"G 1",32,"G#1",32,"A 1",32,"A#1",32,"B 1"
  1756.  dc.b 32,"C 2",32,"C#2",32,"D 2",32,"D#2",32,"E 2",32,"F 2",32,"F#2",32,"G 2",32,"G#2",32,"A 2",32,"A#2",32,"B 2"
  1757.  dc.b 32,"C 3",32,"C#3",32,"D 3",32,"D#3",32,"E 3",32,"F 3",32,"F#3",32,"G 3",32,"G#3",32,"A 3",32,"A#3",32,"B 3"
  1758.  dc.b 32,"C 4",32,"C#4",32,"D 4",32,"D#4",32,"E 4",32,"F 4",32,"F#4",32,"G 4",32,"G#4",32,"A 4",32,"A#4",32,"B 4"
  1759.  dc.b 32,"C 5",32,"C#5",32,"D 5",32,"D#5",32,"E 5",32,"F 5",32,"F#5",32,"G 5",32,"G#5",32,"A 5",32,"A#5",32,"B 5"
  1760.  dc.b 32,"C 6",32,"C#6",32,"D 6",32,"D#6",32,"E 6",32,"F 6",32,"F#6",32,"G 6",32,"G#6",32,"A 6",32,"A#6",32,"B 6"
  1761.  dc.b 32,"C 7",32,"C#7",32,"D 7",32,"D#7",32,"E 7",32,"F 7",32,"F#7",32,"G 7"
  1762.  
  1763. frequenz
  1764.  dc.w 33,35,37,39,41,44,46,49,52,55,58,62
  1765.  dc.w 65,69,73,78,82,87,92,98,104,110,117,123
  1766.  dc.w 131,139,147,156,165,175,185,196,208,220,233,247
  1767.  dc.w 262,277,293,311,330,349,370,392,415,440,466,494
  1768.  dc.w 523,554,587,622,659,699,740,784,831,880,932,988
  1769.  dc.w 1047,1109,1175,1245,1319,1397,1480,1568,1661,1760,1865,1976
  1770.  dc.w 2094,2218,2350,2490,2638,2794,2960,3136
  1771.  
  1772.  
  1773. ctrlname    dc.b    "ROLAND",0
  1774.         cnop    0,2
  1775. ctrlnames10    dc.b    "ROLS10",0
  1776.         cnop    0,2
  1777. gethead        dc.b    "Load Roland_S-220 file",0
  1778.         cnop    0,2
  1779. savehead    dc.b    "Save S-220 file as 8SVX",0
  1780.         cnop    0,2
  1781.  
  1782. filetext    ds.b    80
  1783.         cnop    0,2
  1784.  
  1785. samplename    ds.b    10
  1786.         cnop    0,2
  1787.  
  1788. * Variables
  1789.  
  1790. intname        dc.b    'intuition.library',0
  1791.         cnop    0,2
  1792.  
  1793. arpname        ArpName
  1794.  
  1795. _ArpBase    ds.l    1
  1796. _IntuitionBase    ds.l    1
  1797. _DOSBase    ds.l    1
  1798. _GfxBase    ds.l    1
  1799. FirstWindow    ds.l    1
  1800. Messwindowptr    ds.l    1
  1801. errornr        ds.l    1
  1802. bu        ds.l    1
  1803. conw        ds.l    1
  1804. undo        ds.l    1
  1805. filename    ds.l    1
  1806. file        ds.l    1
  1807. Port        ds.l    1
  1808. ber        ds.l    1
  1809. counter        ds.l    1
  1810. conlen        ds.l    1
  1811. undoconlen    ds.l    1
  1812. tnr        ds.l    1
  1813. samplefreq    ds.l    1
  1814. WScreen        ds.l    1
  1815. min        ds.l    1
  1816. max        ds.l    1
  1817.  
  1818. WBmsg        dc.l    0
  1819. len        dc.l    67584
  1820.  
  1821. multi        ds.w    1
  1822. shift        ds.w    1
  1823. audlen        ds.w    1
  1824. per        ds.w    1
  1825. tonefreq    ds.w    1
  1826. add        ds.w    1
  1827. step        ds.w    1
  1828. reqw        ds.w    1
  1829. reqh        ds.w    1
  1830. offx        ds.w    1
  1831. offy        ds.w    1
  1832. flag        ds.w    1
  1833.  
  1834. oldstartd4    dc.w    PAPERXO
  1835. oldendd4    dc.w    512+PAPERXO+2
  1836.  
  1837. closereq    ds.b    1
  1838. type        ds.b    1
  1839. sound        ds.b    1
  1840. from30to15    ds.b    1
  1841.  
  1842. loaded30    dc.b    0
  1843.         cnop    0,2
  1844.  
  1845. ctrl        ds.b    7
  1846.         cnop    0,2
  1847. wavepara    ds.b    $30
  1848.  
  1849.  
  1850. SEGH    equ    6
  1851. SEGW    equ    12
  1852.  
  1853. Startgad:
  1854.     dc.l    startstr
  1855. VHXY1    dc.w    PAPERXO-SEGW,PAPERYO-10
  1856.     dc.w    SEGW,SEGH
  1857.     dc.w    NULL
  1858.     dc.w    GADGIMMEDIATE
  1859.     dc.w    BOOLGADGET
  1860.     dc.l    SEBorder1
  1861.     dc.l    NULL
  1862.     dc.l    NULL
  1863.     dc.l    NULL
  1864.     dc.l    NULL
  1865.     dc.w    36
  1866.     dc.l    dostart
  1867.  
  1868. STRY        equ    105
  1869. STRWX        equ    70
  1870. STRWY        equ    10
  1871.  
  1872. SMINUSX        equ    20
  1873. SSTRX        equ    SMINUSX+22
  1874. SPLUSX        equ    SSTRX+STRWX+4
  1875.  
  1876. EMINUSX        equ    420
  1877. ESTRX        equ    EMINUSX+22
  1878. EPLUSX        equ    ESTRX+STRWX+4
  1879.  
  1880.  
  1881. StringBorder:
  1882.     dc.w    -2,-1
  1883.     dc.b    black,blue,RP_JAM1,9
  1884.     dc.l    StringBorderVectors,StringBorder2
  1885. StringBorderVectors:
  1886.     dc.w    0,0
  1887.     dc.w    STRWX-1,0
  1888.     dc.w    STRWX-1,STRWY
  1889.     dc.w    0,STRWY
  1890.     dc.w    0,0
  1891.     dc.w    2,-2
  1892.     dc.w    STRWX+1,-2
  1893.     dc.w    STRWX+1,STRWY-2
  1894.     dc.w    STRWX-1,STRWY
  1895. StringBorder2:
  1896.     dc.w    -2,-1
  1897.     dc.b    white,blue,RP_JAM1,3
  1898.     dc.l    StringBorderVectors2,NULL
  1899. StringBorderVectors2:
  1900.     dc.w    STRWX,STRWY-2
  1901.     dc.w    STRWX,-1
  1902.     dc.w    1,-1
  1903.  
  1904. startstr
  1905.     dc.l    Endgad
  1906.     dc.w    SSTRX,STRY,STRWX,STRWY,GADGHCOMP,RELVERIFY+STRINGCENTER+LONGINT
  1907.     dc.w    STRGADGET
  1908.     dc.l    StringBorder,NULL,StartText,NULL,StartGadgetSInfo
  1909.     dc.w    44
  1910.     dc.l    startstring
  1911. StartGadgetSInfo:
  1912.     dc.l    StartGadgetSIBuff
  1913.     dc.l    NULL
  1914.     dc.w    0,7,0,0,0,0,0,0
  1915.     dc.l    0
  1916. samplestart
  1917.     dc.l    00
  1918.     dc.l    NULL
  1919. StartGadgetSIBuff:
  1920.     dc.b    '     0',0
  1921.     cnop    0,2
  1922.  
  1923.  
  1924. Endgad:
  1925.     dc.l    Endstr
  1926.     dc.w    PAPERXU,PAPERYO-10
  1927.     dc.w    SEGW,SEGH
  1928.     dc.w    NULL
  1929.     dc.w    GADGIMMEDIATE
  1930.     dc.w    BOOLGADGET
  1931.     dc.l    SEBorder1
  1932.     dc.l    NULL
  1933.     dc.l    NULL
  1934.     dc.l    NULL
  1935.     dc.l    NULL
  1936.     dc.w    40
  1937.     dc.l    doend
  1938. Endstr
  1939.     dc.l    Startplusgad
  1940.     dc.w    ESTRX,STRY,STRWX,STRWY,GADGHCOMP,RELVERIFY+STRINGCENTER+LONGINT
  1941.     dc.w    STRGADGET
  1942.     dc.l    StringBorder,NULL,EndText,NULL,EndGadgetSInfo
  1943.     dc.w    56
  1944.     dc.l    endstring
  1945. EndGadgetSInfo:
  1946.     dc.l    EndGadgetSIBuff
  1947.     dc.l    NULL
  1948.     dc.w    0,7,0,0,0,0,0,0
  1949.     dc.l    0
  1950. sampleend
  1951.     dc.l    00
  1952.     dc.l    NULL
  1953. EndGadgetSIBuff:
  1954.     dc.b    '     0',0
  1955.     cnop    0,2
  1956.  
  1957. PlusText
  1958.     dc.b    black,0,RP_JAM1,0
  1959.     dc.w    3,0
  1960.     dc.l    TOPAZ80
  1961.     dc.l    PlusTextText
  1962.     dc.l    NULL
  1963. PlusTextText
  1964.     dc.b    '+',0
  1965.     cnop    0,2
  1966.  
  1967. MinusText
  1968.     dc.b    black,0,RP_JAM1,0
  1969.     dc.w    3,0
  1970.     dc.l    TOPAZ80
  1971.     dc.l    MinusTextText
  1972.     dc.l    NULL
  1973. MinusTextText
  1974.     dc.b    '-',0
  1975.     cnop    0,2
  1976.  
  1977. StartText
  1978.     dc.b    black,0,RP_JAM1,0
  1979.     dc.w    12,-12
  1980.     dc.l    TOPAZ80
  1981.     dc.l    StartTextText
  1982.     dc.l    NULL
  1983. StartTextText
  1984.     dc.b    'Start',0
  1985.     cnop    0,2
  1986.  
  1987. EndText
  1988.     dc.b    black,0,RP_JAM1,0
  1989.     dc.w    20,-12
  1990.     dc.l    TOPAZ80
  1991.     dc.l    EndTextText
  1992.     dc.l    NULL
  1993. EndTextText
  1994.     dc.b    'End',0
  1995.     cnop    0,2
  1996.  
  1997. PlayText
  1998.     dc.b    black,0,RP_JAM1,0
  1999.     dc.w    TX,TY-16
  2000.     dc.l    TOPAZ80
  2001.     dc.l    PlayTextText
  2002.     dc.l    NULL
  2003. PlayTextText
  2004.     dc.b    'Right Mousebutton: Play Sample',0
  2005.     cnop    0,2
  2006.  
  2007. PMBX    equ    17
  2008. PMBY    equ    10
  2009.  
  2010. Startplusgad:
  2011.     dc.l    Startminusgad
  2012.     dc.w    SPLUSX,STRY
  2013.     dc.w    PMBX,PMBY
  2014.     dc.w    NULL
  2015.     dc.w    GADGHCOMP+RELVERIFY
  2016.     dc.w    BOOLGADGET
  2017.     dc.l    StartBorder3
  2018.     dc.l    NULL
  2019.     dc.l    PlusText
  2020.     dc.l    NULL
  2021.     dc.l    NULL
  2022.     dc.w    48
  2023.     dc.l    startplus
  2024. Startminusgad:
  2025.     dc.l    Endplusgad
  2026.     dc.w    SMINUSX,STRY
  2027.     dc.w    PMBX,PMBY
  2028.     dc.w    NULL
  2029.     dc.w    GADGHCOMP+RELVERIFY
  2030.     dc.w    BOOLGADGET
  2031.     dc.l    StartBorder3
  2032.     dc.l    NULL
  2033.     dc.l    MinusText
  2034.     dc.l    NULL
  2035.     dc.l    NULL
  2036.     dc.w    52
  2037.     dc.l    startminus
  2038. StartBorder3:
  2039.     dc.w    -1,-1
  2040.     dc.b    black,blue,RP_JAM1,9
  2041.     dc.l    StartBorderVectors3,StartBorder4
  2042. StartBorderVectors3:
  2043.     dc.w    0,0
  2044.     dc.w    PMBX-1,0
  2045.     dc.w    PMBX-1,PMBY
  2046.     dc.w    0,PMBY
  2047.     dc.w    0,0
  2048.     dc.w    2,-2
  2049.     dc.w    PMBX+1,-2
  2050.     dc.w    PMBX+1,PMBY-2
  2051.     dc.w    PMBX-1,PMBY
  2052. StartBorder4:
  2053.     dc.w    -1,-1
  2054.     dc.b    white,blue,RP_JAM1,3
  2055.     dc.l    StartBorderVectors4,NULL
  2056. StartBorderVectors4:
  2057.     dc.w    PMBX,PMBY-2
  2058.     dc.w    PMBX,-1
  2059.     dc.w    1,-1
  2060.  
  2061. Endplusgad:
  2062.     dc.l    Endminusgad
  2063.     dc.w    EPLUSX,STRY
  2064.     dc.w    PMBX,PMBY
  2065.     dc.w    NULL
  2066.     dc.w    GADGHCOMP+RELVERIFY
  2067.     dc.w    BOOLGADGET
  2068.     dc.l    PMBorder1
  2069.     dc.l    NULL
  2070.     dc.l    PlusText
  2071.     dc.l    NULL
  2072.     dc.l    NULL
  2073.     dc.w    60
  2074.     dc.l    endplus
  2075. Endminusgad:
  2076.     dc.l    NULL
  2077.     dc.w    EMINUSX,STRY
  2078.     dc.w    PMBX,PMBY
  2079.     dc.w    NULL
  2080.     dc.w    GADGHCOMP+RELVERIFY
  2081.     dc.w    BOOLGADGET
  2082.     dc.l    PMBorder1
  2083.     dc.l    NULL
  2084.     dc.l    MinusText
  2085.     dc.l    NULL
  2086.     dc.l    NULL
  2087.     dc.w    64
  2088.     dc.l    endminus
  2089.  
  2090. PMBorder1:
  2091.     dc.w    -1,-1
  2092.     dc.b    black,blue,RP_JAM1,9
  2093.     dc.l    PMBorder1Vectors,PMBorder2
  2094. PMBorder1Vectors:
  2095.     dc.w    0,0
  2096.     dc.w    PMBX-1,0
  2097.     dc.w    PMBX-1,PMBY
  2098.     dc.w    0,PMBY
  2099.     dc.w    0,0
  2100.     dc.w    2,-2
  2101.     dc.w    PMBX+1,-2
  2102.     dc.w    PMBX+1,PMBY-2
  2103.     dc.w    PMBX-1,PMBY
  2104. PMBorder2:
  2105.     dc.w    -1,-1
  2106.     dc.b    white,blue,RP_JAM1,3
  2107.     dc.l    PMBorder2Vectors,NULL
  2108. PMBorder2Vectors:
  2109.     dc.w    PMBX,PMBY-2
  2110.     dc.w    PMBX,-1
  2111.     dc.w    1,-1
  2112.  
  2113. SEBorder1:
  2114.     dc.w    0,0
  2115.     dc.b    orange,black,RP_JAM1
  2116.     dc.b    5
  2117.     dc.l    SEBorderVectors1
  2118.     dc.l    NULL
  2119. SEBorderVectors1:
  2120.     dc.w    0,0
  2121.     dc.w    SEGW,0
  2122.     dc.w    SEGW,SEGH
  2123.     dc.w    0,SEGH
  2124.     dc.w    0,0
  2125.  
  2126. srate15
  2127.     dc.b    3,0,RP_JAM2,0
  2128.     dc.w    TX+352,TY
  2129.     dc.l    TOPAZ80
  2130.     dc.l    srate15text
  2131.     dc.l    0
  2132. srate15text
  2133.     dc.b    'Sampling-Rate 15 kHz',0
  2134.     cnop    0,2
  2135.  
  2136. srate30
  2137.     dc.b    3,0,RP_JAM2,0
  2138.     dc.w    TX+352,TY
  2139.     dc.l    TOPAZ80
  2140.     dc.l    srate30text
  2141.     dc.l    0
  2142. srate30text
  2143.     dc.b    'Sampling-Rate 30 kHz',0
  2144.     cnop    0,2
  2145.  
  2146. rkey
  2147.     dc.b    3,0,RP_JAM2,0
  2148.     dc.w    TX+212,TY
  2149.     dc.l    TOPAZ80
  2150.     dc.l    rkeytext
  2151.     dc.l    tonenr
  2152. rkeytext
  2153.     dc.b    'REC KEY =',0
  2154.     cnop    0,2
  2155.  
  2156. nameItext
  2157.     dc.b    3,0,RP_JAM2,0
  2158.     dc.w    TX,TY
  2159.     dc.l    TOPAZ80
  2160.     dc.l    nameItexttexthead
  2161.     dc.l    tonenr
  2162. nameItexttexthead
  2163.     dc.b    'Samplename: '
  2164. nameItexttext
  2165.     ds.b    9
  2166.     dc.b    0
  2167.     cnop    0,2
  2168.  
  2169. tonenr
  2170.     dc.b    3,0,RP_JAM2,0
  2171.     dc.w    TX+284,TY
  2172.     dc.l    TOPAZ80
  2173.     dc.l    tonenrtext
  2174.     dc.l    0
  2175. tonenrtext
  2176.     dc.b    '    ',0
  2177.     cnop    0,2
  2178.  
  2179. INFOX    equ    SPLUSX+65
  2180. INFOY    equ    STRY
  2181. sampleleninfo
  2182.     dc.b    black,0,RP_JAM1,0
  2183.     dc.w    INFOX,INFOY
  2184.     dc.l    TOPAZ80
  2185.     dc.l    sampleinfotext
  2186.     dc.l    samplelen
  2187. sampleinfotext
  2188.     dc.b    'Samplelen:',0
  2189.     cnop    0,2
  2190.  
  2191. samplelen
  2192.     dc.b    white,0,RP_JAM2,0
  2193.     dc.w    INFOX+80,INFOY
  2194.     dc.l    TOPAZ80
  2195.     dc.l    samplelentext
  2196.     dc.l    bytes
  2197. samplelentext
  2198.     dc.b    '      ',0
  2199.     cnop    0,2
  2200.  
  2201. bytes
  2202.     dc.b    white,0,RP_JAM1,0
  2203.     dc.w    INFOX+140,INFOY
  2204.     dc.l    TOPAZ80
  2205.     dc.l    bytestext
  2206.     dc.l    NULL
  2207. bytestext
  2208.     dc.b 'Bytes',0
  2209.     cnop 0,2
  2210.  
  2211. TOPAZ80
  2212.     dc.l    TOPAZ80name
  2213.     dc.w    TOPAZ_EIGHTY
  2214.     dc.b    FS_NORMAL,FPF_ROMFONT
  2215. TOPAZ80name
  2216.     dc.b    "topaz.font",0
  2217.     cnop 0,2
  2218.  
  2219. boldfont
  2220.     dc.l    boldfontname
  2221.     dc.w    TOPAZ_EIGHTY
  2222.     dc.b    FSF_BOLD,FPF_ROMFONT
  2223. boldfontname
  2224.     dc.b    "topaz.font",0
  2225.     cnop    0,2
  2226.  
  2227. NewWindowStructure1:
  2228.  dc.w    40,0
  2229.  dc.w    555,200
  2230.  dc.b    blue,white
  2231.  dc.l    CLOSEWINDOW+GADGETUP+GADGETDOWN+MOUSEBUTTONS
  2232.  dc.l    WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH+RMBTRAP
  2233.  dc.l    Gadget1
  2234.  dc.l    NULL
  2235.  dc.l    NewWindowName1
  2236.  dc.l    NULL
  2237.  dc.l    NULL
  2238.  dc.w    5,5
  2239.  dc.w    -1,-1
  2240.  dc.w    WBENCHSCREEN
  2241. NewWindowName1:
  2242.  dc.b    'S220to8SVX  Version 1.4 © 1991 Dieter Bruns',0
  2243.  cnop 0,2
  2244. Gadget1:
  2245.     dc.l    Gadget2
  2246.     dc.w    GX,GY
  2247.     dc.w    85,28
  2248.     dc.w    GADGHCOMP
  2249.     dc.w    RELVERIFY
  2250.     dc.w    BOOLGADGET
  2251.     dc.l    Border1
  2252.     dc.l    NULL
  2253.     dc.l    IText1
  2254.     dc.l    NULL
  2255.     dc.l    NULL
  2256.     dc.w    NULL
  2257.     dc.l    loadgadget
  2258.  
  2259. BX    equ    85
  2260. BY    equ    28
  2261. Border1:
  2262.     dc.w    -1,-1
  2263.     dc.b    black,blue,RP_JAM1,9
  2264.     dc.l    BorderVectors1,Border2
  2265. BorderVectors1:
  2266.     dc.w    0,0
  2267.     dc.w    BX-1,0
  2268.     dc.w    BX-1,BY
  2269.     dc.w    0,BY
  2270.     dc.w    0,0
  2271.     dc.w    2,-2
  2272.     dc.w    BX+1,-2
  2273.     dc.w    BX+1,BY-2
  2274.     dc.w    BX-1,BY
  2275. Border2:
  2276.     dc.w    -1,-1
  2277.     dc.b    white,blue,RP_JAM1,3
  2278.     dc.l    BorderVectors2,NULL
  2279. BorderVectors2:
  2280.     dc.w    BX,BY-2
  2281.     dc.w    BX,-1
  2282.     dc.w    1,-1
  2283. IText1:
  2284.     dc.b    2,0,RP_JAM1,0
  2285.     dc.w    10,4
  2286.     dc.l    TOPAZ80
  2287.     dc.l    ITextText1
  2288.     dc.l    IText2
  2289. ITextText1:
  2290.     dc.b    'Load and',0
  2291.     cnop 0,2
  2292. IText2:
  2293.     dc.b    2,0,RP_JAM1,0
  2294.     dc.w    10,15
  2295.     dc.l    TOPAZ80
  2296.     dc.l    ITextText2
  2297.     dc.l    NULL
  2298. ITextText2:
  2299.     dc.b    'convert',0
  2300.     cnop 0,2
  2301. Gadget2:
  2302.     dc.l    Gadget3
  2303.     dc.w    GX+100,GY
  2304.     dc.w    85,28
  2305.     dc.w    GADGHCOMP
  2306.     dc.w    RELVERIFY
  2307.     dc.w    BOOLGADGET
  2308.     dc.l    Border1
  2309.     dc.l    NULL
  2310.     dc.l    IText3
  2311.     dc.l    NULL
  2312.     dc.l    NULL
  2313.     dc.w    4
  2314.     dc.l    save8SVX
  2315. IText3:
  2316.     dc.b    2,0,RP_JAM1,0
  2317.     dc.w    10,4
  2318.     dc.l    TOPAZ80
  2319.     dc.l    ITextText3
  2320.     dc.l    IText4
  2321. ITextText3:
  2322.     dc.b    'Save as',0
  2323.     cnop 0,2
  2324. IText4:
  2325.     dc.b    2,0,RP_JAM1,0
  2326.     dc.w    10,15
  2327.     dc.l    TOPAZ80
  2328.     dc.l    ITextText4
  2329.     dc.l    NULL
  2330. ITextText4:
  2331.     dc.b    '8SVX',0
  2332.     cnop 0,2
  2333. Gadget3:
  2334.     dc.l    Gadget4
  2335.     dc.w    GX+200,GY
  2336.     dc.w    85,28
  2337.     dc.w    GADGHCOMP
  2338.     dc.w    RELVERIFY
  2339.     dc.w    BOOLGADGET
  2340.     dc.l    Border1
  2341.     dc.l    NULL
  2342.     dc.l    IText5
  2343.     dc.l    NULL
  2344.     dc.l    NULL
  2345.     dc.w    8
  2346.     dc.l    c30_to_15
  2347. IText5:
  2348.     dc.b    2,0,RP_JAM1,0
  2349.     dc.w    5,9
  2350.     dc.l    TOPAZ80
  2351.     dc.l    ITextText5
  2352.     dc.l    NULL
  2353. ITextText5:
  2354.     dc.b    '30<>15kHz',0
  2355.     cnop 0,2
  2356. Gadget4
  2357.     dc.l    Gadget5
  2358.     dc.w    GX+300,GY
  2359.     dc.w    85,28
  2360.     dc.w    GADGHCOMP
  2361.     dc.w    RELVERIFY
  2362.     dc.w    BOOLGADGET
  2363.     dc.l    Border1
  2364.     dc.l    NULL
  2365.     dc.l    IText8
  2366.     dc.l    NULL
  2367.     dc.l    NULL
  2368.     dc.w    16
  2369.     dc.l    adjustVolume
  2370. IText8:
  2371.     dc.b    2,0,RP_JAM1,0
  2372.     dc.w    10,4
  2373.     dc.l    TOPAZ80
  2374.     dc.l    ITextText8
  2375.     dc.l    IText9
  2376. ITextText8:
  2377.     dc.b    'Change',0
  2378.     cnop 0,2
  2379. IText9:
  2380.     dc.b    2,0,RP_JAM1,0
  2381.     dc.w    10,15
  2382.     dc.l    TOPAZ80
  2383.     dc.l    ITextText9
  2384.     dc.l    NULL
  2385. ITextText9:
  2386.     dc.b    'Volume',0
  2387.     cnop 0,2
  2388.  
  2389. Gadget5:
  2390.     dc.l    Startgad
  2391.     dc.w    GX+400,GY
  2392.     dc.w    85,28
  2393.     dc.w    GADGHCOMP
  2394.     dc.w    RELVERIFY
  2395.     dc.w    BOOLGADGET
  2396.     dc.l    Border1
  2397.     dc.l    NULL
  2398.     dc.l    IText10
  2399.     dc.l    NULL
  2400.     dc.l    NULL
  2401.     dc.w    20
  2402.     dc.l    undoVolume
  2403. IText10:
  2404.     dc.b    2,0,RP_JAM1,0
  2405.     dc.w    10,4
  2406.     dc.l    TOPAZ80
  2407.     dc.l    ITextText10
  2408.     dc.l    IText11
  2409. ITextText10:
  2410.     dc.b    'Original',0
  2411.     cnop 0,2
  2412. IText11:
  2413.     dc.b    2,0,RP_JAM1,0
  2414.     dc.w    10,15
  2415.     dc.l    TOPAZ80
  2416.     dc.l    ITextText11
  2417.     dc.l    NULL
  2418. ITextText11:
  2419.     dc.b    'Volume',0
  2420.     cnop 0,2
  2421.  
  2422. ReqText1
  2423.     dc.b    black,0,RP_JAM1,0
  2424.     dc.w    40,25
  2425.     dc.l    boldfont
  2426.     dc.l    ReqText1text
  2427.     dc.l    ReqText11
  2428. ReqText1text
  2429.     dc.b    "ROLAND File !",0
  2430.     cnop    0,2
  2431. ReqText11
  2432.     dc.b    black,0,RP_JAM1,0
  2433.     dc.w    40,10
  2434.     dc.l    TOPAZ80
  2435.     dc.l    ReqText11text
  2436.     dc.l    0
  2437. ReqText11text
  2438.     dc.b    "Not an",0
  2439.     cnop    0,2
  2440.  
  2441. ReqText2
  2442.     dc.b    black,0,RP_JAM1,0
  2443.     dc.w    20,20
  2444.     dc.l    boldfont
  2445.     dc.l    ReqText2text
  2446.     dc.l    0
  2447. ReqText2text
  2448.     dc.b    "DISK-Error !",0
  2449.     cnop    0,2
  2450.  
  2451. ReqText3
  2452.     dc.b    black,0,RP_JAM1,0
  2453.     dc.w    20,25
  2454.     dc.l    boldfont
  2455.     dc.l    ReqText3text
  2456.     dc.l    ReqText31
  2457. ReqText3text
  2458.     dc.b    "is not 30 kHz !",0
  2459.     cnop    0,2
  2460. ReqText31
  2461.     dc.b    black,0,RP_JAM1,0
  2462.     dc.w    20,10
  2463.     dc.l    TOPAZ80
  2464.     dc.l    ReqText31text
  2465.     dc.l    0
  2466. ReqText31text
  2467.     dc.b    "Sampling-Rate",0
  2468.     cnop    0,2
  2469.  
  2470. ReqText4
  2471.     dc.b    black,0,RP_JAM1,0
  2472.     dc.w    30,20
  2473.     dc.l    TOPAZ80
  2474.     dc.l    ReqText4text
  2475.     dc.l    0
  2476. ReqText4text
  2477.     dc.b    "There is no sound !",0
  2478.     cnop    0,2
  2479.  
  2480. ReqBorder
  2481.     dc.w    0,2
  2482.     dc.b    2,0,RP_JAM1
  2483.     dc.b    9
  2484.     dc.l    ReqVectors1
  2485.     dc.l    ReqBorder2
  2486. ReqVectors1
  2487.     dc.w    0,0
  2488.     dc.w    REQW-4,0
  2489.     dc.w    REQW-4,REQH-3
  2490.     dc.w    0,REQH-3
  2491.     dc.w    0,0
  2492.     dc.w    0,-2
  2493.     dc.w    REQW-1,-2
  2494.     dc.w    REQW-1,REQH-3
  2495.     dc.w    REQW-3,REQH-3
  2496.  
  2497. ReqBorder2
  2498.     dc.w    0,2
  2499.     dc.b    1,0,RP_JAM1
  2500.     dc.b    3
  2501.     dc.l    ReqVectors2
  2502.     dc.l    NULL
  2503. ReqVectors2
  2504.     dc.w    REQW-2,REQH-4
  2505.     dc.w    REQW-2,-1
  2506.     dc.w    1,-1
  2507.  
  2508. Messreq
  2509.     dc.l    0
  2510.     dc.w    50,100
  2511.     dc.w    REQW,REQH
  2512.     dc.w    0,0
  2513.     dc.l    MessreqGadget1
  2514.     dc.l    ReqBorder
  2515.     dc.l    0
  2516.     dc.w    0
  2517.     dc.b    3,0
  2518.     dc.l    0
  2519.     ds.b    32
  2520.     dc.l    0
  2521.     dc.l    0
  2522.     ds.b    36
  2523.  
  2524. MessreqGadget1
  2525.     dc.l    0
  2526.     dc.w    110,40
  2527.     dc.w    OKBX,OKBY+2
  2528.     dc.w    GADGHCOMP
  2529.     dc.w    RELVERIFY+ENDGADGET
  2530.     dc.w    BOOLGADGET+REQGADGET
  2531.     dc.l    OkCancelBorder1
  2532.     dc.l    0
  2533.     dc.l    OkText
  2534.     dc.l    0
  2535.     dc.l    0
  2536.     dc.w    12
  2537.     dc.l    event
  2538.  
  2539. InfoReq
  2540.     dc.l    0
  2541.     dc.w    180,80
  2542.     dc.w    IREQW,IREQH
  2543.     dc.w    0,0
  2544.     dc.l    0
  2545.     dc.l    InfoBorder1
  2546.     dc.l    InfoIText1
  2547.     dc.w    0
  2548.     dc.b    3,0
  2549.     dc.l    0
  2550.     ds.b    32
  2551.     dc.l    0
  2552.     dc.l    0
  2553.     ds.b    36
  2554.  
  2555. InfoBorder1:
  2556.     dc.w    0,2
  2557.     dc.b    2,0,RP_JAM1
  2558.     dc.b    9
  2559.     dc.l    InfoBorderVectors1
  2560.     dc.l    InfoBorder2
  2561. InfoBorderVectors1:
  2562.     dc.w    0,0
  2563.     dc.w    IREQW-4,0
  2564.     dc.w    IREQW-4,IREQH-3
  2565.     dc.w    0,IREQH-3
  2566.     dc.w    0,0
  2567.     dc.w    0,-2
  2568.     dc.w    IREQW-1,-2
  2569.     dc.w    IREQW-1,IREQH-3
  2570.     dc.w    IREQW-3,IREQH-3
  2571.  
  2572. InfoBorder2:
  2573.     dc.w    0,2
  2574.     dc.b    1,0,RP_JAM1
  2575.     dc.b    3
  2576.     dc.l    InfoBorderVectors2
  2577.     dc.l    NULL
  2578. InfoBorderVectors2:
  2579.     dc.w    IREQW-2,IREQH-4
  2580.     dc.w    IREQW-2,-1
  2581.     dc.w    1,-1
  2582.  
  2583. InfoIText1:
  2584.     dc.b    2,0,RP_JAM1,0
  2585.     dc.w    10,6
  2586.     dc.l    TOPAZ80
  2587.     dc.l    InfoITextText1
  2588.     dc.l    InfoIText2
  2589. InfoITextText1:
  2590.     dc.b    'Please wait...',0
  2591.     cnop 0,2
  2592.  
  2593. InfoIText2:
  2594.     dc.b    2,0,RP_JAM1,0
  2595.     dc.w    90,18
  2596.     dc.l    TOPAZ80
  2597.     dc.l    InfoITextText2
  2598.     dc.l    0
  2599. InfoITextText2
  2600.     dc.b    "I'm working",0
  2601.     cnop    0,2
  2602.  
  2603. VolumeREQW    equ     190
  2604. VolumeREQH    equ     60
  2605. VolumeBX    equ    VolumeREQW-3
  2606. VolumeBY    equ    VolumeREQH-5
  2607.  
  2608. Volumerequester
  2609.     dc.l    0
  2610.     dc.w    200,30
  2611.     dc.w    VolumeREQW,VolumeREQH
  2612.     dc.w    0,0
  2613.     dc.l    VolumeGadget1
  2614.     dc.l    VolumeBorder1
  2615.     dc.l    VolumeText
  2616.     dc.w    0
  2617.     dc.b    0,0
  2618.     dc.l    0
  2619.     ds.b    32
  2620.     dc.l    0
  2621.     dc.l    0
  2622.     ds.b    36
  2623.  
  2624. VolumeText:
  2625.     dc.b    black,0,RP_JAM1,0
  2626.     dc.w    20,10
  2627.     dc.l    TOPAZ80
  2628.     dc.l    VolumeTextText
  2629.     dc.l    NULL
  2630. VolumeTextText:
  2631.     dc.b    'Set percentage',0
  2632.     cnop 0,2
  2633.  
  2634. VolumeBorder1:
  2635.     dc.w    0,2
  2636.     dc.b    2,0,RP_JAM1
  2637.     dc.b    9
  2638.     dc.l    VolumeBorderVectors1
  2639.     dc.l    VolumeBorder2
  2640. VolumeBorderVectors1:
  2641.     dc.w    0,0
  2642.     dc.w    VolumeBX,0
  2643.     dc.w    VolumeBX,VolumeBY+2
  2644.     dc.w    0,VolumeBY+2
  2645.     dc.w    0,0
  2646.     dc.w    2,-2
  2647.     dc.w    VolumeBX+2,-2
  2648.     dc.w    VolumeBX+2,VolumeBY
  2649.     dc.w    VolumeBX,VolumeBY+2
  2650. VolumeBorder2:
  2651.     dc.w    0,2
  2652.     dc.b    1,0,RP_JAM1
  2653.     dc.b    3
  2654.     dc.l    VolumeBorderVectors2
  2655.     dc.l    NULL
  2656. VolumeBorderVectors2:
  2657.     dc.w    VolumeBX+1,VolumeBY
  2658.     dc.w    VolumeBX+1,-1
  2659.     dc.w    1,-1
  2660.  
  2661. LGY    equ    25
  2662.  
  2663. VolumeGadget1
  2664.     dc.l    VolumeGadget2
  2665.     dc.w    VolumeTRX,LGY,34,9,GADGHCOMP,RELVERIFY+STRINGRIGHT+LONGINT
  2666.     dc.w    STRGADGET+REQGADGET
  2667.     dc.l    Border3,NULL,NULL,NULL,VolumeGadget1SInfo
  2668.     dc.w    24
  2669.     dc.l    event
  2670. VolumeGadget1SInfo:
  2671.     dc.l    VolumeGadget1SIBuff
  2672.     dc.l    NULL
  2673.     dc.w    0,4,0,0,0,0,0,0
  2674.     dc.l    0
  2675. multiVolume
  2676.     dc.l    100
  2677.     dc.l    NULL
  2678. VolumeGadget1SIBuff:
  2679.     dc.b    '100',0
  2680.     cnop 0,2
  2681.  
  2682. OKBX    equ    68
  2683. OKBY    equ    10
  2684.  
  2685. VolumeGadget2:
  2686.     dc.l    VolumeGadget3
  2687.     dc.w    18,40
  2688.     dc.w    OKBX,OKBY+2
  2689.     dc.w    GADGHCOMP
  2690.     dc.w    RELVERIFY+ENDGADGET
  2691.     dc.w    BOOLGADGET+REQGADGET
  2692.     dc.l    OkCancelBorder1
  2693.     dc.l    NULL
  2694.     dc.l    CancelText
  2695.     dc.l    NULL
  2696.     dc.l    NULL
  2697.     dc.w    28
  2698.     dc.l    event
  2699.  
  2700. VolumeGadget3:
  2701.     dc.l    Volumeplus1gad
  2702.     dc.w    98,40
  2703.     dc.w    OKBX,OKBY+2
  2704.     dc.w    GADGHCOMP
  2705.     dc.w    RELVERIFY+ENDGADGET
  2706.     dc.w    BOOLGADGET+REQGADGET
  2707.     dc.l    OkCancelBorder1
  2708.     dc.l    NULL
  2709.     dc.l    OkText
  2710.     dc.l    NULL
  2711.     dc.l    NULL
  2712.     dc.w    32
  2713.     dc.l    doadjustVolume
  2714.  
  2715. OkCancelBorder1:
  2716.     dc.w    0,0
  2717.     dc.b    2,0,RP_JAM1
  2718.     dc.b    9
  2719.     dc.l    OkCancelBorderVectors1
  2720.     dc.l    OkCancelBorder2
  2721. OkCancelBorderVectors1:
  2722.     dc.w    0,0
  2723.     dc.w    OKBX,0
  2724.     dc.w    OKBX,OKBY+2
  2725.     dc.w    0,OKBY+2
  2726.     dc.w    0,0
  2727.     dc.w    2,-2
  2728.     dc.w    OKBX+2,-2
  2729.     dc.w    OKBX+2,OKBY
  2730.     dc.w    OKBX,OKBY+2
  2731.  
  2732. OkCancelBorder2:
  2733.     dc.w    0,0
  2734.     dc.b    1,0,RP_JAM1
  2735.     dc.b    3
  2736.     dc.l    OkCancelBorderVectors2
  2737.     dc.l    NULL
  2738. OkCancelBorderVectors2:
  2739.     dc.w    OKBX+1,OKBY
  2740.     dc.w    OKBX+1,-1
  2741.     dc.w    1,-1
  2742.  
  2743. Volumeplus1gad:
  2744.     dc.l    Volumeminus1gad
  2745.     dc.w    VolumeTRX+VolumeTRM+LMPROP+LMPP,LGY
  2746.     dc.w    PMBX,PMBY
  2747.     dc.w    NULL
  2748.     dc.w    GADGHCOMP+RELVERIFY
  2749.     dc.w    BOOLGADGET+REQGADGET
  2750.     dc.l    PMBorder1
  2751.     dc.l    NULL
  2752.     dc.l    PlusText
  2753.     dc.l    NULL
  2754.     dc.l    NULL
  2755.     dc.w    68
  2756.     dc.l    plus1Volume
  2757.  
  2758. VolumeTRX    equ     20
  2759. VolumeTRM    equ    38
  2760. LMPROP        equ    18
  2761. LMPP        equ    82
  2762.  
  2763. Volumeminus1gad:
  2764.     dc.l    Volumepropgad
  2765.     dc.w    VolumeTRX+VolumeTRM,LGY
  2766.     dc.w    PMBX,PMBY
  2767.     dc.w    NULL
  2768.     dc.w    GADGHCOMP+RELVERIFY
  2769.     dc.w    BOOLGADGET+REQGADGET
  2770.     dc.l    PMBorder1
  2771.     dc.l    NULL
  2772.     dc.l    MinusText
  2773.     dc.l    NULL
  2774.     dc.l    NULL
  2775.     dc.w    72
  2776.     dc.l    minus1Volume
  2777.  
  2778. Volumepropgad:
  2779.     dc.l    NULL
  2780.     dc.w    VolumeTRX+VolumeTRM+LMPROP,LGY-3
  2781.     dc.w    80,13
  2782.     dc.w    GADGHIMAGE
  2783.     dc.w    GADGIMMEDIATE
  2784.     dc.w    PROPGADGET+REQGADGET
  2785.     dc.l    PropImage1
  2786.     dc.l    NULL
  2787.     dc.l    NULL
  2788.     dc.l    NULL
  2789.     dc.l    Volumepropgad1SInfo
  2790.     dc.w    76
  2791.     dc.l    propVolume
  2792. Volumepropgad1SInfo:
  2793.     dc.w    FREEHORIZ+PROPBORDERLESS
  2794.     dc.w    0,-1
  2795.     dc.w    660,-1
  2796.     dc.w    0,0,0,0,0,0
  2797. PropImage1:
  2798.     dc.w    0,0
  2799.     dc.w    22,13
  2800.     dc.w    0
  2801.     dc.l    PropImageData1
  2802.     dc.b    $0003,$0000
  2803.     dc.l    NULL
  2804.  
  2805. CancelText:
  2806.     dc.b    black,0,RP_JAM1,0
  2807.     dc.w    10,3
  2808.     dc.l    TOPAZ80
  2809.     dc.l    CancelTextText
  2810.     dc.l    NULL
  2811. CancelTextText:
  2812.     dc.b    'Cancel',0
  2813.     cnop 0,2
  2814.  
  2815. OkText:
  2816.     dc.b    black,0,RP_JAM1,0
  2817.     dc.w    28,3
  2818.     dc.l    TOPAZ80
  2819.     dc.l    OKTextText
  2820.     dc.l    NULL
  2821. OKTextText:
  2822.     dc.b    'OK',0
  2823.     cnop 0,2
  2824.  
  2825. GBX    equ    43
  2826. GBY    equ    10
  2827.  
  2828. Border3:
  2829.     dc.w    -10,-1
  2830.     dc.b    black,blue,RP_JAM1,9
  2831.     dc.l    BorderVectors3,Border4
  2832. BorderVectors3:
  2833.     dc.w    0,0
  2834.     dc.w    GBX-1,0
  2835.     dc.w    GBX-1,GBY
  2836.     dc.w    0,GBY
  2837.     dc.w    0,0
  2838.     dc.w    2,-2
  2839.     dc.w    GBX+1,-2
  2840.     dc.w    GBX+1,GBY-2
  2841.     dc.w    GBX-1,GBY
  2842.  
  2843. Border4:
  2844.     dc.w    -10,-1
  2845.     dc.b    white,blue,RP_JAM1,3
  2846.     dc.l    BorderVectors4,NULL
  2847. BorderVectors4:
  2848.     dc.w    GBX,GBY-2
  2849.     dc.w    GBX,-1
  2850.     dc.w    1,-1
  2851.  
  2852. * begin of alerts
  2853.  
  2854. Alertstring
  2855.     dc.w 200
  2856.     dc.b 24,"    NOT ENOUGH MEMORY        ",0,$01
  2857.     dc.w 200
  2858.     dc.b 44,"    GOODBYE !!               ",0,$01
  2859.     dc.w 200
  2860.     dc.b 64,"=== Press any MOUSEBUTTON ===",0,$00
  2861.     cnop 0,2
  2862.  
  2863. Alertlen equ *-Alertstring
  2864.  
  2865.     dc.w 200
  2866.     dc.b 24,"    Can't open Window        ",0,$01
  2867.     dc.w 200
  2868.     dc.b 44,"    Might be memoryproblem   ",0,$01
  2869.     dc.w 200
  2870.     dc.b 64,"=== Press any MOUSEBUTTON ===",0,$00
  2871.     cnop 0,2
  2872.  
  2873.     dc.w 200
  2874.     dc.b 24,"    Can't open requester     ",0,$01
  2875.     dc.w 200
  2876.     dc.b 44,"    Might be memoryproblem   ",0,$01
  2877.     dc.w 200
  2878.     dc.b 64,"=== Press any MOUSEBUTTON ===",0,$00
  2879.     cnop 0,2
  2880.  
  2881.     dc.w 200
  2882.     dc.b 24,"    Can't open arp.library   ",0,$01
  2883.     dc.w 200
  2884.     dc.b 44,"    must be in drawer libs   ",0,$01
  2885.     dc.w 200
  2886.     dc.b 54,"      or memoryproblem       ",0,$01
  2887.     dc.w 200
  2888.     dc.b 64,"=== Press any MOUSEBUTTON ===",0,$00
  2889.     cnop 0,2
  2890.  
  2891. LogoImage:
  2892.     dc.w    20,13
  2893.     dc.w    104,8
  2894.     dc.w    2
  2895.     dc.l    LogoImagedata
  2896.     dc.b    $0002,$0000
  2897.     dc.l    NULL
  2898.  
  2899.     IFND    .A68K
  2900.     SECTION customdata,DATA_C    ;Assembler: DEVPAC
  2901.     ENDC
  2902.  
  2903.     IFD    .A68K
  2904.     DATA customdata,CHIP        ;Assembler: A68K
  2905.     ENDC
  2906.  
  2907. LogoImagedata:
  2908.     dc.w    $1002,$007E,$0002,$0000,$3F00,$0000,$0000,$2001
  2909.     dc.w    $01E3,$0002,$0000,$F180,$0000,$0000,$4000,$8361
  2910.     dc.w    $8C1F,$8001,$B0C0,$0000,$0000,$8000,$8061,$8004
  2911.     dc.w    $0000,$3F80,$0000,$0000,$81C0,$8061,$B3CD,$E760
  2912.     dc.w    $39CE,$D99D,$8C00,$8221,$00C3,$629B,$4D80,$619B
  2913.     dc.w    $7336,$DE00,$4602,$01F6,$E77B,$9980,$FB76,$676D
  2914.     dc.w    $B300,$23C4,$03BD,$BBCC,$F301,$DECC,$3D99,$EE00
  2915.  
  2916. PropImageData1:
  2917.     dc.w    $0000,$0000,$3FFF,$F000,$0000,$0800,$0000,$0800
  2918.     dc.w    $0000,$0800,$0000,$0800,$0000,$0800,$0000,$0800
  2919.     dc.w    $0000,$0800,$0000,$0800,$0000,$0800,$0000,$0800
  2920.     dc.w    $0000,$0000,$7FFF,$F800,$C000,$0C00,$C048,$0400
  2921.     dc.w    $C1CE,$0400,$C7CF,$8400,$DFCF,$E400,$FFCF,$F400
  2922.     dc.w    $DFCF,$E400,$C7CF,$8400,$C1CE,$0400,$C048,$0400
  2923.     dc.w    $C000,$0400,$7FFF,$F800
  2924.  
  2925. wave
  2926.     dc.b    0,10
  2927.     dc.b    20,38
  2928.     dc.b    47,56
  2929.     dc.b    63,72
  2930.     dc.b    81,90
  2931.     dc.b    106,118
  2932.     dc.b    122,127
  2933.  
  2934.     dc.b    -127,-122
  2935.     dc.b    -118,-106
  2936.     dc.b    -90,-81
  2937.     dc.b    -72,-63
  2938.     dc.b    -56,-47
  2939.     dc.b    -38,-20
  2940.     dc.b    -10,0
  2941. wavesize equ *-wave
  2942.         END
  2943.