Preview
ram:promizer_docs
ram:promizer_player
ram:promizer_replay.s
ram:promizer_scope.s
mod.*
!!!!! ENTER DESTINATION FILENAME !!!!!
!! ENTER PROTRACKER MODULE FILENAME !!
ENTER PROTRACKER SONG/\MODULE FILENAME
!!!!!!!!! ENTER FILE TO PLAY !!!!!!!!!
Open destination file :
Open modulefile :
Open song/modulefile :
Reading Songdata ...
Checking Sampleusage ...
Writing Replayer Code (4456 bytes) ...
Optimizing Finetuning ...
Packing Patterns ...
Saving Song ...
Copy all used Samples ...
Killing empty Patterns and everything after Patternbreak & Positionsjump ...
Killing unused Patterns ...
Old Songlength (without Samples) : $00000000 Bytes
New Songlength (without Samples) : $00000000 Bytes
Ready !!!
THIS FILE IS ALLREADY ON DISK
YOU WANT TO OVERWRITE IT ??
KILL IT
LET IT ALIVE
PROMIZER v1.0c -- THE PROtracker optiMIZER
FOR FAST_CODE PRODUCTIONS LIKE GAMES AND DEMOS
INCLUDED IN THIS VERSION:
UNSED SAMPLE KILLING -- PATTERN PACKING
FINETUNE OPTIMIZING - REPLAYER CODE LINKING
ALL EFFECTS USING - MULTI SONG FUNCTION
CONTACT ME FOR ANY REASON UNDER :
FRANK HÜLSMANN -- TIMMERSCHEIDTSTR.14
4400 MÜNSTER/\GERMANY
OR CALL (AFTER 8PM) : 0251/778278
READ DOCS ON DISK FOR MORE INFOS !!
IF NOT ON DISK - CREATE PROMIZER FILES TO RAM
CREATE FILES TO RAM:
START WORK
END MENU
YOU WANT TO RESTART ?
OR PLAY A SONG ??
OR QUIT ???
START
QUIT
PLAY
NOT ENOUGH CHIP-MEM !!! USE PLAYER !!!
NO PROMIZED MODULE !!!
PROMIZER v1.0c (c)08/1992 by MC68000/\TECH
OK
hey user ... cannot find the requester library !!
mc68000/tech
PLAYING SONG :
FIRST SONG
NEXT SONG
NEXT MODULE
=============================================================================
PROMIZER - the PROtracker optiMIZER
A fast replaying system for games and demos
============ VERSION 1.0c --- TIME OF RELEASING : AUGUST 1992 ===============
contact me for bug report, new ideas or just for fun (100% answer !!!) :
FRANK HÜLSMANN
TIMMERSCHEIDTSTR.14
4400 MÜNSTER/\GERMANY
Tel.: 0251-778278 (After 8pm)
copyright by mc68000/TECH !!! Promizer is NO Public Domain Software !!!
=============================================================================
A note to all packmenu makers and pd companies :
PROMIZER is a freeware program. You can spread it, but only if you don't
make money with it !!! But you can use it for comercial productions without
my permission.
Contact me, if you want sell the Promizer !!! I'm easy to handle with !!!
Files, that should be copied with the PROMIZER (in the PROMIZER directory):
promizerv1.0b the optimizer
promizer_doc the file you reading at the moment
promizer_replay.s the replayer with many infos for coders
promizer_scope.s a scope replayer for promizer
promizer_player a multitasking player for promized modules
=============================================================================
What optimized the PROMIZER ???
Well ... it should kill all unsed things, like sample and patterns. And
it has a fast replayer code, that handles fine-tuning on a fast way.
Just try it !!! In this Version i included a strong pattern packer.
But that is not all ...
You can make a multi-song module, wich allow you different sounds using
one sampleset (you can use maximum 50 sounds --- more is no problem, but
i think you never use so much ... ). It works like tfmx or sonic arranger.
But i think the replaycode of the promizer is a little bit faster then the
two other tools ....
The PROMIZER recalc the song and make it 99% rip protected, because
the orginal protracker struct will killed and all patterndata will crypt,
so it's impossible (ok, not impossible, but very hard ...) to rip your
sounds !!! Even if you don't use the finetune or multisong function, you
got a good ripp protection with a fast replayer code !!!!
=============================================================================
How to use the Promizer ???
Very simply. Just follow the screen instructions. The first file is the
DESTINATION file. If you press the 'forget it' gadget here, you come to the
end_menu. The second file you must choose must be a Protracker module !!!
It must be a modul, because all samples will taken from this file !!! By
pressing 'forget it' you go to the end-menu. The next file(s) you include
to your big_file could be song files, because no samples are used from them.
After pressing the 'forget it' gadget, the promizer will start the work !!!
Each song can use an own sample information header, so you can use
different loops and finetunes !!!
How can i play my songs in own productions ???
Look in the replayer source for detail informations !!! You can use the scope
player for own productions (but only if you do not make money with it) !!!
How can i play my songs from cli ???
Just use the Promizer Player. Call it with : promizer_player [filename]
If there is no filename, the player opens a filerequester window.
=============================================================================
Planed updates in near future :
faster replaying .......... again this is a must !!!
bug fixing ................ why ??? ofcourse it's not 100% bugfree, so ...
Have you a good idea for it ??? If yes, don't wait. Send a letter to me
with all news you wanted included.
=============================================================================
What's new in this Version (since V1.0b) ???
A silly bug in the replayercode was removed (thanx to Paul McBody). The
volumefineslide (up&down) function did not what it should do ...
The Fineslide (up) had the same problem.
A new optimize function was built in : killing of unused patterns (i forgot
this in the last version).
=============================================================================
A note to 680x0 (x>0) : You can leave ererything as it is !! The multitasking
player should work fine on your mashine, too !!!
=============================================================================
Many thanks to Colin Fox and Bruce Dawson for coding the 'requester.library'!
=============================================================================
;------------------------------------------------------------------------------
; REPLAYER SOURCE WITH INFORMATION FOR ALL CODERS
;------------------------------------------------------------------------------
; WRITTEN BY : mc68000 of TECH
;------------------------------------------------------------------------------
mt_replayinit=0
mt_songinit=2
mt_replayer=6
mt_stopsound=10
mt_fillstruct=14
section "song_replay",code_p
; YOU MUST CALL 2 DIFFERENT INIT ROUTINES, ONE INIT THE WHOLE REPLAYER ROUTINE,
; THE OTHER INIT THE SOUND YOU WANT TO PLAY !!!!
; YOU MUST START THEM BEFORE STARTING THE REPLAYCODE !! (IF NOT -> BYE BYE ...)
start
lea $dff000,a6
lea mt_data,a5 ;this is my songbase
; FIRST LET US INIT THE REPLAYER !!!
; PARAMETER IN D0 : 0 = USE LEVEL 6 INTERUPT FOR DMA-REGISTER INIT
; 1 = USE STANDART RASTERTIME-WAITING CODE (SLOWER)
moveq #0,d0
jsr mt_replayinit(a5)
; NOW LET'S INIT THE SOUND ...
; PARAMETER IN D0 : SONGNUMBER (FIRST = 1)
moveq #1,d0
jsr mt_songinit(a5)
; LET'S PLAY THE WHOLE THING USING THE VBLANC INTERUPT ...
move.w $1c(a6),d7
bset #15,d7 ;save old interupt status
move.w #$7fff,$9a(a6)
move.l $6c.w,d6 ;save old vblanc
lea newint(pc),a0
move.l a0,$6c.w ;set our new interupt
move.w #$c020,$9a(a6) ;and start it ....
move.l #$10002,d1
buttwait
btst #10,$16(a6)
bne.b nonewsong ;rechte maustaste = swap sounds
wait2 btst #10,$16(a6)
beq.b wait2
move.w #$7fff,$9a(a6)
swap d1
move.w d1,d0
jsr mt_songinit(a5)
move.w #$c020,$9a(a6)
nonewsong
btst #6,$bfe001
bne.b buttwait ;wait for the left mousebutton
move.w #$7fff,$9a(a6)
move.l d6,$6c.w ;start system interupt
move.w d7,$9a(a6) ;and init system status
jmp mt_stopsound(a5) ;end song
;---------------------------- INTERUPT HANDLER -------------------------------
newint
; THE REPLAYING THING ...
; PARAMETER IN D0 : MAXIMUM VOLUME
movem.l d0-a6,-(a7)
moveq #64,d0
lea mt_data,a5
jsr mt_replayer(a5)
movem.l (a7)+,d0-a6
move.w #$20,$dff09c
rte
;--------------------------------- THE SONG -----------------------------------
section "song_data",data_c
incdir dh0:
mt_data incbin mod.test
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;
; YOU WANT TO CODE AN EQUILIZER ??? OR A SCOPE ??? OR ANOTHER SOUND SHOWER ???
;
; N O P R O B L E M ! ! ! !
;
; IF YOU HAVE CODED A THING LIKE THAT WITH A "NORMAL" REPLAY ROUTINE, IT'S NO
; PROBLEM FOR YOU TO DO THE SAME WITH THIS REPLAYER !!!
;
; I HAVE PUT A LITTLE ROUTINE IN THE REPLYER, THAT FILLS YOU A 28 BYTES LONG
; STRUCTURE WITH POINTERS ON IMPORTENT SONG INFORMATIONS.
;
; STRUCT :
;
; OFFSET: SIZE: MEANING:
;
; 0 4 CHAN_1_TEMP
; 4 4 CHAN_2_TEMP
; 8 4 CHAN_3_TEMP
; 12 4 CHAN_4_TEMP
; 16 4 SONG_POSITION
; 20 4 NOTE_WAIT_COUNTER
; 24 4 PERIODTABLE
;
; BUT HOW TO CALL IT ???
;
; lea struct(pc),a0 ;POINTER OF YOUR STRUCT
; jsr mt_fillstruct(a5) ;A5=SONGBASE
;
; LOOK IN THE SCOPE_PLAYER HOW TO WORK WITH THIS POINTERS !!!
;
;------------------------------------------------------------------------------
;
; CHAN_X_TEMP_STRUCT :
;
; OFFSET: SIZE: MEANING:
; 0 2 NEW PERIOD (OR 0 FOR NO PLAY)
; 2 2 REST OF NOTE (1 NOTE = 4 BYTES)
; 4 4 SAMPLESTART
; 8 2 SAMPLE LENGHT
; 10 4 LOOPSTART
; 14 2 LOOPLENGTH
; 16 2 PERIOD
; ... ... NOT IMPORTENT
; 19 1 VOLUME
; ... ... NOT IMPORTENT
;
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
; VERY UNOPTIMISED CODE !!! AND NOT 100% WORKING ....
section "SAMPLESHOW",code_c
wblit macro
\@1 btst #14,2(a6)
bne.b \@1
endm
start movem.l d0-a6,-(a7) ;save regs.
moveq #0,d0 ;use level 6
bsr.w mt_data+0 ;init replay routine
move #1,d0 ;play song 1
bsr.w mt_data+2 ;init song routine
lea sound_struct(pc),a0
bsr.w mt_data+14 ;fill struct
bsr.w init_drawsample ;init drawsample
; GET OLD COPPERLIST
move.l 4.w,a6
lea gfxname(pc),a1
jsr -408(a6)
move.l d0,a1
move.l 38(a1),oldcopper
jsr -414(a6)
; SAVE SYSTEM
lea $dff000,a6
move.w $1c(a6),d0
or.w #$8000,d0 ;set 'setbit'
move.w d0,oldintar
move.l $6c.w,oldvblanc ;save system vblanc
move.w #$7fff,$9a(a6) ;stop all system-things
; INIT LEERSPRITES
lea spritecopper(pc),a0
move.l #leersprite,d0
moveq #7,d7
.sloop move.w d0,6(a0)
swap d0
move.w d0,2(a0)
swap d0
addq.l #8,a0
dbf d7,.sloop
move.l #newcopper,$80(a6) ;start copper
move.w #$83f0,$96(a6)
move.l #newint,$6c.w
move.w #$c020,$9a(a6) ;start vblanc
buttwait
bsr.b drawsample
btst #6,$bfe001
bne.b buttwait
move.w #$7fff,$9a(a6)
move.l oldvblanc(pc),$6c.w
move.w oldintar(pc),$9a(a6) ;start system vblanc
move.w #$400,$96(a6) ;clr blitternasty bit
move.l oldcopper(pc),$80(a6) ;save systemcopper
bsr.w mt_data+10
movem.l (a7)+,d0-a6 ;get regs.
moveq #0,d0 ;no error return
rts ;say bye bye !!!!
;------------------------------------------------------------------------------
;--- INTERUPT HANDLER ---------------------------------------------------------
;------------------------------------------------------------------------------
newint
movem.l d0-a6,-(a7)
lea $dff000,a6
move.w #$20,$9c(a6) ;intreq löschen
moveq #64,d0
bsr.w mt_data+6
bsr.w checksound
movem.l (a7)+,d0-a6
rte
;------------------------------------------------------------------------------
;--- DRAW SAMPLE --------------------------------------------------------------
;------------------------------------------------------------------------------
; WRITTEN IN 1991/92 BY MC68000/TECH ------------------------------------------
;------------------------------------------------------------------------------
viewlength=160/2 ;no. of samples/voice
dots=0 ;1=using dots ... 0=using lines
xyswap=0 ;1=swapping x & y
xadd=2
screenbreite=40 ;bytes
shifter=3 ;shifter for ysize (lsr.w)
x1=20
y1=0
x2=60
y2=64
x3=100
y3=128
x4=140
y4=192
;--------------------------- INIT SHOWSAMPLE ----------------------------------
init_drawsample
lea multab(pc),a0
moveq #0,d0
move.w #255,d7
.wloop move.w d0,(a0)+
add.w #screenbreite,d0
dbf d7,.wloop ;create multab
rts
;--------------------------- DRAW SHOWSAMPLE ----------------------------------
drawsample
moveq #-1,d0
wb
cmp.b 6(a6),d0
bne.b wb
; DOUBLE BUFFERING
lea screen(pc),a0
movem.l (a0),d0-d1
exg d0,d1
movem.l d0-d1,(a0)
; SHOW 1.SCREEN
lea planecopper(pc),a0
move.w d1,6(a0)
swap d1
move.w d1,2(a0)
; CLEAR 2.SCREEN
wblit
move.l d0,$54(a6)
move.l #$01000000,$40(a6)
clr.w $66(a6)
move.w #256*64+[screenbreite/2],$58(a6)
; MAKE COORDSLIST
lea coords(pc),a1
move.l sound_struct+0(pc),a2 ;adresse st-structur
lea ss_sample1(pc),a4 ;adresse showsample
move.w #y1,d5 ;y adder
move.w #x1,d3 ;x start
bsr.w createcoords
move.l sound_struct+4(pc),a2 ;adresse st-structur
lea 30(a4),a4 ;adresse showsample
move.w #y2,d5
move.w #x2,d3 ;x start
bsr.w createcoords
move.l sound_struct+8(pc),a2 ;adresse st-structur
lea 30(a4),a4 ;adresse showsample
move.w #y3,d5
move.w #x3,d3 ;x start
bsr.w createcoords
move.l sound_struct+12(pc),a2 ;adresse st-structur
lea 30(a4),a4 ;adresse showsample
move.w #y4,d5
move.w #x4,d3 ;x start
bsr.w createcoords
; DRAW IT - WITH DOTS
if dots=1
wblit
lea coords(pc),a5
lea multab(pc),a4
move.l screen(pc),a0
moveq #3,d7
voiceloop
move.w #viewlength-1,d6
dotloop
movem.w (a5)+,d0-d1
move.w d0,d2
lsr.w #3,d0
add.w d1,d1
add.w (a4,d1.w),d0
not.w d2
bset d2,(a0,d0.w)
dbf d6,dotloop
dbf d7,voiceloop
rts
else
; DRAW IT - WITH LINES
moveq #screenbreite,d0
moveq #-1,d1
wblit
move.w d1,$44(a6)
move.w d1,$72(a6)
move.w #$8000,$74(a6)
move.w d0,$60(a6)
move.w d0,$66(a6)
lea coords(pc),a5
lea multab(pc),a4
move.l screen(pc),a0
moveq #3,d7
voiceloop
move.w #viewlength-2,d6
movem.w (a5)+,d0-d1
lineloop
movem.w (a5)+,d2-d3
movem.w d2-d3,-(a7) ;end xy sichern
cmp.w d1,d3
bge.s line3
exg d0,d2
exg d1,d3
line3 sub.w d1,d3
add.w d1,d1
move.w (a4,d1.w),d1
lea (a0,d1.w),a2
moveq #0,d1
sub.w d0,d2
bge.s line4
addq.w #2,d1
neg.w d2
line4 moveq #$f,d4
and.w d0,d4
lsr.w #3,d0
add.w d0,a2
ror.w #4,d4
or.w #$bca,d4
swap d4
cmp.w d2,d3
bge.s line5
addq.w #1,d1
exg d2,d3
line5 add.w d2,d2
move.w d2,d0
sub.w d3,d0
addx.w d1,d1
move.b line2(pc,d1.w),d4
swap d2
move.w d0,d2
sub.w d3,d2
moveq #6,d1
lsl.w d1,d3
add.w #$42,d3
lea $52(a6),a1
wblit
move.l d4,$40(a6)
move.l d2,$62(a6)
move.l a2,$48(a6)
move.w d0,(a1)+
move.l a2,(a1)+
move.w d3,(a1)
movem.w (a7)+,d0-d1 ;end xy -> start xy
dbf d6,lineloop
dbf d7,voiceloop
rts
line2 dc.b 1,1+$40,17,17+$40,9,9+$40,21,21+$40
endc
;----------------------------- CREATE COORDSTABLE -----------------------------
createcoords
moveq #0,d0
tst.w 10(a4) ;neuer ausschlag ???
beq.b .nonewaus
move.l 14(a4),(a4) ;sample adress
clr.w 4(a4) ;showadder
move.w 18(a4),6(a4) ;period
move.w 20(a4),8(a4) ;samplelenght
clr.w 10(a4) ;clr anschlag
.nonewaus
move.w 4(a4),d0 ;showadder
add.w 6(a4),d0 ;add period
move.w d0,4(a4) ;new showadder sichern
cmp.w 8(a4),d0 ;showadder > samplelenght
blo.b .nolenght
cmp.b #2,29(a4) ;check replenght
blo.b .noloop ;<=2 (=kein loop) ???
move.l 24(a4),(a4) ;set loopstart
move.w 28(a4),d1 ;looplenght
sub.w #viewlength,d1
move.w d1,8(a4) ;=new samplelenght
move.l (a4),a3
clr.w 4(a4) ;show adder = 0
bra.b .nolenght
.noloop
lea leersample(pc),a3
move.l a3,(a4) ;sampleadress = leersample
clr.l 4(a4) ;showadder & viewadder = 0
clr.w 8(a4) ;samplelenght = 0
bra.b .newlenght
.nolenght
move.l (a4),a3 ;sampleadress
add.l d0,a3 ;add showadder
.newlenght
moveq #64,d4 ;max volume
sub.b 19(a2),d4 ;act.vol. - max vol.
add.w d4,d4
if viewlength<=128
moveq #viewlength-1,d7 ;anzahl samples
else
move.w #viewlength-1,d7
endc
move.w #128,d6 ;sample + screenadder
.drawloop
moveq #0,d1
move.b (a3)+,d1 ;sample
ext.w d1 ;sample byte auf wordsize
beq.b .addready ;= 0 ???
bpl.b .ispos ;ist positiv
add.w d4,d1 ;add volume
ble.b .addready
moveq #0,d1
bra.b .addready
.ispos
sub.w d4,d1 ;sub volume
bge.b .addready
moveq #0,d1
.addready
add.w d6,d1
if shifter>0
lsr.w #shifter,d1
endc
move.w d3,d0 ;x
addq.w #xadd,d3 ;x + 1
add.w d5,d1 ;y adder
if xyswap=1
exg d0,d1
endc
movem.w d0-d1,(a1)
addq.l #4,a1
.nodraw
dbf d7,.drawloop
rts
;--------------- CHECK SOUND (VBLANC -> AFTER SOUNDREPLAYER) ------------------
checksound
move.l sound_struct+20(pc),a0
tst.b (a0) ;mt_counter
bne.b .nochange ;mt_counter = 0 -> new note
lea sound_struct(pc),a4
lea ss_sample1(pc),a1 ;adresse showsample
move.l 24(a4),a2 ;periodtable
lea sample_rate(pc),a3
moveq #35*2,d4
move.w #viewlength,d5
moveq #3,d7
.checkit
move.l (a4)+,a0
tst.w (a0)
beq.b .nomodify
move.w (a0),10(a1) ;save anschlag
move.l 4(a0),14(a1) ;sampleadress
move.w 16(a0),d3 ;period
moveq #0,d2
.checkloop
cmp.w (a2,d2.w),d3
bge.b .leavecheckloop
addq.w #2,d2
cmp.w d4,d2
bne.b .checkloop
.leavecheckloop
move.w (a3,d2.w),18(a1) ;sample rate
move.w 8(a0),d3 ;samplelenght
sub.w d5,d3 ;- viewsize
bpl.b .notolittle
move.w d5,d3
.notolittle
move.w d3,20(a1) ;samplelenght
move.l 10(a0),24(a1) ;loopstart
move.w 14(a0),d3
sub.w d5,d3
bmi.b .noloop
move.w 14(a0),d3
.noloop
move.w d3,28(a1) ;looplenght
.nomodify
lea 30(a1),a1
dbf d7,.checkit
.nochange
rts
; DATEN BUFFER ----------------------------------------------------------------
sample_rate dc.w 83,88,94,99,106,112,119,126,133,141,150,158,167,177
dc.w 188,199,211,224,237,251,266,282,298,317,335,354,377
dc.w 398,421,447,474,501,530,563,597,634
leersample dcb.b viewlength
even
ss_sample1 dcb.b 30*4
multab dcb.w 256
screen dc.l screen1,screen2
oldvblanc dc.l 0
oldintar dc.w 0
oldcopper dc.l 0
gfxname dc.b 'graphics.library',0,0
coords dcb.w viewlength*2*4
sound_struct dcb.b 28
;------------------------------------------------------------------------------
;--- COPPERLISTE --------------------------------------------------------------
;------------------------------------------------------------------------------
newcopper
spritecopper dc.w $0120,$0000,$0122,$0000,$0124,$0000,$0126,$0000
dc.w $0128,$0000,$012a,$0000,$012c,$0000,$012e,$0000
dc.w $0130,$0000,$0132,$0000,$0134,$0000,$0136,$0000
dc.w $0138,$0000,$013a,$0000,$013c,$0000,$013e,$0000
bplcon0 dc.w $0100,$1200
planecopper dc.w $00e0,$0000,$00e2,$0000
modulo dc.w $0108,$0000,$010a,$0000
dc.w $0102,$0000,$0104,$0064
dc.w $0182,$07aa,$0180,$0000
dc.w $008e,$296b,$0090,$29db,$0092,$0038,$0094,$00d0
dc.w $ffff,$fffe
;------------------------------------------------------------------------------
;--- GRAFIK/SOUND BUFFER ------------------------------------------------------
;------------------------------------------------------------------------------
leersprite dcb.l 3
screen1 dcb.b screenbreite*256
screen2 dcb.b screenbreite*256
mt_data
incdir dh0:
incbin mod.test
ende