mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 19:08:32 +08:00
@@ -104,6 +104,9 @@
|
|||||||
the remaining block of undefined/undocumented EGC
|
the remaining block of undefined/undocumented EGC
|
||||||
ROPs. This fixes "Atomic Punker" which uses EGC ROP
|
ROPs. This fixes "Atomic Punker" which uses EGC ROP
|
||||||
0xBE for sprite rendering. (joncampbell123)
|
0xBE for sprite rendering. (joncampbell123)
|
||||||
|
- Integrated commits from mainline (Allofich)
|
||||||
|
- Add proper opl3 handling of the waveform select
|
||||||
|
to dbopl.
|
||||||
0.83.19
|
0.83.19
|
||||||
- Reorganized the "List network interfaces" and "List
|
- Reorganized the "List network interfaces" and "List
|
||||||
printer devices" dialogs (under the "Help" menu) to
|
printer devices" dialogs (under the "Help" menu) to
|
||||||
|
@@ -1207,10 +1207,7 @@ Module::Module( Section* configuration ) : Module_base(configuration) {
|
|||||||
//Used to be 2.0, which was measured to be too high. Exact value depends on card/clone.
|
//Used to be 2.0, which was measured to be too high. Exact value depends on card/clone.
|
||||||
mixerChan->SetScale( 1.5f );
|
mixerChan->SetScale( 1.5f );
|
||||||
|
|
||||||
if (oplemu == "fast") {
|
if (oplemu == "compat") {
|
||||||
handler = new DBOPL::Handler();
|
|
||||||
}
|
|
||||||
else if (oplemu == "compat") {
|
|
||||||
if (oplmode == OPL_opl2) {
|
if (oplmode == OPL_opl2) {
|
||||||
handler = new OPL2::Handler();
|
handler = new OPL2::Handler();
|
||||||
}
|
}
|
||||||
@@ -1239,8 +1236,11 @@ Module::Module( Section* configuration ) : Module_base(configuration) {
|
|||||||
else {
|
else {
|
||||||
handler = new MAMEOPL3::Handler();
|
handler = new MAMEOPL3::Handler();
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
handler = new DBOPL::Handler();
|
//Fall back to dbop, will also catch auto
|
||||||
|
else if (oplemu == "fast" || 1) {
|
||||||
|
const bool opl3Mode = oplmode >= OPL_opl3;
|
||||||
|
handler = new DBOPL::Handler( opl3Mode );
|
||||||
}
|
}
|
||||||
usedoplemu = oplemu;
|
usedoplemu = oplemu;
|
||||||
handler->Init( rate );
|
handler->Init( rate );
|
||||||
|
@@ -510,7 +510,7 @@ void Operator::WriteE0( const Chip* chip, uint8_t val ) {
|
|||||||
if ( !(regE0 ^ val) )
|
if ( !(regE0 ^ val) )
|
||||||
return;
|
return;
|
||||||
//in opl3 mode you can always selet 7 waveforms regardless of waveformselect
|
//in opl3 mode you can always selet 7 waveforms regardless of waveformselect
|
||||||
uint8_t waveForm = val & ( ( 0x3 & chip->waveFormMask ) | (0x7 & chip->opl3Active ) );
|
const uint8_t waveForm = val & ( ( 0x3 & chip->waveFormMask ) | (0x7 & chip->opl3Active ) );
|
||||||
regE0 = val;
|
regE0 = val;
|
||||||
#if ( DBOPL_WAVE == WAVE_HANDLER )
|
#if ( DBOPL_WAVE == WAVE_HANDLER )
|
||||||
waveHandler = WaveHandlerTable[ waveForm ];
|
waveHandler = WaveHandlerTable[ waveForm ];
|
||||||
@@ -985,7 +985,7 @@ Channel* Channel::BlockTemplate( Chip* chip, uint32_t samples, int32_t* output )
|
|||||||
Chip
|
Chip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Chip::Chip() {
|
Chip::Chip( bool _opl3Mode ) : opl3Mode( _opl3Mode ) {
|
||||||
reg08 = 0;
|
reg08 = 0;
|
||||||
reg04 = 0;
|
reg04 = 0;
|
||||||
regBD = 0;
|
regBD = 0;
|
||||||
@@ -1122,7 +1122,8 @@ void Chip::WriteReg( uint32_t reg, uint8_t val ) {
|
|||||||
switch ( (reg & 0xf0) >> 4 ) {
|
switch ( (reg & 0xf0) >> 4 ) {
|
||||||
case 0x00 >> 4:
|
case 0x00 >> 4:
|
||||||
if ( reg == 0x01 ) {
|
if ( reg == 0x01 ) {
|
||||||
waveFormMask = ( val & 0x20 ) ? 0x7 : 0x0;
|
//When the chip is running in opl3 compatible mode, you can't actually disable the waveforms
|
||||||
|
waveFormMask = ( (val & 0x20) || opl3Mode ) ? 0x7 : 0x0;
|
||||||
} else if ( reg == 0x104 ) {
|
} else if ( reg == 0x104 ) {
|
||||||
//Only detect changes in lowest 6 bits
|
//Only detect changes in lowest 6 bits
|
||||||
if ( !((reg104 ^ val) & 0x3f) )
|
if ( !((reg104 ^ val) & 0x3f) )
|
||||||
|
@@ -198,7 +198,6 @@ struct Chip {
|
|||||||
//This is used as the base counter for vibrato and tremolo
|
//This is used as the base counter for vibrato and tremolo
|
||||||
uint32_t lfoCounter = 0;
|
uint32_t lfoCounter = 0;
|
||||||
uint32_t lfoAdd = 0;
|
uint32_t lfoAdd = 0;
|
||||||
|
|
||||||
|
|
||||||
uint32_t noiseCounter = 0;
|
uint32_t noiseCounter = 0;
|
||||||
uint32_t noiseAdd = 0;
|
uint32_t noiseAdd = 0;
|
||||||
@@ -226,6 +225,8 @@ struct Chip {
|
|||||||
uint8_t waveFormMask = 0;
|
uint8_t waveFormMask = 0;
|
||||||
//0 or -1 when enabled
|
//0 or -1 when enabled
|
||||||
int8_t opl3Active;
|
int8_t opl3Active;
|
||||||
|
//Running in opl3 mode
|
||||||
|
const bool opl3Mode;
|
||||||
|
|
||||||
//Return the maximum amount of samples before and LFO change
|
//Return the maximum amount of samples before and LFO change
|
||||||
uint32_t ForwardLFO( uint32_t samples );
|
uint32_t ForwardLFO( uint32_t samples );
|
||||||
@@ -244,7 +245,7 @@ struct Chip {
|
|||||||
void Generate( uint32_t samples );
|
void Generate( uint32_t samples );
|
||||||
void Setup( uint32_t rate );
|
void Setup( uint32_t rate );
|
||||||
|
|
||||||
Chip();
|
Chip( bool opl3Mode );
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Handler : public Adlib::Handler {
|
struct Handler : public Adlib::Handler {
|
||||||
@@ -256,6 +257,8 @@ struct Handler : public Adlib::Handler {
|
|||||||
virtual void SaveState( std::ostream& stream );
|
virtual void SaveState( std::ostream& stream );
|
||||||
virtual void LoadState( std::istream& stream );
|
virtual void LoadState( std::istream& stream );
|
||||||
|
|
||||||
|
Handler(bool opl3Mode) : chip(opl3Mode) {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user