YM2151 Accuracy/HDMI Effects
(español abajo)
I started on FPGA retro developments with a Yamaha YM2151 module: the most important chip for arcade games. I made hundreds of measurements, and I designed the FPGA counterpart -JT51- to match those measurements.
But there were two things I couldn't measure: the noise channel and the low-frequency oscillator (LFO). I made an implementation based on Yamaha's public notes. Now, with detailed reverse engineered information available, it was time I went back and reviewed it.
I have spent several days making an exact version of the original LFO and noise channel. The difference is quite noticeable in many melodies and FX sounds. I invite you to start your favourite game and listen to it again.
By the way, thanks to Stefany Allaire, the JT51 is being used now as a replacement for YM2151 chips, as the original parts are becoming scarce.
Cores affected by this improvement: CPS1, Double Dragon 1/2, Bionic Commando, Contra and Street Fighter 1.
The MiSTer firmware recently got support for custom aspect ratios, so you don't have to stick to the default options. I have added support to all cores. Please follow the official Mr's instructions about it.
Finally, I have added an "old TV" option to all cores. It enables a horizontal filter equivalent to a TV with poor bandwidth. It reminds me of my old computer TV. It will look better if you use it together with scanlines (50% at least). The scaler LCD effect also looks very nice with it. This filter is completely optional and can be combined with the old ones.
Please run the updater or grab the files from jtbin.
I had one more thing for this week, but things didn't go as planned. Expect a CPS2 beta update for next week, and possibly other goodies.
Español
Empecé con desarrollos retro FPGA con un módulo Yamaha YM2151: el chip más importante para juegos de recreativa. Hice cientos de mediciones y diseñé la contraparte FPGA -JT51- para que coincidiera con esas mediciones.
Pero había dos cosas que no pude medir: el canal de ruido y el oscilador de baja frecuencia (LFO). Hice entonces una implementación basada en las notas públicas de Yamaha. Ahora, con la información detallada de ingeniería inversa disponible, era hora de pararse y revisarla.
He pasado varios días haciendo una versión exacta del LFO original y del canal de ruido. La diferencia es bastante notable en muchas melodías y sonidos FX. Os invito a poner vuestro juego favorito y volver a escucharlo.
Por cierto, gracias a Stefanie Allaire, el JT51 se está usando como reemplazo de chips YM2151, dada la escasez de estos últimos.
Cores afectados por esta mejora: CPS1, Contra, Bionic Commando, Double Dragon 1/2 y Street Fighter 1.
El firmware de MiSTer recientemente incorporó soporte para relaciones de aspecto personalizadas, por lo que no hay que ceñirse a las opciones predeterminadas. He agregado este soporte a todos los cores. Sigue las instrucciones oficiales de MiSTer al respecto.
Finalmente, agregué una opción de "TV vieja" a todos los núcleos. Permite un filtro horizontal equivalente a un televisor con poco ancho de banda. Me recuerda a mi viejo televisor para el ordenador. Se ve muy bien usado junto con líneas de escaneo (50% al menos). El efecto LCD del escalador también congenia muy bien. NB: este filtro es completamente opcional y se puede combinar con los antiguos.
Tenía algo más para esta semana, pero las cosas no salieron según lo planeado. Espera una actualización de la beta de CPS2 para la próxima semana y posiblemente otras cositas.
Puedes usar el actualizador o directamente descargar desde jtbin.
Comments (53)
The instruments sound incorrect now compared to the real hardware for Street Fighter II. The Blanka stage is the most obvious one, the lead tune which is a percussive bell is now weak and out of tune.
I spent several hours on this last week and I will continue testing the modules to find the bug I introduced. I prefer not to roll back because this version fixed other problems. I will continue working on it this week.
Would your work on this be any help to the guy making the NEC PC8801 for MiSTer? - it has a newer FM chip though I think: http://fpga8801.seesaa.net Some tracks from the FM chip that's in 8801: https://www.youtube.com/watch?v=mDosHMMs9vM
I have talked with him a couple of times. He seems to enjoy writing his own modules and doesn't seem interested in using other people's work.
The only issue I'm having is the sound effects are pitched down lower. Example: in Double Dragon when inserting coin the sound is in the key of F instead of being in the key of A. In Mission 2 when the enemies come out of the elevator the sound is pitched lower. I hear the same thing Strider and Ghouls'N Ghosts. I don't know if the problem is on my end or not. Other than that everything else is solid and I really appreciate everything you do. :)
Thank you for the detailed report. I have checked all possible frequency values against a reference. However, I am going to double check them. As far as I know, the pitch should be correct, though.
Love your work ;-) such curiosity and attention to perfection.
After running the latest update, appears CPS1.5 was updated and the aspect ratio is fixed. Thank you Jose for your timely response and fix. Your work on Mister is truly appreciated.
The latest update resolved aspect ratio issue in CPS1. But, CPS1.5 is still messed up. I tested mult games on that core, picture is still squished. CPS2 is fine tho. Thank you Jotego.
It should be correct now. I am really sorry about this mess and I have taken measures to prevent it from happening again.
The aspect ratio thing is a huge problem, across the board for most cores at 1080p though, personally I use 1440p which is amazing, but I'd like to use 1080p for lower lag, but it just isn't possible, as it's so squished.
You can use the custom AR option now. It is setup via the ini file.
Tried the latest update and the aspect ratio issue still persists in mult cores. Sometimes the image is upside down, and a lot are squished.
I think there's an option - dip switch perhaps in the OSD - to flip the screen.
You are so very awesome at this stuff man!
Tried the latest update and the issues I was having with audio are now gone.Thanks!
:)
with this latest update the core CPS1, CPS1.5, for me, are perfect. good job!
Has anybody noticed a video glitch in JT's cores now? About every 4 or 5 seconds the screen with glitch out with lines and then return to normal. Only noticed on JT's cores since the update. Thanks!!
There hasn’t been any change related to that. Please try a cold boot.
For users of LCD monitors + OId TV filter : I noticed the picture is moved a few pixels to the right (offscreen). So there is a bit of cropping. No big deal.
Perhaps the Old TV setting only uses the core's resolution? - If it could use the HDMI resolution perhaps it would look even more authentic :)
You can add scale filters already, so that option is already supported. Although this specific filter may not be there. There is an advantage to having pre-scaler filters too so combining both gives the best results
The aspect ratio seems to be completely broken in CPS1 games now... Running in 1080p, I basically have two options, full screen stretches the image to 16:9, and original squashes the image so it looks like a vertical game. No option for a standard 4:3 horizontal image :(.
I just tried 1941, and this is displaying in horizontal 4:3 when it should be displaying in vertical 4:3. So I think horizontal and vertical game aspect ratios got flipped somehow.
Also ffightae doesnt seem to be working?
Does Ghouls n Ghosts picture seem a bit squished now using jtcps1_20210213?
I agree, I am reverting that change
Thank you for your great work!! in jtcps1_20210212, my sega saturn controller(Retro-Controllers-USB-MiSTer)always press down in game. but in jtcps15_20210212 it's good.
Let me double check the file in case I uploaded a wrong compilation.
Thank you very much for your hard work and I can definitely hear the improvement specially in the Double Dragon games.The only things I have found so far is when I put a Credit in Ghouls n’ Ghosts now I hear this strange “poping “ sound also I get random pops in Street Fighter 1 and during Strider atract mode transitions.
Yes... last-minute edit that I didn't test. I have to stop doing that. Sorry about it. Please run the updater again.
Brilliant update as always 👍 Looks like it has broken some of the FM on Carrier Airwing. Inserting coins now also has white noise.
Yes... last-minute edit that I didn't test. I have to stop doing that. Sorry about it. Please run the updater again.
Muchas gracias por la explicación en castellano.
Perhaps unrelated - but must I do something to get music back into the Ghosts'n'Goblins (JT) mra? - the "normal" G'n'G mra has music but not the (JT) mra.
Please run the updater again.
Outstanding man, thanks so much for the strive for perfection, sound is incredible!
Ha that is so cool! - gotta check this out now!
Thank you for your attention to all of the details and your amazing work!
Coining up in Ghouls n Ghosts makes a weird noise now. Not sure if its just my setup or not.
Yes... last-minute edit that I didn't test. I have to stop doing that. Sorry about it. Please run the updater again.
Looking forward to trying this later, thank you!
The Old TV really hurts my eyes, but the audio improvements are great. Thanks!
Yes, it is not for everyone.
nice !!!
Thanks this is an important update for all cores to come, and existing as well.
This man deserves the Nobel Piece Prize.
We love you Jotego for doing things like this!
Thank you very much. Yet another round of incredible work and attention to detail.
Gracias por tu pasión en este proyecto!! Esa obsesión tuya por la perfección, la disfrutamos los demás en cada partida ;)
Thank you for doing this.
The sound improvements is massive.
