jotego / jt12 Goto Github PK
View Code? Open in Web Editor NEWFM sound source written in Verilog, fully compatible with YM2612, YM3438 (JT12), YM2203 (JT03) and YM2610 (JT10)
License: GNU General Public License v3.0
FM sound source written in Verilog, fully compatible with YM2612, YM3438 (JT12), YM2203 (JT03) and YM2610 (JT10)
License: GNU General Public License v3.0
According to Sauraen
$2C:3 - Ch6 DAC ninth (least significant) bit. Yup, I remember reading about this in this thread, someone theorized this bit's existence, and here it is! It goes into the ninth bit of the DAC output register block, in an exactly corresponding place as where the eight signals from $2A go into the first eight bits. Even better, since it doesn't look like BUSY affects the chip-global registers ($2X) at all, you should be able to write the eight MSBs into $2A and write the LSB into $2C:3 as soon as the Z80 will let you. As long as you get them both in before the YM2612 gets around to the Ch6 cycle again, you should be able to get full-precision 9-bit output without missing samples.
Done in the MiSTer fork already. Update this repo. MiSTer commit with the change.
Change CSM selection to 2'b10 and not 2'b01
Many instrument issues in v0.2. Related to missing LFO?
There should be an overflow test here. Thanks to @greyrogue for pointing it out.
Bad sound on intro of Scooby Doo Mistery, JT12 version 0.51
Should be 93dB when all bits are set high
https://github.com/MiSTer-devel/Genesis_MiSTer/issues/26#issuecomment-1117934103 - as confirmed by gyurco, Bimini Run has a regression that points to this commit --> 66eb9ee
Me again ๐
So I've downloaded the latest Winamp and in_vgm plugin to see what's going on here and I've isolated all the channels. I've found that actually, with the Art of Fighting Neo Geo jingle, PSG isn't used at all.
The problem seems to be that FM channel 3 isn't playing anything. It should play the same notes as channel 2 just slightly pitched down to give that "chorus" effect I was talking about.
Does this mean FM channel 3 isn't working at all or just in Neo Geo? I'm certain this is the issue now.
I will upload some examples if I can when I'm at my laptop again.
I tried to mute the sound completely in order to get rid of the clicking/popping sounds while in reset by setting the amplifier volume to zero. However I noticed that zero volume to the amplifier does not give me complete silence.
I have a question about the HDL code on this line.
jt12/hdl/adpcm/jt10_adpcm_cnt.v
Line 74 in 42b1918
This combinational logic looks asymmetric. Because..
(en_ch[1] && cur_ch[4]) โ diff = 3
(en_ch[2] && cur_ch[5]) โ diff = 3
(en_ch[2] && cur_ch[0]) โ diff = 4
(en_ch[3] && cur_ch[1]) โ diff = 4
(en_ch[4] && cur_ch[2]) โ diff = 4
(en_ch[5] && cur_ch[3]) โ diff = 4
Of course, I haven't fully understood the pipeline logic, but I believe this logic is incorrect.
Could you please inform me if there are any reasons why it is asymmetric?
The ladder effect currently does not seem to exist within jt12 (unless I'm missing something and it's called something else). I was able to restore the functionality with what I thought was minimal impact to your design:
https://github.com/MiSTer-devel/Genesis_MiSTer/pull/210/files
This method restores the ladder effect to Genesis, but sorgelig does not want to deviate from your module but instead would prefer if the ladder effect were implemented in your core directly. I am working on it to learn about it, but I would have no problem if it were done by someone other than me because I may miss something or make a big mistake.
Additionally the audio balance controls between FM, PSG, PCM, etc... might need to be extended to the jt12 module, if they aren't already, I'm not sure if they are or aren't totally. sorry if I'm a bit of an amateur.
According to MAME, the end address comparison should be != instead of <. I think that means if end is less than start, it wraps:
https://github.com/Rakashazi/emu-ex-plus-alpha/blob/master/NEO.emu/src/gngeo/ym2610/ym2610.c#L2710
-Required for World Heroes Perfect guitar sample on ADPCMB (Jukebox = 0xFC25).
I didn't realize there appear to be some changes made to MiSTer where it's out of sync with this master version related to start/stop samples:
See the commits from Nov 11,2019 and Aug 27,2019.
Like this issue, I think I sourced those changes from MAME, but I don't know if they're accurate to hardware.
3-way gun sound, as heard in https://github.com/jotego/jtcop/commit/64f22a4341791854f89a77eaab0bc9f1cc2db582
Streets of Rage 1, round 4 music (selectable from options menu)
Timbals sound different from real hardware (as recorded here)
Timbals, drums, etc. are made with non-linear sounds so they tend to sound different unless you make everything equal.
Phase generator and operator are identical to hardware. Maybe there is some little tweak that can be done to the envelope generator.
Remove run register and lock load.
I've found out that this patch:
MiSTer-devel/Genesis_MiSTer@2db31a0
is needed to current master to work with Genesis (just listen Titan2).
In version v0.1
Timer B takes 1/2 of the time it should. According to YM2608 documentation is correct but Ghouls'n Ghosts has accelerated music because of this.
If I add one more bit to timer B, GnG sounds correct.
How about Timer A?
Check with real hardware/emulators...
As the title suggests, this instantly sounded wrong to me, if you listen to the 5th note on real hardware (and indeed the attached VGM) it sounds slightly discordant with the previous note as it lingers. JT12 (JT49?) doesn't seem to let the note run long enough.
I don't know of another Neo Geo track with a similar PSG envelope but I bet there is one. I'm going to assume this affects other sounds on many other systems too.
I used this core in 6-channel mode (by setting .num_ch(6)), but I noticed that the sound of some channels was slightly different from the real chip.
Upon further investigation, I came across the following comment:
Line 78 in 42b1918
At this line, there is a comment stating uses channels 0 and 4 for ADPCM data, throwing away FM data for those channels.
However, I wanted to utilize all 6 FM channels, so I commented out lines 82 to 103, and it seems to be working fine now.
Could you please explain why jt10_acc.v discards some FM data?"
-Worms
-Double Dragon II
-Demo Titan Overdrive2 (may not work on MiST port of fpgagen)
It can be heard on Ghouls'n Ghosts code 8, channel 3, operator 0.
Noticeable with version v0.1 in Sonic demo, 1st level.
Should the keyon only work on the release stage of the EG?
This eases implementation
ingame music stalls until the player's ship fires. Then music seems to be playing at the shooting pace.
Listen the "Street of Rage 2" title song.
In old jt12 version that percussion sound is perfect. In new version it's has high "hiss" instead of and lost its original a-la cymbals sound.
In version v0.1
Check with real hardware. Emulators have PCM sound softer.
TL may not be as aggressive (?)
Hi Jotego,
It has come to my notice that the JT12 is used in the Neo geo core for the MiSTer and me including other people have noticed some issues with the sound. I believe this has been reported before but not sure what was concluded. It is something with the PCM and the pitch that is not correct.
Kind regards
There is a problem with a certain sound effect in Sonic & Knuckles that sounds like distortion.
Information, samples, and guide how to recreate here:
http://www.atari-forum.com/viewtopic.php?f=115&t=31029&p=375808#p375807
Also reported here:
https://github.com/MiSTer-devel/Genesis_MiSTer/issues/28
jt12_kon cannot recognize the overflow signal if it only lasts for a clock cycle:
always @(posedge clk) if( clk_en ) begin
keyon_II <= (csm&&cur_ch==2'd2&&overflow_A) || drop;
end
overflow_A should be latched somehow for a whole round of operators.
Must latch each channel independently. Apply changes only when full FNUM is available
Because YM2203 only has three channels, phase modulation feedback inside OP module may be wrong, as it was designed for six channels.
v0.1 only supports up to x7 amplification. More may be needed, but wait until PCM/FM volume is balanced
Test that the recommendation of YM3438_APL.pdf makes sense with jt12_acc.v
In this manner, the tone data between the OPN2/OPN2C and OPN/OPNA are not 100% compatible. Accordingly, the standards when creating OPN2 or OPN2C tone data based on that of the OPN, OPNA, and YM2610 (OPNB) are listed below. This is the same even when using the OPN2/OPN2C to perform sound production.
โ Confirm the connection (algorithm) data. If these data are zero (0) through three (3), then the waveform does not distort, even at TL=0.
โก When con. = 4, set the TL of the second individual carrier so that it will be negative six (-6) [dB] or more.
โข When con. = 5 or 6, set the TL of the third individual carrier so that it will be negative nine and one half (-9.5) [dB] or more.
โฃ When con. = 7, set all TLโs to negative twelve (-12) or more.
Some games have wrong sound for a while or forever depending on initial value of registers.
Note that initial values of jt12_opram may not get implemented correctly when using initial. There is a warning from Xilinx ISE:
WARNING:PhysDesignRules:2410 - This design is using one or more 9K Block RAMs
(RAMB8BWER). 9K Block RAM initialization data, both user defined and
default, may be incorrect and should not be used. For more information,
please reference Xilinx Answer Record 39999.
I don't know if Quartus also has a similar problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.