Jump to content

Some questions about X16 in general.


xanthrou
 Share

Recommended Posts

I believe that MMC uses a different protocol/format than SD ? - Someone will surely correct me of I am wrong 🙂

If we loose the YM2151, we still have the 16 channel PSG + the ability to play PCM samples through VERA

AFAIK, the C64 actually uses the 6510 and the Commander X16 is going to use the w65c02, they are not pin-compatible

https://eater.net/datasheets/w65c02s.pdf

http://archive.6502.org/datasheets/mos_6510_mpu_nov_1982.pdf

Link to comment
Share on other sites

2 minutes ago, xanthrou said:

Yeah, but there are more games and programs that use YM chip than the ones with VERA PSG.

Ok, I am not sure I know any games for the Commander X16 that use the YM2151 chip? If you are talking about games for other platforms, they will anyway need to be rewritten to run on the CX16. Granted, it might be easier to rewrite if the YM2151 is available.

Link to comment
Share on other sites

20 minutes ago, JimmyDansbo said:

Ok, I am not sure I know any games for the Commander X16 that use the YM2151 chip? If you are talking about games for other platforms, they will anyway need to be rewritten to run on the CX16. Granted, it might be easier to rewrite if the YM2151 is available.

To clarify myself better, I meant in the community downloads.

Link to comment
Share on other sites

Well, in any case. If the final product loses the YM2151, I don't think it will have much impact. Most people currently developing for the platform are aware that this is still volatile and things can change drastically from one day to the next. If the YM2151 disappears, more effort will be put into PSG and PCM in VERA. - just my 2 cents

Link to comment
Share on other sites

On 1/28/2021 at 7:40 PM, JimmyDansbo said:

I believe that MMC uses a different protocol/format than SD ? - Someone will surely correct me of I am wrong 🙂

Nothing definitive, but from a bit of quick googling, it seems possible that the differences in protocol are in their higher speed access methods ... I see multiple SPI mode drivers that bill themselves as SD/MMC drivers.

Now, there may be a difference that those drivers simply check for and handle based on type of card, which is why it is not definitive.

Link to comment
Share on other sites

On 1/28/2021 at 11:19 PM, Perifractic said:

Just for the record there are no plans to remove the YM sound chip and we are trying to lock down the final prototype which still has it at this stage.

It sounds like steady progress has resumed.  That is good to hear.

I hope someone studies the YM2151 datasheet timing diagrams before the next build.  There are several requirements that may not be easy to meet.

  • Like 2
Link to comment
Share on other sites

Just from watching 8 Bit Guy's videos over the past few years, I think he specifically prefers a synthesizer-grade sound chip in there.  

Therefore, the X16's YM has a great deal of moral support.

That's not a deal maker or deal breaker, but it is a deal.  Just sayin'.

 

Edited by rje
  • Thanks 1
Link to comment
Share on other sites

45 minutes ago, rje said:

Just from watching 8 Bit Guy's videos over the past few years, I think he specifically prefers a synthesizer-grade sound chip in there.  

Therefore, the X16's YM has a great deal of moral support.

That's not a deal maker or deal breaker, but it is a deal.  Just sayin'.

It is quite the notable sound chip as well. I think combined with the Vera PSG (though I still wish it had a few more nice things with it like buzz noise and some hardware envelope support), it will be quite a monster without being over the top - but maybe almost over the top. I'm finding just a single pattern of 64 rows and 25 channels (16 PSG, 8 FM, 1 PCM) for my tracker eats up nearly 8k. That's as a bit byte array with no trickery involved, so I can be considerably smaller if opting to use some sort of sparse format (but then there's a lot more overhead to edit patterns and things). So I think we're good!

I think even 8 PSGs would be plenty, particularly if it means we can get a little bit more features as noted above since I am worried trying to push 16 PSGs with software envelopes to vary the sound might not leave much for a gaming engine and this would still offer 17 channels total (8 PSG, 8 FM, 1 PCM). Without envelopes, even something as simple as note-on/note-off requires keeping track of things and across 16 channels it can really add up. I would still expect some effects require some software support but even just a simple envelope buffer (ala how Famitracker presents NES envelopes) or something like the SAA1099 would be nice. Full ADSR would be even nicer or at least more conventional (and more like the FM solution so easier to think about when making music for both).

Granted, if what we have in VeraSound is what we're gonna have, I'm still happy! Not trying to complain, just pointing out there may be some tradeoffs involved in order to make some nice sounds across many channels.

Link to comment
Share on other sites

10 hours ago, m00dawg said:

It is quite the notable sound chip as well. I think combined with the Vera PSG (though I still wish it had a few more nice things with it like buzz noise and some hardware envelope support), it will be quite a monster without being over the top - but maybe almost over the top. I'm finding just a single pattern of 64 rows and 25 channels (16 PSG, 8 FM, 1 PCM) for my tracker eats up nearly 8k. That's as a bit byte array with no trickery involved, so I can be considerably smaller if opting to use some sort of sparse format (but then there's a lot more overhead to edit patterns and things). So I think we're good!

I think even 8 PSGs would be plenty, particularly if it means we can get a little bit more features as noted above since I am worried trying to push 16 PSGs with software envelopes to vary the sound might not leave much for a gaming engine and this would still offer 17 channels total (8 PSG, 8 FM, 1 PCM). Without envelopes, even something as simple as note-on/note-off requires keeping track of things and across 16 channels it can really add up. I would still expect some effects require some software support but even just a simple envelope buffer (ala how Famitracker presents NES envelopes) or something like the SAA1099 would be nice. Full ADSR would be even nicer or at least more conventional (and more like the FM solution so easier to think about when making music for both).

Granted, if what we have in VeraSound is what we're gonna have, I'm still happy! Not trying to complain, just pointing out there may be some tradeoffs involved in order to make some nice sounds across many channels.

Even with some trickery in sound, there's still memory banking, in addition of 39 kilobytes of RAM. Plus, we know that VERA has its own 128kB of VRAM. So there's still space for other things.

Edited by xanthrou
  • Like 1
Link to comment
Share on other sites

10 hours ago, xanthrou said:

Even with some trickery in sound, there's still memory banking, in addition of 39 kilobytes of RAM. Plus, we know that VERA has its own 128kB of VRAM. So there's still space for other things.

The memory isn't the main issue and is an easy solve in the tracker - each pattern is one 8k block "uncompressed". A sparse format for playback and storage would make this much MUCH smaller in the majority of cases so embedding a song within a game shouldn't be a problem. Curious how the C256 trackers might solve this as an aside though because that thing has sooo many channels (I think too many really).

The main challenge is, as I was trying to articulate and perhaps didn't do a good job, the processing power required to manage 16 channels worth of envelopes and effects for the PSG. The lack of hardware envelopes means we have to use CPU power to process that. The only means available to control a PSG voice is waveform, 2-bits of panning (LR,Both), 6-bits of volume, and 6-bits of PWM. The means we have to control it is via the data ports (so in this case the VRAM isn't particularly relevant). It's absolutely possible to produce some nice sounds with (see Concerto) but it comes at the cost of CPU. Which I think may be just fine but it also means most songs won't be using all 16 channels most of the time is my guess if we start to become CPU starved. Concerto uses a VERY clever solution here (it doesn't sync using vsync or line sync but sync's via the DPCM butter) which allows for controlling envelope precision (and thus CPU usage) as well as approaching things in a multi-timbral way.

Even so, modulating 16 channels means up to 64 accesses to the VERA per "tick", at whatever granularity is defined. For smooth sounds, it has to be pretty fast (that's why Concerto uses the DPCM buffer for timing). All told, producing even simple NES sounds will require some envelopes and automation since some of these had hardware support we do not have with the VERA. We do have a nice range of PWM though which is quite fun! (nothing though that will require software automation so the precision of modulating it will be related to how much CPU is available and how much voices someone wants to use).

Again, while I would definitely like hardware envelopes (and buzz noise, ala NES and GB's special noise flag), if we don't have it, that'll be just fine! Just pointing out there will probably be trade-offs to the point 16 channels of PSG is probably more than most music might use. I might rather use 8 or even 4 PSG voices (in tandem with FM of course) if it means I can get higher resolution envelopes.

I didn't even mention DPCM here. This can be expensive as well buuut I am curious by how much if using 'chiptune style' samples (very short samples which can be retriggered to make sounds ala the GameBoy's WAV channel or the TG16). I know folks many folks are thinking about digital audio here but "drawable chips" is the main draw for the DPCM for me. As far as I'm aware VERA doesn't have an auto-loop feature for DPCM so it may still require a lot of CPU, but I'll have to play with that. Using chiptune waveforms results in tiny amounts of data compared to actual DPCM audio.

Link to comment
Share on other sites

  • 2 weeks later...

http://www.the8bitguy.com/2576/what-is-my-dream-computer/

"I’m pretty flexible with this.  I’d be okay with using some off-the-shelf Yamaha FM chips.  But I’d also be okay with having a socket for a SID chip or one of the off-the-shelf replacements such as the SwinSID.  Ideally some sort of DAC would be nice, some of the Yamaha chips have that built in."

Welp, I think rje's right.

 

Edited by xanthrou
I forgot to make the letters black, not dark red. Excuse me.
Link to comment
Share on other sites

On 2/1/2021 at 1:16 AM, m00dawg said:

Even so, modulating 16 channels means up to 64 accesses to the VERA per "tick", at whatever granularity is defined. For smooth sounds, it has to be pretty fast (that's why Concerto uses the DPCM buffer for timing). All told, producing even simple NES sounds will require some envelopes and automation since some of these had hardware support we do not have with the VERA. We do have a nice range of PWM though which is quite fun! (nothing though that will require software automation so the precision of modulating it will be related to how much CPU is available and how much voices someone wants to use)

If you allocate one of the data ports to audio, that reduces the overhead of having writing to the audio registers in an ISR, since the ISR doesn't have to save and restore the state of the VERA data channel registers.

If it is running at a frequency to make volume controlled ADSR envelopes, you don't want to spend a lot of cycles in each invocation of a the ISR, but one approach is to alternate between ADSR and voice setup, with all voices in a set of four or eight pushed through their ADSR envelope in the ADSR phase and one voice set up in each invocation of the voice setup phase. In the ADSR phase, you point to the first volume control of the first in the set and set auto increment to four, in the voice setup phase you point to the next voice setup task in the voice setup chain, and set the auto increment to one.

Link to comment
Share on other sites

Yep I'm using the second data port for all the audio stuff, which definitely makes things easier and faster.

It's still a lot of potential sending of data to VERA though since it's not just ADSR for volume. There might be envelopes for modulating pitch (vibrato, note slides, etc.), PWM (SID style squarewavey leads), arpeggiation, etc.

Making use of stride though definitely helps. My super basic and hardcoded just to have something to test against synth "engine" does that now, albeit without the ADSR and voice split (I'll have to think on that as I think I might not be getting the full concept there). Having multi-timbral instruments may help here I think since some envelopes can be shared. That won't help with writes out to VERA but would help with tracking envelope states on the CPU side. But then there would be times you want each "oscillator" in the multi-timbral instrument to have its own modulation so that might end up consuming CPU.

I managed to cause a stall in my tracker yesterday as I had a "bug" which was re-reading an entire full 25 channel pattern to draw on the screen (rather than just the 6 channels that can be seen). Once I fixed that, I no longer had a perceivable stall, though I have no pondered now having a nice scrolling pattern during playback of the song as a result since those cycles could be used for updating voice states and just how much overhead I'll ultimately have.

 

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.

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.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use