Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: energy on July 28, 2008

Title: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: energy on July 28, 2008
Hi!
Here is the TitchySID-LIB (TinySID) with sources by StatMAT in ONLY 12kb!
I did a conversion to Purebasic...
Hope the rest follows...  :P

BIG thanx to StatMAT for this great SMALL lib!

Cheers eNeRGy
 
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on July 28, 2008
!

Almost makes me want to use Masm! :)
Nice one!
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on July 29, 2008
Cheers for the spread energy. I saw there's already another fine library by Jim and stormbringer here. Funny that we we're working independently on the same thing, at the same time, with slightly different goals!  8)

Anyway, I hope this lib will prove useful anyway. And I should be releasing an even smaller v1.1 shortly. I love optimising! Sad really...  :P
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: energy on July 29, 2008
Hi StatMAT!
Nice to see yu here...
For the spreading... yes...that are the common friends from SnD and DBF!!...  ;)
but... again... thanx for this lib.... its working great!!!

Cheers
eNeRGy
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: rain_storm on July 29, 2008
Just one thing missing - a readme :D This looks quite useful I think I will have a stab at this lib. StartSID - StopSID just what we need without any bloaty frills
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on July 29, 2008
Just one thing missing - a readme :D

Yeah, I was a bit lazy there! I'll include one when I release v1.1 shortly. ;)
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on July 29, 2008
Have some good karma Statmat.  ;)
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on August 06, 2008
Okay, I've now finished working on v1.1 which is now considerably smaller (8.2kb). There's also some optional new functionality such as play/resume and changing songs (which adds about 1k to the lib). The package now contains two demos, one in MASM and the other in C (Visual Studio). And as if that wasn't enough, there's also a proper readme this time! ;)

Hope some of you will find it useful.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: benny! on August 06, 2008
@StatMat:

Awesome. Thanks a lot for this release and for nice
C example!

That deserves some K++
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on August 06, 2008
Thanks Statmat, cheers for the mention in the info file too and thanks for posting it.

It's really cool to have !  :clap: K+
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: jihad on August 06, 2008
thx for this nice lib   :bananaphallus:
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: energy on August 07, 2008
 :clap:
Very goood StatMAT!!   :P
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Rbz on August 10, 2008
Nice work indeed, I love those libs coded in ASM :)

I'll do a fb wrapper soon
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: hellfire on August 11, 2008
This is a really nice package, but since you're already delivering a precompiled lib, it would be nice to avoid this:
Code: [Select]
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
Oh, and maybe you can have a look what's going wrong here (http://hellfire.untergrund.net/sid/Commando.sid) ?
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on August 12, 2008
Yes, you're quite right, those libs should not be hardcoded like that. In my focus to tweak the actual code, I forgot to sort that. ;)

Anyway, I now have a version that does this, and I am currently looking into the bug with that Commando sid file you provided. I will release v1.2 once that is sorted.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Jim on August 13, 2008
Awesome!  Thanks very much!

Jim
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on September 09, 2008
I know things have gone a little quiet on this as I have been busy with real-life work recently. Anyway, I just thought I've give you a quick update. Basically the known bugs/issues as pointed out by hellfire etc have been resolved, and quite a few emulation issues have been fixed. I'm just finishing up the main new feature of this release which is an FFT routine for people to visualise the sound with spectrum analysers and whatnot. The format of the returned data is the same as BASS, allowing the use of the many examples for that. There's also going to be fading functionality which I hope some users may find useful.

I expect to do a release in the next week. :)
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: energy on September 09, 2008
 :clap: :-*
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on September 09, 2008
Damned sweet :)

FFT will be a really great feature for this lib.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on September 13, 2008
Well, to keep things interesting, I have decided to give you guys a sneak-peek at the latest TitchySID in action. I have attached the updated demo which demonstrates the new FFT stuff with a spectrum analyser. The library has also had quite a few bug fixes in the emulation (@hellfire - Commando should now work correctly! ;) ). The code also sync the threads better to avoid nasty artifacts when switching song. I haven't released the lib yet as I want to optimize the code further and update the docs etc. Plus I need to finish the logarithmic fading. Anyway, it should give a good idea how things are going. The extras version of lib has grown to around 12.5kb now (was about 9.5kb before), but I still think that's okay. And of course, the non-extras lib is still nice and small for those who don't want the frills. As usual, it's been difficult to make time to work on the code, but I promise it will be released very shortly for you all to play with!  ;D
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Rbz on September 13, 2008
Vey nice, the vu is working fine here.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Clyde on September 15, 2008
Welldone StatMat, I love Sid and C64. vu player looks really cool.

Cheers,
Clyde.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: benny! on September 15, 2008
Roxx  O0
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on October 11, 2008
I'd really like to add this to the resources page Statmat.. is it at a level where that could be done? :)

Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on October 11, 2008
Actually, it's almost complete. It's just other commitments that have stopped me finishing up. I will try to get this sorted ASAP. ;)
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on October 11, 2008
Nice one :) It would be really neat to have this on the downloads page. Thank you very much sir!
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on October 11, 2008
No worrries. I'd be really happy to see TitchySID up on the downloads section alongside some of the great stuff released here.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: hellfire on October 11, 2008
You made some impressive progress here, StatMat!
Alot of SIDs are working pretty good - all I miss is some kind of oversampling.
Something's going wrong with Bubble Bobble, though.
Attached it here 'cause HVSC seems to be down.

(works fine with sidplay (http://www.gsldata.se/c64/spw/sidplayw.html))
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: Shockwave on October 11, 2008
That's odd. That song won't play at all with Stormbringers tinysid routine
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: StatMat on October 11, 2008
Yes, it also won't work on the real TinySID by Tammo Hinrichs and Rainer Sinsch, which of course, both SB's code and mine are based on. My best guess is that the Bubble Bobble music relies on proper bank-switching, which gives a more faithful emulation of a real C64. This is something I will investigate in the future.
Title: Re: TitchySID - 12kb Player for MASM and PUREBASIC
Post by: stormbringer on October 11, 2008
TinySID does not handle NMIs (Non Maskable Interrupts) and other small features of the C64. I'll work on these one day (just waiting for the snow to start falling)... alors SC68 needs some re-engineering to properly emulate some tunes...

For the tunes that do not work with TinySID, you may look for other versions on the net. Some people spent some precious time making compatible versions.

Most of the issues are very similar with SC68's lack of CIA timer handling and interrupt handling.

While it's a nice exercise to implement interrupt and timer handling in the replayers, it's also somehow a waste of time. Very few tunes require these extra features and it's sometimes better to take the other route, which is: repairing the song/remove the use of NMIs, CIAs, etc.

After all, these replayers do not need to be real-time emulators, but just render PCM samples in memory that can be redirected to modern playout devices