Code Monkey home page Code Monkey logo

nuked-opn2's Introduction

Hi there ๐Ÿ‘‹ I'm nukeykt

  • ๐Ÿ”ญ Iโ€™m currently working on: SC-55 emulation
  • ๐Ÿ‘€ I'm interested in: reverse engineering old games and integrated circuits
  • ๐ŸŒฑ Iโ€™m currently learning: reverse engineering circuits and verilog
  • ๐Ÿ“ซ How to reach me: nukeykt on discord, @nukeykt on twitter, mail: alexeytf2 at gmail.com

nuked-opn2's People

Contributors

carmiker avatar clownacy avatar nukeykt avatar wohlstand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuked-opn2's Issues

Add more friendly way to send data to registers or provide a short example

Hello!

I am trying to figure out how to work with the new emulator to use it in my libOPNMIDI and in the OPN2 Bank Editor where I used emulator I got from GME project. It has void write0( int addr, int data );, void write1( int addr, int data ); functions to write register data (like in case of OPL3 emulators) and the void run( int pair_count, sample_t* out ); to generate an audio output chunk of specified length based on current state of data in registers. In case of new emulator it provides API which is similar to the real chip without having of a good manual to learn how to deal with it.

Can you implement those functions or provide a manual to let everyone easier control the chip?

Link to RE work?

Based on the README.md, you created this core based on die short RE from siliconpr0n. I am doing a similar project for the YM2151, and am curious if you uploaded your RE work anywhere/would be willing to provide a link for comparison purposes?

EDIT: I knew I remembered your name somewhere... apparently we chatted on VOGONS briefly last year. But you made much more progress than me it seems :).

Even if you don't do full vectorization, are you at least willing to upload your notes/an SVG?

Problems making a Teensy-Synth object

Hi @nukeykt and many thanks for this cool project!

I tried to use your code to make a Teensy C++ audio object out of it. But for this I would have to fill a 128 byte buffer in the update() method (at 44100 Hz). I can't quite figure out how to do this. Can you give me a hint?

I thought I could use the OPN2_Clock() function, but this seems to calculate only a single sample, doesn't it?

I would be very happy if you could give me a short hint.

Greetings, Holger

Licensing

Hi, I noticed a discrepancy between the current version and an older one used here https://github.com/Wohlstand/OPN2BankEditor/tree/master/src/opl/chips/nuked
It states LGPL v2.1, whereas this latest one is GPL v2.0. Is it possible to use 1.0.10 as LGPL v2.1 too?
Not to mention another weird non-standard license claimed here: https://github.com/nukeykt/Genesis-Plus-GX/blob/master/core/sound/ym3438.c
None of these is ideal, BSD/MIT/Zlib would be perfect from a technical standpoint (e.g. not having to dynamically link, usability for embedded stuff).
Please clarify the current status, otherwise I will have to use 1.0.9 which is LGPL'ed.
Thank you.

Envelope transition from decay to sustain

I had originally coded this transition with a greater than comparison with the sustain level. When I saw your code

if ((level >> 5) == chip->eg_sl[1])

I changed that to an equal. I thought it was a bit dangerous to make it an equal, but didn't find issues straightaway and I assumed that the original hardware worked that way.

I was reported yesterday that the jump sound effect in Bubble Bobble produced a noise in the last update, which used an equal comparison instead of greater than. Moving back to the old comparison fixed the bug.

It might be a problem of my particular implementation, that requires the > comparison. I don't know. I'm just writing it here in case your code should be a > too.

YM2612 mode?

Would it be possible to have YM2612 mode i.e. ladder effect?

Thanks and help :)

So I can build this just fine for an STM32 chip I'm playing with. But I'm looking for a simple example of how to init a chip instance and make it make a noise. I've looked at a lot of the emulators and libopnmidi etc but I'm having a hard time unwinding those to see how the setup is done. Do you know of a simple example that shows how to fire up and get output from this code?

And thank you :)

Rename "ym3438_t->slot" field into anything to avoid possible conflicts with Qt applications

Because Qt declares a dummy "slot" macro, all "slot" variables are becoming as nothing (and compiler fails to build this code). I got this trouble in the OPL3 Bank Editor while I worked on embedding of Nuked OPL3 emulator.

When I'll return to home, I'll post the pull request where I will rename that by myself (by using of embedded Qt Creator's refactoring features).

No sound - missing something?

Hello!
We are trying to run Nuked-OPN2 on a teensy MCU, everything appears to run OK but no sound.

We are first calling OPN2_Reset

then executing OPN2_Clock() inside our audio buffer,

We get noise at the output when manually updating mor and mol with random numbers inside of the PN2_ChOutput() function,
but no signal is generated by the emulator when we send the test code below (taken from the datasheet):

`ym3438.write(0x22, 0x00); // LFO off
ym3438.write(0x27, 0x00); // Note off (channel 0)
ym3438.write(0x28, 0x01); // Note off (channel 1)
ym3438.write(0x28, 0x02); // Note off (channel 2)
ym3438.write(0x28, 0x04); // Note off (channel 3)
ym3438.write(0x28, 0x05); // Note off (channel 4)
ym3438.write(0x28, 0x06); // Note off (channel 5)
ym3438.write(0x2B, 0x00); // DAC off
ym3438.write(0x30, 0x71); //
ym3438.write(0x34, 0x0D); //
ym3438.write(0x38, 0x33); //
ym3438.write(0x3C, 0x01); // DT1/MUL
ym3438.write(0x40, 0x23); //
ym3438.write(0x44, 0x2D); //
ym3438.write(0x48, 0x26); //
ym3438.write(0x4C, 0x00); // Total level
ym3438.write(0x50, 0x5F); //
ym3438.write(0x54, 0x99); //
ym3438.write(0x58, 0x5F); //
ym3438.write(0x5C, 0x94); // RS/AR
ym3438.write(0x60, 0x05); //
ym3438.write(0x64, 0x05); //
ym3438.write(0x68, 0x05); //
ym3438.write(0x6C, 0x07); // AM/D1R
ym3438.write(0x70, 0x02); //
ym3438.write(0x74, 0x02); //
ym3438.write(0x78, 0x02); //
ym3438.write(0x7C, 0x02); // D2R
ym3438.write(0x80, 0x11); //
ym3438.write(0x84, 0x11); //
ym3438.write(0x88, 0x11); //
ym3438.write(0x8C, 0xA6); // D1L/RR
ym3438.write(0x90, 0x00); //
ym3438.write(0x94, 0x00); //
ym3438.write(0x98, 0x00); //
ym3438.write(0x9C, 0x00); // Proprietary
ym3438.write(0xB0, 0x32); // Feedback/algorithm
ym3438.write(0xB4, 0xC0); // Both speakers on
ym3438.write(0x28, 0x00); // Key off
ym3438.write(0xA4, 0x22); //
ym3438.write(0xA0, 0x69); // Set frequency

while(1){
ym3438.write(0x28, 0xC0); //key on
delay(1000);
ym3438.write(0x28, 0); //key off
delay(1000);
}`

I have a doubts about the following functions:
OPN2_SetTestPin
OPN2_SetChipType
Must they be called to enable signal generation?
Anything else we are missing?
Thanks in advance!
Cheers
Alex

Issues with some Konami games (Lethal Enforcers etc)

Lethal Enforcers & other Konami games with its sound driver (TMNT Tournament Fighters...) have patches that sound like they might have wrong algorithm settings or operators' envelopes wrong. Tested with Genesis Plus GX

FM Towns question

I am trying to improve an old Euphony format player (FM Towns) by replacing its original home grown OPN2 emulation
with Nuked-OPN2. My updated player runs in the browser (via EMSCRIPTEN compilation to WebAssembly) so the runtime environment obviously loses some of the hardware's native processing power..

I am using the nuked-OPN2 version from vgmPlay and I have reached the point where the songs play - and while playing they actually sound quite nice.. However the playback stutters massively which to me is an indication that the processing is too expensive for this scenario. Is there a way to tradeoff emulation quality for processing speed? (I meanwhile disabled some functionalities that probably are not used in my use case: OPN2_doTimerA, OPN2_doTimerB. OPN2_EnvelopeSSGEG - and that seems to barely be enough to prevent the playback from stuttering on my machine..)

I am currently using 7670454 as the clock rate. Is that the correct master clock that an FM Towns machine would be using to drive the chip? (The CPU seems to run at 16MHz but how does that relate to what clock rate the OPN2 is using?)

Sound problems in the game "Stormlord" with nuked sound engines

Hello!
Thank you very much for your work!
I'd like to report the bug which I first addressed to ekeeke because I don't know what causes it: frontend, emulator or maybe your coded chips behavior.
Could you, please, look into it? I'd love to continue using them.
I'll copy a part of my message to ekeeke:
The problem is this: if I turn on any of Nuked sound engines, be it YM2612 or YM3438, there's something wrong in the game "Stormlord". Sound seems to work at the beginning, during the Razor Soft logo, and then it disappears, only occasional cracks are heard. When in game, there are cracks and also some strange micro-slowdowns when you shoot. With the rest of the three Mame sound drivers this game work fine.

Sorry if it was stated somewhere, I couldn't find any mentions of this problem during my brief google search.

SSG-EG Issue (Inaccuracy?)

Hey there, there seems to be an issue in regards to SSG-EG that my friend (@Genatari) had found out about when working on a track. The SSG-EG seems to sound slightly different at certain parts of this track on hardware, here are recordings from both Nuked and Hardware:

Nuked

Hardware

Here's the VGM and ROM of the track if needed:

VGM

ROM

Genesis GX Plus + Nuked YM2612 TMNT Tournament Fighters

Hello.
Thanks Nuked creator for helping in Genesis emulation.

Simply try Genesis GX Plus (Retroarch core) and load
Teenage Mutant Ninja Turtles Tournament Fighters both USA and JP
Go to Options BGM 2.
The music break in second loop or ramdonly play wrong since the begin.

I not undersand if is an issue with Retroarch , Genesis GX Plus core or Nuked.
I had to share the information.

Have an nice day.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.