Previous | 199869 Revisions | Next |
r177089 Friday 2nd April, 2021 at 17:58:04 UTC by Aaron Giles |
---|
New BSD-licensed OPL/OPLL (YM3526, YM3812, YM2413, Y8950, YMF262, etc) cores (#7869) * OPL prep. Define FAMILY constant in register classes, and use that instead of template specialization for family-specific behaviors. Expand channel masks to 32 bits. Add is_keyon() helper. * Made FM channel and operator mapping more flexible. Operators are now owned by the engine and can be dynamically assigned to channels. Register classes now provide a mapping between a linear set of operators and channels. The register data array is now a regular array instead of a vector. * Minor change for consistency. * Introduce OPL registers and create a ymopl_engine. Add support for sustain-less notes and the OPL envelope clocks (which does not divide by 3). * Moved keycode calculations into register class. Removed unnecessary recalc in phase generator. Lined up OPL frequency, feedback, algorithm, and total level. * Implement key scale level and OPL-specific LFO and phase handling. * Create new YM3526 device based on new OPL. Fix keyon and sustain behaviors. * Fix weird OPL multiple values. Clean up and further document OPL LFO. * No busy flag on OPL, so no need to do the work. Add a right shift of 1 to the output stage to line up volume with old implementation. * More compact way of representing key scale level values. * Move the KSL bitswap into the registers since it's apparently fixed in OPLL and perhaps others. * Add support for ryhthm generation in OPL. Change compute_volume to take a phase value directly, and expose operator phase. * Fix OPL timers. * Start LFSR with a non-zero value to ensure it actually starts generating for OPL. * Fix silly bug in sustain logic for OPL. Fixes a lot of previously missing sounds. * Create OPL2 engine. Add waveform support for OPL2/3 waveforms. * Wire up YM3812 to the new OPL2 engine. * Reset OPL timers when the mask is written as well. * Manage rhythm key ons separately. Fixes Wardner awfulness. * Explicitly make channel logic handle 0, 2, or 4 operators rather than checking each one for null. Also simplify the combining logic for the 2 operator case. * Reverse bit order of LFSRs to make things a little simpler. Fix OPL LFSR so that it has its full 23-bit period. * Change outputs along the path to arrays rather than stereo items. This allows for four channel output. Also add a constant for the number of outputs to the register class. * Move status register bit definitions to the registers class. Generically support the IRQ bit. * Create shared helpers for FP encode/decode/roundtrip and use them throughout. Also update TMNT to use the FP decoder. * No need to clamp when using the roundtrip. * Clear the EOS flag when execute is turned off on ADPCM-B. Fix combine_status in YM2608 to ignore previously set flags. * Add missing note_select in base class. Don't add 1 to the OPL release rate. * Move Y8950 over to new OPL engine. * Remove old y8950, along with fmopl and ymdeltat * Add updates prior to status reads for ADPCM systems. * Add status_mask and irq_reset logic into the core. Clean up documentation on family-specific registers. Includes some temporary gross debugging stuff. * Made debugging less gross by giving operators and channels a reference back to their owner. * Fix status port address in OPL chips. Reduce ADPCM volume to match previous implementation. * Fix Y8950 ADPCM start. Return masked status properly. * Initial cut at OPLL mapping. * Add YM2413 support based on ymfm; renamed vrc7snd to ds1001; added YM2423 amd YMF281 variants as well. Instrument data is now loaded via external ROMs. Added 'depress' envelope support to the core engine. Fixed a number of issues in the ymopll_engine. Documented hard-coded values. Moved register clear into register-specific reset. * Add missing identifier. * Y8950 is OPL not OPL2. * Some documentation cleanup. Consistency fixes in the register classes. * Consolidate large comments. Add support for delayed modulators for OPL. Broke out 2-op and 4-op cases to help simplify logic. Fixed overflow handling in fp encoding. * Fix silly bug. * Changed operator assignment mechanism to be more readable. Added prepare method to be called at the start of sound update. Added ALL_CHANNELS constant to register files. Updated all consumers to call prepare and use constants where applicable. * Move YMF262 and YMF278B to use new FM engine for OPL3/4. Fix several issues in OPL3 logic, which now seems to work ok. * Minor fixes. More documentation. * Fix MSVC build. * Add caching of data to prepare methods to improve performance. Moved non-register decoding logic out of the .h file and into .cpp file. Move phase_step calculation into register class. * More notes. Removed keycode from cache. Split 2/4-operator outputs into separate functions. Changed OPN/OPL to use templates for variants. Added channel/operator_offset helpers. * Fairly substantial overhaul of register interface. Register interface is now stateless and contains family-specific state. Channel and operator accessors are prefixed by ch_/op_ now and require an offset to the specific channel or operator. Moved LFO/noise generation into register class, along with keyon logging. * Add noise back to OPL/OPLL * Added early-out for low envelope. Moved waveform logic out into family-specific code. General clean up of ordering. Reduced family base class to minimal needed. * More aggressively track active channels to help performance. * Use only summing outputs for consideration of active channels. Centralize the logic of determined 4-op vs 2-op. * More conservative channel deactivation. * Add helper to compute the sample rate and use it in all implementations. Remove unneeded chnum/opnum members. * Fix error in YM2612 that caused crashes. * Switching parameters and locals to 32-bit values gives a noticeable performance boost. Checkpoint 1. * More moving to 32-bit values. Checkpoint 2. * Last of the 32-bit promotions. * Ensure SSG inverted flag is only tested on systems with SSG support in the innermost loops. * Make most constants 32-bit as well. Expose some constants via the engine class. * Expand waveforms ahead of time. Optimize the attenuation lookup a bit. * If volume is low, don't erase output, just leave it alone. Fixes missing sound in raimais. * Replace a couple of magic numbers with constants. * Normalization of FM engine usage across consumers. * Removed explicit external prepare() call; this logic is now automatically done after writes and periodically. Changed OPL/OPLL to use native formats for block/fnum. Fixed waveform generation. Fixed PM and AM depth on OPL/OPLL. * Cache multiple value. Clean up output handling a bit. * Move multiple caching ahead of phase step caching. * Fully split OPLL from OPL. Remove many hacks now that OPLL registers can have state. Created shared helpers between OPL/OPLL. Removed more aggressive channel disables since it was not rhythm friendly and didn't really buy much. * Remove old comment * Remove bad write in OPL mode case. Fixes fsoccer intro. Only call set_reset_status() once per mode call. * Remove FM output boost in YM2608/2610. Not sure why I did that. Better matches previous volume now. * Make AM/PM logging less confusing. * Let's actually set DYNAMIC_OPS properly, eh? * Improved logging. * Comment cleanups. Add constant for dynamic phase. Pre-shift sustain level. Srcclean. * Fix memory regions on YM2608 games. * Clean up ymadpcm to line up with recent ymfm changes. * y8950: Reshuffle read/write handlers. Rename them to less confusing names. * ym2413: Reshuffle read/write handlers. Rename them to less confusing names. * ym3526/ym3812: Reshuffle read/write handlers. Rename them to less confusing names. * ymf262: Match read/write details to datasheet and previous tests. * Use a constexpr function instead of macro for packing operator numbers. Pre-compute OPM LFO waveforms. * Generate OPL4 engine to support the proper clock divider and new flags. Update YMF278B to use FM timers and status rather than replicating the logic. * Fix 4-operator enable on new OPL4 instance. * Fix FM downsampling and adjust balance in YM278B. |
[/branches/time-experiments/scripts/src] | sound.lua |
[/branches/time-experiments/src/devices/bus/bbc/1mhzbus] | beebopl.h |
[/branches/time-experiments/src/devices/bus/c64] | sfx_sound_expander.h |
[/branches/time-experiments/src/devices/bus/isa] | adlib.cpp adlib.h sb16.h sblaster.cpp sblaster.h stereo_fx.h |
[/branches/time-experiments/src/devices/bus/msx_cart] | msx_audio.cpp msx_audio.h |
[/branches/time-experiments/src/devices/bus/nes] | konami.cpp konami.h |
[/branches/time-experiments/src/devices/sound] | |
[/branches/time-experiments/src/mame/audio] | nichisnd.h |
[/branches/time-experiments/src/mame/drivers] | actfancr.cpp aerofgt.cpp alpha68k_i.cpp amaticmg.cpp armedf.cpp battlane.cpp battlnts.cpp bebox.cpp bigkarnk_ms.cpp brkthru.cpp bublbobl.cpp cop01.cpp crospang.cpp cybertnk.cpp dcon.cpp dec0.cpp dec8.cpp deniam.cpp discoboy.cpp dunhuang.cpp dynax.cpp dynduke.cpp esd16.cpp exprraid.cpp fantland.cpp firetrap.cpp fresh.cpp fuukifg2.cpp gaelco.cpp galivan.cpp galspnbl.cpp ginganin.cpp goodejan.cpp hcastle.cpp igs011.cpp itech8.cpp jackpot.cpp karnov.cpp legionna.cpp lordgun.cpp matmania.cpp mephistp.cpp metlclsh.cpp missb2.cpp mitchell.cpp nbmj8688.cpp nbmj8891.cpp nbmj8900.cpp nbmj8991.cpp nbmj9195.cpp nemesis.cpp nmg5.cpp nmk16.cpp oneshot.cpp onetwo.cpp pcktgal.cpp pokechmp.cpp prehisle.cpp r2dx_v33.cpp raiden.cpp raiden2.cpp renegade.cpp rollerg.cpp sauro.cpp sengokmj.cpp seta.cpp sidepckt.cpp sigmab31.cpp sigmab52.cpp snk.cpp snk68.cpp snowbros.cpp spbactn.cpp spdodgeb.cpp speedbal.cpp splash.cpp splash_ms.cpp spy.cpp stadhero.cpp subsino.cpp subsino2.cpp suna16.cpp suna8.cpp tbowl.cpp tecmo.cpp tecmosys.cpp terracre.cpp tmnt.cpp toaplan1.cpp toaplan2.cpp toki.cpp tumbleb.cpp twincobr.cpp umipoker.cpp unico.cpp vgmplay.cpp vis.cpp wardner.cpp yunsun16.cpp yunsung8.cpp |
[/branches/time-experiments/src/mame/includes] | alpha68k.h bloodbro.h bublbobl.h toaplan1.h |
[/branches/time-experiments/src/mame/machine] | toaplan1.cpp |
https://github.com/mamedev/mame/commit/52f0acb25ca8a88a8170d0c9399c682d9469fac4 |
Previous | 199869 Revisions | Next |