P6107, Optimized by 25% more and Bugfixed for "The Player 6.1A"
The Player 6.1A 610.8 / 05.04.10
Copyright 1992-95 Jarno Paananen
Guru / Sahara Surfers
A Sahara Surfers Product 1995
Fixed 1998-04 by NoName, Platon42, Tolkien and The Dark Coder
Optimized, bugfixed 2010-04 by Photon/Scoopex
Packaged single-include easy-to-use archive with examples and comments.
New in 610.8
------------
This is also not a minor update... but the numbering has been kept for historical
reasons. In short, SLen variable in P61_Init always wrote SongLength+1. It was
bugfixed, so PosJmp to last track works, for example. If you have any code that
subtracts 1 from songlength, you need to unfix it for this version.
Also, the playroutine has two "big" optimization options, splitchans and split4.
Split4 doesn't work with songs with speed F03 or faster, obviously. To split
decrunch over 4 frames requires at least 4 frames per notestep ;)
Splitchans works with all speeds and splits decrunch in half, basically. There
are no speed restrictions. Both Split4 and Splitchans works with CIA and Vblank.
Non lev6 mode added for the first time, as "poke DMAs to a byte address". You can
for example set a copper wait 11 scanlines after Vblank and load DMAcon, and give
the address in a4 to P61_Init. (If you run the playroutine at Vblank of course.)
All measurements done with 68000 running at full speed without interfering
bitplane or blitter DMA, when used 'in action' the raster time gained might
be greater, but still 25 percent.
>> Basically, this means a module that took 8.7 scanlines including
interrupts with V6.106 will now take 3.5 scanlines if nonLev6
and split4 is usable - circa 4.5 scanlines if split4 is not usable,
and if you don't want to use nonLev6 mode, add the time for the
DMAson and maybe the SetRepeat interrupt to that. About 140 cycles
for DMAson and circa 0.7 scanlines for the SetRepeat interrupt, for
4-channel modules.
Timing measurement and testing done on >12 random modules, with the above
results. Optimization has been made only with regards to the maximum raster-
time consumed, as it is this which affects a demo's or game's performance.
But gain should be near to the above also for average time consumed.
(I have no idea what the gain will be if you set use=-1. Set it to the value
in the P61.#? file comment! All modules have been tested with use=-1, of
course, so laziness is not a problem, just a raster time loss.)
It has also been tested in 68040 mode on my accelerated OCS A500, and WinUAE
2.0.2b15. Not that it means anything. I've made no changes that would work
differently on any Amiga.
GLOBAL CHANGES:
- restructuring changes, all based on the used new options.
CHANGES IN P61_MUSIC:
- removed the usage of A2, so 16 cycles saved if called in an interrupt :)
CHANGES IN P61_POSJMP:
- none. Everything worked when SLen was corrected :)
CHANGES IN P61_SETPOSITION:
- none. Everything worked when SLen was corrected :)
- actually, I added an improvement for click free soundoff/posjmp and soundon...
- split4/splitchans option handling added for correct functioning. Read comments.
OTHER CHANGES:
- anal optimization on everything that affects maxtime. I dare an alien from an
advanced civilization to gain more than 16 cycles on the maxtime. See it as a
challenge, not as arrogance. A warning: You will become obsessive compulsive...
like me...
- oscillo option added. This will give you extremely exact sample windows of the
samples played each frame, exact enough to allow you to mix channels while Paula
is playing the samples... or you can make the best oscilloscope effect yet...
I wrote a separate demopart oscilloscope effect to test it, let me know if you
want the example source.
ADDED FEATURES:
- see options in P6108-MaxTimeOptiOptions.S. Use them wisely. For example by
reading their comments!
DOCUMENTATION:
- See extensive comments in P61-Play.S and P61-Example.S.
FEEDBACK:
- I am confident every module that works in P6107 works in P6108. I've tested
even more modules this time :)
- If you find a module that doesn't or want to give feedback, email photon
scoopex1988 org.
- If you want me to answer questions about P61 playroutines in general, ask me
soon, before I forget. Best before date is 1 week from release date. :P
WISHLIST/FUTURE:
- 2-channel cross-Pan/Echo/Delay. Will be in next version. Or you can make it
yourself, see plugin comments in P6108-Play.S
- 1-2 Extra synth or sample channels. You can do this with P61_Osc. But buffered
is more effective. Framework is there, see plugin comments. An example buffered
mixing routine will be in next version.
Released during Amiga Demo Compo on BP2010. Haujobb rulez :) Greetings to
NoName for finding me at the party :)
//Photon
|