Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Lance's 50 KHz playroutine
Posted by: ggn Mar,06.2013-23:54 

Hah, found it in my sources!

;----------------------------------------------------------
;
;
;
;
;
;
; PROtracker replay routine
; ÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿ ÿÿÿÿÿÿÿ
; converted
; by:
;
; ¯ Lance ®
;
;
;
; ( TRASH - mode enabled! )
;
;
;----------------------------------------------------------
; Version 3.T
; In this new version of my PT2.2 replay routine there have
; been an major change. I have added TRASH - mode to the
; play routine. Believe me TRASH - mode is no trash at all
; (get it :-) ) and is ideal for my replay routine. TRASH -
; mode means that my replay routine creates buffers so that
; it don't harm if the replay routine and your nice 2,000
; pixels 3D ball sometimes together takes more time than
; the total rastertime ,just don't let happen to often.
; This ideal for my replay since it optimises the time it
; takes depending how many voices is active at the moment
; and how high frequency they are playing at the moment.
; For example if your nice ball is rotating on the screen
; and there sudden is a drum hit which make my replay
; routine demand more rastertime than there is available at
; the moment this replay won't sound crap or and your ball
; will not start to rotate jerky instead the routine will
; start eating of it's buffers instead. But there is only
; 8 buffers and just 8 vbl of precalcuated sound data isn't
; to small . I don't think so (please contact me if feel
; diffrent) since the replay routine is still updating the
; buffers just not fast enough. Let's say when the drumhit
; comes all buffers are filled up. Because of the drumhit
; the replay routine just 90% of time it needs. Still it
; can play for c:a 65 frames without sound distorsion
; (theoretical 69 frames) usually drumhit are shorter than
; a second. If the rastertime is exceeded for a long time
; then sound will sound real strange.If there was 16
; buffers then sound in our example will last c:a 3 sec.
; (theoretical :) the reality can be far more complex
; than my simple musicians).
; ADD : I have made a little change in the code since I
; wrote this . I have added a constant called
; mt_frame_number which can be found directly
; under my starting comments in the code.
; It is set to 3 in the beginning which means that
; there 8 buffers. If you change it to four you will
; 16 buffers and 5 == 32 buffers and so on so now
; you decide for your own. The lowest you can set
; is 1 don't try 0 and negative numbers It won't
; work I can tell you.
;----------------------------------------------------------
; This replay is made to fit demos and democoder it's
; purpose isn't to give the ultimate soundquality but to
; give near-top quality sound and to take as little time
; as possible. To do this I had to implent some tricks that
; not always will please the nice-to-the-system guy.
; The drawback for this code is that it sucks silicon
; it eats memory in other words , but if you have one meg
; it should be enough (I hope) the replay also has one more
; major drawback ,some samples may sound very strange in
; this replay. It sounds that way since I have an odd way
; to calcuate the frequency which also make this replay as
; fast as it is (fast 50kHz routines usually cheats in one
; way or another).Usually the replay sounds good.
; To make more ideal for demos I have implented a function
; that the demo-coder calls to see which position the replay
; is at . Why isn't that just to read off the variables
; mt_songpos and mt_patternpos?
; Since it's a TRASH player it's not that easy.
; I will give the demo-coder to reason to time the demo with
; the music :
; 1: Demos with timing are nicer to watch and gives a more
; proffesional impression.
; 2: If the demo-coder got himself a good musician (lucky
; bastard) and is planning a time-consuming bit in the
; demo then he can ask musician to use only 2 voices
; there and using low frequencies to make my replay use
; little time. If he is a good musician he can make it
; sound good anyway. Then when the coder makes the demo
; he just time it so that time-consuming bit comes at
; the same time as the special music bit.
; It's not hard but it's boring (XiA have made some real
; cool 2 channels modules.
;---------------------------------------------------------
; How will I have to code to most efficiently use this
; superior TRASH - technique?
; As all good coders know there don't exist a 'best' way
; to do it but and idea is: First in your vbl rout you
; jump to mt_vbl then call your 2,000 pixel ball.
; In your main_loop outside the vbl you call the mt_update
; leaving it the time that is left of the vbl. And after
; the mt_update you call other TRASH routs with lower
; priority like depacking the next part.
;---------------------------------------------------------
; I realised that if you would like to do two frame
; things the trash mode is not ideal so I put in an
; option to turn it off mt_trash_off and mt_trash_on to
; turn it on again.
;---------------------------------------------------------
; The part mt_music isn't my own code but ripped from
; Amiga it is therefor not optimized , before when my
; routines took 60%++ I thought that there was no idea but
; now I found it very irritating that it is so lame coded
; sometimes adds upto 9 rasterlines !! to my code,that is
; 10% of what my Paula emulator takes.
; If someone could offer me a good optimised PT2++ replay
; routine for the Amiga I would be very happy.
;----------------------------------------------------------
; And now a short explaination of the diffrent subroutines
; in pt_src50.s ...
; All routines shall be called with an jsr or bsr.
; mt_init : Must be called initalises module,creates
; frequency codes etc. etc.
; mt_vbl : The one you shall call first in your vbl
; rout or TimerA rout don't take much time
; unless you haven't turned trash off then
; it update next buffer
; mt_trash_on : Turn on trash mode (trash mode is
; default).Just call it and let's TRASH :)
; mt_trash_off : Turn trash mode off and forces update
; on the mt_vbl instead. Be little careful
; when you call these sub-routs ,don't
; call them from a interrupt
; mt_ask_buf_full : If all buffers are filled up then this
; sub-routs sets d0 = -1 else d0 = 0.
; mt_ask_position : Gives the song position in d0 and the
; pattern position in d1.
; mt_update : If we are in trash mode this one update
; the buffers. Should NOT be called from
; vbl or any other interrupt. But in the
; main loop.Should also be given a high
; priority.
; mt_end : Call this when you are finished , don't
; do much but is necessary.
;----------------------------------------------------------
; Last : Please excuse my bad english ... The only language
; I master is Machine Language(MC68000) :-)
;----------------------------------------------------------
; By the way : Have a wonderful life !!
;----------------------------------------------------------
; - Lance / M†rten R†nge 1994/01/01
;----------------------------------------------------------
; P.S. This whole work was written in DevPac 3.00
; God Bless HiSoft D.S
;----------------------------------------------------------







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Lance's 50khz playroutine Bod/STAX Feb,18.2013-17:35
  Re: Lance's 50khz playroutine gwEm Feb,18.2013-20:42
  Re: Lance's 50khz playroutine ggn Feb,18.2013-20:53
    Re: Lance's 50khz playroutine Bod/STAX Feb,18.2013-21:28
      Re: Lance's 50khz playroutine gwEm Feb,18.2013-23:05
        Re: Lance's 50khz playroutine gwEm Feb,18.2013-23:16
          Re: Lance's 50khz playroutine gwEm Feb,19.2013-02:21
            Re: Lance's 50khz playroutine Bod/STAX Feb,22.2013-17:08
              Re: Lance's 50khz playroutine gwEm Feb,25.2013-20:36
                Re: Lance's 50khz playroutine ljbk Feb,25.2013-23:54
                  Re: Lance's 50khz playroutine Bod/STAX Feb,26.2013-11:23
                    Re: Lance's 50khz playroutine evil Feb,26.2013-12:04
                      Re: Lance's 50khz playroutine ljbk Feb,26.2013-14:45
                        Re: Lance's 50khz playroutine ljbk Feb,26.2013-21:46
                          Re: Lance's 50khz playroutine evil Feb,27.2013-17:01
                            Re: Lance's 50khz playroutine ljbk Feb,28.2013-13:24
                              Re: Lance's 50khz playroutine ljbk Feb,28.2013-13:28
                                Re: Lance's 50khz playroutine gwEm Feb,28.2013-14:07
                                  Re: Lance's 50khz playroutine Bod/STAX Feb,28.2013-21:41
                                    Re: Lance's 50khz playroutine ljbk Feb,28.2013-22:42
                                      Sem assunto ljbk Mar,01.2013-13:27
                                        Lance's 50 KHz playroutine ljbk Mar,01.2013-15:49
                                          Re: Lance's 50 KHz playroutine ljbk Mar,01.2013-17:34
                                            Re: Lance's 50 KHz playroutine ljbk Mar,01.2013-17:36
                                              Re: Lance's 50 KHz playroutine evil Mar,01.2013-19:03
                                                Re: Lance's 50 KHz playroutine ljbk Mar,02.2013-00:18
                                                  Re: Lance's 50 KHz playroutine ljbk Mar,04.2013-17:39
                                                    Re: Lance's 50 KHz playroutine ljbk Mar,06.2013-02:21
                                                      Re: Lance's 50 KHz playroutine gwEm Mar,06.2013-13:23
                                                        Re: Lance's 50 KHz playroutine ljbk Mar,06.2013-15:57
                                                          Re: Lance's 50 KHz playroutine evil Mar,06.2013-16:48
                                                            Re: Lance's 50 KHz playroutine ggn Mar,06.2013-17:31
                                                              Re: Lance's 50 KHz playroutine evil Mar,06.2013-17:48
                                                                Re: Lance's 50 KHz playroutine ggn Mar,06.2013-23:54
                                                            Re: Lance's 50 KHz playroutine ljbk Mar,06.2013-18:18
                                                              Re: Lance's 50 KHz playroutine ljbk Mar,06.2013-21:51
                                                              Re: Lance's 50 KHz playroutine ggn Mar,06.2013-23:59
                                                                Re: Lance's 50 KHz playroutine ljbk Mar,07.2013-02:31
                                                                  Re: Lance's 50 KHz playroutine ggn Mar,07.2013-12:34
                                                                    Re: Lance's 50 KHz playroutine ljbk Mar,07.2013-14:00
                                                                      Re: Lance's 50 KHz playroutine gwEm Mar,07.2013-18:00
                                                                        Re: Lance's 50 KHz playroutine ljbk Mar,07.2013-18:51
                                                                          Re: Lance's 50 KHz playroutine ljbk Mar,08.2013-02:10
                                                                            Re: Lance's 50 KHz playroutine ljbk Mar,08.2013-13:12
                                                                              Re: Lance's 50 KHz playroutine ljbk Mar,09.2013-00:17
                                                            Re: Lance's 50 KHz playroutine ljbk Mar,06.2013-19:28
                              Re: Lance's 50khz playroutine ljbk Feb,28.2013-15:47
                                Re: Lance's 50khz playroutine ljbk Feb,28.2013-15:51
                                  Re: Lance's 50khz playroutine ljbk Feb,28.2013-18:56
                                    Re: Lance's 50khz playroutine nativ Mar,24.2013-00:07
                                      Re: Lance's 50khz playroutine ljbk Apr,13.2013-01:21
                                        Re: Lance's 50khz playroutine ljbk Apr,16.2013-16:12
                                          Re: Lance's 50khz playroutine ljbk Apr,19.2013-12:14
                                            Re: Lance's 50khz playroutine ljbk Apr,22.2013-14:54
                                              Re: Lance's 50khz playroutine ljbk Apr,25.2013-19:03
                                                Re: Lance's 50khz playroutine ggn Apr,25.2013-21:03
                                                  Re: Lance's 50khz playroutine ljbk Apr,26.2013-09:18
                                                    Re: Lance's 50khz playroutine ggn Apr,26.2013-11:28
                                                      Re: Lance's 50khz playroutine ljbk Apr,26.2013-12:13
  Re: Lance's 50khz playroutine ljbk May,01.2013-22:30
    Re: Lance's 50khz playroutine evil May,02.2013-14:46
      Re: Lance's 50khz playroutine gwEm May,02.2013-20:00
        Re: Lance's 50khz playroutine Damo May,02.2013-21:00
          Re: Lance's 50khz playroutine evil May,03.2013-13:00
      Re: Lance's 50khz playroutine ljbk May,08.2013-17:50
        Re: Lance's 50khz playroutine Cyprian May,10.2013-13:01
          Re: Lance's 50khz playroutine ljbk May,11.2013-00:22
          Re: Lance's 50khz playroutine ljbk May,11.2013-08:54
            Re: Lance's 50khz playroutine Cyprian May,11.2013-15:18
              Re: Lance's 50khz playroutine ljbk May,11.2013-15:35
                Re: Lance's 50khz playroutine Lance May,23.2013-00:02
                  Re: Lance's 50khz playroutine ljbk May,23.2013-14:44
  Re: Lance's 50khz playroutine Bod/STAX Jun,06.2013-20:32
    Re: Lance's 50khz playroutine Bod/STAX Jun,06.2013-20:39
      Re: Lance's 50khz playroutine ljbk Jun,07.2013-00:09
        Re: Lance's 50khz playroutine Bod/STAX Jun,07.2013-18:38
          Re: Lance's 50khz playroutine ljbk Jun,07.2013-21:46


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson