Jump to content
IGNORED

The XM Dev Thread


RevEng

Recommended Posts

I started this thread as a catch-all for XM development. Feel free to ask questions, show off code or demos, or talk about anything XM related.

 

A heads up that I started a XM-dedicated section at the 7800.8bitdev.org wiki. The intention is to help shore up the official docs (they're the first thing pointed at, in wiki) and if Curt and crew want to borrow any info for the official docs, have at it. I'll also say that it's a meagre start - I'll be fleshing out the YM2151 programming doc as I have time, adding a tutorial for using the XMYM after it's less in-flux, and generally documenting what I figure out once I have a unit.

  • Like 6
  • Thanks 1
Link to comment
Share on other sites

From the XM has shipped thread...

 

8 hours ago, Synthpopalooza said:

OK, another test ...

 

This is intended as level 1 music for Sky Scraper 2115.  It's an expansion of the original theme music I did on POKEY back in 1990.  I used some new patches here, including a nice bell guitar hit to add to the atmosphere of the tune.

 

I also used an old synth trick for the hi hat ... holding down the note makes it a closed hi hat, but releasing it (with an OFF command in the tracker) makes it an open hi hat!  Therefore you only need one instrument patch for it.

 

The instruments are out of order, so I hope this doesn't affect things too much.

 

Real hardware tests are always appreciated.

 

 

sky scraper.wav 12.56 MB · 4 downloads sky scraper.dmf 2.1 kB · 1 download

 

The instruments-out-of-order thing should be dealt with in the next revision of the dmf2adm/XMYM tracker. It will include only the instruments you used, and assign them to any channels using them up-front. This is prep for the upcoming mid-song instrument feature changes, but has the nice side-effect of only storing patches you actually use, and not duplicating the patches if they're used across multiple channels.

 

The early note-off isn't yet supported. Anything data beyond the basic note-on isn't supported right now, because I don't want to multiply the ROM storage requirements. When I'm next in XMYM coding mode, I'll look at this to see if the note-on data can be expanded for this purpose.

 

  • Like 5
Link to comment
Share on other sites

How are note durations stored?  Are they fractional, like 1/8, 1/4, 1/2, ....?  Maybe you could store early note shutoff as a fraction of the note duration, from 1/8 to 7/8.  It would take 3 bits.  I could see the duration and early shutoff taking just 1 byte total.

Link to comment
Share on other sites

DefleMask follows more of a tracker paradigm, than a human-performance capture paradigm. The notes aren't really stored with durations as such in DefleMask, so neither are they in the resulting files. Each pattern is list of note-on data in rows, and when the time tick is done, note-offs get sent to the YM right before the new note-ons. Of course, you can prematurely turn off notes in DefleMask, as Synthpopalooza did, but it's an exception, instead of having an explicit duration as the rule.

 

I'm sure I can fudge it as a fake note-on, even if I just borrow the highest note from the highest octave, to signify it. That way I can even just run through the usual note playing routine, allow the usual note-off, but skip the note-on if it's the highest note.

Link to comment
Share on other sites

I plan to do one specifically for the XMYM tracker, so people can learn how to take DefleMask songs and export them for YM2151 music in their games. For other aspects of the YM hardware I'll have 7800basic sample code and reference docs, but probably no tutorials, as the usage should be pretty straightforward to pull from the samples.

 

I'm not sure if anybody else has plans for tutorials... hopefully someone will reply here with some. :)

  • Like 3
Link to comment
Share on other sites

Well I know a couple of SIO2SD owners that would would love to be able to also use them with the 7800 XM module, and one of them is me. :D

 

No pressure - I know you're just considering - but this would be super cool. A8 filesystem support doesn't matter all that much. Even low level disk routines would be amazing.

  • Like 4
Link to comment
Share on other sites

On 2/29/2020 at 6:20 PM, The Usotsuki said:

I've been considering trying to write a DOS for the XM but I know I'm way out of my element.

The source code for DOS 2.0 is available plus it uses the same drive and the same SIO system. Maybe it wouldn't be that hard for a decent assembly programmer.

  • Like 2
Link to comment
Share on other sites

On 2/29/2020 at 8:48 PM, The Usotsuki said:

It would need to use SIO disk drives, for what it's worth.  Whether it would be filesystem-compatible, though...

I would recommend trying to make it SIO2PC compatible so you have something that is a well established protocol & system.

  • Like 4
Link to comment
Share on other sites

For anyone interested in learning more about Yamaha's family of FM Synthesizers, I recommend giving hoot... a try.

 

Hoot.thumb.gif.efdb55b3f77bca5e99bb60a60d44202a.gif

 

Hoot is an audio emulator for PC-8801, PC-9801, X68000, and many of their friends - all of which feature a 4-Op Yamaha. As mentioned before (in the last thread?), you can't always migrate techniques 1-1 among the different chips, but it's still a good start. You can also observe what the software is doing on the right ("Driver work") - and use this to guess or extract patches. This feature is especially helpful if the driver bangs the chip to make some cool sounds.

 

Of course, it can also be used to just listen to music. I've noticed lots of cute tricks in Falcom's games and Ryu Umemoto's work is also pretty cool.

 

Some warning - Hoot is very fussy when loading music packages. Anything on the Hoot Archive is outdated and won't work with newer versions of Hoot. What I recommend is the following...

  1. Download the latest version of hoot...
  2. Follow the directions here, but use this or this as your source of the latest *.ini enhancements (hoot_2018-06-26.7z) and music packages instead.
  3. (optional) When 1. and 2. result in every music package loading with "invalid driver" - fiddle with the *.ini set and which packages you used until something works.
  4. Enjoy some Yamaha noises.
  • Like 4
Link to comment
Share on other sites

Neat! ? It looks from your links that it should run under Wine well, too.

 

My XMYM tracker is for playback of files created in DefleMask, which is another good platform to explore YM2151 FM synthesis in. DefleMask has graphical instrument patch editing, it can import OPM format instrument patches, and there's a bunch of sample music bundled. Input of notes is traditional tracker style, but it can also capture midi note input as well.

 

It looks like DefleMask and Hoot would serve two different niches for XM devs. As you say, Hoot would be good for analysis of existing music and listening enjoyment. DefleMask can be used for composition authoring and export to XM.

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, RALPH! said:

Can Pokey, Yamaha, and TIA used together to make music with many different voices? Can set it up to play 14 notes at the same time. TIA be very limited, maybe some pure tone, percussion, or string simulation.

It can ... however this is what I want to do ... 

 

POKEY settings as follows:

 

AUDCTL=$04 (HI pass filter on 0, from 2)

 

SKCTLS=$8B

 

0 - $Ax square

1 - silent (two tone modulation of 0)

2 - silent (hi pass modulation of 0)

 

This burns 3 pokey channels, but gets you double modulation.  SID type sounds ... plus you got one other POKEY, 2 TIA, and 8 yamaha channels left.  ?

 

You can also do two 16-bit pokey channels, and have perfect note resolution in any distortion setting.  This would be an NES slayer.

Edited by Synthpopalooza
  • Like 2
Link to comment
Share on other sites

Can get Pokey doing many different set ups. It depends on how many music notes you like to play at same time. 

If looking for extra pokey, why not replace the Yamaha chip with out that does more channels. That is if it is socket pins line up to similar function, data and address bits.

 

Link to comment
Share on other sites

On 3/21/2020 at 6:33 PM, Synthpopalooza said:

My thing is ... looking to see if I can piggyback  second POKEY on top of the existing one in the XM.  The thought of either stereo POKEY or 4 16-bit channels makes me drool... lol

I've been chatting a bit about this with Curt and Mark and they had some good suggestions, if someone wants to hack their XM.  The PIA and some additional logic gates can be used to select between two piggy backed POKEY's.  The audio would also have to be mixed in, which shouldn't be difficult.

Link to comment
Share on other sites

  • 3 weeks later...

I'm assuming we're talking about YM2151 specifically. I did minimal hardware init for my tracker - enabling YM in CNTRL1, writing $00 to the YM $1B register, and then setting up the instrument patches. Even $1B may not be required.

 

Are you getting dead silence, or some other result?

Link to comment
Share on other sites

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...