Jump to content
IGNORED

experimental ROM export for furnace tracker


Dave C

Recommended Posts

So... I've been working on some way to get music into my current project (Refhraktor) and went on a little side trip into furnace...

Attached is a ROM dumped from a Skate or Die demo track (for the record I'm calling my modified version "Hmove or Die" - definitely shows some TIA artifacting (or maybe it's my process - or maybe I should have picked something simpler...))

 

Notes:
 

  • currently it just produces track data via command line (not integrated in the GUI) - not a playable rom
  • A POC for player code (reads track data as an include) can be found in the attached archive
  • one advantage size-wise - it's not doing a straight register dump - instead it attempts to replay the song in pattern form using tactical samples of register-dumped data
  • Dead certain I'm missing a lot of details around how timing / effects / etc are supposed to really work.
  • Also likely some general lack of safety in the extraction code - it will likely crash on songs that aren't extremely simple...
     

if anyone is interested in trying this out the source branch is here: https://github.com/DChristianson/furnace/tree/dbc-tia-rom-builder

 

r9demo.zip r9.a26

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Long time since I first posted this - on an endless series of side quests around my Refhraktor and "VCS Lisp Programming" projects... 

Anyhoo... I've gone back and reworked my previous run at TIA export for furnace. The new export has been updated to mirror changes to the main code base, does a little more aggressive compression, ... and I made the default player "nicer" graphically. I'm hoping to work with the furnace committer(s) to keep this moving forward... (I just need a TIA export option - I don't need it to be "my" ROM export)

https://github.com/tildearrow/furnace/pull/1555

Attached a sample from the furnace demos (Atari Breakbeat)...

 

Player_NTSC.a26 Player_PAL.a26

  • Like 3
Link to comment
Share on other sites

  • 3 months later...

I found the missing *.h files.

 

Compiling the Atari 2600 versions produce a very much slower music.

 

 

Player_NTSC.a26 Player_PAL.a26

 

And the source...

tiaplayer.zip

 

The source music was created for 60Hz updates and the resulting binary appears to be 10s instead of 6s. So there is a considerable slowdown that is less than 50%.

 

For my ears the tempo is not steady. By speeding up the playback you don't get the same. Perhaps the code puts in extra delays here and there?

Link to comment
Share on other sites

4 hours ago, karri said:

For my ears the tempo is not steady. By speeding up the playback you don't get the same. Perhaps the code puts in extra delays here and there?

Thanks for providing that feedback! I know there are quite a few TIA tracks floating around now but I haven’t kept up on all of the public development on this. Samples really help.
 

I recently got back to this and for sure there are both bugs and just wrong math - at a minimum I misinterpreted the internal data formats and timing mechanism,  for some reason the simple examples I produced for testing with mostly sounded sort of right. I plan to do some tinkering this weekend - hopefully will come up with a better test procedure.

  • Thanks 1
Link to comment
Share on other sites

@karri turns out there's an embarassingly simple bug - the playback code was introducing an extra frame every time register values are changed, so time could be distorted a variable amount. Updated sample attached. Not sure it's perfect but is much better.

 I have the improved code up to date in my repo but buyer beware - in addition to bug fixes it's wired up to dump out a lot of messy extra debugging information to help me figure out better data compression options.

Player_PAL.a26 Player_NTSC.a26 TIA_Percussion_Demo_01b.zip

  • Like 2
Link to comment
Share on other sites

Thank you! I will test it when I get home.

 

I do have a driver for the sn7 chip for Atari 7800. The idea here is to have a separate LZ run-length compressed strean for every register of interest. In addition to this I used huffmunch to extract one byte at a time. I can give you access to ny Wizzy repository if you want to have a look.

Link to comment
Share on other sites

Thank you! Your compiled samples work! The speed is even consistent for PAL and NTSC.

 

Edit: I was even able to compile these myself from your updated github. I hope this feature will be added to the mainstream furnace. It would be a very valuable tool for making quality music on the TIA. I will try to port some of my TIA tunes to Furnace Tracker to try this new AMAZING tool.

  • Like 1
Link to comment
Share on other sites

Thanks, I do want to get it merged - so far I haven’t run into roadblocks just feature requests… which I don’t mind honoring. 

 

i just became aware of huffmunch, do you mean Pokey for the 7800 or … sn76489  chips for .. like a million different machines? I’m very interested in Huffman encoding, Pokey, the 7800 and the sn76489 chips.

 

Link to comment
Share on other sites

I am using huffmunch on the SN cart for the 7800. So basically sn76489. I used this player on the 7800. But it was run in 16k of RAM. So it had self modifying code and pretty large buffers.

vgcplayer.s.txt

 

I just tried to add a melody instrument to TIA. But I assume that the volume envelope may be too long or something as it sounds different on Furnace Tracker and the a26.

 

TIA_Spanish_Flea.fur

Player_NTSC.a26

 

Link to comment
Share on other sites

So I looked at these today -  I definitely hear some clicking and ringing and maybe some delay. One or two other songs I've tried has a similar problem (TIA Breakbeat) Since Furnace uses Stella I'm trying to figure out how much of this the Stella libraries being configured differently and how much is me not handling the envelopes and modifiers correctly. 

In Audacity things definitely look different. 
image.thumb.png.4e93f9c56589b12c495c4fb51d1395c0.png

Link to comment
Share on other sites

I recorded it with Stella 6.5.2 which is fairly new.

 

The percussions also have envelopes but I don't see the same behavior in these sounds. Perhaps I make some error in defining the melody instrument?

Link to comment
Share on other sites

@karri I believe I resolved a couple of big issues in the Spanish Flea demo
 - <facepalm> there was an lsr that got dropped from the way-too-complicated decoder that mishandled the volume envelope (amazing the code worked at all)
 - any sustained effects "longer" than one note might not get encoded correctly (fixed by paying attention to when we enter a new "note" but registers aren't written immediately)
 

Player_NTSC.a26

  • Thanks 1
Link to comment
Share on other sites

Thank you! It sounds really good now. I might still have to transpose the tune to some other key as the TIA sounds are a bit off for some tones. But the great thing is that Furnace Tracker can be used for creating good TIA music! For me this is a reason to move from TiaTracker to Furnace Tracker.

 

Edit: I will also add some breaks to this tune. Silence is golden. And perhaps the B section. To compress the resulting code it may be a good idea to split the sections from 64 ticks to 16 ticks. It would reduce duplicated sequences even further.

  • Like 1
Link to comment
Share on other sites

@karri that still fits for me when I compile it, it's around 1K (compressing repeated patterns helps a lot).

The graphical bling player that I built for testing leaves 3200 bytes for music, but the actual player code uses 256 bytes.

I'm hoping to cut all this down - both player and the compression (and RAM needed by the player) but I didn't make as much progress as I wanted this weekend (but I did make progress on removing glitches which is also important). Huffmunch didn't compile for me on first try but I can see how it works and it is helpful.

Player_NTSC.a26

Link to comment
Share on other sites

  • 2 weeks later...

I am dreaming about writing a small Klondike game with Easter themed carts and use this Spanish Flea for music. The game would be written for the 7800 and Tia. Could I get a copy of the February 9th asm player where this stuttering sound was fixed?

post-2099-0-71588800-1492253520_thumb.png

Link to comment
Share on other sites

18 minutes ago, Dave C said:

@karri This is the latest asm player code with the transposed music. Maybe I'm too used to TIA-tuned music but I am used to listening to the non-transposed version at this point...

TIA_Spanish_Flea_Transposed.zip 10.92 kB · 0 downloads Player_NTSC.a26 4 kB · 0 downloads

I get your point. The higher pitched tune sounds nicer in a way. I have been thinking on setting a 2nd note on the few tones that are off just to mask them out by adding a ters in harmony with the offending note. But first I want to see if I have time to compile the code for my springtime surprise game! Easter is already on the 31st of March...

 

A 2600 version would probably need extra RAM for keeping the card piles. So some kind of SuperCart would be required.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...