It is currently Tue Nov 21, 2017 8:54 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Nov 10, 2017 10:01 am 
Offline
User avatar

Joined: Fri Jan 24, 2014 9:05 am
Posts: 138
Location: Hungary
I've always wanted to know if it was possible to use the 5 FM-only channels of the YM2612 chip to output PCM. For most chips this works by setting the channel in question to the highest possible frequency, and then the attenuation/volume register can serve as the output for the data. I wonder if this is also possible in this case. Additionally, it might work by taking a completely different approach - retriggering the channel constantly (which resets the phase of the operators) and setting the amplitude you want by using the frequency of the channel to get the exact phase of the sine - then repeat. Also, if this is implemented in the chip with a digital phase counter, it should work perfectly, people have done the same with the SID chip before.


Top
 Profile  
 
PostPosted: Fri Nov 10, 2017 10:02 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19239
Location: NE Indiana, USA (NTSC)
With the time it takes to write to all six FM channels' registers, why can't you just sum six PCM channels on the Z80?


Top
 Profile  
 
PostPosted: Fri Nov 10, 2017 10:19 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 582
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
It is faster to software mix those 5 channels.

In addition, restarting a channel/operator will start the waveform at zero, it'll take a while to get the waveform to max point. You could stop phase generator though.

Other problem is that you can pretty much do only one write per chip sample, that's nowhere enough to do anything fancy on all 5/6 channels, unless really low sample rate is acceptable, but at that point just plain old software mixing will still be faster, and will sound better as 7bit log space isn't super great for playing samples, and you still won't get more than 9bit output on stock hardware. You can control the lowest bit of PCM channel wia test register and get all 9bits BTW.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Fri Nov 10, 2017 12:28 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10117
Location: Rio de Janeiro - Brazil
tepples wrote:
With the time it takes to write to all six FM channels' registers, why can't you just sum six PCM channels on the Z80?

https://youtu.be/x3m3JrVImmU


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 12:15 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2363
Hmm, he does audio sampling the same way he does texture scaling.


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 1:07 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5825
Location: Canada
They are similar interpolation problems.


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 3:45 pm 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3114
Location: Nacogdoches, Texas
To be honest, the results are kind of underwhelming considering the amount of work and likely processing time. :| (Although I think the bad instrument choice is half of the problem.) Is software mixing is the main bottleneck here?


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 4:53 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2363
Is this only during cutscenes?


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 7:29 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
tokumaru wrote:
tepples wrote:
With the time it takes to write to all six FM channels' registers, why can't you just sum six PCM channels on the Z80?

https://youtu.be/x3m3JrVImmU

For those who don't want to watch:
use tables to decide what parts of sample waveforms to discard when pitch-shifting
use tables for volume-scaling
software-mix on 68000 your four channels to one with halve(bitshift)+add
use a scanline? interrupt at 1 khz(15-20/fr, 50FPS) and upload 10B per interrupt so as to have tiny losses where the Z80's not playing sound
double-buffer samples in Z80 RAM so you don't have to stop playback even that much

Did I miss anything?


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 9:57 pm 
Offline

Joined: Sun Mar 27, 2011 10:49 am
Posts: 206
Location: NYC
Espozo wrote:
To be honest, the results are kind of underwhelming considering the amount of work and likely processing time.


Ahh, Traveller's Tales games in a nutshell :P


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 12:09 am 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3114
Location: Nacogdoches, Texas
adam_smasher wrote:
Ahh, Traveller's Tales games in a nutshell :P

The FMV intro to Sonic 3D Blast is probably the best part of the game, despite looking like shit. :lol: I've never played Mickey Mania or Pugsy, but judging from Sonic 3D Blast (bad) and Toy Story (decent, but not amazing) I think the people at Traveller's Tales were much better programmers than they were game designers; it's a bit of a shame that they didn't make PC games instead, where they'd be much less limited by space and processing power. I feel most European game developers from the early to mid nineties were the same way; the Japanese seemed to be better game designers, even if the games were less ambitious graphically and still ran worse. American developers (id and a few others nonwithstanding) were the worst in both regards. :lol:


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 3:36 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2363
Quote:
It's a bit of a shame that they didn't make PC games instead, where they'd be much less limited by space and processing power.


The challenge.


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 3:51 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 382
Location: Denmark (PAL)
Yeah, this is a typical staple of European developers in the 90s (and late 80s), and Traveller's Tales is a great poster child for that. I used to think only Japanese games (at least in the platformer genre and such) were good, while Western games almost always had the same flaws (pretty graphics, but extremely uninteresting and repetitive level design), but looking back at it now, I think that especially describes European developers, maybe even British specifically - usually coming off the C64 and Amiga demo scenes, where making cool effecient coding algorithms and special visual effects was more important than fun gameplay.

I remember, back in the days, I'd always remember the Traveller's Tales logo due to how much their games managed to stand out after all, plus they had a thing for working with those licenses that would make kids buy their games no matter how good they were.
However, I would also quickly begin to notice that pretty much ALL the games with the TT logo were also pretty bad. Not terrible, but never good at all. I think Mickey Mania was the only decent game they managed to make (and then, only the Sega version), and looking at Jon Burton's YouTube videos today, that's kinda sad, because you can tell he's really passionate about their products... in his own way anyway. That video about how they bypassed Sega's QA process by disguising bugs in their games as "secret level selects" is pretty shady, but at least he's being honest about it. :)

He's also working on a director's cut version of Sonic 3D at the moment, hoping to fix everything that was wrong about that game. I'm not sure that game is fixable, but it's a game I've always wanted to like, so I'm curious about it.


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 4:31 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2363
Quote:
Western games almost always had the same flaws (pretty graphics, but extremely uninteresting and repetitive level design).


When did western games ever have good graphics?


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 4:49 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 382
Location: Denmark (PAL)
Image

Image

Image

Image

Image

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group