mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-18 21:21:36 +00:00
Redo GME warning-silencing that was undone by commit fbddfbe57
This commit is contained in:
parent
fc97584c69
commit
138e7ff749
27 changed files with 86 additions and 76 deletions
|
@ -299,7 +299,7 @@ void Ay_Apu::run_until( blip_time_t final_end_time )
|
|||
while ( ntime <= end ) // must advance *past* time to avoid hang
|
||||
{
|
||||
int changed = noise_lfsr + 1;
|
||||
noise_lfsr = (-(noise_lfsr & 1) & 0x12000) ^ (noise_lfsr >> 1);
|
||||
noise_lfsr = ((blargg_ulong)-(blargg_long)(noise_lfsr & 1) & 0x12000) ^ (noise_lfsr >> 1);
|
||||
if ( changed & 2 )
|
||||
{
|
||||
delta = -delta;
|
||||
|
|
|
@ -469,7 +469,7 @@ possibly_out_of_time:
|
|||
add_hl_data: {
|
||||
blargg_ulong sum = rp.hl + data;
|
||||
data ^= rp.hl;
|
||||
rp.hl = sum;
|
||||
rp.hl = (uint16_t)sum;
|
||||
flags = (flags & (S80 | Z40 | V04)) |
|
||||
(sum >> 16) |
|
||||
(sum >> 8 & (F20 | F08)) |
|
||||
|
@ -719,7 +719,7 @@ possibly_out_of_time:
|
|||
flags = (flags & (S80 | Z40 | P04)) |
|
||||
(temp & (F20 | F08)) |
|
||||
(temp >> 8);
|
||||
rg.a = temp;
|
||||
rg.a = (uint8_t)temp;
|
||||
goto loop;
|
||||
}
|
||||
|
||||
|
@ -1048,7 +1048,7 @@ possibly_out_of_time:
|
|||
blargg_ulong sum = temp + (flags & C01);
|
||||
flags = ~data >> 2 & N02;
|
||||
if ( flags )
|
||||
sum = -sum;
|
||||
sum = (blargg_ulong)-(blargg_long)sum;
|
||||
sum += rp.hl;
|
||||
temp ^= rp.hl;
|
||||
temp ^= sum;
|
||||
|
@ -1056,7 +1056,7 @@ possibly_out_of_time:
|
|||
(temp >> 8 & H10) |
|
||||
(sum >> 8 & (S80 | F20 | F08)) |
|
||||
((temp - -0x8000) >> 14 & V04);
|
||||
rp.hl = sum;
|
||||
rp.hl = (uint16_t)sum;
|
||||
if ( (uint16_t) sum )
|
||||
goto loop;
|
||||
flags |= Z40;
|
||||
|
|
|
@ -47,8 +47,8 @@ Ay_Emu::~Ay_Emu() { }
|
|||
|
||||
static byte const* get_data( Ay_Emu::file_t const& file, byte const* ptr, int min_size )
|
||||
{
|
||||
long pos = ptr - (byte const*) file.header;
|
||||
long file_size = file.end - (byte const*) file.header;
|
||||
long pos = long(ptr - (byte const*) file.header);
|
||||
long file_size = long(file.end - (byte const*) file.header);
|
||||
assert( (unsigned long) pos <= (unsigned long) file_size - 2 );
|
||||
int offset = (BOOST::int16_t) get_be16( ptr );
|
||||
if ( !offset || blargg_ulong (pos + offset) > blargg_ulong (file_size - min_size) )
|
||||
|
@ -207,7 +207,7 @@ blargg_err_t Ay_Emu::start_track_( int track )
|
|||
if ( len > blargg_ulong (file.end - in) )
|
||||
{
|
||||
set_warning( "Missing file data" );
|
||||
len = file.end - in;
|
||||
len = unsigned(file.end - in);
|
||||
}
|
||||
//debug_printf( "addr: $%04X, len: $%04X\n", addr, len );
|
||||
if ( addr < ram_start && addr >= 0x400 ) // several tracks use low data
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// File_Extractor 0.4.0. http://www.slack.net/~ant/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "Data_Reader.h"
|
||||
|
||||
#include "blargg_endian.h"
|
||||
|
@ -89,11 +91,11 @@ Remaining_Reader::Remaining_Reader( void const* h, long size, Data_Reader* r )
|
|||
in = r;
|
||||
}
|
||||
|
||||
long Remaining_Reader::remain() const { return header_end - header + in->remain(); }
|
||||
long Remaining_Reader::remain() const { return long(header_end - header + in->remain()); }
|
||||
|
||||
long Remaining_Reader::read_first( void* out, long count )
|
||||
{
|
||||
long first = header_end - header;
|
||||
long first = long(header_end - header);
|
||||
if ( first )
|
||||
{
|
||||
if ( first > count )
|
||||
|
@ -210,7 +212,7 @@ long Std_File_Reader::size() const
|
|||
|
||||
long Std_File_Reader::read_avail( void* p, long s )
|
||||
{
|
||||
return fread( p, 1, s, (FILE*) file_ );
|
||||
return (long)fread( p, 1, s, (FILE*) file_ );
|
||||
}
|
||||
|
||||
blargg_err_t Std_File_Reader::read( void* p, long s )
|
||||
|
|
|
@ -127,8 +127,8 @@ void Dual_Resampler::mix_samples( Blip_Buffer& blip_buf, dsample_t* out )
|
|||
r = 0x7FFF - (r >> 24);
|
||||
|
||||
in += 2;
|
||||
out [0] = l;
|
||||
out [1] = r;
|
||||
out [0] = (dsample_t)l;
|
||||
out [1] = (dsample_t)r;
|
||||
out += 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -186,8 +186,8 @@ int Fir_Resampler_::avail_( blargg_long input_count ) const
|
|||
|
||||
int Fir_Resampler_::skip_input( long count )
|
||||
{
|
||||
int remain = write_pos - buf.begin();
|
||||
int max_count = remain - width_ * stereo;
|
||||
int remain = int(write_pos - buf.begin());
|
||||
int max_count = int(remain - width_ * stereo);
|
||||
if ( count > max_count )
|
||||
count = max_count;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
void clear();
|
||||
|
||||
// Number of input samples that can be written
|
||||
int max_write() const { return buf.end() - write_pos; }
|
||||
int max_write() const { return int(buf.end() - write_pos); }
|
||||
|
||||
// Pointer to place to write input samples
|
||||
sample_t* buffer() { return write_pos; }
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
void write( long count );
|
||||
|
||||
// Number of input samples in buffer
|
||||
int written() const { return write_pos - &buf [write_offset]; }
|
||||
int written() const { return int(write_pos - &buf [write_offset]); }
|
||||
|
||||
// Skip 'count' input samples. Returns number of samples actually skipped.
|
||||
int skip_input( long count );
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
int input_needed( blargg_long count ) const;
|
||||
|
||||
// Number of output samples available
|
||||
int avail() const { return avail_( write_pos - &buf [width_ * stereo] ); }
|
||||
int avail() const { return avail_( blargg_long(write_pos - &buf [width_ * stereo] )); }
|
||||
|
||||
public:
|
||||
~Fir_Resampler_();
|
||||
|
@ -161,11 +161,11 @@ int Fir_Resampler<width>::read( sample_t* out_begin, blargg_long count )
|
|||
|
||||
imp_phase = res - remain;
|
||||
|
||||
int left = write_pos - in;
|
||||
int left = int(write_pos - in);
|
||||
write_pos = &buf [left];
|
||||
memmove( buf.begin(), in, left * sizeof *in );
|
||||
|
||||
return out - out_begin;
|
||||
return int(out - out_begin);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -89,6 +89,12 @@ unsigned const n_flag = 0x40;
|
|||
unsigned const h_flag = 0x20;
|
||||
unsigned const c_flag = 0x10;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// warning C4101: 'blargg_failed_' : unreferenced local variable
|
||||
// -- produced by the BOOST_STATIC_ASSERT line below
|
||||
#pragma warning(disable:4101)
|
||||
#endif
|
||||
|
||||
bool Gb_Cpu::run( blargg_long cycle_count )
|
||||
{
|
||||
state_.remain = blargg_ulong (cycle_count + clocks_per_instr) / clocks_per_instr;
|
||||
|
@ -711,7 +717,7 @@ loop:
|
|||
temp += prev;
|
||||
flags &= z_flag;
|
||||
add_16_hl:
|
||||
rp.hl = temp;
|
||||
rp.hl = (uint16_t)temp;
|
||||
add_16_comm:
|
||||
flags |= (temp >> 12) & c_flag;
|
||||
flags |= (((temp & 0x0FFF) - (prev & 0x0FFF)) >> 7) & h_flag;
|
||||
|
|
|
@ -60,8 +60,8 @@ blargg_err_t Gme_File::load_mem_( byte const* data, long size )
|
|||
blargg_err_t Gme_File::load_( Data_Reader& in )
|
||||
{
|
||||
RETURN_ERR( file_data.resize( in.remain() ) );
|
||||
RETURN_ERR( in.read( file_data.begin(), file_data.size() ) );
|
||||
return load_mem_( file_data.begin(), file_data.size() );
|
||||
RETURN_ERR( in.read( file_data.begin(), (long)file_data.size() ) );
|
||||
return load_mem_( file_data.begin(), (long)file_data.size() );
|
||||
}
|
||||
|
||||
// public load functions call this at beginning
|
||||
|
|
|
@ -106,10 +106,10 @@ void Hes_Osc::run_until( synth_t& synth_, blip_time_t end_time )
|
|||
unsigned noise_lfsr = this->noise_lfsr;
|
||||
do
|
||||
{
|
||||
int new_dac = 0x1F & -(noise_lfsr >> 1 & 1);
|
||||
int new_dac = 0x1F & (unsigned)-(int)(noise_lfsr >> 1 & 1);
|
||||
// Implemented using "Galios configuration"
|
||||
// TODO: find correct LFSR algorithm
|
||||
noise_lfsr = (noise_lfsr >> 1) ^ (0xE008 & -(noise_lfsr & 1));
|
||||
noise_lfsr = (noise_lfsr >> 1) ^ (0xE008 & (unsigned)-(int)(noise_lfsr & 1));
|
||||
//noise_lfsr = (noise_lfsr >> 1) ^ (0x6000 & -(noise_lfsr & 1));
|
||||
int delta = new_dac - dac;
|
||||
if ( delta )
|
||||
|
|
|
@ -503,7 +503,7 @@ possibly_out_of_time:
|
|||
add_hl_data: {
|
||||
blargg_ulong sum = rp.hl + data;
|
||||
data ^= rp.hl;
|
||||
rp.hl = sum;
|
||||
rp.hl = (uint16_t)sum;
|
||||
flags = (flags & (S80 | Z40 | V04)) |
|
||||
(sum >> 16) |
|
||||
(sum >> 8 & (F20 | F08)) |
|
||||
|
@ -753,7 +753,7 @@ possibly_out_of_time:
|
|||
flags = (flags & (S80 | Z40 | P04)) |
|
||||
(temp & (F20 | F08)) |
|
||||
(temp >> 8);
|
||||
rg.a = temp;
|
||||
rg.a = (uint8_t)temp;
|
||||
goto loop;
|
||||
}
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ possibly_out_of_time:
|
|||
blargg_ulong sum = temp + (flags & C01);
|
||||
flags = ~data >> 2 & N02;
|
||||
if ( flags )
|
||||
sum = -sum;
|
||||
sum = (blargg_ulong)-(blargg_long)sum;
|
||||
sum += rp.hl;
|
||||
temp ^= rp.hl;
|
||||
temp ^= sum;
|
||||
|
@ -1093,7 +1093,7 @@ possibly_out_of_time:
|
|||
(temp >> 8 & H10) |
|
||||
(sum >> 8 & (S80 | F20 | F08)) |
|
||||
((temp - -0x8000) >> 14 & V04);
|
||||
rp.hl = sum;
|
||||
rp.hl = (uint16_t)sum;
|
||||
if ( (uint16_t) sum )
|
||||
goto loop;
|
||||
flags |= Z40;
|
||||
|
|
|
@ -407,7 +407,7 @@ blargg_err_t M3u_Playlist::parse()
|
|||
blargg_err_t M3u_Playlist::load( Data_Reader& in )
|
||||
{
|
||||
RETURN_ERR( data.resize( in.remain() + 1 ) );
|
||||
RETURN_ERR( in.read( data.begin(), data.size() - 1 ) );
|
||||
RETURN_ERR( in.read( data.begin(), long(data.size() - 1) ) );
|
||||
return parse();
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
int repeat; // count
|
||||
};
|
||||
entry_t const& operator [] ( int i ) const { return entries [i]; }
|
||||
int size() const { return entries.size(); }
|
||||
int size() const { return int(entries.size()); }
|
||||
|
||||
void clear();
|
||||
|
||||
|
|
|
@ -171,8 +171,8 @@ void Stereo_Buffer::mix_stereo( blip_sample_t* out_, blargg_long count )
|
|||
BLIP_READER_NEXT( left, bass );
|
||||
BLIP_READER_NEXT( right, bass );
|
||||
|
||||
out [0] = l;
|
||||
out [1] = r;
|
||||
out [0] = (blip_sample_t)l;
|
||||
out [1] = (blip_sample_t)r;
|
||||
out += 2;
|
||||
}
|
||||
|
||||
|
@ -201,8 +201,8 @@ void Stereo_Buffer::mix_stereo_no_center( blip_sample_t* out_, blargg_long count
|
|||
BLIP_READER_NEXT( left, bass );
|
||||
BLIP_READER_NEXT( right, bass );
|
||||
|
||||
out [0] = l;
|
||||
out [1] = r;
|
||||
out [0] = (blip_sample_t)l;
|
||||
out [1] = (blip_sample_t)r;
|
||||
out += 2;
|
||||
}
|
||||
|
||||
|
@ -223,8 +223,8 @@ void Stereo_Buffer::mix_mono( blip_sample_t* out_, blargg_long count )
|
|||
s = 0x7FFF - (s >> 24);
|
||||
|
||||
BLIP_READER_NEXT( center, bass );
|
||||
out [0] = s;
|
||||
out [1] = s;
|
||||
out [0] = (blip_sample_t)s;
|
||||
out [1] = (blip_sample_t)s;
|
||||
out += 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -348,7 +348,7 @@ blargg_err_t Music_Emu::play( long out_count, sample_t* out )
|
|||
{
|
||||
// during a run of silence, run emulator at >=2x speed so it gets ahead
|
||||
long ahead_time = silence_lookahead * (out_time + out_count - silence_time) + silence_time;
|
||||
while ( emu_time < ahead_time && !(buf_remain | emu_track_ended_) )
|
||||
while ( emu_time < ahead_time && !(buf_remain || emu_track_ended_) )
|
||||
fill_buf();
|
||||
|
||||
// fill with silence
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// Game_Music_Emu 0.6.0. http://www.slack.net/~ant/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "Nsfe_Emu.h"
|
||||
|
||||
#include "blargg_endian.h"
|
||||
|
@ -35,7 +37,7 @@ inline void Nsfe_Info::unload()
|
|||
void Nsfe_Info::disable_playlist( bool b )
|
||||
{
|
||||
playlist_disabled = b;
|
||||
info.track_count = playlist.size();
|
||||
info.track_count = (byte)playlist.size();
|
||||
if ( !info.track_count || playlist_disabled )
|
||||
info.track_count = actual_track_count_;
|
||||
}
|
||||
|
@ -171,7 +173,7 @@ blargg_err_t Nsfe_Info::load( Data_Reader& in, Nsf_Emu* nsf_emu )
|
|||
blargg_vector<char> chars;
|
||||
blargg_vector<const char*> strs;
|
||||
RETURN_ERR( read_strs( in, size, chars, strs ) );
|
||||
int n = strs.size();
|
||||
int n = (int)strs.size();
|
||||
|
||||
if ( n > 3 )
|
||||
copy_str( strs [3], info.dumper, sizeof info.dumper );
|
||||
|
@ -190,7 +192,7 @@ blargg_err_t Nsfe_Info::load( Data_Reader& in, Nsf_Emu* nsf_emu )
|
|||
|
||||
case BLARGG_4CHAR('e','m','i','t'):
|
||||
RETURN_ERR( track_times.resize( size / 4 ) );
|
||||
RETURN_ERR( in.read( track_times.begin(), track_times.size() * 4 ) );
|
||||
RETURN_ERR( in.read( track_times.begin(), (long)track_times.size() * 4 ) );
|
||||
break;
|
||||
|
||||
case BLARGG_4CHAR('l','b','l','t'):
|
||||
|
|
|
@ -30,7 +30,7 @@ static void gen_poly( blargg_ulong mask, int count, byte* out )
|
|||
{
|
||||
// implemented using "Galios configuration"
|
||||
bits |= (n & 1) << b;
|
||||
n = (n >> 1) ^ (mask & -(n & 1));
|
||||
n = (n >> 1) ^ (mask & (blargg_ulong)-(blargg_long)(n & 1));
|
||||
}
|
||||
while ( b++ < 7 );
|
||||
*out++ = bits;
|
||||
|
|
|
@ -119,7 +119,7 @@ static blargg_err_t parse_info( byte const* in, long size, Sap_Emu::info_t* out
|
|||
char const* tag = (char const*) in;
|
||||
while ( in < line_end && *in > ' ' )
|
||||
in++;
|
||||
int tag_len = (char const*) in - tag;
|
||||
int tag_len = int((char const*) in - tag);
|
||||
|
||||
while ( in < line_end && *in <= ' ' ) in++;
|
||||
|
||||
|
@ -256,7 +256,7 @@ blargg_err_t Sap_Emu::load_mem_( byte const* in, long size )
|
|||
|
||||
set_warning( info.warning );
|
||||
set_track_count( info.track_count );
|
||||
set_voice_count( Sap_Apu::osc_count << info.stereo );
|
||||
set_voice_count( Sap_Apu::osc_count << (int)info.stereo );
|
||||
apu_impl.volume( gain() );
|
||||
|
||||
return setup_buffer( 1773447 );
|
||||
|
@ -315,8 +315,8 @@ inline void Sap_Emu::call_init( int track )
|
|||
|
||||
case 'C':
|
||||
r.a = 0x70;
|
||||
r.x = info.music_addr&0xFF;
|
||||
r.y = info.music_addr >> 8;
|
||||
r.x = (BOOST::uint8_t)(info.music_addr&0xFF);
|
||||
r.y = (BOOST::uint8_t)(info.music_addr >> 8);
|
||||
run_routine( info.play_addr + 3 );
|
||||
r.a = 0;
|
||||
r.x = track;
|
||||
|
|
|
@ -141,7 +141,7 @@ void Sms_Noise::run( blip_time_t time, blip_time_t end_time )
|
|||
do
|
||||
{
|
||||
int changed = shifter + 1;
|
||||
shifter = (feedback & -(shifter & 1)) ^ (shifter >> 1);
|
||||
shifter = (feedback & (unsigned)-(signed)(shifter & 1)) ^ (shifter >> 1);
|
||||
if ( changed & 2 ) // true if bits 0 and 1 differ
|
||||
{
|
||||
delta = -delta;
|
||||
|
|
|
@ -303,7 +303,7 @@ void Snes_Spc::set_output( sample_t* out, int size )
|
|||
assert( out <= out_end );
|
||||
}
|
||||
|
||||
dsp.set_output( out, out_end - out );
|
||||
dsp.set_output( out, int(out_end - out) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
|||
#define READ_PROG16( addr ) GET_LE16( ram + (addr) )
|
||||
|
||||
#define SET_PC( n ) (pc = ram + (n))
|
||||
#define GET_PC() (pc - ram)
|
||||
#define GET_PC() (int(pc - ram))
|
||||
#define READ_PC( pc ) (*(pc))
|
||||
#define READ_PC16( pc ) GET_LE16( pc )
|
||||
|
||||
|
@ -77,7 +77,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
|||
#define SPC_NO_SP_WRAPAROUND 0
|
||||
|
||||
#define SET_SP( v ) (sp = ram + 0x101 + (v))
|
||||
#define GET_SP() (sp - 0x101 - ram)
|
||||
#define GET_SP() (int(sp - 0x101 - ram))
|
||||
|
||||
#if SPC_NO_SP_WRAPAROUND
|
||||
#define PUSH16( v ) (sp -= 2, SET_LE16( sp, v ))
|
||||
|
@ -87,7 +87,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
|||
#else
|
||||
#define PUSH16( data )\
|
||||
{\
|
||||
int addr = (sp -= 2) - ram;\
|
||||
int addr = int((sp -= 2) - ram);\
|
||||
if ( addr > 0x100 )\
|
||||
{\
|
||||
SET_LE16( sp, data );\
|
||||
|
@ -256,7 +256,7 @@ loop:
|
|||
}
|
||||
#else
|
||||
{
|
||||
int addr = sp - ram;
|
||||
int addr = int(sp - ram);
|
||||
SET_PC( GET_LE16( sp ) );
|
||||
sp += 2;
|
||||
if ( addr < 0x1FF )
|
||||
|
|
|
@ -155,7 +155,7 @@ inline void Spc_Dsp::init_counter()
|
|||
// counters start out with this synchronization
|
||||
m.counters [0] = 1;
|
||||
m.counters [1] = 0;
|
||||
m.counters [2] = -0x20u;
|
||||
m.counters [2] = -0x20;
|
||||
m.counters [3] = 0x0B;
|
||||
|
||||
int n = 2;
|
||||
|
|
|
@ -154,7 +154,7 @@ private:
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
inline int Spc_Dsp::sample_count() const { return m.out - m.out_begin; }
|
||||
inline int Spc_Dsp::sample_count() const { return int(m.out - m.out_begin); }
|
||||
|
||||
inline int Spc_Dsp::read( int addr ) const
|
||||
{
|
||||
|
|
|
@ -228,14 +228,14 @@ struct Spc_File : Gme_Info_
|
|||
{
|
||||
RETURN_ERR( xid6.resize( xid6_size ) );
|
||||
RETURN_ERR( in.skip( xid6_offset - Spc_Emu::header_size ) );
|
||||
RETURN_ERR( in.read( xid6.begin(), xid6.size() ) );
|
||||
RETURN_ERR( in.read( xid6.begin(), (long)xid6.size() ) );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
blargg_err_t track_info_( track_info_t* out, int ) const
|
||||
{
|
||||
get_spc_info( header, xid6.begin(), xid6.size(), out );
|
||||
get_spc_info( header, xid6.begin(), (long)xid6.size(), out );
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ static byte const* skip_gd3_str( byte const* in, byte const* end )
|
|||
static byte const* get_gd3_str( byte const* in, byte const* end, char* field )
|
||||
{
|
||||
byte const* mid = skip_gd3_str( in, end );
|
||||
int len = (mid - in) / 2 - 1;
|
||||
int len = int(mid - in) / 2 - 1;
|
||||
if ( len > 0 )
|
||||
{
|
||||
len = min( len, (int) Gme_File::max_field_ );
|
||||
|
@ -108,7 +108,7 @@ byte const* Vgm_Emu::gd3_data( int* size ) const
|
|||
return 0;
|
||||
|
||||
byte const* gd3 = data + header_size + gd3_offset;
|
||||
long gd3_size = check_gd3_header( gd3, data_end - gd3 );
|
||||
long gd3_size = check_gd3_header( gd3, long(data_end - gd3) );
|
||||
if ( !gd3_size )
|
||||
return 0;
|
||||
|
||||
|
@ -184,7 +184,7 @@ struct Vgm_File : Gme_Info_
|
|||
if ( gd3_size )
|
||||
{
|
||||
RETURN_ERR( gd3.resize( gd3_size ) );
|
||||
RETURN_ERR( in.read( gd3.begin(), gd3.size() ) );
|
||||
RETURN_ERR( in.read( gd3.begin(), (long)gd3.size() ) );
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
/* Copyright (C) 2002 Stéphane Dallongeville (gens AT consolemul.com) */
|
||||
/* Copyright (C) 2002 Stephane Dallongeville (gens AT consolemul.com) */
|
||||
/* Copyright (C) 2004-2006 Shay Green. This module is free software; you
|
||||
can redistribute it and/or modify it under the terms of the GNU Lesser
|
||||
General Public License as published by the Free Software Foundation; either
|
||||
|
@ -44,9 +44,9 @@ struct slot_t
|
|||
int MUL; // parametre "multiple de frequence"
|
||||
int TL; // Total Level = volume lorsque l'enveloppe est au plus haut
|
||||
int TLL; // Total Level ajusted
|
||||
int SLL; // Sustin Level (ajusted) = volume où l'enveloppe termine sa premiere phase de regression
|
||||
int SLL; // Sustin Level (ajusted) = volume o・l'enveloppe termine sa premiere phase de regression
|
||||
int KSR_S; // Key Scale Rate Shift = facteur de prise en compte du KSL dans la variations de l'enveloppe
|
||||
int KSR; // Key Scale Rate = cette valeur est calculee par rapport à la frequence actuelle, elle va influer
|
||||
int KSR; // Key Scale Rate = cette valeur est calculee par rapport ・la frequence actuelle, elle va influer
|
||||
// sur les differents parametres de l'enveloppe comme l'attaque, le decay ... comme dans la realite !
|
||||
int SEG; // Type enveloppe SSG
|
||||
int env_xor;
|
||||
|
@ -58,24 +58,24 @@ struct slot_t
|
|||
const int *RR; // Release Rate (table pointeur) = Taux pour le rel'chement (RR[KSR])
|
||||
int Fcnt; // Frequency Count = compteur-frequence pour determiner l'amplitude actuelle (SIN[Finc >> 16])
|
||||
int Finc; // frequency step = pas d'incrementation du compteur-frequence
|
||||
// plus le pas est grand, plus la frequence est aïgu (ou haute)
|
||||
// plus le pas est grand, plus la frequence est a・u (ou haute)
|
||||
int Ecurp; // Envelope current phase = cette variable permet de savoir dans quelle phase
|
||||
// de l'enveloppe on se trouve, par exemple phase d'attaque ou phase de maintenue ...
|
||||
// en fonction de la valeur de cette variable, on va appeler une fonction permettant
|
||||
// de mettre à jour l'enveloppe courante.
|
||||
int Ecnt; // Envelope counter = le compteur-enveloppe permet de savoir où l'on se trouve dans l'enveloppe
|
||||
// de mettre ・jour l'enveloppe courante.
|
||||
int Ecnt; // Envelope counter = le compteur-enveloppe permet de savoir o・l'on se trouve dans l'enveloppe
|
||||
int Einc; // Envelope step courant
|
||||
int Ecmp; // Envelope counter limite pour la prochaine phase
|
||||
int EincA; // Envelope step for Attack = pas d'incrementation du compteur durant la phase d'attaque
|
||||
// cette valeur est egal à AR[KSR]
|
||||
// cette valeur est egal ・AR[KSR]
|
||||
int EincD; // Envelope step for Decay = pas d'incrementation du compteur durant la phase de regression
|
||||
// cette valeur est egal à DR[KSR]
|
||||
// cette valeur est egal ・DR[KSR]
|
||||
int EincS; // Envelope step for Sustain = pas d'incrementation du compteur durant la phase de maintenue
|
||||
// cette valeur est egal à SR[KSR]
|
||||
// cette valeur est egal ・SR[KSR]
|
||||
int EincR; // Envelope step for Release = pas d'incrementation du compteur durant la phase de rel'chement
|
||||
// cette valeur est egal à RR[KSR]
|
||||
int *OUTp; // pointeur of SLOT output = pointeur permettant de connecter la sortie de ce slot à l'entree
|
||||
// d'un autre ou carrement à la sortie de la voie
|
||||
// cette valeur est egal ・RR[KSR]
|
||||
int *OUTp; // pointeur of SLOT output = pointeur permettant de connecter la sortie de ce slot ・l'entree
|
||||
// d'un autre ou carrement ・la sortie de la voie
|
||||
int INd; // input data of the slot = donnees en entree du slot
|
||||
int ChgEnM; // Change envelop mask.
|
||||
int AMS; // AMS depth level of this SLOT = degre de modulation de l'amplitude par le LFO
|
||||
|
@ -102,10 +102,10 @@ struct state_t
|
|||
{
|
||||
int TimerBase; // TimerBase calculation
|
||||
int Status; // YM2612 Status (timer overflow)
|
||||
int TimerA; // timerA limit = valeur jusqu'à laquelle le timer A doit compter
|
||||
int TimerA; // timerA limit = valeur jusqu'・laquelle le timer A doit compter
|
||||
int TimerAL;
|
||||
int TimerAcnt; // timerA counter = valeur courante du Timer A
|
||||
int TimerB; // timerB limit = valeur jusqu'à laquelle le timer B doit compter
|
||||
int TimerB; // timerB limit = valeur jusqu'・laquelle le timer B doit compter
|
||||
int TimerBL;
|
||||
int TimerBcnt; // timerB counter = valeur courante du Timer B
|
||||
int Mode; // Mode actuel des voie 3 et 6 (normal / special)
|
||||
|
@ -1255,7 +1255,7 @@ void Ym2612_Impl::run( int pair_count, Ym2612_Emu::sample_t* out )
|
|||
if ( YM2612.Mode & 3 )
|
||||
run_timer( pair_count );
|
||||
|
||||
// Mise à jour des pas des compteurs-frequences s'ils ont ete modifies
|
||||
// Mise ・jour des pas des compteurs-frequences s'ils ont ete modifies
|
||||
|
||||
for ( int chi = 0; chi < channel_count; chi++ )
|
||||
{
|
||||
|
@ -1277,7 +1277,7 @@ void Ym2612_Impl::run( int pair_count, Ym2612_Emu::sample_t* out )
|
|||
int ksr = ch.KC [i2] >> sl.KSR_S; // keycode attenuation
|
||||
sl.Finc = (finc + sl.DT [ch.KC [i2]]) * sl.MUL;
|
||||
if (sl.KSR != ksr) // si le KSR a change alors
|
||||
{ // les differents taux pour l'enveloppe sont mis à jour
|
||||
{ // les differents taux pour l'enveloppe sont mis ・jour
|
||||
sl.KSR = ksr;
|
||||
|
||||
sl.EincA = sl.AR [ksr];
|
||||
|
|
|
@ -343,7 +343,7 @@ BLARGG_EXPORT void gme_ignore_silence ( Music_Emu* me, int disable )
|
|||
BLARGG_EXPORT void gme_set_tempo ( Music_Emu* me, double t ) { me->set_tempo( t ); }
|
||||
BLARGG_EXPORT void gme_mute_voice ( Music_Emu* me, int index, int mute ) { me->mute_voice( index, mute != 0 ); }
|
||||
BLARGG_EXPORT void gme_mute_voices ( Music_Emu* me, int mask ) { me->mute_voices( mask ); }
|
||||
BLARGG_EXPORT void gme_enable_accuracy( Music_Emu* me, int enabled ) { me->enable_accuracy( enabled ); }
|
||||
BLARGG_EXPORT void gme_enable_accuracy( Music_Emu* me, int enabled ) { me->enable_accuracy( !!enabled ); }
|
||||
BLARGG_EXPORT void gme_clear_playlist ( Music_Emu* me ) { me->clear_playlist(); }
|
||||
BLARGG_EXPORT int gme_type_multitrack( gme_type_t t ) { return t->track_count != 1; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue