| |
ready.
Registered: Feb 2003 Posts: 441 |
Music player + Open side border
hello all,
I am writing a demo part open side borders (left and right borders), which of course eats a lot of rastertime and lots of NOPs. Basically all the raster time in the open border area is wasted to open the borders.
I thought it'd be nice to play a tune instead for NOPing, wasting raster time waiting to change $d016 to open the side border.
The player should be so that it always goes throu the same code to play the tune and always requires the same raster time.
Of course the most simple thing would be to record in RAM all the SID registers and write them all at each frame, in a way like:
lda #??
sta $d400
lda #??
sta $d401
.....
....
but that would require too much memory and raster time.
Is there any such player around?
thanks,
Ready. |
|
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
An unrolled music routine eats a lot of RAM, and only uses a few raster lines. Why not use the available raster time to run another effect at the same time? And if you simply want to avoid a lot of NOPs, use a timer based raster stabilization routine instead that triggers just in time for the border opening (see this thread: Stable Raster via Timer). |
| |
algorithm
Registered: May 2002 Posts: 705 |
Like Magervalp said, However, If you are however only planning on showing the demo part for a short time (20 seconds or so) then the approx usage would be around 1k a second of audio (this could be finally compressed to much smaller size using lz based compression. Don't try and predecompress the stream in realtime as it will defeat the whole objective of getting rid of the music player |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
never seen such a player. dont think it exist.
but im not quite sure how the stream player that the hungarian guy did is doing.
but no, "use same time always player". never seen it.
playing the tune in the nops, will result that only a part can be, and the rest will have to be after all the nops, it will crash the ADSR in the sid, unless the player is engineered to work this way. so... no...
as far as i know.. ?
|
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
name of streaming sid player coder: ? i forgot his name, im sorry. yes, HERMIT!
can this in any way be used ? i dotn know... |
| |
Dane
Registered: May 2002 Posts: 423 |
Yep, it's doable. Check out Cycle for open fullscreen sideborder and multispeed music. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:never seen such a player. dont think it exist.
there were such players already many many years ago, its really not a new idea =) here is also some tool around that lets you play the tune and capture the data for replaying later (forgot how the hell it was called though).
dane: but the player in cycle first puts values into a buffer, and then the buffered values are stored to the SID inside the irq code.... right? so its not strictly "streaming".
however, the same should be doable with most modern players, since they usually buffer the sid writes anyway. |
| |
Zyron
Registered: Jan 2002 Posts: 2381 |
http://csdb.dk/search/?seinsel=all&search=music+raster+cruncher.. |
| |
Dane
Registered: May 2002 Posts: 423 |
Yes it buffers all 4 replays to zeropage. It's not rocket science but I think we were the first to combine it with a fullscreen plasma. Anyway, best of luck with your endeavours Ready. |
| |
ready.
Registered: Feb 2003 Posts: 441 |
thanks, for all the feedback. Actually it could work even with the NOPs, but the effect execution would slow down. Now gotta see what to put in place of the NOPs: tune or part of the demo effect..... stay tune, hopefully X2012 |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
I've considered similar before, but never quite got around to it.
Concept for a fully constant time routine was to use things like lookup tables for decrementing note duration counters etc, then use the same index to select one of two tables that when indexed by note counter do or do not update the note counter to the next one. Same concept could be extended for updating phrase/section. Not very efficient mind..
ldx v3count
lda subtract1,x
sta v3count
lda tableselect,x
sta ll:+2
ldx v3note
ll:
lda nextnote,x
sta v3note
In practice I think I'd be more likely to use a simple mid-note constant time update 1-3 times mid frame to make for some 100-200Hz update style effects (smoother frequency sweeps etc), rather than trying to do phrase and note updates in that time. |