C64 SID to YM2149 Conversions - YM6 player?

All about chiptunes

Moderators: Mug UK, lotek_style, Moderator Team

Post Reply
NegativeCharge
Atarian
Atarian
Posts: 4
Joined: Sat May 21, 2022 7:54 pm

C64 SID to YM2149 Conversions - YM6 player?

Post by NegativeCharge »

Hi all,

Inspired by some of the old Jochen Hippel SID tracks in the B.I.G. Demo, I've been working on my own converter to bring over C64 SID music to the YM2149, after successfully doing the same for the SN76489. Attached are a few examples in YM6 format.

YM6 C64 Conversions.zip

What I'd like to do is get these (and others) playing on real hardware. I'm not that familiar with 68000 asm, having mainly come from a 6502 background, but willing to give it a go.

So, my question is are there any YM6 playback code samples, or a way to convert the YM6 register writes to a SNDH format including an embedded player?

Thanks!
You do not have the required permissions to view the files attached to this post.
aag
Atari maniac
Atari maniac
Posts: 83
Joined: Wed May 09, 2007 9:20 pm
Location: West Yorkshire, UK
Contact:

Re: C64 SID to YM2149 Conversions - YM6 player?

Post by aag »

Anything useful in here?

https://www.atari-forum.com/viewtopic.php?t=40984

(Are you making use o samples/digi drums as well or just the ym register dumps?).

Main issue from the thread was amount of ran needed to hold uncompressed ym data)
NegativeCharge
Atarian
Atarian
Posts: 4
Joined: Sat May 21, 2022 7:54 pm

Re: C64 SID to YM2149 Conversions - YM6 player?

Post by NegativeCharge »

Thanks - yes, I've seen that thread but the most useful comment by Grazey doesn't appear to have any follow-up : "Yes there is a YM to SNDH converter but depends which version of the YM format you’re using."

This is just a register dump at the moment. For the 6502 I have a streaming LZSS de-compressor, so the size of the data isn't an issue there. Looking for something similar for the 68000, but with 512Kb I'm not sure that's even needed (I only have 32Kb for compressed data and player for my BBC Micro 6502 implementation).

Not using samples or digi drums at the moment, but may look into supporting them if I can get this working.
mlynn1974
Atari Super Hero
Atari Super Hero
Posts: 708
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: C64 SID to YM2149 Conversions - YM6 player?

Post by mlynn1974 »

Well done for converting these to the ST! I would like to know the process of converting these tunes (channels, notation and effects).

Leonard's spec is here:
http://leonard.oxg.free.fr/ymformat.html

I have written a YM3 player in STOS BASIC originally intended to replay tunes from the Spectrum 128k which uses the compatible AY-3-8912 chip. The player does not support YM6 Special effects. The melody sounds OK but the special effects aren't there.

These tunes (most YM tunes I found) are in interleaved format so you have to have pointers for each register and reset them when the tune loops.
Still got, still working: Atari 4Mb STe, 520STFM (x2), 2.5Mb STF, Atari 2600JR, Flashback 8 Gold.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).
NegativeCharge
Atarian
Atarian
Posts: 4
Joined: Sat May 21, 2022 7:54 pm

Re: C64 SID to YM2149 Conversions - YM6 player?

Post by NegativeCharge »

Thanks - I’m familiar with the spec and used it to programmatically create the YM6 files - I have a switch to allow non-interleaved or interleaved, and another for lha compression.

I’ll write more later as to how the conversion is achieved, but it’s basically sampling the C64 sound registers at 50hz and determining whether it’s tone or noise, and then adjusting for the frequency of the YM2149. I use libsidplayfp for the first part, with a few adjustments to expose the raw register values.

For now, I’ve found Sound Machine 4 beta which handles the playback well, but I’d really like to wrap these into a .sndh with embedded player.

You can here my conversion of Jon Dunn’s famous C64 RoboCop tune here:

https://x.com/charge_negative/status/17 ... 0761105587

Is the source for your YM3 STOS BASIC player available? I’m not doing anything special in these files so could easily output as YM3.
mlynn1974
Atari Super Hero
Atari Super Hero
Posts: 708
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: C64 SID to YM2149 Conversions - YM6 player?

Post by mlynn1974 »

NegativeCharge wrote: Sun May 19, 2024 7:31 pm Is the source for your YM3 STOS BASIC player available? I’m not doing anything special in these files so could easily output as YM3.
Actually it is a YM6 player - but it doesn't do the YM6 special effects! I saved my Spectrum tunes using AY Play in YM6 format.

Here is a version with your Cybernoid 2 tune (12k compressed, 270k uncompressed):
https://www.lynn3686.com/download/mus/YMCN2_1.zip
When compiled with the STOS compiler this takes less than 1% CPU time.

This example contains the uncompressed YM data loaded in memory bank 5 using:
reserve as data 5,270000
bload "cy2.dat",5
I hope the code might give you some ideas. If you fix any bugs in the code if you could let me know then that would be great. If you use the code in a demo a credit would be appreciated.

+1 for using Soundmachine4 to test RoboCop.
Still got, still working: Atari 4Mb STe, 520STFM (x2), 2.5Mb STF, Atari 2600JR, Flashback 8 Gold.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).
NegativeCharge
Atarian
Atarian
Posts: 4
Joined: Sat May 21, 2022 7:54 pm

Re: C64 SID to YM2149 Conversions - YM6 player?

Post by NegativeCharge »

Thank you! I will take a look when I find some free time to investigate STOS. I’ve also found the following which looks promising, but still haven’t uncovered the elusive YM6 to SNDH converter mentioned in the other thread.

https://github.com/diegoparrilla/ataris ... /src/ym6.s
Post Reply

Return to “Ym rockin'”